Commit ed698dee by pangchong

feat: 我的待办加入权限

parent 342da887
......@@ -74,6 +74,7 @@ import { timeStampFormat } from 'mocp/utils/tool'
import useBaseStore from 'mocp/store/base'
import { ref } from 'vue'
import { onUnload } from '@dcloudio/uni-app'
import { checkPermi } from 'mocp/utils/permission'
const taskList = {
1: {
......@@ -110,11 +111,13 @@ const ps = defineProps({
})
//跳转
const goDetails = (data, option) => {
windDamageManagementStore.setState('tabIndex', taskList[option.taskType].index)
windDamageManagementStore.setState('basicId', option.id)
windDamageManagementStore.setState('weatherId', data.id)
windDamageManagementStore.setState('weatherSource', data.weatherSource)
uni.$mocpJump.navigateTo(taskList[option.taskType].url)
if (checkPermi('/windDamageWorkInspection')) {
windDamageManagementStore.setState('tabIndex', taskList[option.taskType].index)
windDamageManagementStore.setState('basicId', option.id)
windDamageManagementStore.setState('weatherId', data.id)
windDamageManagementStore.setState('weatherSource', data.weatherSource)
uni.$mocpJump.navigateTo(taskList[option.taskType].url)
}
}
const handleQuery = ({ res }) => {
myToDoStore.setState('windDamageManagementNum', myToDoStore.countWindDamageManagementNum(res.data))
......
......@@ -39,6 +39,7 @@ import { getRqmListForMobileApi } from 'mocp/api/my-toDo'
import useUserStore from 'mocp/store/user'
import useMyToDoStore from 'mocp/store/my-toDo'
import { storeToRefs } from 'pinia'
import { checkPermi } from 'mocp/utils/permission'
const userStore = useUserStore()
const myToDoStore = useMyToDoStore()
......@@ -51,9 +52,11 @@ const ps = defineProps({
})
//跳转
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/appraisal-record/details', {
id: data.id
})
if (checkPermi('/AppraisalRecord')) {
uni.$mocpJump.navigateTo('/panel/appraisal-record/details', {
id: data.id
})
}
}
const handleQuery = ({ res }) => {
myToDoStore.setState('appraisalRecordNum', parseInt(res.total) || 0)
......
......@@ -54,6 +54,7 @@ import { getArrangeWorkListForAppApi } from 'mocp/api/my-toDo'
import useUserStore from 'mocp/store/user'
import useMyToDoStore from 'mocp/store/my-toDo'
import { storeToRefs } from 'pinia'
import { checkPermi } from 'mocp/utils/permission'
const userStore = useUserStore()
const myToDoStore = useMyToDoStore()
......@@ -65,7 +66,9 @@ const ps = defineProps({
}
})
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/assign-work/details', { id: data.id })
if (checkPermi('/assignWork')) {
uni.$mocpJump.navigateTo('/panel/assign-work/details', { id: data.id })
}
}
const handleQuery = ({ res }) => {
myToDoStore.setState('assignWorkNum', parseInt(res.data.total) || 0)
......
......@@ -47,6 +47,7 @@ import useMoveDecisionStore from 'mocp/store/move-decision'
import { getDecisiongetDecisionToDoApi } from 'mocp/api/my-toDo'
import useMyToDoStore from 'mocp/store/my-toDo'
import { storeToRefs } from 'pinia'
import { checkPermi } from 'mocp/utils/permission'
const myToDoStore = useMyToDoStore()
const { getMoveDecisionNum } = storeToRefs(myToDoStore)
......@@ -59,9 +60,11 @@ const ps = defineProps({
//跳转
const moveDecisionStore = useMoveDecisionStore()
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/move-decision/details', { id: data.id }).then(() => {
moveDecisionStore.setState('details', data)
})
if (checkPermi('/MoveDecision')) {
uni.$mocpJump.navigateTo('/panel/move-decision/details', { id: data.id }).then(() => {
moveDecisionStore.setState('details', data)
})
}
}
const handleQuery = ({ res }) => {
myToDoStore.setState('moveDecisionNum', parseInt(res.data.total) || 0)
......
......@@ -50,7 +50,7 @@ import useTechnologyEvaluationStore from 'mocp/store/technology-evaluation'
import { getTechnicalEvaluationToDoApi } from 'mocp/api/my-toDo'
import useMyToDoStore from 'mocp/store/my-toDo'
import { storeToRefs } from 'pinia'
import { getAirlineSelect } from 'mocp/utils/permission'
import { checkPermi, getAirlineSelect } from 'mocp/utils/permission'
const myToDoStore = useMyToDoStore()
const { getTechnologyEvaluationNum } = storeToRefs(myToDoStore)
......@@ -64,9 +64,11 @@ const ps = defineProps({
//跳转
const technologyEvaluationStore = useTechnologyEvaluationStore()
const goDetails = (data) => {
uni.$mocpJump.navigateTo('/panel/technology-evaluation/details', { id: data.id }).then(() => {
technologyEvaluationStore.setState('details', data)
})
if (checkPermi('/technologyEvaluation')) {
uni.$mocpJump.navigateTo('/panel/technology-evaluation/details', { id: data.id }).then(() => {
technologyEvaluationStore.setState('details', data)
})
}
}
const handleQuery = ({ res }) => {
myToDoStore.setState('technologyEvaluationNum', parseInt(res.data.total) || 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment