瀏覽代碼

Merge remote-tracking branch 'origin/perTreat' into test

zhouna 6 年之前
父節點
當前提交
1076790b1d

+ 1 - 0
src/components/icss/AddMedicinePrompt.vue

@@ -15,6 +15,7 @@
                                filterable
                                remote
                                clearable
+                               no-data-text=" "
                                value-key="conceptId"
                                ref="termName"
                                placeholder="搜索"

+ 1 - 1
src/components/preTreat/AddQuestionModules.vue

@@ -86,7 +86,7 @@
             <p class="title" v-if="form.type&&form.moduleType">
                 <i v-if="form.type!=1">*</i>填写单明细:
             </p>
-            <QuestionTagGroup v-if="form.type&&form.moduleType&&form.type!=1" qaType="3" :ascription="form.type" @changeActionData="pushValues" :options="editData.moduleDetail"></QuestionTagGroup>
+            <QuestionTagGroup v-if="form.type&&form.moduleType&&form.type!=1" qaType="3" :ascription="form.type" :relationId="form.relationId" @changeActionData="pushValues" :options="editData.moduleDetail"></QuestionTagGroup>
             <div class="static" v-if="form.type==1">
                 <p>请问您有哪些不适?</p>
                 <div class="inner">科室常见症状</div>

+ 0 - 4
src/components/preTreat/AddSimpleQuestion.vue

@@ -60,10 +60,6 @@
         this.editData = data;
       }
     },
-    beforeDestroy(){
-      console.log(33333)
-      this.options = [];
-    },
     methods: {
       back() { this.$router.go(-1) },
       changeVal(val) {   //子组件数据改变传递到父组件

+ 3 - 3
src/components/preTreat/PubIndeptQa.vue

@@ -220,7 +220,7 @@
             name='系统名称';
             break;
           case 2:
-            name='医生界面标准内容';
+            name=this.qaType==1?'界面描述名称':'医生界面标准内容';
             break;
           case 3:
             name='患者界面通俗内容';
@@ -373,9 +373,9 @@
         this.imgList=[];
       },
       handleSuccess(response){
-        if(response.state==='SUCCESS'){
+        if(response.code==='0'){
           this.showFileList = true;
-          this.form.region13 = '{imageUrlPrefix}'+response.url;
+          this.form.region13 = '{imageUrlPrefix}'+response.data.url;
         }else{
           this.showFileList=false;
           this.warning(response.msg);

+ 15 - 20
src/components/preTreat/PubSelect.vue

@@ -156,15 +156,11 @@
         const arr = options.filter((it)=>{
           return it.name;
         });
-        /*const arrLen = arr.length;
-        if(arrLen < 4) {
-          for (let i = 0; i < 4 - arrLen; i++) {
-            arr.push(Object.assign({},initRow,{orderNo:arr.length}));
-          }
-        }*/
         this.rows = arr;
         const items = utils.simpleOptionData(this.rows);
         this.$emit('pushValues',items);
+      }else{
+        this.initData();
       }
     },
     computed:{
@@ -178,23 +174,20 @@
       },
     },
     watch: {
-      ascription(newVal, preVal) {
-        if (newVal != preVal) {
-            this.rows = [...utils.getInitRow(initRow,4)];
-        }
-      },
-      type(newVal, preVal) {
-        if (newVal != preVal) {
-            this.rows = [...utils.getInitRow(initRow,4)];
-        }
+      /*ascription(newVal, preVal) {        //永远检测不到,因为归属修改时类型被清空,本组件被销毁
+        this.rows = [...utils.getInitRow(initRow,4)];
+      },*/
+      type() {
+        this.initData();
       },
-      sexType(newVal, preVal) {
-        if (newVal != preVal) {
-            this.rows = [...utils.getInitRow(initRow,4)];
-        }
+      sexType() {
+        this.initData();
       },
     },
     methods:{
+      initData(){
+        this.rows = [...utils.getInitRow(initRow,4)];
+      },
       addRow(){
         this.rows.push(Object.assign({},initRow,{orderNo:this.rows.length}));
       },
@@ -248,7 +241,9 @@
         this.$emit('pushValues',items);
       },
       HandleInputName(i, name, isName) {
-        if(name.length > 30) {
+        const pureName=name.replace(/(\$\{number_\S*?\})|(\$\{input_\S*?\})/g,'');
+        //console.log(pureName);
+        if(pureName.length > 30) {
           if(isName){
             Vue.set(this.rows[i], 'name', this.rows[i].name.slice(0, 30));
             this.$refs.inputName[i].currentValue = this.rows[i].name;

+ 5 - 2
src/components/preTreat/QuestionTagGroup.vue

@@ -61,7 +61,7 @@ import api from '@api/preTreat.js';
 
 export default {
     name: "QuestionTagGroup",
-    props: ['ascription','sexType','options','type','qaType'],
+    props: ['ascription','sexType','options','type','qaType','relationId'],
     data() {
         return {
             leftTagsList: [],
@@ -101,7 +101,10 @@ export default {
         },
         type(newVal, preVal){
           this.ifReflashTagList(newVal, preVal);
-        }
+        },
+        relationId(newVal, preVal){
+          this.ifReflashTagList(newVal, preVal);
+        },
     },
     methods: {
         handleExclu(){