Переглянути джерело

Merge remote-tracking branch 'origin/master' into master

yejian 3 роки тому
батько
коміт
3340733d2f

+ 10 - 7
imcs-ui/src/views/zuihou/statisticalAnalysis/resouceOee/Index.vue

@@ -3,9 +3,9 @@
     <el-row class="rowCls">
 		<!-- 搜索模块 -->
     <div class="filter-container">
-    	<span style="margin-left: 15px;">
+    	<span style="margin-left: 15px;" v-show="this.productionLines.length>1">
     		<span>{{$t("statisticalAnalysis.searchForm.oee.productlineName")}}:</span>
-    		<el-select v-model="productionLineId" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+    		<el-select  v-model="productionLineId" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
         	<el-option
 			      v-for="item in productionLines"
 			      :key="item.id"
@@ -79,8 +79,7 @@
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	  created() {
 	  	// 加载产线下拉框数据
-	  	this.getLineList();
-      this.fetch();
+	  	this.getLineList();     
       // this.queryProductionLines()
 		},
 	  computed: {
@@ -96,7 +95,7 @@
           this.statisticalDate = '';
           //this.queryParams = initQueryParams({})
           //this.$refs.table.clearSort()
-          //this.$refs.clearFilter()
+          //this.$refs.clearFilter() 
           this.search()
       },
 	    fetch () {
@@ -115,7 +114,7 @@
 	        }
 	      }).finally(() => this.loading = false)
 	    },
-
+	    
 	    // 产线下拉数据
 	  	getLineList(){
 	  		areaMgrApi.getList().then(res => {
@@ -123,10 +122,14 @@
 	  			// console.log("产线下拉数据: ", res);
 	  			if(res.code == 0) {
 	  				this.productionLines = res.data;
+            if(this.productionLines.length ==1){
+               this.productionLineId = this.productionLines[0].id
+            }
+            this.fetch()
 	  			}
 	  		})
 	  	},
-
+	  	
       // 产线查找
       queryProductionLines(){
           this.productionLines = []