提交 44a0abb8 编写于 作者: yi.li's avatar yi.li

预约接口

上级 773036e7
......@@ -7,7 +7,8 @@ import {getPlanList,
getResidentDetail,
getBasicData,
changePlan,
createFollowPlan} from '../../utils/followup/followapis'
createFollowPlan,
deletePlan} from '../../utils/followup/followapis'
export default {
namespaced: true,
......@@ -27,7 +28,7 @@ export default {
setTimeNodeList: [], //新建计划设置时间节点
planList: {}, //随访计划列表
remarkOption: [], //随访计划备注常量
planStatusOption: [], //随访计划状态常量
planStatusOption: [], //随访计划状态常量,
},
mutations: {
GET_RESIDENT_LIST(state, payload) {
......
......@@ -17,7 +17,8 @@ export const envConfig = {
innerLoginUrl: 'http://localhost:8090/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
followUpSCSoSo: 'http://sosoapi.yunqueyi.com/sosoapi-web/pass/mock/73',
followUpSC: 'https://dev-sc.yunqueyi.com'
followUpSC: 'https://dev-sc.yunqueyi.com',
saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
},
dev: {
baseUrl: 'https://dev-sc.yunqueyi.com/',
......@@ -27,7 +28,8 @@ export const envConfig = {
loginUrl: 'https://dev-saas.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://dev-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
yuequeyiIndexUrl: 'https://dev-saas.yunqueyi.com/pica_index.html',
followUpSC: 'https://dev-sc.yunqueyi.com'
followUpSC: 'https://dev-sc.yunqueyi.com',
saasDomainUrl: 'https://dev-saas.yunqueyi.com/',
},
test: {
baseUrl: 'https://test1-sc.yunqueyi.com/',
......@@ -37,7 +39,8 @@ export const envConfig = {
loginUrl: 'https://test1.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://test1-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
followUpSC: 'https://test1-sc.yunqueyi.com',
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://test1.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://test1.yunqueyi.com/',
},
uat: {
baseUrl: 'https://uat-sc.yunqueyi.com/',
......@@ -47,7 +50,8 @@ export const envConfig = {
loginUrl: 'https://uat.yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://uat-sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
followUpSC: 'https://uat-sc.yunqueyi.com',
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://uat.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://uat.yunqueyi.com/',
},
pro: {
baseUrl: 'https://sc.yunqueyi.com/',
......@@ -57,6 +61,7 @@ export const envConfig = {
loginUrl: 'https://yunqueyi.com/pica-login/work_station.html',
innerLoginUrl: 'https://sso.yunqueyi.com/PICA_SSO_FE/html/pica_index.html',
followUpSC: 'https://sc.yunqueyi.com',
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html'
yuequeyiIndexUrl: 'https://www.yunqueyi.com/pica_index.html',
saasDomainUrl: 'https://www.yunqueyi.com/',
}
}
......@@ -136,12 +136,12 @@ export const getReservationList = (data) => {
description: '获取预约列表',
})
};
export const getCheckReservation = (params) => {
export const getCheckReservation = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/appointmentPatient/check/`),
method: 'get',
params: params,
url: getFollowUpSC(`/healths/notice/fu/doctor/appoint/pushValid`),
method: 'post',
data: data,
description: '发送预约校验',
})
};
......
......@@ -182,6 +182,11 @@ export function getBasicDataApi(url) {
return getConfigByEnvType('basicDataUrl') + url
}
// 获取saas端域名地址
export function getSaasDomain(url) {
return getConfigByEnvType('saasDomainUrl') + url
}
// 根据不同环境,生成URL
function getConfigByEnvType(urlType) {
return envConfig[process.env.BUILD_ENV][urlType]
......
......@@ -173,10 +173,23 @@
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:row.id}})
},
deleteRow(row){
this.$confirm('此操作将删除该条计划, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(() => {
deletePlan(row.id).then(({data}) => {
console.log('删除成功')
})
this.search(1);
})
this.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
handleSizeChangePre(pageSize){
......
......@@ -76,15 +76,21 @@
<p class="status">{{item.appointmentResult}}</p>
<p class="reason" v-if="item.reason">变更原因:{{item.reason}}</p>
</div>
<div class="list-item" v-if="enteringInfo.appointmentLogs.length == 0">
<p class="empty-p">暂无</p>
</div>
</div>
<div class="base-info console-list">
<div class="list-item">
<p class="title">患教资料</p>
</div>
<div class="list-item">
<div class="list-item" v-if="enteringInfo.eduData">
<p class="time">{{enteringInfo.eduData.timeNodeInfo}}</p>
<a class="link-p" :href="enteringInfo.eduData.shortUrl">{{enteringInfo.eduData.eduTitle}}</a>
</div>
<div class="list-item" v-if="!enteringInfo.eduData">
<p class="empty-p">暂无</p>
</div>
</div>
<div class="base-info console-list">
<div class="list-item">
......@@ -93,6 +99,9 @@
<div class="list-item" v-for="(item, index) in enteringInfo.fuTable" :key="index" v-if="enteringInfo.fuTable.length>0">
<p class="link-p">{{item.name}}</p>
</div>
<div class="list-item" v-if="enteringInfo.fuTable.length==0">
<p class="empty-p">暂无</p>
</div>
</div>
</div>
</el-dialog>
......@@ -156,6 +165,9 @@
.base-info {
padding: 0 10px;
border-bottom: 1px dashed #efefef;
&.pt10{
padding-top: 10px;
}
.base-content {
display: flex;
flex-direction: row;
......@@ -203,6 +215,10 @@
color: $picaGreen;
cursor: pointer;
}
.empty-p{
flex: 1;
color: #999;
}
}
}
}
......
......@@ -92,7 +92,8 @@
import BreadCrumb from "@/components/breadcrumb";
import followupDetail from "./dialog/followupDetail";
import ChangeFollowupStatus from "./dialog/change-followup-status";
import { mapState, mapActions } from 'vuex';
import { getSaasDomain } from '@/utils/index'
import { mapState,mapGetters, mapActions } from 'vuex';
export default {
components:{
......@@ -132,7 +133,10 @@
...mapState('recordManage',{
recordList: state => state.recordList,
enteringInfo: state => state.enteringInfo,
})
}),
...mapGetters([
'_token',
])
},
created() {
this.search(1);
......@@ -206,7 +210,12 @@
this.statusForm = row;
this.isShowChangeDialog = true;
},
sendRow(row){},
sendRow(row){
// let saasUrl = getSaasDomain(`/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message?patientId=${row.patientId}&token=D74A6C7C61564EB1B3DC83251F33D173`);
// console.log(saasUrl)
let saasUrl = getSaasDomain(`/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message?patientId=${row.patientId}&token=${this._token}`);
window.open(saasUrl)
},
handleSizeChangePre(pageSize){
this.paginationSet['pageSize'] = pageSize;
this.paginationSet['pageNo'] = 1;
......
......@@ -16,9 +16,9 @@
:label-position="'left'"
size="small">
<el-form-item label="已选居民">
<!--<span>{{checkData.total}}</span>-->
<span>{{selectList.length}}</span>
<span>(微信发送{{checkData.weChatNum}}人;短信发送{{checkData.messageNum}}人)</span>
<span>{{checkData.sendWechatResidentSize + checkData.sendMobileResidentSize}}</span>
<!--<span>{{selectList.length}}</span>-->
<span>(微信发送{{checkData.sendWechatResidentSize}}人;短信发送{{checkData.sendMobileResidentSize}}人)</span>
</el-form-item>
<el-form-item label="预约时间" required>
<div style="display: flex;">
......@@ -53,11 +53,11 @@
</div>
<div class="item">
<span class="title">本次推送:</span>
<p>{{checkData.total}}条(微信不限额推送{{checkData.weChatNum}}条;使用短信额度推送{{checkData.messageNum}}条)</p>
<p>{{checkData.sendWechatAppointSize + checkData.sendMobileAppointSize}}条(微信不限额推送{{checkData.sendWechatAppointSize}}条;使用短信额度推送{{checkData.sendMobileAppointSize}}条)</p>
</div>
<div class="item">
<span class="title">推送成功后剩余余额:</span>
<p>{{ checkData.messageCount - checkData.messageNum}}</p>
<span class="title">推送成功后剩余额度:</span>
<p>{{ checkData.sendedAvailableNum}}</p>
</div>
<p>提示:微信推送不消耗额度,建议您与居民绑定微信,关注云鹊健康微信公众号</p>
</div>
......@@ -79,7 +79,6 @@
reservationForm: {
appointmentDate: '',
appointmentRange: '',
// patientAppointList: [],
},
timeRangeOptions: [
{
......@@ -148,7 +147,7 @@
checkData: {},
selectList: { //已选择发送人员list
type: Array,
default: {},
default: [],
}
},
watch: {
......@@ -199,7 +198,8 @@
.warn-tips{
font-size: 12px;
color: #e6a23c;
padding-top: 5px;
line-height: 15px;
/*padding-top: 5px;*/
}
.el-dialog{
min-width: 580px!important;
......
......@@ -181,9 +181,10 @@
isChangeReservation: false, //变更预约状态dialog展示
selectionData: [],
selectList: [],
ids: '',
ids: [],
needPara: {},
dialogDetailShow: false,
validContents: [],
}
},
created() {
......@@ -273,20 +274,18 @@
if(this.selectionData.length > 0){
this.selectList = this.selectionData;
//发送预约校验接口
// await this.getCheckReservation({
await this.getCheckReservation({
// patientIds: this.ids
// })
// const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
// //判断短信余额是否不足
// // if(this.hasSmsBalance){
// if(parseInt(messageNum) <= parseInt(messageCount)){
// this.isDialogShow = true;
// }else {
// this.isNoEnoughShow = true;
// }
//暂时不校验
content: '',
validContents:this.validContents
})
const { sendFlag } = this.checkRevervationData
//判断短信余额是否不足
if(sendFlag){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
}else if(this.selectionData.length > 100){
this.$message.warning('每次最多选择100条单条随访进行预约!');
return false;
......@@ -306,19 +305,21 @@
});
this.selectList = newList;
//发送预约校验
// await this.getCheckReservation({
// patientIds: row.patientId
// })
// const { messageCount, messageNum, weChatNum, total} = this.checkRevervationData
// //判断短信余额是否不足
// // if(this.hasSmsBalance){
// if(parseInt(messageNum) <= parseInt(messageCount)){
// this.isDialogShow = true;
// }else {
// this.isNoEnoughShow = true;
// }
//暂时不做校验
await this.getCheckReservation({
content: '',
validContents: [{
patientId: row.patientId,
size: 1,
}],
// patientIds: [row.patientId]
})
const { sendFlag } = this.checkRevervationData
//判断短信余额是否不足
if(sendFlag){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
},
changeReserveClick(row){
this.needPara = {
......@@ -345,6 +346,31 @@
this.isChangeReservation = val;
},
handleSelectionChange(val){
// let obj = {};
// for(let i=0; i<val.length; i++){
// const pObj = val[i];
// const id = pObj['patientId'];
// const oo = obj[id];
// if (oo) {
// obj[id] = oo + 1;
// } else {
// obj[id] = 1;
// }
// }
// let arrNew = [];
// let objToStrMap = (obj) => {
// let strMap = new Map();
// for (let k of Object.keys(obj)) {
// strMap.set(k, obj[k]);
// }
// arrNew = [...strMap];
// return arrNew;
// }
// objToStrMap(obj)
// console.log('新数组',objToStrMap(obj))
// this.validContents = objToStrMap(obj)
for(let i in val){
for(let j in val[i]) {
if(j == 'fuPlanId') {
......@@ -368,8 +394,29 @@
for(let i=0; i<val.length; i++){
idsArray.push(val[i].patientId)
}
this.ids = idsArray.join(",")
// this.ids = idsArray.join(",")
this.ids = idsArray;
}
// let dedupeArr = Array.from(new Set(this.ids))
// let count = 0;
// let obj = {};//最终返回的数据
// dedupeArr.forEach(i => {
// count = 0;
// this.ids.forEach(j => {
// if(i === j){
// count++;
// }
// })
// obj[i] = count;
// })
// let i=0;
// let aaa = [];
// for(i in obj ){
// console.log(i+ ':' + obj[i]);
// aaa.push({[i]: obj[i]});
// }
// this.validContents.push(aaa);
},
closeDetail(val){
this.dialogDetailShow = val;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册