提交 1fd8ec5c 编写于 作者: yi.li's avatar yi.li

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
...@@ -42,6 +42,7 @@ export default { ...@@ -42,6 +42,7 @@ export default {
} }
], ],
followStartTimeList: [], //随访时间 followStartTimeList: [], //随访时间
residentCrumb: [], //居民面包屑
}, },
mutations: { mutations: {
GET_RESIDENT_LIST(state, payload) { GET_RESIDENT_LIST(state, payload) {
...@@ -104,6 +105,10 @@ export default { ...@@ -104,6 +105,10 @@ export default {
} }
] ]
state.templateOptions = state.templateOptions.concat(payload) state.templateOptions = state.templateOptions.concat(payload)
},
SET_RESIDENT_CRUMB(state, payload){
state.residentCrumb = payload
sessionStorage.setItem('residentCrumb', JSON.stringify(state.residentCrumb));
} }
}, },
actions: { actions: {
...@@ -239,5 +244,8 @@ export default { ...@@ -239,5 +244,8 @@ export default {
context.commit('GET_PLAN_LIST', data); context.commit('GET_PLAN_LIST', data);
}); });
}, },
setResidentCrumb(context, payload) {
context.commit('SET_RESIDENT_CRUMB', payload);
},
}, },
} }
...@@ -270,12 +270,12 @@ ...@@ -270,12 +270,12 @@
}, },
// 选择居民 // 选择居民
handleSelectionChange(val) { handleSelectionChange(val) {
console.log('每次选中居民',val) // console.log('每次选中居民',val)
this.eachSelects = val this.eachSelects = val
}, },
// 切换分页 // 切换分页
handleCurrentChangePre(val) { handleCurrentChangePre(val) {
console.log('handleCurrentChangePre') // console.log('handleCurrentChangePre')
this.paginationSet.pageNum = val this.paginationSet.pageNum = val
this.getPatientsList() this.getPatientsList()
}, },
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
this.$emit('sureSelectPatient',false,this.eachSelects) this.$emit('sureSelectPatient',false,this.eachSelects)
}, },
handleSizeChangePre(val) { handleSizeChangePre(val) {
console.log('handleSizeChangePre') // console.log('handleSizeChangePre')
this.paginationSet.pageSize = val this.paginationSet.pageSize = val
this.getPatientsList() this.getPatientsList()
}, },
......
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
:value="timeForm.pushDay"> :value="timeForm.pushDay">
</el-option> </el-option>
</el-select> </el-select>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="!timeForm.hasSelected">选择健康漫画</el-button> <el-button plain class="ml20" @click="goSelectCartoon" v-if="!timeForm.hasSelected && !isStandedTemplate">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="timeForm.hasSelected"> <div class="selected-div ml20" v-if="timeForm.hasSelected">
<span>{{timeForm.comentMsg.header_name}}</span> <span>{{timeForm.comentMsg.header_name}}</span>
<el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button> <el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button>
...@@ -192,12 +192,13 @@ ...@@ -192,12 +192,13 @@
formOptions: Array, formOptions: Array,
patientIdList: Array, patientIdList: Array,
isStandedTemplate: Boolean, isStandedTemplate: Boolean,
planId: String
}, },
watch: { watch: {
timeForm(val){ timeForm(val){
this.timeForm = val this.timeForm = val
if(this.isStandedTemplate){ if(this.isStandedTemplate || this.planId){
console.log('表单子组件监听到的form数据',this.timeForm) // console.log('表单子组件监听到的form数据',this.timeForm)
this.timeForm.isDisabled = true this.timeForm.isDisabled = true
if(this.timeForm.remindList.length > 0){// remindDay if(this.timeForm.remindList.length > 0){// remindDay
this.remindOptionsCopy = this.timeForm.remindList this.remindOptionsCopy = this.timeForm.remindList
...@@ -226,6 +227,7 @@ ...@@ -226,6 +227,7 @@
this.timeForm.followResourceId.push(item.startDays) this.timeForm.followResourceId.push(item.startDays)
}) })
} }
} }
}, },
valBegin(val){ valBegin(val){
...@@ -236,10 +238,11 @@ ...@@ -236,10 +238,11 @@
} }
}, },
saveValiedBegin(val){ saveValiedBegin(val){
console.log('保存按钮子组件的校验',val) // console.log('保存按钮子组件的校验',val)
// console.log('++++',this.timeForm.formRef)
if(val && this.timeForm.formRef){ if(val && this.timeForm.formRef){
this.$refs[this.timeForm.formRef].validate((valid) => { this.$refs[this.timeForm.formRef].validate((valid) => {
console.log('告诉父组件,校验结果' + valid) // console.log('告诉父组件,校验结果' + valid)
this.$emit('checkValid',{valid: valid, type: 'save'}) this.$emit('checkValid',{valid: valid, type: 'save'})
}); });
} }
...@@ -250,11 +253,8 @@ ...@@ -250,11 +253,8 @@
console.log(val) console.log(val)
}, },
changeFollowId(val){ changeFollowId(val){
console.log(val)
this.formOptions.forEach((item1)=>{ this.formOptions.forEach((item1)=>{
console.log('item1',item1)
val.forEach((item2)=>{ val.forEach((item2)=>{
console.log('item2',item2)
if(item2==item1.scaleNo){ if(item2==item1.scaleNo){
this.timeForm.followResourceIdStr.push(item1.name) this.timeForm.followResourceIdStr.push(item1.name)
} }
......
<template> <template>
<div> <div>
<p><el-button plain icon="el-icon-plus" size="small" round @click="addNewNode">新增时间节点</el-button><br></p> <p><el-button plain icon="el-icon-plus" size="small" round v-if="!isStandedTemplate" @click="addNewNode">新增时间节点</el-button><br></p>
<div class="add-time-content"> <div class="add-time-content">
<div class="time-line-scroll"> <div class="time-line-scroll">
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
v-for="(item, index) in setTimeNodeList1" v-for="(item, index) in setTimeNodeList1"
:key="index" :key="index"
:label="index">开始后{{item.timeNo + item.timeUnitStr}} :label="index">开始后{{item.timeNo + item.timeUnitStr}}
<i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i> <i class="el-icon-circle-close-outline" v-if="!isStandedTemplate" @click="deleteTimeNode(item, index)"></i>
</el-radio-button> </el-radio-button>
<el-radio-button <el-radio-button
label="setNewRef" label="setNewRef"
v-if="showSetBtn">设置随访时间 v-if="showSetBtn && !isStandedTemplate">设置随访时间
<i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i> <i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i>
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
<set-time-form <set-time-form
v-if="index == activeTab" v-if="index == activeTab"
:isStandedTemplate="isStandedTemplate" :isStandedTemplate="isStandedTemplate"
:planId="planId"
:timeForm="timeFormHas" :timeForm="timeFormHas"
:valBegin="valBegin" :valBegin="valBegin"
:saveValiedBegin="saveValiedBegin" :saveValiedBegin="saveValiedBegin"
...@@ -47,6 +48,7 @@ ...@@ -47,6 +48,7 @@
<!--新增时间节点--> <!--新增时间节点-->
<div class="form-div" v-if="activeTab == 'setNewRef'"> <div class="form-div" v-if="activeTab == 'setNewRef'">
<set-time-form <set-time-form
:planId="planId"
:timeForm="timeForm" :timeForm="timeForm"
:valBegin="valBegin" :valBegin="valBegin"
:saveValiedBegin="saveValiedBegin" :saveValiedBegin="saveValiedBegin"
...@@ -88,7 +90,9 @@ ...@@ -88,7 +90,9 @@
activeTab: null, activeTab: null,
currentFormRef: 1, currentFormRef: 1,
showSetBtn: true, showSetBtn: true,
timeForm: {}, timeForm: {
formRef: ''
},
timeFormRules: { timeFormRules: {
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
...@@ -101,6 +105,7 @@ ...@@ -101,6 +105,7 @@
patientIdList: Array, patientIdList: Array,
checkForm: Boolean, checkForm: Boolean,
isStandedTemplate: Boolean, isStandedTemplate: Boolean,
planId: String,
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
...@@ -124,28 +129,28 @@ ...@@ -124,28 +129,28 @@
created() { created() {
this.initNewForm(); this.initNewForm();
this.getConstData() this.getConstData()
console.log(this.isStandedTemplate) //初始化一个随访时间节点
if(this.isStandedTemplate){ this.activeTab = 'setNewRef';
this.deleteAddNode() this.timeForm.formRef = this.getNowTime();
}else{
//初始化一个随访时间节点
this.activeTab = 'setNewRef';
this.timeForm.formRef = this.getNowTime();
}
}, },
watch: { watch: {
setTimeNodeList(val){ setTimeNodeList(val){
this.setTimeNodeList = val this.setTimeNodeList = val
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
console.log(this.timeForm)
if(this.timeForm){ if(this.timeForm){
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit; this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
// console.log(this.isStandedTemplate)
if(this.isStandedTemplate || this.planId){
this.deleteAddNode()
}
} }
} }
}, },
checkForm(val){ checkForm(val){
console.log('触发 保存 校验',val) // console.log('触发 保存 校验',val)
// 触发 保存 校验 // 触发 保存 校验
this.saveValiedBegin = val this.saveValiedBegin = val
...@@ -156,7 +161,7 @@ ...@@ -156,7 +161,7 @@
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit; this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
} }
this.timeForm = val this.timeForm = val
console.log('表单父组件的数据',this.timeForm) // console.log('表单父组件的数据',this.timeForm)
}, },
setTimeNodeList1(val) { setTimeNodeList1(val) {
if(val.length > 0){ if(val.length > 0){
...@@ -216,43 +221,53 @@ ...@@ -216,43 +221,53 @@
this.$emit('addListenSave',false) this.$emit('addListenSave',false)
} }
}else{ }else{
if(this.timeForm.remindDay.length>0){ // 不是固定模板
this.timeForm.remindDay.forEach((item)=>{ if(!this.isStandedTemplate){
this.timeForm.remindList.push({ if(this.timeForm.remindDay.length>0){
startDays: item this.timeForm.remindDay.forEach((item)=>{
this.timeForm.remindList.push({
startDays: item
})
}) })
}) }
} console.log(this.timeForm)
console.log(this.timeForm.followResourceIdStr) console.log(this.timeForm.followResourceIdStr)
if(this.timeForm.pushDay){ if(this.timeForm.pushDay){
this.timeForm.pushContentList.push({ this.timeForm.pushContentList.push({
startDays: this.timeForm.pushDay, startDays: this.timeForm.pushDay,
resourceId: this.timeForm.comentMsg.id, resourceId: this.timeForm.comentMsg.id,
sendContent: this.timeForm.comentMsg.header_name sendContent: this.timeForm.comentMsg.header_name
})
}
if(this.timeForm.followResourceId.length>0){
this.timeForm.followResourceId.forEach((item,index)=>{
this.timeForm.followupList.push({
resourceId: item,
sendContent : this.timeForm.followResourceIdStr[index]
}) })
}) }
} if(this.timeForm.followResourceId.length>0){
this.timeForm.followResourceId.forEach((item,index)=>{
this.timeForm.followupList.push({
resourceId: item,
sendContent : this.timeForm.followResourceIdStr[index]
})
})
}
if(this.showSetBtn){ if(this.showSetBtn){
this.setTimeNodeList.push(this.timeForm); this.setTimeNodeList.push(this.timeForm);
} }
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList) this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
// 保存按钮发起的校验 // 保存按钮发起的校验
if(obj.type=='save'){ if(obj.type=='save'){
this.$emit('addListenSave',true) this.$emit('addListenSave',true)
}else{ }else{
this.initNewForm(); this.initNewForm();
// console.log('初始化过之后activeTab=====> ',this.activeTab) // console.log('初始化过之后activeTab=====> ',this.activeTab)
this.timeForm.formRef = this.getNowTime(); this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
}
}else{// 是固定模板
// 只能保存提交
// this.setTimeNodeList.push(this.timeForm);
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
this.$emit('addListenSave',true)
} }
} }
// 校验没通过 // 校验没通过
...@@ -266,7 +281,7 @@ ...@@ -266,7 +281,7 @@
}, },
// 点击 新增时间节点 // 点击 新增时间节点
addNewNode() { addNewNode() {
console.log('是否新增一个新的时间节点 ' + (this.activeTab == 'setNewRef')) // console.log('是否新增一个新的时间节点 ' + (this.activeTab == 'setNewRef'))
this.checkTimeIsRepeat() this.checkTimeIsRepeat()
if(this.timeIsRepeat){ if(this.timeIsRepeat){
this.$notify.success({ this.$notify.success({
...@@ -290,8 +305,6 @@ ...@@ -290,8 +305,6 @@
// 验证是否重复 // 验证是否重复
checkTimeIsRepeat(){ checkTimeIsRepeat(){
this.timeIsRepeat = false; this.timeIsRepeat = false;
console.log('+++',this.setTimeNodeList)
console.log('+++',this.timeForm.timeNo)
if(this.setTimeNodeList.length > 0){ if(this.setTimeNodeList.length > 0){
if(this.showSetBtn){ if(this.showSetBtn){
this.setTimeNodeList.forEach(item=>{ this.setTimeNodeList.forEach(item=>{
...@@ -345,9 +358,8 @@ ...@@ -345,9 +358,8 @@
this.timeForm.hasSelected = ''; this.timeForm.hasSelected = '';
}, },
changeTab(val){ changeTab(val){
this.activeTab = val;
console.log('当前的 activeTab ',val) console.log('当前的 activeTab ',val)
this.activeTab = val;
if(val == 'setNewRef') { if(val == 'setNewRef') {
this.initNewForm(); this.initNewForm();
......
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
}, },
// 监听保存校验结果 // 监听保存校验结果
addListenSave(val){ addListenSave(val){
console.log('监听保存校验结果',val) // console.log('监听保存校验结果',val)
this.checkForm = false this.checkForm = false
if(val){ if(val){
this.baseInfo.fPlanTimeReqList = this.setTimeNodeList this.baseInfo.fPlanTimeReqList = this.setTimeNodeList
...@@ -219,7 +219,7 @@ ...@@ -219,7 +219,7 @@
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1) // console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList)) // console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
}else{ }else{
console.log('点击保存按钮之后校验失败') // console.log('点击保存按钮之后校验失败')
} }
}, },
setTimeNodeListOnCom(val){ setTimeNodeListOnCom(val){
...@@ -281,7 +281,7 @@ ...@@ -281,7 +281,7 @@
} }
if (valid) { if (valid) {
// this.$refs['statusForm'].resetFields(); // this.$refs['statusForm'].resetFields();
console.log('当前选择的随访模板id为',this.baseInfo.resourceId) // console.log('当前选择的随访模板id为',this.baseInfo.resourceId)
if(this.baseInfo.resourceId){ if(this.baseInfo.resourceId){
this.isStandedTemplate = true this.isStandedTemplate = true
getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{ getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{
......
...@@ -124,11 +124,34 @@ ...@@ -124,11 +124,34 @@
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getResidentDetail', 'getPlanDetail', 'getNodeTimeList', 'getNodeTimeContent']), ...mapActions('planManage', ['getResidentDetail',
'getPlanDetail',
'getNodeTimeList',
'getNodeTimeContent',
'setResidentCrumb']),
goToFollowTime() { goToFollowTime() {
this.showFollowTime = true this.showFollowTime = true
}, },
goToResidentList() { goToResidentList() {
let residentCrumb = [
{
name: '随访管理',
href: null
},
{
name: '计划管理',
href: `#/followup/plan-manage/plan-list`
},
{
name: '计划详情',
href: `#/followup/plan-manage/plan-detail?planId=${this.$route.query.planId}`
},
{
name: '居民列表',
href: null
}
]
this.setResidentCrumb(residentCrumb);
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId: this.$route.query.planId, planName: this.planDetail.name}}) this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId: this.$route.query.planId, planName: this.planDetail.name}})
}, },
changePlan() { changePlan() {
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
this.search(1); this.search(1);
}, },
methods: { methods: {
...mapActions('planManage', ['getPlanList']), ...mapActions('planManage', ['getPlanList', 'setResidentCrumb']),
async search(currentPage){ async search(currentPage){
await this.getPlanList({ await this.getPlanList({
...this.searchData, ...this.searchData,
...@@ -167,6 +167,21 @@ ...@@ -167,6 +167,21 @@
this.$router.push({path: '/followup/plan-manage/plan-detail', query: {planId:row.id}}) this.$router.push({path: '/followup/plan-manage/plan-detail', query: {planId:row.id}})
}, },
visitRow(row){ visitRow(row){
let residentCrumb = [
{
name: '随访管理',
href: null
},
{
name: '计划管理',
href: `#/followup/plan-manage/plan-list`
},
{
name: '居民列表',
href: null
}
]
this.setResidentCrumb(residentCrumb);
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:row.id, planName: row.name}}) this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:row.id, planName: row.name}})
}, },
changeRow(row){ changeRow(row){
......
...@@ -49,9 +49,11 @@ ...@@ -49,9 +49,11 @@
</el-form> </el-form>
<div class="edit-plan-content"> <div class="edit-plan-content">
<set-time-node <set-time-node
:isStandedTemplate="isStandedTemplate"
:setTimeNodeList="setTimeNodeList" :setTimeNodeList="setTimeNodeList"
@setTimeNodeListOnCom="setTimeNodeListOnCom" @setTimeNodeListOnCom="setTimeNodeListOnCom"
:checkForm="checkForm" :checkForm="checkForm"
:planId="planId"
@addListenSave="addListenSave" @addListenSave="addListenSave"
/> />
</div> </div>
...@@ -92,6 +94,9 @@ ...@@ -92,6 +94,9 @@
}, },
data() { data() {
return { return {
planId: '',
isStandedTemplate: false, // 是否是固定的随访模板
standedTimeNodeList: [], // 如果是国定随访模板,获取固定数据后不可更改,只读
checkForm: false, checkForm: false,
patientIdList: [], //获取的病人列表 patientIdList: [], //获取的病人列表
hasSelectedList: [], //已选居民 hasSelectedList: [], //已选居民
...@@ -257,11 +262,17 @@ ...@@ -257,11 +262,17 @@
}, },
watch: { watch: {
planDetail(val) { planDetail(val) {
// console.log(val)
// this.setTimeNodeList = val.fPlanTimeDtoList // this.setTimeNodeList = val.fPlanTimeDtoList
this.setTimeNodeListOnCom(val.fPlanTimeReqList) this.setTimeNodeListOnCom(val.fPlanTimeReqList)
console.log(val) // console.log(this.setTimeNodeList)
this.patientIdList = val.patientIdList this.patientIdList = val.patientIdList
// this.hasSelectedList = this.planId = String(val.id)
if(val.resourceId){
this.isStandedTemplate = true
}else{
this.isStandedTemplate = false
}
}, },
} }
} }
......
<template> <template>
<div class="resident-detail"> <div class="resident-detail">
<bread-crumb <div class="bread-crumb">
:curmbFirst="curmbFirst" <el-breadcrumb separator-class="el-icon-arrow-right" >
:curmbSecond="curmbSecond" <el-breadcrumb-item v-for="item in residentCrumb">
:curmbThird="curmbThird" <a v-if="item.href" :href="item.href">{{item.name}}</a>
:jumPathThird="jumPathThird"> <span v-else >{{item.name}}</span>
</bread-crumb> </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="f-detail-content screenSet"> <div class="f-detail-content screenSet">
<div class="header"> <div class="header">
<div class="title"><p>基本信息</p></div> <div class="title"><p>基本信息</p></div>
...@@ -103,7 +105,6 @@ ...@@ -103,7 +105,6 @@
</template> </template>
<script> <script>
import BreadCrumb from '@/components/breadcrumb';
//变更计划dialog //变更计划dialog
import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan'; import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan';
//结束随访dialog //结束随访dialog
...@@ -113,7 +114,6 @@ ...@@ -113,7 +114,6 @@
export default { export default {
name: "resident-detail", name: "resident-detail",
components: { components: {
BreadCrumb,
ChangePlan, ChangePlan,
FinishFollowup, FinishFollowup,
}, },
...@@ -131,11 +131,13 @@ ...@@ -131,11 +131,13 @@
planChangeData: {}, //变更信息 planChangeData: {}, //变更信息
finishData: {}, //结束信息 finishData: {}, //结束信息
planDetails: {}, //计划详情 planDetails: {}, //计划详情
status: null status: null,
residentCrumb: [], //面包屑
} }
}, },
created() { created() {
let residentCrumbList = sessionStorage.getItem('residentCrumb');
this.residentCrumb = JSON.parse(residentCrumbList);
}, },
computed: { computed: {
...mapState('planManage', { ...mapState('planManage', {
...@@ -210,6 +212,23 @@ ...@@ -210,6 +212,23 @@
@import '../../../style/followup/followup-common'; @import '../../../style/followup/followup-common';
@import '../../../style/followup/element-reset.css'; @import '../../../style/followup/element-reset.css';
.resident-detail { .resident-detail {
.bread-crumb {
position: fixed;
left: 255px;
top: 64px;
width: 100%;
background: #fff;
height: 61px;
padding: 20px 20px 30px;
z-index: 99;
border-top: 3px solid #F0F2F5;
.el-breadcrumb__inner {
font-size: 14px;
}
a:hover {
color: #449284;
}
}
.f-detail-content { .f-detail-content {
.header { .header {
.title { .title {
......
<template> <template>
<div class="resident-list"> <div class="resident-list">
<bread-crumb <div class="bread-crumb">
:curmbFirst="curmbFirst" <el-breadcrumb separator-class="el-icon-arrow-right" >
:curmbSecond="curmbSecond" <el-breadcrumb-item v-for="item in residentCrumb">
:curmbThird="curmbThird" <a v-if="item.href" :href="item.href">{{item.name}}</a>
:jumPathThird="jumPathThird"> <span v-else >{{item.name}}</span>
</bread-crumb> </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="resident-content f-main-content screenSet"> <div class="resident-content f-main-content screenSet">
<p class="page-title">{{planTitle}}</p> <p class="page-title">{{planTitle}}</p>
<div class="search-div"> <div class="search-div">
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
<div class="resident-table table-content"> <div class="resident-table table-content">
<div class="btn-div"> <div class="btn-div">
<el-radio-group v-model="status" size="small"> <el-radio-group v-model="status" size="small">
<el-radio-button label="1">完成({{residentList.notCount}})</el-radio-button> <el-radio-button label="1">开始({{residentList.notCount}})</el-radio-button>
<el-radio-button label="2">进行中({{residentList.handCount}})</el-radio-button> <el-radio-button label="2">进行中({{residentList.handCount}})</el-radio-button>
<el-radio-button label="3">已结束({{residentList.yesCount}})</el-radio-button> <el-radio-button label="3">已结束({{residentList.yesCount}})</el-radio-button>
</el-radio-group> </el-radio-group>
...@@ -138,7 +140,6 @@ ...@@ -138,7 +140,6 @@
</template> </template>
<script> <script>
import BreadCrumb from '@/components/breadcrumb'
//变更计划dialog //变更计划dialog
import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan'; import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan';
//结束随访dialog //结束随访dialog
...@@ -152,7 +153,6 @@ ...@@ -152,7 +153,6 @@
export default { export default {
name: "residentList", name: "residentList",
components: { components: {
BreadCrumb,
ChangePlan, ChangePlan,
FinishFollowup, FinishFollowup,
SelectPatient, SelectPatient,
...@@ -160,12 +160,6 @@ ...@@ -160,12 +160,6 @@
}, },
data() { data() {
return { return {
/*面包屑配置*/
curmbFirst: '随访管理',
curmbSecond: '计划管理',
curmbThird: '查看居民',
jumPathThird: '/followUp/plan-manage',
/*面包屑配置*/
labelWidth: '110px', //标题长度 labelWidth: '110px', //标题长度
searchData: {}, //查询数据 searchData: {}, //查询数据
groupOption: [{ // 分组选项 groupOption: [{ // 分组选项
...@@ -185,6 +179,7 @@ ...@@ -185,6 +179,7 @@
addPatientData: {}, //选择时间数据 addPatientData: {}, //选择时间数据
statusTotal: null, //每种状态的总数 statusTotal: null, //每种状态的总数
planTitle: '', //随访计划名称 planTitle: '', //随访计划名称
residentCrumb: [], //面包屑
} }
}, },
created() { created() {
...@@ -198,6 +193,29 @@ ...@@ -198,6 +193,29 @@
this.getPlanStatusOption() this.getPlanStatusOption()
this.getGroupList(); //获取分组列表 this.getGroupList(); //获取分组列表
this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表 this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表
let residentCrumbList = sessionStorage.getItem('residentCrumb');
residentCrumbList = JSON.parse(residentCrumbList);
if(residentCrumbList.length==4&&residentCrumbList[residentCrumbList.length-1].name!='居民列表') {
this.residentCrumb = residentCrumbList.slice(0,2)
this.residentCrumb.push(
{
name: '居民列表',
href: null
}
)
} else if(residentCrumbList.length>4&&residentCrumbList[residentCrumbList.length-1].name!='居民列表') {
this.residentCrumb = residentCrumbList.slice(0,3)
this.residentCrumb.push(
{
name: '居民列表',
href: null
}
)
} else {
this.residentCrumb = residentCrumbList
}
this.setResidentCrumb(this.residentCrumb);
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
...@@ -208,7 +226,7 @@ ...@@ -208,7 +226,7 @@
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getResidentList', 'getGroupList', 'getPlanStatusOption', 'getFollowStartTimeList']), ...mapActions('planManage', ['getResidentList', 'getGroupList', 'getPlanStatusOption', 'getFollowStartTimeList', 'setResidentCrumb']),
handleSizeChangePre(pageSize) { handleSizeChangePre(pageSize) {
this.getResidentList({ this.getResidentList({
pageSize, pageSize,
...@@ -226,6 +244,52 @@ ...@@ -226,6 +244,52 @@
}) })
}, },
goPatientDetail(patientId) { //居民详情页 goPatientDetail(patientId) { //居民详情页
let residentCrumbs = []
if(this.residentCrumb.length === 3) {
residentCrumbs = [
{
name: '随访管理',
href: null
},
{
name: '计划管理',
href: `#/followup/plan-manage/plan-list`
},
{
name: '居民列表',
href: `#/followup/plan-manage/resident-list?planId=${this.$route.query.planId}`
},
{
name: '居民详情',
href: null
}
]
} else if(this.residentCrumb.length === 4) {
residentCrumbs = [
{
name: '随访管理',
href: null
},
{
name: '计划管理',
href: `#/followup/plan-manage/plan-list`
},
{
name: '计划详情',
href: `#/followup/plan-manage/plan-detail??planId=${this.$route.query.planId}`
},
{
name: '居民列表',
href: `#/followup/plan-manage/resident-list?planId=${this.$route.query.planId}`
},
{
name: '居民详情',
href: null
}
]
}
this.setResidentCrumb(residentCrumbs);
this.$router.push({path: '/followup/plan-manage/resident-detail', query: {patientId: patientId, planId: this.$route.query.planId}}) this.$router.push({path: '/followup/plan-manage/resident-detail', query: {patientId: patientId, planId: this.$route.query.planId}})
}, },
...@@ -378,6 +442,23 @@ ...@@ -378,6 +442,23 @@
@import '../../../style/followup/followup-common'; @import '../../../style/followup/followup-common';
@import '../../../style/followup/element-reset.css'; @import '../../../style/followup/element-reset.css';
.bread-crumb {
position: fixed;
left: 255px;
top: 64px;
width: 100%;
background: #fff;
height: 61px;
padding: 20px 20px 30px;
z-index: 99;
border-top: 3px solid #F0F2F5;
.el-breadcrumb__inner {
font-size: 14px;
}
a:hover {
color: #449284;
}
}
.btn-left { .btn-left {
float: right; float: right;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册