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

no message

上级 73a18de3
......@@ -279,3 +279,16 @@ export const getAllLabels = (params) => {
description: '获取所有分组',
})
}
// 获取微信和短信病人数接口
export const getPatientNumber = (data) => {
return fetch({
headers: {
sysCode: 9
},
url: getFollowUpSC(`/healths/patientEducation/getSendPatientTypeNum`),
method: 'post',
data: data,
description: '获取微信和短信病人数接口',
})
}
......@@ -17,7 +17,7 @@
center
style="width: 100%;margin-top: 20px;">
<el-table-column
prop="name"
prop="nickname"
label="姓名"
align="center">
</el-table-column>
......@@ -27,7 +27,7 @@
align="center">
</el-table-column>
<el-table-column
prop="idCardNum"
prop="id"
label="身份证号"
align="center"
min-width="220">
......
......@@ -34,6 +34,7 @@
<el-radio
v-for="(item, index) in cartoonList"
:key="index"
@change="changeComent(item)"
:label="item" class="radio-item">{{item.header_name}}</el-radio>
</el-radio-group>
</div>
......@@ -115,6 +116,9 @@
sureSelect() {
this.$emit('closeSelectCartoon', this.sendObj);
},
changeComent(item){
this.$emit('pushConmentMsg',item)
}
},
}
</script>
......
......@@ -72,7 +72,7 @@
align="center">
</el-table-column>
<el-table-column
prop="sex"
prop="sexStr"
label="性别"
align="center">
</el-table-column>
......@@ -210,6 +210,7 @@
}).then(res=>{
if(res.data.patientList){
this.patientsData = res.data.patientList //接口获取的当页居民
this.getSex()
this.paginationSet.total = res.data.totalRows
// // 设置所请求的当页人员是否成为选中状态
// if(this.patientIdList.length > 0){
......@@ -224,6 +225,17 @@
}
})
},
getSex(){
this.patientsData.forEach((item,index)=>{
if(item.sex==1){
this.patientsData[index].sexStr = '男'
}else if(item.sex==2){
this.patientsData[index].sexStr = '女'
}else{
this.patientsData[index].sexStr = '未知'
}
})
},
// 对选中的居民进行去重
removeDuplicates(list){
return Array.from(new Set(list))
......
......@@ -41,6 +41,7 @@
v-model="timeForm.remindDay"
multiple
:multiple-limit=3
@change="changeRemindDay"
placeholder="请选择">
<el-option
v-for="item in remindOptions"
......@@ -66,14 +67,14 @@
</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>
<span>{{comentMsg.header_name}}</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 class="yellow-font">当前计划中共{{totalNumber}}位居民(微信:{{wechatPatientNum}}位,短信:{{messagePatientNum}}位),本次定时推送任务在发送当日预计需要{{messagePatientNum}}条短信额度(微信推送不消耗额度,建议您让居民关注云鹊健康微信公众号),务必提前确保短信额度的充足。</p>
<p>需要更多额度,请前往「云鹊医App-个人中心-啾啾币中心」兑换短信额度后再进行预约,您也可以联系云鹊医客服购买短信额度,客服电话:400-920-8877</p>
</div>
<el-form-item label="随访登记表">
......@@ -91,12 +92,13 @@
</el-select>
</el-form-item>
</el-form>
<select-cartoon :isSelectCartoon="isSelectCartoon" @closeSelectCartoon="closeSelectCartoon"></select-cartoon>
<select-cartoon :isSelectCartoon="isSelectCartoon" @closeSelectCartoon="closeSelectCartoon" @pushConmentMsg="pushConmentMsg"></select-cartoon>
</div>
</template>
<script>
import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
import { getPatientNumber } from '@/utils/followup/followapis'
export default {
components: {
......@@ -111,6 +113,7 @@
callback();
}
return {
comentMsg: {},//选择的漫画信息
isSelectCartoon: false,
followResourceId: '',
pushDay: '',
......@@ -120,6 +123,9 @@
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
type: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
},
totalNumber: 0,
wechatPatientNum: 0,
messagePatientNum: 0
}
},
props: {
......@@ -131,7 +137,8 @@
followTypeList:Array,
remindOptions:Array,
pushTimeOptions:Array,
formOptions: Array
formOptions: Array,
patientIdList: Array
},
watch: {
valBegin(val){
......@@ -143,6 +150,9 @@
}
},
methods: {
changeRemindDay(){
},
getNowTime() {
const date = new Date();
const year = date.getFullYear();
......@@ -164,6 +174,17 @@
deleteClick() {
this.timeForm.hasSelected = '';
},
pushConmentMsg(val){
this.comentMsg = val
console.log(this.patientIdList)
getPatientNumber({
patientIdList: this.patientIdList
}).then(res=>{
this.wechatPatientNum = res.data.wechatPatientNum
this.messagePatientNum = res.data.messagePatientNum
this.totalNumber = this.wechatPatientNum + this.messagePatientNum
})
}
},
}
</script>
......
......@@ -31,6 +31,7 @@
:pushTimeOptions="pushTimeOptions"
:followTypeList="followTypeList"
:formOptions="formOptions"
:patientIdList="patientIdList"
@checkValid="checkValid"
/>
</div>
......@@ -45,6 +46,7 @@
:pushTimeOptions="pushTimeOptions"
:followTypeList="followTypeList"
:formOptions="formOptions"
:patientIdList="patientIdList"
@checkValid="checkValid"
/>
</div>
......@@ -98,7 +100,8 @@
}
},
props: {
setTimeNodeList: Array
setTimeNodeList: Array,
patientIdList: Array
},
computed: {
...mapState('planManage',{
......@@ -200,7 +203,8 @@
}
this.setTimeNodeList.push(this.timeForm);
this.timeForm = _.cloneDeep(timeFormInit);
// this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm = timeFormInit
this.timeForm.formRef = this.getNowTime();
this.timeForm.isDisabled = true;
this.$emit('setTimeNodeListOnCom',this.setTimeNodeList)
......@@ -209,7 +213,8 @@
}
},
addNewNode(formName) {
// console.log(this.activeTab !== 'setNewRef')
console.log(this.activeTab)
if(this.activeTab !== 'setNewRef') {
this.activeTab = 'setNewRef';
this.showSetBtn = true;
......@@ -217,9 +222,10 @@
this.timeForm.formRef = this.getNowTime();
}else {
// 触发校验
// console.log('触发校验')
this.valBegin = true
}
console.log(this.timeForm)
},
goSelectCartoon() {
this.isSelectCartoon = true;
......
......@@ -77,7 +77,12 @@
</div>
<div class="edit-plan-content" v-if="activeTab === 'second'">
<set-time-node ref="getTimeNodeList" :setTimeNodeList="setTimeNodeList" @setTimeNodeListOnCom="setTimeNodeListOnCom"></set-time-node>
<set-time-node
ref="getTimeNodeList"
:setTimeNodeList="setTimeNodeList"
@setTimeNodeListOnCom="setTimeNodeListOnCom"
:patientIdList="baseInfo.patientIdList"
/>
</div>
</div>
......@@ -175,11 +180,10 @@
let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0];
const selectPatients = getArguments[1]; // 每次选中获取的人
this.hasSelectedList = [];
this.hasSelectedList = selectPatients;
selectPatients.forEach((item)=>{
this.hasSelectedList.push(item.patientId); // 页面中数据存储所有选择的人,没有去重
this.baseInfo.patientIdList.push(item.patientId); // 页面中数据存储所有选择的人,没有去重
})
this.baseInfo.patientIdList = this.hasSelectedList
this.baseInfo.hasSelectedNum = this.baseInfo.patientIdList.length;
},
continueAdd(val) {
......@@ -200,10 +204,9 @@
});
},
nextClick(formName) {
this.getTimeNodeList([]);
// this.getTimeNodeList([]);
//为方便调试,不做校验
this.activeTab = 'second';
//用作校验
if(!this.baseInfo.hasSelectedNum) {
this.noChoice = true
......@@ -226,16 +229,22 @@
saveEdit() {
this.baseInfo.fPlanTimeReqList = this.setTimeNodeList
// 提交
createFollowPlan(this.baseInfo)
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
createFollowPlan(this.baseInfo).then(res=>{
if(res.code=='000000'){
this.getTimeNodeList([]);
// 各种校验通过后,提交编辑内容,toast提示
this.$notify.success({
title: '',
message: '创建成功',
showClose: false
});
this.$router.push({
path: '/followup/plan-manage/plan-list'
})
}
})
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
},
},
watch: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册