Browse Source

修复问题

xiaochan 3 weeks ago
parent
commit
0d0637b754
1 changed files with 11 additions and 3 deletions
  1. 11 3
      src/views/operate-monitoring/DeptOperateAnalyseByMonthly.vue

+ 11 - 3
src/views/operate-monitoring/DeptOperateAnalyseByMonthly.vue

@@ -30,8 +30,12 @@ const renderTableRef = useCompShallowRef(RenderTable);
 const formRef = useCompShallowRef(ElForm);
 
 async function handleQueryBusiness(business) {
+  const url = store.templateTypeList.find(
+    item => item.code === params.templateType
+  )?.url;
+
   return await magicApi({
-    url: "/public/dashboard/dataSource",
+    url: url,
     method: "post",
     data: {
       isSource: false,
@@ -50,7 +54,7 @@ async function handleQueryBusiness(business) {
 
 async function handleQuery() {
   await formRef.value.validate();
-  store.htmlData = await magicApi({
+  const tmp = await magicApi({
     url: "/public/dashboard/getTemplate",
     method: "get",
     params: {
@@ -59,7 +63,11 @@ async function handleQuery() {
     },
   });
   await nextTick();
-  renderTableRef.value.reloadData();
+  if (tmp === store.htmlData) {
+    renderTableRef.value.reloadData();
+  } else {
+    store.htmlData = tmp;
+  }
 }
 
 onMounted(() => {