瀏覽代碼

Merge branch 'knowledgeExtra_0521' into test

wyq 4 年之前
父節點
當前提交
e4840b497f
共有 2 個文件被更改,包括 91 次插入27 次删除
  1. 67 16
      src/components/basicKnow/AddTerm.vue
  2. 24 11
      src/components/knowledgeExtra/AddZskRegisteredDrug.vue

+ 67 - 16
src/components/basicKnow/AddTerm.vue

@@ -99,7 +99,7 @@
             </tr>
             <tr v-for="(item,index) in allwords" :key="index">
               <td class="ind">{{index+1}}</td>
-              <td :title="item.name&&item.name.length>9?item.name:''">
+              <td :title="item.libName&&item.libName.length>9?item.libName:''">
                 <!-- 使用原生input,输入限制 -->
                 <!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
                 <input
@@ -180,12 +180,12 @@
           </tr>
           <tr v-for="(item,index) in synonymous" :key="index">
             <td class="ind">{{index+1}}</td>
-            <td :title="item.name&&item.name.length>9?item.name:''">
+            <td :title="item.libName&&item.libName.length>9?item.libName:''">
               <!-- 使用原生input,输入限制 -->
               <!-- <el-input v-model="item.name" placeholder="请输入术语" maxlength="30" size="small" @input.native="handleInput(2,index)"></el-input> -->
               <input
                 type="text"
-                v-model.trim="item.name"
+                v-model.trim="item.libName"
                 placeholder="请输入术语"
                 maxlength="50"
                 @blur="handleBlur(2,index)"
@@ -683,6 +683,22 @@
             <el-form-item v-if="data.type=='手术和操作'" label="手术操作代码:" prop="description" class="marT">
               <div-editable v-model="klOperationVO.operationCode" :Maincontent="'Maincontent'"></div-editable>
             </el-form-item>
+            <el-form-item v-if="data.type=='中医疾病'" label="编码:" class="marT is-required">
+              <el-input
+                style="width:300px"
+                v-model.trim="klTcmDiseaseVO.code"
+                maxlength="200"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+            <el-form-item v-if="data.type=='中医证候'" label="编码:" class="marT is-required">
+              <el-input
+                style="width:300px"
+                v-model.trim="klTcmSyndromeVO.code"
+                maxlength="200"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
             <!-- <el-form-item
               v-if="data.type=='症状'"
               label="填写单患者界面展示通俗内容:"
@@ -819,6 +835,12 @@ export default {
         partList: [], //部位列表
         systemTypeList: [] //疾病系统分类列表
       },
+      klTcmDiseaseVO: {
+        code: ''
+      },
+      klTcmSyndromeVO: {
+        code: ''
+      },
       operationLevelList: [
         {
           id: '0',
@@ -1017,7 +1039,7 @@ export default {
           remark: data.remark,
           spell: data.spell,
           type: data.typeName,
-          conceptId: data.conceptId,
+          conceptId: this.copy ? '' : data.conceptId,
           libId: this.copy ? '' : data.libId,
           isHasCommon: data.isHasCommon,
           synonymName: data.synonymName,
@@ -1061,7 +1083,15 @@ export default {
               this.klDiseaseVO = redata.klDiseaseDTO
                 ? redata.klDiseaseDTO
                 : this.klDiseaseVO;
-              this.radio = this.klLisVO.minValue||this.klLisVO.maxValue ?1:2
+              this.radio =
+                this.klLisVO.minValue || this.klLisVO.maxValue ? 1 : 2;
+              this.klTcmDiseaseVO = redata.klTcmDiseaseDTO
+                ? redata.klTcmDiseaseDTO
+                : this.klTcmDiseaseVO;
+              this.klTcmSyndromeVO = redata.klTcmSyndromeDTO
+                ? redata.klTcmSyndromeDTO
+                : this.klTcmSyndromeVO;
+
               this.singleword = redata.libName;
               this.synonymous = redata.otherNames;
               this.allwords = redata.libName.concat(redata.otherNames);
@@ -1165,8 +1195,8 @@ export default {
         if (flg == 99) {
           // if(this.synonymous[index-1].name && !pattern.test(this.synonymous[index-1].name)){
           if (
-            this.allwords[index].name &&
-            !pattern.test(this.allwords[index].name)
+            this.allwords[index].libName &&
+            !pattern.test(this.allwords[index].libName)
           ) {
             this.$message({
               message: '无法输入纯数字,请输入正确数据!',
@@ -1177,16 +1207,16 @@ export default {
           } else {
             // let current = this.synonymous[index-1];
             let current = this.allwords[index];
-            current.spell = pinyin.getCamelChars(current.name);
+            current.spell = pinyin.getCamelChars(current.libName);
             this.unfit = false;
             this.searchType = 'standard';
             this.searchIndex = index;
-            this.getSimilarList(this.allwords[index].name);
+            this.getSimilarList(this.allwords[index].libName);
           }
         } else {
           if (
-            this.synonymous[index].name &&
-            !pattern.test(this.synonymous[index].name)
+            this.synonymous[index].libName &&
+            !pattern.test(this.synonymous[index].libName)
           ) {
             this.$message({
               message: '无法输入纯数字,请输入正确数据!',
@@ -1196,11 +1226,11 @@ export default {
             this.unfit = true;
           } else {
             let current = this.synonymous[index];
-            current.spell = pinyin.getCamelChars(current.name);
+            current.spell = pinyin.getCamelChars(current.libName);
             this.unfit = false;
             this.searchType = 'similar';
             this.searchIndex = index;
-            this.getSimilarList(current.name);
+            this.getSimilarList(current.libName);
           }
         }
       }
@@ -1289,6 +1319,7 @@ export default {
     },
     // 保存基础术语
     comfirn(flg) {
+      console.log(this.synonymous)
       if (!this.data.libName) {
         this.warning('请输入医学标准术语名称');
         return;
@@ -1348,7 +1379,7 @@ export default {
       if (this.id) {
         //修改用暂存的列表
         realData = this.synonymous.filter(item => {
-          return item.name;
+          return item.libName;
         });
         let tmpArr = [];
         for (let k = 0; k < realData.length; k++) {
@@ -1363,13 +1394,13 @@ export default {
         }
       } else {
         realData = this.synonymous.filter(item => {
-          return item.name;
+          return item.libName;
         });
       }
       let detailList = [];
       for (let i = 0; i < realData.length; i++) {
         let obj = {};
-        realData[i].synonymName = realData[i].name;
+        realData[i].synonymName = realData[i].libName;
         realData[i].conceptId = undefined;
         realData[i].status = undefined;
         realData[i].libType = this.data.libType;
@@ -1491,6 +1522,26 @@ export default {
               minAge: this.minAge,
               status: this.data.status || 1
             }
+          : this.data.libType == 127
+          ? {
+              ...this.data,
+              klTcmDiseaseVO: this.klTcmDiseaseVO,
+              klConceptSub: detailList || [],
+              sexType: sexCode,
+              maxAge: this.maxAge,
+              minAge: this.minAge,
+              status: this.data.status || 1
+            }
+          : this.data.libType == 128
+          ? {
+              ...this.data,
+              klTcmSyndromeVO: this.klTcmSyndromeVO,
+              klConceptSub: detailList || [],
+              sexType: sexCode,
+              maxAge: this.maxAge,
+              minAge: this.minAge,
+              status: this.data.status || 1
+            }
           : {
               ...this.data,
               klConceptSub: detailList || [],

+ 24 - 11
src/components/knowledgeExtra/AddZskRegisteredDrug.vue

@@ -6,18 +6,19 @@
         <el-form
           :inline="true"
           ref="formInline"
+          :rules="rules"
           :model="formInline"
           class="demo-form-inline"
           label-width="100px"
         >
-          <el-form-item label="药品代码:">
-            <el-input v-model="formInline.drugCode" placeholder="请输入"></el-input>
+          <el-form-item label="药品代码:" prop="drugCode">
+            <el-input v-model="formInline.drugCode"  placeholder="请输入"></el-input>
           </el-form-item>
           <el-form-item label="最小包装单位:">
             <el-input v-model="formInline.minPackUnit" placeholder="请输入"></el-input>
           </el-form-item>
-          <el-form-item label="注册名称:">
-            <el-input v-model="formInline.name" placeholder="请输入"></el-input>
+          <el-form-item label="注册名称:" prop="name">
+            <el-input v-model="formInline.name"  placeholder="请输入"></el-input>
           </el-form-item>
           <el-form-item label="药品企业:">
             <el-input v-model="formInline.company" placeholder="请输入"></el-input>
@@ -57,14 +58,15 @@
               clearable
               remote
               filterable
+              @focus="getfocus"
               :remote-method="searchConcept"
-              v-model.trim="value"
+              v-model.trim="formInline.drugConceptId"
             >
               <el-option
                 v-for="item in conceptList"
-                :key="item.conceptId"
-                :label="item.conceptName"
-                :value="item.conceptId"
+                :key="item.id"
+                :label="item.libName"
+                :value="item.id"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -86,7 +88,7 @@ export default {
   data() {
     return {
       formInline: {
-        id:'',
+        id: '',
         drugCode: '', //药品代码
         name: '', //注册名称
         enName: '', //英文名称
@@ -103,6 +105,14 @@ export default {
         drugType: '', //药品类别
         drugConceptId: '' //药品通用名Id
       },
+      rules: {
+        drugCode: [
+          { required: true, message: '请输入药品代码', trigger: 'blur' },
+        ],
+        name: [
+          { required: true, message: '请输入注册名称', trigger: 'change' }
+        ]
+      },
       conceptList: [],
       value: '',
       isEdit: false,
@@ -112,7 +122,7 @@ export default {
   created() {
     let type = this.$route.params.type;
     if (type == 2) {
-      this.title = '注册药品维护-修改注册药品'
+      this.title = '注册药品维护-修改注册药品';
       api.getByParam({ id: this.$route.params.id }).then(res => {
         if (res.data.code == 0) {
           const data = res.data.data;
@@ -133,7 +143,7 @@ export default {
           this.formInline.drugType = data.drugType;
           this.formInline.drugConceptId = data.drugConceptId;
           this.conceptList = [
-            { drugConceptId: data.drugConceptId, drugName: data.drugName }
+            { id: data.drugConceptId, libName: data.drugName }
           ];
         } else {
           this.$message({
@@ -190,6 +200,9 @@ export default {
         }
       });
     },
+    getfocus(){
+      this.conceptList = []
+    },
     confirm() {
       let _this = this;
       this.validateForms(function() {