Browse Source

pacs

master
pengjun 12 months ago
parent
commit
a2c4f9c68c
  1. 275
      src/components/doctorCheck/PacsTemplate copy.vue
  2. 335
      src/components/doctorCheck/PacsTemplate.vue
  3. 356
      src/components/doctorCheck/PacsTemplateBak.vue

275
src/components/doctorCheck/PacsTemplate copy.vue

@ -1,275 +0,0 @@
<template>
<div style="display: flex;">
<div :style="`width: 220px;height:550px;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:510px;`" :data="pacsTemplateTree"
:props="treeprops" :filter-node-method="filterNode" :expand-on-click-node="false"
highlight-current ref="ref_tree" show-checkbox default-expand-all @check-change="handleCheckChange" >
<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:620px; margin-left: 5px;`">
<div>
<span>检查结果</span>
<el-input style="width: 100%;" type="textarea" v-model="result" placeholder="请输入描述"
:autosize="{ minRows: decLineCount, maxRows: decLineCount }" />
</div>
<div style="margin-top: 5px;">
<span>检查结论</span>
<div style="display: flex;justify-content: space-between;">
<el-input style="width: 100%;" type="textarea" v-model="summary" placeholder="请输入结论"
:autosize="{ minRows: conLineCount, maxRows: conLineCount }" />
</div>
</div>
<div style="display: flex;justify-content: space-between;margin-top: 10px;">
<div></div>
<div>
<!--
<el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
-->
<el-button type="primary" @click="btnClear" class="commonbutton">清除</el-button>
<el-button type="primary" @click="btnDefault" class="commonbutton">默认结果</el-button>
<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 { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
import { arrayReduce, arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { getTreePids, getTreeAllChildIdsById, madeTree } from "../../utlis/tree";
export default {
components: {},
props: ["refParams", "refFuncOther"],
data() {
return {
filterText: '',
description: [], //
conclusion: [], //
descriptionChoosedPre: [], //
descriptionChoosed: [], //
conclusionChoosed: [], //
conclusionAll: [], //
result: '', //
summary: '', //
pacsTemplateTree: [], // +
treeprops: {
label: "displayName", // label/displayName
value: "id",
id: "id",
children: "children",
}, //
};
},
//<el-tree :data="$store.state.customerOrg.ref_tree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: {
...mapState(["window", "dialogWin","doctorCheck"]),
mainHeight() {
return this.window.pageHeight - 118;
},
tableHeight() {
return this.mainHeight - 120 - 80 - 80;
},
decLineCount(){
return this.refParams.from == 'dcm' ? 14:16
},
conLineCount(){
return this.refParams.from == 'dcm' ? 7:8
}
},
//
created() {
},
//
mounted() {
//
this.getPacsTemplateTree();
this.init()
},
methods: {
//
init() {
this.btnClear()
this.description = []
this.result = this.refParams.result || ''
this.summary = this.refParams.summary || ''
console.log('init')
},
//
handleCheckChange(data, checked, indeterminate) {
// console.log('data, checked, indeterminate,this.menuInfoSet',data, checked, indeterminate,this.menuInfoSet);
this.description = []
this.conclusion = []
postapi('/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: [data.id] })
.then(res => {
if (res.code > -1) {
this.description = res.data.descriptionDetail
this.conclusion = res.data.conclusionDetail
let opraType = false
if(checked){
//
opraType = true
}else if(!indeterminate){
//
opraType = false
}
this.chooseDescription(opraType)
this.chooseConclusion(opraType)
}
});
},
//
filterNode(value, data) {
//console.log(value,data)
if (!value) return true;
return data['displayName'].indexOf(value) > -1 || data['simpleCode'].indexOf(value.toUpperCase()) > -1;
},
// truefalse
chooseDescription(opraType){
let bfind = false
this.description.forEach(e => {
bfind = this.result.includes(e.description)
if(opraType){
if(!bfind){
if(this.result){
this.result += ";" + e.description
}else{
this.result = e.description
}
}
}else{
if(bfind) this.result = this.result.replaceAll(e.description + ';','').replaceAll(e.description,'')
}
});
},
// truefalse
chooseConclusion(opraType){
let lfind = 0
let summarys = this.summary.split(';')
this.conclusion.forEach(e => {
lfind = summarys.indexOf(e.conclusion)
if(opraType){
if(lfind == -1) summarys.push(e.conclusion)
}else{
if(lfind > -1) summarys.splice(lfind,1)
}
});
let summary = ''
summarys.forEach(e => {
if(summary){
summary += ';' + e
}else{
summary = e
}
});
this.summary = summary
},
//pacs
getPacsTemplateTree() {
let resultType = [], resultTemplate = [], treeData = []
postapi('/api/app/BigtextResultType/GetList',{
itemTypeId:this.refParams.row.itemTypeId
})
.then(res => {
if (res.code > -1) {
resultType = res.data
resultType.forEach(e => {
e.disabled = true
});
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)
}
})
},
btnTest() {
console.log('this.descriptionChoosed', this.descriptionChoosed)
console.log('this.conclusionChoosed', this.conclusionChoosed)
},
//
btnClear() {
console.log('btnClear')
this.result = ''
this.summary = ''
},
//
btnDefault() {
this.btnClear()
this.result = this.refParams.row.defaultResult
this.summary = '未见异常'
},
//
btnOk() {
this.refFuncOther(this.refParams.row, this.refParams.index, { result: this.result, summary: this.summary })
this.dialogWin.PacsTemplate = false
},
},
watch: {
"filterText"(newVal, oldVal) {
if (newVal != oldVal) this.$refs['ref_tree'].filter(newVal);
},
"refParams.refresh"(newVal, oldVal) {
if (newVal && newVal != oldVal) this.init();
},
},
};
</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>

335
src/components/doctorCheck/PacsTemplate.vue

@ -1,21 +1,37 @@
<template>
<div style="display: flex;">
<div style="display: flex">
<div :style="`width: 300px;height:550px;border: 1px solid #EEE;`">
<div style="margin:2px 2px 2px 2px;">
<el-input placeholder="输入关键字进行过滤" v-model="filterText" size="small" />
<div style="margin: 2px 2px 2px 2px">
<el-input
placeholder="输入关键字进行过滤"
v-model="filterText"
size="small"
/>
</div>
<div>
<!-- default-expand-all -->
<el-tree :style="`overflow: scroll;width: 280px;height:510px;`" :data="pacsTemplateTree" :props="treeprops"
:filter-node-method="filterNode" :expand-on-click-node="false" highlight-current ref="ref_tree" show-checkbox
@check-change="handleCheckChange">
<el-tree
:style="`overflow: scroll;width: 280px;height:510px;`"
:data="pacsTemplateTree"
:props="treeprops"
:filter-node-method="filterNode"
:expand-on-click-node="false"
highlight-current
ref="ref_tree"
show-checkbox
@check-change="handleCheckChange"
>
<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" />
<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 :class="!data.parentId ? 'maxtitle' : 'mintitle'"
>{{ node.label }}
</span>
</div>
</span>
@ -33,46 +49,90 @@
</el-radio-group>
</div>
<el-tabs :tab-position="tabPosition" v-model="tabChoosed">
<el-tab-pane v-for="(item, seq) in doctorCheck.checkItemList" :label="dispLabel(item.itemName)" :name="seq + ''"
:key="seq">
<el-input style="width: 100%;" type="textarea" v-model="item.result" placeholder="请输入检查结果"
:autosize="{ minRows: decLineCount, maxRows: decLineCount }" />
<div style="display: flex;justify-content: space-between;">
<el-tab-pane
v-for="(item, seq) in doctorCheck.checkItemList"
:label="dispLabel(item.itemName)"
:name="seq + ''"
:key="seq"
>
<el-input
style="width: 100%"
type="textarea"
v-model="item.result"
placeholder="请输入检查结果"
:autosize="{ minRows: decLineCount, maxRows: decLineCount }"
/>
<div style="display: flex; justify-content: space-between">
<div></div>
<div>
<el-tooltip :content="`给 ${item.itemName} 项目,赋默认结果`" placement="top">
<i class="el-icon-edit" @click="btnDefResult(seq)"
style="font-size: 18px;color: blue;cursor:pointer;margin-right: 10px;"></i>
<el-tooltip
:content="`给 ${item.itemName} 项目,赋默认结果`"
placement="top"
>
<i
class="el-icon-edit"
@click="btnDefResult(seq)"
style="
font-size: 18px;
color: blue;
cursor: pointer;
margin-right: 10px;
"
></i>
</el-tooltip>
<el-tooltip :content="`清除 ${item.itemName} 项目的检查结果`" placement="top">
<i class="el-icon-delete" @click="btnClear(seq)"
style="font-size: 18px;color: red;cursor:pointer;margin-right: 10px;"></i>
<el-tooltip
:content="`清除 ${item.itemName} 项目的检查结果`"
placement="top"
>
<i
class="el-icon-delete"
@click="btnClear(seq)"
style="
font-size: 18px;
color: red;
cursor: pointer;
margin-right: 10px;
"
></i>
</el-tooltip>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
<div style="margin-top: 5px;">
<div style="margin-top: 5px">
<span>检查结论</span>
<div style="display: flex;justify-content: space-between;">
<el-input style="width: 100%;" type="textarea" v-model="summary" placeholder="请输入结论"
:autosize="{ minRows: conLineCount, maxRows: conLineCount }" />
<div style="display: flex; justify-content: space-between">
<el-input
style="width: 100%"
type="textarea"
v-model="summary"
placeholder="请输入结论"
:autosize="{ minRows: conLineCount, maxRows: conLineCount }"
/>
</div>
</div>
<div style="display: flex;justify-content: space-between;margin-top: 10px;">
<div
style="display: flex; justify-content: space-between; margin-top: 10px"
>
<div></div>
<div>
<!--
<el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
-->
<el-tooltip content="清除所有检查项目描述及结论" placement="top">
<el-button type="primary" @click="btnClearAll" class="commonbutton">清除</el-button>
<el-button type="primary" @click="btnClearAll" class="commonbutton"
>清除</el-button
>
</el-tooltip>
<el-tooltip content="所有检查项目赋默认描述及结论" placement="top">
<el-button type="primary" @click="btnDefault" class="commonbutton">默认结果</el-button>
<el-button type="primary" @click="btnDefault" class="commonbutton"
>默认结果</el-button
>
</el-tooltip>
<el-button type="primary" @click="btnOk" class="commonbutton">确定</el-button>
<el-button type="primary" @click="btnOk" class="commonbutton"
>确定</el-button
>
</div>
</div>
</div>
@ -82,24 +142,38 @@
import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
import { arrayReduce, arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { getTreePids, getTreeAllChildIdsById, madeTree } from "../../utlis/tree";
import {
hadoopGet,
hadoopPost,
hadoopPut,
hadoopDel,
} from "../../api/hadoopApi";
import {
arrayReduce,
arrayExistObj,
deepCopy,
reMadeOrgTree,
} from "../../utlis/proFunc";
import {
getTreePids,
getTreeAllChildIdsById,
madeTree,
} from "../../utlis/tree";
export default {
components: {},
props: ["refParams", "refFuncOther"],
data() {
return {
filterText: '',
filterText: "",
description: [], //
conclusion: [], //
descriptionChoosedPre: [], //
descriptionChoosed: [], //
conclusionChoosed: [], //
conclusionAll: [], //
result: '', //
summary: '', //
result: "", //
summary: "", //
pacsTemplateTree: [], // +
treeprops: {
label: "displayName", // label/displayName
@ -124,63 +198,62 @@ export default {
},
decLineCount() {
return this.refParams.from == 'dcm' ? 14 : 16
return this.refParams.from == "dcm" ? 14 : 16;
},
conLineCount() {
return this.refParams.from == 'dcm' ? 7 : 8
}
return this.refParams.from == "dcm" ? 7 : 8;
},
//
created() {
},
//
created() {},
//
mounted() {
//
this.getPacsTemplateTree();
this.init()
this.init();
},
methods: {
//
init() {
this.description = []
this.result = this.refParams.result || ''
this.summary = this.refParams.summary || ''
this.tabChoosed = this.refParams.index + ''
this.tabPosition = this.doctorCheck.checkItemList.length > 5 ? 'left' : 'top'
console.log('init')
this.description = [];
this.result = this.refParams.result || "";
this.summary = this.refParams.summary || "";
this.tabChoosed = this.refParams.index + "";
this.tabPosition =
this.doctorCheck.checkItemList.length > 5 ? "left" : "top";
console.log("init");
},
// tab
dispLabel(itemName) {
return itemName.length > 5 ? (itemName.substring(0, 4) + "…") : itemName
return itemName.length > 5 ? itemName.substring(0, 4) + "…" : itemName;
},
//
handleCheckChange(data, checked, indeterminate) {
// console.log('data, checked, indeterminate,this.menuInfoSet',data, checked, indeterminate,this.menuInfoSet);
this.description = []
this.conclusion = []
postapi('/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: [data.id] })
.then(res => {
this.description = [];
this.conclusion = [];
postapi("/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail", {
bigtextResultTemplateIds: [data.id],
}).then((res) => {
if (res.code > -1) {
this.description = res.data.descriptionDetail
this.conclusion = res.data.conclusionDetail
let opraType = false
this.description = res.data.descriptionDetail;
this.conclusion = res.data.conclusionDetail;
let opraType = false;
if (checked) {
//
opraType = true
opraType = true;
} else if (!indeterminate) {
//
opraType = false
opraType = false;
}
this.chooseDescription(opraType)
this.chooseConclusion(opraType)
this.chooseDescription(opraType);
this.chooseConclusion(opraType);
}
});
},
@ -189,130 +262,159 @@ export default {
filterNode(value, data) {
//console.log(value,data)
if (!value) return true;
return data['displayName'].indexOf(value) > -1 || data['simpleCode'].indexOf(value.toUpperCase()) > -1;
return (
data["displayName"].indexOf(value) > -1 ||
data["simpleCode"].indexOf(value.toUpperCase()) > -1
);
},
// truefalse
chooseDescription(opraType) {
let bfind = false
let result = this.doctorCheck.checkItemList[parseInt(this.tabChoosed)].result
this.description.forEach(e => {
bfind = result.includes(e.description)
let bfind = false;
let result =
this.doctorCheck.checkItemList[parseInt(this.tabChoosed)].result;
this.description.forEach((e) => {
bfind = result.includes(e.description);
if (opraType) {
if (!bfind) {
if (result) {
if(result == this.doctorCheck.checkItemList[parseInt(this.tabChoosed)].defaultResult){
result = e.description
}else{
result += ";" + e.description
if (
result ==
this.doctorCheck.checkItemList[parseInt(this.tabChoosed)]
.defaultResult
) {
result = e.description;
} else {
result += ";" + e.description;
}
} else {
result = e.description
result = e.description;
}
}
} else {
if (bfind) result = result.replaceAll(e.description + ';', '').replaceAll(e.description, '')
if (bfind)
result = result
.replaceAll(e.description + ";", "")
.replaceAll(e.description, "");
}
});
// ;
if (result.substring(result.length - 1) == ';') {
result = result.substring(0, result.length - 1)
if (result.substring(result.length - 1) == ";") {
result = result.substring(0, result.length - 1);
}
this.doctorCheck.checkItemList[parseInt(this.tabChoosed)].result = result
this.doctorCheck.checkItemList[parseInt(this.tabChoosed)].result = result;
},
// truefalse
// truefalse
chooseConclusion(opraType) {
let lfind = 0
let summarys = this.summary.split(';')
this.conclusion.forEach(e => {
lfind = summarys.indexOf(e.conclusion)
let lfind = 0;
let summarys = this.summary.split(";");
this.conclusion.forEach((e) => {
lfind = summarys.indexOf(e.conclusion);
if (opraType) {
if (lfind == -1) summarys.push(e.conclusion)
if (lfind == -1 && e.isAbnormal == "Y") summarys.push(e.conclusion);
} else {
if (lfind > -1) summarys.splice(lfind, 1)
if (lfind > -1) summarys.splice(lfind, 1);
}
});
let summary = ''
summarys.forEach(e => {
let summary = "";
//
summarys.forEach((e) => {
if (!(e.includes("未见异常") || e.includes("未见明显异常"))) {
if (summary) {
summary += ';' + e
summary += ";" + e;
} else {
summary = e
summary = e;
}
}
});
this.summary = summary
this.summary = summary;
},
//pacs
getPacsTemplateTree() {
let resultType = [], resultTemplate = [], treeData = []
postapi('/api/app/BigtextResultType/GetList', {
itemTypeId: this.refParams.row.itemTypeId
let resultType = [],
resultTemplate = [],
treeData = [];
postapi("/api/app/BigtextResultType/GetList", {
itemTypeId: this.refParams.row.itemTypeId,
})
.then(res => {
.then((res) => {
if (res.code > -1) {
resultType = res.data
resultType.forEach(e => {
e.disabled = true
resultType = res.data;
resultType.forEach((e) => {
e.disabled = true;
});
return postapi('/api/app/BigtextResultTemplate/GetList', {})
return postapi("/api/app/BigtextResultTemplate/GetList", {});
}
})
.then(res => {
.then((res) => {
if (res && res.code > -1) {
res.data.forEach(e => {
resultTemplate.push(Object.assign({}, e, { parentId: e.bigtextResultTypeId }))
res.data.forEach((e) => {
resultTemplate.push(
Object.assign({}, e, { parentId: e.bigtextResultTypeId })
);
});
treeData = resultType.concat(resultTemplate)
treeData = resultType.concat(resultTemplate);
// console.log('treeData',treeData,resultType,)
this.pacsTemplateTree = madeTree(treeData, "children", "parentId", "id", null)
this.pacsTemplateTree = madeTree(
treeData,
"children",
"parentId",
"id",
null
);
}
})
});
},
btnTest() {
console.log('this.descriptionChoosed', this.descriptionChoosed)
console.log('this.conclusionChoosed', this.conclusionChoosed)
console.log("this.descriptionChoosed", this.descriptionChoosed);
console.log("this.conclusionChoosed", this.conclusionChoosed);
},
//
btnClearAll() {
this.doctorCheck.checkItemList.forEach(e => {
e.result = ''
this.doctorCheck.checkItemList.forEach((e) => {
e.result = "";
});
this.summary = ''
this.summary = "";
},
//
btnClear(seq) {
this.doctorCheck.checkItemList[seq].result = ''
this.doctorCheck.checkItemList[seq].result = "";
},
//
btnDefResult(seq) {
this.doctorCheck.checkItemList[seq].result = this.doctorCheck.checkItemList[seq].defaultResult
this.doctorCheck.checkItemList[seq].result =
this.doctorCheck.checkItemList[seq].defaultResult;
},
//
btnDefault() {
this.doctorCheck.checkItemList.forEach(e => {
e.result = e.defaultResult
this.doctorCheck.checkItemList.forEach((e) => {
e.result = e.defaultResult;
});
this.summary = '未见异常'
this.summary = "未见异常";
},
//
btnOk() {
this.refFuncOther(this.refParams.row, this.refParams.index, { result: this.result, summary: this.summary })
this.dialogWin.PacsTemplate = false
this.refFuncOther(this.refParams.row, this.refParams.index, {
result: this.result,
summary: this.summary,
});
this.dialogWin.PacsTemplate = false;
},
},
watch: {
"filterText"(newVal, oldVal) {
if (newVal != oldVal) this.$refs['ref_tree'].filter(newVal);
filterText(newVal, oldVal) {
if (newVal != oldVal) this.$refs["ref_tree"].filter(newVal);
},
"refParams.refresh"(newVal, oldVal) {
@ -320,10 +422,9 @@ export default {
},
//
"tabChoosed"(newVal, oldVal) {
tabChoosed(newVal, oldVal) {
if (newVal && newVal != oldVal) this.conclusion = [];
},
},
};
</script>
@ -334,7 +435,7 @@ export default {
@import "../../assets/css/global.css";
@import "../../assets/css/global_tree.css";
:deep .el-tree-node>.el-tree-node__children {
:deep .el-tree-node > .el-tree-node__children {
overflow: visible;
}
</style>

356
src/components/doctorCheck/PacsTemplateBak.vue

@ -1,356 +0,0 @@
<template>
<div style="display: flex;">
<div :style="`width: 258px;height:${mainHeight}px;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:${mainHeight - 40}px;`" :data="pacsTemplateTree"
:props="treeprops" @node-click="handleNode" :filter-node-method="filterNode" :expand-on-click-node="false"
highlight-current 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:${window.pageWidth - 200 - 30}px; margin-left: 5px;`">
<div style="display: flex;">
<div :style="`width: ${window.pageWidth - 200 - 30 - 250}px;`">
<el-table :data="description" border :height="tableHeight" highlight-current-row
@selection-change="selectionChangeDes" size="small" ref="ref_description">
<el-table-column type="selection" width="40" align="center" />
<el-table-column prop="description" label="描述" min-width="400" />
<el-table-column prop="conclusion" label="结论" min-width="150" align="center" />
</el-table>
</div>
<div style="width: 240px;margin-left: 5px;">
<el-table :data="conclusionAll" border :height="tableHeight" highlight-current-row
@selection-change="selectionChangeCon" size="small" ref="ref_conclusion">
<el-table-column type="selection" width="40" align="center" />
<el-table-column prop="conclusion" label="结论" min-width="150" />
</el-table>
</div>
</div>
<div style="margin-top: 5px;">
<span>检查结果</span>
<el-input style="width: 100%;" type="textarea" v-model="result" placeholder="请输入描述"
:autosize="{ minRows: 6, maxRows: 6 }" />
</div>
<div style="margin-top: 5px;">
<span>检查结论</span>
<div style="display: flex;justify-content: space-between;">
<el-input style="width: 100%;" type="textarea" v-model="summary" placeholder="请输入结论"
:autosize="{ minRows: 4, maxRows: 4 }" />
</div>
</div>
<div style="display: flex;justify-content: space-between;margin-top: 10px;">
<div></div>
<div>
<!--
<el-button type="primary" @click="btnTest" class="commonbutton">测试</el-button>
-->
<el-button type="primary" @click="btnClear" class="commonbutton">清除</el-button>
<el-button type="primary" @click="btnDefault" class="commonbutton">默认结果</el-button>
<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 { hadoopGet, hadoopPost, hadoopPut, hadoopDel } from "../../api/hadoopApi"
import { arrayReduce, arrayExistObj, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { getTreePids, getTreeAllChildIdsById, madeTree } from "../../utlis/tree";
export default {
components: {},
props: ["refParams", "refFuncOther"],
data() {
return {
filterText: '',
description: [], //
conclusion: [], //
descriptionChoosedPre: [], //
descriptionChoosed: [], //
conclusionChoosed: [], //
conclusionAll: [], //
result: '', //
summary: '', //
pacsTemplateTree: [], // +
treeprops: {
label: "displayName", // label/displayName
value: "id",
id: "id",
children: "children",
}, //
newQuery: 0, // 0 selectionChangeDes
};
},
//<el-tree :data="$store.state.customerOrg.ref_tree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: {
...mapState(["window", "dialogWin"]),
mainHeight() {
return this.window.pageHeight - 118;
},
tableHeight() {
return this.mainHeight - 120 - 80 - 80;
},
},
//
created() {
},
//
mounted() {
//
this.getPacsTemplateTree();
this.init()
},
methods: {
//
init() {
this.btnClear()
this.description = []
this.result = this.refParams.result || ''
this.summary = this.refParams.summary || ''
},
//
filterNode(value, data) {
//console.log(value,data)
if (!value) return true;
return data['displayName'].indexOf(value) > -1;
},
//pacs
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)
}
})
},
//
handleNode(data, node, prop) {
let ids = getTreeAllChildIdsById(this.pacsTemplateTree, "children", "id", data.id)
ids.unshift(data.id) //
// hadoopPost('pacsApi', '/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: ids })
postapi('/api/app/BigtextResultTemplate/GetBigtextResultTemplateDetail', { bigtextResultTemplateIds: ids })
.then(res => {
if (res.code > -1) {
this.newQuery = 0
this.description = res.data.descriptionDetail
this.conclusion = res.data.conclusionDetail
let lfind = -1
this.description.forEach((e, i) => {
let conclusion = this.conclusion.filter(c => {
return c.bigtextResultTemplateId == e.bigtextResultTemplateId
})
e["conclusion"] = ""
e["conclusionList"] = []
conclusion.forEach(c => {
e["conclusionList"].push(c)
});
if (conclusion.length == 1) e["conclusion"] = conclusion[0].conclusion
//
lfind = arrayExistObj(this.descriptionChoosed, "description", e.description)
if (lfind > -1) {
// console.log('this.descriptionChoosed refresh', deepCopy(this.descriptionChoosed))
this.$nextTick(() => {
this.$refs['ref_description'].toggleRowSelection(this.description[i], true)
})
}
});
}
})
},
//
selectionChangeDes(v) {
this.newQuery++
let lfind = 0
v.forEach(e => {
lfind = arrayExistObj(this.descriptionChoosed, "description", e.description)
if (lfind == -1) {
this.descriptionChoosed.push(e)
}
e.conclusionList.forEach(c => {
lfind = arrayExistObj(this.conclusionAll, "conclusion", c.conclusion)
if (lfind == -1) this.conclusionAll.push(c)
});
//
if (e.conclusion) {
lfind = arrayExistObj(this.conclusionAll, "conclusion", e.conclusion)
// console.log(lfind, e)
if (lfind > -1) {
this.$refs['ref_conclusion'].toggleRowSelection(this.conclusionAll[lfind], true)
}
}
if (this.result) {
if (!this.result.includes(e.description)) this.result += ';' + e.description
} else {
this.result = e.description
}
});
//
if (this.newQuery > 1) {
let unChooseed = arrayReduce(deepCopy(this.description), v, "description=description")
// console.log('this.descriptionChoosedPre,unChooseed', deepCopy(this.descriptionChoosedPre), unChooseed)
unChooseed.forEach(e => {
lfind = arrayExistObj(this.descriptionChoosedPre, "description", e.description)
if (lfind > -1) {
lfind = arrayExistObj(this.descriptionChoosed, "description", e.description)
if (lfind > -1) this.descriptionChoosed.splice(lfind, 1)
if (this.result.includes(e.description)) this.result = this.result.replaceAll(e.description + ";", "").replaceAll(e.description, "")
if (e.conclusion) {
lfind = arrayExistObj(this.conclusionAll, "conclusion", e.conclusion)
if (lfind > -1) this.$refs['ref_conclusion'].toggleRowSelection(this.conclusionAll[lfind], false)
}
}
});
}
this.descriptionChoosedPre = deepCopy(v)
if (this.result) {
if (this.result.substring(this.result.length - 1, this.result.length) == ";") this.result = this.result.substring(0, this.result.length - 1)
}
},
// ()
selectionChangeCon(v) {
let summarys = []
v.forEach(e => {
if (this.summary) {
summarys = this.summary.split(";")
if (summarys.indexOf(e.conclusion) == -1) this.summary += ';' + e.conclusion
} else {
this.summary = e.conclusion
}
});
// if(this.summary && this.summary.substring())
//
let lfind = -1
let unChooseed = arrayReduce(deepCopy(this.conclusionAll), v, "conclusion=conclusion")
unChooseed.forEach(e => {
if (this.summary) {
summarys = this.summary.split(";")
lfind = summarys.indexOf(e.conclusion)
if (lfind > -1) summarys.splice(lfind, 1)
this.summary = ''
summarys.forEach((c, i) => {
if (i == 0) {
this.summary = c
} else {
this.summary += ";" + c
}
});
}
});
},
btnTest() {
console.log('this.descriptionChoosed', this.descriptionChoosed)
console.log('this.conclusionChoosed', this.conclusionChoosed)
},
//
btnClear() {
this.result = ''
this.summary = ''
this.descriptionChoosed = []
this.$refs['ref_description'].clearSelection();
this.conclusionChoosed = []
this.conclusionAll = []
this.$refs['ref_conclusion'].clearSelection();
},
//
btnDefault() {
this.btnClear()
this.result = this.refParams.row.defaultResult
this.summary = '未见异常'
},
//
btnOk() {
this.refFuncOther(this.refParams.row, this.refParams.index, { result: this.result, summary: this.summary })
this.dialogWin.PacsTemplate = false
},
},
watch: {
"filterText"(newVal, oldVal) {
if (newVal != oldVal) this.$refs['ref_tree'].filter(newVal);
},
"refParams.row.itemId"(newVal, oldVal) {
if (newVal != oldVal) this.init();
},
"refParams.result"(newVal, oldVal) {
if (newVal != oldVal){
console.log("refParams.result",newVal, oldVal)
this.result = newVal
}
},
"refParams.summary"(newVal, oldVal) {
if (newVal != oldVal){
console.log("refParams.summary",newVal, oldVal)
this.summary = 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>
Loading…
Cancel
Save