postdischarge-ui/src/views/manage/Datadetails/index.vue

1252 lines
33 KiB
Vue
Raw Normal View History

2024-05-17 17:52:19 +08:00
<template>
<div class="app-container">
<div class="list">
<div class="timelist">
<div class="timetitle">
2024-05-23 10:29:59 +08:00
{{ this.$route.query.patientName }}管理路径节点
2024-05-17 17:52:19 +08:00
</div>
<el-timeline>
<el-timeline-item
2024-05-23 10:29:59 +08:00
v-for="(uitem, uindex) in getAllNodeByPatientlist"
:key="uindex"
:color="listindex == uindex ? '#409EFF' : ''"
2024-05-17 17:52:19 +08:00
>
<div class="top">
<div class="toptop">
2024-05-23 15:48:57 +08:00
<el-select v-model="uitem.routeNodeName" style="width: 87px" disabled>
2024-05-17 17:52:19 +08:00
<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
2024-05-23 15:48:57 +08:00
disabled
2024-05-23 10:29:59 +08:00
v-model="uitem.routeNodeDay"
2024-05-17 17:52:19 +08:00
style="width: 70px"
type="number"
></el-input>
<span></span>
</div>
2024-05-23 10:29:59 +08:00
<div></div>
2024-05-17 17:52:19 +08:00
</div>
<el-card
2024-05-23 15:48:57 +08:00
v-for="(ulitem, ulindex) in uitem.list"
:key="ulindex"
@click.native="bottomclickevent(ulitem, uindex ,ulindex)"
:class="listindex == uindex && itemindex == ulindex ? 'cards' : ''"
2024-05-17 17:52:19 +08:00
>
2024-05-23 15:48:57 +08:00
<h3 style="height: 20px">{{ ulitem.taskTypeName }}</h3>
2024-05-17 17:52:19 +08:00
<el-tag
2024-05-23 15:48:57 +08:00
v-if="ulitem.routeCheckStatus == 'AGREE'"
2024-05-17 17:52:19 +08:00
class="routeCheckStatus"
>已审核</el-tag
>
<el-tag
2024-05-23 15:48:57 +08:00
v-else-if="ulitem.routeCheckStatus == 'DISAGREE'"
2024-05-17 17:52:19 +08:00
type="danger"
class="routeCheckStatus"
>不同意</el-tag
>
<el-tag v-else type="warning" class="routeCheckStatus"
>未审核</el-tag
>
2024-05-23 15:48:57 +08:00
<p style="height: 16px">{{ ulitem.taskPartitionDictName }}</p>
2024-05-17 17:52:19 +08:00
</el-card>
</el-timeline-item>
</el-timeline>
</div>
<div class="texts">
<div class="topform">
2024-05-23 10:29:59 +08:00
<div
v-for="(item, index) in getParamslistData"
:key="index"
style="display: flex"
>
2024-05-17 17:52:19 +08:00
<el-card class="box-card">
2024-05-23 10:29:59 +08:00
<el-form
ref="form"
:inline="true"
:model="form"
class="form"
label-width="100px"
v-for="(ite, ind) in item"
:key="ind"
2024-05-23 15:48:57 +08:00
:rules="rules"
2024-05-23 10:29:59 +08:00
>
<el-form-item :label="ite.paramName" :key="ind">
2024-05-17 17:52:19 +08:00
<el-input
2024-05-23 10:29:59 +08:00
v-model="ite.paramValue"
2024-05-17 17:52:19 +08:00
style="width: 500px"
></el-input>
</el-form-item>
</el-form>
</el-card>
<div class="icon">
<i
class="el-icon-delete"
2024-05-23 10:29:59 +08:00
@click="delitem(index)"
v-if="index != 0"
2024-05-17 17:52:19 +08:00
></i>
<i
2024-05-23 10:29:59 +08:00
v-if="index == 0"
2024-05-17 17:52:19 +08:00
class="el-icon-circle-plus-outline"
2024-05-23 10:29:59 +08:00
@click="additem(index)"
2024-05-17 17:52:19 +08:00
></i>
2024-05-23 10:29:59 +08:00
<el-button
v-if="
taskPartitionCode == 'TPC202405200003' ||
taskPartitionCode == 'TPC202405200004' ||
taskPartitionCode == 'TPC202405200005' ||
taskPartitionCode == 'TPC202405200006'
"
round
style="margin-left: 10px"
@click="knowledge(index, item)"
>知识库获取</el-button
>
2024-05-17 17:52:19 +08:00
</div>
</div>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
2024-05-23 10:29:59 +08:00
<el-button @click="TemporaryStorage" type="primary"> </el-button>
2024-05-17 17:52:19 +08:00
</div>
2024-05-23 10:29:59 +08:00
<!-- 药品名称弹框 -->
2024-05-17 17:52:19 +08:00
<el-dialog
2024-05-23 10:29:59 +08:00
title=""
:visible.sync="Drugshow"
width="1200px"
append-to-body
:before-close="innerVisiblecancel"
2024-05-17 17:52:19 +08:00
>
<el-form
2024-05-23 10:29:59 +08:00
ref="queryForm"
:model="informationqueryParams"
2024-05-17 17:52:19 +08:00
:rules="rules"
2024-05-23 10:29:59 +08:00
label-width="80px"
:inline="true"
2024-05-17 17:52:19 +08:00
>
2024-05-23 10:29:59 +08:00
<el-form-item label="药品名称" prop="drugName" label-width="120">
<el-input
v-model="informationqueryParams.drugName"
placeholder="请输入药品名称"
clearable
/>
</el-form-item>
<el-form-item label="适用症" prop="purpose">
<el-input
v-model="informationqueryParams.purpose"
placeholder="请输入适用症"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="informationInfoinfo"
>搜索</el-button
2024-05-17 17:52:19 +08:00
>
2024-05-23 10:29:59 +08:00
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
2024-05-17 17:52:19 +08:00
>
</el-form-item>
2024-05-23 10:29:59 +08:00
</el-form>
<el-table
:data="baseDrugList"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.id"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
label="药品名称"
align="center"
prop="drugName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="适用症"
align="center"
prop="purpose"
:show-overflow-tooltip="true"
/>
<el-table-column
label="给药途径"
align="center"
prop="applyWay"
:show-overflow-tooltip="true"
/>
<el-table-column
label="用药频次"
align="center"
prop="applyFrequency"
:show-overflow-tooltip="true"
/>
<el-table-column
label="服药说明"
align="center"
prop="applyRemark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="用法用量(服法剂量)"
align="center"
prop="dosage"
:show-overflow-tooltip="true"
/>
<el-table-column
label="副作用(不良反应)"
align="center"
prop="sideEffects"
:show-overflow-tooltip="true"
/>
<el-table-column
label="禁忌症"
align="center"
prop="contraindications"
:show-overflow-tooltip="true"
/>
<el-table-column
label="存储条件"
align="center"
prop="storage"
:show-overflow-tooltip="true"
/>
<el-table-column
label="漏服或过服的处理方法"
align="center"
prop="emergency"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="baseDrugtotal > 0"
:total="baseDrugtotal"
:page.sync="informationqueryParams.pageNum"
:limit.sync="informationqueryParams.pageSize"
@pagination="informationInfoinfo"
/>
</el-dialog>
<!-- 运动弹框 -->
<el-dialog
title=""
:visible.sync="Sportshow"
width="1200px"
append-to-body
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="SporParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="运动名称" prop="sportName">
<el-input
v-model="SporParams.sportName"
placeholder="请输入运动名称"
clearable
/>
</el-form-item>
<el-form-item label="运动方式" prop="sportWay">
2024-05-17 17:52:19 +08:00
<el-input
2024-05-23 10:29:59 +08:00
v-model="SporParams.sportWay"
placeholder="请输入运动方式"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="spotgetList"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
2024-05-17 17:52:19 +08:00
>
</el-form-item>
</el-form>
2024-05-23 10:29:59 +08:00
<el-table
:data="baseSportList"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.id"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
label="运动名称"
align="center"
prop="sportName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="运动类型名称"
align="center"
prop="sportTypeName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="运动方式"
align="center"
prop="sportWay"
:show-overflow-tooltip="true"
/>
<el-table-column
label="运动频率"
align="center"
prop="sportFrequency"
:show-overflow-tooltip="true"
/>
<el-table-column
label="每次运动时长"
align="center"
prop="sportDuration"
:show-overflow-tooltip="true"
/>
<el-table-column label="运动时间" align="center" prop="sportTime" />
<el-table-column
label="运动强度"
align="center"
prop="sportIntensity"
:show-overflow-tooltip="true"
/>
<el-table-column
label="运动注意事项"
align="center"
prop="sportAttention"
:show-overflow-tooltip="true"
/>
<el-table-column
label="动作说明"
align="center"
prop="sportRemark"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="Sporttotal > 0"
:total="Sporttotal"
:page.sync="SporParams.pageNum"
:limit.sync="SporParams.pageSize"
@pagination="spotgetList"
/>
</el-dialog>
<!-- 饮食弹框 -->
<el-dialog
title=""
:visible.sync="Dieshow"
width="1200px"
append-to-body
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="SporParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="饮食建议名称" prop="dietName">
<el-input
v-model="SporParams.dietName"
placeholder="请输入饮食建议名称"
clearable
/>
</el-form-item>
<el-form-item label="饮食原则" prop="dietPrinciple">
<el-input
v-model="SporParams.dietPrinciple"
placeholder="请输入饮食原则"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="DiegetList"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
:data="baseDietList"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.id"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
2024-05-23 15:48:57 +08:00
<el-table-column
label="饮食建议名称"
align="center"
prop="dietName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="饮食原则"
align="center"
prop="dietPrinciple"
:show-overflow-tooltip="true"
/>
<el-table-column
label="主食推荐"
align="center"
prop="mainFood"
:show-overflow-tooltip="true"
/>
<el-table-column
label="蔬菜推荐"
align="center"
prop="vegetable"
:show-overflow-tooltip="true"
/>
<el-table-column
label="水果推荐"
align="center"
prop="fruit"
:show-overflow-tooltip="true"
/>
<el-table-column
label="肉类推荐"
align="center"
prop="meat"
:show-overflow-tooltip="true"
/>
<el-table-column
label="饮食说明"
align="center"
prop="dietRemark"
:show-overflow-tooltip="true"
/>
2024-05-23 10:29:59 +08:00
</el-table>
<pagination
v-show="Dietotal > 0"
:total="Dietotal"
:page.sync="DieParams.pageNum"
:limit.sync="DieParams.pageSize"
@pagination="DiegetList"
/>
</el-dialog>
<!-- 护理弹框 -->
<el-dialog
title=""
:visible.sync="Nursingshow"
width="1200px"
append-to-body
:before-close="innerVisiblecancel"
>
<el-form
ref="queryForm"
:model="NursingParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="护理知识名称" prop="nursingName">
<el-input
v-model="NursingParams.nursingName"
placeholder="请输入护理知识名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="NursinggetList"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="addresetQuerylist"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
:data="baseNursingList"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="form.departmentId == scope.row.id"
circle
@click="nurseclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclick(scope.row)"
></el-button>
</template>
</el-table-column>
2024-05-23 15:48:57 +08:00
<el-table-column
label="护理知识名称"
align="center"
prop="nursingName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="烟酒指导"
align="center"
prop="tobaccoWine"
:show-overflow-tooltip="true"
/>
<el-table-column
label="睡眠指导"
align="center"
prop="sleep"
:show-overflow-tooltip="true"
/>
<el-table-column
label="情绪指导"
align="center"
prop="emotion"
:show-overflow-tooltip="true"
/>
<el-table-column
label="居家安全指导"
align="center"
prop="homeSafeguard"
:show-overflow-tooltip="true"
/>
2024-05-23 10:29:59 +08:00
</el-table>
<pagination
v-show="Nursingtotal > 0"
:total="Nursingtotal"
:page.sync="NursingParams.pageNum"
:limit.sync="NursingParams.pageSize"
@pagination="NursinggetList"
/>
2024-05-17 17:52:19 +08:00
</el-dialog>
</div>
</template>
<script>
import {
2024-05-23 15:48:57 +08:00
selectTaskTypeList, taskPartitionList, taskStatusDictList,
2024-05-17 17:52:19 +08:00
} from '@/api/system/specialDiseaseNode'
2024-05-23 15:48:57 +08:00
import { getAllNodeByPatient, getParams, inserList } from '@/api/manage/Datadetails'
2024-05-23 10:29:59 +08:00
import { listBaseDrug } from "@/api/system/baseDrug";
import { listBaseSport } from "@/api/system/baseSport";
import { listBaseDiet } from "@/api/system/baseDiet";
import { listBaseNursing } from "@/api/system/baseNursing";
2024-05-17 17:52:19 +08:00
export default {
name: "Datadetails",
data() {
return {
2024-05-23 10:29:59 +08:00
// 药品
baseDrugList: [],
loading: true,
baseDrugtotal: 0,
Drugshow: false,
informationqueryParams: {
pageNum: 1,
pageSize: 10,
drugName: null,
},
//运动
baseSportList: [],
Sporttotal: 0,
Sportshow: false,
SporParams: {
pageNum: 1,
pageSize: 10,
sportName: null,
sportWay: null,
},
// 饮食
baseDietList: [],
Dietotal: 0,
Dieshow: false,
DieParams: {
pageNum: 1,
pageSize: 10,
dietName: null,
dietPrinciple: null,
},
// 护理
baseNursingList: [],
Nursingtotal: 0,
Nursingshow: false,
NursingParams: {
pageNum: 1,
pageSize: 10,
nursingName: null,
},
2024-05-23 15:48:57 +08:00
itemdata: {},
2024-05-23 10:29:59 +08:00
// infolist: [],
taskPartitionCode: "",
// 左侧列表
getAllNodeByPatientlist: [],
// 右侧列表
getParamslistData: [],
qurelist: {
patientId: '',
},
querytParams: {
id: '',
patientId: this.$route.query.patientId,
2024-05-17 17:52:19 +08:00
},
rules: {
routeCheckStatus: [
{ required: true, message: '请选择节点审核状态', trigger: 'change' }
],
},
totalNumber: 0,
agreeNumber: 0,
updata: {
specialDiseaseRouteId: '',
suitRange: '',
routeName: '',
specialDiseaseNodeList: [],
},
2024-05-23 10:29:59 +08:00
form: {},
2024-05-17 17:52:19 +08:00
itemindex: 0,
2024-05-23 10:29:59 +08:00
listindex: null,
2024-05-17 17:52:19 +08:00
lists: [],
value: '',
input: '',
//任务类型
selectTaskTypeList: [],
//任务状态
taskStatusDictList: [],
//任务细分
taskPartitionList: [],
2024-05-23 15:48:57 +08:00
moban: [],
2024-05-17 17:52:19 +08:00
};
},
created() {
2024-05-23 10:29:59 +08:00
console.log(this.$route.query, 'this.$route.query')
this.qurelist.patientId = this.$route.query.patientId
this.getAllNodeBy()
2024-05-17 17:52:19 +08:00
console.log(this.form, '99999')
},
beforeDestroy() { },
watch: {},
mounted() {
},
methods: {
2024-05-23 10:29:59 +08:00
// 左侧
getAllNodeBy() {
2024-05-17 17:52:19 +08:00
const loading = this.$loading({
lock: true,
text: '数据加载中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
2024-05-23 15:48:57 +08:00
this.getAllNodeByPatientlist = []
if (this.$route.query) {
getAllNodeByPatient(this.qurelist).then(res => {
// this.getAllNodeByPatientlist = res.data
loading.close();
this.getAllNodeByPatientlist = this.handleData(res.data, 'routeNodeDay', 'routeNodeName')
console.log(this.getAllNodeByPatientlist, 'this.getAllNodeByPatientlist')
})
} else {
2024-05-17 17:52:19 +08:00
loading.close();
2024-05-23 15:48:57 +08:00
this.getAllNodeByPatientlist.push({
routeNodeName: "",
routeNodeDay: "",
list: [
{
routeCheckStatus: "AGREE",
routeId: '',
routeName: "",
routeNodeDay: "",
routeNodeId: "",
routeNodeName: "",
taskPartitionCode: "",
taskPartitionDictId: "",
taskPartitionDictName: "",
taskTypeCode: "",
taskTypeId: "",
taskTypeName: "",
},
],
});
}
},
handleData(list, key, keytwo) {
console.log(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
)
);
let keys = [...new Set(array)];
let newList = keys.map((item) => {
return {
//这里写新的 数据结构 如下是整体复制
routeNodeDay: item[key], //1tian
routeNodeName: item[keytwo],
list: list.filter(
(i) => i[key] == item[key] && i[keytwo] == item[keytwo]
),
};
});
return newList;
2024-05-17 17:52:19 +08:00
},
2024-05-23 10:29:59 +08:00
getParams() {
getParams(this.querytParams).then(res => {
res.data.forEach(e => {
e.forEach(el => {
2024-05-23 15:48:57 +08:00
el.patientId = this.$route.query.patientId
el.patientName = this.$route.query.patientName
2024-05-23 10:29:59 +08:00
el.sn = Number(el.sn)
})
})
2024-05-23 15:48:57 +08:00
this.moban = JSON.parse(JSON.stringify(res.data))
2024-05-23 10:29:59 +08:00
this.getParamslistData = res.data
2024-05-23 15:48:57 +08:00
2024-05-17 17:52:19 +08:00
})
2024-05-23 10:29:59 +08:00
2024-05-23 15:48:57 +08:00
2024-05-23 10:29:59 +08:00
},
2024-05-23 15:48:57 +08:00
2024-05-23 10:29:59 +08:00
// 药品列表
informationInfoinfo() {
// this.informationqueryParams.pageNum = 1;
this.loading = true;
listBaseDrug(this.informationqueryParams).then(response => {
this.baseDrugList = response.rows;
this.baseDrugtotal = response.total;
this.loading = false;
});
},
// 运动
spotgetList() {
this.loading = true;
listBaseSport(this.SporParams).then((response) => {
this.baseSportList = response.rows;
this.Sporttotal = response.total;
this.loading = false;
});
},
/** 查询饮食知识库列表 */
DiegetList() {
this.loading = true;
listBaseDiet(this.DieParams).then(response => {
this.baseDietList = response.rows;
this.Dietotal = response.total;
this.loading = false;
});
},
/** 查询护理知识库列表 */
NursinggetList() {
this.loading = true;
listBaseNursing(this.NursingParams).then(response => {
this.baseNursingList = response.rows;
this.Nursingtotal = response.total;
this.loading = false;
});
},
// 药品重置
addresetQuerylist() {
if (this.taskPartitionCode == 'TPC202405200003') { // 用药
this.informationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.informationInfoinfo();
} else if (this.taskPartitionCode == 'TPC202405200004') {//运动
this.SporParams = {
pageNum: 1,
pageSize: 10,
};
this.spotgetList();
} else if (this.taskPartitionCode == 'TPC202405200005') {//饮食
this.DieParams = {
pageNum: 1,
pageSize: 10,
},
this.DiegetList()
} else if (this.taskPartitionCode == 'TPC202405200006') {//居家护理
this.NursingParams = {
pageNum: 1,
pageSize: 10,
nursingName: null,
2024-05-17 17:52:19 +08:00
}
2024-05-23 10:29:59 +08:00
this.NursinggetList()
}
2024-05-17 17:52:19 +08:00
},
2024-05-23 10:29:59 +08:00
// 药品名称关闭
innerVisiblecancel() {
this.Drugshow = false
this.Sportshow = false
this.Dieshow = false
this.Nursingshow = false
},
// 圆点按钮
nurseclick(row) {
2024-05-23 15:48:57 +08:00
this.getParamslistData[this.indexdata].forEach(el => {
console.log(row[el.paramKey], 'row[el.paramKey]----------')
el.paramValue = row[el.paramKey]
})
2024-05-23 10:29:59 +08:00
this.Drugshow = false
this.Sportshow = false
this.Dieshow = false
this.Nursingshow = false
},
//保存
2024-05-17 17:52:19 +08:00
TemporaryStorage() {
2024-05-23 15:48:57 +08:00
var emptyItems = []
emptyItems = this.getParamslistData.flat().filter(f => f.paramValue == "")
this.getParamslistData.forEach(e => {
e.forEach(el => {
el.routeId = this.itemdata.routeId
el.routeName = this.itemdata.routeName
el.routeNodeId = this.querytParams.id
el.routeNodeName = this.itemdata.routeNodeName
el.taskPartitionCode = this.itemdata.taskPartitionCode
el.taskPartitionDictId = this.itemdata.taskPartitionDictId
el.taskPartitionDictName = this.itemdata.taskPartitionDictName
el.taskTypeCode = this.itemdata.taskTypeCode
el.taskTypeId = this.itemdata.taskTypeId
el.taskTypeName = this.itemdata.taskTypeName
2024-05-17 17:52:19 +08:00
})
})
2024-05-23 15:48:57 +08:00
// return
if (emptyItems && emptyItems.length > 0) {
this.$modal.msgError("请填写完整,再进行提交");
} else {
this.$confirm('是否确认提交?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
}).then(() => {
const loading = this.$loading({
lock: true,
text: '提交中',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
inserList(this.getParamslistData).then(res => {
this.getAllNodeBy();
this.$modal.msgSuccess("提交成功!");
loading.close();
})
})
}
2024-05-17 17:52:19 +08:00
},
2024-05-23 15:48:57 +08:00
bottomclickevent(ulitem,uindex,ulindex) {
console.log(ulitem,uindex,ulindex)
this.itemdata = ulitem
2024-05-17 17:52:19 +08:00
this.taskPartitionList = []
2024-05-23 15:48:57 +08:00
this.querytParams.id = ulitem.routeNodeId
2024-05-23 10:29:59 +08:00
this.getParamslistData = []
this.getParams()
this.listindex = uindex
2024-05-23 15:48:57 +08:00
this.itemindex = ulindex;
this.taskPartitionCode = ulitem.taskPartitionCode
2024-05-17 17:52:19 +08:00
},
//任务类型 任务状态
taskinfo() {
selectTaskTypeList().then(res => {
this.selectTaskTypeList = res.data
})
},
2024-05-23 10:29:59 +08:00
2024-05-17 17:52:19 +08:00
//任务类型
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 = ''
}
}
})
},
2024-05-23 10:29:59 +08:00
// 知识库获取
knowledge(index, item) {
console.log(this.taskPartitionCode)
// 用药
if (this.taskPartitionCode == 'TPC202405200003') {
this.Drugshow = true
this.informationInfoinfo()
} else if (this.taskPartitionCode == 'TPC202405200004') {//运动
this.Sportshow = true
this.spotgetList()
} else if (this.taskPartitionCode == 'TPC202405200005') {//饮食
this.Dieshow = true
this.DiegetList()
} else if (this.taskPartitionCode == 'TPC202405200006') {//居家护理
this.Nursingshow = true
this.NursinggetList()
2024-05-17 17:52:19 +08:00
}
2024-05-23 15:48:57 +08:00
this.indexdata = index
2024-05-23 10:29:59 +08:00
console.log(item, index)
2024-05-17 17:52:19 +08:00
},
2024-05-23 10:29:59 +08:00
additem(index) {
2024-05-23 15:48:57 +08:00
console.log(this.moban[0],'打印模版')
this.moban[0].forEach(e=>{
console.log(e,'099999999999')
e.paramValue=""
})
const newVal = JSON.parse(JSON.stringify(this.moban[0]))
// const newVal = JSON.parse(JSON.stringify(this.getParamslistData[0]))
2024-05-23 10:29:59 +08:00
newVal.forEach(i => {
// i.sn = this.getParamslistData.length +1
i.sn = this.getParamslistData[this.getParamslistData.length - 1][0].sn + 1
2024-05-17 17:52:19 +08:00
})
2024-05-23 10:29:59 +08:00
this.getParamslistData.push(newVal)
console.log(this.getParamslistData, '00000000000')
},
delitem(index, item) {
this.getParamslistData.splice(index, 1)
2024-05-17 17:52:19 +08:00
},
}
};
</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;
::v-deep .el-card {
width: 85%;
margin-left: 20px;
}
.icon {
2024-05-23 10:29:59 +08:00
width: 150px;
right: -20px;
top: 40px;
2024-05-17 17:52:19 +08:00
position: relative;
}
.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 {
2024-05-23 10:29:59 +08:00
overflow-y: scroll;
overflow-x: hidden;
2024-05-17 17:52:19 +08:00
width: 72%;
// height: 680px;
2024-05-23 10:29:59 +08:00
height: calc(100vh - 30px);
// overflow: scroll;
2024-05-17 17:52:19 +08:00
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>