Commit e22d350f by linjinhong

添加loading

parent c1efd740
...@@ -101,6 +101,7 @@ const [editForm, resetEditForm] = useValue<AddDeclarationRuleObj>({ ...@@ -101,6 +101,7 @@ const [editForm, resetEditForm] = useValue<AddDeclarationRuleObj>({
currency: 'USD', currency: 'USD',
}) })
const { const {
loading,
currentPage, currentPage,
pageSize, pageSize,
total, total,
...@@ -466,7 +467,7 @@ const tableConfig = ref<TableColumn[]>([ ...@@ -466,7 +467,7 @@ const tableConfig = ref<TableColumn[]>([
}, },
]) ])
const loading = ref(false) // const loading = ref(false)
/** /**
* @description: 取消按钮 * @description: 取消按钮
......
...@@ -436,7 +436,7 @@ onMounted(() => { ...@@ -436,7 +436,7 @@ onMounted(() => {
}) })
async function search() { async function search() {
loading.value = true // loading.value = true
const isEqual = const isEqual =
JSON.stringify(searchForm.value) === JSON.stringify({ logisticsIdList: [] }) JSON.stringify(searchForm.value) === JSON.stringify({ logisticsIdList: [] })
try { try {
...@@ -448,7 +448,7 @@ async function search() { ...@@ -448,7 +448,7 @@ async function search() {
} catch (e) { } catch (e) {
console.log(e) console.log(e)
} finally { } finally {
loading.value = false // loading.value = false
} }
} }
...@@ -729,6 +729,7 @@ function handleSizeChange(val: number) { ...@@ -729,6 +729,7 @@ function handleSizeChange(val: number) {
} }
async function getList() { async function getList() {
loading.value = true
try { try {
const { data } = await getlogisticsQuotationPage({ const { data } = await getlogisticsQuotationPage({
...searchForm.value, ...searchForm.value,
...@@ -741,10 +742,13 @@ async function getList() { ...@@ -741,10 +742,13 @@ async function getList() {
mergeCells.value = [] mergeCells.value = []
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} finally {
loading.value = false
} }
} }
const templeData = ref<LogisticsQuotation[]>([]) const templeData = ref<LogisticsQuotation[]>([])
async function getSearchList() { async function getSearchList() {
loading.value = true
try { try {
const { data } = await getlogisticsQuotationList({ const { data } = await getlogisticsQuotationList({
...searchForm.value, ...searchForm.value,
...@@ -784,6 +788,8 @@ async function getSearchList() { ...@@ -784,6 +788,8 @@ async function getSearchList() {
mergeCells.value = newMergeCells mergeCells.value = newMergeCells
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} finally {
loading.value = false
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment