zhouna 6 rokov pred
rodič
commit
85d3a2321a

+ 1 - 0
src/api/config.js

@@ -87,6 +87,7 @@ export default {
     'getTagList': 'api/icssman/questionInfo/list', //标签列表
     'searchTagList': 'api/icssman/questionInfo/index', //标签池检索
     'detailsTagList': 'api/icssman/questionInfo/getByIds', //根据多个标签ID返回标签内容
+    'detailsTag':'api/icssman/questionInfo/getById',      //根据标签ID返回标签内容
     'getDeptInfo': 'api/icssman/deptInfo/getDeptInfo', //科室维护
     'getDeptInfoDetials': 'api/icssman/deptInfo/getDeptInfoDetials', //科室维护-详情
     'deleteDeptInfo': 'api/icssman/deptInfo/deleteDeptInfo', //科室维护-删除

+ 3 - 0
src/api/icss.js

@@ -18,6 +18,9 @@ export default {
     detailsTagList(param) {
         return axios.post(urls.detailsTagList, param)
     },
+      detailsTag(param) {
+        return axios.post(urls.detailsTag, param)
+      },
     getDeptInfo(param) {//科室维护
         return axios.post(urls.getDeptInfo, param)
     },

+ 6 - 6
src/components/icss/AddIndeptLabel.vue

@@ -14,7 +14,7 @@
         ></PubIndeptTag>
         <div class="main">
             <p class="title" v-if="dataPub.region2==1||dataPub.region2==2||dataPub.region2==99"> <i>*</i> 标签明细:</p>
-            <SingleSelect v-if="dataPub.region2==1" :type="dataPub.region2" @pushValues="pushValues" :options="editData.questionDetails"></SingleSelect>
+            <SingleSelect v-if="dataPub.region2==1" :type="dataPub.region2" @pushValues="pushValues" :options="editData.questionDetailList"></SingleSelect>
             <div class="btn">
                 <el-button
                         type="primary"
@@ -52,9 +52,9 @@
       }
     },
     beforeMount:function(){
-      const {params} = this.$route;
-      if(params.isEdit){
-        this.editData = params.data;
+      const {isEdit,data} = this.$route.params;
+      if(isEdit){
+        this.editData = data;
       }
     },
     computed: {
@@ -96,11 +96,11 @@
           });
           return;
         }
-
+        const {isEdit,data} = this.$route.params;
         let param = {
           "questionWrapper": {
             "controlType": this.dataPub.region2,                            //控件类型(0:默认值 1:下拉单选 2:下拉多选 6:文本框 7:数字键盘文本框 99:联合推送)
-            "id": "",                                    //新增id置空
+            "id": isEdit?data.id:'',                                    //新增id置空
             "type": this.dataPub.region1,                //标签归属
             "tagType": 1,             //标签类型
             "tagName": this.dataPub.region3,             //系统名称

+ 14 - 2
src/components/icss/IndeptLabel.vue

@@ -42,7 +42,7 @@
                         label="标签归属">
                 </el-table-column>
                 <el-table-column
-                        prop="tagTypeCn"
+                        prop="controlTypeCn"
                         label="标签类型">
                 </el-table-column>
                 <el-table-column
@@ -150,7 +150,19 @@
         this.$router.push({path:'LT-YXSJWH-TJDLBQ'})
       },
       modifyIndeptTag(row) {
-        this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:row}});
+        api.detailsTag({id:row.id,sexType:row.sexType,age:row.age}).then((res)=>{
+          const {code,data,msg} = res.data;
+          if(code=='0'){
+            const item = Object.assign({},row,data);
+            this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:item}});
+          }else{
+            this.$message({
+              message: msg,
+              type: 'warning'
+            });
+          }
+        });
+        //this.$router.push({name:'AddIndeptLabel',params:{isEdit:true,data:row}});
       },
       currentChange(next) {
         this.currentPage = next;

+ 3 - 2
src/components/icss/PubIndeptTag.vue

@@ -272,8 +272,9 @@
         if(this.form.region3.trim() == ''){ return }
         let param = {
           "existName": this.form.region3,
-          "type": this.form.region1
-        }
+          "type": this.form.region1,
+          "notIds":[this.$props.editData.id]
+        };
         api.validateSystomName(param).then((res) => {
           if (res.data.code === '0') {
             if(res.data.data && res.data.data.length != 0){

+ 5 - 0
src/components/icss/SingleSelect.vue

@@ -88,6 +88,11 @@
         }
       },
       mounted(){
+        const {options} = this.$props;
+        const arr = options.map((it)=>{
+          return {name:it.name,defaultSelect:it.defaultSelect=='1'?true:false,isBan:it.code==1?true:'',isNone:it.code==2?true:''};
+        });
+        this.rows = arr;
         console.log(this.$props.options)
       },
       computed:{