提交 2bd6119d 编写于 作者: qian.jie's avatar qian.jie

外呼新接口排班周切换

上级 5f3ca353
...@@ -280,3 +280,11 @@ export const getLeisureTime = async (data) => { ...@@ -280,3 +280,11 @@ export const getLeisureTime = async (data) => {
method: 'post', method: 'post',
}); });
}; };
export const outboundIntention = async (data) => {
return request({
url: '/diagnose/admin/diagnose/outbound/intention',
data: data,
method: 'post',
});
};
...@@ -90,8 +90,8 @@ ...@@ -90,8 +90,8 @@
</template> </template>
<script> <script>
import { updateDiagnosis } from '../../utils/diagnosis'; // import { updateDiagnosis } from '../../utils/diagnosis';
import { getLeisureTime } from '@/api/diagnosis'; import { getLeisureTime, outboundIntention } from '@/api/diagnosis';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
let vm = null; let vm = null;
export default { export default {
...@@ -136,8 +136,8 @@ ...@@ -136,8 +136,8 @@
assistantRemark: '', assistantRemark: '',
}, },
rangeTime: '', rangeTime: '',
startDate:'', startDate: '',
endDate:'', endDate: '',
chooseTime: dayjs(new Date()).format('YYYY-MM-DD'), chooseTime: dayjs(new Date()).format('YYYY-MM-DD'),
timeChoosetList: [], timeChoosetList: [],
chooseTimeIndex: 1000, chooseTimeIndex: 1000,
...@@ -152,8 +152,7 @@ ...@@ -152,8 +152,7 @@
}, },
}; };
}, },
watch: { watch: {},
},
created() { created() {
vm = this; vm = this;
console.log(this.departmentId, 'bizTypebizTypebizType'); console.log(this.departmentId, 'bizTypebizTypebizType');
...@@ -213,12 +212,10 @@ ...@@ -213,12 +212,10 @@
vm.isClick = true; vm.isClick = true;
const req = { const req = {
id: this.diagnoseLogId, id: this.diagnoseLogId,
bizType: this.bizType,
assistantBeginTime: this.startDate, assistantBeginTime: this.startDate,
assistantEndTime: this.endDate, assistantEndTime: this.endDate,
assistantRemark: this.model.assistantRemark,
}; };
updateDiagnosis(req) outboundIntention(req)
.then(function (res) { .then(function (res) {
vm.isClick = false; vm.isClick = false;
if (res.code == '000000') { if (res.code == '000000') {
......
...@@ -586,16 +586,25 @@ ...@@ -586,16 +586,25 @@
const objParms = {}; const objParms = {};
objParms.week = weekV ? weekV : this.week; objParms.week = weekV ? weekV : this.week;
objParms.workId = this.schedulingTypeValue.id; objParms.workId = this.schedulingTypeValue.id;
objParms.list = []; // objParms.list = [];
const lastData = [];
const data = this.calendarOptions.events; const data = this.calendarOptions.events;
console.log('data=======', data);
data.forEach((item) => { data.forEach((item) => {
if (item.week == (weekV ? weekV : this.week)) { if (item.week == (weekV ? weekV : this.week)) {
const obj = {}; const obj = {};
obj.startTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.start); obj.startTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.start);
obj.endTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.end); obj.endTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.end);
objParms.list.push(obj); lastData.push(obj);
} }
}); });
console.log('objParms=======', objParms);
objParms.list = lastData.filter((item) => {
return (
item.startTime.split(' ')[1] !== '12:00:00' &&
item.startTime.split(' ')[1] !== '17:00:00'
);
});
saveDutyRoster(objParms).then((res) => { saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
this.loading = false; this.loading = false;
...@@ -606,6 +615,7 @@ ...@@ -606,6 +615,7 @@
}); });
} }
this.isDoIt = false; this.isDoIt = false;
this.handleInitSearch(true);
} else { } else {
this.$message.error(res.message || '排班保存失败'); this.$message.error(res.message || '排班保存失败');
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册