提交 fc4b9cd1 编写于 作者: 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
...@@ -217,7 +217,7 @@ export default { ...@@ -217,7 +217,7 @@ export default {
}, },
getPlanOptions(context, payload) { getPlanOptions(context, payload) {
getPlanList({ getPlanList({
pageNum: -1 pageNo: -1
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_PLAN_OPTION', data); context.commit('GET_PLAN_OPTION', data);
}); });
......
...@@ -250,6 +250,17 @@ export const getFollowupTemplate = (data) => { ...@@ -250,6 +250,17 @@ export const getFollowupTemplate = (data) => {
}) })
} }
// 获取随访量表固定模板
export const getFollowupTableTemplate = (id) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans/templets/${id}`),
method: 'get',
data: {},
description: '获取随访量表固定模板',
})
}
// 获取量表列表 // 获取量表列表
export const getFormOptions = (data)=>{ export const getFormOptions = (data)=>{
return fetch({ return fetch({
......
...@@ -7,32 +7,32 @@ ...@@ -7,32 +7,32 @@
v-if="showThisPage" v-if="showThisPage"
:before-close="clickClose" :before-close="clickClose"
center> center>
<el-form :model="planChangeData" label-width="110px"> <el-form :model="planChangeData" label-width="110px" :rules="rules" ref="planChangeData">
<el-form-item label="分组:"> <el-form-item label="分组:" prop="yLabelList">
<el-select <el-select
v-model="planChangeData.yLabelList" v-model="planChangeData.yLabelList"
multiple multiple
@change="selectGroup" @change="selectGroup"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in groupList" v-for="(item, index) in groupList"
:key="item.labelId" :key="index"
:label="item.labelName" :label="item.labelName"
:value="item.labelId"> :value="item.labelId">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="随访计划:"> <el-form-item label="随访计划:" prop="planId">
<el-select v-model="planChangeData.planId" size="small"> <el-select v-model="planChangeData.planId" size="small">
<el-option <el-option
v-for="item in planOption" v-for="(item,index) in planOption"
:key="item.id" :key="index"
:label="item.name" :label="item.name"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="随访开始时间:"> <el-form-item label="随访开始时间:" prop="startDate">
<el-date-picker <el-date-picker
v-model="planChangeData.startDate" v-model="planChangeData.startDate"
type="date" type="date"
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</template> </template>
<script> <script>
import { mapState, mapActions} from 'vuex'; import { mapState, mapActions } from 'vuex';
import { changePlan } from '../../../../utils/followup/followapis' import { changePlan } from '../../../../utils/followup/followapis'
export default { export default {
name: "change-plan", name: "change-plan",
...@@ -84,7 +84,12 @@ ...@@ -84,7 +84,12 @@
data() { data() {
return { return {
showChangePlan: true, showChangePlan: true,
selectedGroup: [] selectedGroup: [],
rules: {
planId: [
{ required: true, message: '请选择随访计划', trigger: 'change' },
],
},
} }
}, },
mounted() { mounted() {
...@@ -99,7 +104,7 @@ ...@@ -99,7 +104,7 @@
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getPlanOptions','getResidentList']), ...mapActions('planManage', ['getPlanOptions','getResidentList', 'getResidentDetail']),
selectGroup(val) { selectGroup(val) {
const _this = this const _this = this
_this.selectedGroup = [] _this.selectedGroup = []
...@@ -117,39 +122,52 @@ ...@@ -117,39 +122,52 @@
clickClose() { clickClose() {
this.$emit('closeChangePlan',false); this.$emit('closeChangePlan',false);
}, },
async changePlans() { changePlans() {
// this.clickClose() const _this = this
const { planPatientsId, planId, patientId, startDate } = this.planChangeData this.$refs['planChangeData'].validate(valid => {
// params.yLabelList = this.selectedGroup if (valid) {
// console.log('变更数据',params) const { planPatientsId, planId, patientId, startDate } = this.planChangeData;
changePlan({ changePlan({
planPatientsId, planPatientsId,
planId,
patientId,
yLabelList: this.selectedGroup,
startDate
}).then((data) => {
if(data.code == '000000') {
this.$message({
message: '变更计划成功!',
type: 'success'
});
this.getResidentList({
planId, planId,
status: this.planChangeData.status patientId,
}) yLabelList: this.selectedGroup,
this.clickClose() startDate
} else { }).then((data) => {
this.$message({ if(data.code == '000000') {
message: `${data.message}`, this.$message({
type: 'error' message: '变更计划成功!',
type: 'success'
});
if(this.$route.name == 'residentList') {
this.getResidentList({
planId: this.planChangeData.planIdOld,
status: this.planChangeData.status
});
} else if(this.$route.name == 'residentDetail') {
this.$router.push({path: '/followup/plan-manage/resident-detail', query: {patientId: patientId, planId: planId}})
this.getResidentDetail({
planId,
patientId
})
}
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
}); });
} else {
return false;
} }
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
}); });
}, },
}, },
...@@ -157,6 +175,7 @@ ...@@ -157,6 +175,7 @@
planChangeData(val) { planChangeData(val) {
const _this = this const _this = this
let labelList = val.yLabelList let labelList = val.yLabelList
console.log()
labelList.forEach(function (item, index) { labelList.forEach(function (item, index) {
let nodeItem = _this.groupList.filter(function(item1){ let nodeItem = _this.groupList.filter(function(item1){
return item1.labelId == item; return item1.labelId == item;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-form <el-form
:model="finishData" :model="finishData"
:rules="rules" :rules="rules"
label-width="100px"> label-width="100px" ref="finishData">
<el-form-item label="居民:"> <el-form-item label="居民:">
{{finishData.patientName}} {{finishData.patientName}}
</el-form-item> </el-form-item>
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
</template> </template>
<script> <script>
import { mapActions } from 'vuex';
import { finishPlan } from '../../../../utils/followup/followapis' import { finishPlan } from '../../../../utils/followup/followapis'
export default { export default {
name: "finish-followup", name: "finish-followup",
...@@ -64,33 +65,52 @@ ...@@ -64,33 +65,52 @@
} }
}, },
methods: { methods: {
...mapActions('planManage', ['getResidentList']),
clickClose() { clickClose() {
this.$emit('closeFinishFollowup',false) this.$emit('closeFinishFollowup',false)
}, },
finishFollowUp() { finishFollowUp() {
const { changeCode, planId, patientIdList } = this.finishData; this.$refs['finishData'].validate(valid => {
finishPlan({ if (valid) {
changeCode, const { changeCode, planId, patientIdList } = this.finishData;
planId, finishPlan({
patientIdList, changeCode,
}).then((data) => { planId,
if(data.code == '000000') { patientIdList,
this.$message({ }).then((data) => {
message: '操作成功!', if(data.code == '000000') {
type: 'success' this.$message({
message: '操作成功!',
type: 'success'
});
if(this.$route.name == 'residentList') {
this.getResidentList({
planId,
status: changeCode
})
} else if(this.$route.name == 'residentDetail') {
this.getResidentDetail({
planId,
patientId: patientIdList[0]
})
}
this.clickClose()
} else {
this.$message({
message: `${data.message}`,
type: 'error'
});
}
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
}); });
this.clickClose()
} else { } else {
this.$message({ return false;
message: `${data.message}`,
type: 'error'
});
} }
}).catch((err) => {
this.$message({
message: `${err.message}`,
type: 'error'
});
}); });
} }
} }
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
<el-dialog <el-dialog
title="已选居民" title="已选居民"
:visible.sync="showSelectedDialog" :visible.sync="showSelectedDialog"
v-if="isShowSelectedDialog"
:before-close="clickClose" :before-close="clickClose"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
...@@ -13,7 +12,7 @@ ...@@ -13,7 +12,7 @@
<el-button type="primary" size="small" @click="continueAdd">继续添加</el-button> <el-button type="primary" size="small" @click="continueAdd">继续添加</el-button>
</div> </div>
<el-table <el-table
:data="hasSelectedList" :data="eachHasSelectedList"
center center
style="width: 100%;margin-top: 20px;"> style="width: 100%;margin-top: 20px;">
<el-table-column <el-table-column
...@@ -48,12 +47,13 @@ ...@@ -48,12 +47,13 @@
<el-row type="flex" justify="end" class="margin-top20"> <el-row type="flex" justify="end" class="margin-top20">
<el-pagination <el-pagination
background background
v-if="hasSelectedList.length" v-if="eachHasSelectedList.length"
@size-change="handleSizeChangePre" @size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre" @current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:current-page="paginationSet.pageNum" :current-page="paginationSet.pageNum"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[5,10,50,100]"
:page-count="paginationSet.total"
:page-size="paginationSet.pageSize" :page-size="paginationSet.pageSize"
:total="paginationSet.total"> :total="paginationSet.total">
</el-pagination> </el-pagination>
...@@ -71,41 +71,41 @@ ...@@ -71,41 +71,41 @@
data() { data() {
return { return {
showSelectedDialog: true, showSelectedDialog: true,
eachHasSelectedList: [], // 由分页pageSize算出一页多少条数
paginationSet: { paginationSet: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 5,
total: 0 total: 0
}, },
} }
}, },
props: { props: {
isShowSelectedDialog: { //是否显示model hasSelectedList: Array, // 所有已选人数
type: Boolean,
default: function() {
return false;
}
},
hasSelectedList: {
type: Array,
default: function() {
return []
}
}
}, },
mounted() { mounted() {
// if(this.planId) { this.eachHasSelectedList = this.getPageList(this.hasSelectedList)
// const totalLength = this.hasSelectedList.length
// } this.paginationSet.total = totalLength
}, },
methods: { methods: {
getPageList(list){
const pageNum = this.paginationSet.pageNum -1
const pageSize = this.paginationSet.pageSize
return list.slice(pageNum,pageSize)
},
clickClose() { clickClose() {
this.$emit('closeSelectedDialog',false) this.$emit('closeSelectedDialog',false)
}, },
continueAdd() { continueAdd() {
this.$emit('continueAdd', false) this.$emit('continueAdd', false)
}, },
handleSizeChangePre() {}, handleSizeChangePre(val) {
handleCurrentChangePre() {}, console.log(val)
},
handleCurrentChangePre(val) {
this.paginationSet.pageNum = val
this.eachHasSelectedList = this.getPageList(this.hasSelectedList)
},
} }
} }
</script> </script>
......
...@@ -133,6 +133,15 @@ ...@@ -133,6 +133,15 @@
allSelects: [], allSelects: [],
eachSelects: [],//仅仅是操作选择的总人员 eachSelects: [],//仅仅是操作选择的总人员
// totalSelect: [],// 当前所选的人 // totalSelect: [],// 当前所选的人
labelId: '',
diseaseId: '',
age: '',
sex: '',
ageBegin: '',
ageEnd: '',
srvPackageId: '',
searchCondition: '',
patientsData: [], patientsData: [],
searchData: { searchData: {
sex: '性别', sex: '性别',
...@@ -173,41 +182,58 @@ ...@@ -173,41 +182,58 @@
watch: { watch: {
isShowSelectPatient(val){ isShowSelectPatient(val){
if(val){ if(val){
this.getPatientsList({pageNum: this.paginationSet.pageNum}) this.getPatientsList()
// 获取常量 性别、年龄 // 获取常量 性别、年龄
getBasicData({ getBasicData({
numList: 'P057,P006' numList: 'P057,P006'
}).then(res=>{ }).then(res=>{
this.sexOptions = [{
no: '',
value: '性别'
}];
this.sexOptions = this.sexOptions.concat(res.data.P006);//性别 this.sexOptions = this.sexOptions.concat(res.data.P006);//性别
this.ageOptions = [{
no: '',
value: '年龄范围'
}]
this.ageOptions = this.ageOptions.concat(res.data.P057);//年龄段 this.ageOptions = this.ageOptions.concat(res.data.P057);//年龄段
}) })
// 获取所有疾病 // 获取所有疾病
getAllDiseases().then(res=>{ getAllDiseases().then(res=>{
this.diseaseOptions = [{
diseaseId: '',
diseaseName: '基础疾病'
}]
this.diseaseOptions = this.diseaseOptions.concat(res.data); this.diseaseOptions = this.diseaseOptions.concat(res.data);
}) })
// 获取所有分组 // 获取所有分组
getAllLabels({type: 1}).then(res=>{ getAllLabels({type: 1}).then(res=>{
this.labelOptions = [{
labelId: '',
labelName: '分组'
}]
this.labelOptions = this.labelOptions.concat(res.data.labelNameList); this.labelOptions = this.labelOptions.concat(res.data.labelNameList);
}) })
} }
} }
}, },
methods: { methods: {
getPatientsList(opts){ getPatientsList(){
getPlanPatientsList({ const data = {
pageSize: this.paginationSet.pageSize, pageSize: this.paginationSet.pageSize,
pageNo: opts.pageNum, pageNo: this.paginationSet.pageNum,
labelId:opts.labelId, labelId:this.labelId,
diseaseId: opts.diseaseId, diseaseId: this.diseaseId,
age: opts.age, age: this.age,
sex: opts.sex, sex: this.sex,
ageBegin: opts.ageBegin, ageBegin: this.ageBegin,
ageEnd: opts.ageEnd, ageEnd: this.ageEnd,
srvPackageId:opts.srvPackageId, srvPackageId:this.srvPackageId,
searchCondition:opts.searchCondition, searchCondition:this.searchCondition,
}).then(res=>{ }
getPlanPatientsList(data).then(res=>{
if(res.data.patientList){ if(res.data.patientList){
this.patientsData = res.data.patientList //接口获取的当页居民 this.patientsData = res.data.patientList //接口获取的当页居民
this.getSex() this.getSex()
...@@ -222,6 +248,8 @@ ...@@ -222,6 +248,8 @@
} }
}) })
} }
}else{
this.patientsData = []
} }
}) })
}, },
...@@ -248,9 +276,8 @@ ...@@ -248,9 +276,8 @@
// 切换分页 // 切换分页
handleCurrentChangePre(val) { handleCurrentChangePre(val) {
console.log('handleCurrentChangePre') console.log('handleCurrentChangePre')
this.getPatientsList({ this.paginationSet.pageNum = val
pageNum: val this.getPatientsList()
})
}, },
clickClose(){ clickClose(){
this.$emit('closeSelectPatient',false) this.$emit('closeSelectPatient',false)
...@@ -261,45 +288,33 @@ ...@@ -261,45 +288,33 @@
handleSizeChangePre(val) { handleSizeChangePre(val) {
console.log('handleSizeChangePre') console.log('handleSizeChangePre')
this.paginationSet.pageSize = val this.paginationSet.pageSize = val
this.getPatientsList({ this.getPatientsList()
pageNum:this.paginationSet.pageNum
})
}, },
changeSex(val){ changeSex(val){
this.getPatientsList({ this.sex = val
sex: val, this.getPatientsList()
pageNum: this.paginationSet.pageNum
})
}, },
changeAge(val){ changeAge(val){
if(val=='年龄范围'){ if(val=='年龄范围'){
val = null val = null
} }
this.getPatientsList({ this.age = val;
age: val, this.ageBegin = this.ageDate(val).ageBegin;
ageBegin: this.ageDate(val).ageBegin, this.ageEnd = this.ageDate(val).ageEnd;
ageEnd: this.ageDate(val).ageEnd, this.getPatientsList()
pageNum: this.paginationSet.pageNum
})
}, },
changeDisease(val){ changeDisease(val){
this.getPatientsList({ this.diseaseId = val
diseaseId: val, this.getPatientsList()
pageNum: this.paginationSet.pageNum
})
}, },
changeLabel(val){ changeLabel(val){
this.getPatientsList({ this.labelId = val
labelId: val, this.getPatientsList()
pageNum: this.paginationSet.pageNum
})
}, },
searchHandler() { searchHandler() {
const searchCondition = this.searchData.searchCondition const searchCondition = this.searchData.searchCondition
this.getPatientsList({ this.searchCondition = searchCondition
searchCondition: searchCondition, this.getPatientsList()
pageNum: this.paginationSet.pageNum
})
}, },
ageDate(val){ ageDate(val){
var ageObj; var ageObj;
......
...@@ -6,16 +6,26 @@ ...@@ -6,16 +6,26 @@
<el-form-item prop="timeNo"> <el-form-item prop="timeNo">
<el-input <el-input
v-model="timeForm.timeNo" v-model="timeForm.timeNo"
type="number" type="tel"
size="small" size="small"
placeholder="请输入" placeholder="请输入"
:disabled="isStandedTemplate"
maxlength="2"
clearable /> clearable />
</el-form-item> </el-form-item>
<el-form-item prop="timeUnit" class="ml20"> <el-form-item prop="timeUnit" class="ml20">
<el-select v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled"> <el-select v-if="!isStandedTemplate" v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled">
<el-option <el-option
v-for="item in markOptions" v-for="(item,index) in markOptions"
:key="item.no" :key="index"
:label="item.value"
:value="item.no">
</el-option>
</el-select>
<el-select v-if="isStandedTemplate" v-model="timeForm.timeUnit" placeholder="请选择" :disabled="isStandedTemplate">
<el-option
v-for="(item,index) in markOptions"
:key="index"
:label="item.value" :label="item.value"
:value="item.no"> :value="item.no">
</el-option> </el-option>
...@@ -25,43 +35,76 @@ ...@@ -25,43 +35,76 @@
</el-form-item> </el-form-item>
<el-form-item label="随访方式" prop="type"> <el-form-item label="随访方式" prop="type">
<el-radio-group v-model="timeForm.type" size="small"> <el-radio-group v-model="timeForm.type" size="small">
<el-radio v-for="item in followTypeList" :label="item.no">{{item.value}}</el-radio> <el-radio v-for="(item,index) in followTypeList" :key="index" :label="item.no" :disabled="isStandedTemplate">{{item.value}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="提醒医生预约居民"> <el-form-item label="提醒医生预约居民">
<el-select <el-select
v-if="!isStandedTemplate"
v-model="timeForm.remindDay" v-model="timeForm.remindDay"
multiple multiple
:multiple-limit=3 :multiple-limit=3
@change="changeRemindDay" @change="changeRemindDay"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in remindOptions" v-for="(item,index) in remindOptions"
:key="item.no" :key="index"
:label="item.value" :label="item.value"
:value="item.no"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
<!--固定模板需要填充-->
<el-select
v-if="isStandedTemplate"
v-model="timeForm.remindDay"
multiple
:multiple-limit=3
:disabled="isStandedTemplate"
placeholder="请选择">
<el-option
v-for="(item,index) in remindOptionsCopy"
:key="index"
:label="item.startDaysStr"
:value="item.startDays">
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="推送患教"> <el-form-item label="推送患教">
<div style="display: flex"> <div style="display: flex">
<el-select <el-select
v-if="!isStandedTemplate"
v-model="timeForm.pushDay" v-model="timeForm.pushDay"
placeholder="选择推送时间" placeholder="选择推送时间"
clearable clearable
> >
<el-option <el-option
v-for="item in pushTimeOptions" v-for="(item,index) in pushTimeOptions"
:key="item.no" :key="index"
:label="item.value" :label="item.value"
:value="item.no"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
<!--固定模板需要填充-->
<el-select
v-if="isStandedTemplate"
v-model="timeForm.pushDay"
placeholder="选择推送时间"
clearable
:disabled="isStandedTemplate"
>
<el-option
:label="timeForm.startDaysStr"
:value="timeForm.pushDay">
</el-option>
</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">选择健康漫画</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">重选</el-button> <el-button type="text" @click="goSelectCartoon" v-if="!isStandedTemplate">重选</el-button>
<el-button type="text" @click="deleteClick">删除</el-button> <el-button type="text" @click="deleteClick" v-if="!isStandedTemplate">删除</el-button>
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
...@@ -71,21 +114,43 @@ ...@@ -71,21 +114,43 @@
</div> </div>
<el-form-item label="随访登记表"> <el-form-item label="随访登记表">
<el-select <el-select
v-if="!isStandedTemplate"
v-model="timeForm.followResourceId" v-model="timeForm.followResourceId"
multiple multiple
:multiple-limit=2 :multiple-limit=3
@change="changeFollowId" @change="changeFollowId"
placeholder="请选择"> placeholder="请选择">
<el-option <el-option
v-for="item in formOptions" v-for="(item,index) in formOptions"
:key="item.scaleNo" :key="index"
:label="item.name" :label="item.name"
:value="item.scaleNo"> :value="item.scaleNo">
</el-option> </el-option>
</el-select> </el-select>
<!--固定模板需要填充-->
<el-select
v-if="isStandedTemplate"
v-model="timeForm.followResourceId"
multiple
:multiple-limit=3
@change="changeFollowId"
:disabled="isStandedTemplate"
placeholder="请选择">
<el-option
v-for="(item,index) in formOptionsCopy"
:key="index"
:label="item.sendContent"
:value="item.startDays">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<select-cartoon :isSelectCartoon="isSelectCartoon" @closeSelectCartoon="closeSelectCartoon" @pushConmentMsg="pushConmentMsg"></select-cartoon> <select-cartoon
:isSelectCartoon="isSelectCartoon"
@closeSelectCartoon="closeSelectCartoon"
@pushConmentMsg="pushConmentMsg"
/>
</div> </div>
</template> </template>
<script> <script>
...@@ -106,10 +171,9 @@ ...@@ -106,10 +171,9 @@
callback(); callback();
} }
return { return {
remindOptionsCopy: [],//提升医生预约居民 - 标准模板
formOptionsCopy: [], //量表 - 标准模板
isSelectCartoon: false, isSelectCartoon: false,
// followResourceId: '',
// pushDay: '',
// remindDay: '',
timeFormRules: { timeFormRules: {
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' },{ validator: checkDay, trigger: 'blur' }], timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' },{ validator: checkDay, trigger: 'blur' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }], timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
...@@ -126,13 +190,44 @@ ...@@ -126,13 +190,44 @@
remindOptions:Array, remindOptions:Array,
pushTimeOptions:Array, pushTimeOptions:Array,
formOptions: Array, formOptions: Array,
patientIdList: Array patientIdList: Array,
isStandedTemplate: Boolean,
}, },
watch: { watch: {
// timeForm(val){ timeForm(val){
// this.timeForm = val this.timeForm = val
// console.log('表单子组件监听到的form数据',this.timeForm) if(this.isStandedTemplate){
// }, console.log('表单子组件监听到的form数据',this.timeForm)
this.timeForm.isDisabled = true
if(this.timeForm.remindList.length > 0){// remindDay
this.remindOptionsCopy = this.timeForm.remindList
this.timeForm.remindDay = []
this.timeForm.remindList.forEach((item)=>{
this.timeForm.remindDay.push(item.startDays)
})
}
if(this.timeForm.pushContentList.length > 0){//pushDay
let pushData = this.timeForm.pushContentList[0]
this.timeForm.pushDay = pushData.startDays
this.timeForm.startDaysStr = pushData.startDaysStr
this.timeForm.comentMsg = {
id: pushData.resourceId,
header_name: pushData.sendContent
}
this.closeSelectCartoon({
closeStatus: false,
hasSelected: this.timeForm.comentMsg
})
}
if(this.timeForm.followupList.length > 0){ //followResourceId
this.formOptionsCopy = this.timeForm.followupList
this.timeForm.followResourceId = []
this.timeForm.followupList.forEach((item)=>{
this.timeForm.followResourceId.push(item.startDays)
})
}
}
},
valBegin(val){ valBegin(val){
if(val){ if(val){
this.$refs[this.timeForm.formRef].validate((valid) => { this.$refs[this.timeForm.formRef].validate((valid) => {
...@@ -142,7 +237,6 @@ ...@@ -142,7 +237,6 @@
}, },
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)
...@@ -179,14 +273,14 @@ ...@@ -179,14 +273,14 @@
return formName; return formName;
}, },
goSelectCartoon() { goSelectCartoon() {
this.isSelectCartoon = true; this.isSelectCartoon = true;
}, },
closeSelectCartoon(val) { closeSelectCartoon(val) {
this.isSelectCartoon = val.closeStatus; this.isSelectCartoon = val.closeStatus;
this.timeForm.hasSelected = val.hasSelected; this.timeForm.hasSelected = val.hasSelected;
}, },
deleteClick() { deleteClick() {
this.timeForm.hasSelected = ''; this.timeForm.hasSelected = '';
}, },
pushConmentMsg(val){ pushConmentMsg(val){
this.timeForm.comentMsg = val this.timeForm.comentMsg = val
...@@ -194,8 +288,8 @@ ...@@ -194,8 +288,8 @@
patientIdList: this.patientIdList patientIdList: this.patientIdList
}).then(res=>{ }).then(res=>{
if(res.code=='000000'){ if(res.code=='000000'){
this.timeForm.wechatPatientNum = res.data.wechatPatientNum this.timeForm.wechatPatientNum = res.data.wechatPatientNum;
this.timeForm.messagePatientNum = res.data.messagePatientNum this.timeForm.messagePatientNum = res.data.messagePatientNum;
this.timeForm.totalNumber = this.timeForm.wechatPatientNum + this.timeForm.messagePatientNum this.timeForm.totalNumber = this.timeForm.wechatPatientNum + this.timeForm.messagePatientNum
}else{ }else{
this.$notify.success({ this.$notify.success({
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
> >
<set-time-form <set-time-form
v-if="index == activeTab" v-if="index == activeTab"
:isStandedTemplate="isStandedTemplate"
:timeForm="timeFormHas" :timeForm="timeFormHas"
:valBegin="valBegin" :valBegin="valBegin"
:saveValiedBegin="saveValiedBegin" :saveValiedBegin="saveValiedBegin"
...@@ -99,6 +100,7 @@ ...@@ -99,6 +100,7 @@
setTimeNodeList: Array, setTimeNodeList: Array,
patientIdList: Array, patientIdList: Array,
checkForm: Boolean, checkForm: Boolean,
isStandedTemplate: Boolean,
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
...@@ -119,12 +121,27 @@ ...@@ -119,12 +121,27 @@
} }
}, },
}, },
created() {
this.initNewForm();
this.getConstData()
console.log(this.isStandedTemplate)
if(this.isStandedTemplate){
this.deleteAddNode()
}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) {
this.timeForm.isDisabled = true; console.log(this.timeForm)
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit; if(this.timeForm){
this.timeForm.isDisabled = true;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
}
} }
}, },
checkForm(val){ checkForm(val){
...@@ -157,14 +174,6 @@ ...@@ -157,14 +174,6 @@
// this.setTimeNodeList1 = this.sortKey(this.setTimeNodeList,'timeNo') // this.setTimeNodeList1 = this.sortKey(this.setTimeNodeList,'timeNo')
}, },
}, },
created() {
this.initNewForm();
this.getConstData()
//初始化一个随访时间节点
this.activeTab = 'setNewRef';
this.timeForm.formRef = this.getNowTime();
console.log(this.timeForm.formRef)
},
methods: { methods: {
...mapActions('planManage', [ ...mapActions('planManage', [
'getDateUnit', 'getDateUnit',
...@@ -304,7 +313,7 @@ ...@@ -304,7 +313,7 @@
// 初始化新的表单 // 初始化新的表单
initNewForm(){ initNewForm(){
const timeFormInit = { const timeFormInit = {
formRef: '', formRef: this.getNowTime(),
type: '',//随访方式 type: '',//随访方式
timeNo: '',//随访时间 timeNo: '',//随访时间
timeUnit: '',//随访时间单位 timeUnit: '',//随访时间单位
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
<div class="edit-plan-content" v-if="activeTab === 'second'"> <div class="edit-plan-content" v-if="activeTab === 'second'">
<set-time-node <set-time-node
ref="getTimeNodeList" ref="getTimeNodeList"
:isStandedTemplate="isStandedTemplate"
:setTimeNodeList="setTimeNodeList" :setTimeNodeList="setTimeNodeList"
@setTimeNodeListOnCom="setTimeNodeListOnCom" @setTimeNodeListOnCom="setTimeNodeListOnCom"
:patientIdList="baseInfo.patientIdList" :patientIdList="baseInfo.patientIdList"
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
@sureSelectPatient="sureSelectPatient(arguments)" @sureSelectPatient="sureSelectPatient(arguments)"
/> />
<has-selected-patient <has-selected-patient
:isShowSelectedDialog="isShowSelectedDialog" v-if="isShowSelectedDialog"
:hasSelectedList="hasSelectedList" :hasSelectedList="hasSelectedList"
@closeSelectedDialog="closeSelectedDialog" @closeSelectedDialog="closeSelectedDialog"
@continueAdd="continueAdd" @continueAdd="continueAdd"
...@@ -110,7 +111,7 @@ ...@@ -110,7 +111,7 @@
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient'; import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
import HasSelectedPatient from '@/views/followup/plan-manage/dialog/has-selected-patient'; import HasSelectedPatient from '@/views/followup/plan-manage/dialog/has-selected-patient';
import SetTimeNode from '@/views/followup/plan-manage/dialog/set-time-node'; import SetTimeNode from '@/views/followup/plan-manage/dialog/set-time-node';
import {createFollowPlan} from '@/utils/followup/followapis' import { createFollowPlan, getFollowupTableTemplate } from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
...@@ -123,6 +124,8 @@ ...@@ -123,6 +124,8 @@
}, },
data() { data() {
return { return {
isStandedTemplate: false, // 是否是固定的随访模板
standedTimeNodeList: [], // 如果是国定随访模板,获取固定数据后不可更改,只读
checkForm: false, checkForm: false,
/*面包屑配置*/ /*面包屑配置*/
curmbFirst: '随访管理', curmbFirst: '随访管理',
...@@ -278,6 +281,17 @@ ...@@ -278,6 +281,17 @@
} }
if (valid) { if (valid) {
// this.$refs['statusForm'].resetFields(); // this.$refs['statusForm'].resetFields();
console.log('当前选择的随访模板id为',this.baseInfo.resourceId)
if(this.baseInfo.resourceId){
this.isStandedTemplate = true
getFollowupTableTemplate(this.baseInfo.resourceId).then(res=>{
this.standedTimeNodeList = res.data
this.getTimeNodeList(this.standedTimeNodeList)
})
}else{
this.isStandedTemplate = false
}
this.activeTab = 'second'; this.activeTab = 'second';
} else { } else {
return false; return false;
...@@ -288,6 +302,12 @@ ...@@ -288,6 +302,12 @@
this.activeTab = 'first'; this.activeTab = 'first';
}, },
}, },
beforeRouteLeave (to, from, next) {
// 离开页面,需要清除缓存的时间节点
this.getTimeNodeList([])
next()
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -66,14 +66,14 @@ ...@@ -66,14 +66,14 @@
<div class="content-div"> <div class="content-div">
<div class="c-title">推送患教:</div> <div class="c-title">推送患教:</div>
<div class="c-content more-content" v-for="item in nodeContent[0].pushContentList"> <div class="c-content more-content" v-for="item in nodeContent[0].pushContentList">
<p>{{item.startDaysStr}} <span class="click-text" >{{item.sendContent}}</span></p> <p>{{item.startDaysStr}} <span class="click-text" @click="goToShort(item.resourceUrl)">{{item.sendContent}}</span></p>
<p class="reminding">推送规则:优先微信推送,如果居民没关注云鹊医公众号,将短信推送,短信推送会消耗您的额度。推送详情请前往云鹊医app患教中心查询</p> <p class="reminding">推送规则:优先微信推送,如果居民没关注云鹊医公众号,将短信推送,短信推送会消耗您的额度。推送详情请前往云鹊医app患教中心查询</p>
</div> </div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">随访登记表:</div> <div class="c-title">随访登记表:</div>
<div class="c-content more-content"> <div class="c-content more-content">
<p class="click-text" v-for="item in nodeContent[0].followupList" >{{item.sendContent}}</p> <p class="click-text" v-for="item in nodeContent[0].followupList" @click="goToShort(item.resourceUrl)">{{item.sendContent}}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
this.showFollowTime = true this.showFollowTime = true
}, },
goToResidentList() { goToResidentList() {
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId: this.$route.query.planId}}) this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId: this.$route.query.planId, planName: this.planDetail.name}})
}, },
changePlan() { changePlan() {
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId: this.$route.query.planId}}) this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId: this.$route.query.planId}})
...@@ -137,6 +137,9 @@ ...@@ -137,6 +137,9 @@
closeFollowTime(isShow) { closeFollowTime(isShow) {
this.showFollowTime = isShow this.showFollowTime = isShow
}, },
goToShort(url) {
window.open(url)
},
}, },
watch: { watch: {
planDetail(val) { planDetail(val) {
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
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){
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:row.id}}) this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:row.id, planName: row.name}})
}, },
changeRow(row){ changeRow(row){
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:row.id}}) this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:row.id}})
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
@sureSelectPatient="sureSelectPatient(arguments)"> @sureSelectPatient="sureSelectPatient(arguments)">
</select-patient> </select-patient>
<has-selected-patient <has-selected-patient
:isShowSelectedDialog="isShowSelectedDialog" v-if="isShowSelectedDialog"
:hasSelectedList="hasSelectedList" :hasSelectedList="hasSelectedList"
@closeSelectedDialog="closeSelectedDialog" @closeSelectedDialog="closeSelectedDialog"
@continueAdd="continueAdd" /> @continueAdd="continueAdd" />
......
...@@ -84,14 +84,14 @@ ...@@ -84,14 +84,14 @@
<div class="content-div"> <div class="content-div">
<div class="c-title">推送患教:</div> <div class="c-title">推送患教:</div>
<div class="c-content more-content" v-for="item in nodeContent.pushContentList"> <div class="c-content more-content" v-for="item in nodeContent.pushContentList">
<p>{{item.startDaysStr}} <span class="click-text" >{{item.sendContent}}</span></p> <p>{{item.startDaysStr}} <span class="click-text" @click="goToShort(item.resourceUrl)" >{{item.sendContent}}</span></p>
<p class="reminding">推送规则:优先微信推送,如果居民没关注云鹊医公众号,将短信推送,短信推送会消耗您的额度。推送详情请前往云鹊医app患教中心查询</p> <p class="reminding">推送规则:优先微信推送,如果居民没关注云鹊医公众号,将短信推送,短信推送会消耗您的额度。推送详情请前往云鹊医app患教中心查询</p>
</div> </div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">随访登记表:</div> <div class="c-title">随访登记表:</div>
<div class="c-content more-content"> <div class="c-content more-content">
<p class="click-text" v-for="item in nodeContent.followupList">{{item.sendContent}}</p> <p class="click-text" v-for="item in nodeContent.followupList" @click="goToShort(item.resourceUrl)" >{{item.sendContent}}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -162,7 +162,8 @@ ...@@ -162,7 +162,8 @@
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,
} }
this.showChangePlan = true; this.showChangePlan = true;
}, },
...@@ -185,6 +186,9 @@ ...@@ -185,6 +186,9 @@
closeFinishFollowup(isShow) { closeFinishFollowup(isShow) {
this.showFinishFollowup = isShow this.showFinishFollowup = isShow
}, },
goToShort(url) {
window.open(url)
},
}, },
watch: { watch: {
timeNodeList(val) { timeNodeList(val) {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
:jumPathThird="jumPathThird"> :jumPathThird="jumPathThird">
</bread-crumb> </bread-crumb>
<div class="resident-content f-main-content screenSet"> <div class="resident-content f-main-content screenSet">
<p class="page-title">随访计划名称</p> <p class="page-title">{{planTitle}}</p>
<div class="search-div"> <div class="search-div">
<div class="search-input"> <div class="search-input">
<el-form :model="searchData" ref="searchData" :inline="true" :label-width="labelWidth"> <el-form :model="searchData" ref="searchData" :inline="true" :label-width="labelWidth">
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
:current-page="residentList.pageNum" :current-page="residentList.pageNum"
:page-sizes="[10, 20, 50, 100]" :page-sizes="[10, 20, 50, 100]"
:page-size="residentList.pageSize" :page-size="residentList.pageSize"
:total="residentList.total"> :total="statusTotal">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -183,10 +183,12 @@ ...@@ -183,10 +183,12 @@
initialPatientIdList: [], //初始居民 initialPatientIdList: [], //初始居民
showAddPatientTime: false,//是否展示添加居民选择时间 showAddPatientTime: false,//是否展示添加居民选择时间
addPatientData: {}, //选择时间数据 addPatientData: {}, //选择时间数据
statusTotal: null, //每种状态的总数
planTitle: '', //随访计划名称
} }
}, },
created() { created() {
const vm = this;
}, },
mounted() { mounted() {
this.getResidentList({ this.getResidentList({
...@@ -244,7 +246,8 @@ ...@@ -244,7 +246,8 @@
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,
} }
this.showChangePlan = true; this.showChangePlan = true;
}, },
...@@ -273,7 +276,7 @@ ...@@ -273,7 +276,7 @@
patientName: patientNames.join('、'), patientName: patientNames.join('、'),
patientIdList: patientIds, patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访', title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:' reasonName: this.status==3?'恢复原因:':'结束原因:',
}; };
} else { } else {
let patientIds = []; let patientIds = [];
...@@ -347,8 +350,27 @@ ...@@ -347,8 +350,27 @@
_this.initialPatientIdList.push(item.patientId) _this.initialPatientIdList.push(item.patientId)
}) })
} }
if(_this.status == 1) {
_this.statusTotal = val.notCount
} else if (_this.status == 2) {
_this.statusTotal = val.handCount
} else if (_this.status == 3) {
_this.statusTotal = val.yesCount
}
} }
},
beforeRouteEnter(to, from, next) {
next(vm=> {
if(from.name === 'planList') {
vm.curmbSecond = '计划管理'
vm.jumPathThird = '/followUp/plan-manage'
} else if(from.name === 'planDetail') {
vm.curmbSecond = '计划详情'
vm.jumPathThird = `/followUp/plan-manage/plan-detail?planId=${vm.$route.query.planId}`
}
vm.planTitle = vm.$route.query.planName
})
} }
} }
</script> </script>
......
...@@ -92,9 +92,14 @@ ...@@ -92,9 +92,14 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="160" width="160"
prop="appointmentTime"
label="随访预约时间" label="随访预约时间"
align="center"> align="center">
<template slot-scope="scope">
<span v-if="scope.row.status==1" style="color: #49C688;">未完成</span>
<span v-else-if="scope.row.status==2">待确认</span>
<span v-else-if="scope.row.status==4" style="color: #D5172E;">已拒绝</span>
<span v-else>{{scope.row.appointmentTime}}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="180" width="180"
...@@ -247,14 +252,14 @@ ...@@ -247,14 +252,14 @@
this.dialogDetailShow = true; this.dialogDetailShow = true;
}, },
setSearchData() { setSearchData() {
const { planName, mobilePhone, timeStatus, nickName } = this.searchData; const { planName, mobilePhone, timeStatus, nickname } = this.searchData;
let para = {} let para = {}
if(this.searchData.planTimes) { if(this.searchData.planTimes) {
para = { para = {
planName, planName,
mobilePhone, mobilePhone,
timeStatus, timeStatus,
nickName, nickname,
beginTime: this.searchData.planTimes[0], beginTime: this.searchData.planTimes[0],
endTime: this.searchData.planTimes[1], endTime: this.searchData.planTimes[1],
status: this.status status: this.status
...@@ -264,7 +269,7 @@ ...@@ -264,7 +269,7 @@
planName, planName,
mobilePhone, mobilePhone,
timeStatus, timeStatus,
nickName, nickname,
status: this.status status: this.status
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册