提交 3293a65a 编写于 作者: yi.li's avatar yi.li

发送预约校验

上级 b6597e58
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<el-row type="flex" justify="end" class="margin-top20"> <el-row type="flex" justify="end" class="margin-top20">
<el-pagination <el-pagination
background background
v-if="recordList.enteringDtos" v-if="hasData"
@size-change="handleSizeChangePre" @size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre" @current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
enteringRow: {}, enteringRow: {},
dialogDetailShow: false, dialogDetailShow: false,
isShowChangeDialog: false, isShowChangeDialog: false,
hasData: false,
} }
}, },
computed: { computed: {
...@@ -163,6 +164,11 @@ ...@@ -163,6 +164,11 @@
pageNo: currentPage || this.paginationSet.pageNo, pageNo: currentPage || this.paginationSet.pageNo,
pageSize: this.paginationSet.pageSize, pageSize: this.paginationSet.pageSize,
}); });
if(this.recordList.enteringDtos.length > 0) {
this.hasData = true;
}else {
this.hasData = false;
}
const {pageNo, pageSize, count, finishedCount, unfinishedCount} = this.recordList; const {pageNo, pageSize, count, finishedCount, unfinishedCount} = this.recordList;
if(this.activeName == ''){ if(this.activeName == ''){
this.paginationSet.total = count; this.paginationSet.total = count;
...@@ -212,7 +218,6 @@ ...@@ -212,7 +218,6 @@
}, },
sendRow(row){ sendRow(row){
// let saasUrl = getSaasDomain(`/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message?patientId=${row.patientId}&token=D74A6C7C61564EB1B3DC83251F33D173`); // 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}`); let saasUrl = getSaasDomain(`/pica-frontend/patientEduManage/pica_patient_edu_manage.html#/pageTab/message?patientId=${row.patientId}&token=${this._token}`);
window.open(saasUrl) window.open(saasUrl)
}, },
......
...@@ -338,6 +338,10 @@ ...@@ -338,6 +338,10 @@
}, },
closeSendReserve(val){ closeSendReserve(val){
this.isDialogShow = val; this.isDialogShow = val;
this.getReservationList({
...this.setSearchData(),
status: this.status,
})
}, },
closeTipsDialog(val){ closeTipsDialog(val){
this.isNoEnoughShow = val; this.isNoEnoughShow = val;
...@@ -346,31 +350,6 @@ ...@@ -346,31 +350,6 @@
this.isChangeReservation = val; this.isChangeReservation = val;
}, },
handleSelectionChange(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 i in val){
for(let j in val[i]) { for(let j in val[i]) {
if(j == 'fuPlanId') { if(j == 'fuPlanId') {
...@@ -389,6 +368,7 @@ ...@@ -389,6 +368,7 @@
} }
} }
this.selectionData = val; this.selectionData = val;
//统计选择的居民的patientId
let idsArray = []; let idsArray = [];
if (val.length > 0) { if (val.length > 0) {
for(let i=0; i<val.length; i++){ for(let i=0; i<val.length; i++){
...@@ -397,26 +377,25 @@ ...@@ -397,26 +377,25 @@
// this.ids = idsArray.join(",") // this.ids = idsArray.join(",")
this.ids = idsArray; 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 ){
aaa.push({patientId: i,size: obj[i]});
}
this.validContents = aaa;
// 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){ closeDetail(val){
this.dialogDetailShow = val; this.dialogDetailShow = val;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册