diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 552422f..17b2187 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -501,14 +501,22 @@ return request({ url: '/business/dutyCheckResult/batchSave', method: 'post', - params - }) + params, + }); } // 防汛检查 export function watchPersonSignList(params) { return request({ url: '/business/watchPersonSign/list', method: 'get', - params + params, + }); +} + +export function dutyRecordInfobatchAdd(data) { + return request({ + url: '/business/dutyRecordInfo/batchAdd', + method: 'post', + data, }); } diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 552422f..17b2187 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -501,14 +501,22 @@ return request({ url: '/business/dutyCheckResult/batchSave', method: 'post', - params - }) + params, + }); } // 防汛检查 export function watchPersonSignList(params) { return request({ url: '/business/watchPersonSign/list', method: 'get', - params + params, + }); +} + +export function dutyRecordInfobatchAdd(data) { + return request({ + url: '/business/dutyRecordInfo/batchAdd', + method: 'post', + data, }); } diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue index 617d2bb..64c4407 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue @@ -39,28 +39,23 @@
- - -
- - {{ item.name }} + + {{ item.dutyUserName }}
关闭 - 确定 + 签到
@@ -68,27 +63,23 @@
-
- - {{ item.name }} + + {{ item.dutyUserName }}
关闭 - 确定 + 签到
@@ -140,6 +131,7 @@ drainageDispatchGetFbTodayDutyUserShift, drainageDispatchGetWatchCount, getResponseRecommend, + dutyRecordInfobatchAdd, } from '@/api/FloodControlAndDrainage.js'; import bus from '@/bus'; @@ -192,27 +184,32 @@ console.log('获取今日防汛值班', res); loading2.value = false; if (res && res.code == 200) { + res.data.map(item => { + if (item.dutyUserList && item.dutyUserList.length) { + item.dutyUserList.map(p => { + p.dutyShiftId = item.dutyShiftId; + p.dutyShiftName = item.dutyShiftName; + }); + } + }); + JRZBData.value = res.data; - let jrzb = JRZBData.value[0]?.dutyUserList; - let zbld = JRZBData.value[1]?.dutyUserList; - if (jrzb?.length > 0) { - jrzb.map(e => { - let obj = { - name: e.dutyUserName, - phone: e.dutyUserPhone, - }; - jrzbText.value.push(obj); - }); + let arr = []; + let arr2 = []; + arr = JRZBData.value.filter(item => { + return item.dutyShiftName == '领导值班'; + }); + if (arr && arr.length) { + zbldText.value = arr[0].dutyUserList; } - if (zbld?.length > 0) { - zbld.map(e => { - let obj = { - name: e.dutyUserName, - phone: e.dutyUserPhone, - }; - zbldText.value.push(obj); - }); + arr2 = JRZBData.value.filter(item => { + return item.dutyShiftName == '今日值班'; + }); + + if (arr2 && arr2.length) { + jrzbText.value = arr2[0].dutyUserList; } + console.log('获取到的数据', jrzbText.value, zbldText.value); } }, @@ -255,15 +252,19 @@ const checkedCities = ref([]); function zhiban(type) { - if (type == 1) { + visible.value = false; + visible2.value = false; + checkedCities.value = []; + if (type == 1 && jrzbText.value.length) { + visible.value = true; jrzbText.value.map(e => { - checkedCities.value.push(e.id); + checkedCities.value.push(e.dutyUserId); }); } - - if (type == 2) { + if (type == 2 && zbldText.value.length) { + visible2.value = true; zbldText.value.map(e => { - checkedCities.value.push(e.id); + checkedCities.value.push(e.dutyUserId); }); } } @@ -273,15 +274,34 @@ console.log('checkedCities', checkedCities.value); if (checkedCities.value.length > 0) { - let paams = { - checkIds: checkedCities.value.join(','), - }; - // let res = await dutyCheckResultBatchSave(paams); - // if (res && res.code == 200) { - // proxy.$modal.msgSuccess('操作成功'); - // dutyCheckInfoGetCheckCountFun(); - // visible.value = false; - // } + let pushArr = []; + + if (type == 1) { + jrzbText.value.map(e => { + if (checkedCities.value.includes(e.dutyUserId)) { + pushArr.push(e); + } + }); + } + if (type == 2) { + zbldText.value.map(e => { + if (checkedCities.value.includes(e.dutyUserId)) { + pushArr.push(e); + } + }); + } + + console.log('pushArr', pushArr); + // let params = { + // request: pushArr, + // }; + + let res = await dutyRecordInfobatchAdd(pushArr); + if (res && res.code == 200) { + proxy.$modal.msgSuccess('签到成功'); + visible.value = false; + visible2.value = false; + } } } diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 552422f..17b2187 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -501,14 +501,22 @@ return request({ url: '/business/dutyCheckResult/batchSave', method: 'post', - params - }) + params, + }); } // 防汛检查 export function watchPersonSignList(params) { return request({ url: '/business/watchPersonSign/list', method: 'get', - params + params, + }); +} + +export function dutyRecordInfobatchAdd(data) { + return request({ + url: '/business/dutyRecordInfo/batchAdd', + method: 'post', + data, }); } diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue index 617d2bb..64c4407 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue @@ -39,28 +39,23 @@
- - -
- - {{ item.name }} + + {{ item.dutyUserName }}
关闭 - 确定 + 签到
@@ -68,27 +63,23 @@
-
- - {{ item.name }} + + {{ item.dutyUserName }}
关闭 - 确定 + 签到
@@ -140,6 +131,7 @@ drainageDispatchGetFbTodayDutyUserShift, drainageDispatchGetWatchCount, getResponseRecommend, + dutyRecordInfobatchAdd, } from '@/api/FloodControlAndDrainage.js'; import bus from '@/bus'; @@ -192,27 +184,32 @@ console.log('获取今日防汛值班', res); loading2.value = false; if (res && res.code == 200) { + res.data.map(item => { + if (item.dutyUserList && item.dutyUserList.length) { + item.dutyUserList.map(p => { + p.dutyShiftId = item.dutyShiftId; + p.dutyShiftName = item.dutyShiftName; + }); + } + }); + JRZBData.value = res.data; - let jrzb = JRZBData.value[0]?.dutyUserList; - let zbld = JRZBData.value[1]?.dutyUserList; - if (jrzb?.length > 0) { - jrzb.map(e => { - let obj = { - name: e.dutyUserName, - phone: e.dutyUserPhone, - }; - jrzbText.value.push(obj); - }); + let arr = []; + let arr2 = []; + arr = JRZBData.value.filter(item => { + return item.dutyShiftName == '领导值班'; + }); + if (arr && arr.length) { + zbldText.value = arr[0].dutyUserList; } - if (zbld?.length > 0) { - zbld.map(e => { - let obj = { - name: e.dutyUserName, - phone: e.dutyUserPhone, - }; - zbldText.value.push(obj); - }); + arr2 = JRZBData.value.filter(item => { + return item.dutyShiftName == '今日值班'; + }); + + if (arr2 && arr2.length) { + jrzbText.value = arr2[0].dutyUserList; } + console.log('获取到的数据', jrzbText.value, zbldText.value); } }, @@ -255,15 +252,19 @@ const checkedCities = ref([]); function zhiban(type) { - if (type == 1) { + visible.value = false; + visible2.value = false; + checkedCities.value = []; + if (type == 1 && jrzbText.value.length) { + visible.value = true; jrzbText.value.map(e => { - checkedCities.value.push(e.id); + checkedCities.value.push(e.dutyUserId); }); } - - if (type == 2) { + if (type == 2 && zbldText.value.length) { + visible2.value = true; zbldText.value.map(e => { - checkedCities.value.push(e.id); + checkedCities.value.push(e.dutyUserId); }); } } @@ -273,15 +274,34 @@ console.log('checkedCities', checkedCities.value); if (checkedCities.value.length > 0) { - let paams = { - checkIds: checkedCities.value.join(','), - }; - // let res = await dutyCheckResultBatchSave(paams); - // if (res && res.code == 200) { - // proxy.$modal.msgSuccess('操作成功'); - // dutyCheckInfoGetCheckCountFun(); - // visible.value = false; - // } + let pushArr = []; + + if (type == 1) { + jrzbText.value.map(e => { + if (checkedCities.value.includes(e.dutyUserId)) { + pushArr.push(e); + } + }); + } + if (type == 2) { + zbldText.value.map(e => { + if (checkedCities.value.includes(e.dutyUserId)) { + pushArr.push(e); + } + }); + } + + console.log('pushArr', pushArr); + // let params = { + // request: pushArr, + // }; + + let res = await dutyRecordInfobatchAdd(pushArr); + if (res && res.code == 200) { + proxy.$modal.msgSuccess('签到成功'); + visible.value = false; + visible2.value = false; + } } } diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue index d770d5b..2f8febb 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue @@ -112,11 +112,11 @@
通知方式
- - - 短信 - 电话 - + + + 短信 + 电话 +
@@ -124,7 +124,7 @@
指令内容
- +
@@ -160,11 +160,12 @@ const ruleForm = ref({ instructions: '', phone: '', - fangshi: 1, + type: [1], + name: '', }); const rules = ref({ instructions: [{ required: true, message: '不能为空', trigger: 'blur' }], - fangshi: [{ required: true, message: '不能为空', trigger: 'blur' }], + type: [{ required: true, message: '不能为空', trigger: 'blur' }], phone: [{ required: true, message: '不能为空', trigger: 'blur' }], }); @@ -205,11 +206,16 @@ function diaodu(item) { console.log('点击了调度', item); coloseform(); + ruleForm.value = { + instructions: `区防办提醒您,当前${item.name}水位超限,请按照要求调度相关水务设施。`, + phone: item.phone, + type: [1], + name: item.name, + facilities: item.facilities, + userName: item.userName, + }; + console.log('ruleForm.value', ruleForm.value); showbox.value = true; - ruleForm.value = item; - - ruleForm.value.fangshi = 1; - ruleForm.value.instructions = `区防办提醒您,当前${item.name}水位超限,请按照要求调度相关水务设施。`; } function coloseform() { @@ -222,7 +228,10 @@ ruleForm.value = { instructions: null, phone: null, - fangshi: 1, + type: [1], + name: '', + facilities: '', + userName: '', }; proxy.resetForm('ruleFormRef'); } @@ -231,11 +240,14 @@ function submitForm() { proxy.$refs['ruleFormRef'].validate(valid => { if (valid) { + console.log('ruleForm.value', ruleForm.value); let data = { title: '武汉东湖生态环境和水务湖泊局', notice: ruleForm.value.instructions, - phones: ruleForm.value.phone, - fangshi: ruleForm.value.fangshi, + // phones: ruleForm.value.phone, + phones: '13419607299', + type: ruleForm.value.type.join(','), + name: ruleForm.value.name, }; drainageDispatchCall(data).then(res => { console.log(res.data); diff --git a/src/api/FloodControlAndDrainage.js b/src/api/FloodControlAndDrainage.js index 552422f..17b2187 100644 --- a/src/api/FloodControlAndDrainage.js +++ b/src/api/FloodControlAndDrainage.js @@ -501,14 +501,22 @@ return request({ url: '/business/dutyCheckResult/batchSave', method: 'post', - params - }) + params, + }); } // 防汛检查 export function watchPersonSignList(params) { return request({ url: '/business/watchPersonSign/list', method: 'get', - params + params, + }); +} + +export function dutyRecordInfobatchAdd(data) { + return request({ + url: '/business/dutyRecordInfo/batchAdd', + method: 'post', + data, }); } diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue index 617d2bb..64c4407 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Fuzhujuece/AuxiliaryResearchAndJudgmentLeft/component/Beonduty.vue @@ -39,28 +39,23 @@
- - -
- - {{ item.name }} + + {{ item.dutyUserName }}
关闭 - 确定 + 签到
@@ -68,27 +63,23 @@
-
- - {{ item.name }} + + {{ item.dutyUserName }}
关闭 - 确定 + 签到
@@ -140,6 +131,7 @@ drainageDispatchGetFbTodayDutyUserShift, drainageDispatchGetWatchCount, getResponseRecommend, + dutyRecordInfobatchAdd, } from '@/api/FloodControlAndDrainage.js'; import bus from '@/bus'; @@ -192,27 +184,32 @@ console.log('获取今日防汛值班', res); loading2.value = false; if (res && res.code == 200) { + res.data.map(item => { + if (item.dutyUserList && item.dutyUserList.length) { + item.dutyUserList.map(p => { + p.dutyShiftId = item.dutyShiftId; + p.dutyShiftName = item.dutyShiftName; + }); + } + }); + JRZBData.value = res.data; - let jrzb = JRZBData.value[0]?.dutyUserList; - let zbld = JRZBData.value[1]?.dutyUserList; - if (jrzb?.length > 0) { - jrzb.map(e => { - let obj = { - name: e.dutyUserName, - phone: e.dutyUserPhone, - }; - jrzbText.value.push(obj); - }); + let arr = []; + let arr2 = []; + arr = JRZBData.value.filter(item => { + return item.dutyShiftName == '领导值班'; + }); + if (arr && arr.length) { + zbldText.value = arr[0].dutyUserList; } - if (zbld?.length > 0) { - zbld.map(e => { - let obj = { - name: e.dutyUserName, - phone: e.dutyUserPhone, - }; - zbldText.value.push(obj); - }); + arr2 = JRZBData.value.filter(item => { + return item.dutyShiftName == '今日值班'; + }); + + if (arr2 && arr2.length) { + jrzbText.value = arr2[0].dutyUserList; } + console.log('获取到的数据', jrzbText.value, zbldText.value); } }, @@ -255,15 +252,19 @@ const checkedCities = ref([]); function zhiban(type) { - if (type == 1) { + visible.value = false; + visible2.value = false; + checkedCities.value = []; + if (type == 1 && jrzbText.value.length) { + visible.value = true; jrzbText.value.map(e => { - checkedCities.value.push(e.id); + checkedCities.value.push(e.dutyUserId); }); } - - if (type == 2) { + if (type == 2 && zbldText.value.length) { + visible2.value = true; zbldText.value.map(e => { - checkedCities.value.push(e.id); + checkedCities.value.push(e.dutyUserId); }); } } @@ -273,15 +274,34 @@ console.log('checkedCities', checkedCities.value); if (checkedCities.value.length > 0) { - let paams = { - checkIds: checkedCities.value.join(','), - }; - // let res = await dutyCheckResultBatchSave(paams); - // if (res && res.code == 200) { - // proxy.$modal.msgSuccess('操作成功'); - // dutyCheckInfoGetCheckCountFun(); - // visible.value = false; - // } + let pushArr = []; + + if (type == 1) { + jrzbText.value.map(e => { + if (checkedCities.value.includes(e.dutyUserId)) { + pushArr.push(e); + } + }); + } + if (type == 2) { + zbldText.value.map(e => { + if (checkedCities.value.includes(e.dutyUserId)) { + pushArr.push(e); + } + }); + } + + console.log('pushArr', pushArr); + // let params = { + // request: pushArr, + // }; + + let res = await dutyRecordInfobatchAdd(pushArr); + if (res && res.code == 200) { + proxy.$modal.msgSuccess('签到成功'); + visible.value = false; + visible2.value = false; + } } } diff --git a/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue b/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue index d770d5b..2f8febb 100644 --- a/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue +++ b/src/views/pictureOnMap/page/FloodControlAndDrainage/Jianceyujin/MonitoringWarningLeft/component/Hhsq.vue @@ -112,11 +112,11 @@
通知方式
- - - 短信 - 电话 - + + + 短信 + 电话 +
@@ -124,7 +124,7 @@
指令内容
- +
@@ -160,11 +160,12 @@ const ruleForm = ref({ instructions: '', phone: '', - fangshi: 1, + type: [1], + name: '', }); const rules = ref({ instructions: [{ required: true, message: '不能为空', trigger: 'blur' }], - fangshi: [{ required: true, message: '不能为空', trigger: 'blur' }], + type: [{ required: true, message: '不能为空', trigger: 'blur' }], phone: [{ required: true, message: '不能为空', trigger: 'blur' }], }); @@ -205,11 +206,16 @@ function diaodu(item) { console.log('点击了调度', item); coloseform(); + ruleForm.value = { + instructions: `区防办提醒您,当前${item.name}水位超限,请按照要求调度相关水务设施。`, + phone: item.phone, + type: [1], + name: item.name, + facilities: item.facilities, + userName: item.userName, + }; + console.log('ruleForm.value', ruleForm.value); showbox.value = true; - ruleForm.value = item; - - ruleForm.value.fangshi = 1; - ruleForm.value.instructions = `区防办提醒您,当前${item.name}水位超限,请按照要求调度相关水务设施。`; } function coloseform() { @@ -222,7 +228,10 @@ ruleForm.value = { instructions: null, phone: null, - fangshi: 1, + type: [1], + name: '', + facilities: '', + userName: '', }; proxy.resetForm('ruleFormRef'); } @@ -231,11 +240,14 @@ function submitForm() { proxy.$refs['ruleFormRef'].validate(valid => { if (valid) { + console.log('ruleForm.value', ruleForm.value); let data = { title: '武汉东湖生态环境和水务湖泊局', notice: ruleForm.value.instructions, - phones: ruleForm.value.phone, - fangshi: ruleForm.value.fangshi, + // phones: ruleForm.value.phone, + phones: '13419607299', + type: ruleForm.value.type.join(','), + name: ruleForm.value.name, }; drainageDispatchCall(data).then(res => { console.log(res.data); diff --git a/vite.config.js b/vite.config.js index aec6971..e1d3dcf 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,8 +7,8 @@ const Timestamp = new Date().getTime(); //随机时间戳 // let ipLink = 'https://server1.wh-nf.cn:8201/prod-api'; // let ipLink = 'http://192.168.16.135:9100'; -let ipLink = 'https://dhgx.wh-nf.cn:8201/prod-api'; -// let ipLink = 'http://192.168.16.124:9100'; +// let ipLink = 'https://dhgx.wh-nf.cn:8201/prod-api'; +let ipLink = 'http://192.168.16.124:9100'; // let ipLink = 'http://192.168.20.43:9100'; // 刘总 // let ipLink = 'http://192.168.16.43:9100';