wenhongquan 3 years ago
parent
commit
9a03d54ae8

+ 16 - 0
src/views/mb/detection/index.vue

@@ -123,6 +123,10 @@ const { detection_status, detection_type } = useDict(
   "detection_type"
 );
 
+const store = useStore();
+const getters = computed(() => store.getters);
+
+
 const bodyheight = ref(0);
 bodyheight.value = document.body.clientHeight - 48 - 46;
 const value1 = ref(0);
@@ -154,6 +158,10 @@ const onLoad = () => {
   if (value2.value !== '0') {
     p['status'] =parseInt(value2.value)
   }
+  if(value1.value == '0'){
+    p["params"] = {};
+    p.params['userId'] = getters.value.userId;
+  }
   listDetection(p).then((res) => {
     // finished.value = true;
     loading.value = false;
@@ -169,6 +177,14 @@ watch(() => value2.value, () => {
   onLoad();
 })
 
+watch(
+  () => value1.value,
+  () => {
+    refreshing.value = true;
+    onLoad();
+  }
+);
+
 
 const onRefresh = () => {
   // 清空列表数据

+ 14 - 0
src/views/mb/maintain/index.vue

@@ -114,6 +114,9 @@ const { maintain_status, maintain_type } = useDict(
   "maintain_status",
   "maintain_type"
 );
+const store = useStore();
+const getters = computed(() => store.getters);
+
 
 const bodyheight = ref(0);
 bodyheight.value = document.body.clientHeight - 48 - 46;
@@ -146,6 +149,10 @@ const onLoad = () => {
   if (value2.value !== "0") {
     p["status"] = parseInt(value2.value);
   }
+  if(value1.value == '0'){
+    p["params"] = {};
+    p.params['userId'] = getters.value.userId;
+  }
   listMaintain(p).then((res) => {
     // finished.value = true;
     loading.value = false;
@@ -164,6 +171,13 @@ watch(
     onLoad();
   }
 );
+watch(
+  () => value1.value,
+  () => {
+    refreshing.value = true;
+    onLoad();
+  }
+);
 
 const onRefresh = () => {
   // 清空列表数据

+ 14 - 2
src/views/mb/task/index.vue

@@ -220,6 +220,9 @@ const option2 = computed(() => {
 const gotodetail = (item) => {
   router.push(`/mb/task/detail/${item.taskId}`);
 };
+const store = useStore();
+const getters = computed(() => store.getters);
+
 
 const pagec = ref(1);
 
@@ -233,6 +236,10 @@ const onLoad = () => {
   if (value2.value !== "0") {
     p["status"] = parseInt(value2.value);
   }
+  if(value1.value == '0'){
+    p["params"] = {};
+    p.params['userId'] = getters.value.userId;
+  }
   listTask(p).then((res) => {
     // finished.value = true;
     loading.value = false;
@@ -250,6 +257,13 @@ watch(
     onLoad();
   }
 );
+watch(
+  () => value1.value,
+  () => {
+    refreshing.value = true;
+    onLoad();
+  }
+);
 
 const onRefresh = () => {
   // 清空列表数据
@@ -279,8 +293,6 @@ const xyobj = ref({
   gls: "",
 });
 
-const store = useStore();
-const getters = computed(() => store.getters);
 
 const allusers = ref([]);
 listUser({ pageSize: 1000 }).then((res) => {

+ 0 - 2
src/views/task/list/index.vue

@@ -281,7 +281,6 @@ const taskinfo = ref({
   taskComplainConnect: null,
   taskDeptRange: "",
   taskFacilitieCode: "",
-  remark: "",
 });
 const taskaddref = ref();
 const route = useRoute();
@@ -314,7 +313,6 @@ const addtask = () => {
     taskComplainConnect: null,
     taskDeptRange: "",
     taskFacilitieCode: "",
-    remark: "",
   };
   taskaddref.value?.doinit(taskinfo.value);
 };

+ 2 - 1
vite.config.js

@@ -38,6 +38,7 @@ export default defineConfig(({ mode, command }) => {
                 // 'http://nnbpbg.xt.wenhq.top:8083'
                 "/dev-api": {
                     target: "http://localhost:8080/api",
+                    // target:"http://nnbpbg.xt.wenhq.top:8083/api",
                     changeOrigin: true,
                     rewrite: (p) => p.replace(/^\/dev-api/, ""),
                 },
@@ -59,4 +60,4 @@ export default defineConfig(({ mode, command }) => {
             },
         },
     };
-})
+})