Forráskód Böngészése

处置后不刷新的问题

wsx 11 hónapja
szülő
commit
9b7704a330

+ 2 - 2
src/views/sample/samplemanagement/components/addOrEditSample.vue

@@ -34,7 +34,7 @@
                 v-for="item in sampleList"
                 :key="item.id"
                 :label="item.label"
-                :value="item.id"
+                :value="+item.id"
               >
               </el-option>
             </el-select>
@@ -243,7 +243,7 @@
         this.form.weight = data.netWeight;
         this.form.specification = data.specification;
         this.form.modelType = data.modelType;
-        data.conditionType = this.form.conditionType;
+        // data.conditionType = this.form.conditionType;
         // this.form = { ...data };
         // 单选
         this.dataList = [];

+ 9 - 2
src/views/sample/samplemanagement/detailList.vue

@@ -10,6 +10,7 @@
         :pageSize="20"
         :pageSizes="[20, 30, 40, 50, 100]"
         :height="500"
+        :key="key"
       >
         <!-- 操作列 -->
         <template v-slot:toolbar>
@@ -225,6 +226,10 @@
     mixins: [dictMixins],
     data() {
       return {
+        key: '',
+        response: {
+          dataName: 'sampleVOList'
+        },
         warehouseList: [],
         type6Form: {
           sampleCondition: '',
@@ -448,8 +453,10 @@
       },
       reload(where) {
         console.log('reload');
-
+        this.key = Math.random();
         this.$nextTick(() => {
+          // this.datasource();
+          // this.$refs.table.reRenderTable();
           this.$refs.table.reload({ page: 1, where: where });
         });
       },
@@ -515,7 +522,7 @@
           this.$refs['type6Form'].validate(async (valid) => {
             if (valid) {
               const pa = { ...deepClone(this.current), ...this.type6Form };
-              const params = { disposeType: this.disposeType, polist: [pa] };
+              const params = { disposeType: this.disposeType, poList: [pa] };
               await disposeApi(params);
               this.dialogVisible = false;
               this.current = null;