chunk-67d114af.fa80f62d.js 18 KB

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