diff --git a/.env.development b/.env.development index de4725c1..f3d7c10c 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,6 @@ NODE_ENV=development -VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/api -# VUE_APP_API_SERVER = http://192.168.1.140/api +# VUE_APP_API_SERVER = http://epmet-dev.elinkservice.cn:41080/api +VUE_APP_API_SERVER = http://192.168.1.140/api #家中开发连级的后端服务 # VUE_APP_API_SERVER = https://epmet-dev.elinkservice.cn:41080/api diff --git a/src/App.vue b/src/App.vue index 5d1e546d..f472317a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -178,4 +178,12 @@ export default { // background: linear-gradient(270deg, #0063FE, #0095FF); } } + +/* 列表-操作栏-更多的poppover样式 */ +.el-popover.btn-popper { + min-width: 80px !important; + margin-top: 5px !important; + padding: 6px !important; + background-color: rgb(247, 250, 253); +} diff --git a/src/assets/scss/buttonstyle.scss b/src/assets/scss/buttonstyle.scss index 2eabacde..7a60a21b 100644 --- a/src/assets/scss/buttonstyle.scss +++ b/src/assets/scss/buttonstyle.scss @@ -86,6 +86,13 @@ background-color: #4ec591 !important; border-color: #4ec591 !important; } +//列表上方操作按钮,其他按钮 +.diy-button--more { + color: #fff !important; + background-color: #23c1c4 !important; + border-color: #23c1c4 !important; +} + //table按钮样式 //查看 @@ -106,6 +113,27 @@ text-decoration: underline !important; } +//查看 +.div-table-button--detail--noline { + color: #3e8ef7 !important; +} + +//更多 +.div-table-button--more { + color: #333333 !important; + text-decoration: underline !important; +} + +//修改 +.div-table-button--edit--noline { + color: #00a7a9 !important; +} + +//删除 +.div-table-button--delete--noline { + color: #d51010 !important; +} + // .div-table-button--qr { color: #4ec591 !important; diff --git a/src/assets/scss/main-shuju.scss b/src/assets/scss/main-shuju.scss index 64eaa42c..092ff796 100644 --- a/src/assets/scss/main-shuju.scss +++ b/src/assets/scss/main-shuju.scss @@ -5,6 +5,14 @@ body { } +.m-iframe { + position: relative; + width: 100vw; + height: calc(100vh - 55px); + margin: -10px; + z-index: 100; +} + /* Reset element-ui ------------------------------ */ .g-bd { diff --git a/src/assets/scss/modules/management/epidemic.scss b/src/assets/scss/modules/management/epidemic.scss new file mode 100644 index 00000000..5d00bb1e --- /dev/null +++ b/src/assets/scss/modules/management/epidemic.scss @@ -0,0 +1,103 @@ +.epidemic-form { + .item_width_1 { + width: 560px; + } + .item_width_2 { + width: 220px; + } + .item_width_3 { + width: 180px; + } + + .btn-selperson { + margin-left: 20px; + } + + .form_div_btn { + margin-top: 20px; + text-align: center; + } +} + +.main_tab { + margin: 10px 35px; +} + +.div_main { + width: 100%; + + .div_search { + background: #ffffff; + border-radius: 4px; + padding: 30px 20px 5px; + box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); + } + + .list_item_width_1 { + width: 170px; + } +} + +.div_table { + background: #ffffff; + box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.1); + border-radius: 4px; + margin-top: 15px; + padding: 10px; + position: relative; + + .div_btn { + margin-top: 10px; + margin-left: 10px; + display: flex; + + .btn_upload { + margin-left: 10px; + display: flex; + } + } + .table { + margin-top: 20px; + } + + .div_notice { + position: absolute; + left: 15px; + bottom: 0; + } +} + +.more-btn { + display: flex; + flex-direction: column; + justify-content: center; +} +.div-mult-form { + margin-top: 20px; + + .div_person { + display: flex; + font-size: 14px; + padding-bottom: 20px; + + .person_title { + text-align: right; + flex: 0 0 100px; + + line-height: 36px; + padding: 0 12px 0 0; + } + + .tag_item { + margin-right: 10px; + margin-top: 10px; + } + .tag_tip { + margin-top: 10px; + color: #9c9c9c; + } + } +} +.div-mult-table { + padding: 0 20px; +} diff --git a/src/js/dai/request.js b/src/js/dai/request.js index 8365bd3e..92fb7831 100644 --- a/src/js/dai/request.js +++ b/src/js/dai/request.js @@ -38,6 +38,14 @@ const request = curry( if (res.data.code > 8000 && res.data.code < 10000) { // Message.error(res.data.msg); } + if (res.code == 10005 || res.code == 10006 || res.code == 10007) { + // 10005 token为空 10006登陆超时 10007别处登录 + console.log("登录失效"); + Message.error(res.data.msg); + return next({ + name: "login", + }); + } reslove(retData); }; diff --git a/src/js/dai/request2.js b/src/js/dai/request2.js index 8c38025d..0d257d33 100644 --- a/src/js/dai/request2.js +++ b/src/js/dai/request2.js @@ -38,6 +38,14 @@ const request = curry( if (res.data.code > 8000 && res.data.code < 10000) { Message.error(res.data.msg); } + if (res.code == 10005 || res.code == 10006 || res.code == 10007) { + // 10005 token为空 10006登陆超时 10007别处登录 + console.log("登录失效"); + Message.error(res.data.msg); + return next({ + name: "login", + }); + } reslove(retData); }; diff --git a/src/js/store/modules/app.js b/src/js/store/modules/app.js index b9a493a9..4384a1c1 100644 --- a/src/js/store/modules/app.js +++ b/src/js/store/modules/app.js @@ -5,13 +5,15 @@ export default { clientHeight: document.documentElement.clientHeight, size: 'medium', resolution: 'medium', - env: 'dev' + env: 'dev', + iframeHeight:120 }, getters: { clientHeight: (state) => state.clientHeight, size: (state) => state.size, resolution: (state) => state.resolution, - env: (state) => state.env + env: (state) => state.env, + iframeHeight: (state) => state.iframeHeight }, mutations: { [type.client_height](state, payload) { diff --git a/src/router/index.js b/src/router/index.js index 8b2d8ab6..9712a81a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -179,7 +179,7 @@ const router = new Router({ router.beforeEach((to, from, next) => { // 添加动态(菜单)路由 // 已添加或者当前路由为页面路由, 可直接访问 - if(to.name==='caiji'){ + if (to.name === "caiji") { return next(); } if ( @@ -319,11 +319,13 @@ router.beforeEach((to, from, next) => { // url: "visual/basicinfo/basicInfoMain", children: [ { - url: "/visual/ai/index", - name: "AI安防", + url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel", + // url: "/visual/ai/index", + name: "视频监控", id: "5feawfwa111111efwa57", }, - { + /*{ + // url: "http://www.baidu.com", url: "/visual/ai/renliu", name: "人流数据", id: "5fwaefwae222112fawef58", @@ -342,10 +344,11 @@ router.beforeEach((to, from, next) => { url: "/visual/ai/gongdan", name: "工单数据", id: "fewafwafewaefddd", - }, + },*/ { - url: "/visual/ai/yujing", - name: "预警事件", + // url: "/visual/ai/yujing", + url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis", + name: "预警分析", id: "545345fdsfs", }, ], @@ -356,11 +359,13 @@ router.beforeEach((to, from, next) => { http .get("/gov/access/menu/nav") .then(({ data: res }) => { - if (res.code !== 0) { - // Vue.prototype.$message.error(res.msg) - // return next({ - // name: "login", - // }); + if (res.code == 10005 || res.code == 10006 || res.code == 10007) { + // 10005 token为空 10006登陆超时 10007别处登录 + console.log("登录失效"); + Vue.prototype.$message.error(res.msg); + return next({ + name: "login", + }); } window.SITE_CONFIG["menuList"] = res.data; fnAddDynamicMenuRoutes(window.SITE_CONFIG["menuList"]); @@ -498,12 +503,33 @@ function fnAddDynamicMenuRoutes2(menuList = [], routes = []) { eval(s2) ); // URL支持{{ window.xxx }}占位符变量 if (isURL(URL)) { - route["path"] = route["name"] = `i-${menuList[i].id}`; - route["meta"]["iframeURL"] = URL; + if (menuList[i].children && menuList[i].children.length >= 1) { + let item = menuList[i].children.find( + (subMenu) => subMenu.url == menuList[i].url + ); + if (item) { + route["path"] = route["name"] = `i-${menuList[i].id}`; + route["redirect"] = `i-${item.id}`; + } else { + route["path"] = route["name"] = `i-${menuList[i].id}`; + route["meta"]["iframeURL"] = URL; + } + } else { + route["path"] = route["name"] = `i-${menuList[i].id}`; + route["meta"]["iframeURL"] = URL; + } } else { URL = URL.replace(/^\//, "").replace(/_/g, "-"); - route["path"] = route["name"] = URL.replace(/\//g, "-"); - route["component"] = () => import(`@/views/modules/${URL}`); + if (URL.startsWith("unopen")) { + route["path"] = route["name"] = URL.replace(/\//g, "-"); + route["component"] = () => import(`@/views/modules/unopen`); + } else if (menuList[i].children && menuList[i].children.length >= 1) { + route["path"] = route["name"] = URL; + route["redirect"] = URL.replace(/\//g, "-"); + } else { + route["path"] = route["name"] = URL.replace(/\//g, "-"); + route["component"] = () => import(`@/views/modules/${URL}`); + } } routes.push(route); } diff --git a/src/views/main-shuju/main-content.vue b/src/views/main-shuju/main-content.vue index e78235c6..a67827be 100644 --- a/src/views/main-shuju/main-content.vue +++ b/src/views/main-shuju/main-content.vue @@ -1,98 +1,126 @@