提交 77f1308d 编写于 作者: yi.li's avatar yi.li

merge

此差异已折叠。
...@@ -48,10 +48,10 @@ export default { ...@@ -48,10 +48,10 @@ export default {
}, },
created() { created() {
vm = this vm = this
vm.getToken() // vm.getToken()
}, },
mounted() { mounted() {
}, },
methods: { methods: {
// 解密token // 解密token
...@@ -69,13 +69,13 @@ export default { ...@@ -69,13 +69,13 @@ export default {
} else { } else {
if(!localStorage.getItem('storageToken')) { if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面 window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return return
} }
} }
}else { }else {
if(!localStorage.getItem('storageToken')) { if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面 window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return return
} }
} }
vm.changeToken(vm.token) vm.changeToken(vm.token)
......
...@@ -5,6 +5,7 @@ import {getPlanList, ...@@ -5,6 +5,7 @@ import {getPlanList,
getResidentList, getResidentList,
getGroupList, getGroupList,
getResidentDetail, getResidentDetail,
getBasicData,
changePlan} from '../../utils/followup/followapis' changePlan} from '../../utils/followup/followapis'
export default { export default {
...@@ -24,6 +25,8 @@ export default { ...@@ -24,6 +25,8 @@ export default {
timeNodeList: [], timeNodeList: [],
setTimeNodeList: [], //新建计划设置时间节点 setTimeNodeList: [], //新建计划设置时间节点
planList: {}, //随访计划列表 planList: {}, //随访计划列表
remarkOption: [], //随访计划备注常量
planStatusOption: [], //随访计划状态常量
}, },
mutations: { mutations: {
GET_RESIDENT_LIST(state, payload) { GET_RESIDENT_LIST(state, payload) {
...@@ -39,6 +42,12 @@ export default { ...@@ -39,6 +42,12 @@ export default {
GET_PLAN_DETAIL(state, payload) { GET_PLAN_DETAIL(state, payload) {
state.planDetail = payload state.planDetail = payload
}, },
GET_REMARK_OPTION(state, payload) {
state.remarkOption = payload.P211
},
GET_PLAN_STATUS_OPTION(state, payload) {
state.planStatusOption = payload.P216
},
GET_NODE_TIME_LIST(state, payload) { GET_NODE_TIME_LIST(state, payload) {
state.nodeTimeList = payload state.nodeTimeList = payload
}, },
...@@ -83,6 +92,20 @@ export default { ...@@ -83,6 +92,20 @@ export default {
context.commit('GET_PLAN_DETAIL', data); context.commit('GET_PLAN_DETAIL', data);
}); });
}, },
getRemarkOption(context, payload) {
getBasicData({
numList: 'P211'
}).then(({data}) => {
context.commit('GET_REMARK_OPTION', data);
});
},
getPlanStatusOption(context, payload) {
getBasicData({
numList: 'P216'
}).then(({data}) => {
context.commit('GET_PLAN_STATUS_OPTION', data);
});
},
getNodeTimeList(context, payload) { getNodeTimeList(context, payload) {
getNodeTimeList(payload).then(({data}) => { getNodeTimeList(payload).then(({data}) => {
context.commit('GET_NODE_TIME_LIST', data); context.commit('GET_NODE_TIME_LIST', data);
...@@ -107,6 +130,9 @@ export default { ...@@ -107,6 +130,9 @@ export default {
// context.commit('GET_PLAN_OPTION', data); // context.commit('GET_PLAN_OPTION', data);
}); });
}, },
getTimeNodeList(context, payload){
context.commit('SET_TIME_NODE_LIST', payload);
},
async getPlanList(context, payload) { async getPlanList(context, payload) {
await getPlanList({ await getPlanList({
...payload ...payload
......
...@@ -189,18 +189,18 @@ ...@@ -189,18 +189,18 @@
type: Object, type: Object,
}, },
valBegin: Boolean, valBegin: Boolean,
checkCallback: Function
}, },
watch: { watch: {
// valBegin(val){ valBegin(val){
// console.log(val)
// if(val){ if(val){
// console.log('开始校验') // console.log('开始校验')
// this.$emit('getRefForm',this.timeForm.formRef) this.$refs[this.timeForm.formRef].validate((valid) => {
// // console.log(this.checkCallback) // console.log(valid)
// // this.checkCallback(this.timeForm.formRef) this.$emit('checkValid',valid)
// } });
// } }
}
}, },
methods: { methods: {
getNowTime() { getNowTime() {
......
...@@ -12,94 +12,12 @@ ...@@ -12,94 +12,12 @@
<div class="form-div" v-if="activeTab != 'setNewRef'"> <div class="form-div" v-if="activeTab != 'setNewRef'">
<div :key="timeFormHas.formRef" v-for="(timeFormHas, index) in setTimeNodeList1" :label="index"> <div :key="timeFormHas.formRef" v-for="(timeFormHas, index) in setTimeNodeList1" :label="index">
<set-time-form v-if="index == activeTab" :timeForm="timeFormHas"></set-time-form> <set-time-form v-if="index == activeTab" :timeForm="timeFormHas" :valBegin="valBegin" @checkValid="checkValid" />
</div> </div>
</div> </div>
<div class="form-div" v-if="activeTab == 'setNewRef'"> <div class="form-div" v-if="activeTab == 'setNewRef'">
<el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small"> <set-time-form :timeForm="timeForm" :valBegin="valBegin" @checkValid="checkValid" />
<el-form-item label="本次随访时间" required>
<div style="display: flex;">
<el-form-item prop="followupTime">
<el-select v-model="timeForm.followupTime" placeholder="请选择">
<el-option
v-for="item in indexOptions"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="followupMark" class="ml20">
<el-select v-model="timeForm.followupMark" placeholder="请选择" :disabled="timeForm.isDisabled">
<el-option
v-for="item in markOptions"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
</div>
</el-form-item>
<el-form-item label="随访方式" prop="followupWay">
<el-radio-group v-model="timeForm.followupWay" size="small">
<el-radio :label="1">门诊随访</el-radio>
<el-radio :label="2">上门随访</el-radio>
<el-radio :label="3">电话随访</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="提醒医生预约居民">
<el-select
v-model="timeForm.remindTime"
multiple
:multiple-limit=3
placeholder="请选择">
<el-option
v-for="item in remindOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="推送患教">
<div style="display: flex">
<el-select v-model="timeForm.pushTime" placeholder="选择推送时间" clearable>
<el-option
v-for="item in pushTimeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-button plain class="ml20" @click="goSelectCartoon" v-if="!timeForm.hasSelected">选择健康漫画</el-button>
<div class="selected-div ml20" v-if="timeForm.hasSelected">
<span>《健康漫画名称》</span>
<el-button type="text" @click="goSelectCartoon">重选</el-button>
<el-button type="text" @click="deleteClick">删除</el-button>
</div>
</div>
</el-form-item>
<div class="tips-contnt" v-if="timeForm.hasSelected">
<p class="yellow-font">当前计划中共500位居民(微信:300位,短信:200位),本次定时推送任务在发送当日预计需要200条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div>
<el-form-item label="随访登记表">
<el-select
v-model="timeForm.followupForm"
multiple
:multiple-limit=3
placeholder="请选择">
<el-option
v-for="item in formOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div> </div>
</div> </div>
...@@ -132,8 +50,7 @@ ...@@ -132,8 +50,7 @@
}, },
data() { data() {
return { return {
// checkCallback:null, valBegin: false,
// valBegin: false,
isSelectCartoon: false, isSelectCartoon: false,
activeTab: null, activeTab: null,
currentFormRef: 1, currentFormRef: 1,
...@@ -216,12 +133,14 @@ ...@@ -216,12 +133,14 @@
}, },
} }
}, },
props: {}, props: {
setTimeNodeList: Array
},
computed: { computed: {
...mapState('planManage',{ // ...mapState('planManage',{
setTimeNodeList: state => state.setTimeNodeList, // setTimeNodeList: state => state.setTimeNodeList,
}), // }),
setTimeNodeList1:function(){ setTimeNodeList1(){
return this.sortKey(this.setTimeNodeList,'followupTime') return this.sortKey(this.setTimeNodeList,'followupTime')
}, },
followupMarkOne() { followupMarkOne() {
...@@ -242,25 +161,9 @@ ...@@ -242,25 +161,9 @@
} }
}, },
watch: { watch: {
// valBegin(val){ valBegin(val){
// if(val){ this.valBegin = val
// this.checkCallback = (formName)=>{ },
// console.log()
// this.$refs[formName].validate((valid) => {
// console.log(valid,'||||')
// if (valid) {
// this.setTimeNodeList.push(this.timeForm);
// this.timeForm = _.cloneDeep(timeFormInit);
// this.timeForm.formRef = this.getNowTime();
// this.timeForm.isDisabled = true;
// } else {
// return;
// }
// });
//
// }
// }
// },
timeForm(newVal, oldVal) { timeForm(newVal, oldVal) {
if(this.setTimeNodeList.length>0) { if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true; this.timeForm.isDisabled = true;
...@@ -283,23 +186,30 @@ ...@@ -283,23 +186,30 @@
} }
}, },
methods: { methods: {
checkValid(val){
// console.log(val)
this.valBegin = false
if (val) {
this.setTimeNodeList.push(this.timeForm);
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true;
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
} else {
return;
}
},
addNewNode(formName) { addNewNode(formName) {
// console.log(this.activeTab !== 'setNewRef')
if(this.activeTab !== 'setNewRef') { if(this.activeTab !== 'setNewRef') {
this.activeTab = 'setNewRef'; this.activeTab = 'setNewRef';
this.showSetBtn = true; this.showSetBtn = true;
this.timeForm = _.cloneDeep(timeFormInit); this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime(); this.timeForm.formRef = this.getNowTime();
}else { }else {
this.$refs[formName].validate((valid) => { // 触发校验
if (valid) { // console.log('触发校验')
this.setTimeNodeList.push(this.timeForm); this.valBegin = true
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true;
} else {
return;
}
});
} }
}, },
goSelectCartoon() { goSelectCartoon() {
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</div> </div>
<div class="edit-plan-content" v-if="activeTab === 'second'"> <div class="edit-plan-content" v-if="activeTab === 'second'">
<set-time-node ref="getTimeNodeList"></set-time-node> <set-time-node ref="getTimeNodeList" :setTimeNodeList="setTimeNodeList" @setTimeNodeListOnCom="setTimeNodeListOnCom"></set-time-node>
</div> </div>
</div> </div>
...@@ -163,7 +163,10 @@ ...@@ -163,7 +163,10 @@
}) })
}, },
methods: { methods: {
// ...mapActions('planManage', ['getResidentList', 'getGroupList']), ...mapActions('planManage', ['getTimeNodeList']),
setTimeNodeListOnCom(val){
this.getTimeNodeList(val)
},
selectPatientHandler() { selectPatientHandler() {
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
}, },
...@@ -221,8 +224,10 @@ ...@@ -221,8 +224,10 @@
this.activeTab = 'first'; this.activeTab = 'first';
}, },
saveEdit() { saveEdit() {
console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1) // console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// 各种校验通过后,提交编辑内容,toast提示 // 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({ this.$notify.success({
title: '', title: '',
......
...@@ -39,10 +39,10 @@ ...@@ -39,10 +39,10 @@
size="small" size="small"
clearable> clearable>
<el-option <el-option
v-for="item in kindOptions" v-for="item in remarkOption"
:key="item.value" :key="item.no"
:label="item.label" :label="item.value"
:value="item.value"> :value="item.no">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -103,15 +103,6 @@ ...@@ -103,15 +103,6 @@
label: '随访模板三' label: '随访模板三'
} }
], ],
kindOptions: [
{
value: 0,
label: '上门随访'
}, {
value: 1,
label: '术后随访'
}
],
isShowSelectPatient: false, //显示居民选择框 isShowSelectPatient: false, //显示居民选择框
isShowSelectedDialog: false, //显示已选居民 isShowSelectedDialog: false, //显示已选居民
hasSelectedList: [], //已选居民 hasSelectedList: [], //已选居民
...@@ -120,20 +111,23 @@ ...@@ -120,20 +111,23 @@
}, },
mounted() { mounted() {
this.getPlanDetail(this.$route.query.planId); //获取计划详情 this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getRemarkOption()
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表 this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
this.getResidentList({ this.getResidentList({
planId: this.$route.query.planId planId: this.$route.query.planId
}); //已选居民 }); //已选居民
}, },
computed: { computed: {
...mapState('planManage', { ...mapState('planManage', {
planDetail: state => state.planDetail, planDetail: state => state.planDetail,
nodeTimeList: state => state.nodeTimeList, nodeTimeList: state => state.nodeTimeList,
residentList: state => state.residentList, residentList: state => state.residentList,
remarkOption: state => state.remarkOption
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getPlanDetail', 'getNodeTimeList', 'getResidentList']), ...mapActions('planManage', ['getPlanDetail', 'getNodeTimeList', 'getResidentList', 'getRemarkOption']),
selectPatientHandler() { selectPatientHandler() {
this.isShowSelectPatient = true; this.isShowSelectPatient = true;
}, },
......
...@@ -178,16 +178,18 @@ ...@@ -178,16 +178,18 @@
this.getResidentList({ this.getResidentList({
planId: this.$route.query.planId planId: this.$route.query.planId
}); });
this.getPlanStatusOption()
this.getGroupList(); //获取分组列表 this.getGroupList(); //获取分组列表
}, },
computed: { computed: {
...mapState('planManage',{ ...mapState('planManage',{
residentList: state => state.residentList, residentList: state => state.residentList,
groupList: state => state.groupList groupList: state => state.groupList,
planStatusOption: state => state.planStatusOption
}) })
}, },
methods: { methods: {
...mapActions('planManage', ['getResidentList', 'getGroupList']), ...mapActions('planManage', ['getResidentList', 'getGroupList', 'getPlanStatusOption']),
handleSizeChangePre(pageSize) { handleSizeChangePre(pageSize) {
this.getResidentList({ this.getResidentList({
pageSize, pageSize,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册