|
|
@@ -125,11 +125,11 @@ export default { |
|
|
|
}) |
|
|
|
const warn = reactive({ |
|
|
|
warnList: [ |
|
|
|
{ icon: camera, label: '监控分布', value: 1, num: 0, list: [] }, |
|
|
|
{ icon: materials, label: '消防物资', value: 2, num: 0, list: [] }, |
|
|
|
{ icon: personnel, label: '防护人员', value: 3, num: 0, list: [] } |
|
|
|
{ icon: camera, label: '监控分布', value: 'camera', num: 0, list: [] }, |
|
|
|
{ icon: materials, label: '消防物资', value: 'materials', num: 0, list: [] } |
|
|
|
// { icon: personnel, label: '防护人员', value: 'personnel', num: 0, list: [] } |
|
|
|
], |
|
|
|
checkedWarn: [1, 2, 3] |
|
|
|
checkedWarn: ['camera', 'materials'] |
|
|
|
}) |
|
|
|
const task = reactive({ |
|
|
|
taskList: [], |
|
|
@@ -168,6 +168,8 @@ export default { |
|
|
|
const handleClick = (index) => { |
|
|
|
data.selectedTab = index |
|
|
|
if (index === 1) { |
|
|
|
data.portalTab = 'task' |
|
|
|
ques.checkedQues = QUESTION_TYPE.value?.map((item) => item.value) || null |
|
|
|
if (!data.showPatrol) { |
|
|
|
queryTaskList() |
|
|
|
const times = [formatDate(ques.times[0]), formatDate(ques.times[1])] |
|
|
@@ -177,6 +179,7 @@ export default { |
|
|
|
data.showWarning = false |
|
|
|
} else { |
|
|
|
getWarnList() |
|
|
|
warn.checkedWarn = ['camera', 'materials'] |
|
|
|
data.showWarning = true |
|
|
|
data.showPatrol = false |
|
|
|
} |
|
|
@@ -221,11 +224,12 @@ export default { |
|
|
|
} |
|
|
|
const res = await getQuestionList(params) |
|
|
|
if (res.code === 0) { |
|
|
|
ques.checkedQues = QUESTION_TYPE.value?.map((item) => item.value) || null |
|
|
|
ques.message = res.data?.map((item) => { |
|
|
|
item.icon = ICON_LIST[item.type] |
|
|
|
return item |
|
|
|
}) |
|
|
|
emit('send', { tabs: data.selectedTab, data: ques.message, type: ques.checkedQues }) |
|
|
|
emit('send', { tabs: data.selectedTab, data: ques.message, type: ques.checkedQues, ops: 'query' }) |
|
|
|
} else { |
|
|
|
ques.message = null |
|
|
|
} |
|
|
@@ -238,7 +242,7 @@ export default { |
|
|
|
warn.warnList[0].list = camera?.data || [] |
|
|
|
warn.warnList[1].num = maertral?.data?.length || 0 |
|
|
|
warn.warnList[1].list = maertral?.data || [] |
|
|
|
emit('send', { tabs: data.selectedTab, data: warn.warnList, type: warn.checkedWarn }) |
|
|
|
emit('send', { tabs: data.selectedTab, data: warn.warnList, type: warn.checkedWarn, ops: 'query' }) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
console.log(err) |
|
|
@@ -251,7 +255,7 @@ export default { |
|
|
|
* @return {*} |
|
|
|
*/ |
|
|
|
const handleWarnChange = async(value) => { |
|
|
|
emit('send', { tabs: data.selectedTab, data: warn.warnList, type: value }) |
|
|
|
emit('send', { tabs: data.selectedTab, data: warn.warnList, type: value, ops: 'select' }) |
|
|
|
} |
|
|
|
/** |
|
|
|
* @description: 变更僧林巡查问题选择 |
|
|
@@ -259,7 +263,7 @@ export default { |
|
|
|
* @return {*} |
|
|
|
*/ |
|
|
|
const handleQuesChange = async(value) => { |
|
|
|
emit('send', { tabs: data.selectedTab, data: ques.message, type: value }) |
|
|
|
emit('send', { tabs: data.selectedTab, data: ques.message, type: value, ops: 'select' }) |
|
|
|
} |
|
|
|
|
|
|
|
return { |