|
@@ -30,7 +30,7 @@
|
|
<p>疾病特征:</p>
|
|
<p>疾病特征:</p>
|
|
<table class="diagTable">
|
|
<table class="diagTable">
|
|
<tr class="tableTitle">
|
|
<tr class="tableTitle">
|
|
- <td class="FeatureSort">排序</td>
|
|
|
|
|
|
+ <td class="FeatureSort">排序</td>
|
|
<td class="FeatureType require">类型</td>
|
|
<td class="FeatureType require">类型</td>
|
|
<td class="FeatureNumber require">序号</td>
|
|
<td class="FeatureNumber require">序号</td>
|
|
<td class="FeatureStand require">标准词</td>
|
|
<td class="FeatureStand require">标准词</td>
|
|
@@ -39,16 +39,32 @@
|
|
<td class="FeatureOpera"></td>
|
|
<td class="FeatureOpera"></td>
|
|
</tr>
|
|
</tr>
|
|
<tr v-for="(item, index) in disFeatureList" :key="item.index" @click="clickItem">
|
|
<tr v-for="(item, index) in disFeatureList" :key="item.index" @click="clickItem">
|
|
- <td class="FeatureSort" :class="item.notRequire ? 'borderRed':''">{{index+1}}</td>
|
|
|
|
- <td class="FeatureType" :class="item.notRequire ? 'borderRed':''">
|
|
|
|
- <el-select size="mini" v-model.trim="item.type" placeholder="标签类型" clearable>
|
|
|
|
|
|
+ <td class="FeatureSort" >{{index+1}}</td>
|
|
|
|
+ <td class="FeatureType" >
|
|
|
|
+ <el-select size="mini" v-model.trim="item.type" placeholder="标签类型" clearable>
|
|
<el-option v-for="item in featureTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
<el-option v-for="item in featureTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</td>
|
|
</td>
|
|
- <td class="FeatureNumber" :class="item.notRequire ? 'borderRed':''"><input class="groupInput" :class="{borderRed:item.verifyCode, colorRed: item.codeError}" type="text" v-model.trim="item.code" @input="handleInp(index,$event,'FeatureNumber')"></td>
|
|
|
|
- <td class="FeatureStand" :class="item.notRequire ? 'borderRed':''"><input class="groupInput" :class="{borderRed:item.verifyCode}" type="text" v-model.trim="item.standard" @input="handleInp(index,$event,'FeatureStand')"></td>
|
|
|
|
- <td class="FeatureRelate" :class="item.notRequire ? 'borderRed':''"><input class="groupInput" :class="{borderRed:item.verifyRelation}" type="text" v-model.trim="item.relation" @input="handleInp(index,$event,'FeatureRelate')"></td>
|
|
|
|
- <td class="FeatureResult" :class="item.notRequire ? 'borderRed':''"><input class="groupInput" :class="{borderRed:item.verifyResult}" type="text" v-model.trim="item.result" @input="handleInp(index,$event,'FeatureResult')"></td>
|
|
|
|
|
|
+ <td class="FeatureNumber" >
|
|
|
|
+ <el-tooltip :disabled="!item.verifyCode&&!item.codeNull&&!item.codeError" class="item" effect="dark" :content="item.verifyCode||item.codeNull||item.codeError" placement="top-start">
|
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyCode||item.codeNull, colorRed: item.codeError}" :title="item.code" type="text" v-model.trim="item.code" @input="handleInp(index,$event,'FeatureNumber')">
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="FeatureStand" >
|
|
|
|
+ <el-tooltip :disabled="!item.verifyStandard&&!item.standardNull" class="item" effect="dark" :content="item.verifyStandard||item.standardNull" placement="top-start">
|
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyStandard||item.standardNull}" :title="item.standard" type="text" v-model.trim="item.standard" @input="handleInp(index,$event,'FeatureStand')">
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="FeatureRelate">
|
|
|
|
+ <el-tooltip :disabled="!item.verifyRelation" class="item" effect="dark" :content="item.verifyRelation" placement="top-start">
|
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyRelation}" :title="item.relation" type="text" v-model.trim="item.relation" @input="handleInp(index,$event,'FeatureRelate')">
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </td>
|
|
|
|
+ <td class="FeatureResult">
|
|
|
|
+ <el-tooltip :disabled="!item.verifyResult" class="item" effect="dark" :content="item.verifyResult" placement="top-start">
|
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyResult}" :title="item.result" type="text" v-model.trim="item.result" @input="handleInp(index,$event,'FeatureResult')">
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </td>
|
|
<td class="FeatureOpera">
|
|
<td class="FeatureOpera">
|
|
<el-button type="text" size="small" class="delete" @click="addItem(index, 1)">增加</el-button>
|
|
<el-button type="text" size="small" class="delete" @click="addItem(index, 1)">增加</el-button>
|
|
<el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 1)">删除</el-button>
|
|
<el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 1)">删除</el-button>
|
|
@@ -57,8 +73,8 @@
|
|
</table>
|
|
</table>
|
|
<p>诊断公式:</p>
|
|
<p>诊断公式:</p>
|
|
<table class="diagTable">
|
|
<table class="diagTable">
|
|
- <tr class="tableTitle">
|
|
|
|
- <td class="FormulaSort">排序</td>
|
|
|
|
|
|
+ <tr class="tableTitle">
|
|
|
|
+ <td class="FormulaSort">排序</td>
|
|
<td class="FormulaType">类型</td>
|
|
<td class="FormulaType">类型</td>
|
|
<td class="FormulaNumber">公式</td>
|
|
<td class="FormulaNumber">公式</td>
|
|
<td class="FormulaOpera"></td>
|
|
<td class="FormulaOpera"></td>
|
|
@@ -70,7 +86,11 @@
|
|
<el-option v-for="item in formulaTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
<el-option v-for="item in formulaTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</td>
|
|
</td>
|
|
- <td class="FormulaNumber"><input class="groupInput" :class="{borderRed:item.verifyFormula}" type="text" v-model.trim="item.formula" @input="handleInp(index,$event,'FormulaNumber')"></td>
|
|
|
|
|
|
+ <td class="FormulaNumber">
|
|
|
|
+ <el-tooltip :disabled="!item.verifyFormula" class="item" effect="dark" :content="item.verifyFormula" placement="top-start">
|
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyFormula}" :title="item.formula" type="text" v-model.trim="item.formula" @input="handleInp(index,$event,'FormulaNumber')">
|
|
|
|
+ </el-tooltip>
|
|
|
|
+ </td>
|
|
<td class="FeatureOpera">
|
|
<td class="FeatureOpera">
|
|
<el-button type="text" size="small" class="delete" @click="addItem(index, 2)">增加</el-button>
|
|
<el-button type="text" size="small" class="delete" @click="addItem(index, 2)">增加</el-button>
|
|
<el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 2)">删除</el-button>
|
|
<el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 2)">删除</el-button>
|
|
@@ -89,10 +109,12 @@
|
|
>校验并保存数据</el-button>
|
|
>校验并保存数据</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
|
|
+ :disabled = "hasQuestion == 1"
|
|
@click="exportDiagnosticAll"
|
|
@click="exportDiagnosticAll"
|
|
>导出诊断依据</el-button>
|
|
>导出诊断依据</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
|
|
+ :disabled = "hasQuestion == 1"
|
|
@click="updateNeo"
|
|
@click="updateNeo"
|
|
>更新图谱</el-button>
|
|
>更新图谱</el-button>
|
|
</div>
|
|
</div>
|
|
@@ -143,7 +165,8 @@
|
|
],
|
|
],
|
|
searchDiagVal: '',
|
|
searchDiagVal: '',
|
|
isEdit: false,
|
|
isEdit: false,
|
|
- saveDisable: false
|
|
|
|
|
|
+ saveDisable: false ,
|
|
|
|
+ hasQuestion: 1, //是否有问题词
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created(){
|
|
created(){
|
|
@@ -159,6 +182,7 @@
|
|
this.id = data.id
|
|
this.id = data.id
|
|
this.disFeatureList = data.disFeature
|
|
this.disFeatureList = data.disFeature
|
|
this.disFormulaList = data.disformula
|
|
this.disFormulaList = data.disformula
|
|
|
|
+ this.hasQuestion = data.hasQuestion
|
|
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -245,21 +269,33 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
updateNeo() {
|
|
updateNeo() {
|
|
- // const param = {
|
|
|
|
-
|
|
|
|
- // }
|
|
|
|
|
|
+ this.diagBaseVerifyData().then(() => {
|
|
|
|
+ if(this.hasQuestion == 0) {
|
|
|
|
+ const param = {
|
|
|
|
+ id: this.id,
|
|
|
|
+ modifier: this.modifier
|
|
|
|
+ }
|
|
|
|
+ api.diagBaseUpdateNeo(param).then((res) => {
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
// api.diagBaseUpdateNeo(param).then((res) =>{
|
|
// api.diagBaseUpdateNeo(param).then((res) =>{
|
|
|
|
|
|
// })
|
|
// })
|
|
},
|
|
},
|
|
exportDiagnosticAll(){
|
|
exportDiagnosticAll(){
|
|
- const param = {
|
|
|
|
- diagnoseId: 53
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
this.diagBaseVerifyData().then(() => {
|
|
this.diagBaseVerifyData().then(() => {
|
|
- api.exportDiagnosticAll(param).then((res) => {
|
|
|
|
- utils.downloadExportedData(res.data,'诊断依据' )
|
|
|
|
- })
|
|
|
|
|
|
+ if(this.hasQuestion == 0) {
|
|
|
|
+ const param = {
|
|
|
|
+ diagnoseId: this.id
|
|
|
|
+ }
|
|
|
|
+ api.exportDiagnosticAll(param).then((res) => {
|
|
|
|
+ utils.downloadExportedData(res.data,'诊断依据' )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
})
|
|
})
|
|
|
|
|
|
},
|
|
},
|
|
@@ -268,33 +304,61 @@
|
|
this.warning('请选择诊断')
|
|
this.warning('请选择诊断')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- let notRequireList = [];
|
|
|
|
|
|
+ let errStrList = [];
|
|
const disFeatureList = this.disFeatureList;
|
|
const disFeatureList = this.disFeatureList;
|
|
|
|
+ const disFormulaList = this.disFormulaList;
|
|
|
|
+ let codeErrorNum = 0;
|
|
for(let i=0; i < disFeatureList.length; i++) {
|
|
for(let i=0; i < disFeatureList.length; i++) {
|
|
|
|
+ if(!disFeatureList[i].type) {
|
|
|
|
+ disFeatureList[i].typeNull = "未选择类型"
|
|
|
|
+ }
|
|
|
|
+ if(!disFeatureList[i].code) {
|
|
|
|
+ disFeatureList[i].codeNull = "未填写编码"
|
|
|
|
+ }
|
|
|
|
+ if(!disFeatureList[i].standard) {
|
|
|
|
+ disFeatureList[i].standardNull = "未填写标准词"
|
|
|
|
+ }
|
|
if(!disFeatureList[i].type||!disFeatureList[i].code||!disFeatureList[i].standard) {
|
|
if(!disFeatureList[i].type||!disFeatureList[i].code||!disFeatureList[i].standard) {
|
|
- disFeatureList[i].notRequire = true
|
|
|
|
- const notRequireInfo = "第" + (i+ 1) +"行必填项未填写"
|
|
|
|
- notRequireList.push(notRequireInfo)
|
|
|
|
|
|
+ const errStr = "第" + (i+ 1) +"行必填项未填写"
|
|
|
|
+ errStrList.push(errStr)
|
|
}
|
|
}
|
|
|
|
+ let regex =new RegExp(`${disFeatureList[i].type}\.[1-9]\\d?`)
|
|
|
|
+ if(disFeatureList[i].code &&!regex.test(disFeatureList[i].code)) {
|
|
|
|
+ codeErrorNum++
|
|
|
|
+ disFeatureList[i].codeError = "序号和类型不匹配"
|
|
|
|
+ const errStr = "第" + (i+ 1) +"行序号和类型不匹配"
|
|
|
|
+ errStrList.push(errStr)
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
- if(notRequireList.length >0) {
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- let codeErrorNum = 0;
|
|
|
|
- for(let i=0; i < disFeatureList.length; i++) {
|
|
|
|
- let regex =new RegExp(`${disFeatureList[i].type}\.[1-9]\\d?`)
|
|
|
|
- console.log('regex', regex)
|
|
|
|
- if(regex.test(disFeatureList[i].code)) {
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- console.log('error')
|
|
|
|
- codeErrorNum++
|
|
|
|
- disFeatureList[i].codeError = true
|
|
|
|
|
|
+ let formulaListErrNum = 0
|
|
|
|
+ for(let i=0; i < disFormulaList.length; i++) {
|
|
|
|
+ if(disFormulaList[i].type&&!disFormulaList[i].formula ) {
|
|
|
|
+ disFormulaList[i].verifyFormula = "诊断公式不能为空"
|
|
|
|
+ formulaListErrNum++;
|
|
|
|
+ } else if(disFormulaList[i].formula&&!disFormulaList[i].type) {
|
|
|
|
+ disFormulaList[i].verifyType = "诊断类型不能为空"
|
|
|
|
+ formulaListErrNum++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
|
|
- if(codeErrorNum > 0) {
|
|
|
|
|
|
+ this.disFormulaList = JSON.parse(JSON.stringify(disFormulaList))
|
|
|
|
+ let errorStr =''
|
|
|
|
+ for(let i = 0; i <errStrList.length; i++) {
|
|
|
|
+ errorStr += '<p>'+errStrList[i]+'</p>'
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(errStrList.length >0 ||codeErrorNum > 0 ||formulaListErrNum > 0) {
|
|
|
|
+ this.$alert(errorStr,'错误信息',{
|
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ callback: action => {
|
|
|
|
+ /*this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: `action: ${ action }`
|
|
|
|
+ });*/
|
|
|
|
+ }
|
|
|
|
+ });
|
|
return
|
|
return
|
|
}
|
|
}
|
|
// this.showDelDialog()
|
|
// this.showDelDialog()
|
|
@@ -314,6 +378,7 @@
|
|
this.id = data.id
|
|
this.id = data.id
|
|
this.disFeatureList = data.disFeature
|
|
this.disFeatureList = data.disFeature
|
|
this.disFormulaList = data.disformula
|
|
this.disFormulaList = data.disformula
|
|
|
|
+ this.hasQuestion = data.hasQuestion
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -365,7 +430,6 @@
|
|
} else if ( type === 'FormulaNumber') {
|
|
} else if ( type === 'FormulaNumber') {
|
|
//计算公式只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十
|
|
//计算公式只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十
|
|
this.disFormulaList[index].formula = value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
|
|
this.disFormulaList[index].formula = value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
|
|
- console.log(55555,this.disFormulaList[index].formula)
|
|
|
|
}
|
|
}
|
|
// const item = this.selectedIndexList[index].indexDesc;
|
|
// const item = this.selectedIndexList[index].indexDesc;
|
|
// e.target.value = value.replace(/[^\d]/g,'');
|
|
// e.target.value = value.replace(/[^\d]/g,'');
|
|
@@ -445,7 +509,7 @@
|
|
.symptomList {
|
|
.symptomList {
|
|
position: relative;
|
|
position: relative;
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
- padding: 20px;
|
|
|
|
|
|
+ padding: 20px 20px 100px 20px;
|
|
margin: 0px 20px 40px 20px;
|
|
margin: 0px 20px 40px 20px;
|
|
min-height: 400px;
|
|
min-height: 400px;
|
|
}
|
|
}
|
|
@@ -453,6 +517,7 @@
|
|
.diagTable {
|
|
.diagTable {
|
|
width: 100%;
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border-collapse: collapse;
|
|
|
|
+ margin-bottom: 20px;
|
|
tr {
|
|
tr {
|
|
td {
|
|
td {
|
|
padding: 5px 10px;
|
|
padding: 5px 10px;
|
|
@@ -478,7 +543,7 @@
|
|
text-align: center;
|
|
text-align: center;
|
|
height: 28px;
|
|
height: 28px;
|
|
color: #606266;
|
|
color: #606266;
|
|
- width: 60%;
|
|
|
|
|
|
+ width: 80%;
|
|
}
|
|
}
|
|
.btn {
|
|
.btn {
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -491,6 +556,7 @@
|
|
.btnBox {
|
|
.btnBox {
|
|
position: absolute;
|
|
position: absolute;
|
|
right: 0px;
|
|
right: 0px;
|
|
|
|
+
|
|
}
|
|
}
|
|
.el-button {
|
|
.el-button {
|
|
margin-right: 20px;
|
|
margin-right: 20px;
|
|
@@ -510,7 +576,47 @@
|
|
.colorRed {
|
|
.colorRed {
|
|
color: red;
|
|
color: red;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .FeatureSort {
|
|
|
|
+ width: 5%;
|
|
|
|
+ }
|
|
|
|
+ .FeatureType {
|
|
|
|
+ width: 7%;
|
|
|
|
+ }
|
|
|
|
+ .FeatureNumber {
|
|
|
|
+ width: 8%;
|
|
|
|
+ }
|
|
|
|
+ .FeatureStand {
|
|
|
|
+ width: 20%;
|
|
|
|
+ }
|
|
|
|
+ .FeatureRelate {
|
|
|
|
+ width: 20%;
|
|
|
|
+ }
|
|
|
|
+ .FeatureResult {
|
|
|
|
+ width: 20%;
|
|
|
|
+ }
|
|
|
|
+ .FeatureOpera{
|
|
|
|
+ width: 20%;
|
|
|
|
+ }
|
|
|
|
+ .FormulaSort{
|
|
|
|
+ width: 5%;
|
|
|
|
+ }
|
|
|
|
+ .FormulaType{
|
|
|
|
+ width: 7%;
|
|
|
|
+ }
|
|
|
|
+ .FormulaNumber{
|
|
|
|
+ width: 68%;
|
|
|
|
+ }
|
|
|
|
+ .FormulaOpera{
|
|
|
|
+ width: 20%;
|
|
|
|
+ }
|
|
|
|
+ /deep/.el-input--mini .el-input__inner {
|
|
|
|
+ width: 80px;
|
|
|
|
+ }
|
|
|
|
+ /deep/ .is-disabled {
|
|
|
|
+ background: #ECECEC;
|
|
|
|
+ color: #AAAAAA;
|
|
|
|
+ border: none;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
</style>
|
|
</style>
|