| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7bc56dba"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),Math.easeInOutQuad=function(t,e,a,n){return t/=n/2,t<1?a/2*t*t+e:(t--,-a/2*(t*(t-2)-1)+e)};var n=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)}}();function i(t){document.documentElement.scrollTop=t,document.body.parentNode.scrollTop=t,document.body.scrollTop=t}function r(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function s(t,e,a){var s=r(),o=t-s,c=20,u=0;e="undefined"===typeof e?500:e;var l=function t(){u+=c;var r=Math.easeInOutQuad(u,s,o,e);i(r),u<e?n(t):a&&"function"===typeof a&&a()};l()}},1771:function(t,e,a){"use strict";a.d(e,"f",(function(){return c})),a.d(e,"c",(function(){return u})),a.d(e,"d",(function(){return l})),a.d(e,"b",(function(){return d})),a.d(e,"a",(function(){return h})),a.d(e,"e",(function(){return m}));var n=a("5530"),i=(a("aef6"),a("f559"),a("28a5"),a("6762"),a("2fdb"),a("b85c")),r=a("c2cf"),s=a("ebb5"),o=void 0,c=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof t&&(t=[t]),t&&t.length>0&&r["a"].enums({codes:t}).then((function(a){var n,r=a.data,s=Object(i["a"])(t);try{for(s.s();!(n=s.n()).done;){var o=n.value;e[o]=r.data[o]}}catch(c){s.e(c)}finally{s.f()}}))},u=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(t,e)},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(t,e)},d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"string"===typeof t&&(t=[t]),t&&t.length>0&&s["a"].list({codes:t}).then((function(a){var n,r=a.data,s=Object(i["a"])(t);try{for(s.s();!(n=s.n()).done;){var o=n.value;e[o]=r.data[o]}}catch(c){s.e(c)}finally{s.f()}}))},h=function(t){var e=t.data,a=e.type;if(a.includes("application/json")){var n=new FileReader;n.onload=function(t){if(2===t.target.readyState){var e=JSON.parse(t.target.result);o.$message({message:e.msg,type:"warning"})}},n.readAsText(e)}else{var i=t.headers["content-disposition"],r="下载文件.zip";if(i)for(var s=i.split(";"),c=0;c<s.length;c++){var u=s[c];if(null!==u&&""!==u){var l=u.split("=");if(null!==l&&l.length>0&&"filename"===l[0].trim().toLowerCase()){r=decodeURI(l[1]);break}}}(r.startsWith("'")||r.startsWith('"'))&&(r.endsWith("'")||r.endsWith('"'))&&(r=r.substring(1,r.length-1));var d=new Blob([e]),h=document.createElement("a");h.href=window.URL.createObjectURL(d),h.download=r,h.click(),window.URL.revokeObjectURL(h.href)}},m=function(t){var e={size:10,current:1,sort:"id",order:"descending",model:{},map:{},timeRange:null};return t?Object(n["a"])(Object(n["a"])({},e),t):e}},"2f21":function(t,e,a){"use strict";var n=a("79e5");t.exports=function(t,e){return!!t&&n((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},"55dd":function(t,e,a){"use strict";var n=a("5ca1"),i=a("d8e8"),r=a("4bf8"),s=a("79e5"),o=[].sort,c=[1,2,3];n(n.P+n.F*(s((function(){c.sort(void 0)}))||!s((function(){c.sort(null)}))||!a("2f21")(o)),"Array",{sort:function(t){return void 0===t?o.call(r(this)):o.call(r(this),i(t))}})},"8a0f":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-container"},[a("el-row",{staticClass:"filter-container infosBg"},[a("el-col",[a("span",[t._v("生产资源名称:"+t._s(t.queryObj.name))]),t._v(" "),a("span",{staticStyle:{"margin-left":"20px"}},[t._v("编号:"+t._s(t.queryObj.code))]),t._v(" "),a("span",{staticStyle:{"margin-left":"20px"}},[t._v("所属企业:"+t._s(t.queryObj.code))]),t._v(" "),a("span",{staticStyle:{"margin-left":"20px"}},[t._v("所属产线:"+t._s(t.queryObj.code))]),t._v(" "),a("span",{staticStyle:{"margin-left":"20px"}},[t._v("类型:"+t._s(t.queryObj.code))])])],1),t._v(" "),a("div",{staticClass:"filter-container"},[a("span",[a("span",[t._v("时间:")]),t._v(" "),a("el-select",{staticStyle:{width:"150px"},attrs:{placeholder:"请选择启用状态",size:"medium"},model:{value:t.queryParams.model.status,callback:function(e){t.$set(t.queryParams.model,"status",e)},expression:"queryParams.model.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),t._v(" "),a("el-option",{attrs:{label:"今日",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"昨日",value:"2"}}),t._v(" "),a("el-option",{attrs:{label:"7天内",value:"3"}})],1)],1),t._v(" "),a("span",{staticClass:"rearchItem"},[a("span",[t._v("时间段:")]),t._v(" "),a("el-date-picker",{staticStyle:{width:"300px"},attrs:{"range-separator":null,"end-placeholder":"结束日期",format:"yyyy-MM-dd","start-placeholder":"开始日期",type:"daterange","value-format":"yyyy-MM-dd",size:"medium"},model:{value:t.queryParams.model.timeRange,callback:function(e){t.$set(t.queryParams.model,"timeRange",e)},expression:"queryParams.model.timeRange"}})],1),t._v(" "),a("span",{staticClass:"rearchItem"},[a("el-button",{attrs:{plain:"",type:"primary",icon:"el-icon-search",size:"medium"},on:{click:t.search}},[t._v("\n\t "+t._s(t.$t("table.search"))+"\n\t ")]),t._v(" "),a("el-button",{attrs:{plain:"",type:"warning",icon:"el-icon-refresh",size:"medium"},on:{click:t.reset}},[t._v("\n\t "+t._s(t.$t("table.reset"))+"\n\t ")])],1)]),t._v(" "),a("el-row",{staticClass:"filter-container"},[a("el-col",[a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"medium"},on:{click:t.batchDelete}},[t._v("\n\t "+t._s(t.$t("table.delete"))+"\n\t ")]),t._v(" "),a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"medium"},on:{click:t.batchDelete}},[t._v("清空数据")])],1)],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],key:t.tableKey,ref:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.records,border:"",fit:"","row-key":"id"},on:{"filter-change":t.filterChange,"selection-change":t.onSelectChange,"sort-change":t.sortChange,"cell-click":t.cellClick}},[a("el-table-column",{attrs:{align:"center",type:"selection",width:"40px","reserve-selection":!0}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"事件","show-overflow-tooltip":!0,width:"200px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"code",label:"紧急程度","show-overflow-tooltip":!0,width:"200px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"type",label:"标识符",width:"150px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"method",label:"关联操作","show-overflow-tooltip":!0,width:"200px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"新增时间","show-overflow-tooltip":!0}})],1),t._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.tableData.total>0,expression:"tableData.total > 0"}],attrs:{limit:t.queryParams.size,page:t.queryParams.current,total:Number(t.tableData.total)},on:{"update:limit":function(e){return t.$set(t.queryParams,"size",e)},"update:page":function(e){return t.$set(t.queryParams,"current",e)},pagination:t.fetch}})],1)},i=[],r=(a("28a5"),a("6762"),a("2fdb"),a("55dd"),a("ac6a"),a("20d6"),a("5530")),s=(a("386d"),a("333d")),o=(a("96cf"),a("1da1")),c=a("9256"),u={getList:{method:"POST",url:"/authority/type/all"},page:{method:"POST",url:"/authority/type/page"},updateActiveStatus:{method:"POST",url:"/authority/type/update"},updateNew:{method:"POST",url:"/authority/type/update"},update:{method:"POST",url:"/authority/type"},save:{method:"POST",url:"/authority/type"},saveInit:{method:"POST",url:"/authority/type/init"},updateStatus:{method:"POST",url:"/authority/type/status"},remove:{method:"DELETE",url:"/authority/type"},list:{method:"POST",url:"/authority/type/query"},preview:{method:"POST",url:"/authority/type/preview"},export:{method:"POST",url:"/authority/type/export"},import:{method:"POST",url:"/authority/type/import"}},l={getList:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.getList),{},{data:t}))},page:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.page),{},{data:t}))},save:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.save),{},{data:t}))},saveInit:function(){var t=Object(o["a"])(regeneratorRuntime.mark((function t(e){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.saveInit),{},{data:e})));case 1:case"end":return t.stop()}}),t)})));function e(e){return t.apply(this,arguments)}return e}(),updateNew:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.updateNew),{},{data:t}))},update:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.update),{},{data:t}))},updateStatus:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.updateStatus),{},{formData:!0,data:t}))},updateActiveStatus:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.updateActiveStatus),{},{data:t}))},remove:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.remove),{},{data:t}))},list:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.list),{},{data:t}))},check:function(t){return Object(c["a"])({method:"GET",url:"/authority/type/check/".concat(t)})},checkField:function(t){return Object(c["a"])({method:"POST",url:"/authority/type/check",data:t})},preview:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.preview),{},{data:t}))},export:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.export),{},{responseType:"blob",data:t}))},import:function(t){return Object(c["a"])(Object(r["a"])(Object(r["a"])({},u.import),{},{data:t}))}},d=a("a888"),h=a("1771"),m={name:"EventData",directives:{elDragDialog:d["a"]},components:{Pagination:s["a"]},data:function(){return{queryObj:{},selectTableVisible:!1,dialog:{isVisible:!1,title:""},preview:{isVisible:!1,context:""},tenantViewVisible:!1,tableKey:0,queryParams:Object(h["e"])({}),selection:[],loading:!1,tableData:{total:0},enums:{TenantTypeEnum:{},TenantStatusEnum:{}}}},created:function(){this.queryObj=this.$route.query,console.log("路由传参的数据queryObj:",this.queryObj)},watch:{$route:function(){this.queryObj=this.$route.query}},computed:{currentUser:function(){return this.$store.state.account.user}},mounted:function(){this.fetch()},methods:{factoryMgr:function(){var t=this;this.selection.length?this.selection.length>1?this.$message({message:"请只能选择一条数据!",type:"warning"}):this.$store.dispatch("tagsView/delView",this.$route).then((function(e){t.$router.push({path:"/enterpriseMgr/factoryMgr",query:t.selection[0]})})):this.$message({message:"请至少选择一条数据!",type:"warning"})},factoryRowMgr:function(t){this.$router.push({path:"/enterpriseMgr/factoryMgr",query:t})},permissionMgr:function(t){this.$router.push({path:"/enterpriseMgr/permissionMgr",query:t})},updateActiveStatus:function(t){var e=this;if(this.selection.length)if(this.selection.length>1)this.$message({message:"请只能选择一条数据!",type:"warning"});else{var a={};a=this.selection[0],a.status=t;var n="冻结成功!";"1"==t&&(n="启用成功!"),l.updateActiveStatus(a).then((function(t){200==t.status&&(e.$message({message:n,type:"success"}),e.search())}))}else this.$message({message:"请至少选择一条数据!",type:"warning"})},dongJieRow:function(t){var e=this,a={};a=t,a.status="0",l.updateActiveStatus(a).then((function(t){200==t.status&&(e.$message({message:"冻结成功!",type:"success"}),e.search())}))},viewTableClose:function(){this.selectTableVisible=!1},viewClose:function(){this.tenantViewVisible=!1},editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search()},onSelectChange:function(t){this.selection=t},search:function(){this.fetch(Object(r["a"])({},this.queryParams))},reset:function(){this.queryParams=Object(h["e"])({}),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},exportExcelPreview:function(){var t=this;this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出企业分类数据",l.preview(this.queryParams).then((function(e){var a=e.data;t.preview.isVisible=!0,t.preview.context=a.data}))},exportExcel:function(){this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.map.fileName="导出企业分类数据",l.export(this.queryParams).then((function(t){Object(h["a"])(t)}))},add:function(){this.$refs.edit.type="add",this.dialog.title="新增接口方法",this.dialog.isVisible=!0},singleDelete:function(t){this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(t,!0),this.batchDelete()},batchDelete:function(){var t=this;if(this.selection.length){var e=this.selection.findIndex((function(t){return t.readonly}));e>-1?this.$message({message:this.$t("tips.systemData"),type:"warning"}):this.$confirm("删除企业分类数据后,会将企业分类数据全部删除,确认删除?",this.$t("common.tips"),{distinguishCancelAndClose:!0,confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then((function(){var e=[],a=!1;t.selection.forEach((function(t){t.readonly?a=!0:e.push(t.id)})),a?t.$message({message:t.$t("tips.systemData"),type:"warning"}):t.delete(e)})).catch((function(){}))}else this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(t){var e=this;l.remove({ids:t}).then((function(t){var a=t.data;a.isSuccess&&(e.$message({message:e.$t("tips.deleteSuccess"),type:"success"}),e.search(),e.$refs.table.clearSelection())}))},updateStatus:function(t){var e=this;l.updateStatus({"ids[]":t}).then((function(t){var a=t.data;a.isSuccess&&(e.$message({message:"禁用成功",type:"success"}),e.search())}))},view:function(t){this.$refs.view.setTenant(t),this.tenantViewVisible=!0},viewTable:function(t){this.$refs.view.setTenant(t),this.selectTableVisible=!0},editOne:function(){this.selection.length?this.selection.length>1?this.$message({message:"请只能选择一条数据!",type:"warning"}):(console.log("选择的数据:",this.selection[0]),this.edit(this.selection[0])):this.$message({message:"请至少选择一条数据!",type:"warning"})},edit:function(t){t.readonly?this.$message({message:this.$t("tips.systemData"),type:"warning"}):(this.$refs.edit.setTenant(t),this.$refs.edit.type="edit",this.dialog.title=this.$t("common.edit"),this.dialog.isVisible=!0)},fetch:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.timeRange&&(this.queryParams.map.createTime_st=this.queryParams.timeRange[0],this.queryParams.map.createTime_ed=this.queryParams.timeRange[1]),this.queryParams.current=e.current?e.current:this.queryParams.current,this.queryParams.size=e.size?e.size:this.queryParams.size,l.page(this.queryParams).then((function(e){var a=e.data;a.isSuccess&&(t.tableData=a.data)})).finally((function(){return t.loading=!1}))},sortChange:function(t){this.queryParams.sort=t.prop,this.queryParams.order=t.order,this.queryParams.sort&&this.search()},filterChange:function(t){for(var e in t)if(e.includes(".")){var a={};a[e.split(".")[1]]=t[e][0],this.queryParams.model[e.split(".")[0]]=a}else this.queryParams.model[e]=t[e][0];this.search()},cellClick:function(t,e){var a=this;if("operation"!==e["columnKey"]){var n=!1;this.selection.forEach((function(e){e.id===t.id&&(n=!0,a.$refs.table.toggleRowSelection(t))})),n||this.$refs.table.toggleRowSelection(t,!0)}}}},p=m,f=a("2877"),b=Object(f["a"])(p,n,i,!1,null,"82291512",null);e["default"]=b.exports},a888:function(t,e,a){"use strict";a("a481"),a("6762"),a("2fdb");var n={bind:function(t,e,a){var n=t.querySelector(".el-dialog__header"),i=t.querySelector(".el-dialog");n.style.cssText+=";cursor:move;",i.style.cssText+=";top:0px;";var r=function(){return window.document.currentStyle?function(t,e){return t.currentStyle[e]}:function(t,e){return getComputedStyle(t,!1)[e]}}();n.onmousedown=function(t){var e=t.clientX-n.offsetLeft,s=t.clientY-n.offsetTop,o=i.offsetWidth,c=i.offsetHeight,u=document.body.clientWidth,l=document.body.clientHeight,d=i.offsetLeft,h=u-i.offsetLeft-o,m=i.offsetTop,p=l-i.offsetTop-c,f=r(i,"left"),b=r(i,"top");f.includes("%")?(f=+document.body.clientWidth*(+f.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(f=+f.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(t){var n=t.clientX-e,r=t.clientY-s;-n>d?n=-d:n>h&&(n=h),-r>m?r=-m:r>p&&(r=p),i.style.cssText+=";left:".concat(n+f,"px;top:").concat(r+b,"px;"),a.child.$emit("dragDialog")},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null}}}},i=function(t){t.directive("el-drag-dialog",n)};window.Vue&&(window["el-drag-dialog"]=n,Vue.use(i)),n.install=i;e["a"]=n},aef6:function(t,e,a){"use strict";var n=a("5ca1"),i=a("9def"),r=a("d2c8"),s="endsWith",o=""[s];n(n.P+n.F*a("5147")(s),"String",{endsWith:function(t){var e=r(this,t,s),a=arguments.length>1?arguments[1]:void 0,n=i(e.length),c=void 0===a?n:Math.min(i(a),n),u=String(t);return o?o.call(e,u,c):e.slice(c-u.length,c)===u}})},c2cf:function(t,e,a){"use strict";var n=a("5530"),i=a("9256"),r=a("5657"),s={generateId:{url:"/authority/common/generateId",method:"GET"}};e["a"]={uploadFile:"".concat("http://106.14.142.95:10000").concat("/api","/file/attachment/upload"),enums:function(t){return Object(i["a"])({method:"GET",url:"/oauth/enums",data:t})},export:function(t,e){return Object(i["a"])({method:"POST",url:t,responseType:"blob",data:e})},loadImg:function(t){var e=r["a"].get("TOKEN",""),a=r["a"].get("TENANT","");return"".concat("http://106.14.142.95:10000").concat("/api","/file/attachment/download/").concat(t.bizType,"/").concat(t.bizId,"?token=").concat(e,"&tenant=").concat(a)},generateId:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},s.generateId),{},{data:t}))},getAttachment:function(t){return Object(i["a"])({url:"/file/attachment",method:"get",data:t})},deleteAttachment:function(t){return Object(i["a"])({url:"/file/attachment",method:"delete",data:t})},downloadAttachment:function(t){return Object(i["a"])({url:"/file/attachment/download",method:"get",responseType:"blob",data:t})},downloadAttachmentBiz:function(t){return Object(i["a"])({url:"/file/attachment/download/biz",method:"get",responseType:"blob",data:t})}}},ebb5:function(t,e,a){"use strict";var n=a("5530"),i=a("9256"),r={page:{method:"POST",url:"/authority/dictionaryItem/page"},update:{method:"PUT",url:"/authority/dictionaryItem"},save:{method:"POST",url:"/authority/dictionaryItem"},delete:{method:"DELETE",url:"/authority/dictionaryItem"},list:{method:"GET",url:"/oauth/dictionaryItem/codes"},preview:{method:"POST",url:"/authority/dictionaryItem/preview"},export:{method:"POST",url:"/authority/dictionaryItem/export"},import:{method:"POST",url:"/authority/dictionaryItem/import"}};e["a"]={page:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.page),{},{data:t}))},save:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.save),{},{data:t}))},update:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.update),{},{data:t}))},delete:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.delete),{},{data:t}))},list:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.list),{},{data:t}))},preview:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.preview),{},{data:t}))},export:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.export),{},{responseType:"blob",data:t}))},import:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.import),{},{data:t}))}}}}]);
|