1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2b541b0e"],{"1e44":function(t,e,n){"use strict";var i=n("f49f"),r=n.n(i);r.a},"2fcf":function(t,e,n){"use strict";var i=n("7c6a"),r=n.n(i);r.a},"7abe":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[n("div",{staticClass:"topHeader"},[n("span",[t._v("工作台")]),n("van-icon",{staticClass:"icon",attrs:{name:"setting-o"},on:{click:t.exitLogin}})],1),n("div",{staticClass:"main"},t._l(t.list,(function(e,i){return n("div",{key:i,staticClass:"text"},[n("p",[t._v(t._s(e.title))]),n("ul",t._l(e.risk,(function(e,i){return n("li",{key:i,on:{click:function(n){return t.toStart(e.title)}}},[n("img",{attrs:{src:e.icon,alt:""}}),n("p",[t._v(t._s(e.title))])])})),0)])})),0),n("job-popup",{attrs:{show:t.jobShow},on:{"update:show":function(e){t.jobShow=e}}})],1)},r=[],a=(n("99af"),n("4160"),n("d81d"),n("159b"),n("2909")),c=n("5530"),s=n("2f62"),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("van-popup",{style:{height:"50%"},attrs:{position:"bottom",round:""},on:{"click-overlay":t.handleClose},model:{value:t.isShow,callback:function(e){t.isShow=e},expression:"isShow"}},[n("div",{staticClass:"popup-title"},[t._v("作业预约")]),n("van-grid",{attrs:{border:!1,gutter:5}},t._l(t.type,(function(e,i){return n("van-grid-item",{key:i,on:{click:function(n){return t.handleItme(e)}}},[n("img",{staticClass:"popup-img",attrs:{src:e.icon}}),n("span",[t._v(t._s(e.name))])])})),1)],1)},l=[],d=(n("b0c0"),{props:{show:{type:Boolean,default:function(){return!1}}},watch:{show:function(t,e){this.isShow=t}},data:function(){return{isShow:!1,type:[{code:"10",name:"动火作业",icon:n("f323")},{code:"20",name:"受限作业",icon:n("f323")},{code:"30",name:"盲板抽堵",icon:n("f323")},{code:"40",name:"高处作业",icon:n("f323")},{code:"50",name:"吊装作业",icon:n("f323")},{code:"60",name:"临时用电",icon:n("f323")},{code:"70",name:"动土作业",icon:n("f323")},{code:"80",name:"断路作业",icon:n("f323")}]}},methods:{handleClose:function(){this.$emit("update:show",!1)},handleItme:function(t){var e={name:t.name,code:t.code};this.$router.push({path:"/jobReservationFrom",query:e})}}}),u=d,h=(n("1e44"),n("2877")),f=Object(h["a"])(u,o,l,!1,null,"c19f03d4",null),p=f.exports,g=n("9ded"),m=n("f121"),b=n("3e48"),v={name:"VueCli4VantIndex",components:{jobPopup:p},data:function(){return{jobShow:!1,list:[{title:"风险与隐患",risk:[{title:"随手拍",icon:n("f323")},{title:"添加隐患",icon:n("c437")},{title:"隐患列表",icon:n("f323")},{title:"异常",icon:n("c437")},{title:"风险清单",icon:n("c437")}]},{title:"巡检",risk:[{title:"巡检任务",icon:n("f323")},{title:"检查计划",icon:n("c437")},{title:"检查表",icon:n("f323")},{title:"包保责任任务",icon:n("c437")}]},{title:"日常运行",risk:[{title:"应急演习",icon:n("f323")},{title:"承包商",icon:n("c437")}]},{title:"作业许可",risk:[{title:"作业预约",icon:n("f323")},{title:"JSA/JHA",icon:n("c437")},{title:"预约列表",icon:n("f323")},{title:"作业列表",icon:n("c437")},{title:"作业项目列表",icon:n("c437")}]},{title:"基础数据",risk:[{title:"区域列表",icon:n("f323")},{title:"数据分析",icon:n("c437")},{title:"蓝牙信标",icon:n("c437")}]},{title:"培训",risk:[{title:"培训",icon:n("f323")}]}],routeList:[]}},computed:Object(c["a"])({},Object(s["b"])("login",["user"]),{},Object(s["b"])("num",["num"])),mounted:function(){var t=this;this.routeList=this.$router.options.routes,console.log(this.$router.options.routes),Object(g["c"])().then((function(e){var n=e.data;200===n.code&&t.$store.dispatch("login/getUser",{userName:n.data.userName,userId:n.data.userId,userType:n.data.userType,deptId:n.data.deptId})})),this.$store.dispatch("baseUrl/getBase",m["baseApi"]),Object(b["k"])({dictKey:"sys_danger_src"}).then((function(e){var n=e.data;200===n.code&&t.$store.dispatch("dangerList/getSrc",{list:n.data.map((function(t){return{text:t.dictLabel,value:t.dictValue}}))})})),Object(b["k"])({dictKey:"sys_danger_type"}).then((function(e){var n=e.data;200===n.code&&(console.log(n,"这这这这这这"),t.$store.dispatch("dangerList/getType",{list:n.data.map((function(t){return{text:t.dictLabel,value:t.dictValue}}))}))})),Object(b["f"])().then((function(e){var n=e.data;200===n.code&&t.$store.dispatch("dangerList/getTree",{list:t.getTree(n.data)})})),Object(b["i"])().then((function(e){var n=e.data;200===n.code&&t.$store.dispatch("dangerList/getDept",{list:t.getDept(n.data)})})),Object(b["j"])().then((function(e){var n=e.data;200===n.code&&t.$store.dispatch("dangerList/getUser",{list:t.getUser(n.data)})})),Object(b["g"])().then((function(e){var n=e.data;200===n.code&&(t.$store.commit("dangerList/GETCONTRACTORUSER",{list:t.getContractorUser(n.data)}),t.$store.commit("dangerList/GETCONTRACTOR",{list:t.getDept(n.data)}))}))},methods:{exitLogin:function(){var t=this;this.$dialog({message:"您确认要退出当前账号,返回到登录页吗?",showCancelButton:!0}).then((function(){sessionStorage.clear(),t.$router.push("/login")})).catch((function(){}))},toStart:function(t){var e=this;"作业预约"!==t?this.routeList.forEach((function(n){t===n.meta.title&&e.$router.push(n.path)})):this.jobShow=!0},getTree:function(t){var e=this;return t.map((function(t){return t.childList.length?{text:t.areaName,value:t.id,children:e.getTree(t.childList)}:{text:t.areaName,value:t.id}}))},getDept:function(t){var e=this;return t.map((function(t){return t.children&&t.children.length?{text:t.label,value:t.id,children:e.getDept(t.children)}:{text:t.label,value:t.id}}))},getUsers:function(t){return t.map((function(t){return{text:t.nickName,value:t.userId,show:!0}}))},getUser:function(t){var e=this;return t.map((function(t){return t.children&&t.children.length&&!t.sysUsers?{text:t.label,value:t.id+"d",children:e.getUser(t.children)}:t.children&&t.children.length&&t.sysUsers?{text:t.label,value:t.id+"d",children:[].concat(Object(a["a"])(e.getUser(t.children)),Object(a["a"])(e.getUsers(t.sysUsers)))}:t.children&&t.children.length||!t.sysUsers?t.children&&t.children.length||t.sysUsers?{text:t.label,value:t.id+"d"}:{text:t.label,value:t.id+"d",children:[]}:{text:t.label,value:t.id+"d",children:e.getUsers(t.sysUsers)}}))},getContractorUser:function(t){var e=this;return t.map((function(t){return t.children&&t.children.length&&!t.sysUsers?{text:t.label,value:t.id,children:e.getUser(t.children)}:t.children&&t.children.length&&t.sysUsers?{text:t.label,value:t.id,children:[].concat(Object(a["a"])(e.getUser(t.children)),Object(a["a"])(e.getUsers(t.sysUsers)))}:t.children&&t.children.length||!t.sysUsers?t.children&&t.children.length||t.sysUsers?{text:t.label,value:t.id}:{text:t.label,value:t.id,children:[]}:{text:t.label,value:t.id,children:e.getUsers(t.sysUsers)}}))}}},j=v,y=(n("2fcf"),Object(h["a"])(j,i,r,!1,null,"a7541c3e",null));e["default"]=y.exports},"7c6a":function(t,e,n){},"9ded":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return s})),n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return l}));var i=n("b775");function r(t){return Object(i["a"])({url:"/app/drill/plan/list",method:"get",params:t})}function a(t){return Object(i["a"])({url:"/app/drill/plan/getInfo",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/app/drill/plan/startPlan",method:"post",data:t})}function s(t){return Object(i["a"])({url:"/app/common/upload",method:"post",data:t})}function o(t){return Object(i["a"])({url:"/app/login",method:"post",data:t})}function l(t){return Object(i["a"])({url:"/app/getInfo",method:"get",params:t})}},c437:function(t,e,n){t.exports=n.p+"assets/img/icon32.af45ec48.png"},f323:function(t,e,n){t.exports=n.p+"assets/img/icon11.0b57d809.png"},f49f:function(t,e,n){}}]);
|