8 changed files with 447 additions and 33 deletions
-
2src/api/api.js
-
2src/api/request.js
-
186src/components/patientRegister/LisRequest.vue
-
222src/components/patientRegister/PatientRegisterEdit.vue
-
6src/components/patientRegister/PatientRegisterItem.vue
-
37src/components/patientRegister/PatientRegisterList.vue
-
1src/store/index.js
-
24src/views/doctorCheck/personnelBatch.vue
@ -0,0 +1,186 @@ |
|||
<template> |
|||
<div> |
|||
<div> |
|||
<el-table :data="tableData" border style="width: 100%" row-key="id" height="300" highlight-current-row size="small"> |
|||
<el-table-column label="组合项目" width="120" prop="asbitemName" /> |
|||
<el-table-column label="操作" width="130" prop="operate"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.operate" placeholder="请操作方式" size="small" :disabled="scope.row.disabled" |
|||
@change="changeOperate(scope.row)"> |
|||
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value" /> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="条码分组" width="120" prop="sampleGroupName" /> |
|||
<el-table-column label="检验申请号" width="180" prop="lisRequestNo"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.lisRequestNo" size="small" :disabled="scope.row.disabled"> |
|||
<el-option v-for="(item, index) in lisRequestNos" :key="index" :label="item.lisRequestNo" :value="item.lisRequestId" /> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!-- 按钮区域 --> |
|||
<div style="display: flex; margin-top: 30px; margin-left: 400px; "> |
|||
<div style="margin-left: 10px"> |
|||
<el-button type="primary" @click="submit">确定</el-button> |
|||
</div> |
|||
<div style="margin-left: 10px"> |
|||
<el-button type="danger" @click="patientRegister.lisRequestVisble = false">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState } from "vuex"; |
|||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|||
import { examinationgender } from "@/request/systemapi"; |
|||
import { dddw, arrayExistObj } from "../../utlis/proFunc"; |
|||
// import |
|||
export default { |
|||
props: ["id","brushTimes"], |
|||
data() { |
|||
return { |
|||
tableData: [], //组合项目数据 |
|||
options: [{ label: '无', value: 'no' }, { label: '追加到以前条码', value: 'append' }, { label: '申请新的条码', value: 'new' }], //操作方式 |
|||
lisRequestNos: [], //可选条码 |
|||
}; |
|||
}, |
|||
|
|||
created() { }, |
|||
|
|||
mounted() { |
|||
this.getAsbItemList(this.id); |
|||
}, |
|||
computed: { |
|||
...mapState(["patientRegister"]), |
|||
}, |
|||
methods: { |
|||
|
|||
parseData(asbItem) { |
|||
// asbitemId": "3a0c5600-ae78-9ed4-e3c1-993ef41d3c51", |
|||
// "asbitemName": "外科", |
|||
// "isCharge": "N", |
|||
// "completeFlag": "0", |
|||
// "sampleGroupId": "3a0c55c2-0f26-71a1-1f1a-ebbcbd77105b", |
|||
// "sampleGroupName": "测试新增1", |
|||
// "lisRequestId": "3a0d2fa9-aaba-4837-0775-20d13937f357", |
|||
// "lisRequestNo": "T202308220016" |
|||
if (asbItem.length < 1) return; |
|||
let lfind = -1; |
|||
asbItem.forEach(e => { |
|||
if (e.lisRequestNo) { |
|||
e['operate'] = 'no'; |
|||
e['disabled'] = true; |
|||
|
|||
lfind = arrayExistObj(this.lisRequestNos, 'lisRequestNo', e.lisRequestNo); |
|||
if (lfind == -1) { |
|||
this.lisRequestNos.push({ |
|||
sampleGroupId: e.sampleGroupId, |
|||
lisRequestNo: e.lisRequestNo, |
|||
lisRequestId: e.lisRequestId, |
|||
}) |
|||
} |
|||
|
|||
} else { |
|||
e['disabled'] = false; |
|||
} |
|||
return e; |
|||
}); |
|||
|
|||
}, |
|||
|
|||
getAsbItemList(id) { |
|||
this.tableData = []; |
|||
//http://140.143.162.39:9529/api/app/lis-request/register-asbitem-lis-request/3a0d2e90-da68-3746-6775-bf17e5f9b295 |
|||
getapi( |
|||
`/api/app/lis-request/register-asbitem-lis-request/${id}` |
|||
).then((res) => { |
|||
this.tableData = res.data; |
|||
this.parseData(this.tableData); |
|||
}); |
|||
}, |
|||
|
|||
//操作方式 |
|||
changeOperate(row) { |
|||
if(row.operate == 'append'){ |
|||
//2期 考虑根据分组ID 过滤 lisRequestNos |
|||
}else{ |
|||
row.lisRequestNo = ''; |
|||
row.lisRequestId = ''; |
|||
} |
|||
}, |
|||
|
|||
//确定 |
|||
submit() { |
|||
this.$refs["form"].validate((v) => { |
|||
if (v) { |
|||
if (!this.id) { |
|||
postapi("/api/app/reference-range", this.form).then((res) => { |
|||
this.$message.success("新增成功"); |
|||
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
|||
console.log("res", res); |
|||
this.id = res.data.id; |
|||
}); |
|||
} else { |
|||
putapi(`/api/app/reference-range/${this.id}`, this.form).then( |
|||
(res) => { |
|||
this.$message.success("修改成功"); |
|||
this.getlist(this.itemId, this.ReferenceRangeTypeFlag); |
|||
} |
|||
); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
}, |
|||
|
|||
//监听事件 |
|||
watch: { |
|||
//itemId','ReferenceRangeTypeFlag' |
|||
// "id"(newVal, oldVal) { |
|||
// if (newVal != oldVal && newVal != "") { |
|||
// this.getAsbItemList(newVal); |
|||
// } |
|||
// }, |
|||
|
|||
"brushTimes"(newVal, oldVal) { |
|||
if (newVal != oldVal && newVal != "") { |
|||
this.getAsbItemList(this.id); |
|||
} |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
::v-deep .el-input__inner { |
|||
text-align: center; |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep .el-table th.el-table__cell { |
|||
text-align: center; |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep .el-table td.el-table__cell { |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
::v-deep .el-table .cell { |
|||
padding-left: 1px; |
|||
padding-right: 1px; |
|||
} |
|||
|
|||
|
|||
::v-deep input[type="number"]::-webkit-inner-spin-button, |
|||
input[type="number"]::-webkit-outer-spin-button { |
|||
-webkit-appearance: none !important; |
|||
margin: 0 !important; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue