2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-227a6a15"],{4381:function(e,t,i){"use strict";i("d3b7"),i("caad"),i("2532"),i("d9e2");var a=i("4360"),n={inserted:function(e,t){var i=t.value,n=a["a"].getters&&a["a"].getters.butPermission;if(console.log(n,"roles"),!(i&&i instanceof Array&&i.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var s=i,o=n.some((function(e){return s.includes(e)}));if(console.log(o,"hasPermission"),o)a["a"].state.user.permissionFlag[s]=!1;else{a["a"].state.user.permissionFlag[s]=!0,console.log(a["a"].state.user.permissionFlag[s],"permissionRoles");var r=document.createElement("div");r.style.cursor="not-allowed",r.style.display="inline-block",e.style.pointerEvents="none",e.parentNode.insertBefore(r,e),e.parentNode&&e.parentNode.removeChild(e),r.appendChild(e),console.log(e,"permissionRoles")}}},s=function(e){e.directive("permission",n)};window.Vue&&(window["permission"]=n,Vue.use(s)),n.install=s;t["a"]=n},7930:function(e,t,i){"use strict";i.d(t,"c",(function(){return n})),i.d(t,"a",(function(){return s})),i.d(t,"b",(function(){return o})),i.d(t,"d",(function(){return r}));var a=i("b775");function n(e){return Object(a["a"])({url:"device-service/type/getTypeList",method:"get",params:e})}function s(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/addType",method:"post",data:e})}function o(e){var t={typeById:e};return Object(a["a"])({url:"device-service/type/deleteType",method:"delete",params:t})}function r(e){return Object(a["a"])({headers:{"Content-Type":"application/json"},url:"device-service/type/updateType",method:"put",data:e})}},"7db4":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"app-container department"},[i("div",{staticClass:"decorate"}),i("div",{staticClass:"filter-container"},[i("el-input",{staticClass:"filter-item",staticStyle:{width:"180px"},attrs:{placeholder:e.$t("deviceType.typeName")},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleFilter.apply(null,arguments)}},model:{value:e.listQuery.typeName,callback:function(t){e.$set(e.listQuery,"typeName",t)},expression:"listQuery.typeName"}}),i("span",{staticClass:"btn-item",on:{click:e.handleFilter}},[i("i",{staticClass:"iconfont icon-sousuo"}),e._v(e._s(e.$t("btn.search")))]),i("span",{staticClass:"btn-item",on:{click:e.clearListQuery}},[i("i",{staticClass:"el-icon-refresh-left"}),e._v(" "+e._s(e.$t("btn.resetting")))]),i("div",{staticClass:"control-container"},[i("span",{staticClass:"btn-item",on:{click:function(t){return e.handleCreate(0)}}},[i("i",{staticClass:"iconfont icon-a-"}),e._v(e._s(e.$t("deviceType.addAType")))])])],1),i("div",{staticClass:"table-container"},[i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.data,"row-key":"typeId","max-height":"580","default-expand-all":"","header-row-class-name":"table-header","row-class-name":"table-row","highlight-current-row":"","tree-props":{children:"children",hasChildren:"hasChildren"}},on:{"expand-change":e.getChange,"current-change":e.handleCurrentChange}},[i("el-table-column",{attrs:{prop:"typeName",align:"left",label:e.$t("deviceType.typeName")}}),i("el-table-column",{attrs:{prop:"typeCode",align:"left",label:e.$t("deviceType.typeCode")}}),i("el-table-column",{attrs:{label:e.$t("deviceType.icon"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){return[i("img",{staticStyle:{width:"36px",height:"36px"},attrs:{src:e.row.icon}})]}}])}),i("el-table-column",{attrs:{label:e.$t("table.operate"),width:"260",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",{staticClass:"btnCancel",attrs:{title:e.$t("table.update")},on:{click:function(i){return e.handleUpdate(t)}}},[i("i",{staticClass:"iconfont icon-bianji"}),e._v(" "+e._s(e.$t("table.update")))]),i("span",{staticClass:"btnCancel",attrs:{title:e.$t("deviceType.addSon")},on:{click:function(
|
||
|
//# sourceMappingURL=chunk-227a6a15.0f245f24.js.map
|