Эх сурвалжийг харах

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dengfei

695593266@qq.com 9 сар өмнө
parent
commit
fa7d144506

+ 9 - 14
src/views/produce/components/workPlan/components/inspectionTemplateDialog.vue

@@ -12,12 +12,13 @@
       ref="table"
       :columns="columns"
       :datasource="datasource"
-      :height="tableHeight"
+      height="calc(100vh - 605px)"
+      full-height="calc(100vh -120px)"
       tool-class="ele-toolbar-form"
       row-key="qualityLevelId"
       v-if="equipmentdialog"
       :selection.sync="selection"
-      @fullscreen-change="fullscreenChange"
+      :initLoad="false"
     >
       <template v-slot:status="{ row }">
         {{ row.status ? '启用' : '停用' }}
@@ -94,8 +95,7 @@
             slot: 'action',
             fixed: 'right'
           }
-        ],
-        tableHeight: 'calc(100vh - 605px)'
+        ]
       };
     },
 
@@ -105,25 +105,20 @@
         return getList({
           ...where,
           pageNum: page,
-          size: limit,
-          type: this.type
+          size: limit
         });
       },
       open(type) {
-        this.type = type;
         this.equipmentdialog = true;
+        this.$nextTick(() => {
+          this.$refs.search.setWhere(type);
+          this.$refs.search.search();
+        });
       },
       handleClose() {
         this.equipmentdialog = false;
       },
 
-      fullscreenChange(fullscreen) {
-        if (fullscreen) {
-          this.tableHeight = 'calc(100vh - 120px)';
-        } else {
-          this.tableHeight = 'calc(100vh - 605px)';
-        }
-      },
       // 选择
       selected() {
         if (!this.selection.length) {

+ 14 - 1
src/views/produce/components/workPlan/components/search.vue

@@ -40,6 +40,15 @@
           </el-select>
         </el-form-item>
       </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 10 } : { span: 6 }">
+        <el-form-item label="质检方案类型:">
+          <DictSelection
+            dictName="质检计划类型"
+            v-model="where.type"
+          ></DictSelection>
+        </el-form-item>
+      </el-col>
+
       <el-col
         style="display: flex; justify-content: flex-end"
         v-bind="styleResponsive ? { lg: 6, md: 18 } : { span: 6 }"
@@ -67,7 +76,8 @@
       const defaultWhere = {
         name: '',
         standardCode: '',
-        status: ''
+        status: '',
+        type: ''
       };
       return {
         defaultWhere,
@@ -86,6 +96,9 @@
       search() {
         this.$emit('search', this.where);
       },
+      setWhere(type) {
+        this.where.type = type;
+      },
       /*  重置 */
       reset() {
         this.where = { ...this.defaultWhere };