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

merge

此差异已折叠。
......@@ -48,10 +48,10 @@ export default {
},
created() {
vm = this
vm.getToken()
// vm.getToken()
},
mounted() {
},
methods: {
// 解密token
......@@ -69,13 +69,13 @@ export default {
} else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
}
return
}
}
}else {
if(!localStorage.getItem('storageToken')) {
window.location.href = getLoginUrl('?from=work&type=logout') // 没有token返回登录页面
return
return
}
}
vm.changeToken(vm.token)
......
......@@ -5,6 +5,7 @@ import {getPlanList,
getResidentList,
getGroupList,
getResidentDetail,
getBasicData,
changePlan} from '../../utils/followup/followapis'
export default {
......@@ -24,6 +25,8 @@ export default {
timeNodeList: [],
setTimeNodeList: [], //新建计划设置时间节点
planList: {}, //随访计划列表
remarkOption: [], //随访计划备注常量
planStatusOption: [], //随访计划状态常量
},
mutations: {
GET_RESIDENT_LIST(state, payload) {
......@@ -39,6 +42,12 @@ export default {
GET_PLAN_DETAIL(state, 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) {
state.nodeTimeList = payload
},
......@@ -83,6 +92,20 @@ export default {
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(payload).then(({data}) => {
context.commit('GET_NODE_TIME_LIST', data);
......@@ -107,6 +130,9 @@ export default {
// context.commit('GET_PLAN_OPTION', data);
});
},
getTimeNodeList(context, payload){
context.commit('SET_TIME_NODE_LIST', payload);
},
async getPlanList(context, payload) {
await getPlanList({
...payload
......
......@@ -189,18 +189,18 @@
type: Object,
},
valBegin: Boolean,
checkCallback: Function
},
watch: {
// valBegin(val){
// console.log(val)
// if(val){
// console.log('开始校验')
// this.$emit('getRefForm',this.timeForm.formRef)
// // console.log(this.checkCallback)
// // this.checkCallback(this.timeForm.formRef)
// }
// }
valBegin(val){
if(val){
// console.log('开始校验')
this.$refs[this.timeForm.formRef].validate((valid) => {
// console.log(valid)
this.$emit('checkValid',valid)
});
}
}
},
methods: {
getNowTime() {
......
......@@ -12,94 +12,12 @@
<div class="form-div" v-if="activeTab != 'setNewRef'">
<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 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">
<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>
<set-time-form :timeForm="timeForm" :valBegin="valBegin" @checkValid="checkValid" />
</div>
</div>
......@@ -132,8 +50,7 @@
},
data() {
return {
// checkCallback:null,
// valBegin: false,
valBegin: false,
isSelectCartoon: false,
activeTab: null,
currentFormRef: 1,
......@@ -216,12 +133,14 @@
},
}
},
props: {},
props: {
setTimeNodeList: Array
},
computed: {
...mapState('planManage',{
setTimeNodeList: state => state.setTimeNodeList,
}),
setTimeNodeList1:function(){
// ...mapState('planManage',{
// setTimeNodeList: state => state.setTimeNodeList,
// }),
setTimeNodeList1(){
return this.sortKey(this.setTimeNodeList,'followupTime')
},
followupMarkOne() {
......@@ -242,25 +161,9 @@
}
},
watch: {
// valBegin(val){
// if(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;
// }
// });
//
// }
// }
// },
valBegin(val){
this.valBegin = val
},
timeForm(newVal, oldVal) {
if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true;
......@@ -283,23 +186,30 @@
}
},
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) {
// console.log(this.activeTab !== 'setNewRef')
if(this.activeTab !== 'setNewRef') {
this.activeTab = 'setNewRef';
this.showSetBtn = true;
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime();
}else {
this.$refs[formName].validate((valid) => {
if (valid) {
this.setTimeNodeList.push(this.timeForm);
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true;
} else {
return;
}
});
// 触发校验
// console.log('触发校验')
this.valBegin = true
}
},
goSelectCartoon() {
......
......@@ -77,7 +77,7 @@
</div>
<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>
......@@ -163,7 +163,10 @@
})
},
methods: {
// ...mapActions('planManage', ['getResidentList', 'getGroupList']),
...mapActions('planManage', ['getTimeNodeList']),
setTimeNodeListOnCom(val){
this.getTimeNodeList(val)
},
selectPatientHandler() {
this.isShowSelectPatient = true;
},
......@@ -221,8 +224,10 @@
this.activeTab = 'first';
},
saveEdit() {
console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({
title: '',
......
......@@ -39,10 +39,10 @@
size="small"
clearable>
<el-option
v-for="item in kindOptions"
:key="item.value"
:label="item.label"
:value="item.value">
v-for="item in remarkOption"
:key="item.no"
:label="item.value"
:value="item.no">
</el-option>
</el-select>
</el-form-item>
......@@ -103,15 +103,6 @@
label: '随访模板三'
}
],
kindOptions: [
{
value: 0,
label: '上门随访'
}, {
value: 1,
label: '术后随访'
}
],
isShowSelectPatient: false, //显示居民选择框
isShowSelectedDialog: false, //显示已选居民
hasSelectedList: [], //已选居民
......@@ -120,20 +111,23 @@
},
mounted() {
this.getPlanDetail(this.$route.query.planId); //获取计划详情
this.getRemarkOption()
this.getNodeTimeList(this.$route.query.planId); // 获取随访时间列表
this.getResidentList({
planId: this.$route.query.planId
}); //已选居民
},
computed: {
...mapState('planManage', {
planDetail: state => state.planDetail,
nodeTimeList: state => state.nodeTimeList,
residentList: state => state.residentList,
remarkOption: state => state.remarkOption
})
},
methods: {
...mapActions('planManage', ['getPlanDetail', 'getNodeTimeList', 'getResidentList']),
...mapActions('planManage', ['getPlanDetail', 'getNodeTimeList', 'getResidentList', 'getRemarkOption']),
selectPatientHandler() {
this.isShowSelectPatient = true;
},
......
......@@ -178,16 +178,18 @@
this.getResidentList({
planId: this.$route.query.planId
});
this.getPlanStatusOption()
this.getGroupList(); //获取分组列表
},
computed: {
...mapState('planManage',{
residentList: state => state.residentList,
groupList: state => state.groupList
groupList: state => state.groupList,
planStatusOption: state => state.planStatusOption
})
},
methods: {
...mapActions('planManage', ['getResidentList', 'getGroupList']),
...mapActions('planManage', ['getResidentList', 'getGroupList', 'getPlanStatusOption']),
handleSizeChangePre(pageSize) {
this.getResidentList({
pageSize,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册