提交 d2cba9e8 编写于 作者: tao.wu's avatar tao.wu

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

# Conflicts:
#	src/views/followup/plan-manage/new-plan.vue
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"build": "node build/build.js", "build": "node build/build.js",
"build:dev": "cross-env BUILD_ENV=dev node build/build.js", "build:dev": "cross-env BUILD_ENV=dev node build/build.js",
"build:test": "cross-env BUILD_ENV=test node build/build.js", "build:test": "cross-env BUILD_ENV=test node build/build.js",
"build:test2": "cross-env BUILD_ENV=test node build/build.js",
"build:uat": "cross-env BUILD_ENV=uat node build/build.js", "build:uat": "cross-env BUILD_ENV=uat node build/build.js",
"build:pro": "cross-env BUILD_ENV=pro node build/build.js" "build:pro": "cross-env BUILD_ENV=pro node build/build.js"
}, },
......
...@@ -136,6 +136,9 @@ export default { ...@@ -136,6 +136,9 @@ export default {
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_RESIDENT_LIST', data); context.commit('GET_RESIDENT_LIST', data);
context.dispatch('getSelectResident',{
planId: payload.planId
})
}); });
}, },
getGroupList(context, payload) { getGroupList(context, payload) {
...@@ -159,6 +162,9 @@ export default { ...@@ -159,6 +162,9 @@ export default {
getPlanDetail(context, payload) { getPlanDetail(context, payload) {
getPlanDetail(payload).then(({data}) => { getPlanDetail(payload).then(({data}) => {
context.commit('GET_PLAN_DETAIL', data); context.commit('GET_PLAN_DETAIL', data);
context.dispatch('getSelectResident',{
planId: data.id
})
}); });
}, },
getRemarkOption(context, payload) { getRemarkOption(context, payload) {
...@@ -261,6 +267,7 @@ export default { ...@@ -261,6 +267,7 @@ export default {
}, },
getSelectResident(context, payload) { getSelectResident(context, payload) {
getResidentList({ getResidentList({
needEnd: 1,
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_SELECT_RESIDENT', data); context.commit('GET_SELECT_RESIDENT', data);
......
...@@ -42,6 +42,17 @@ export const envConfig = { ...@@ -42,6 +42,17 @@ export const envConfig = {
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html', yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://test1.yunqueyi.com/', saasDomainUrl: 'https://test1.yunqueyi.com/',
}, },
test2: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
qiniuFileUrl: "https://test1-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com",
loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
followUpSC: 'https://test2-work.yunqueyi.com/sc',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://test1.yunqueyi.com/',
},
uat: { uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/', baseUrl: 'https://uat-sc.yunqueyi.com/',
qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://uat-sc.yunqueyi.com/contents/admin/qiniu/token1",
......
...@@ -5,14 +5,14 @@ ...@@ -5,14 +5,14 @@
:visible.sync="showAddPatientTime" :visible.sync="showAddPatientTime"
v-if="showThisPage" v-if="showThisPage"
:before-close="clickClose" :before-close="clickClose"
width="30%" width="33%"
center> center>
<div class="finish-content"> <div class="finish-content">
<el-form <el-form
:model="addPatientData" :model="addPatientData"
:rules="rules" :rules="rules"
ref="addPatientData" ref="addPatientData"
label-width="100px"> label-width="140px">
<el-form-item label="已选居民:"> <el-form-item label="已选居民:">
{{addPatientData.patientNames}} {{addPatientData.patientNames}}
</el-form-item> </el-form-item>
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button> <el-button class="button-while" @click="clickClose" size="small" plain>取 消</el-button>
<el-button class="button-white" @click="addPatient" size="small" plain>确 定</el-button> <el-button class="button-green" @click="addPatient" size="small" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button> <el-button class="button-white" @click="clickClose" size="small" plain>取 消</el-button>
<el-button class="button-white" @click="changePlans" size="small" plain>确 定</el-button> <el-button class="button-green" @click="changePlans" size="small" type="primary" >确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button> <el-button class="button-white" @click="clickClose" size="small" plain>取 消</el-button>
<el-button class="button-white" @click="finishFollowUp" size="small" plain>确 定</el-button> <el-button class="button-green" @click="finishFollowUp" size="small" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -65,18 +65,19 @@ ...@@ -65,18 +65,19 @@
} }
}, },
methods: { methods: {
...mapActions('planManage', ['getResidentList']), ...mapActions('planManage', ['getResidentList','getResidentDetail']),
clickClose() { clickClose() {
this.$emit('closeFinishFollowup',false) this.$emit('closeFinishFollowup',false)
}, },
finishFollowUp() { finishFollowUp() {
this.$refs['finishData'].validate(valid => { this.$refs['finishData'].validate(valid => {
if (valid) { if (valid) {
const { changeCode, planId, patientIdList } = this.finishData; const { changeCode, planId, patientIdList, planPatientsIdList } = this.finishData;
finishPlan({ finishPlan({
changeCode, changeCode,
planId, planId,
patientIdList, patientIdList,
planPatientsIdList
}).then((data) => { }).then((data) => {
if(data.code == '000000') { if(data.code == '000000') {
this.$message({ this.$message({
......
...@@ -10,7 +10,13 @@ ...@@ -10,7 +10,13 @@
width="65%" width="65%"
center> center>
<div class="finish-content"> <div class="finish-content">
<el-form ref="searchData" :model="searchData" :inline="true" class="select-width" size="small"> <el-form
ref="searchData"
:model="searchData"
:inline="true"
class="select-width"
size="small">
<el-form-item> <el-form-item>
<el-select v-model="searchData.sex" @change="changeSex"> <el-select v-model="searchData.sex" @change="changeSex">
<el-option <el-option
...@@ -62,10 +68,13 @@ ...@@ -62,10 +68,13 @@
ref="multipleTable" ref="multipleTable"
center center
style="width: 100%;margin-top: 20px;" style="width: 100%;margin-top: 20px;"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column <el-table-column
type="selection" type="selection"
align="center"> align="center"
:reserve-selection="true"
:selectable="checkboxInit">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="nickname" prop="nickname"
...@@ -89,13 +98,13 @@ ...@@ -89,13 +98,13 @@
min-width="150px"> min-width="150px">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="diseaseId" prop="showDiseaseNames"
label="基础疾病" label="基础疾病"
align="center" align="center"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="labelId" prop="showLabelName"
label="分组" label="分组"
align="center" align="center"
:show-overflow-tooltip="true"> :show-overflow-tooltip="true">
...@@ -124,7 +133,7 @@ ...@@ -124,7 +133,7 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex'
import { getBasicData, getPlanPatientsList, getAllDiseases, getAllLabels } from '@/utils/followup/followapis' import { getBasicData, getPlanPatientsList, getAllDiseases, getAllLabels } from '@/utils/followup/followapis'
export default { export default {
components: {}, components: {},
...@@ -133,7 +142,7 @@ ...@@ -133,7 +142,7 @@
return { return {
showSelectPatient: true, showSelectPatient: true,
allSelects: [], allSelects: [],
eachSelects: [],//仅仅是操作选择的总人员 // eachSelects: [],//仅仅是操作选择的总人员
// totalSelect: [],// 当前所选的人 // totalSelect: [],// 当前所选的人
labelId: '', labelId: '',
diseaseId: '', diseaseId: '',
...@@ -143,7 +152,6 @@ ...@@ -143,7 +152,6 @@
ageEnd: '', ageEnd: '',
srvPackageId: '', srvPackageId: '',
searchCondition: '', searchCondition: '',
patientsData: [], patientsData: [],
searchData: { searchData: {
sex: '性别', sex: '性别',
...@@ -175,12 +183,17 @@ ...@@ -175,12 +183,17 @@
labelId: '', labelId: '',
labelName: '分组' labelName: '分组'
}], }],
trueAdd:[], //真正新加 newSelects: [], //新选中的人
getRowKeys(row) {
// console.log('sshkdhdk',row)
return row.patientId;
},
} }
}, },
props: { props: {
isShowSelectPatient: Boolean, //是否显示model, isShowSelectPatient: Boolean, //是否显示model,
patientIdList: Array,// 确定已经选过的居民 patientIdList: Array,// 确定已经选过的居民
oldPatientIdList: Array,// 确定已经选过的居民
}, },
watch: { watch: {
isShowSelectPatient(val){ isShowSelectPatient(val){
...@@ -221,31 +234,16 @@ ...@@ -221,31 +234,16 @@
}) })
} }
}, },
eachSelects(val, oldVal){
if(val.length&&oldVal.length) {
console.log('新',val);
console.log('新',oldVal);
if(val.length>oldVal.length) {
let add = val.filter(function(n) {
return oldVal.indexOf(n) == -1
});
this.trueAdd.push(add)
console.log('加人',this.trueAdd)
} else if(val.length<=oldVal.length) {
let reduce = oldVal.filter(function(n) {
return val.indexOf(n) == -1
});
/*this.trueAdd = this.trueAdd.filter(function(n) {
return reduce.indexOf(n) == -1
});*/
console.log('减人',reduce)
} else {
}
}
}
}, },
methods: { methods: {
checkboxInit(row,index){
if(row.disableNum == undefined) {
return 1
} else {
return row.disableNum
}
},
getPatientsList(){ getPatientsList(){
const data = { const data = {
pageSize: this.paginationSet.pageSize, pageSize: this.paginationSet.pageSize,
...@@ -265,15 +263,53 @@ ...@@ -265,15 +263,53 @@
this.getSex() this.getSex()
this.paginationSet.total = res.data.totalRows this.paginationSet.total = res.data.totalRows
// 设置所请求的当页人员是否成为选中状态 // 设置所请求的当页人员是否成为选中状态
if(this.patientIdList.length > 0){ // console.log('传入的已选居民',this.patientIdList)
this.patientsData.forEach((item)=>{
this.patientsData.forEach((item)=>{
item.disableNum = 1;
let diseaseNames = [];
let groupNames = []
//转化分组
if(item.labelModels) {
item.labelModels.forEach(item => {
groupNames.push(item.label)
});
item.showLabelName = groupNames.join('、');
} else {
item.showLabelName = '-';
}
//转化疾病
if(item.patientTypeModels) {
item.patientTypeModels.forEach(item => {
diseaseNames.push(item.name)
})
item.showDiseaseNames = diseaseNames.join('、');
}else {
item.showDiseaseNames = '-';
}
if(this.patientIdList.length > 0){
if(this.patientIdList.includes(item.patientId)){// 如果已经选过居民 if(this.patientIdList.includes(item.patientId)){// 如果已经选过居民
this.$nextTick(()=>{ this.$nextTick(()=>{
this.$refs.multipleTable.toggleRowSelection(item,true); this.$refs.multipleTable.toggleRowSelection(item,true);
}) })
} }
}) }
} if(this.oldPatientIdList!=undefined&&this.oldPatientIdList.length) {
this.patientsData.forEach((item)=>{
if(this.oldPatientIdList.includes(item.patientId)){// 如果已经选过居民
item.disableNum = 0
} else {
item.disableNum = 1
}
})
}
})
// console.log(this.oldPatientIdList)
}else{ }else{
this.patientsData = [] this.patientsData = []
} }
...@@ -296,12 +332,16 @@ ...@@ -296,12 +332,16 @@
}, },
// 选择居民 // 选择居民
handleSelectionChange(val) { handleSelectionChange(val) {
console.log('每次选中居民',val) const _this = this;
this.eachSelects = val _this.newSelects = [];
val.forEach(item => {
if(item.disableNum == 1) {
_this.newSelects.push(item)
}
})
}, },
// 切换分页 // 切换分页
handleCurrentChangePre(val) { handleCurrentChangePre(val) {
// console.log('handleCurrentChangePre')
this.paginationSet.pageNum = val this.paginationSet.pageNum = val
this.getPatientsList() this.getPatientsList()
}, },
...@@ -309,7 +349,12 @@ ...@@ -309,7 +349,12 @@
this.$emit('closeSelectPatient',false) this.$emit('closeSelectPatient',false)
}, },
sureClick(){ sureClick(){
this.$emit('sureSelectPatient',false,this.eachSelects) if(this.newSelects.length) {
this.$emit('sureSelectPatient',false,this.newSelects)
} else {
this.$message.warning('请先选择!')
}
}, },
handleSizeChangePre(val) { handleSizeChangePre(val) {
// console.log('handleSizeChangePre') // console.log('handleSizeChangePre')
......
...@@ -9,9 +9,9 @@ ...@@ -9,9 +9,9 @@
<div class="new-plan-content f-main-content screenSet"> <div class="new-plan-content f-main-content screenSet">
<div class="header"> <div class="header">
<div class="title"> <div class="title">
<span :class="{ 'active-class' : activeTab === 'second' }">基本信息</span> <span :class="{ 'active-class' : activeTab === 'second' }">基本信息</span>
<i class="el-icon-arrow-right" style="color: #C0C4CC"></i> <i class="el-icon-arrow-right" style="color: #C0C4CC"></i>
<span :class="{ 'active-class' : activeTab === 'first' }">随访时间节点</span> <span :class="{ 'active-class' : activeTab === 'first' }">随访时间节点</span>
</div> </div>
<div class="plan-btns-group" v-if="activeTab === 'first'"> <div class="plan-btns-group" v-if="activeTab === 'first'">
<el-button class="button-white" size="small" plain @click="cancelEdit" >取 消</el-button> <el-button class="button-white" size="small" plain @click="cancelEdit" >取 消</el-button>
...@@ -55,9 +55,11 @@ ...@@ -55,9 +55,11 @@
<el-date-picker <el-date-picker
v-model="baseInfo.time" v-model="baseInfo.time"
type="date" type="date"
ref="beginDate"
placeholder="请选择随访开始时间" placeholder="请选择随访开始时间"
:picker-options="pickerOptions" :picker-options="pickerOptions"
clearable clearable
@blur="handleDateInputConfirm"
style="width:380px;"> style="width:380px;">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -182,6 +184,12 @@ ...@@ -182,6 +184,12 @@
// 点击保存,先进行校验,表单字段是否通过验证 // 点击保存,先进行校验,表单字段是否通过验证
this.checkForm = true this.checkForm = true
}, },
handleDateInputConfirm(e){
if(!this.baseInfo.time){
this.$refs.beginDate.picker.date = new Date();
}
},
// 监听保存校验结果 // 监听保存校验结果
addListenSave(val){ addListenSave(val){
console.log('监听保存校验结果',val) console.log('监听保存校验结果',val)
...@@ -228,13 +236,13 @@ ...@@ -228,13 +236,13 @@
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人 const selectPatients = getArguments[1]; // 每次选中获取的人
this.hasSelectedList = selectPatients;
console.log('呵呵呵呵',arguments)
this.baseInfo.patientIdList = [];
selectPatients.forEach((item)=>{ selectPatients.forEach((item)=>{
if(!this.baseInfo.patientIdList.includes(item.patientId)){ this.baseInfo.patientIdList.push(item.patientId);
this.hasSelectedList.push(item)
this.baseInfo.patientIdList.push(item.patientId); // 页面中数据存储所有选择的人,没有去重
}
}) })
this.baseInfo.hasSelectedNum = this.baseInfo.patientIdList.length; this.baseInfo.hasSelectedNum = this.hasSelectedList.length;
}, },
continueAdd(val) { continueAdd(val) {
this.isShowSelectedDialog = val; this.isShowSelectedDialog = val;
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
href: `#/followup/plan-manage/plan-detail?planId=${this.$route.query.planId}` href: `#/followup/plan-manage/plan-detail?planId=${this.$route.query.planId}`
}, },
{ {
name: '居民列表', name: '查看居民',
href: null href: null
} }
] ]
......
...@@ -196,7 +196,7 @@ ...@@ -196,7 +196,7 @@
href: `#/followup/plan-manage/plan-list` href: `#/followup/plan-manage/plan-list`
}, },
{ {
name: '居民列表', name: '查看居民',
href: null href: null
} }
] ]
......
<template> <template>
<div class="plan-modify"> <div class="plan-modify">
<div class="bread-crumb"> <div class="bread-crumb">
<el-breadcrumb separator-class="el-icon-arrow-right" > <el-breadcrumb separator="/" >
<el-breadcrumb-item v-for="item in planModifyCrumb"> <el-breadcrumb-item v-for="item in planModifyCrumb">
<a v-if="item.href" :href="item.href">{{item.name}}</a> <a v-if="item.href" :href="item.href">{{item.name}}</a>
<span v-else >{{item.name}}</span> <span v-else >{{item.name}}</span>
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<select-patient <select-patient
:isShowSelectPatient="isShowSelectPatient" :isShowSelectPatient="isShowSelectPatient"
:patientIdList="planDetailData.patientIdList" :patientIdList="planDetailData.patientIdList"
:oldPatientIdList="selectResidentIdList"
@closeSelectPatient="closeSelectPatient" @closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)"> @sureSelectPatient="sureSelectPatient(arguments)">
</select-patient> </select-patient>
...@@ -134,10 +135,12 @@ ...@@ -134,10 +135,12 @@
showFollowTime: false, //是否展示全部时间 showFollowTime: false, //是否展示全部时间
showAddPatientTime: false,//是否展示添加居民选择时间 showAddPatientTime: false,//是否展示添加居民选择时间
addPatientData: {}, //选择时间数据 addPatientData: {}, //选择时间数据
/*joinSelectedList: [], //新添加居民
joinPatientIdList: [], //新添加居民id oldSelect:[],
joinSelectedNames: [], //新添加居民名字*/ selectResidentIdList: [], //oldID
selectPatients: [], //选择居民列表已选人 newHasSelectedList: [],
initResidentList: [], //重置需要的居民列表
initResidentIdList: [], //重置需要的id
} }
}, },
created() { created() {
...@@ -145,9 +148,7 @@ ...@@ -145,9 +148,7 @@
this.getPlanDetail(this.$route.query.planId); //获取计划详情 this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getRemarkOption() this.getRemarkOption()
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表 this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
this.getSelectResident({
planId: this.$route.query.planId
}); //已选居民
let planModifyCrumbList = sessionStorage.getItem('planModifyCrumb'); let planModifyCrumbList = sessionStorage.getItem('planModifyCrumb');
this.planModifyCrumb = JSON.parse(planModifyCrumbList); this.planModifyCrumb = JSON.parse(planModifyCrumbList);
}, },
...@@ -183,37 +184,39 @@ ...@@ -183,37 +184,39 @@
this.isShowSelectedDialog = val; this.isShowSelectedDialog = val;
}, },
sureSelectPatient() { sureSelectPatient() {
console.log('getArguments',arguments[0])
let getArguments = arguments[0]; let getArguments = arguments[0];
// alert(this.selectResidentList.length+'-'+getArguments[1].length)
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
this.selectPatients = getArguments[1]; // 每次选中获取的人 const newAddPatientList = getArguments[1]; // 新选中的人
let selectPeople = []; let showNames = [];
let selectPeopleIds = []; const newIds = [];
let selectNames = [] newAddPatientList.forEach(item => {
this.hasSelectedList.forEach(function (item) { showNames.push(item.nickname)
selectPeople.push(item) newIds.push(item.patientId)
});
this.patientIdList.forEach(function (item) {
selectPeopleIds.push(item)
}) })
this.selectPatients.forEach((item)=>{ this.newHasSelectedList = JSON.parse(JSON.stringify(this.initResidentList));
if(!this.planDetailData.patientIdList.includes(item.patientId)){// 页面中数据存储所有选择的人,没有去重 this.newHasSelectedList = this.newHasSelectedList.concat(newAddPatientList);
selectPeople.push(item); if(this.newHasSelectedList.length > this.hasSelectedList.length) {
selectPeopleIds.push(item.id) this.showAddPatientTime = true;
selectNames.push(item.nickname) if(showNames.length>4) {
const le = showNames.length
showNames = showNames.slice(0,4)
showNames = `${showNames.join('、')}${le}人`
} else {
showNames = showNames.join('、')
} }
}) this.addPatientData = {
this.addPatientData = { id: this.$route.query.planId,
id: this.$route.query.planId, addPatients: true,
addPatients: true, patientNames: showNames,
patientIdList: selectPeopleIds, }
patientNames: selectNames.join('、'), } else {
this.hasSelectedList = JSON.parse(JSON.stringify(this.newHasSelectedList));
this.planDetailData.patientIdList = JSON.parse(JSON.stringify(this.initResidentIdList));
const _this = this;
newAddPatientList.forEach(item => {
_this.planDetailData.patientIdList.push(item.patientId)
})
} }
this.showAddPatientTime = true
}, },
continueAdd(val) { continueAdd(val) {
this.isShowSelectedDialog = val; this.isShowSelectedDialog = val;
...@@ -291,36 +294,33 @@ ...@@ -291,36 +294,33 @@
this.showAddPatientTime = isShow this.showAddPatientTime = isShow
}, },
sendJoinTime(joinData) { sendJoinTime(joinData) {
console.log('this.hasSelectedList new',this.hasSelectedList) const _this = this;
if(joinData) { if(joinData) {
// alert(joinData) _this.hasSelectedList = [];
_this.planDetailData.patientIdList = [];
this.planDetailData.joinTime =joinData; _this.newHasSelectedList.forEach(item => {
console.log('新添加时间',this.planDetailData.joinTime) _this.hasSelectedList.push(item)
this.selectPatients.forEach((item)=>{ _this.planDetailData.patientIdList.push(item.patientId)
if(!this.planDetailData.patientIdList.includes(item.patientId)){// 页面中数据存储所有选择的人,没有去重
this.hasSelectedList.push(item)
this.planDetailData.patientIdList.push(item.patientId);
}
}) })
this.planDetailData.hasSelectedNum = this.patientIdList.length; this.planDetailData.joinTime = joinData;
} else {
} }
}, },
}, },
watch: { watch: {
planDetail(val) { planDetail(val) {
// console.log(val) this.planDetailData = val;
this.planDetailData = val
this.setTimeNodeList = val.fPlanTimeReqList this.setTimeNodeList = val.fPlanTimeReqList
if(this.planDetailData.resourceId){ if(this.planDetailData.resourceId){
this.isStandedTemplate = true this.isStandedTemplate = true
}else{ }else{
this.isStandedTemplate = false this.isStandedTemplate = false
} }
}, },
selectResidentList(val) { selectResidentList(val) {
const _this = this const _this = this
_this.planDetailData.patientIdList = []
let people = {} let people = {}
if(val) { if(val) {
val.forEach(function (item, index) { val.forEach(function (item, index) {
...@@ -331,10 +331,14 @@ ...@@ -331,10 +331,14 @@
mobilePhone: item.mobilePhone, mobilePhone: item.mobilePhone,
labelId: item.labelName, labelId: item.labelName,
patientId: item.patientId patientId: item.patientId
} };
_this.patientIdList.push(item.patientId) _this.hasSelectedList.push(people);
_this.hasSelectedList.push(people) _this.planDetailData.patientIdList.push(item.patientId)
_this.selectResidentIdList.push(item.patientId)
_this.initResidentList.push(people);
_this.initResidentIdList.push(item.patientId);
}) })
_this.newHasSelectedList = JSON.parse(JSON.stringify(_this.initResidentIdList));
} }
} }
} }
...@@ -344,6 +348,23 @@ ...@@ -344,6 +348,23 @@
<style lang="scss" scoped> <style lang="scss" scoped>
@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;
}
}
.header{ .header{
display: flex; display: flex;
align-items: center; align-items: center;
......
<template> <template>
<div class="resident-detail"> <div class="resident-detail">
<div class="bread-crumb"> <div class="bread-crumb">
<el-breadcrumb separator-class="el-icon-arrow-right" > <el-breadcrumb separator="/">
<el-breadcrumb-item v-for="item in residentCrumb"> <el-breadcrumb-item v-for="item in residentCrumb">
<a v-if="item.href" :href="item.href">{{item.name}}</a> <a v-if="item.href" :href="item.href">{{item.name}}</a>
<span v-else >{{item.name}}</span> <span v-else >{{item.name}}</span>
...@@ -161,10 +161,10 @@ ...@@ -161,10 +161,10 @@
changePlan() { changePlan() {
this.planChangeData = { this.planChangeData = {
planPatientsId: this.residentDetail.fPlanDto.planPatientsId, planPatientsId: this.residentDetail.fPlanDto.planPatientsId,
planId: this.residentDetail.fPlanDto.id, // planId: this.residentDetail.fPlanDto.id,
patientId: this.residentDetail.patientId, patientId: this.residentDetail.patientId,
yLabelList: this.residentDetail.labelIdList||[], yLabelList: this.residentDetail.labelIdList||[],
startDate: this.residentDetail.fPlanDto.timeStr, // startDate: this.residentDetail.fPlanDto.timeStr,
planIdOld: this.residentDetail.fPlanDto.id, planIdOld: this.residentDetail.fPlanDto.id,
} }
this.showChangePlan = true; this.showChangePlan = true;
...@@ -174,14 +174,17 @@ ...@@ -174,14 +174,17 @@
}, },
finishFollowup() { finishFollowup() {
let patientIdList = []; let patientIdList = [];
let planPatientsIdList = [];
patientIdList.push(this.residentDetail.patientId) patientIdList.push(this.residentDetail.patientId)
planPatientsIdList.push(this.residentDetail.fPlanDto.planPatientsId)
this.finishData = { this.finishData = {
changeCode: this.status, changeCode: this.status,
planId: this.residentDetail.fPlanDto.id, planId: this.residentDetail.fPlanDto.id,
patientName: this.residentDetail.patientName, patientName: this.residentDetail.patientName,
patientIdList: patientIdList, patientIdList: patientIdList,
title: this.status==3?'恢复随访':'结束随访', title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:' reasonName: this.status==3?'恢复原因:':'结束原因:',
planPatientsIdList: this.residentDetail.planPatientsId
} }
this.showFinishFollowup = true; this.showFinishFollowup = true;
}, },
......
<template> <template>
<div class="resident-list"> <div class="resident-list">
<div class="bread-crumb"> <div class="bread-crumb">
<el-breadcrumb separator-class="el-icon-arrow-right" > <el-breadcrumb separator="/" >
<el-breadcrumb-item v-for="item in residentCrumb"> <el-breadcrumb-item v-for="item in residentCrumb">
<a v-if="item.href" :href="item.href">{{item.name}}</a> <a v-if="item.href" :href="item.href">{{item.name}}</a>
<span v-else >{{item.name}}</span> <span v-else >{{item.name}}</span>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</el-form-item> </el-form-item>
<el-form-item label="分组:" prop="labelId"> <el-form-item label="分组:" prop="labelId">
<el-select v-model="searchData.labelId" size="small" clearable> <el-select v-model="searchData.labelId" size="small" clearable>
<el-option label="全部" value=""></el-option>
<el-option <el-option
v-for="item in groupList" v-for="item in groupList"
:key="item.labelId" :key="item.labelId"
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:" prop="startDate" size="small"> <el-form-item label="随访开始时间:" prop="startDate" size="small">
<el-select v-model="searchData.startDate" size="small" clearable> <el-select v-model="searchData.startDate" size="small" clearable>
<el-option label="全部" value=""></el-option>
<el-option <el-option
v-for="(item, index) in followStartTimeList" v-for="(item, index) in followStartTimeList"
:key="item+index" :key="item+index"
...@@ -54,19 +56,21 @@ ...@@ -54,19 +56,21 @@
<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>
<div class="btn-left"> <div class="btn-left">
<el-button class="button-green" type="primary" size="small" v-if="status==3" @click="finishFollowup('all')">恢复随访</el-button> <el-button class="button-white" plain size="small" v-if="status==3" @click="finishFollowup('all')">恢复随访</el-button>
<el-button class="button-green" type="primary" size="small" v-else @click="finishFollowup('all')">结束随访</el-button> <el-button class="button-white" plain size="small" v-else @click="finishFollowup('all')">结束随访</el-button>
<el-button class="button-white" plain size="small" @click="selectPatientHandler">添加居民</el-button> <el-button class="button-green" type="primary" size="small" @click="selectPatientHandler">添加居民</el-button>
</div> </div>
</div> </div>
<el-table <el-table
:data="residentList.fPlanPatientInfoDtoList" :data="residentList.fPlanPatientInfoDtoList"
center center
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
:row-key="getRowKeys"
style="width: 100%;margin-top: 20px;"> style="width: 100%;margin-top: 20px;">
<el-table-column <el-table-column
type="selection" type="selection"
align="center"> align="center"
:reserve-selection="true">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="patientName" prop="patientName"
...@@ -129,6 +133,7 @@ ...@@ -129,6 +133,7 @@
<select-patient <select-patient
:isShowSelectPatient="isShowSelectPatient" :isShowSelectPatient="isShowSelectPatient"
:patientIdList="initialPatientIdList" :patientIdList="initialPatientIdList"
:oldPatientIdList="initialPatientIdList"
@closeSelectPatient="closeSelectPatient" @closeSelectPatient="closeSelectPatient"
@sureSelectPatient="sureSelectPatient(arguments)"> @sureSelectPatient="sureSelectPatient(arguments)">
</select-patient> </select-patient>
...@@ -161,10 +166,13 @@ ...@@ -161,10 +166,13 @@
data() { data() {
return { return {
labelWidth: '110px', //标题长度 labelWidth: '110px', //标题长度
searchData: {}, //查询数据 searchData: {
labelId: '',
startDate: ''
}, //查询数据
groupOption: [{ // 分组选项 groupOption: [{ // 分组选项
value: '全部', value: '全部',
label: '全部' label: ''
}], }],
status: 1, //列表筛选条件 status: 1, //列表筛选条件
showChangePlan: false,//是否展示变更计划 showChangePlan: false,//是否展示变更计划
...@@ -180,6 +188,9 @@ ...@@ -180,6 +188,9 @@
statusTotal: null, //每种状态的总数 statusTotal: null, //每种状态的总数
planTitle: '', //随访计划名称 planTitle: '', //随访计划名称
residentCrumb: [], //面包屑 residentCrumb: [], //面包屑
getRowKeys(row) {
return row.patientId;
},
} }
}, },
created() { created() {
...@@ -195,20 +206,20 @@ ...@@ -195,20 +206,20 @@
this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表 this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表
let residentCrumbList = sessionStorage.getItem('residentCrumb'); let residentCrumbList = sessionStorage.getItem('residentCrumb');
residentCrumbList = JSON.parse(residentCrumbList); residentCrumbList = JSON.parse(residentCrumbList);
if(residentCrumbList.length==4&&residentCrumbList[residentCrumbList.length-1].name!='居民列表') { if(residentCrumbList.length==4&&residentCrumbList[residentCrumbList.length-1].name!='查看居民') {
this.residentCrumb = residentCrumbList.slice(0,2) this.residentCrumb = residentCrumbList.slice(0,2)
this.residentCrumb.push( this.residentCrumb.push(
{ {
name: '居民列表', name: '查看居民',
href: null href: null
} }
) )
} else if(residentCrumbList.length>4&&residentCrumbList[residentCrumbList.length-1].name!='居民列表') { } else if(residentCrumbList.length>4&&residentCrumbList[residentCrumbList.length-1].name!='查看居民') {
this.residentCrumb = residentCrumbList.slice(0,3) this.residentCrumb = residentCrumbList.slice(0,3)
this.residentCrumb.push( this.residentCrumb.push(
{ {
name: '居民列表', name: '查看居民',
href: null href: null
} }
) )
...@@ -223,6 +234,7 @@ ...@@ -223,6 +234,7 @@
groupList: state => state.groupList, groupList: state => state.groupList,
planStatusOption: state => state.planStatusOption, planStatusOption: state => state.planStatusOption,
followStartTimeList: state => state.followStartTimeList, followStartTimeList: state => state.followStartTimeList,
selectResidentList: state => state.selectResidentList
}) })
}, },
methods: { methods: {
...@@ -256,7 +268,7 @@ ...@@ -256,7 +268,7 @@
href: `#/followup/plan-manage/plan-list` href: `#/followup/plan-manage/plan-list`
}, },
{ {
name: '居民列表', name: '查看居民',
href: `#/followup/plan-manage/resident-list?planId=${this.$route.query.planId}` href: `#/followup/plan-manage/resident-list?planId=${this.$route.query.planId}`
}, },
{ {
...@@ -279,7 +291,7 @@ ...@@ -279,7 +291,7 @@
href: `#/followup/plan-manage/plan-detail??planId=${this.$route.query.planId}` href: `#/followup/plan-manage/plan-detail??planId=${this.$route.query.planId}`
}, },
{ {
name: '居民列表', name: '查看居民',
href: `#/followup/plan-manage/resident-list?planId=${this.$route.query.planId}` href: `#/followup/plan-manage/resident-list?planId=${this.$route.query.planId}`
}, },
{ {
...@@ -306,10 +318,10 @@ ...@@ -306,10 +318,10 @@
changePlan(row) { changePlan(row) {
this.planChangeData = { this.planChangeData = {
planPatientsId: row.fuPlanPatientId, planPatientsId: row.fuPlanPatientId,
planId: this.$route.query.planId, // planId: this.$route.query.planId,
patientId: row.patientId, patientId: row.patientId,
yLabelList: row.labelIdList||[], yLabelList: row.labelIdList||[],
startDate: row.time, // startDate: row.time,
status: this.status, status: this.status,
planIdOld: this.$route.query.planId, planIdOld: this.$route.query.planId,
} }
...@@ -329,29 +341,42 @@ ...@@ -329,29 +341,42 @@
} }
let patientIds = []; let patientIds = [];
let patientNames = []; let patientNames = [];
let planPatientsIdList = [];
this.finishPatientList.forEach(function (item, index) { this.finishPatientList.forEach(function (item, index) {
patientIds.push(item.patientId) patientIds.push(item.patientId)
patientNames.push(item.patientName) patientNames.push(item.patientName)
planPatientsIdList.push(item.fuPlanPatientId)
}); });
console.log(patientIds) console.log(patientIds)
if(patientNames.length>4) {
const le = patientNames.length
patientNames = patientNames.slice(0,4)
patientNames = `${patientNames.join('、')}${le}人`
} else {
patientNames = patientNames.join('、')
}
this.finishData = { this.finishData = {
changeCode: this.status, changeCode: this.status,
planId: this.$route.query.planId, planId: this.$route.query.planId,
patientName: patientNames.join('、'), patientName: patientNames,
patientIdList: patientIds, patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访', title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:', reasonName: this.status==3?'恢复原因:':'结束原因:',
planPatientsIdList:planPatientsIdList
}; };
} else { } else {
let patientIds = []; let patientIds = [];
let planPatientsIdList = [];
patientIds.push(row.patientId) patientIds.push(row.patientId)
planPatientsIdList.push(row.fuPlanPatientId)
this.finishData = { this.finishData = {
changeCode: this.status, changeCode: this.status,
planId: this.$route.query.planId, planId: this.$route.query.planId,
patientName: row.patientName, patientName: row.patientName,
patientIdList: patientIds, patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访', title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:' reasonName: this.status==3?'恢复原因:':'结束原因:',
planPatientsIdList: planPatientsIdList
}; };
} }
this.showFinishFollowup = true; this.showFinishFollowup = true;
...@@ -369,30 +394,32 @@ ...@@ -369,30 +394,32 @@
this.showAddPatientTime = isShow this.showAddPatientTime = isShow
}, },
sureSelectPatient() { sureSelectPatient() {
console.log('arguments',arguments)
let getArguments = arguments[0]; let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0]; this.isShowSelectPatient = getArguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人 const selectPatients = getArguments[1]; // 每次选中获取的人
// this.hasSelectedList = selectPatients;
console.log(selectPatients)
let patientIds = [] let patientIds = []
let patientNames = [] let patientNames = []
selectPatients.forEach((item)=>{ selectPatients.forEach((item)=>{
if(!this.initialPatientIdList.includes(item.patientId)){ patientIds.push(item.patientId)
patientIds.push(item.patientId) patientNames.push(item.nickname)
patientNames.push(item.nickname)
}
}) })
if(patientNames.length>4) {
const le = patientNames.length
patientNames = patientNames.slice(0,4)
patientNames = `${patientNames.join('、')}${le}人`
} else {
patientNames = patientNames.join('、')
}
this.addPatientData = { this.addPatientData = {
id: this.$route.query.planId, id: this.$route.query.planId,
addPatients: true, addPatients: true,
patientIdList: patientIds, patientIdList: patientIds,
patientNames: patientNames.join('、'), patientNames: patientNames,
status: this.status status: this.status
} }
this.showAddPatientTime = true this.showAddPatientTime = true
// this.baseInfo.hasSelectedNum = this.baseInfo.patientIdList.length;
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
console.log('已选居民',val) console.log('已选居民',val)
...@@ -408,21 +435,21 @@ ...@@ -408,21 +435,21 @@
}) })
}, },
residentList(val) { residentList(val) {
const _this = this if(this.status == 1) {
if(val.fPlanPatientInfoDtoList) { this.statusTotal = val.notCount
val.fPlanPatientInfoDtoList.forEach(function (item,index) { } else if (this.status == 2) {
_this.initialPatientIdList.push(item.patientId) this.statusTotal = val.handCount
})
}
if(_this.status == 1) {
_this.statusTotal = val.notCount
} else if (_this.status == 2) {
_this.statusTotal = val.handCount
} else if (_this.status == 3) { } else if (_this.status == 3) {
_this.statusTotal = val.yesCount this.statusTotal = val.yesCount
} }
} },
selectResidentList(val) {
const _this = this
val.forEach(function (item,index) {
_this.initialPatientIdList.push(item.patientId)
});
},
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm=> { next(vm=> {
......
...@@ -61,10 +61,13 @@ ...@@ -61,10 +61,13 @@
:data="reservationList.enteringDtos" :data="reservationList.enteringDtos"
center center
style="width: 100%;margin-top: 20px;" style="width: 100%;margin-top: 20px;"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange"
:row-key="getRowKeys"
ref="multipleReservation">
<el-table-column <el-table-column
type="selection" type="selection"
align="center"> align="center"
:reserve-selection="true">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="nickname" prop="nickname"
...@@ -190,6 +193,9 @@ ...@@ -190,6 +193,9 @@
needPara: {}, needPara: {},
dialogDetailShow: false, dialogDetailShow: false,
validContents: [], validContents: [],
getRowKeys(row) {
return row.fuPlanPatientTimesId;
},
} }
}, },
created() { created() {
...@@ -295,17 +301,18 @@ ...@@ -295,17 +301,18 @@
} }
}, },
sendReservation() { sendReservation() {
if(this.selectionData.length > 0){ // console.log('选择人员长度',this.selectionData.length)
this.selectList = this.selectionData; if(this.selectionData.length > 100) {
// 发送预约校验 this.$message.warning('每次最多选择100条单条随访进行预约!');
this.initCheck(); return;
}else if(this.selectionData.length > 100){ }else if(this.selectionData.length <= 0){
this.$message.warning('每次最多选择100条单条随访进行预约!'); this.$message.warning('请选择要发送预约的居民!');
return false; return;
} else { }else{
this.$message.warning('请选择要发送预约的居民!'); this.selectList = this.selectionData;
return false; // 发送预约校验
} this.initCheck();
}
}, },
sendReservationRow(row){ sendReservationRow(row){
let newList = []; let newList = [];
...@@ -345,6 +352,7 @@ ...@@ -345,6 +352,7 @@
...this.setSearchData(), ...this.setSearchData(),
status: this.status, status: this.status,
}) })
this.$refs.multipleReservation.clearSelection();
}, },
closeTipsDialog(val){ closeTipsDialog(val){
this.isNoEnoughShow = val; this.isNoEnoughShow = val;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册