|
@@ -192,6 +192,7 @@ const { proxy }: any = getCurrentInstance()
|
|
|
const state: any = reactive({
|
|
|
text: '',
|
|
|
query: {
|
|
|
+ init: false,
|
|
|
loading: false,
|
|
|
page: {
|
|
|
pageNum: 1,
|
|
@@ -221,7 +222,11 @@ watch(
|
|
|
watch(
|
|
|
() => state.query.form,
|
|
|
(n) => {
|
|
|
- onSearch()
|
|
|
+ console.log(state.query.init)
|
|
|
+ console.log(3)
|
|
|
+ if (state.query.init) {
|
|
|
+ onSearch()
|
|
|
+ }
|
|
|
},
|
|
|
{ deep: true },
|
|
|
)
|
|
@@ -231,8 +236,9 @@ const onPage = (pageNum, pageSize) => {
|
|
|
pageSize: pageSize,
|
|
|
}
|
|
|
const params = {
|
|
|
- pageNum: state.query.page.pageNum,
|
|
|
- pageSize: state.query.page.pageSize,
|
|
|
+ tenantId: 0,
|
|
|
+ page: state.query.page.pageNum,
|
|
|
+ size: state.query.page.pageSize,
|
|
|
}
|
|
|
// 添加表单参数
|
|
|
for (const [k, v] of Object.entries(state.query.formReal)) {
|
|
@@ -260,18 +266,11 @@ const onPage = (pageNum, pageSize) => {
|
|
|
state.query.result.data = arr
|
|
|
state.query.loading = false
|
|
|
}, 1000)
|
|
|
- // state.query.loading = true
|
|
|
- // listRuleLogisticsDataSubscribeInfo(params).then(res => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // state.query.result.total = res.total
|
|
|
- // state.query.result.data = res.rows
|
|
|
- // state.query.loading = false
|
|
|
- // } else {
|
|
|
- // ElMessage.error(res.msg)
|
|
|
- // }
|
|
|
- // }).catch(() => {
|
|
|
- // state.query.loading = false
|
|
|
- // })
|
|
|
+ datasetsGetAllByPage(params).then(({ data }) => {})
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ state.query.loading = true
|
|
|
+ }, 100)
|
|
|
}
|
|
|
const onSearch = () => {
|
|
|
state.query.formReal = JSON.parse(JSON.stringify(state.query.form))
|
|
@@ -316,7 +315,6 @@ const initDictionary = () => {
|
|
|
DictionaryStore.initKnowledgeGroups()
|
|
|
}
|
|
|
onMounted(() => {
|
|
|
- datasetsGetAllByPage()
|
|
|
initDictionary()
|
|
|
onReset()
|
|
|
})
|