|
@@ -38,36 +38,36 @@
|
|
|
<td class="FeatureResult">结果</td>
|
|
|
<td class="FeatureOpera"></td>
|
|
|
</tr>
|
|
|
- <tr v-for="(item, index) in disFeatureList" :key="item.index" @click="clickItem">
|
|
|
+ <tr v-for="(item, index) in disFeatureList" :key="item.index">
|
|
|
<td class="FeatureSort" >{{index+1}}</td>
|
|
|
<td class="FeatureType" >
|
|
|
- <el-select size="mini" v-model.trim="item.type" placeholder="标签类型" clearable>
|
|
|
+ <el-select size="mini" :class="{selectType: item.typeNull}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FeatureType')" clearable>
|
|
|
<el-option v-for="item in featureTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
|
</el-select>
|
|
|
</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 :disabled="!item.verifyCode&&!item.codeNull&&!item.codeError" class="item" effect="dark" :content="item.verifyCode||item.codeNull||item.codeError" placement="top">
|
|
|
+ <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')" @click="clickItem(index,'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 :disabled="!item.verifyStandard&&!item.standardNull" class="item" effect="dark" :content="item.verifyStandard||item.standardNull" placement="top">
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyStandard||item.standardNull}" :title="item.standard" type="text" v-model.trim="item.standard" @input="handleInp(index,$event,'FeatureStand')" @click="clickItem(index,'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 :disabled="!item.verifyRelation" class="item" effect="dark" :content="item.verifyRelation" placement="top">
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyRelation}" :title="item.relation" type="text" v-model.trim="item.relation" @input="handleInp(index,$event,'FeatureRelate')" @click="clickItem(index,'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 :disabled="!item.verifyResult" class="item" effect="dark" :content="item.verifyResult" placement="top">
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyResult}" :title="item.result" type="text" v-model.trim="item.result" @input="handleInp(index,$event,'FeatureResult')" @click="clickItem(index,'FeatureResult')">
|
|
|
</el-tooltip>
|
|
|
</td>
|
|
|
<td class="FeatureOpera">
|
|
|
- <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 type="text" size="small" class="delete" @click="addItem(index, 1)"><div class="btnOpera">+</div></el-button>
|
|
|
+ <el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 1)"><div class="btnOpera">-</div></el-button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
@@ -82,18 +82,18 @@
|
|
|
<tr v-for="(item, index) in disFormulaList" :key="item.index">
|
|
|
<td class="FormulaSort">{{index +1}}</td>
|
|
|
<td class="FormulaType">
|
|
|
- <el-select size="mini" v-model.trim="item.type" placeholder="标签类型" clearable>
|
|
|
+ <el-select size="mini" :class="{selectType: item.verifyType}" v-model.trim="item.type" placeholder="标签类型" @change="clickItem(index,'FormulaType')" clearable>
|
|
|
<el-option v-for="item in formulaTypeList" :label="item.name" :value="item.key" :key="item.key"></el-option>
|
|
|
</el-select>
|
|
|
</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 :disabled="!item.verifyFormula" class="item" effect="dark" :content="item.verifyFormula" placement="top">
|
|
|
+ <input class="groupInput" :class="{borderRed:item.verifyFormula}" :title="item.formula" type="text" v-model.trim="item.formula" @input="handleInp(index,$event,'FormulaNumber')" @click="clickItem(index,'FormulaNumber')">
|
|
|
</el-tooltip>
|
|
|
</td>
|
|
|
<td class="FeatureOpera">
|
|
|
- <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 type="text" size="small" class="delete" @click="addItem(index, 2)"><div class="btnOpera">+</div></el-button>
|
|
|
+ <el-button v-if="index !=0" type="text" size="small" class="delete" @click="delItem(index, 2)"><div class="btnOpera">-</div></el-button>
|
|
|
</td>
|
|
|
<!-- <td class="selectedContent ">{{item.indexUnique}}</td>
|
|
|
<td class="selectedContentGroup"><input class="groupInput" type="text" v-model="item.indexDesc" @input="handleInp(index,$event)"></td>
|
|
@@ -153,6 +153,7 @@
|
|
|
formula:''
|
|
|
}
|
|
|
], //疾病特征列表
|
|
|
+ disFeatureListResult:[], //疾病特征列表(保存用)
|
|
|
disFormulaList:[
|
|
|
{
|
|
|
type:'',
|
|
@@ -163,6 +164,7 @@
|
|
|
formula:''
|
|
|
}
|
|
|
],
|
|
|
+ disFormulaListResult:[], //诊断公式列表(保存用)
|
|
|
searchDiagVal: '',
|
|
|
isEdit: false,
|
|
|
saveDisable: false ,
|
|
@@ -181,7 +183,9 @@
|
|
|
this.disName = data.disName
|
|
|
this.id = data.id
|
|
|
this.disFeatureList = data.disFeature
|
|
|
- this.disFormulaList = data.disformula
|
|
|
+ if(data.disformula.length) {
|
|
|
+ this.disFormulaList = data.disformula
|
|
|
+ }
|
|
|
this.hasQuestion = data.hasQuestion
|
|
|
|
|
|
}
|
|
@@ -304,9 +308,35 @@
|
|
|
this.warning('请选择诊断')
|
|
|
return
|
|
|
}
|
|
|
+ this.disFeatureListResult = []
|
|
|
+ this.disFormulaListResult = []
|
|
|
let errStrList = [];
|
|
|
- const disFeatureList = this.disFeatureList;
|
|
|
- const disFormulaList = this.disFormulaList;
|
|
|
+ for(let i = 0; i < this.disFeatureList.length; i++) {
|
|
|
+ if(this.disFeatureList[i].type || this.disFeatureList[i].code || this.disFeatureList[i].standard || this.disFeatureList[i].relation || this.disFeatureList[i].result) {
|
|
|
+ this.disFeatureListResult.push(this.disFeatureList[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(let i = 0; i < this.disFormulaList.length; i++) {
|
|
|
+ if(this.disFormulaList[i].type || this.disFormulaList[i].formula ) {
|
|
|
+ this.disFormulaListResult.push(this.disFormulaList[i])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let disFeatureList;
|
|
|
+ if(this.disFeatureListResult.length) {
|
|
|
+ disFeatureList = this.disFeatureListResult;
|
|
|
+ } else {
|
|
|
+ disFeatureList = [
|
|
|
+ {
|
|
|
+ type:'',
|
|
|
+ code:'',
|
|
|
+ standard:'',
|
|
|
+ relation:'',
|
|
|
+ result:'',
|
|
|
+ formula:''
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ const disFormulaList = this.disFormulaListResult;
|
|
|
let codeErrorNum = 0;
|
|
|
for(let i=0; i < disFeatureList.length; i++) {
|
|
|
if(!disFeatureList[i].type) {
|
|
@@ -322,11 +352,11 @@
|
|
|
const errStr = "第" + (i+ 1) +"行必填项未填写"
|
|
|
errStrList.push(errStr)
|
|
|
}
|
|
|
- let regex =new RegExp(`${disFeatureList[i].type}\.[1-9]\\d?`)
|
|
|
+ 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) +"行序号和类型不匹配"
|
|
|
+ const errStr = "疾病特征第" + (i+ 1) +"行序号和类型不匹配"
|
|
|
errStrList.push(errStr)
|
|
|
}
|
|
|
|
|
@@ -337,12 +367,19 @@
|
|
|
if(disFormulaList[i].type&&!disFormulaList[i].formula ) {
|
|
|
disFormulaList[i].verifyFormula = "诊断公式不能为空"
|
|
|
formulaListErrNum++;
|
|
|
+ const errStr = "诊断公式第" + (i+ 1) +"行诊断公式不能为空"
|
|
|
+ errStrList.push(errStr)
|
|
|
} else if(disFormulaList[i].formula&&!disFormulaList[i].type) {
|
|
|
disFormulaList[i].verifyType = "诊断类型不能为空"
|
|
|
+ const errStr = "诊断公式第" + (i+ 1) +"行诊断类型不能为空"
|
|
|
+ errStrList.push(errStr)
|
|
|
formulaListErrNum++;
|
|
|
}
|
|
|
}
|
|
|
- this.disFormulaList = JSON.parse(JSON.stringify(disFormulaList))
|
|
|
+ if(disFormulaList.length) {
|
|
|
+ this.disFormulaList = JSON.parse(JSON.stringify(disFormulaList))
|
|
|
+ }
|
|
|
+
|
|
|
let errorStr =''
|
|
|
for(let i = 0; i <errStrList.length; i++) {
|
|
|
errorStr += '<p>'+errStrList[i]+'</p>'
|
|
@@ -367,9 +404,9 @@
|
|
|
},
|
|
|
diagBaseVerifyData() {
|
|
|
const param = {
|
|
|
- disFeature: this.disFeatureList,
|
|
|
+ disFeature: this.disFeatureListResult,
|
|
|
disName: this.disName,
|
|
|
- disformula: this.disFormulaList,
|
|
|
+ disformula: this.disFormulaListResult,
|
|
|
id: this.id,
|
|
|
modifier: this.modifier
|
|
|
}
|
|
@@ -377,34 +414,24 @@
|
|
|
const data = res.data.data
|
|
|
this.id = data.id
|
|
|
this.disFeatureList = data.disFeature
|
|
|
- this.disFormulaList = data.disformula
|
|
|
+ if(data.disformula.length) {
|
|
|
+ this.disFormulaList = data.disformula
|
|
|
+ }else {
|
|
|
+ this.disFormulaList = [
|
|
|
+ {
|
|
|
+ type:'',
|
|
|
+ code:'',
|
|
|
+ standard:'',
|
|
|
+ relation:'',
|
|
|
+ result:'',
|
|
|
+ formula:''
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
this.hasQuestion = data.hasQuestion
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- showDelDialog() {
|
|
|
- this.showConfirmDialog('是否建立该关联?', () => {
|
|
|
- const url = this.isEdit ?api.updateIndexConfigList(param) : api.saveIndexConfigLists(param)
|
|
|
- this.saveDisable = true //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
|
- url.then((res) => {
|
|
|
- if (res.data.code === '0') {
|
|
|
- this.warning(res.data.msg || '关联成功', 'success','1000')
|
|
|
- setTimeout(() => {
|
|
|
- //返回带搜索条件的首页
|
|
|
- this.$router.push({
|
|
|
- path:'ChronicAndIndexRelation',
|
|
|
- params: Object.assign({}, this.$route.params, {currentPage: 1})
|
|
|
- })
|
|
|
- }, 1000);
|
|
|
- } else {
|
|
|
- this.warning(res.data.msg)
|
|
|
- }
|
|
|
- this.saveDisable = false
|
|
|
- }).catch((err) => {
|
|
|
- this.warning(err);
|
|
|
- })
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
showConfirmDialog(msg, resolve) {
|
|
|
this.$alert(msg, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -435,8 +462,37 @@
|
|
|
// e.target.value = value.replace(/[^\d]/g,'');
|
|
|
// this.selectedIndexList[index].indexDesc = item.replace(/[^\d]/g,'');
|
|
|
},
|
|
|
- clickItem() {
|
|
|
- console.log('clickItem')
|
|
|
+ clickItem(index, type) {
|
|
|
+ console.log('typeNull', type)
|
|
|
+ switch(type) {
|
|
|
+ case 'FeatureType':
|
|
|
+ this.disFeatureList[index].typeNull = ''
|
|
|
+ return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
+ case 'FeatureNumber':
|
|
|
+ this.disFeatureList[index].codeNull = ''
|
|
|
+ this.disFeatureList[index].verifyCode = ''
|
|
|
+ this.disFeatureList[index].codeError = ''
|
|
|
+ return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
+ case 'FeatureStand':
|
|
|
+ this.disFeatureList[index].verifyStandard =''
|
|
|
+ this.disFeatureList[index].standardNull =''
|
|
|
+ return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
+ case 'FeatureRelate':
|
|
|
+ this.disFeatureList[index].verifyRelation =''
|
|
|
+ return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
+ case 'FeatureResult':
|
|
|
+ this.disFeatureList[index].verifyResult =''
|
|
|
+ return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
+ case 'FeatureResult':
|
|
|
+ this.disFeatureList[index].verifyResult =''
|
|
|
+ return this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureList))
|
|
|
+ case 'FormulaType':
|
|
|
+ this.disFormulaList[index].verifyType =''
|
|
|
+ return this.disFormulaList = JSON.parse(JSON.stringify(this.disFormulaList))
|
|
|
+ case 'FormulaNumber':
|
|
|
+ this.disFormulaList[index].verifyFormula =''
|
|
|
+ return this.disFormulaList = JSON.parse(JSON.stringify(this.disFormulaList))
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -526,7 +582,9 @@
|
|
|
}
|
|
|
.FormulaOpera, .FeatureOpera{
|
|
|
background: #fff;
|
|
|
- border: none
|
|
|
+ border: none;
|
|
|
+ text-align: left;
|
|
|
+ padding-left: 30px;
|
|
|
}
|
|
|
}
|
|
|
.selectedContent {
|
|
@@ -609,6 +667,15 @@
|
|
|
.FormulaOpera{
|
|
|
width: 20%;
|
|
|
}
|
|
|
+ .btnOpera {
|
|
|
+ width:16px;
|
|
|
+ height:16px;
|
|
|
+ background:rgba(176,190,197,1);
|
|
|
+ border-radius: 50%;
|
|
|
+ color: #fff;
|
|
|
+ line-height: 16px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
/deep/.el-input--mini .el-input__inner {
|
|
|
width: 80px;
|
|
|
}
|
|
@@ -617,6 +684,14 @@
|
|
|
color: #AAAAAA;
|
|
|
border: none;
|
|
|
}
|
|
|
+ .selectType {
|
|
|
+ input {
|
|
|
+ border: 1px solid red;
|
|
|
+ }
|
|
|
+ input:hover {
|
|
|
+ border: 1px solid red;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
</style>
|