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

no message

上级 c910c5bb
...@@ -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,95 +12,12 @@ ...@@ -12,95 +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'">
<!--<set-time-form :timeForm="timeForm" :valBegin="valBegin" :checkCallback="checkCallback" />--> <set-time-form :timeForm="timeForm" :valBegin="valBegin" @checkValid="checkValid" />
<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>
</div> </div>
</div> </div>
...@@ -133,8 +50,7 @@ ...@@ -133,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,
...@@ -222,7 +138,7 @@ ...@@ -222,7 +138,7 @@
...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() {
...@@ -243,25 +159,9 @@ ...@@ -243,25 +159,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;
...@@ -284,15 +184,10 @@ ...@@ -284,15 +184,10 @@
} }
}, },
methods: { methods: {
addNewNode(formName) { checkValid(val){
if(this.activeTab !== 'setNewRef') { // console.log(val)
this.activeTab = 'setNewRef'; this.valBegin = false
this.showSetBtn = true; if (val) {
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime();
}else {
this.$refs[formName].validate((valid) => {
if (valid) {
this.setTimeNodeList.push(this.timeForm); this.setTimeNodeList.push(this.timeForm);
this.timeForm = _.cloneDeep(timeFormInit); this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime(); this.timeForm.formRef = this.getNowTime();
...@@ -300,7 +195,18 @@ ...@@ -300,7 +195,18 @@
} else { } else {
return; 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 {
// 触发校验
// console.log('触发校验')
this.valBegin = true
} }
}, },
goSelectCartoon() { goSelectCartoon() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册