Browse Source

非机预警 权限

develop
lau572 3 days ago
parent
commit
b0a074c33b
  1. 51
      ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue
  2. 31
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js
  3. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue

51
ruoyi-ui/src/views/JiHeExpressway/components/WarningNotify.vue

@ -18,7 +18,7 @@ import Cookies from 'js-cookie'
import request from "@/utils/request"; import request from "@/utils/request";
import { WarningType as warningTypeMapping, DirectionTypes as gzDirectionMapping, warningSourceMapping, warningStateMapping } from "@screen/utils/enum.js" import { WarningType as warningTypeMapping, DirectionTypes as gzDirectionMapping, warningSourceMapping, warningStateMapping } from "@screen/utils/enum.js"
import { param } from "../../../utils"; import { param } from "../../../utils";
import store from '@/store'
import { checkPermi } from "@/utils/permission.js"; import { checkPermi } from "@/utils/permission.js";
import { checkRole } from '@/utils/permission' import { checkRole } from '@/utils/permission'
export default { export default {
@ -80,13 +80,50 @@ export default {
duration: 0 duration: 0
} }
} else if(checkPermi(["home:notice:warningEvent"]) && para.subEvent === '1'){ } else if(checkPermi(["home:notice:warningEvent"]) && para.subEvent === '1'){
obj = {
content: para.content.content, //
time:para.content.event.warningTime, if (para.content.event.warningSource == '6'){
type: "signal", let roles = []
level: "info", if (para.content.event.stakeMark == 'K059+289'){
duration: 4000 roles = ['101']
} else if (para.content.event.stakeMark == 'K072+847'){
roles = ['102']
} else if (para.content.event.stakeMark == 'K086+499'){
roles = ['103']
} else if (para.content.event.stakeMark == 'K099+750'){
roles = ['104']
} else if (para.content.event.stakeMark == 'K105+904'){
roles = ['105']
} else if (para.content.event.stakeMark == 'K126+233'){
roles = ['106']
} else if (para.content.event.stakeMark == 'K145+933'){
roles = ['107']
} else if (para.content.event.stakeMark == 'K173+950'){
roles = ['108']
} else if (para.content.event.stakeMark == 'K179+396'){
roles = ['109']
} else if (para.content.event.stakeMark == 'K190+495'){
roles = ['110']
}
if(roles.length > 0 && checkRole(roles)){
obj = {
content: para.content.content,
time:para.content.event.warningTime,
type: "signal",
level: "info",
duration: 4000
}
}
} else {
obj = {
content: para.content.content,
time:para.content.event.warningTime,
type: "signal",
level: "info",
duration: 4000
}
} }
} else if(checkPermi(["home:notice:event"]) && para.subEvent === 'trafficFlowDataEarlyWarning'){ // } else if(checkPermi(["home:notice:event"]) && para.subEvent === 'trafficFlowDataEarlyWarning'){ //
obj = { obj = {
content: para.content.content, content: para.content.content,

31
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/data.js

@ -1,5 +1,34 @@
import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js"; import * as PresetFormItems from "@screen/pages/control/event/event/FormEvent/PresetFormItems.js";
import { warningType } from "@screen/utils/enum.js"; import { warningType } from "@screen/utils/enum.js";
import { checkRole } from '@/utils/permission'
export function checkFacility() {
if(checkRole(['101','102','103','104','105','106','107','108','109','110',]) && !checkRole(["admin"])){
if (checkRole(["101"])){
return "大学城收费站"
} else if (checkRole(["102"])){
return "长清收费站"
} else if (checkRole(["103"])){
return "孝里收费站"
} else if (checkRole(["104"])){
return "平阴北收费站"
} else if (checkRole(["105"])){
return "平阴收费站"
} else if (checkRole(["106"])){
return "平阴南收费站"
} else if (checkRole(["107"])){
return "东平收费站"
} else if (checkRole(["108"])){
return "梁山东收费站"
} else if (checkRole(["109"])){
return "梁山收费站"
} else if (checkRole(["110"])){
return "嘉祥西收费站"
} else {
return ""
}
}
}
export const searchFormList = [ export const searchFormList = [
@ -56,8 +85,10 @@ export const searchFormList = [
label: "收费站:", label: "收费站:",
key: "facilityName", key: "facilityName",
type: "select", type: "select",
default: checkFacility(),
options: { options: {
clearable: true, clearable: true,
disabled: checkRole(['101','102','103','104','105','106','107','108','109','110',]) && !checkRole(["admin"]),
options: [ options: [
], ],

29
ruoyi-ui/src/views/JiHeExpressway/pages/control/manual/events/index.vue

@ -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();

Loading…
Cancel
Save