Your Name
2022-04-08 1f2a259f8cbb7eb0b12d12895116c309eb8cd609
1
(this.webpackJsonp=this.webpackJsonp||[]).push([["chunk-781c"],{"9ELb":function(t,e,n){"use strict";n.r(e);var r=n("cLjf"),a=n.n(r),i=n("hDQ3"),o=n.n(i),s=n("bS4n"),l=n.n(s),u=n("8t5x"),c=n("7Qib"),h=n("F9LP"),d=n("WgQi"),p={name:"index",filters:{parseMain:function(t){return 1===t?"是":0===t?"否":void 0}},computed:l()({},Object(u.b)(["userType"])),data:function(){return{tableKey:0,analyseUnitData:[],departmentList:[],listLoading:!1,pageSize:10,recordTotal:0,currentPage:1,pageTotal:0,title:"",company:"",code:"",analyseUnitVisible:!1,analyseUnitFormRules:{hazardDep:[{required:!0,message:"责任部门不能为空",trigger:"change"}],hazardLiablePerson:[{required:!0,message:"责任人不能为空",trigger:"blur"}],hazardCode:[{required:!0,message:"安全风险分析对象编码不能为空",trigger:"blur"}],riskUnitName:[{required:!0,message:"安全风险分析单元名称不能为空",trigger:"blur"}]},analyseUnitForm:{id:null,hazardCode:"",hazardDep:"",hazardLiablePerson:"",riskUnitName:"",createTime:"",updateTime:"",createBy:"",updateBy:"",validFlag:null,hazardLiablePersonId:null,hazardDepId:1},listQuery:{pageIndex:1,pageSize:10,filter:{riskUnitName:""}}}},created:function(){this.getAnalyseUnitData(),this.getDepartment()},methods:{getAnalyseUnitData:function(){var t=this;return o()(a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.listLoading=!0,e.next=3,Object(h.g)(t.listQuery);case 3:"200"===(n=e.sent).data.code?(t.recordTotal=n.data.result.total,t.pageSize=n.data.result.size,t.pageTotal=Object(c.a)(n.data.result.total,n.data.result.size),t.currentPage=n.data.result.current,t.analyseUnitData=n.data.result.records):t.$message({message:n.data.message,type:"warning"}),t.listLoading=!1;case 6:case"end":return e.stop()}},e,t)}))()},getDepartment:function(){var t=this;return o()(a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(d.e)({pageSize:1e3,pageIndex:1});case 2:"200"===(n=e.sent).data.code?t.departmentList=n.data.result.result:t.$message({message:n.data.message,type:"warning"});case 4:case"end":return e.stop()}},e,t)}))()},showAnalyseUnitForm:function(t,e){var n=this;this.analyseUnitVisible=!0,this.$nextTick(function(){n.$refs.analyseUnitForm.clearValidate()}),"新增"===e?(this.title="新增",this.analyseUnitForm={id:null,hazardCode:"",hazardDep:"",hazardLiablePerson:"",riskUnitName:"",createTime:"",updateTime:"",createBy:"",updateBy:"",validFlag:null,hazardLiablePersonId:null,hazardDepId:1}):(this.title="修改",this.analyseUnitForm=t)},submitAnalyseUnit:function(){var t=this;this.$refs.analyseUnitForm.validate(function(e){e?"新增"===t.title?Object(h.a)(t.analyseUnitForm).then(function(e){"200"===e.data.code?(t.analyseUnitVisible=!1,t.getAnalyseUnitData(),t.$notify({type:"success",duration:2e3,message:"新增成功",title:"成功"})):t.$message({type:"warning",message:e.data.message})}):Object(h.k)(t.analyseUnitForm).then(function(e){"200"===e.data.code?(t.analyseUnitVisible=!1,t.getAnalyseUnitData(),t.$notify({type:"success",duration:2e3,title:"成功",message:"编辑成功"})):t.$message({type:"warning",message:e.data.message})}):t.$message({type:"warning",message:"请完善基本信息"})})},deleteById:function(t){var e=this;this.$confirm("删除此条信息,是否继续","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(h.d)({id:t.id}).then(function(){e.getAnalyseUnitData(),e.$notify({title:"成功",message:"删除成功",type:"success",duration:2e3})})})},refreshHandle:function(){this.getAnalyseUnitData()},handleSizeChange:function(t){this.listQuery.pageSize=t,this.getAnalyseUnitData()},handleCurrentChange:function(t){this.listQuery.pageIndex=t,this.getAnalyseUnitData()}}},f=(n("LxBh"),n("ZrdR")),m=Object(f.a)(p,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"filter-container"},[n("div",{staticClass:"basic_search"},[n("span",[t._v("单位名称:")]),t._v(" "),n("el-input",{staticStyle:{width:"200px"},model:{value:t.listQuery.filter.riskUnitName,callback:function(e){t.$set(t.listQuery.filter,"riskUnitName",e)},expression:"listQuery.filter.riskUnitName"}})],1),t._v(" "),n("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px","margin-top":"10px"},attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.refreshHandle}},[t._v("搜索")]),t._v(" "),n("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px","margin-top":"10px"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:function(e){t.showAnalyseUnitForm("","新增")}}},[t._v("新增")])],1),t._v(" "),n("div",{staticClass:"table_content"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],key:t.tableKey,staticStyle:{width:"100%"},attrs:{data:t.analyseUnitData,border:"",fit:"","highlight-current-row":""}},[n("el-table-column",{attrs:{label:"安全风险分析对象编码",prop:"hazardCode",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"责任部门",prop:"hazardDep",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"责任人",prop:"hazardLiablePerson",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"安全风险分析单元名称",prop:"riskUnitName",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"创建人",prop:"createBy",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"创建时间",prop:"createTime",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"最后修改人",prop:"updateBy",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"最后修改时间",prop:"updateTime",align:"center"}}),t._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center",width:"280","class-name":"small-padding fixed-width"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{attrs:{type:"text"},on:{click:function(n){t.showAnalyseUnitForm(e.row,"编辑")}}},[t._v("编辑")]),t._v(" "),n("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(n){t.deleteById(e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),n("br"),t._v(" "),n("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.recordTotal>0,expression:"recordTotal>0"}],staticStyle:{float:"right"},attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,total:t.recordTotal,layout:"total, sizes, prev, pager, next, jumper",background:""},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}}),t._v(" "),n("br")],1),t._v(" "),n("el-dialog",{attrs:{title:t.title,visible:t.analyseUnitVisible,"modal-append-to-body":!1,"close-on-click-modal":!1,width:"600px"},on:{"update:visible":function(e){t.analyseUnitVisible=e}}},[n("el-form",{ref:"analyseUnitForm",attrs:{rules:t.analyseUnitFormRules,model:t.analyseUnitForm,"label-position":"right","label-width":"165px"}},[n("el-form-item",{attrs:{label:"责任部门",prop:"hazardDep"}},[n("el-select",{staticClass:"analyseUnit_input",model:{value:t.analyseUnitForm.hazardDep,callback:function(e){t.$set(t.analyseUnitForm,"hazardDep",e)},expression:"analyseUnitForm.hazardDep"}},t._l(t.departmentList,function(t){return n("el-option",{key:t.id,attrs:{value:t.department,label:t.department}})}))],1),t._v(" "),n("el-form-item",{attrs:{label:"责任人",prop:"hazardLiablePerson"}},[n("el-input",{staticClass:"analyseUnit_input",model:{value:t.analyseUnitForm.hazardLiablePerson,callback:function(e){t.$set(t.analyseUnitForm,"hazardLiablePerson",e)},expression:"analyseUnitForm.hazardLiablePerson"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"安全风险分析对象编码",prop:"hazardCode"}},[n("el-input",{staticClass:"analyseUnit_input",model:{value:t.analyseUnitForm.hazardCode,callback:function(e){t.$set(t.analyseUnitForm,"hazardCode",e)},expression:"analyseUnitForm.hazardCode"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"安全风险分析单元名称",prop:"riskUnitName"}},[n("el-input",{staticClass:"analyseUnit_input",model:{value:t.analyseUnitForm.riskUnitName,callback:function(e){t.$set(t.analyseUnitForm,"riskUnitName",e)},expression:"analyseUnitForm.riskUnitName"}})],1)],1),t._v(" "),n("div",{attrs:{align:"right"}},[n("el-button",{on:{click:function(e){t.unitFormVisible=!1}}},[t._v("取消")]),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.submitAnalyseUnit()}}},[t._v("确认")])],1)],1)],1)},[],!1,null,"536eac24",null);m.options.__file="index.vue";e.default=m.exports},F9LP:function(t,e,n){"use strict";n.d(e,"g",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"k",function(){return s}),n.d(e,"d",function(){return l}),n.d(e,"j",function(){return u}),n.d(e,"c",function(){return c}),n.d(e,"m",function(){return h}),n.d(e,"f",function(){return d}),n.d(e,"i",function(){return p}),n.d(e,"b",function(){return f}),n.d(e,"l",function(){return m}),n.d(e,"e",function(){return g}),n.d(e,"h",function(){return y});var r=n("X4fA"),a=n("t3Un");function i(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskAnaUnit/page",method:"post",data:t})}function o(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskAnaUnit/add",method:"post",data:t})}function s(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskAnaUnit/mod",method:"post",data:t})}function l(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskAnaUnit/del",method:"post",data:t})}function u(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskEvent/page",method:"post",data:t})}function c(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskEvent/add",method:"post",data:t})}function h(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskEvent/mod",method:"post",data:t})}function d(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskEvent/del",method:"post",data:t})}function p(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskControlMeasure/page",method:"post",data:t})}function f(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskControlMeasure/add",method:"post",data:t})}function m(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskControlMeasure/mod",method:"post",data:t})}function g(t){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskControlMeasure/del",method:"post",data:t})}function y(){return Object(a.a)({headers:{Authorization:Object(r.a)()},url:"http://222.92.213.21:8006/zhongtai/riskControlClassify/all",method:"get"})}},LxBh:function(t,e,n){"use strict";var r=n("Uh4+");n.n(r).a},"Uh4+":function(t,e,n){},WgQi:function(t,e,n){"use strict";n.d(e,"e",function(){return i}),n.d(e,"a",function(){return o}),n.d(e,"f",function(){return s}),n.d(e,"b",function(){return l}),n.d(e,"d",function(){return u}),n.d(e,"c",function(){return c});var r=n("t3Un"),a=n("X4fA");function i(t){return Object(r.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/department",method:"get",params:t||{}})}function o(t){return Object(r.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/addDepartment",method:"post",data:t})}function s(t){return Object(r.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/putDepartment",method:"post",data:t})}function l(t){return Object(r.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/delDepartment",method:"post",data:t})}function u(){return Object(r.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/departmentList",method:"get"})}function c(t){return Object(r.a)({headers:{Authorization:Object(a.a)()},url:"http://222.92.213.21:8006/zhongtai/department-userList",method:"post",data:t})}},cLjf:function(t,e,n){t.exports=n("xOJF")},hDQ3:function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n("Asgo"));e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,n){return function a(i,o){try{var s=e[i](o),l=s.value}catch(t){return void n(t)}if(!s.done)return r.default.resolve(l).then(function(t){a("next",t)},function(t){a("throw",t)});t(l)}("next")})}}},k4Ii:function(t,e){!function(e){"use strict";var n,r=Object.prototype,a=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag",u="object"==typeof t,c=e.regeneratorRuntime;if(c)u&&(t.exports=c);else{(c=e.regeneratorRuntime=u?t.exports:{}).wrap=z;var h="suspendedStart",d="suspendedYield",p="executing",f="completed",m={},g={};g[o]=function(){return this};var y=Object.getPrototypeOf,v=y&&y(y(C([])));v&&v!==r&&a.call(v,o)&&(g=v);var b=j.prototype=U.prototype=Object.create(g);x.prototype=b.constructor=j,j.constructor=x,j[l]=x.displayName="GeneratorFunction",c.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,l in t||(t[l]="GeneratorFunction")),t.prototype=Object.create(b),t},c.awrap=function(t){return{__await:t}},O(_.prototype),_.prototype[s]=function(){return this},c.AsyncIterator=_,c.async=function(t,e,n,r){var a=new _(z(t,e,n,r));return c.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},O(b),b[l]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},c.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},c.values=C,F.prototype={constructor:F,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,a){return s.type="throw",s.arg=t,e.next=r,a&&(e.method="next",e.arg=n),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;A(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:C(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),m}}}function z(t,e,n,r){var a=e&&e.prototype instanceof U?e:U,i=Object.create(a.prototype),o=new F(r||[]);return i._invoke=function(t,e,n){var r=h;return function(a,i){if(r===p)throw new Error("Generator is already running");if(r===f){if("throw"===a)throw i;return D()}for(n.method=a,n.arg=i;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===m)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===h)throw r=f,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var l=w(t,e,n);if("normal"===l.type){if(r=n.done?f:d,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=f,n.method="throw",n.arg=l.arg)}}}(t,n,o),i}function w(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function U(){}function x(){}function j(){}function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function _(t){var e;this._invoke=function(n,r){function i(){return new Promise(function(e,i){!function e(n,r,i,o){var s=w(t[n],t,r);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&a.call(u,"__await")?Promise.resolve(u.__await).then(function(t){e("next",t,i,o)},function(t){e("throw",t,i,o)}):Promise.resolve(u).then(function(t){l.value=t,i(l)},o)}o(s.arg)}(n,r,e,i)})}return e=e?e.then(i,i):i()}}function k(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,k(t,e),"throw"===e.method))return m;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var a=w(r,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,m;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,m):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,m)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function C(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(a.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return i.next=i}}return{next:D}}function D(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},xOJF:function(t,e,n){var r=function(){return this}()||Function("return this")(),a=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,i=a&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n("k4Ii"),a)r.regeneratorRuntime=i;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}}}]);