生成数据

This commit is contained in:
shidongli 2024-05-17 17:52:19 +08:00
parent 7db1c27b74
commit b94e98fb83
2 changed files with 771 additions and 0 deletions

View File

@ -0,0 +1,750 @@
<template>
<div class="app-container">
<!-- <el-descriptions title="编辑主路径" /> -->
<!-- <div class="title">
<el-tag>主路径</el-tag>
<div>
{{ updata.routeName }}
</div>
<div class="select">
<span>
适用范围
</span>
<el-select v-model="updata.suitRange">
<el-option label="在院" value="IN_THE_HOSPITAL" />
<el-option label="出院" value="DISCHARGE" />
<el-option label="门诊" value="OUTPATIENT_SERVICE" />
<el-option label="门诊+出院" value="OUTPATIENT_SERVICE_DISCHARGE" />
</el-select>
</div>
</div> -->
<div class="list">
<div class="timelist">
<div class="timetitle">
张三管理路径节点({{ lists.length }})
<!-- <i class="el-icon-circle-plus-outline" @click="addlist"></i> -->
</div>
<el-timeline>
<el-timeline-item
v-for="(item, index) in lists"
:key="index"
:color="listindex == index ? '#409EFF' : ''"
>
<div class="top">
<div class="toptop">
<el-select v-model="item.routeNodeName" style="width: 87px">
<el-option label="出院后" value="AFTER_DISCHARGE" />
<el-option label="入院后" value="AFTER_ADMISSION" />
<el-option label="就诊后" value="AFTER_CONSULTATION" />
<el-option
label="就诊/出院后"
value="AFTER_VISIT_DISCHARGE"
/>
<el-option label="术前" value="PREOPERATIVE" />
<el-option label="术后" value="POSTOPERATIVE" />
</el-select>
<el-input
v-model="item.routeNodeDay"
style="width: 70px"
type="number"
></el-input>
<span></span>
</div>
<div>
</div>
</div>
<el-card
v-for="(uitem, uindex) in item.list"
:key="uitem.id"
@click.native="bottomclickevent(uitem, index, uindex)"
:class="listindex == index && itemindex == uindex ? 'cards' : ''"
>
<h3 style="height: 20px">{{ uitem.taskTypeName }}</h3>
<el-tag
v-if="uitem.routeCheckStatus == 'AGREE'"
class="routeCheckStatus"
>已审核</el-tag
>
<el-tag
v-else-if="uitem.routeCheckStatus == 'DISAGREE'"
type="danger"
class="routeCheckStatus"
>不同意</el-tag
>
<el-tag v-else type="warning" class="routeCheckStatus"
>未审核</el-tag
>
<p style="height: 16px">{{ uitem.taskSubdivisionName }}</p>
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div class="texts">
<div class="topform">
<div v-for="(aitem, aindex) in form.formItems" :key="aitem.id">
<el-card class="box-card">
<el-form ref="form" :inline="true" :model="form" class="form">
<el-form-item
v-for="(item, index) in aitem"
:label="item.label"
:key="index"
>
<el-input
v-model="item.value"
style="width: 500px"
></el-input>
</el-form-item>
</el-form>
</el-card>
<div class="icon">
<i
class="el-icon-delete"
@click="delitem(aindex, aitem)"
v-if="aindex != 0"
></i>
<i
v-if="aindex == 0"
class="el-icon-circle-plus-outline"
@click="additem(aitem)"
></i>
</div>
</div>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="TemporaryStorage" type="primary"> </el-button>
<el-button
type="primary"
@click="dialogVisible = true"
v-if="form.specialDiseaseNodeId"
>审核完成 {{ agreeNumber ? agreeNumber : "0" }} /
{{ totalNumber ? totalNumber : "0" }}</el-button
>
</div>
<el-dialog
title="提交审核完成"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<el-form
ref="routeform"
:model="routeform"
label-width="120px"
:rules="rules"
>
<el-form-item label="节点审核状态" prop="routeCheckStatus">
<el-radio v-model="routeform.routeCheckStatus" label="AGREE"
>同意</el-radio
>
<el-radio v-model="routeform.routeCheckStatus" label="DISAGREE"
>不同意</el-radio
>
</el-form-item>
<el-form-item label="节点审核备注">
<el-input
type="textarea"
:rows="2"
placeholder="请输入节点审核备注"
v-model="routeform.routeCheckRemark"
>
</el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="auditing"> </el-button>
<el-button @click="handleClose"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
selectTaskTypeList, taskPartitionList, taskStatusDictList, specialDiseaseNode, selectSpecialDisease, updateRouteCheckStatus
} from '@/api/system/specialDiseaseNode'
export default {
name: "Datadetails",
data() {
return {
dialogVisible: false,
routeform: {
routeCheckStatus: null,
routeCheckRemark: "",
},
rules: {
routeCheckStatus: [
{ required: true, message: '请选择节点审核状态', trigger: 'change' }
],
},
totalNumber: 0,
agreeNumber: 0,
updata: {
specialDiseaseRouteId: '',
suitRange: '',
routeName: '',
specialDiseaseNodeList: [],
},
form: {
// formdata: {
formItems: [
[{ label: '姓名', value: '' },
{ label: '年龄', value: '' },
{ label: '邮箱', value: '' },]
],
// },
// nodeContent: '<p></p>',
// templateId: '',
// templateName: '',
// taskType: '',
// taskSubdivision: '',
// taskSubdivisionName: '',
// taskStatus: '',
// secondClassifyDescribe: '',
// executionTime: '',
// appletPushSign: '0',
// officialPushSign: '0',
// messagePushSign: '0',
// taskSubdivisiontemplateType: '',
// officialRemindContent: '',
// messagePreview: '',
// appletRemindContent: '',
// appletPromptDescription: '',
},
itemindex: 0,
listindex: 0,
lists: [],
value: '',
input: '',
//
selectTaskTypeList: [],
//
taskStatusDictList: [],
//
taskPartitionList: [],
};
},
created() {
this.taskinfo();
console.log(this.form, '99999')
},
beforeDestroy() { },
watch: {},
mounted() {
},
methods: {
info() {
const loading = this.$loading({
lock: true,
text: '数据加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.lists = []
if (this.$route.query) {
this.updata.suitRange = this.$route.query.suitRange
this.updata.routeName = this.$route.query.routeName
this.updata.specialDiseaseRouteId = this.$route.query.id
selectSpecialDisease(27).then(res => {
loading.close();
this.agreeNumber = res.data.agreeNumber
this.totalNumber = res.data.totalNumber
res.data.specialDiseaseNodeList.forEach(e => {
e.messagePushSign = '' + e.messagePushSign
e.officialPushSign = '' + e.officialPushSign
e.appletPushSign = '' + e.appletPushSign
})
this.lists = this.handleData(res.data.specialDiseaseNodeList, 'routeNodeDay', 'routeNodeName')
// this.form = this.lists[0].list[0]
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision)
}
})
} else {
loading.close();
this.lists.push({
routeNodeName: "",
routeNodeDay: '',
list: [
{
nodeContent: '<p></p>',
templateId: '',
templateName: '',
taskType: '',
taskSubdivision: '',
taskSubdivisionName: '',
taskStatus: '',
secondClassifyDescribe: '',
executionTime: '',
appletPushSign: '0',
officialPushSign: '0',
messagePushSign: '0',
messagePreview: '',
officialRemindContent: '',
taskSubdivisiontemplateType: '',
appletRemindContent: '',
appletPromptDescription: '',
},
],
})
this.form = this.lists[0].list[0]
}
},
handleData(list, key, keytwo) {
//
let keysArr = list.map(item => {
return {
routeNodeDay: item[key],
routeNodeName: item[keytwo],
}
})
let array = keysArr.filter((item, index, arr) =>
index === arr.findIndex(ite => (ite.routeNodeDay == item.routeNodeDay && ite.routeNodeName == item.routeNodeName))
)
// for (var i = 0; i < keysArr.length; i++) {
// for (var j = i + 1; j < keysArr.length; j++) {
// if (keysArr[i].routeNodeDay == keysArr[j].routeNodeDay && keysArr[i].routeNodeName == keysArr[j].routeNodeName) {
// keysArr.splice(j, 1);
// j--;
// }
// }
// }
let keys = [...new Set(array)]
let newList = keys.map(item => {
return {
//
routeNodeDay: item[key],
routeNodeName: item[keytwo],
list: list.filter(i => i[key] == item[key] && i[keytwo] == item[keytwo])
}
})
return newList;
},
//
TemporaryStorage() {
this.$refs.wangeditor.emit()
this.$confirm('确认暂存时将过滤掉部分内容未填写完成的子节点,是否确认暂存?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
}).then(() => {
const loading = this.$loading({
lock: true,
text: '暂存中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.updata.specialDiseaseNodeList = []
this.lists.forEach(e => {
e.list.length > 0 ? e.list.forEach(el => {
el.routeNodeDay = e.routeNodeDay
el.routeNodeName = e.routeNodeName
this.updata.specialDiseaseNodeList.push(el)
}) : ""
})
this.updata.specialDiseaseNodeList = this.updata.specialDiseaseNodeList.filter(e => e.routeNodeDay && e.routeNodeName && e.taskType && e.taskSubdivision && e.taskStatus)
specialDiseaseNode(this.updata).then(res => {
this.info();
loading.close();
this.$modal.msgSuccess("暂存成功!");
})
setTimeout(() => {
loading.close();
}, 3000);
})
},
bottomclickevent(uitem, index, uindex) {
this.$refs.wangeditor.emit()
this.form = uitem
this.taskPartitionList = []
if (this.form.taskType) {
this.changeTaskType(this.form.taskType, this.form.taskSubdivision)
}
this.listindex = index
this.itemindex = uindex
},
handleStep() {
this.active = 2
},
//
taskinfo() {
selectTaskTypeList().then(res => {
this.selectTaskTypeList = res.data
this.info();
})
},
//
changeTaskType(code, taskSubdivision) {
let id = this.selectTaskTypeList?.find(e => e.taskTypeCode == code)?.id
this.form.taskTypeName = this.selectTaskTypeList?.find(e => e.taskTypeCode == code)?.taskTypeName
taskPartitionList(id).then(res => {
this.taskPartitionList = res.data
this.form.taskSubdivision = ''
this.form.taskSubdivisionName = ''
this.form.taskSubdivisiontemplateType = ''
this.taskStatusDictList = []
if (taskSubdivision) {
this.form.taskSubdivision = taskSubdivision
this.changetaskSubdivision(taskSubdivision, 1)
}
})
},
//
changetaskSubdivision(code, type) {
this.form.taskSubdivisionName = this.taskPartitionList?.find(e => e.taskPartitionCode == code)?.taskPartitionName
let id = this.taskPartitionList?.find(e => e.taskPartitionCode == code)?.id
taskStatusDictList(id).then(res => {
this.taskStatusDictList = res.data
})
this.taskPartitionList.forEach(el => {
if (code == el.taskPartitionCode) {
this.form.executionTime = el.executionTime
this.form.taskSubdivisiontemplateType = el.templateType
if (!type) {
this.form.templateId = ''
this.form.templateName = ''
}
}
})
},
addlist() {
this.lists.push({
routeNodeName: "",
routeNodeDay: '',
list: [
{
nodeContent: '<p></p>',
templateId: '',
templateName: '',
taskType: '',
officialRemindContent: '',
taskSubdivision: '',
taskSubdivisionName: '',
appletRemindContent: '',
appletPromptDescription: '',
taskStatus: '',
secondClassifyDescribe: '',
executionTime: '',
appletPushSign: '0',
officialPushSign: '0',
messagePushSign: '0',
messagePreview: '',
taskSubdivisiontemplateType: '',
},
]
})
},
additem(aitem) {
console.log(this.form, "this.form")
this.form.formItems.push([
{ label: '姓名', value: '' },
{ label: '年龄', value: '' },
{ label: '邮箱', value: '' },
]
)
},
delitem(aindex,aitem) {
console.log(aitem, aindex)
this.form.formItems.splice(aindex, 1)
// item.list.splice(this.itemindex, 1)
// if (item.list.length == 0) {
// this.lists.splice(index, 1)
// }
},
//
handleClose() {
this.dialogVisible = false
this.routeform = {
routeCheckStatus: '',
routeCheckRemark: "",
}
this.resetForm("routeform");
},
//
auditing() {
this.$refs["routeform"].validate(valid => {
if (valid) {
const loading = this.$loading({
lock: true,
text: '审核中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
if (!this.form.routeNodeDay) {
this.$message.error('请输入节点时间段天数');
return loading.close();
}
if (!this.form.routeNodeName) {
this.$message.error('请选择节点时间段');
return loading.close();
}
if (!this.form.taskType) {
this.$message.error('请选择任务类型');
return loading.close();
}
if (!this.form.taskSubdivision) {
this.$message.error('请选择任务细分');
return loading.close();
}
if (!this.form.taskStatus) {
this.$message.error('请选择任务状态');
return loading.close();
}
updateRouteCheckStatus({
routeCheckStatus: this.routeform.routeCheckStatus,
id: this.form.specialDiseaseNodeId,
routeCheckRemark: this.routeform.routeCheckRemark,
routeCheckPerson: JSON.parse(localStorage.getItem('user')).nickName
}).then(res => {
loading.close();
if (res.data == 1) {
this.info();
this.handleClose()
this.$modal.msgSuccess("审核成功!");
}
})
}
})
},
}
};
</script>
<style scoped lang="scss">
::v-deep .el-card__body {
position: relative;
}
.routeCheckStatus {
position: absolute;
right: 10px;
top: 30px;
}
.dialog-footer {
padding: 0 20px 0;
text-align: right;
}
.bottomform {
background-color: #f2f4f5;
margin-top: 10px;
.card {
background-color: #fff;
width: 100%;
height: 200px;
margin: 20px 0 0;
padding: 20px 50px 0px 20px;
.flextwo {
display: flex;
align-items: center;
margin-top: 20px;
.text {
font-size: 13px;
color: #64666a;
}
::v-deep .el-input__inner {
color: black !important;
background-color: #fff !important;
cursor: default !important;
}
.textarea {
width: 90%;
padding: 0 10px;
height: 50px;
line-height: 50px;
// border: 1px solid #DCDFE6;
border-radius: 5px;
display: flex;
align-items: center;
::v-deep .el-input {
padding: 0 10px;
width: 50%;
color: black;
font-size: 13px;
height: 40px;
line-height: 40px;
}
::v-deep .el-input__inner {
color: black;
font-size: 13px;
}
}
}
.flex {
display: flex;
align-items: center;
justify-content: space-between;
.pushMethod {
height: 30px;
line-height: 30px;
font-size: 13px;
color: #64666a;
::v-deep .el-input__inner {
color: black;
font-size: 13px;
}
span {
color: black;
font-size: 13px;
}
}
}
}
}
.topform {
position: relative;
padding: 15px 70px 30px 15px;
// padding: 15px 0 0 15px;
::v-deep .el-card {
width: 85%;
// position: absolute;
margin-left: 20px;
// margin-top: 20px !important;
}
.icon {
top: -230px;
left: 91%;
margin-top: 28px;
position: relative;
.el-icon-circle-plus-outline {
// margin-left: 20px;
}
}
.form {
::v-deep .el-input__inner {
height: 30px !important;
line-height: 30px !important;
}
::v-deep .el-form-item__label {
font-size: 12px !important;
}
}
}
.title {
display: flex;
align-items: center;
div {
display: flex;
padding-left: 10px;
font-weight: 600;
align-items: center;
}
.select {
font-weight: 550;
margin-left: 20%;
font-size: 12px;
.el-input {
width: 200px;
height: 30px !important;
line-height: 30px !important;
}
}
}
.list {
margin: 20px auto;
width: 100%;
height: 100vh;
background-color: #f2f4f5;
display: flex;
padding-top: 15px;
justify-content: space-evenly;
::v-deep .el-card {
margin-top: 20px !important;
}
.timelist {
width: 25%;
background-color: #fff;
padding: 0 20px 20px;
// height: 680px;
// height: calc(100vh - 294px);
overflow: scroll;
.timetitle {
height: 60px;
display: flex;
align-items: center;
justify-content: space-between;
}
::v-deep .el-timeline {
width: 100%;
padding: 15px 0 0 !important;
}
}
.texts {
width: 72%;
// height: 680px;
// height: calc(100vh - 294px);
overflow: scroll;
background-color: #fff;
}
}
.cards {
border: 1px solid #409eff;
border-left: 5px solid #409eff;
}
.top {
display: flex;
justify-content: space-between;
align-items: center;
.toptop {
display: flex;
align-items: center;
}
span {
padding: 0 4px;
}
i {
font-size: 17px;
}
i:nth-child(2) {
padding-left: 12px;
}
}
::v-deep .el-timeline-item__timestamp {
margin: 0 !important;
padding: 0 !important;
}
::v-deep .el-timeline-item__wrapper {
padding-left: 14px !important;
}
::v-deep .el-timeline-item__content {
transform: translateY(-2%);
}
</style>

View File

@ -207,6 +207,7 @@
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleAuthRole(scope.row)"
v-if="queryParams.serviceStatus == 'SERVICE_CENTER' || queryParams.serviceStatus == 'SERVICE_END'">详情</el-button>
<el-button size="mini" type="text" @click="handledata(scope.row)">生成数据</el-button>
<el-button size="mini" type="text" @click="handleDelete(scope.row)"
v-if="queryParams.serviceStatus == 'SERVICE_CENTER'">取消签约</el-button>
<el-button size="mini" type="text" @click="handleContinue(scope.row)"
@ -673,6 +674,26 @@ export default {
},
});
},
//
handledata(row){
this.$router.push({
path: "/patient/Datadetails",
query: {
patientId: row.patientId,
cardNo: row.cardNo,
patientName: row.patientName,
patientPhone: row.patientPhone,
sex: row.sex,
birthDate: row.birthDate,
familyMemberPhone: row.familyMemberPhone,
address: row.address,
patientSource: row.patientSource,
createTime: row.createTime,
age: row.birthDate ? getAge(row.birthDate) : '',
},
});
},
// 2017-9-19 18:04:33
formatDate(value) {
if (!value) {