3 changed files with 247 additions and 2 deletions
-
20src/components/doctorCheck/CheckItemList.vue
-
228src/components/doctorCheck/PacsTemplate.vue
-
1src/store/index.js
@ -0,0 +1,228 @@ |
|||
<template> |
|||
<div style="display: flex;"> |
|||
<div style="width: 258px;height:520px;border: 1px solid #EEE;"> |
|||
<div style="margin:2px 2px 2px 2px;"> |
|||
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" /> |
|||
</div> |
|||
<div> |
|||
<el-tree style="overflow: scroll;width: 200px;height:480px;" :data="pacsTemplateTree" :props="treeprops" |
|||
@node-click="handleNode" :filter-node-method="filterNode" ref="ref_tree"> |
|||
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|||
<div> |
|||
<span class="treeicons"> |
|||
<img style="width:20px;height:20px;vertical-align: sub;" src="@/assets/images/order.png" |
|||
v-if="!data.parentId" /> |
|||
</span> |
|||
<span :class="!data.parentId ? 'maxtitle' : 'mintitle'">{{ node.label }} |
|||
</span> |
|||
</div> |
|||
</span> |
|||
</el-tree> |
|||
</div> |
|||
</div> |
|||
|
|||
<div :style="`display: block;width:580px; margin-left: 5px;`"> |
|||
<el-table :data="description" border height="470" highlight-current-row @row-dblclick="rowClick" size="small"> |
|||
<el-table-column prop="description" label="描述" min-width="450" /> |
|||
<el-table-column prop="conclusion" label="结论" min-width="130"> |
|||
<template slot-scope="scope"> |
|||
<el-autocomplete style="width: 100%;" type="textarea" v-model="scope.row.result" placeholder="请输入结论" |
|||
:autosize="{ minRows: 1, maxRows: 1 }" :trigger-on-focus="false" :fetch-suggestions="querySearch"> |
|||
</el-autocomplete> |
|||
</template> |
|||
</el-table-column> |
|||
|
|||
</el-table> |
|||
<div style="display: flex;margin-top: 8px;margin-left: 15px;"> |
|||
<div></div> |
|||
<div style="margin-left: 150px;margin-top: 5px;"> |
|||
<el-button type="primary" @click="btnOk" class="commonbutton">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import moment from "moment"; |
|||
import { mapState } from "vuex"; |
|||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|||
import { arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc"; |
|||
import { getTreePids, getTreeAllChildIdsById, madeTree } from "../../utlis/tree"; |
|||
|
|||
export default { |
|||
components: {}, |
|||
props: ["useCustomerOrg", "initDateType", "isUnit"], |
|||
data() { |
|||
return { |
|||
filterText: '', |
|||
preNodeId: '', //上一次点击树节点 |
|||
curNodeId: '', //本次点击树节点 |
|||
dateType: 'medicalStartDate', |
|||
useCusOrg: false, //是否使用单位 |
|||
isUnitOption: false,//是否禁用单位勾选 |
|||
//体检单位,体检次数,日期类型,起止日期,分组 |
|||
dataCusOrgOCX: [{ |
|||
id: '', //随机的ID,用于删除 |
|||
customerOrgId: '', // |
|||
customerOrgName: '', //企业名称,显示用 |
|||
customerOrgRegister: {}, //已选的体检次数 |
|||
customerOrgRegisterList: [], //当前单位的体检次数信息 |
|||
dateType: 'medicalStartDate', // 登记日期:creationTime;体检日期:medicalStartDate;总检日期:summaryDate |
|||
startDate: '', |
|||
endDate: '', |
|||
customerOrgGroupIds: [], //已选分组 |
|||
customerOrgGroupList: [], //可选的分组 |
|||
}], |
|||
|
|||
description: [], // 描述 |
|||
conclusion: [], // 结论 |
|||
pacsTemplateTree: [], //类别 + 模板树 |
|||
treeprops: { |
|||
label: "displayName", // label/displayName |
|||
value: "id", |
|||
id: "id", |
|||
children: "children", |
|||
}, //树形组件的数据结构 |
|||
curDescription: {} // 当前选中的描述 |
|||
}; |
|||
}, |
|||
//<el-tree :data="$store.state.customerOrg.ref_tree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree> |
|||
computed: { |
|||
...mapState(["dict", "customerOrg", "patientRegister", "report", "diagnosis", "project"]), |
|||
}, |
|||
//创建组件后 |
|||
created() { |
|||
this.dataCusOrgOCX = []; |
|||
if (this.useCustomerOrg) { |
|||
this.useCusOrg = true |
|||
} |
|||
if (this.initDateType) { |
|||
this.dateType = this.initDateType |
|||
} |
|||
if (this.isUnit) { |
|||
this.isUnitOption = true |
|||
} |
|||
this.changeUseOrg(this.useCusOrg) |
|||
}, |
|||
|
|||
//挂载组件完成 |
|||
mounted() { |
|||
//获取体检单位列表树信息 |
|||
this.getPacsTemplateTree(); |
|||
}, |
|||
|
|||
methods: { |
|||
|
|||
//树过滤 |
|||
filterNode(value, data) { |
|||
//console.log(value,data) |
|||
if (!value) return true; |
|||
return data['displayName'].indexOf(value) > -1; |
|||
}, |
|||
|
|||
//获取体检单位列表树信息 |
|||
getPacsTemplateTree() { |
|||
let resultType = [], resultTemplate = [], treeData = [] |
|||
|
|||
postapi('/api/app/BigtextResultType/GetList') |
|||
.then(res => { |
|||
if (res.code > -1) { |
|||
resultType = res.data |
|||
return postapi('/api/app/BigtextResultTemplate/GetList', {}) |
|||
} |
|||
}) |
|||
.then(res => { |
|||
if (res && res.code > -1) { |
|||
res.data.forEach(e => { |
|||
resultTemplate.push(Object.assign({}, e, { parentId: e.bigtextResultTypeId })) |
|||
}); |
|||
treeData = resultType.concat(resultTemplate) |
|||
// console.log('treeData',treeData,resultType,) |
|||
this.pacsTemplateTree = madeTree(treeData, "children", "parentId", "id", null) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
//获取体检单位父级ID api/app/customer-org/parent/[CustomerOrgld |
|||
getCustomerOrgParentId(customerOrgld) { |
|||
if (customerOrgld == this.dict.personOrgId) { |
|||
this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId; |
|||
return; |
|||
} |
|||
getapi(`/api/app/customer-org/parent/${customerOrgld}`).then((res) => { |
|||
console.log("res.data", res.data); |
|||
if (res.code == 1) { |
|||
this.patientRegister.query.CustomerOrgParentId = res.data; |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
//点击树节点 |
|||
handleNode(data, node, prop) { |
|||
let ids = getTreeAllChildIdsById(this.pacsTemplateTree, "children", "id", data.id) |
|||
|
|||
postapi('/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: ids }) |
|||
.then(res => { |
|||
if (res.code > -1) { |
|||
this.description = res.data.descriptionDetail |
|||
this.conclusion = res.data.conclusionDetail |
|||
|
|||
this.description.forEach(e => { |
|||
let conclusion = this.conclusion.filter(c => { |
|||
return c.bigtextResultTemplateId = e.bigtextResultTemplateId |
|||
}) |
|||
e["conclusion"] = "" |
|||
e["conclusionList"] = [] |
|||
conclusion.forEach(c => { |
|||
e["conclusionList"].push({ value: c.conclusion }) |
|||
}); |
|||
if (conclusion.length == 1) e["conclusion"] = conclusion[0].conclusion |
|||
}); |
|||
|
|||
} |
|||
}) |
|||
|
|||
}, |
|||
|
|||
querySearch(queryString, cb) { |
|||
var restaurants = deepCopy(this.restaurants); //不需要字典库显示 [{ value: '阴性' },{ value: '阳性' }] |
|||
restaurants.forEach((item) => { |
|||
return (item.value = item.result); |
|||
}); |
|||
// console.log("restaurants", restaurants); |
|||
var results = queryString |
|||
? restaurants.filter(this.createFilter(queryString)) |
|||
: restaurants; |
|||
// 调用 callback 返回建议列表的数据 |
|||
cb(results); |
|||
}, |
|||
|
|||
//双击删除该行查询条件 |
|||
rowClick(row) { |
|||
this.curDescription = row; |
|||
this.restaurants = row.conclusionList; |
|||
}, |
|||
|
|||
|
|||
btnOk() { |
|||
this.dialogWin.PacsTemplate = false |
|||
}, |
|||
}, |
|||
watch: { |
|||
"filterText"(newVal, oldVal) { |
|||
if(newVal != oldVal) this.$refs['ref_tree'].filter(newVal); |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "../../assets/css/global_dialog.css"; |
|||
@import "../../assets/css/global_table.css"; |
|||
@import "../../assets/css/global_input.css"; |
|||
@import "../../assets/css/global.css"; |
|||
@import "../../assets/css/global_tree.css"; |
|||
|
|||
:deep .el-tree-node>.el-tree-node__children { |
|||
overflow: visible; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue