yusheng vor 1 Monat
Ursprung
Commit
e057b2971c
2 geänderte Dateien mit 21 neuen und 17 gelöschten Zeilen
  1. 7 7
      src/views/meterModel/energyDialog.vue
  2. 14 10
      src/views/sealManagement/index.vue

+ 7 - 7
src/views/meterModel/energyDialog.vue

@@ -79,8 +79,10 @@
                   v-show="false"
                   v-show="false"
                 />
                 />
                 <fileMain
                 <fileMain
+                  v-if="visible"
                   v-model="form.modelImg"
                   v-model="form.modelImg"
                   :type="title == '详情' ? 'view' : 'add'"
                   :type="title == '详情' ? 'view' : 'add'"
+                  key="modelImg1"
                 ></fileMain>
                 ></fileMain>
               </el-form-item>
               </el-form-item>
             </el-col>
             </el-col>
@@ -344,9 +346,7 @@
             resizable: false
             resizable: false
           }
           }
         ],
         ],
-        form: {
-          ...defaultForm
-        },
+        form: JSON.parse(JSON.stringify(defaultForm)),
         rules: {
         rules: {
           name: [
           name: [
             { required: true, message: '请输入', trigger: 'blur' },
             { required: true, message: '请输入', trigger: 'blur' },
@@ -387,6 +387,7 @@
         } else {
         } else {
           this.title = '新增';
           this.title = '新增';
           this.resetForm();
           this.resetForm();
+          console.log(this.form);
         }
         }
         this.visible = true;
         this.visible = true;
       },
       },
@@ -441,9 +442,7 @@
       },
       },
       // 重置表单
       // 重置表单
       resetForm() {
       resetForm() {
-        this.form = {
-          ...defaultForm
-        };
+        this.form = JSON.parse(JSON.stringify(defaultForm));
 
 
         this.measureList = [];
         this.measureList = [];
         this.parameterList = [];
         this.parameterList = [];
@@ -483,8 +482,9 @@
       },
       },
       // 取消
       // 取消
       handleCancel() {
       handleCancel() {
-        this.visible = false;
         this.resetForm();
         this.resetForm();
+
+        this.visible = false;
       }
       }
     }
     }
   };
   };

+ 14 - 10
src/views/sealManagement/index.vue

@@ -19,6 +19,7 @@
           :columns="columns"
           :columns="columns"
           :datasource="datasource"
           :datasource="datasource"
           :cache-key="cacheKeyUrl"
           :cache-key="cacheKeyUrl"
+          @columns-change="handleColumnChange"
           height="calc(100vh - 350px)"
           height="calc(100vh - 350px)"
         >
         >
           <template v-slot:toolbar>
           <template v-slot:toolbar>
@@ -135,8 +136,12 @@
   import { reviewStatus } from '@/enum/dict';
   import { reviewStatus } from '@/enum/dict';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
   import processSubmitDialog from '@/components/processSubmitDialog/processSubmitDialog.vue';
   import { getUserPage } from '@/api/system/organization';
   import { getUserPage } from '@/api/system/organization';
+  import dictMixins from '@/mixins/dictMixins';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin';
 
 
   export default {
   export default {
+    mixins: [dictMixins, tableColumnsMixin],
+
     components: {
     components: {
       SealDialog,
       SealDialog,
       HistoryVersionDialog,
       HistoryVersionDialog,
@@ -184,9 +189,12 @@
             showOverflowTooltip: true
             showOverflowTooltip: true
           },
           },
           {
           {
-            prop: 'type',
+            prop: 'sealType',
             label: '类型',
             label: '类型',
             align: 'center',
             align: 'center',
+            formatter: (_row) => {
+              return this.getDictValue('印章类型', _row.sealType);
+            },
             minWidth: 110,
             minWidth: 110,
             showOverflowTooltip: true
             showOverflowTooltip: true
           },
           },
@@ -296,15 +304,10 @@
           },
           },
           {
           {
             label: '印章类型',
             label: '印章类型',
-            value: 'type',
-            type: 'select',
-            placeholder: '请选择',
-            planList: [
-              { label: '法律效力章', value: '1' },
-              { label: '财务专用章', value: '2' },
-              { label: '业务专用章', value: '3' },
-              { label: '内部管理章', value: '4' }
-            ]
+            value: 'sealType',
+            type: 'DictSelection',
+            dictName: '印章类型',
+            placeholder: '请选择'
           },
           },
           {
           {
             label: '印章持有人',
             label: '印章持有人',
@@ -322,6 +325,7 @@
       }
       }
     },
     },
     created() {
     created() {
+      this.requestDict('印章类型');
       // 格式化公司数据
       // 格式化公司数据
       getUserPage({
       getUserPage({
         size: 999
         size: 999