|
@ -68,6 +68,7 @@ import { searchFormList } from "./data"; |
|
|
import request from "@/utils/request"; |
|
|
import request from "@/utils/request"; |
|
|
import { exportFile } from "@screen/utils/common"; |
|
|
import { exportFile } from "@screen/utils/common"; |
|
|
import { WarningType, WarningSubclass } from "@screen/utils/enum.js"; |
|
|
import { WarningType, WarningSubclass } from "@screen/utils/enum.js"; |
|
|
|
|
|
import { checkRole } from '@/utils/permission' |
|
|
|
|
|
|
|
|
const directionMapping = { |
|
|
const directionMapping = { |
|
|
1: "菏泽方向", |
|
|
1: "菏泽方向", |
|
@ -131,11 +132,12 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 刷新 |
|
|
// 刷新 |
|
|
onRefresh() { |
|
|
onRefresh() { |
|
|
|
|
|
this.checkFacility() |
|
|
this.searchData.pageNum = 1; |
|
|
this.searchData.pageNum = 1; |
|
|
this.$refs.searchComp.handleResetForm(); |
|
|
this.$refs.searchComp.handleResetForm(); |
|
|
}, |
|
|
}, |
|
|
initData() { |
|
|
initData() { |
|
|
|
|
|
this.checkFacility() |
|
|
perceivedEventsList(this.searchData, this.pageNum, this.pageSize).then( |
|
|
perceivedEventsList(this.searchData, this.pageNum, this.pageSize).then( |
|
|
(res) => { |
|
|
(res) => { |
|
|
if (res.code != 200) return Message.error(res?.msg); |
|
|
if (res.code != 200) return Message.error(res?.msg); |
|
@ -158,6 +160,31 @@ export default { |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|
}, |
|
|
}, |
|
|
|
|
|
checkFacility(){ |
|
|
|
|
|
if(checkRole(['101','102','103','104','105','106','107','108','109','110',]) && !checkRole(["admin"])){ |
|
|
|
|
|
if (checkRole(["101"])){ |
|
|
|
|
|
this.searchData.facilityName = "大学城收费站" |
|
|
|
|
|
} else if (checkRole(["102"])){ |
|
|
|
|
|
this.searchData.facilityName = "长清收费站" |
|
|
|
|
|
} else if (checkRole(["103"])){ |
|
|
|
|
|
this.searchData.facilityName = "孝里收费站" |
|
|
|
|
|
} else if (checkRole(["104"])){ |
|
|
|
|
|
this.searchData.facilityName = "平阴北收费站" |
|
|
|
|
|
} else if (checkRole(["105"])){ |
|
|
|
|
|
this.searchData.facilityName = "平阴收费站" |
|
|
|
|
|
} else if (checkRole(["106"])){ |
|
|
|
|
|
this.searchData.facilityName = "平阴南收费站" |
|
|
|
|
|
} else if (checkRole(["107"])){ |
|
|
|
|
|
this.searchData.facilityName = "东平收费站" |
|
|
|
|
|
} else if (checkRole(["108"])){ |
|
|
|
|
|
this.searchData.facilityName = "梁山东收费站" |
|
|
|
|
|
} else if (checkRole(["109"])){ |
|
|
|
|
|
this.searchData.facilityName = "梁山收费站" |
|
|
|
|
|
} else if (checkRole(["110"])){ |
|
|
|
|
|
this.searchData.facilityName = "嘉祥西收费站" |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onSizeChange(pageSize) { |
|
|
onSizeChange(pageSize) { |
|
|
this.pageSize = pageSize; |
|
|
this.pageSize = pageSize; |
|
|
this.initData(); |
|
|
this.initData(); |
|
|