Ver Fonte

更新首页工单列表

xiaohaizhao há 1 ano atrás
pai
commit
2ab2133268

+ 0 - 1
packageA/workOrder/modules/but.vue

@@ -93,7 +93,6 @@ export default {
                             }
                             if (that.cutoff(res.msg, this.toast)) return that.loading = false;
                             this.$Http.updateWorkorder && this.$Http.updateWorkorder();
-                            this.$Http.updateWorkorderList && this.$Http.updateWorkorderList(true);
                             that.$emit("onUpdate", true)
                         })
                     }

+ 4 - 4
pages/index/modules/home.vue

@@ -27,8 +27,7 @@
 		<spectaculars ref="spectaculars" />
 		<!-- 巡检计划 -->
 		<patrolScheme ref="patrolScheme" />
-
-		<workorder v-if="showWorkrder" :isHome="true" />
+		<workorder ref="workroder" v-if="showWorkrder" :isHome="true" />
 		<view style="height: calc(16.533vw + env(safe-area-inset-bottom) / 2);" />
 	</view>
 </template>
@@ -67,7 +66,7 @@ export default {
 		let userMsg = uni.getStorageSync("userMsg");
 		this.sitename = `${userMsg.sitename} - ${userMsg.name}`
 		try {
-			this.showWorkrder = uni.getStorageSync('authList')['工单']['工单'].name == "workorder"
+			this.showWorkrder = uni.getStorageSync('authList')['工单']['工单'].name == "workorder";
 		} catch (error) {
 			this.showWorkrder = false
 		}
@@ -77,9 +76,10 @@ export default {
 	},
 	methods: {
 		renderData() {
-			this.$refs.notice.getList();
+			this.$refs.notice.getList(true);
 			this.$refs.spectaculars.getDetail();
 			this.$refs.patrolScheme.getDetail();
+			this.$refs.workroder.getlist(true);
 		},
 		getWeather() {
 			this.$Http.basic({

+ 0 - 6
pages/index/modules/workorderList.vue

@@ -76,12 +76,6 @@ export default {
             list: []
         }
     },
-    mounted() {
-        if (this.isHome) {
-            this.getlist(true);
-            this.$Http.updateWorkorderList = this.getlist.bind(this);
-        }
-    },
     methods: {
         getlist(init = false) {
             let content = this.content;