Commit 7fe4d41f authored by 刘怀志's avatar 刘怀志

treatItemOptionsShow

parent f4718295
......@@ -156,10 +156,11 @@
@change="setDrugOthers(singleItem,drugOptions)"
>
<el-option
v-for="item in drugOptions"
v-for="item in drugOptionsShow"
:key="item.drugId"
:label="item.drugName"
:value="item.drugId"
:disabled="item.disabled"
/>
</el-select>
</el-form-item>
......@@ -172,8 +173,8 @@
>
<div style="display: flex;align-items: center;">
<el-input-number
:disabled="!singleItem.drugId"
v-model.trim="singleItem.recipelNum"
:disabled="!singleItem.drugId"
:max="9999"
:min="0"
controls-position="right"
......@@ -189,8 +190,8 @@
prop="remark"
>
<el-input
:disabled="!singleItem.drugId"
v-model.trim="singleItem.remark"
:disabled="!singleItem.drugId"
placeholder="请输入具体用法"
maxlength="30"
/>
......@@ -242,6 +243,7 @@
:key="item.value"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
</el-form-item>
......@@ -266,10 +268,11 @@
@change="setTreatItemsName(singleItem,treatItemOptions)"
>
<el-option
v-for="item in treatItemOptions"
v-for="item in treatItemOptionsShow"
:key="item.value"
:label="item.label"
:value="item.value"
:disabled="item.disabled"
/>
</el-select>
</el-form-item>
......@@ -466,6 +469,20 @@ export default {
},
computed: {
drugOptionsShow() {
console.log('drugListShow', this.prescribingForm.medication, this.drugOptions)
return this.drugOptions.map(item => {
return { ...item, disabled: !this.prescribingForm.medication.every(drug => drug.drugId !== item.drugId) }
}
)
},
treatItemOptionsShow() {
console.log('treatItemOptionsShow', this.prescribingForm.treatment, this.treatItemOptions)
return this.treatItemOptions.map(item => {
return { ...item, disabled: !this.prescribingForm.treatment.every(drug => drug.treatItemsId !== item.value) }
}
)
},
/* 诊断日期格式化 */
formattedDiagnosisTime() {
return moment(this.registerForm.diagnosisTime).format('YYYY/MM/DD')
......@@ -473,8 +490,20 @@ export default {
...mapGetters(['deptId', 'name']),
cItemOptions() {
return (checkType) => {
console.log('checkType', this.checkKeys, checkType, this.checkItemOptions[checkType])
return this.checkItemOptions[checkType]
console.log('checkType', this.prescribingForm.inspect, this.checkItemOptions[checkType])
if (this.checkItemOptions[checkType]) {
console.log()
return this.checkItemOptions[checkType].map(item => {
return {
...item,
disabled: !this.prescribingForm.inspect.every(check => {
return check.checkItemsId !== item.value
})
}
})
} else {
return []
}
}
}
},
......
......@@ -205,8 +205,6 @@
<!-- v-hasPermi="['business:registration:edit']"
:disabled="scope.row.isAdd === '1'"-->
<el-button
v-hasPermi="['business:registration:edit']"
:disabled="scope.row.isAdd === '1'"
icon="el-icon-paperclip"
plain
size="mini"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment