| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c67ca156"],{"09f4":function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),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 o(t,e,a){var o=r(),s=t-o,c=20,l=0;e="undefined"===typeof e?500:e;var u=function t(){l+=c;var r=Math.easeInOutQuad(l,o,s,e);i(r),l<e?n(t):a&&"function"===typeof a&&a()};u()}},1771:function(t,e,a){"use strict";a.d(e,"f",(function(){return c})),a.d(e,"c",(function(){return l})),a.d(e,"d",(function(){return u})),a.d(e,"b",(function(){return d})),a.d(e,"a",(function(){return h})),a.d(e,"e",(function(){return f}));var n=a("5530"),i=(a("aef6"),a("f559"),a("28a5"),a("6762"),a("2fdb"),a("b85c")),r=a("c2cf"),o=a("ebb5"),s=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,o=Object(i["a"])(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;e[s]=r.data[s]}}catch(c){o.e(c)}finally{o.f()}}))},l=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(t,e)},u=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&&o["a"].list({codes:t}).then((function(a){var n,r=a.data,o=Object(i["a"])(t);try{for(o.s();!(n=o.n()).done;){var s=n.value;e[s]=r.data[s]}}catch(c){o.e(c)}finally{o.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);s.$message({message:e.msg,type:"warning"})}},n.readAsText(e)}else{var i=t.headers["content-disposition"],r="下载文件.zip";if(i)for(var o=i.split(";"),c=0;c<o.length;c++){var l=o[c];if(null!==l&&""!==l){var u=l.split("=");if(null!==u&&u.length>0&&"filename"===u[0].trim().toLowerCase()){r=decodeURI(u[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)}},f=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}},2440:function(t,e,a){},"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)}))}},5170:function(t,e,a){},"55dd":function(t,e,a){"use strict";var n=a("5ca1"),i=a("d8e8"),r=a("4bf8"),o=a("79e5"),s=[].sort,c=[1,2,3];n(n.P+n.F*(o((function(){c.sort(void 0)}))||!o((function(){c.sort(null)}))||!a("2f21")(s)),"Array",{sort:function(t){return void 0===t?s.call(r(this)):s.call(r(this),i(t))}})},"5bcd":function(t,e,a){"use strict";var n=a("5530"),i=a("9256"),r={getList:{method:"POST",url:"/authority/productionresource/all"},page:{method:"POST",url:"/authority/productionresource/page"},save:{method:"POST",url:"/authority/productionresource"},update:{method:"POST",url:"/authority/productionresource/update"},remove:{method:"DELETE",url:"/authority/productionresource"},removeMore:{method:"POST",url:"/authority/productionresource/delete"},updateStatus:{method:"POST",url:"/authority/productionresource/updateStatus"}};e["a"]={getList:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.getList),{},{data:t}))},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}))},remove:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.remove),{},{data:t}))},removeMore:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.removeMore),{},{data:t}))},updateStatus:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.updateStatus),{},{data:t}))},detail:function(t){return Object(i["a"])({method:"GET",url:"/authority/productionresource/".concat(t)})}}},"5caa":function(t,e,a){"use strict";a("96cf");var n=a("1da1"),i=a("5530"),r=a("9256"),o={getList:{method:"POST",url:"/authority/module/all"},page:{method:"POST",url:"/authority/module/page"},updateActiveStatus:{method:"POST",url:"/authority/module/update"},updateNew:{method:"POST",url:"/authority/module/update"},update:{method:"POST",url:"/authority/module/update"},save:{method:"POST",url:"/authority/module"},saveInit:{method:"POST",url:"/authority/module/init"},updateStatus:{method:"POST",url:"/authority/module/status"},remove:{method:"DELETE",url:"/authority/module"},delete:{method:"POST",url:"/authority/module/delete"},get:{method:"POST",url:"/authority/module/getById"},list:{method:"POST",url:"/authority/module/query"},preview:{method:"POST",url:"/authority/module/preview"},export:{method:"POST",url:"/authority/module/export"},import:{method:"POST",url:"/authority/module/import"}};e["a"]={getList:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.getList),{},{data:t}))},page:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.page),{},{data:t}))},save:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.save),{},{data:t}))},saveInit:function(){var t=Object(n["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(r["a"])(Object(i["a"])(Object(i["a"])({},o.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(r["a"])(Object(i["a"])(Object(i["a"])({},o.updateNew),{},{data:t}))},update:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.update),{},{data:t}))},updateStatus:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.updateStatus),{},{formData:!0,data:t}))},updateActiveStatus:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.updateActiveStatus),{},{data:t}))},remove:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.remove),{},{data:t}))},delete:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.delete),{},{data:t}))},list:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.list),{},{data:t}))},check:function(t){return Object(r["a"])({method:"GET",url:"/authority/module/check/".concat(t)})},checkField:function(t){return Object(r["a"])({method:"POST",url:"/authority/module/check",data:t})},getById:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.get),{},{data:t}))},get:function(t){return Object(r["a"])({method:"GET",url:"/authority/module/get/".concat(t)})},preview:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.preview),{},{data:t}))},export:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.export),{},{responseType:"blob",data:t}))},import:function(t){return Object(r["a"])(Object(i["a"])(Object(i["a"])({},o.import),{},{data:t}))}}},"6aa9":function(t,e,a){"use strict";var n=a("2440"),i=a.n(n);i.a},"70f3":function(t,e,a){"use strict";var n=a("95b4"),i=a.n(n);i.a},8021:function(t,e,a){"use strict";var n=a("5530"),i=a("9256"),r={getList:{method:"POST",url:"/authority/productionresource/all"},page:{method:"POST",url:"/authority/productionresource/page"},save:{method:"POST",url:"/authority/productionresource"},update:{method:"POST",url:"/authority/productionresource/update"},remove:{method:"DELETE",url:"/authority/productionresource"},removeMore:{method:"POST",url:"/authority/productionresource/delete"},updateStatus:{method:"POST",url:"/authority/productionresource/updateStatus"}};e["a"]={getList:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.getList),{},{data:t}))},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}))},remove:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.remove),{},{data:t}))},removeMore:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.removeMore),{},{data:t}))},updateStatus:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.updateStatus),{},{data:t}))},detail:function(t){return Object(i["a"])({method:"GET",url:"/authority/productionresource/".concat(t)})}}},9021:function(t,e,a){},"95b4":function(t,e,a){},a208: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",attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-input",{attrs:{placeholder:"输入关键字进行过滤",size:"medium"},model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}}),t._v(" "),a("el-tree",{ref:"tree",staticClass:"filter-tree",attrs:{data:t.treeData,props:t.defaultProps,"default-expand-all":"","show-checkbox":"","node-key":"id","check-strictly":!0,"expand-on-click-node":!0,"filter-node-method":t.filterNode},on:{"node-click":t.handleNodeClick,check:t.checkBoxFun},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.node;e.data;return a("span",{staticClass:"custom-tree-node"},[a("span",{staticClass:"treeTitleSpan",attrs:{title:n.label}},[t._v(t._s(n.label))]),t._v(" "),a("span",{staticClass:"tiaozhuanA"},[a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(){return t.goMeun(n)}}},[t._v("\n\t\t Go\n\t\t ")])],1)])}}])})],1),t._v(" "),a("el-col",{attrs:{span:18}},[a("div",{staticClass:"filter-container"},[t._v("\n\t\t \t名称:"),a("el-input",{staticStyle:{width:"150px"},attrs:{placeholder:"请输入企业名称",size:"medium"},model:{value:t.queryParams.model.name,callback:function(e){t.$set(t.queryParams.model,"name",e)},expression:"queryParams.model.name"}}),t._v("\n\t\t 启用状态:"),a("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"请选择状态",size:"medium"},model:{value:t.queryParams.model.status,callback:function(e){t.$set(t.queryParams.model,"status",e)},expression:"queryParams.model.status"}},t._l(t.statusList,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),t._v("\n\t\t \t类型:"),a("el-select",{staticStyle:{width:"120px"},attrs:{placeholder:"请选择类型",size:"medium"},model:{value:t.type.key,callback:function(e){t.$set(t.type,"key",e)},expression:"type.key"}},t._l(t.dicts.RESOURCES_CATEGORY,(function(t,e,n){return a("el-option",{key:n,attrs:{label:t,value:e}})})),1),t._v(" "),a("el-button",{attrs:{plain:"",type:"primary",icon:"el-icon-search",size:"medium"},on:{click:t.search}},[t._v("\n\t\t "+t._s(t.$t("table.search"))+"\n\t\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 "+t._s(t.$t("table.reset"))+"\n\t\t ")])],1),t._v(" "),a("el-row",{staticClass:"filter-container"},[a("el-col",[a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"medium"},on:{click:t.add}},[t._v("新增生产资源")]),t._v(" "),a("el-button",{attrs:{type:"success",icon:"el-icon-edit",size:"medium"},on:{click:t.editOne}},[t._v("修改生产资源")]),t._v(" "),a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",size:"medium"},on:{click:t.tableDelete}},[t._v("删除生产资源")]),t._v(" "),a("el-button",{attrs:{type:"primary",icon:"el-icon-check",size:"medium"},on:{click:function(e){return t.updateActiveStatus("1")}}},[t._v(t._s(t.$t("table.qiyong")))]),t._v(" "),a("el-button",{attrs:{type:"info",icon:"el-icon-warning-outline",size:"medium"},on:{click:function(e){return t.updateActiveStatus("0")}}},[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:"150px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称","show-overflow-tooltip":!0,width:"150px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"code",label:"编号","show-overflow-tooltip":!0,align:"center",width:"100px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"category.data",label:"类型","show-overflow-tooltip":!0,align:"center",width:"100px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"moduleDesc",label:"模型名称","show-overflow-tooltip":!0,align:"center",width:"100px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态",align:"center",width:"90px"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-tag",{attrs:{type:"1"==n.status?"success":"info"}},[t._v("\n\t\t \t"+t._s("1"==n.status?"启用":"停用")+"\n\t\t ")])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"describe",label:"对接盒子编号","show-overflow-tooltip":!0,width:"120px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"remark",label:"描述","show-overflow-tooltip":!0}}),t._v(" "),a("el-table-column",{attrs:{label:t.$t("table.operation"),fixed:"right",align:"center","column-key":"operation",width:"140px"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("el-tooltip",{staticClass:"item",attrs:{content:"修改",effect:"dark",placement:"top-start"}},[a("i",{staticClass:"el-icon-edit table-operation",staticStyle:{color:"#2db7f5"},on:{click:function(e){return t.edit(n)}}})]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{content:"删除",effect:"dark",placement:"top-start"}},[a("i",{staticClass:"el-icon-delete table-operation",staticStyle:{color:"#f50"},on:{click:function(e){return t.singleDelete(n)}}})]),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{content:"停用",effect:"dark",placement:"top-start"}},[a("i",{staticClass:"el-icon-warning-outline table-operation",staticStyle:{color:"#f50"},on:{click:function(e){return t.dongJieRow(n)}}})])]}}])})],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)],1),t._v(" "),a("tenant-edit",{ref:"edit",attrs:{"dialog-visible":t.dialog.isVisible,title:t.dialog.title,factoryId:t.edgeBoxId},on:{close:t.editClose,success:t.editSuccess}}),t._v(" "),a("tenant-view",{ref:"view",attrs:{"dialog-visible":t.tenantViewVisible},on:{close:t.viewClose}}),t._v(" "),a("el-dialog",{directives:[{name:"el-drag-dialog",rawName:"v-el-drag-dialog"}],attrs:{"close-on-click-modal":!1,"close-on-press-escape":!0,title:"预览",width:"80%",top:"50px",visible:t.preview.isVisible},on:{"update:visible":function(e){return t.$set(t.preview,"isVisible",e)}}},[a("el-scrollbar",[a("div",{domProps:{innerHTML:t._s(t.preview.context)}})])],1)],1)},i=[],r=(a("28a5"),a("6762"),a("2fdb"),a("55dd"),a("ac6a"),a("20d6"),a("5530")),o=(a("386d"),a("333d")),s=a("b34b"),c=a("a812"),l=a("d5b4"),u=a("8021"),d=a("a888"),h=a("1771"),f=a("fa7d"),m={name:"TenantManage",directives:{elDragDialog:d["a"]},components:{Pagination:o["a"],TenantEdit:s["default"],TenantView:c["default"]},data:function(){return{statusList:[],options:[],enterpriseId:"",factoryId:"",edgeBoxId:"",queryObj:{},filterText:"",treeData:[],dicts:{RESOURCES_CATEGORY:{}},type:{key:""},defaultProps:{children:"children",label:"name"},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:{}},menuUrl:["/enterpriseMgr/factoryMgr","/enterpriseMgr/workshopMgr","/enterpriseMgr/productionLineMgr","/enterpriseMgr/edgeBoxMgr","/enterpriseMgr/productionResourcesMgr"]}},created:function(){this.factoryId=this.$route.query.factoryId,this.queryObj=this.$route.query,this.edgeBoxId=this.$route.query.edgeBoxId,this.options=this.$constWKS.OPTIONS,this.statusList=this.$constWKS.STATUSLIST,console.log("路由传参【边缘盒子】数据queryObj:",this.queryObj),this.getFactoryTree()},watch:{$route:function(){this.$route.fullPath.indexOf("/enterpriseMgr/productionResourcesMgr")>-1&&(this.queryObj=this.$route.query,this.$refs.table.clearSelection())},queryObj:{deep:!0,immediate:!1,handler:function(){console.log("form数据:",this.queryObj),this.factoryId=this.$route.query.factoryId,this.queryObj=this.$route.query,this.edgeBoxId=this.$route.query.edgeBoxId,this.reSearchData()}},filterText:function(t){this.$refs.tree.filter(t)}},computed:{categoryList:function(){return Object(f["a"])(this.dicts.RESOURCES_CATEGORY)}},mounted:function(){Object(h["b"])(["RESOURCES_CATEGORY"],this.dicts),this.fetch()},methods:{filterNode:function(t,e){return!t||-1!==e.label.indexOf(t)},handleNodeClick:function(t){console.log(t)},goMeun:function(t){var e=this;console.log("【node】-点击事件: ",t);var a="",n=this.queryObj;"1"==t.data.lev&&(a=this.menuUrl[0]),"2"==t.data.lev&&(a=this.menuUrl[1]),"3"==t.data.lev&&(a=this.menuUrl[2],n.workShopId=t.data.parentId),"4"==t.data.lev&&(a=this.menuUrl[3],n.productionLineId=t.data.parentId),"5"==t.data.lev&&(a=this.menuUrl[4],n.edgeBoxId=t.data.parentId);var i={path:a,query:n};console.log("【Go】-点击事件: ",i),a==this.$route.path?(this.edgeBoxId=n.edgeBoxId,this.search(),this.getFactoryTree()):this.$store.dispatch("tagsView/delView",this.$route).then((function(t){e.$router.push(i)}))},checkBoxFun:function(t,e){console.log("【树-checkbox】node: ",this.workShopId),this.$refs.tree.setCheckedKeys([this.edgeBoxId])},reSearchData:function(){this.search(),this.factoryId&&this.getFactoryTree()},viewClose:function(){this.tenantViewVisible=!1},editClose:function(){this.dialog.isVisible=!1},editSuccess:function(){this.search(),this.getFactoryTree()},onSelectChange:function(t){this.selection=t},search:function(){this.fetch(Object(r["a"])({},this.queryParams))},reset:function(){this.type={key:""},this.queryParams=Object(h["e"])({}),this.$refs.table.clearSort(),this.$refs.table.clearFilter(),this.search()},add:function(){this.$refs.edit.type="add",this.$refs.edit.setTenant(!1,this.dicts),this.dialog.title=this.$t("common.add"),this.dialog.isVisible=!0},tableDelete:function(){this.selection.length?this.selection.length>1?this.$message({message:"只能选择一条数据!",type:"warning"}):this.batchDelete():this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},remove:function(){var t=this;this.$confirm("删除租户数据后,会将整个边缘盒子及其所有边缘盒子一些的数据全部删除。确认删除?",this.$t("common.tips"),{distinguishCancelAndClose:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){u["a"].removeMore(t.selection[0]).then((function(e){var a=e.data;a.isSuccess&&(t.$message({message:"删除成功",type:"success"}),t.search(),t.getFactoryTree())}))})).catch((function(){console.log("已经取消删除!")}))},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(){console.log("已经取消删除!")}))}else this.$message({message:this.$t("tips.noDataSelected"),type:"warning"})},clearSelections:function(){this.$refs.table.clearSelection()},delete:function(t){var e=this;u["a"].remove({ids:t}).then((function(t){var a=t.data;a.isSuccess&&(e.$message({message:e.$t("tips.deleteSuccess"),type:"success"}),e.search(),e.getFactoryTree(),e.$refs.table.clearSelection())}))},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="启用成功!"),u["a"].update(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;this.$refs.table.clearSelection(),this.$refs.table.toggleRowSelection(t,!0);var a={};a=t,a.status="0",u["a"].update(a).then((function(t){200==t.status&&(e.$message({message:"暂停成功!",type:"success"}),e.search())}))},view:function(t){this.$refs.view.setTenant(t),this.tenantViewVisible=!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.dicts),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.current=e.current?e.current:this.queryParams.current,this.queryParams.size=e.size?e.size:this.queryParams.size,this.queryParams.model.boxId=this.edgeBoxId,this.queryParams.model.type=this.type,u["a"].page(this.queryParams).then((function(e){var a=e.data;a.isSuccess&&(t.tableData=a.data)})).finally((function(){return t.loading=!1}))},getFactoryTree:function(){var t=this;l["a"].getFactoryTree(this.factoryId).then((function(e){var a=e.data;console.log("Tree的数据:",a),a.isSuccess&&(t.treeData=a.data,t.$refs.tree.setCheckedKeys([t.edgeBoxId]))})).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,b=(a("fac6"),a("6aa9"),a("2877")),v=Object(b["a"])(p,n,i,!1,null,"7c1d758d",null);e["default"]=v.exports},a397:function(t,e,a){},a40b: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("el-dialog",{staticClass:"tenant-view",attrs:{title:"选择",width:t.width,visible:t.isVisible,"append-to-body":!0},on:{"update:visible":function(e){t.isVisible=e}}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticStyle:{width:"100%"},attrs:{data:t.tableData.records,border:"",fit:"","row-key":"id"},on:{"selection-change":t.onSelectChange}},[a("el-table-column",{attrs:{prop:"code",label:"编号","show-overflow-tooltip":!0,align:"center",width:"100px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称","show-overflow-tooltip":!0,width:"150px"}}),t._v(" "),a("el-table-column",{attrs:{prop:"name",label:"模型","show-overflow-tooltip":!0,width:"150px"}}),t._v(" "),a("el-table-column",{attrs:{label:t.$t("table.operation"),fixed:"right",align:"center","column-key":"operation",width:"160px"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("a",{staticStyle:{color:"#1890ff"},on:{click:function(e){return t.selectedRow(n)}}},[t._v("选择")])]}}])})],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("5530"),o=a("333d"),s=a("5bcd"),c={name:"TenantView",components:{Pagination:o["a"]},props:{dialogVisible:{type:Boolean,default:!1}},data:function(){return{loading:!1,queryParams:{},tableData:[],screenWidth:0,width:this.initWidth(),tenant:{type:{desc:""},status:{desc:""}}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close()}}},mounted:function(){var t=this;this.fetch(),window.onresize=function(){return function(){t.width=t.initWidth()}()}},methods:{initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<550?"95%":this.screenWidth<990?"580px":this.screenWidth<1400?"600px":"650px"},setTenant:function(t){this.tenant=Object(r["a"])({},t)},close:function(){this.$emit("close")},selectedRow:function(t){this.$emit("bingName",t),this.close()},onSelectChange:function(t){this.selection=t},fetch:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.loading=!0,this.queryParams.current=e.current?e.current:this.queryParams.current,this.queryParams.size=e.size?e.size:this.queryParams.size,this.queryParams.model={},s["a"].page(this.queryParams).then((function(e){var a=e.data;a.isSuccess&&(t.tableData=a.data)})).finally((function(){return t.loading=!1}))}}},l=c,u=(a("bc3d"),a("2877")),d=Object(u["a"])(l,n,i,!1,null,"763d9eac",null);e["default"]=d.exports},a812: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("el-dialog",{staticClass:"tenant-view",attrs:{title:t.$t("common.view"),width:t.width,visible:t.isVisible},on:{"update:visible":function(e){t.isVisible=e}}},[a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:24}},[a("div",{staticClass:"img-wrapper"},[a("img",{attrs:{src:t.tenant.logo}})])])],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-user"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.code")+":"))]),t._v("\n "+t._s(t.tenant.code)+"\n ")])]),t._v(" "),a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-suitcase"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.name")+":"))]),t._v("\n "+t._s(t.tenant.name)+"\n ")])])],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-trophy"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.type")+":"))]),t._v("\n "+t._s(t.tenant.type.desc)+"\n ")])]),t._v(" "),a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-phone-outline"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.status")+":"))]),t._v("\n "+t._s(t.tenant.status.desc)+"\n ")])])],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-star-off"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.duty")+":"))]),t._v("\n "+t._s(t.tenant.duty)+"\n ")])]),t._v(" "),a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-bangzhu"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.expirationTime")+":"))]),t._v("\n "+t._s(t.tenant.expirationTime?t.tenant.expirationTime:"永久")+"\n ")])])],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-time"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.createTime")+":"))]),t._v("\n "+t._s(t.tenant.createTime)+"\n ")])]),t._v(" "),a("el-col",{attrs:{xs:24,sm:12}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-brush"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.updateTime")+":"))]),t._v("\n "+t._s(t.tenant.updateTime)+"\n ")])])],1),t._v(" "),a("el-row",{attrs:{gutter:10}},[a("el-col",{attrs:{xs:24,sm:24}},[a("div",{staticClass:"view-item"},[a("i",{staticClass:"el-icon-date"}),t._v(" "),a("span",[t._v(t._s(t.$t("table.tenant.describe")+":"))]),t._v("\n "+t._s(t.tenant.describe)+"\n ")])])],1)],1)},i=[],r=a("5530"),o={name:"TenantView",filters:{passwordErrorLockTimeFilter:function(t){return"0"===t?"当天23点59分":t}},props:{dialogVisible:{type:Boolean,default:!1}},data:function(){return{screenWidth:0,width:this.initWidth(),tenant:{type:{desc:""},status:{desc:""}}}},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close()}}},mounted:function(){var t=this;window.onresize=function(){return function(){t.width=t.initWidth()}()}},methods:{initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<550?"95%":this.screenWidth<990?"580px":this.screenWidth<1400?"600px":"650px"},setTenant:function(t){this.tenant=Object(r["a"])({},t)},close:function(){this.$emit("close")}}},s=o,c=(a("a911"),a("2877")),l=Object(c["a"])(s,n,i,!1,null,"7add4cb8",null);e["default"]=l.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,o=t.clientY-n.offsetTop,s=i.offsetWidth,c=i.offsetHeight,l=document.body.clientWidth,u=document.body.clientHeight,d=i.offsetLeft,h=l-i.offsetLeft-s,f=i.offsetTop,m=u-i.offsetTop-c,p=r(i,"left"),b=r(i,"top");p.includes("%")?(p=+document.body.clientWidth*(+p.replace(/\%/g,"")/100),b=+document.body.clientHeight*(+b.replace(/\%/g,"")/100)):(p=+p.replace(/\px/g,""),b=+b.replace(/\px/g,"")),document.onmousemove=function(t){var n=t.clientX-e,r=t.clientY-o;-n>d?n=-d:n>h&&(n=h),-r>f?r=-f:r>m&&(r=m),i.style.cssText+=";left:".concat(n+p,"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},a911:function(t,e,a){"use strict";var n=a("a397"),i=a.n(n);i.a},aef6:function(t,e,a){"use strict";var n=a("5ca1"),i=a("9def"),r=a("d2c8"),o="endsWith",s=""[o];n(n.P+n.F*a("5147")(o),"String",{endsWith:function(t){var e=r(this,t,o),a=arguments.length>1?arguments[1]:void 0,n=i(e.length),c=void 0===a?n:Math.min(i(a),n),l=String(t);return s?s.call(e,l,c):e.slice(c-l.length,c)===l}})},b34b: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("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,title:t.title,visible:t.isVisible,width:t.width,top:"50px"},on:{"update:visible":function(e){t.isVisible=e}}},[a("el-form",{ref:"form",attrs:{model:t.tenant,rules:t.rules,"label-position":"right","label-width":"130px"}},[a("el-form-item",{attrs:{label:"生产资源名称:",prop:"name"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{disabled:"edit"===t.type},model:{value:t.tenant.name,callback:function(e){t.$set(t.tenant,"name",e)},expression:"tenant.name"}}),t._v(" "),a("a",{staticClass:"checkUsed",on:{click:function(e){return t.checkUsed()}}},[t._v("绑定已有")])],1),t._v(" "),a("el-form-item",{attrs:{label:"编码:",prop:"code"}},[a("el-input",{staticStyle:{width:"80%"},model:{value:t.tenant.code,callback:function(e){t.$set(t.tenant,"code",e)},expression:"tenant.code"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"类型:",prop:"category"}},[[a("el-select",{staticStyle:{width:"80%"},attrs:{placeholder:"请选择"},model:{value:t.tenant.category.key,callback:function(e){t.$set(t.tenant.category,"key",e)},expression:"tenant.category.key"}},t._l(t.dicts.RESOURCES_CATEGORY,(function(t,e,n){return a("el-option",{key:n,attrs:{label:t,value:e}})})),1)]],2),t._v(" "),a("el-form-item",{attrs:{label:"模型:",prop:"moduleId"}},[[a("el-select",{staticStyle:{width:"80%"},attrs:{placeholder:"请选择"},model:{value:t.tenant.moduleId,callback:function(e){t.$set(t.tenant,"moduleId",e)},expression:"tenant.moduleId"}},t._l(t.moduleList,(function(t){return a("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)]],2),t._v(" "),a("el-form-item",{attrs:{label:"状态:",prop:"status"}},[[a("el-radio",{attrs:{label:"1"},model:{value:t.tenant.status,callback:function(e){t.$set(t.tenant,"status",e)},expression:"tenant.status"}},[t._v("启用")]),t._v(" "),a("el-radio",{attrs:{label:"0"},model:{value:t.tenant.status,callback:function(e){t.$set(t.tenant,"status",e)},expression:"tenant.status"}},[t._v("停用")])]],2),t._v(" "),a("el-form-item",{attrs:{label:"描述:",prop:"remark"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{type:"textarea",rows:3},model:{value:t.tenant.remark,callback:function(e){t.$set(t.tenant,"remark",e)},expression:"tenant.remark"}}),t._v(" "),a("el-tooltip",{staticClass:"item",attrs:{content:"不超过100个字符。",effect:"dark",placement:"top-end"}},[a("i",{staticClass:"el-icon-question"})])],1)],1),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{plain:"",type:"warning"},on:{click:function(e){t.isVisible=!1}}},[t._v(t._s(t.$t("common.cancel")))]),t._v(" "),a("el-button",{attrs:{plain:"",type:"primary",disabled:t.confirmDisabled},on:{click:t.submitForm}},[t._v(t._s(t.$t("common.confirm")))])],1),t._v(" "),a("select-table",{ref:"view",attrs:{"dialog-visible":t.selectTableVisible},on:{bingName:t.bingName,close:t.viewClose}})],1)},i=[],r=a("5530"),o=(a("7f7f"),a("c2cf"),a("5657"),a("8021")),s=a("5caa"),c=a("a40b"),l=a("b170"),u=(a("27ae"),{name:"TenantEdit",components:{SelectTable:c["default"]},props:{dialogVisible:{type:Boolean,default:!1},title:{type:String,default:""},factoryId:{type:String,default:""}},data:function(){var t=this;return{selectTableVisible:!1,moduleList:[],type:"add",dicts:{RESOURCES_CATEGORY:{}},tenant:this.initTenant(),screenWidth:0,width:this.initWidth(),confirmDisabled:!1,roles:[],rules:{name:[{required:!0,message:"生产资源名称必填",trigger:"blur"}],code:[{required:!0,message:"编码必填",trigger:"blur"},{min:1,max:50,message:this.$t("rules.range4to10"),trigger:"blur"},{validator:function(e,a,n){"add"===t.type?Object(l["d"])(a)?n():n("编码只能是字母、数字或_"):n()},trigger:"blur"}],category:[{required:!0,message:"类型必填",trigger:"change"}],moduleId:[{required:!0,message:"模型必填",trigger:"change"}],status:[{required:!0,message:"状态必填",trigger:"blur"}]}}},created:function(){this.getModuleList()},computed:{isVisible:{get:function(){return this.dialogVisible},set:function(){this.close(),this.reset()}}},mounted:function(){var t=this;window.onresize=function(){return function(){t.width=t.initWidth()}()}},methods:{viewClose:function(){this.selectTableVisible=!1},bingName:function(t){console.log("返回的数据:",t),this.tenant.name=t.name},initTenant:function(){return{id:"",code:"",name:"",status:"1",category:{key:""},remark:""}},initWidth:function(){return this.screenWidth=document.body.clientWidth,this.screenWidth<991?"90%":this.screenWidth<1400?"45%":"800px"},setTenant:function(t,e){t&&(this.tenant=Object(r["a"])({},t)),this.dicts=e},close:function(){this.$emit("close")},submitForm:function(){var t=this;this.$refs.form.validate((function(e){if(!e)return!1;t.confirmDisabled=!0,t.tenant.type={key:"2"},"add"===t.type?(t.tenant.boxId=t.factoryId,t.save()):t.update()}))},save:function(){var t=this;o["a"].save(this.tenant).then((function(e){var a=e.data;a.isSuccess&&(t.isVisible=!1,t.$message({message:t.$t("tips.createSuccess"),type:"success"}),t.$emit("success"))})).finally((function(){return t.confirmDisabled=!1,!0}))},update:function(){var t=this;o["a"].update(this.tenant).then((function(e){var a=e.data;a.isSuccess&&(t.isVisible=!1,t.$message({message:t.$t("tips.updateSuccess"),type:"success"}),t.$emit("success"))})).finally((function(){return t.confirmDisabled=!1,!0}))},reset:function(){this.$refs.form.clearValidate(),this.$refs.form.resetFields(),this.tenant=this.initTenant()},checkUsed:function(){this.selectTableVisible=!0},getModuleList:function(){var t=this;s["a"].getList({}).then((function(e){e=e.data,t.moduleList=e.data}))}}}),d=u,h=(a("70f3"),a("2877")),f=Object(h["a"])(d,n,i,!1,null,null,null);e["default"]=f.exports},bc3d:function(t,e,a){"use strict";var n=a("9021"),i=a.n(n);i.a},c2cf:function(t,e,a){"use strict";var n=a("5530"),i=a("9256"),r=a("5657"),o={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"])({},o.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})}}},d5b4:function(t,e,a){"use strict";var n=a("5530"),i=a("9256"),r={getList:{method:"POST",url:"/authority/factory/all"},page:{method:"POST",url:"/authority/factory/page"},save:{method:"POST",url:"/authority/factory"},update:{method:"POST",url:"/authority/factory/update"},remove:{method:"POST",url:"/authority/factory/delete"},updateStatus:{method:"POST",url:"/authority/factory/updateStatus"}};e["a"]={getList:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.getList),{},{data:t}))},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}))},remove:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.remove),{},{data:t}))},updateStatus:function(t){return Object(i["a"])(Object(n["a"])(Object(n["a"])({},r.updateStatus),{},{data:t}))},getFactoryTree:function(t){return Object(i["a"])({method:"GET",url:"/authority/factory/factoryTree/".concat(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}))}}},fa7d:function(t,e,a){"use strict";a.d(e,"c",(function(){return n})),a.d(e,"d",(function(){return i})),a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return o}));a("4917");var n=function(t){var e={terminal:"",browser:"",terminalType:{}};return e.terminalType={trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Adr")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari"),weixin:t.indexOf("MicroMessenger")>-1,qq:" qq"===t.match(/\sQQ/i)},e.terminalType.ios||e.terminalType.iPhone||e.terminalType.iPad?e.terminal="苹果":e.terminalType.android?e.terminal="安卓":e.terminal="PC",/msie/i.test(t)&&!/opera/.test(t)?e.browser="IE":/firefox/i.test(t)?e.browser="Firefox":/chrome/i.test(t)&&/webkit/i.test(t)&&/mozilla/i.test(t)?e.browser="Chrome":/opera/i.test(t)?e.browser="Opera":/iPad/i.test(t)?e.browser="iPad":!/webkit/i.test(t)||/chrome/i.test(t)&&/webkit/i.test(t)&&/mozilla/i.test(t)?e.browser="未知":e.browser="Safari",e},i=function(t){if(null==t||""==t)return"0 B";var e=new Array("B","KB","MB","GB","TB","PB","EB","ZB","YB"),a=0,n=parseFloat(t);a=Math.floor(Math.log(n)/Math.log(1024));var i=n/Math.pow(1024,a);return i=i.toFixed(2),e[a]?i+e[a]:"文件太大"},r=function(t){var e=[];if(t)for(var a in t)e.push({text:t[a],value:a});return e},o=function(t){if(t){var e=document.createElement("input");e.value=t,document.body.appendChild(e),e.select(),document.execCommand("Copy"),e.className="oInput",e.style.display="none"}}},fac6:function(t,e,a){"use strict";var n=a("5170"),i=a.n(n);i.a}}]);
|