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

no message

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