Parcourir la source

修复类型导致的显示bug

lucw il y a 8 mois
Parent
commit
d3c9a752cf
2 fichiers modifiés avec 12 ajouts et 3 suppressions
  1. 10 1
      src/views/regulationManagement/components/addOrEditDialog.vue
  2. 2 2
      vue.config.js

+ 10 - 1
src/views/regulationManagement/components/addOrEditDialog.vue

@@ -282,7 +282,15 @@
         if (type !== 'add') {
         if (type !== 'add') {
           row.assessmentIndicators = Number(row.assessmentIndicators);
           row.assessmentIndicators = Number(row.assessmentIndicators);
           this.form = JSON.parse(JSON.stringify(row));
           this.form = JSON.parse(JSON.stringify(row));
-          this.tableList = this.form.assessmentCriteria;
+          // 转换value为number类型
+          this.tableList = this.form.assessmentCriteria?.map((i) => {
+            return i.map((j) => {
+              return {
+                ...j,
+                value: Number(j.value)
+              };
+            });
+          });
           this.buissChange(row.type, 'init');
           this.buissChange(row.type, 'init');
           this.salesChange(row.assessmentIndicators, 'init');
           this.salesChange(row.assessmentIndicators, 'init');
         } else {
         } else {
@@ -322,6 +330,7 @@
       salesChange(val, type) {
       salesChange(val, type) {
         let data = this.options.find((el) => el.value == val);
         let data = this.options.find((el) => el.value == val);
         this.valueOptions = data.nodes;
         this.valueOptions = data.nodes;
+        console.log('this.valueOptions', this.valueOptions);
         this.statusOptions = data.equles;
         this.statusOptions = data.equles;
         if (type == 'init') {
         if (type == 'init') {
           return;
           return;

+ 2 - 2
vue.config.js

@@ -36,11 +36,11 @@ module.exports = {
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.1.176:18086',
         // target: 'http://192.168.1.176:18086',
 
 
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.251:18186',
 
 
         // target: 'http://192.168.1.251:18087',
         // target: 'http://192.168.1.251:18087',
-        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.116:18086',
 
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域