提交 f5f81a46 编写于 作者: xiaoping.di's avatar xiaoping.di

修改页面逻辑

...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
"axios": "^0.19.2", "axios": "^0.19.2",
"clipboard": "^2.0.6", "clipboard": "^2.0.6",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"dayjs": "^1.8.30", "dayjs": "^1.10.7",
"dsbridge": "^3.1.4", "dsbridge": "^3.1.4",
"element-ui": "^2.6.1", "element-ui": "^2.6.1",
"js-cookie": "^3.0.1", "js-cookie": "^3.0.1",
......
...@@ -265,3 +265,18 @@ export const opAck = async (data) => { ...@@ -265,3 +265,18 @@ export const opAck = async (data) => {
method: 'post', method: 'post',
}); });
}; };
export const acceptsCeiling = async (data) => {
return request({
url: '/diagnose/admin/diagnose/accepts/ceiling',
params: data,
method: 'get',
});
};
export const getLeisureTime = async (data) => {
return request({
url: '/diagnose/doctor/work/getLeisureTime',
data: data,
method: 'post',
});
};
...@@ -65,3 +65,16 @@ export const previewWork = async (data) => { ...@@ -65,3 +65,16 @@ export const previewWork = async (data) => {
data: data, data: data,
}); });
}; };
export const setPlatformUpper = async (data) => {
return request({
url: `/diagnose/doctor/work/setPlatformUpper/${data.num}`,
data: data,
method: 'post',
});
};
export const getPlatformUpper = async () => {
return request({
url: '/diagnose/doctor/work/getPlatformUpper',
method: 'post',
});
};
...@@ -91,6 +91,13 @@ ...@@ -91,6 +91,13 @@
align="center" align="center"
sortable sortable
/> />
<el-table-column
prop="createdId"
label="修改人ID"
width="170"
align="center"
sortable
/>
<el-table-column <el-table-column
prop="mobilePhone" prop="mobilePhone"
label="联系电话" label="联系电话"
......
...@@ -441,6 +441,7 @@ ...@@ -441,6 +441,7 @@
:diagnose-type="diagnoseType" :diagnose-type="diagnoseType"
:doctor-id="doctorId" :doctor-id="doctorId"
:range-time-data="rangeTimeData" :range-time-data="rangeTimeData"
:doctor-info="doctorInfo"
@search="search" @search="search"
@changeStartTime="changeStartTime" @changeStartTime="changeStartTime"
/> />
...@@ -621,6 +622,7 @@ ...@@ -621,6 +622,7 @@
}, },
timer: null, timer: null,
fromType: 0, // 1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台 fromType: 0, // 1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
doctorInfo: {},
}; };
}, },
watch: { watch: {
...@@ -1106,11 +1108,13 @@ ...@@ -1106,11 +1108,13 @@
}, },
// 设为待确认时间 // 设为待确认时间
waitMatchTime(row) { waitMatchTime(row) {
// debugger;
console.log(row, 'row'); console.log(row, 'row');
this.doctorInfo = row;
this.rangeTimeData = row.assistantBeginTime; this.rangeTimeData = row.assistantBeginTime;
this.diagnoseFlag = true; this.diagnoseFlag = true;
this.diagnosisDoctorVisible = true; this.diagnosisDoctorVisible = true;
// this.acceptsCeilings(row.doctorId);
this.diagnoseLogId = row.diagnoseLogId; this.diagnoseLogId = row.diagnoseLogId;
this.diagnoseType = row.diagnoseType; this.diagnoseType = row.diagnoseType;
if (row.doctorId == 0) { if (row.doctorId == 0) {
......
...@@ -62,6 +62,10 @@ ...@@ -62,6 +62,10 @@
overflow: hidden; overflow: hidden;
border-radius: 8px; border-radius: 8px;
} }
.agment-left-copy {
margin-top: 34px;
text-align: center;
}
.agment-head { .agment-head {
border-radius: 5px; border-radius: 5px;
display: flex; display: flex;
......
...@@ -15,6 +15,20 @@ ...@@ -15,6 +15,20 @@
:class="{ w2: week == 2, w3: week == 3 }" :class="{ w2: week == 2, w3: week == 3 }"
> >
<FullCalendar :options="calendarOptions" /> <FullCalendar :options="calendarOptions" />
<span>上限</span>
<div class="setMaxNum">
<div
v-for="(item, index) in maxList"
:key="index"
>
<el-input-number
v-model="item.preNum"
:min="0"
class="input-value"
@change="handleChange(item, index)"
/>
</div>
</div>
</div> </div>
<div <div
class="agment-box-left" class="agment-box-left"
...@@ -27,7 +41,7 @@ ...@@ -27,7 +41,7 @@
/> />
<!-- v-if="week == 2" --> <!-- v-if="week == 2" -->
<div <div
v-if="week == 3" v-if="week == 5"
class="ag-left2" class="ag-left2"
/> />
<!-- --> <!-- -->
...@@ -66,6 +80,19 @@ ...@@ -66,6 +80,19 @@
</div> </div>
</div> </div>
</div> </div>
<div
v-if="this.schedulingType != 3"
class="agment-left-copy"
>
<el-button
round
class="copy-submit"
style="width: 210px"
@click="copyDoctoreScheduling"
>
重复制上周排班
</el-button>
</div>
<div <div
v-if="this.schedulingType != 3" v-if="this.schedulingType != 3"
class="agment-left-button" class="agment-left-button"
...@@ -93,6 +120,7 @@ ...@@ -93,6 +120,7 @@
<script> <script>
// import '@fullcalendar/core/vdom' // import '@fullcalendar/core/vdom'
// import moment from 'moment'; // import moment from 'moment';
import dayjs from 'dayjs';
import FullCalendar from '@fullcalendar/vue'; import FullCalendar from '@fullcalendar/vue';
import dayGridPlugin from '@fullcalendar/daygrid'; import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid'; import timeGridPlugin from '@fullcalendar/timegrid';
...@@ -110,6 +138,16 @@ ...@@ -110,6 +138,16 @@
}, },
data() { data() {
return { return {
maxList: [
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
],
chooseList: true,
id: '', id: '',
doctorId: '', doctorId: '',
schedulingTypeValue: {}, schedulingTypeValue: {},
...@@ -164,7 +202,7 @@ ...@@ -164,7 +202,7 @@
}, },
expandRows: true, expandRows: true,
slotMinWidth: 50, slotMinWidth: 50,
slotDuration: '00:30:00', slotDuration: '01:00:00',
slotMinTime: '09:00', slotMinTime: '09:00',
slotMaxTime: '21:00', slotMaxTime: '21:00',
slotLabelInterval: '', slotLabelInterval: '',
...@@ -190,6 +228,8 @@ ...@@ -190,6 +228,8 @@
scrollerHeight: 0, scrollerHeight: 0,
loading: false, loading: false,
isDoIt: false, isDoIt: false,
getEveryDay: '',
copyArr: [],
}; };
}, },
watch: { watch: {
...@@ -249,22 +289,99 @@ ...@@ -249,22 +289,99 @@
} }
this.handleInitSearch(); this.handleInitSearch();
}, },
handleInitSearch(isReset) { handleChange(item, index) {
console.log(this.getEveryDay, 'this.getEveryDay');
this.maxList.map((itemChild, indexChild) => {
console.log(indexChild, 'indexChild');
return (itemChild.weekDay = dayjs(
dayjs(this.getEveryDay).add(indexChild, 'day')
).format('YYYY-MM-DD HH:mm:ss'));
});
this.maxList[index]['preNum'] = item.preNum;
console.log(this.maxList, 'this.maxList');
},
getCopyData(data) {
this.calendarOptions.events = [];
const copyList = [];
const addDay = 7;
data.noAcceptList.map((item) => {
const obj = {};
obj['startTime'] = dayjs(item.startTime)
.add(addDay, 'day')
.format('YYYY-MM-DD HH:mm:ss');
obj['endTime'] = dayjs(item.endTime)
.add(addDay, 'day')
.format('YYYY-MM-DD HH:mm:ss');
copyList.push(obj);
});
data.noAcceptList = copyList;
this.isDoIt = true;
},
getWeekMax(data) {
console.log(this.maxList, 'this.maxList');
if (data.countList.length > 0) {
data.countList.forEach((item) => {
const clistDay = dayjs(item.workDay).day();
let index = 1;
if (clistDay) {
index = clistDay;
} else {
index = 7;
}
// console.log(this.maxList, this.maxList[index - 1].preNum, 'index');
this.maxList[index - 1].preNum = item.preNum;
// debugger;
this.maxList[index - 1].weekDay = dayjs(item.workDay)
.add(7, 'day')
.format('YYYY-MM-DD HH:mm:ss');
console.log(this.maxList, 'clistDay');
});
}
},
handleInitSearch(isReset, type) {
if (isReset) { if (isReset) {
this.calendarOptions.events = this.calendarOptions.events.filter( this.calendarOptions.events = this.calendarOptions.events.filter(
(v) => v.week !== this.week (v) => v.week !== this.week
); );
console.log(this.calendarOptions.events); console.log(this.calendarOptions.events);
} }
let copyWeek = '';
if (type == 1) {
if (this.week == 1) {
copyWeek = 2;
} else if (this.week == 3) {
copyWeek = 1;
} else if (this.week == 4) {
copyWeek = 3;
} else if (this.week == 5) {
copyWeek = 4;
}
}
console.log(this.week, 'this.week');
const objParms = {}; const objParms = {};
objParms.doctorId = this.doctorId; objParms.doctorId = this.doctorId;
objParms.week = this.week; objParms.week = type == 1 ? copyWeek : this.week;
objParms.workId = this.id; objParms.workId = this.id;
// this.currentIndex = this.schedulingTypeValue.level; console.log(objParms.week, 'objParms.week');
dutyRosterQuery(objParms).then((res) => { dutyRosterQuery(objParms).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.calendarOptions.events = []; this.calendarOptions.events = [];
if (type == 1) {
this.getCopyData(res.data);
this.getWeekMax(res.data);
}
this.handleInitData(res.data); this.handleInitData(res.data);
if (res.data.countList.length > 0 && type != 1) {
const newAR = res.data.countList.map((item, index) => {
if (item.weekDay == this.maxList[index].weekDay) {
return {
preNum: item.preNum,
};
}
});
this.maxList = newAR;
console.log(newAR, 'newAR');
}
} else { } else {
this.$toast(res.message); this.$toast(res.message);
} }
...@@ -284,7 +401,6 @@ ...@@ -284,7 +401,6 @@
console.log(data.acceptList, 'data.acceptList'); console.log(data.acceptList, 'data.acceptList');
newDate = [].concat(acceptList, data.noAcceptList); newDate = [].concat(acceptList, data.noAcceptList);
} }
// const keyAll = ['end', 'endStr', 'id', 'start', 'startStr'];
newDate.forEach((item) => { newDate.forEach((item) => {
const dataObj = {}; const dataObj = {};
const id = (this.calendarOptions.events.length + 1) * 10; const id = (this.calendarOptions.events.length + 1) * 10;
...@@ -301,21 +417,36 @@ ...@@ -301,21 +417,36 @@
}); });
}, },
handleDatesSet(dataInfo) { handleDatesSet(dataInfo) {
this.getEveryDay = dayjs(dataInfo.startStr).format('YYYY-MM-DD HH:mm:ss');
console.log(
this.getEveryDay,
'dataInfo.startStrdataInfo.startStrdataInfo.startStr'
);
const currentTime = new Date().getTime(); const currentTime = new Date().getTime();
const getTime = new Date(dataInfo.startStr).getTime(); const getTime = new Date(dataInfo.startStr).getTime();
const cz = currentTime - getTime; const cz = currentTime - getTime;
const oneHour = 1 * 60 * 60 * 1000 * 24; const oneHour = 1 * 60 * 60 * 1000 * 24;
const timeDifference = (cz / oneHour) | 0; const timeDifference = (cz / oneHour) | 0;
const headObj = this.calendarOptions.customButtons.myCustomButton; const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'timeDifference');
// debugger;
if (timeDifference >= 0 && timeDifference < 7) { if (timeDifference >= 0 && timeDifference < 7) {
// 过去 // 过去
this.week = 1; this.week = 1;
headObj.text = '本周'; headObj.text = '本周';
} else if (timeDifference < 0) { } else if (timeDifference >= -6 && timeDifference <= -1) {
// 未来 // 未来
this.week = 3; this.week = 3;
headObj.text = '下周'; headObj.text = '下周';
} else { } else if (timeDifference >= -13 && timeDifference <= -7) {
// 未来
this.week = 4;
headObj.text = '下二周';
} else if (timeDifference >= -20 && timeDifference <= -14) {
// 未来
this.week = 5;
headObj.text = '下三周';
} else if (timeDifference > 7) {
// 现在 // 现在
headObj.text = '上周'; headObj.text = '上周';
this.week = 2; this.week = 2;
...@@ -355,7 +486,6 @@ ...@@ -355,7 +486,6 @@
.catch((_) => { .catch((_) => {
console.log(_); console.log(_);
}); });
// alert("你要取消日期吗");
}, },
eventDrop(event) { eventDrop(event) {
event.revert(); event.revert();
...@@ -428,6 +558,10 @@ ...@@ -428,6 +558,10 @@
resetDoctoreScheduling() { resetDoctoreScheduling() {
this.handleInitSearch(true); this.handleInitSearch(true);
}, },
copyDoctoreScheduling() {
this.handleInitSearch(true, 1);
console.log(this.copyArr, 'copyArr');
},
saveDoctoreScheduling(type, weekV = 0) { saveDoctoreScheduling(type, weekV = 0) {
if (this.isDoIt) { if (this.isDoIt) {
console.log(this.week, 'this.week', weekV); console.log(this.week, 'this.week', weekV);
...@@ -450,11 +584,9 @@ ...@@ -450,11 +584,9 @@
objParms.list.push(obj); objParms.list.push(obj);
} }
}); });
objParms.countReqList = this.maxList;
saveDutyRoster(objParms).then((res) => { saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
// this.$toast(res.message);
// this.handleInitSearch(true);
// this.$router.go(0);
this.loading = false; this.loading = false;
if (type == 1) { if (type == 1) {
this.$message({ this.$message({
...@@ -464,7 +596,6 @@ ...@@ -464,7 +596,6 @@
} }
this.isDoIt = false; this.isDoIt = false;
} else { } else {
// this.$toast(res.message);
this.$message.error(res.message || '排班保存失败'); this.$message.error(res.message || '排班保存失败');
} }
}); });
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
ref="agmentSelect" ref="agmentSelect"
class="serviceSchedule_select" class="serviceSchedule_select"
> >
<div class="agmentSelect-select-left">
<el-cascader <el-cascader
v-model="innerform" v-model="innerform"
class="serviceSchedule-cascader" class="serviceSchedule-cascader"
...@@ -42,13 +43,32 @@ ...@@ -42,13 +43,32 @@
查询 查询
</el-button> </el-button>
</div> </div>
<div class="agmentSelect-select-right">
设置系统单日接诊总上限
<el-input-number
v-model="maxDiaNum"
:step="1"
:min="10"
:max="1000000"
step-strictly
@change="getInputNumber"
/>
<el-button
type="primary"
class="submit-btn"
@click="setPlatformUpper"
>
保存
</el-button>
</div>
</div>
<div <div
class="fullCalendar-show" class="fullCalendar-show"
style="width: 100%" style="width: 100%"
> >
<div <div
class="fullCalendar-show-out" class="fullCalendar-show-out"
:style="{ width: getWidth }" :style="{ minWidth: getWidth, maxWidth: getMaxWidth }"
> >
<FullCalendar <FullCalendar
ref="fullCalendar" ref="fullCalendar"
...@@ -70,6 +90,8 @@ ...@@ -70,6 +90,8 @@
getFirstLevelLable, getFirstLevelLable,
childLabelList, childLabelList,
previewWork, previewWork,
setPlatformUpper,
getPlatformUpper,
} from '@/api/serviceSchedule'; } from '@/api/serviceSchedule';
export default { export default {
name: 'Index', name: 'Index',
...@@ -78,6 +100,7 @@ ...@@ -78,6 +100,7 @@
}, },
data() { data() {
return { return {
maxDiaNum: 100,
dateTime: '', dateTime: '',
interfaceOptions: [], interfaceOptions: [],
innerform: [], innerform: [],
...@@ -135,14 +158,37 @@ ...@@ -135,14 +158,37 @@
doctorList: [], doctorList: [],
index: 0, index: 0,
getWidth: '100%', getWidth: '100%',
getMaxWidth: '100%',
}; };
}, },
watch: {}, watch: {},
created() { created() {
this.getFirstLevelLable(); this.getFirstLevelLable();
this.getPlatformUpper();
}, },
mounted() {}, mounted() {},
methods: { methods: {
getPlatformUpper() {
getPlatformUpper().then((res) => {
if (res.code === '000000') {
console.log(res);
this.maxDiaNum = res.data;
}
});
},
setPlatformUpper() {
const params = {
num: this.maxDiaNum,
};
setPlatformUpper(params).then((res) => {
if (res.code === '000000') {
this.getPlatformUpper();
}
});
},
getInputNumber(value) {
console.log(value, 'getInputNumbergetInputNumber');
},
// 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据 // 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据
handleItemChange(val) { handleItemChange(val) {
const value = val[0]; const value = val[0];
...@@ -233,7 +279,42 @@ ...@@ -233,7 +279,42 @@
dutyRosterPreList, dutyRosterPreList,
dutyWorkList dutyWorkList
); );
// this.calendarOptions.resources.push(
// {id: 1000105468, title: '吴明豪1'},
// {id: 1000205468, title: '吴明豪2'},
// {id: 1000305468, title: '吴明豪3'},
// {id: 1000405468, title: '吴明豪4'},
// {id: 1000505468, title: '吴明豪5'},
// {id: 1000605468, title: '吴明豪5'},
// {id: 1000705468, title: '吴明豪5'},
// {id: 1000805468, title: '吴明豪5'},
// {id: 1000905468, title: '吴明豪5'},
// {id: 1001505468, title: '吴明豪5'},
// {id: 1002505468, title: '吴明豪5'},
// {id: 1003505468, title: '吴明豪5'},
// {id: 1004505468, title: '吴明豪5'},
// {id: 1005505468, title: '吴明豪5'},
// {id: 1006505468, title: '吴明豪5'},
// {id: 1007505468, title: '吴明豪5'},
// {id: 1008505468, title: '吴明豪5'},
// {id: 1009505468, title: '吴明豪5'},
// {id: 1017505468, title: '吴明豪5'},
// {id: 1027505468, title: '吴明豪5'},
// {id: 1037505468, title: '吴明豪5'},
// {id: 1047505468, title: '吴明豪5'},
// {id: 1057505468, title: '吴明豪5'},
// {id: 1067505468, title: '吴明豪5'},
// {id: 1077505468, title: '吴明豪5'},
// {id: 1087505468, title: '吴明豪5'},
// {id: 1097505468, title: '吴明豪5'},
// {id: 1018505468, title: '吴明豪5'},
// {id: 1009505468, title: '吴明豪5'},);
// this.calendarOptions.resources = [{id: 1000105468, title: '吴明豪1'}, {id: 1000205468, title: '吴明豪2'}, {id: 1008505468, title: '吴明豪5'}, {id: 1008505461, title: '吴明豪5'}];
const calendarApi = this.$refs.fullCalendar.getApi(); const calendarApi = this.$refs.fullCalendar.getApi();
this.getWidth = `${this.calendarOptions.resources.length * 150}px`;
this.getMaxWidth = `${
this.calendarOptions.resources.length * 150 + 100
}px`;
calendarApi.gotoDate(this.dateTime); calendarApi.gotoDate(this.dateTime);
console.log(this.calendarOptions.resources); console.log(this.calendarOptions.resources);
...@@ -262,9 +343,13 @@ ...@@ -262,9 +343,13 @@
background: #fff; background: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 20px 0 0px 20px; padding: 20px 0 10px 20px;
justify-content: space-between;
.agmentSelect-select-left {
display: flex;
align-items: center;
justify-content: flex-start;
.serviceSchedule-cascader { .serviceSchedule-cascader {
// height: 100%;
background: #fff; background: #fff;
margin-right: 15px; margin-right: 15px;
} }
...@@ -279,6 +364,23 @@ ...@@ -279,6 +364,23 @@
align-items: center; align-items: center;
} }
} }
.agmentSelect-select-right {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30px;
.el-input-number {
margin: 0 10px;
}
.submit-btn {
height: 32px;
background: #0d9078;
border-radius: 16px;
display: flex;
align-items: center;
}
}
}
.fullCalendar-show { .fullCalendar-show {
width: 100%; width: 100%;
overflow: scroll; overflow: scroll;
...@@ -332,6 +434,9 @@ ...@@ -332,6 +434,9 @@
// position: absolute !important; // position: absolute !important;
left: 0 !important; left: 0 !important;
} }
/deep/.fc-resource {
width: 150px;
}
.agment-box-left { .agment-box-left {
flex: 1; flex: 1;
height: 100%; height: 100%;
......
...@@ -4663,7 +4663,7 @@ dateformat@^2.0.0: ...@@ -4663,7 +4663,7 @@ dateformat@^2.0.0:
resolved "http://192.168.110.93:4873/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062" resolved "http://192.168.110.93:4873/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
integrity sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI= integrity sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=
dayjs@^1.8.30, dayjs@^1.8.31: dayjs@^1.10.7, dayjs@^1.8.31:
version "1.10.7" version "1.10.7"
resolved "http://192.168.110.93:4873/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468" resolved "http://192.168.110.93:4873/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468"
integrity sha1-LPX5Gt0oEWdIRAhmoKHSbzps5Gg= integrity sha1-LPX5Gt0oEWdIRAhmoKHSbzps5Gg=
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册