Explorar o código

保存参数修改

luolei %!s(int64=5) %!d(string=hai) anos
pai
achega
6e700c350b

+ 1 - 0
src/api/index.js

@@ -4,6 +4,7 @@ import config from './config.js';
 axios.default.timeout = 5000;
 axios.defaults.headers.post['Content-Type'] = "application/json;charset=utf-8";
 // axios.defaults.baseURL = 'http://192.168.2.241';
+axios.defaults.baseURL = 'http://192.168.3.117:5050';
 
 const urls = config.urls;
 export default {

+ 23 - 4
src/components/qualityControl/BaseFieldList.vue

@@ -153,10 +153,29 @@
         });
       },
       toEditField(row){
-        this.$router.push({
-          name:'FieldMatch',
-          params: {info:row}
-        })
+        api.getFieldDetail({id:row.id}).then((res)=>{
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+            const item = Object.assign({},row,data);
+            const pam = this.searched ? {
+              currentPage: this.currentPage,
+              filter: this.filter
+            } : {currentPage: this.currentPage};
+              this.$router.push({
+                name: 'FieldMatch', 
+                params: {info:data}
+              });
+          }else{
+            this.$message({
+              message: msg,
+              type: 'warning'
+            });
+          }
+        });
+        // this.$router.push({
+        //   name:'FieldMatch',
+        //   params: {info:row}
+        // })
       },
       filterDatas(){
         this.currentPage = 1;

+ 25 - 4
src/components/qualityControl/FieldMatch.vue

@@ -92,6 +92,7 @@
           position:0,
           retract:0,
           casesEntryIds:'',
+          quesCasesEntryVOList:[]
         },
         id:null,
         rules:{
@@ -112,11 +113,23 @@
       let info = this.$route.params.info;
       if(info){
         const infoCopy =  Object.assign({},info);
-        infoCopy.casesEntryIds?this.casesEIds = infoCopy.casesEntryIds.split(","):'';
-    
+        // infoCopy.casesEntryIds?this.casesEIds = infoCopy.casesEntryIds.split(","):'';
+        let tmpArr = [],tmpArr1 = []
+        for(let i = 0;i < infoCopy.quesCasesEntryDTOList.length;i++){
+          let obj = {
+            name:infoCopy.quesCasesEntryDTOList[i].casesEntryName,
+            casesEntryName:infoCopy.quesCasesEntryDTOList[i].casesEntryName,
+            id:infoCopy.quesCasesEntryDTOList[i].casesEntryId,
+            casesEntryId:infoCopy.quesCasesEntryDTOList[i].casesEntryId
+          }
+          tmpArr.push(infoCopy.quesCasesEntryDTOList[i].casesEntryId)
+          tmpArr1.push(obj)
+        }
+        infoCopy.quesCasesEntryDTOList?this.casesEIds = tmpArr:'';
+        infoCopy.quesCasesEntryVOList = [...tmpArr1];
         this.title='字段映射维护-修改映射字段';
         this.form = infoCopy;
-        this.getQcFlawList();
+        this.getQcFlawList(tmpArr1);
       }else{
         let hospitalId = localStorage.getItem("qcSelectHospital")&&Number(localStorage.getItem("qcSelectHospital")) || "";
         let modeId = localStorage.getItem("qcSelectModule")&&Number(localStorage.getItem("qcSelectModule"))  || "";
@@ -130,6 +143,15 @@
     watch:{
       "casesEIds":function(val){
         this.form.casesEntryIds = val.join(",");
+        let tmp = []
+        for(let i = 0;i < val.length;i++){
+          let obj = {
+            casesEntryId:val[i],
+            id:val[i],
+          }
+          tmp.push(obj)
+        }
+        this.form.quesCasesEntryVOList = tmp
       }
     },
     methods:{
@@ -155,7 +177,6 @@
           if(res.data.code==="0") {
             const data = res.data.data;
             this.flawList = data.records;
-
           }else{
             this.warning("获取缺陷条目失败");
           }