Browse Source

Merge branch 'test' of http://192.168.2.236:10080/zhouna/platformFront into test

Luolei 6 years ago
parent
commit
a8201b604f

+ 5 - 2
src/components/icss/AddChemicalAndCommonMapping.vue

@@ -44,10 +44,10 @@
                       <li 
                         v-for="item in itemNameList" 
                         class="mealNameItem ellipsis"
-                        :title="item.name"
+                        :title="item.name+'-'+item.tagName"
                         @click="selectItemName(item)"
                         :key="item.id">
-                        {{item.name}}
+                        {{item.name}}-{{item.tagName}}
                       </li>
                     </ul>
                 </div>
@@ -389,6 +389,9 @@ export default {
         z-index: 2;
         overflow-y: auto;
     }
+    .itemNameList {
+        width: calc(100% - 131px);
+    }
     .mealNameItem {
         height: 30px;
         line-height: 30px;

+ 2 - 1
src/components/icss/AddConceptRelation.vue

@@ -140,7 +140,8 @@ export default {
             this.form.conceptNameType =data.conceptNameType;
           }
           let typeList = JSON.parse(localStorage.getItem("knowledgeEnumsData"));
-          this.typeList = typeList.lexiconTypeEnum;
+          // this.typeList = typeList.lexiconTypeEnum;
+          this.typeList = typeList.concatLexiconTypeEnum; //7-8 RGB
         },
         watch: {
           searchTagVal(newVal, preVal) {

+ 38 - 5
src/components/icss/AddMedicinePrompt.vue

@@ -29,10 +29,12 @@
                 <InfoParagraph v-for="(f,i) in form.prags"
                                :data="f"
                                :index="i"
+                               :total="form.prags.length"
                                :isEdit = "isEdit"
                                ref="subForm"
                                @add="addParagraph(i)"
-                               @del="delParagraph"></InfoParagraph>
+                               @del="delParagraph"
+                               @reOrder="reOrder"></InfoParagraph>
             </el-form>
             <div class="btn">
                 <el-button
@@ -109,7 +111,7 @@
               return {
                         title:it.title,
                         position:this.mapStringToNum(it.position),
-                        content:it.content.replace('{imageUrlPrefix}',config.imgHost),
+                        content:it.content.replace(/{imageUrlPrefix}/g,config.imgHost),
                         isReason:it.isReason,
                         text:it.text,
                         disabled:true};
@@ -122,14 +124,45 @@
       }
     },
     methods: {
+      reOrder(isUp,i){
+        let temp = {},it={};
+        if(isUp===1){
+          if(i===0){
+            this.warning('已经是第一个,不能再升啦!');
+            return ;
+          }
+          temp = Object.assign(this.form.prags[i-1]);
+          temp.orderNo = temp.orderNo+1;
+          it = Object.assign(this.form.prags[i]);
+          it.orderNo = it.orderNo-1;
+          this.form.prags.splice(i-1,2,it,temp);
+        }else{
+          if(i===this.form.prags.length-1){
+            this.warning('已经是最后一个,不能再降啦!');
+            return ;
+          }
+          temp = Object.assign(this.form.prags[i+1]);
+          temp.orderNo = temp.orderNo-1;
+          it = Object.assign(this.form.prags[i]);
+          it.orderNo = it.orderNo+1;
+          this.form.prags.splice(i,2,temp,it);
+        }
+      },
       addParagraph(i){
-        this.form.prags.push({
+        this.form.prags.splice(i+1,0,{
           title:'',
           content:'',
           isReason:0,
-          orderNo:this.form.prags.length,
+          orderNo:i+1,
           position:[],
           text:''});
+        /*this.form.prags.push({
+          title:'',
+          content:'',
+          isReason:0,
+          orderNo:this.form.prags.length,
+          position:[],
+          text:''});*/
       },
       delParagraph(i){
         if(this.form.prags.length==1){
@@ -184,7 +217,7 @@
           return Object.assign({},it,{
                                         position:typeof it.position=='string'?it.position:it.position.join(","),
                                         conceptId:this.form.conceptId,
-                                        content:it.content.replace(config.imgHost,'{imageUrlPrefix}')});
+                                        content:it.content.replace(new RegExp(config.imgHost,'g'),'{imageUrlPrefix}')});
         });
         this.showSaveDialog(param,'是否保存该静态知识?');
       },

+ 12 - 3
src/components/icss/LabelGroup.vue

@@ -73,9 +73,12 @@
                     prop="operate"
                     label="操作">
                     <template slot-scope="scope">
-                        <el-button  @click="modifyTagGroup(scope.row)" type="text" size="small">修改</el-button>
+                        <el-button  @click="modifyTagGroup(scope.row, 'modify')" type="text" size="small">修改</el-button>
+                        <span style="margin:0 3px;">|</span>
+                        <el-button @click="modifyTagGroup(scope.row, 'copy')" class="text" type="text" size="small">复制</el-button>
                         <span style="margin:0 3px;">|</span>
                         <el-button @click="showDelDialog(scope.row.id,scope.row.type)" class="delete" type="text" size="small">删除</el-button>
+                        
                     </template>
                 </el-table-column>
             </el-table>
@@ -180,13 +183,19 @@ export default {
         addTagGroup() {
             this.$router.push({path:'LT-YXSJWH-TJBQZ'})
         },
-        modifyTagGroup(row) {
+        modifyTagGroup(row, type) {
             api.detailsTag({id:row.id}).then((res)=>{
                 const {code,data,msg} = res.data;
                 if(code=='0'){
                     const item = Object.assign({},row,data);
                     // console.log('item', item)
-                    this.$router.push({name:'AddLabelGroup',params:{isEdit:true,data:item}});
+                    if(type == 'modify') {
+                        this.$router.push({name:'AddLabelGroup',params:{isEdit:true,data:item}});
+                    } else if( type == 'copy') {
+                        this.$router.push({name:'AddLabelGroup',params:{isCopy:true,data:item}});
+                    } else {
+                        return
+                    }
                 }else{
                     this.$message({
                     message: msg,

+ 9 - 5
src/components/icss/MedicalName.vue

@@ -6,7 +6,7 @@
                     <el-input size="mini" v-model="filter.term" placeholder="输入术语"></el-input>
                 </el-form-item>
                 <el-form-item label="术语类型:">
-                  <el-select v-model="filter.type" 
+                  <el-select v-model="filter.type"
                   clearable 
                   filterable 
                   placeholder="请选择" 
@@ -19,7 +19,10 @@
                     </el-option>
                   </el-select>
                 </el-form-item>
-              <el-form-item label="状态:">
+                <el-form-item label="同义词:">
+                    <el-input size="mini" v-model="filter.libName" placeholder="输入同义词"></el-input>
+                </el-form-item>
+              <!--<el-form-item label="状态:">
                 <el-select v-model="isState" clearable placeholder="请选择" size="mini">
                   <el-option
                     v-for="item in stateSelect"
@@ -28,7 +31,7 @@
                     :value="item.id">
                   </el-option>
                 </el-select>
-              </el-form-item>
+              </el-form-item>-->
                 <el-form-item>
                     <el-button size="mini" @click="filterDatas">确认</el-button>
                     <el-button size="mini" @click="uploadClick">导入</el-button>
@@ -121,7 +124,8 @@
         total: 0,
         filter: {
           term:'',
-          type:''
+          type:'',
+          libName:''
         },
         typeList:[]
       }
@@ -176,7 +180,7 @@
           current: this.currentPage,
           size: this.pageSize,
           type:this.filter.type,
-          isDeleted:this.isState
+          libName:this.filter.libName
         };
         return param;
       },

+ 40 - 4
src/components/icss/MedicineInfoPg.vue

@@ -2,18 +2,18 @@
     <el-form :rules="rules" :model="data" ref="form" class="sub-form">
         <!--<el-input v-model="form.orderNo" :value="index" type="hidden"></el-input>-->
         <el-form-item label="显示位置:" prop="position" label-width="160px">
-            <el-checkbox-group v-model="data.position" :disabled="data.disabled">
+            <el-checkbox-group v-model="data.position">
                 <el-checkbox v-for="it in positions" :key="it.key" :label="it.key">{{it.name}}</el-checkbox>
             </el-checkbox-group>
         </el-form-item>
         <el-form-item label="是否属于诊断依据:" prop="isReason" label-width="160px">
-            <el-select v-model="data.isReason" placeholder="请选择" :disabled="data.disabled">
+            <el-select v-model="data.isReason" placeholder="请选择">
                 <el-option label="否" :value="0"></el-option>
                 <el-option label="是" :value="1"></el-option>
             </el-select>
         </el-form-item>
         <el-form-item label="标题名称:" prop="title" label-width="160px">
-            <el-input v-model="data.title" :disabled="data.disabled"></el-input>
+            <el-input v-model="data.title"></el-input>
         </el-form-item>
         <el-form-item label="内容" prop="content" label-width="160px">
             <quillEditor v-model="data.content"
@@ -21,6 +21,10 @@
                          class="ql-editor"
                          ref="quillEditor"></quillEditor>
         </el-form-item>
+        <div class="order-btn">
+            <a v-if="index!==0" class="order-up" @click="reOrder(1)">上升</a>
+            <a v-if="index!==total-1" class="order-down" @click="reOrder(0)">下降</a>
+        </div>
         <el-form-item label-width="130px">
             <el-button @click="addEmit">添加段落</el-button>
             <el-button @click="delEmit" type="info">删除本段落</el-button>
@@ -37,7 +41,7 @@
   import {container, ImageExtend, QuillWatch} from 'quill-image-extend-module';
   Quill.register('modules/ImageExtend', ImageExtend);
   export default{
-    props:['data','index','isEdit'],
+    props:['data','index','isEdit','total'],
     name:'MedicineInfoParagraph',
     components:{
       quillEditor
@@ -49,6 +53,14 @@
             ImageExtend: {
               loading: true,
               name: 'upfile',
+              size:1,
+              sizeError: () => {
+                this.$message({
+                  showClose: true,
+                  message: '请上传 1M 以内的图片!',
+                  type: 'warning'
+                })
+              },
               action: config.urls.promptServer,
               response: (res) => {
                 return config.imgHost+res.url;
@@ -102,6 +114,9 @@
       this.positions = JSON.parse(pos)&&JSON.parse(pos).positionTypeEnum;
     },
     methods:{
+      reOrder(i){
+        this.$emit("reOrder",i,this.index);
+      },
       addEmit(){
         this.$emit("add");
       },
@@ -129,6 +144,27 @@
     .is-error .el-form-item__error{
         top:auto;
     }
+    .sub-form{
+        position: relative;
+    }
+    .order-btn{
+        position:absolute;
+        top:40px;
+        right:50px;
+        a{
+            display: block;
+            margin-bottom: 20px;
+            border: 1px solid #22ccc8;
+            color: #22ccc8;
+            padding: 5px 10px;
+            border-radius: 4px;
+            cursor: pointer;
+            font-size: 12px;
+        }
+        .order-up{
+
+        }
+    }
     /**富文本编辑器样式修改***/
     .ql-snow .ql-picker.ql-size .ql-picker-label::before,
     .ql-snow .ql-picker.ql-size .ql-picker-item::before,

+ 16 - 4
src/components/icss/NoiseTemplate.vue

@@ -7,6 +7,7 @@
     ></crumbs>
     <PubTagGroup
       :editData="editData"
+      :isEditOrCopy="isEditOrCopy"
       @changeVal="changeVal"
       @changeSex="changeSex"
       @changeType="changeType"
@@ -128,16 +129,27 @@ export default {
         ]
       },
       sendIds: [[], [], [], [], [], []],           //标签明细右侧操作数据
-      saveDisable: false //保存按钮是否可点击
+      saveDisable: false, //保存按钮是否可点击
+      isEditOrCopy: false //是否为修改或复制
     }
   },
   beforeMount:function(){
-    const {isEdit,data} = this.$route.params;
+    const {isEdit, isCopy, data} = this.$route.params;
     if(isEdit){
       this.txt = '标签组维护-修改标签组';
+      this.isEditOrCopy = true
       this.editData = data;
       this.form.currentOrder = data.textGenerate+''
       // console.log('回读数据', data)
+    } else if(isCopy) {
+      this.txt = '标签组维护-添加标签组';
+      this.isEditOrCopy = true
+      const copyData = JSON.parse(JSON.stringify(data))
+      copyData.id = ""
+      copyData.name=""
+      copyData.tagName=""
+      this.editData = copyData;
+      this.form.currentOrder = copyData.textGenerate+''
     }
   },
   computed: {
@@ -147,8 +159,8 @@ export default {
   },
   watch: {
     newSign(nextVal, prevVal) {
-      const {isEdit} = this.$route.params;
-      if (nextVal != prevVal && !isEdit) {
+      const {isEdit,isCopy} = this.$route.params;
+      if (nextVal != prevVal && !isEdit&&!isCopy) {
         this.form.currentOrder = '0'
       }
     },

+ 19 - 13
src/components/icss/PubIndeptTag.vue

@@ -59,7 +59,7 @@
               <span
                 v-if="form.region1 == 5"
                 class="changeTips changeTipsName"
-              >当为化验推送项时,标签系统名称需要检索医学标准术语内容并与之相对应,才可保证系统正常使用,如果未对应上可能造成系统显示异常!如果在搜索中没有可以先在医学标准术语中建立相关信息!</span>
+              >当为化验推送项时,标签界面名称需要检索医学标准术语内容并与之相对应,才可保证系统正常使用,如果未对应上可能造成系统显示异常!如果在搜索中没有可以先在医学标准术语中建立相关信息!</span>
               <el-select
                 v-model="form.region12"
                 @change="sendData"
@@ -111,9 +111,13 @@
                         @change="sendData"
                 ></el-input> -->
                  <span
-                  v-if="form.region1 == 4 || form.region1 == 5"
+                  v-if="form.region1 == 4"
                   class="changeTips changeTipsName"
                 >标签系统名称需要与医学标准术语内容相对应,如果没有可以先在医学标准术语中建立相关信息!未建立相关信息可能会影响系统使用!当为查体推送项时标签系统名称应当检索医学术语库内容;</span>
+                <span
+                  v-if="form.region1 == 5"
+                  class="changeTips changeTipsName"
+                >标签系统名称为该标签在本系统的中识别表示,不可重复。该系统名称不需要检索标准术语库内容;</span>
             </el-form-item>
             <el-form-item
                     label="标签界面名称:"
@@ -139,9 +143,13 @@
                   >{{item.name}}</li>
                 </ul>
                 <span
-                  v-if="form.region1 == 4 || form.region1 == 5"
+                  v-if="form.region1 == 4"
                   class="changeTips changeTipsName"
                 >为在界面上检索不受影响,标签界面名称应与标签系统名称和医学标准术语内容相对应, 未建立相关信息可能会影响系统使用!</span>
+                <span
+                  v-if="form.region1 == 5"
+                  class="changeTips changeTipsName"
+                >标签界面名称需要与医学标准术语内容相对应,如果没有可以先在医学标准术语中建立相关信息!未建立相关信息可能会影响系统使用!当为化验推送项时标签界面名称应当检索医学术语库内容;</span>
             </el-form-item>
             <el-form-item
                     label="标签前后缀:"
@@ -337,7 +345,7 @@
           region9: '200',         //最大年龄
           minNormalVal: '',       //化验正常值最小值
           maxNormalVal: '',       //化验正常值最大值
-          region12: '1',        //是否为查体推送   
+          region12: '0',        //是否为查体推送   
           region13:'',
           prefix:'',            //前缀
           suffix:'',            //后缀
@@ -441,17 +449,15 @@
         this.tmpSex = prevVal;
       },
       newType(nextVal, prevVal) {
-        if(nextVal == 4 || nextVal == 5){
-          this.form.region12 = '0'
-        }else{
-          this.form.region12 = '1'
+        const editData = this.$props.editData;
+        if(!editData.id) {
+          this.initForm()
         }
       },
       newSign(nextVal, prevVal) {
-        if(this.form.region1 == 4 || this.form.region1 == 5){
-          this.form.region12 = '0'
-        }else{
-          this.form.region12 = '1'
+        const editData = this.$props.editData;
+        if(!editData.id) {
+          this.initForm()
         }
       },
       newName(nextVal, prevVal) {
@@ -630,7 +636,7 @@
         this.form.minNormalVal = ''
         this.form.maxNormalVal = ''
         this.form.region5 = ''
-        this.form.region12 = '1'
+        this.form.region12 = '0'
       },
     }
   }

+ 13 - 17
src/components/icss/PubTagGroup.vue

@@ -16,7 +16,7 @@
       >
         <span class="changeTips">改变归属后,标签明细将会恢复到默认状态</span>
         <el-select
-          :disabled="!!editData.id"
+          :disabled="isEditOrCopy"
           v-model="form.region1"
           placeholder="请选择归属"
           @change="(e)=>readyChangeSelect(e,1)"
@@ -35,7 +35,7 @@
       >
         <span class="changeTips">改变类型后,标签明细将会恢复到默认状态</span>
         <el-select
-          :disabled="!!editData.id || !form.region1"
+          :disabled="isEditOrCopy || !form.region1"
           v-model="form.region2"
           placeholder="请选择填写单类型"
           @change="(e)=>readyChangeSelect(e,2)"
@@ -147,7 +147,7 @@
         <span class="changeTips">改变性别后,标签明细将会恢复到默认状态</span>
         <el-select
           v-model="form.region7"
-          :disabled="!!editData.id || !form.region1 || form.region2 == 11 || form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
+          :disabled="isEditOrCopy || !form.region1 || form.region2 == 11 || form.region1 == 6||form.region1 == 7||form.region1 == 8||form.region1 == 9||form.region1 == 10"
           @change="(e)=>readyChangeSelect(e,3)"
         >
           <el-option
@@ -287,7 +287,7 @@ import utils from '@api/utils.js';
 
 
 export default {
-  props: ['editData'],
+  props: ['editData','isEditOrCopy'],
   data() {
     var validatePass1 = (rule, value, callback) => {
       this.validateSystomName(value, callback, 1)
@@ -313,7 +313,7 @@ export default {
         region9: '200',         //最大年龄
         region10: '1',        //是否复制主标签
         region11: '0',       //是否复制当前模块
-        region12: '1',        //是否为症状//是否为化验推送//是否为查体推送    
+        region12: '0',        //是否为症状//是否为化验推送//是否为查体推送    
         tagPool: [],          //标签池数据
         order: [],            //排序方式
         tipLis: [],           //提示列表
@@ -398,7 +398,8 @@ export default {
   },
   mounted() {
     const editData = this.$props.editData;
-    if (editData.id) {
+    const isEditOrCopy = this.$props.isEditOrCopy;
+    if (isEditOrCopy) {
       const trans = utils.transformKeys(editData, 2); //(2是标签组类型)
       // console.log('editData1', editData)
       this.form = Object.assign({}, this.form, trans);
@@ -416,18 +417,15 @@ export default {
     },
     newType(nextVal, prevVal) {
       this.tmpOwn = prevVal;
-      if(nextVal == 4 || nextVal == 5){
-        this.form.region12 = '0'
-      }else{
-        this.form.region12 = '1'
+      if(!this.isEditOrCopy) {
+        this.initForm()
       }
+     
     },
     newSign(nextVal, prevVal) {
       this.tmpType = prevVal;
-      if(this.form.region1 == 4 || this.form.region1 == 5){
-        this.form.region12 = '0'
-      }else{
-        this.form.region12 = '1'
+     if(!this.isEditOrCopy) {
+        this.initForm()
       }
       if (nextVal != prevVal && (this.form.region2 == 2 || this.form.region2 == 6 || this.form.region2 == 7 || this.form.region2 == 4 || this.form.region2 == 11)) {
         this.searchTagList()
@@ -623,9 +621,7 @@ export default {
       })
     },
     initForm() {
-      this.form.region12 = '1'
-      this.form.region14 = '1'
-      this.form.region15 = '1'
+      this.form.region12 = '0'
       this.form.region10 = '1'
       this.form.region11 = '0'
     }

+ 3 - 0
src/less/common.less

@@ -94,6 +94,9 @@
 } 
 
 /*element-ui 样式覆盖*/
+.demo-form-inline .el-input--mini .el-input__inner{
+  width: 100px;
+}
 .el-input--mini .el-input__inner {
   width: 120px;
   height: 24px;