|
|
|
@ -37,8 +37,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-table row-key="id" :data="doctorCheck.checkSummaryList" size="samll" height="150" |
|
|
|
width="100%" border> |
|
|
|
<el-table row-key="id" :data="doctorCheck.checkSummaryList" size="samll" height="150" width="100%" border> |
|
|
|
<el-table-column width="30" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-tag class="moveSummary" style="height:25px;padding:0 2px;cursor: move;background-color: #EEEEEE;"> |
|
|
|
@ -74,11 +73,18 @@ |
|
|
|
<el-table-column v-for="col in resultOpts" :key="col.resultTemplate" width="120" align="left"> |
|
|
|
<template slot="header">{{ col.resultTemplate }}</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-radio-group v-model="scope.row[col.resultTemplate]" @input="radioGroupInput"> |
|
|
|
<div v-for="opt in col.opts" :key="opt" style="margin-left: 10px;"> |
|
|
|
<el-radio :label="opt" style="margin: 5px 0;">{{ opt }}</el-radio> |
|
|
|
</div> |
|
|
|
</el-radio-group> |
|
|
|
<div v-if="col.resultTemplate == '[?]×[?]'" style="display: flex;"> |
|
|
|
<el-input type="number" v-model="scope.row[col.resultTemplate][0]" placeholder="?1" size="small" style="width: 50px;" @input="optInput"/> |
|
|
|
<span>×</span> |
|
|
|
<el-input type="number" v-model="scope.row[col.resultTemplate][1]" placeholder="?2" size="small" style="width: 50px;" @input="optInput"/> |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
<el-radio-group v-model="scope.row[col.resultTemplate]" @input="optInput"> |
|
|
|
<div v-for="opt in col.opts" :key="opt" style="margin-left: 10px;"> |
|
|
|
<el-radio :label="opt" style="margin: 5px 0;">{{ opt }}</el-radio> |
|
|
|
</div> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
@ -171,6 +177,9 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
// |
|
|
|
if (this.result.includes('[?]×[?]')) this.resultOpts.push({ resultTemplate: '[?]×[?]', opts: [], chooseOpt: ['',''] }) |
|
|
|
|
|
|
|
let resultOptRow = { id: 1 } |
|
|
|
if (this.resultOpts.length > 0) { |
|
|
|
this.resultOpts.forEach(e => { |
|
|
|
@ -180,12 +189,18 @@ export default { |
|
|
|
this.resultOptRows.push(resultOptRow) |
|
|
|
}, |
|
|
|
|
|
|
|
// |
|
|
|
radioGroupInput(v){ |
|
|
|
// console.log('radioGroupInput',this.resultOptRows,this.refParams.index) |
|
|
|
// 可选参数选择触发 |
|
|
|
optInput(v) { |
|
|
|
// console.log('optInput',this.resultOptRows,this.refParams.index) |
|
|
|
let result = this.result |
|
|
|
this.resultOpts.forEach(e => { |
|
|
|
if(this.resultOptRows[0][e.resultTemplate]) result = result.replace(e.resultTemplate,this.resultOptRows[0][e.resultTemplate]) |
|
|
|
if (this.resultOptRows[0][e.resultTemplate]){ |
|
|
|
if(e.resultTemplate == '[?]×[?]'){ |
|
|
|
result = result.replace(e.resultTemplate, this.resultOptRows[0][e.resultTemplate].join('×')) |
|
|
|
}else{ |
|
|
|
result = result.replace(e.resultTemplate, this.resultOptRows[0][e.resultTemplate]) |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
this.doctorCheck.checkItemList[this.refParams.index].result = result |
|
|
|
}, |
|
|
|
@ -296,19 +311,19 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 清除结果 |
|
|
|
btnClear(seq) { |
|
|
|
this.doctorCheck.checkItemList[seq].result = ""; |
|
|
|
this.result = ""; |
|
|
|
}, |
|
|
|
|
|
|
|
// 默认结果 |
|
|
|
btnDefResult(seq) { |
|
|
|
this.doctorCheck.checkItemList[seq].result = |
|
|
|
this.doctorCheck.checkItemList[seq].defaultResult; |
|
|
|
let result = this.doctorCheck.checkItemList[seq].defaultResult |
|
|
|
this.doctorCheck.checkItemList[seq].result = result; |
|
|
|
this.result = result |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 确定 |
|
|
|
btnOk() { |
|
|
|
this.refFuncOther(this.refParams.row, this.refParams.index, { |
|
|
|
|