8 changed files with 445 additions and 14 deletions
-
82src/components/common/ItemTypeTree.vue
-
4src/components/patientRegister/PatientRegisterItem.vue
-
6src/router/index.js
-
1src/store/index.js
-
6src/views/Home.vue
-
22src/views/charge/charge.vue
-
232src/views/diagnosis/diagnosis.vue
-
106src/views/diagnosis/diagnosisSug.vue
@ -0,0 +1,82 @@ |
|||
<template> |
|||
<div> |
|||
<div style="margin:2px 2px 2px 2px;"> |
|||
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" /> |
|||
</div> |
|||
<div :style="'overflow: scroll;height:' +(window.pageHeight < 600 ? 410 : window.pageHeight - 190) + 'px;'"> |
|||
<el-tree :data="dict.itemTypeTree" :props="customerOrg.treeprops" |
|||
node-key="id" :filter-node-method="filterNode" |
|||
:default-expanded-keys="customerOrg.defaultExpandedKeys" |
|||
@node-click="treeclick" highlight-current ref="customerOrgTree"/> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { mapState, mapMutations } from "vuex"; |
|||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|||
import { tcdate, deepCopy } from "../../utlis/proFunc"; |
|||
import { getTreePids} from "../../utlis/tree"; |
|||
|
|||
export default { |
|||
components: {}, |
|||
props:['refreshItemTypeId'], |
|||
data() { |
|||
return { |
|||
filterText:'' |
|||
}; |
|||
}, |
|||
|
|||
computed: { |
|||
...mapState(["customerOrg", "window","dict"]), |
|||
}, |
|||
|
|||
//创建组件后 |
|||
created() { |
|||
}, |
|||
|
|||
//挂载组件完成 |
|||
mounted() { |
|||
//初始化信息 |
|||
this.dictInit(); |
|||
}, |
|||
|
|||
methods: { |
|||
...mapMutations(["setData"]), |
|||
|
|||
//初始数据 |
|||
dictInit(){ |
|||
//体检类别 树结构 |
|||
getapi("/api/app/item-type/by-code-all").then((res) => { |
|||
if (res.code != -1) { |
|||
this.dict.itemTypeTree = res.data; |
|||
tcdate(this.dict.itemTypeTree); |
|||
} |
|||
}); |
|||
}, |
|||
|
|||
//点击树节点 |
|||
treeclick(data) { |
|||
this.refreshItemTypeId(data.id); |
|||
}, |
|||
|
|||
//树过滤 |
|||
filterNode(value, data) { |
|||
//console.log(value,data) |
|||
if (!value) return true; |
|||
return data['displayName'].indexOf(value) !== -1 || data['simpleCode'].indexOf(value.toUpperCase()) !== -1; |
|||
} |
|||
}, |
|||
|
|||
watch: { |
|||
|
|||
|
|||
"filterText"(newVal,oldVal){ |
|||
this.$refs['customerOrgTree'].filter(newVal); |
|||
} |
|||
}, |
|||
|
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
@import "../../assets/css/global.css"; |
|||
</style> |
|||
@ -0,0 +1,232 @@ |
|||
<template> |
|||
<div> |
|||
<el-card class="elcard"> |
|||
<div slot="header"> |
|||
<span>诊断建议设置</span> |
|||
</div> |
|||
<div style="display: flex;"> |
|||
<!-- 类别树组件 --> |
|||
<div :style="'border: 1px solid;width:200px; height:' +(window.pageHeight < 600 ? 450 : window.pageHeight - 150) +'px;'"> |
|||
<ItemTypeTree :refreshItemTypeId="refreshItemTypeId"/> |
|||
</div> |
|||
<!-- 诊断与建议 --> |
|||
<div style="display: block;"> |
|||
<!-- 诊断列表 --> |
|||
<div style="margin-left:5px;display: flex;"> |
|||
<div :style="'width:' + (window.pageWidth - 200 - 110 - 50) + 'px;'"> |
|||
<div style="margin-left: 5px;display: flex; flex-wrap: wrap;"> |
|||
<div> |
|||
<el-checkbox v-model="query.itemTypeFlag">项目类别作为查询条件</el-checkbox> |
|||
<el-input placeholder="查询关键字" v-model="query.keyWords" size="small" clearable style="width: 200px" /> |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<el-table :data="tableData" border |
|||
:height="window.pageHeight < 600 ? 200 : Math.floor((window.pageHeight - 200) / 2)" |
|||
highlight-current-row @row-click="rowClick" size="small" ref="tableDiagnosis"> |
|||
<el-table-column |
|||
v-for="(item, index) in headerCols" |
|||
:key="`col_${index}`" |
|||
:min-width="dropCol[index].minWidth" |
|||
:align="dropCol[index].align" |
|||
:label="item.label" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<div v-if="dropCol[index].prop == 'sn'" > |
|||
{{ scope.$index + 1 }} |
|||
</div> |
|||
<div v-else-if ="dropCol[index].prop == 'isIll' |
|||
|| dropCol[index].prop == 'isSummaryTemplate'" > |
|||
{{ scope.row[dropCol[index].prop] == 'Y' ? '是':'否' }} |
|||
</div> |
|||
<div v-else-if="dropCol[index].prop == 'itemTypeId'" > |
|||
{{ dddw(dict.itemTypeTree, "id", scope.row[dropCol[index].prop], "displayName") }} |
|||
</div> |
|||
<div v-else-if="dropCol[index].prop == 'diagnosisLevelId'" > |
|||
{{ dddw(dict.diagnosisLevel, "id", scope.row[dropCol[index].prop], "displayName") }} |
|||
</div> |
|||
<div v-else-if="dropCol[index].prop == 'forSexId'" > |
|||
{{ dddw(dict.forSex, "id", scope.row[dropCol[index].prop], "displayName") }} |
|||
</div> |
|||
<div v-else-if ="dropCol[index].prop == 'lastModificationTime' |
|||
|| dropCol[index].prop == 'creationTime'" > |
|||
{{ scope.row[dropCol[index].prop] ? moment(scope.row[dropCol[index].prop]).format('yyyy-MM-DD HH:mm:ss'):'' }} |
|||
</div> |
|||
<div v-else> |
|||
{{ scope.row[dropCol[index].prop] }} |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
</div> |
|||
<!--按钮--> |
|||
<div style="margin-left: 10px;"> |
|||
<div> |
|||
<el-button class="btnClass" @click="btnQuery">查询</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button type="primary" class="btnClass" @click="btnQuery">新增</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button type="success" class="btnClass" @click="btnQuery">编辑</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button type="danger" class="btnClass" @click="btnQuery">删除</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button type="danger" class="btnClass" @click="btnQuery">保存排序</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<!-- 诊断对应的建议列表 --> |
|||
<div style="margin-top:5px;"> |
|||
<DiagnosisSug :formDiagnosis="form"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</el-card> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
|
|||
import moment from "moment"; |
|||
import { mapState } from "vuex"; |
|||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|||
import Sortable from "sortablejs"; |
|||
|
|||
import ItemTypeTree from "../../components/common/ItemTypeTree.vue"; |
|||
import DiagnosisSug from "./diagnosisSug.vue"; |
|||
import { deepCopy,dddw } from '@/utlis/proFunc'; |
|||
|
|||
|
|||
|
|||
export default { |
|||
components: { |
|||
ItemTypeTree, |
|||
DiagnosisSug, |
|||
}, |
|||
data() { |
|||
return { |
|||
query:{ |
|||
itemTypeFlag:true, //项目类别是否 作为查询条件 |
|||
itemTypeId:'', |
|||
keyWords:'', |
|||
}, |
|||
tableData:[], //诊断列表 |
|||
formInit:{}, |
|||
form:{ |
|||
id:'', |
|||
suggestions:[], |
|||
}, |
|||
rules:{ |
|||
|
|||
}, |
|||
|
|||
//动态列(预留) |
|||
headerCols: [], |
|||
|
|||
//拖动列(预留) |
|||
dropCol: [ |
|||
{ label: "序号",prop: "sn",minWidth: 40,align:"center"}, |
|||
{ label: "项目类别",prop: "itemTypeId",minWidth: 120,align:"center"}, |
|||
{ label: "诊断级别",prop: "diagnosisLevelId",minWidth: 60,align:"center"}, |
|||
{ label: "诊断名称",prop: "displayName",minWidth: 100,align:"center"}, |
|||
{ label: "建议名称",prop: "suggestionName",minWidth: 100,align:"center"}, |
|||
{ label: "疾病",prop: "isIll",minWidth: 40,align:"center"}, |
|||
{ label: "适用性别",prop: "forSexId",minWidth: 60,align:"center"}, |
|||
{ label: "总检模板",prop: "isSummaryTemplate",minWidth: 60,align:"center"}, |
|||
{ label: "创建者",prop: "creatorName",minWidth: 60,align:"center"}, |
|||
{ label: "创建时间",prop: "creationTime",minWidth: 130,align:"center"}, |
|||
{ label: "修改者",prop: "lastModifierName",minWidth: 60,align:"center"}, |
|||
{ label: "修改时间",prop: "lastModificationTime",minWidth: 130,align:"center"}, |
|||
], |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.init() |
|||
}, |
|||
|
|||
//挂载完成 |
|||
mounted() { |
|||
this.btnQuery(); |
|||
|
|||
}, |
|||
|
|||
computed: { |
|||
...mapState(["customerOrg", "window","dict"]), |
|||
}, |
|||
|
|||
methods: { |
|||
moment,dddw, |
|||
|
|||
init(){ |
|||
this.formInit = Object.assign({},this.form) |
|||
this.headerCols = deepCopy(this.dropCol) |
|||
|
|||
//适用性别(查询) |
|||
getapi("/api/app/for-sex").then((res) => { |
|||
if (res.code != -1) { |
|||
this.dict.forSex = res.data; |
|||
} |
|||
}); |
|||
|
|||
//诊断级别 |
|||
getapi("/api/app/diagnosis-level").then((res) => { |
|||
if (res.code != -1) { |
|||
this.dict.diagnosisLevel = res.data.items; |
|||
} |
|||
}); |
|||
|
|||
|
|||
|
|||
}, |
|||
|
|||
//供树节点组件调用,更新当前所选的项目类别 |
|||
refreshItemTypeId(itemTypeId){ |
|||
this.query.itemTypeId = itemTypeId |
|||
}, |
|||
|
|||
btnQuery(){ |
|||
let body = {} |
|||
if(this.query.itemTypeFlag && this.query.itemTypeId) body.itemTypeId = this.query.itemTypeId |
|||
if(this.query.keyWords) body.keyWords = this.query.keyWords |
|||
|
|||
postapi('/api/app/diagnosis/getlistinsuggestion',body).then(res =>{ |
|||
if(res.code != -1){ |
|||
this.tableData = res.data |
|||
} |
|||
}) |
|||
|
|||
console.log(this.query) |
|||
}, |
|||
|
|||
rowClick(row){ |
|||
this.form = deepCopy(row) |
|||
}, |
|||
|
|||
}, |
|||
|
|||
watch: { |
|||
"query.itemTypeId"(newVal,oldVal){ |
|||
this.btnQuery(); |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
@import '../../assets/css/global_button.css'; |
|||
@import '../../assets/css/global_card.css'; |
|||
@import '../../assets/css/global_dialog.css'; |
|||
@import '../../assets/css/global_form.css'; |
|||
@import '../../assets/css/global_input.css'; |
|||
@import '../../assets/css/global_table.css'; |
|||
@import '../../assets/css/global.css'; |
|||
|
|||
.btnClass{ |
|||
width:100px; |
|||
margin-bottom: 5px; |
|||
} |
|||
</style> |
|||
@ -0,0 +1,106 @@ |
|||
<template> |
|||
<div style="margin-left:5px;display: flex;"> |
|||
<div :style="'width:' + (window.pageWidth - 200 - 110 - 50) + 'px;'"> |
|||
<el-table :data="tableData" border |
|||
:height="window.pageHeight < 600 ? 215 : Math.floor((window.pageHeight - 170) / 2)" |
|||
highlight-current-row @row-click="rowClick" size="small" ref="elTable"> |
|||
<el-table-column type="index" label="序号" min-width="40" align="center"/> |
|||
<el-table-column prop="suggestionContent" label="建议内容"> |
|||
<template slot-scope="scope"> |
|||
<el-input type="textarea" v-model="scope.row.suggestionContent" placeholder="建议内容" style="width: 100%" |
|||
:autosize="{ minRows: 1, maxRows: 100 }"> |
|||
</el-input> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--按钮--> |
|||
<div style="margin-left: 10px;"> |
|||
<div> |
|||
<el-button type="primary" class="btnClass" @click="btnQuery">新增</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button type="danger" class="btnClass" @click="btnQuery">删除</el-button> |
|||
</div> |
|||
<div> |
|||
<el-button type="success" class="btnClass" @click="btnQuery">保存</el-button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
|
|||
import moment from "moment"; |
|||
import { mapState } from "vuex"; |
|||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|||
import Sortable from "sortablejs"; |
|||
|
|||
import { deepCopy,dddw } from '@/utlis/proFunc'; |
|||
|
|||
|
|||
|
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
props:["formDiagnosis"], |
|||
data() { |
|||
return { |
|||
tableData:[], //建议列表 |
|||
curRow:{}, //当前选中建议 |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
this.init() |
|||
}, |
|||
|
|||
//挂载完成 |
|||
mounted() { |
|||
this.btnQuery(); |
|||
|
|||
}, |
|||
|
|||
computed: { |
|||
...mapState(["window"]), |
|||
}, |
|||
|
|||
methods: { |
|||
moment,dddw, |
|||
|
|||
init(){ |
|||
this.tableData = deepCopy(this.formDiagnosis.suggestions) |
|||
}, |
|||
|
|||
//供树节点组件调用,更新当前所选的项目类别 |
|||
refreshItemTypeId(itemTypeId){ |
|||
this.query.itemTypeId = itemTypeId |
|||
}, |
|||
|
|||
rowClick(row){ |
|||
this.curRow = row |
|||
}, |
|||
|
|||
}, |
|||
|
|||
watch: { |
|||
"formDiagnosis.id"(newVal,oldVal){ |
|||
this.init() |
|||
} |
|||
}, |
|||
}; |
|||
</script> |
|||
<style scoped> |
|||
@import '../../assets/css/global_button.css'; |
|||
@import '../../assets/css/global_card.css'; |
|||
@import '../../assets/css/global_dialog.css'; |
|||
@import '../../assets/css/global_form.css'; |
|||
@import '../../assets/css/global_input.css'; |
|||
@import '../../assets/css/global_table.css'; |
|||
@import '../../assets/css/global.css'; |
|||
|
|||
.btnClass{ |
|||
width:100px; |
|||
margin-bottom: 5px; |
|||
} |
|||
</style> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue