Explorar o código

新增国临版编码

zhouna %!s(int64=3) %!d(string=hai) anos
pai
achega
07409a3152
Modificáronse 2 ficheiros con 37 adicións e 3 borrados
  1. 1 1
      src/api/index.js
  2. 36 2
      src/components/basicKnow/AddTerm.vue

+ 1 - 1
src/api/index.js

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

+ 36 - 2
src/components/basicKnow/AddTerm.vue

@@ -517,11 +517,23 @@
             </el-form-item>
             <el-form-item
               v-if="data.type=='疾病'"
-              label="ICD10编码:"
+              label="ICD10医保版:"
               prop="description"
               class="marT description"
             >
-              <el-input v-model.trim="klDiseaseVO.icd10Code" maxlength="30" placeholder="请输入"></el-input>
+              <el-input v-model.trim="klDiseaseVO.icd10Code" maxlength="30" placeholder="请输入编码"></el-input>
+            </el-form-item>
+            <el-form-item
+                    v-if="data.type=='疾病'"
+                    label="ICD10国临版:"
+                    prop="description"
+                    class="marT description"
+            >
+              <el-row>
+                <el-col :span="5"><el-input @blur="handleBlurGuo" v-model.trim="klDiseaseVO.guoname" maxlength="30" placeholder="请输入名称"></el-input></el-col>
+                <el-col :span="5"><el-input v-model.trim="klDiseaseVO.guospell" maxlength="30" placeholder="请输入拼音"></el-input></el-col>
+                <el-col :span="5"><el-input v-model.trim="klDiseaseVO.guocode" maxlength="30" placeholder="请输入编码"></el-input></el-col>
+              </el-row>
             </el-form-item>
             <el-form-item
               v-if="data.type=='疾病'"
@@ -982,6 +994,9 @@ export default {
       },
       klDiseaseVO: {
         icd10Code: '', //ICD10编号
+		guoname:'',   //国临版名称
+		guocode:'',//国临版编码
+		guospell:'',//国临版拼音
         course: '', //病程
         inducement: '', //诱因
         foodProhibition: '', //饮食禁忌
@@ -1078,6 +1093,7 @@ export default {
         }
       ],
       unfit: false, //点确认时是否弹提示,
+      guounfix:false,   //国临版名称是否符合要求
       saveDisable: false, //保存按钮禁止点击
       options: [],
       copy: null,
@@ -1344,6 +1360,20 @@ export default {
         .catch(error => {
           console.log(error);
         });
+    },
+	handleBlurGuo(){
+	  const pattern = /[^0-9]/g;
+	  if (this.klDiseaseVO.guoname && !pattern.test(this.klDiseaseVO.guoname)) {
+		this.$message({
+		  message: '无法输入纯数字,请输入正确数据!',
+		  type: 'warning'
+		});
+		this.guounfix = true;
+	  } else {
+		let data = this.klDiseaseVO;
+		data.guospell = pinyin.getCamelChars(data.guoname);
+		this.guounfix = false;
+	  }
     },
     handleBlur(type, index, flg) {
       // 不能为纯数字、纯字符、纯数字加字符 4-18
@@ -1505,6 +1535,10 @@ export default {
         this.warning('请选择术语类型');
         return;
       }
+      /*if(!this.guounfix){
+		this.warning('ICD10国临版名称不能为纯数字');
+		return;
+      }*/
       // 年龄为必填项--2019-6-5需求
       if (this.showMore == 1) {
         if ((!this.minAge && this.minAge !== 0) || !this.maxAge) {