PageSourceSearch

https://www.anyviewer.com/user/js/278.b4751231.js

js anyviewer.com collected 2026-09-26 04:01:46 UTC 13,004 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkanyviewer"]=self["webpackChunkanyviewer"]||[]).push([[278],{278:function(e,t,s){s.r(t),s.d(t,{default:function(){return g}});var i=function(){var e=this,t=e._self._c;return t("el-drawer",{staticClass:"permis-edit",attrs:{title:"",size:["jp","tw","cn"].includes(e.lang)?"650px":"750px",visible:e.visible,direction:"rtl","before-close":e.handleClose},on:{"update:visible":function(t){e.visible=t}}},[t("i18n",{staticClass:"tt",staticStyle:{margin:"10px 0 30px"},attrs:{tag:"h3",path:"role18"}},[t("strong",{staticStyle:{color:"#ccc"},attrs:{slot:"name"},slot:"name"},[e._v(" "+e._s(e.permissions.name)+" ")])]),[t("el-form",{ref:"form",attrs:{"label-width":"80px","label-position":"top"}},[t("el-form-item",{staticStyle:{"margin-right":"40px"},attrs:{label:e.$t("role6")}},[t("el-radio-group",{attrs:{disabled:1===e.permissions.type},model:{value:e.user,callback:function(t){e.user=t},expression:"user"}},[t("el-radio",{attrs:{label:0}},[e._v(" "+e._s(e.$t("role9"))+" "),t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt top"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role23"))+" ")])])])]),t("el-radio",{attrs:{label:2}},[e._v(" "+e._s(e.$t("role8"))+" "),t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt top cet"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role24"))+" ")])])])]),t("el-radio",{attrs:{label:1}},[e._v(" "+e._s(e.$t("role7"))+" "),t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt top lf"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role22"))+" ")])])])])],1)],1),t("el-form-item",{staticStyle:{"margin-right":"40px"},attrs:{label:e.$t("menu.deviceManagement")}},[t("el-radio-group",{attrs:{disabled:1===e.permissions.type},model:{value:e.device,callback:function(t){e.device=t},expression:"device"}},[t("el-radio",{attrs:{label:0}},[e._v(" "+e._s(e.$t("role9"))+" "),t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt top"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role21"))+" ")])])])]),t("el-radio",{attrs:{label:2}},[e._v(" "+e._s(e.$t("role8"))+" "),t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt top cet"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role20"))+" ")])])])]),t("el-radio",{attrs:{label:1}},[e._v(" "+e._s(e.$t("role7"))+" "),t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt top lf"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role19"))+" ")])])])])],1)],1),t("el-form-item",{attrs:{label:e.$t("role10")}},e._l(e.ctrl,(function(s){return t("span",{key:s.name},[0!==s.devChecked||0===s.devTotal?t("el-tag",{staticStyle:{"margin-right":"10px"}},[e._v(" "+e._s("Ungrouped"===s.name?e.$t("deploy.unGrp"):s.name)+" "),s.devChecked!==s.devTotal?t("span",{staticStyle:{"margin-left":"5px"}},[e._v(" "+e._s(`${s.devChecked}/${s.devTotal}`)+" ")]):e._e()]):e._e()],1)})),0),t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("role25"),"prefix-icon":"el-icon-search",disabled:1===e.permissions.type},on:{input:e.debouncedsearchChange},model:{value:e.search,callback:function(t){e.search=t},expression:"search"}}),t("div",{staticClass:"group-tree"},[this.search?t("vxe-table",{ref:"sTree",attrs:{border:"none","row-id":"idx","min-height":"300",loading:e.loading,"row-config":{isCurrent:!0,isHover:!0},"tree-config":{transform:!0,rowField:"idx",parentField:"parentID",iconLoaded:"am-icon-",expandAll:!0},"checkbox-config":{checkField:"isChecked",indeterminateField:"indeterminate",showHeader:!1,checkMethod:e.checkboxsMethod},data:e.searchTree},on:{"checkbox-change":e.selectChange},scopedSlots:e._u([{key:"empty",fn:function(){return[t("div",{staticClass:"table-empty"},[e._v(" "+e._s(e.$t("role29",{search:e.search}))+" ")])]},proxy:!0},{key:"loading",fn:function(){return[t("div",{staticClass:"table-loading"},[t("div",{staticClass:"el-loading-spinner"},[t("svg",{staticClass:"circular",attrs:{width:"200px",viewBox:"25 25 50 50"}},[t("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t("p",{staticClass:"el-loading-text"},[e._v(" "+e._s(e.$t("loading"))+" ")])])])]},proxy:!0}])},[t("vxe-column",{attrs:{type:"checkbox",width:"50","tree-node":""},scopedSlots:e._u([{key:"default",fn:function({row:s}){return[s.icon?t("i",{staticClass:"mr6"}):e._e(),s.idx.match(/^root/)&&2!==s.checked?t("div",{staticClass:"other-tips-cnt btm rt"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(0===s.devTotal?e.$t("role30"):e.$t("role26"))+" ")])]):e._e(
1)]}}])}),t("vxe-column",{attrs:{field:"showName"},scopedSlots:e._u([{key:"default",fn:function({row:s}){return[t("span",{staticClass:"f-mid"},[e._v(" "+e._s(s.showName)+" ")]),0===s.quickConnect?t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt btm rt"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role27"))+" ")])])]):e._e()]}}])}),t("vxe-column",{staticClass:"td-id",attrs:{field:"deviceID"}})],1):t("vxe-table",{ref:"xTree",attrs:{border:"none","row-id":"idx","min-height":"300",loading:e.loading,"row-config":{isCurrent:!0,isHover:!0},"tree-config":{lazy:!0,transform:!0,rowField:"idx",parentField:"parentID",iconLoaded:"am-icon-treeload",expandRowKeys:[],loadMethod:e.loadChildrenMethod,toggleMethod:e.toggleMethod},"checkbox-config":{checkField:"isChecked",indeterminateField:"indeterminate",showHeader:!1,checkMethod:e.checkboxsMethod},data:e.treeData},on:{"checkbox-change":e.selectChange},scopedSlots:e._u([{key:"empty",fn:function(){return[t("div",{staticClass:"table-empty"},[t("i",{staticClass:"empty-device",staticStyle:{"margin-top":"40px"}}),t("i18n",{attrs:{tag:"p",path:"role28"}},[t("el-button",{staticStyle:{padding:"0 0"},attrs:{slot:"deploy",type:"text"},on:{click:e.goDeploy},slot:"deploy"},[e._v(" "+e._s(e.$t("perDev.deploy"))+" ")])],1)],1)]},proxy:!0},{key:"loading",fn:function(){return[t("div",{staticClass:"table-loading"},[t("div",{staticClass:"el-loading-spinner"},[t("svg",{staticClass:"circular",attrs:{width:"200px",viewBox:"25 25 50 50"}},[t("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]),t("p",{staticClass:"el-loading-text"},[e._v(" "+e._s(e.$t("loading"))+" ")])])])]},proxy:!0}],null,!1,1176838152)},[t("vxe-column",{attrs:{type:"checkbox",width:"50","tree-node":""},scopedSlots:e._u([{key:"default",fn:function({row:s}){return[s.idx.match(/^root/)&&2!==s.checked?t("div",{staticClass:"other-tips-cnt btm rt"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role26"))+" ")])]):e._e()]}}],null,!1,1946980043)}),t("vxe-column",{attrs:{field:"showName"},scopedSlots:e._u([{key:"default",fn:function({row:s}){return[s.icon?t("i",{staticClass:"icon-dev"}):e._e(),t("span",{staticClass:"f-mid"},[e._v(" "+e._s(s.showName)+" ")]),0===s.quickConnect?t("div",{staticClass:"tips-x"},[t("i",{staticClass:"av-icon-sm icon-tips"}),t("div",{staticClass:"tips-cnt btm rt"},[t("div",{staticClass:"tips-cnt-txt"},[e._v(" "+e._s(e.$t("role27"))+" ")])])]):e._e()]}}],null,!1,1821994619)}),t("vxe-column",{staticClass:"td-id",attrs:{field:"deviceID"}})],1)],1)],1)],1)],t("div",{staticClass:"drawer-bottom"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("cancel")))]),t("el-button",{attrs:{type:"primary",loading:e.saveBtnLoading},on:{click:e.save}}
1,[e._v(e._s(e.$t("save")))])],1)],2)},a=[],n=(s(57658),s(63822)),r=s(84722),c=s(82212),o=s(50586);const l=function(e){const t=e.map(((e,t)=>Object.assign(e,{idx:"root_"+e.id,hasChild:0!==e.devTotal,showName:0===e.id?c.Z.t("deploy.unGrp"):e.name,parentID:null,isChecked:2===e.checked,indeterminate:1===e.checked})));return t},d=function(e,t){const s=e.map(((e,s)=>Object.assign(e,{idx:`rroot_${e.deviceID}`,showName:e.memo||e.nickName,hasChild:!1,parentID:t.idx,isChecked:t.indeterminate?e.checked:t.isChecked,parentName:t.showName,parentDevTotal:t.devTotal,icon:"dev"})));return s},h=function(e){const t=[];return e.forEach(((e,s)=>{e.idx="root_"+s,e.showName=0===e.ID?c.Z.t("deploy.unGrp"):e.name,e.parentID=null,e.isChecked=2===e.checked,e.indeterminate=1===e.checked,e.hasChild=!0,t.push(e),e.devices&&e.devices.forEach(((s,i)=>{s.idx=`rroot_${s.deviceID}`,s.showName=s.memo||s.nickName,s.parentID=e.idx,s.isChecked=0!==s.checked,s.hasChild=!1,s.parentName=e.name,s.parentDevTotal=e.devTotal,s.icon="dev",t.push(s)}))})),t},p=function(e,t){return e.filter((e=>{const s=t.some((t=>t.deviceID===e.deviceID));return!s}))};var v={name:"editPermissions",inject:["reload"],props:{visible:{type:Boolean,default:!1},permissions:{type:Object,default:()=>{}},lang:{type:String,default:"en"}},watch:{changeDevice(e){}},data(){return{user:0,device:0,search:"",ctrl:[],allGroup:[],treeData:[],enterpriseID:Number(this.$route.params.companyName),loading:!1,changeDevice:[],allCheckedDevice:[],saveBtnLoading:!1,searchTree:[],searchTree2:[]}},components:{},computed:{...(0,n.rn)({groudInfo:e=>e.enterprise.GROUP_LIST}),folderChanged(){let e=[];return this.treeData.forEach((t=>{let s=t.checked;!1===t.isChecked&&!0===t.indeterminate?s=1:!1===t.isChecked&&!1===t.indeterminate?s=0:!0===t.isChecked&&!1===t.indeterminate&&(s=2),s!==t.checked&&e.push({folderID:t.id,checked:s})})),e}},mounted(){this.getTreeData().then((()=>{this.allGroup=this.treeData.filter((e=>e.devTotal>0)).map((e=>{const t=this.ctrl.filter((t=>t.name===e.name));return{name:e.name,devChecked:t.length>0?t[0].devChecked:0,devTotal:e.devTotal}}))})),this.user=this.permissions.userPermissions,this.device=this.permissions.devicePermissions,this.ctrl=this.permissions.ctrlFolder.map((e=>({devChecked:e.devChecked,devTotal:e.devTotal,name:e.name})))},methods:{...(0,n.OI)({updataIsRoleType:"enterprise/UPDATE_ROLE_TYPE"}),getTreeData(){this.loading=!0;const e={enterpriseID:this.enterpriseID,rolesID:this.permissions.id};return(0,o.i3)(e).then((e=>{200===e.code&&(this.treeData=l(e.data))})).finally((()=>{this.loading=!1}))},loadChildrenMethod({row:e}){const t={enterpriseID:this.enterpriseID,rolesID:this.permissions.id,folderID:e.id,offset:0,rows:9999};return(0,o.qT)(t).then((t=>{if(200===t.code){const s=d(t.data,e),i=s.filter((e=>!e.checked!==!e.isChecked));return this.changeDevice=p(this.changeDevice,i).concat(i),s}}))},toggleMethod({expanded:e,row:t,column:s,columnIndex:i}){return!0},selectChange({$event:e,row:t,...s}){if(e.stopPropagation(),t.parentID){const e=[{...t}];this.changeDevice=p(this.changeDevice,e),!t.isChecked!==!t.checked&&(this.changeDevice=this.changeDevice.concat(e)),this.setCtrlDev()}else t.children.length>0?(this.changeDevice=p(this.changeDevice,t.children).concat(t.children.filter((e=>!e.checked!==!e.isChecked))),this.setCtrlDev()):(this.$refs.xTree.reloadTreeExpand(t),this.setCtrlDev(t))},checkboxsMethod({row:e}){return 1!==this.permissions.type},handleClose(){this.$emit("update:visible",!1)},searchChange(){if(!this.search.trim())return;this.loading=!0;const e={enterpriseID:this.enterpriseID,keyWords:this.search.trim(),rolesID:this.permissions.id};(0,o.Sj)(e).then((e=>{this.searchTree=h(e.data),setTimeout((()=>{this.$refs.sTree.setAllTreeExpand(!0)}),500)})).finally((()=>{this.loading=!1}))},searchSelectChange({row:e}){},debouncedsearchChange:(0,r.Ds)((function(){this.searchChange()}),500),setCtrlDev(e){e?e.isChecked?(this.ctrl.forEach((t=>{t.name===e.name&&(t.devChecked=t.devTotal)})),this.ctrl.some((t=>t.name===e.name))||this.ctrl.push({name:e.name,devChecked:e.devTotal,devTotal:e.devTotal})):this.ctrl=this.ctrl.filter((t=>t.name!==e.name)):(this.ctrl=this.permissions.ctrlFolder.map((e=>({devChecked:e.devChecked,devTotal:e.devTotal,name:e.name}))),this.changeDevice.length>0&&this.changeDevice.forEach((e=>{this.ctrl.forEach(((t,s)=>{e.parentName===t.name&&(e.isChecked?t.devChecked++:t.devChecked--)}
1)),this.ctrl.some((t=>t.name===e.parentName))||this.ctrl.push({name:e.parentName,devChecked:1,devTotal:e.parentDevTotal})})))},async save(){const e={enterpriseID:this.enterpriseID,rolesID:this.permissions.id,userPermissions:this.user,devicePermissions:this.device,data:this.changeDevice.map((e=>({deviceID:e.deviceID,checked:e.isChecked?1:0}))),folderChanged:this.folderChanged};this.saveBtnLoading=!0;const t=await(0,o.Gf)(e);this.saveBtnLoading=!1,200===t.code?(this.$emit("saveSucc"),this.user===this.permissions.userPermissions&&this.device===this.permissions.devicePermissions||(this.permissions.name===this.groudInfo[0].roleName||[1,2].includes(this.permissions.type)&&this.permissions.type===this.groudInfo[0].role)&&(this.updataIsRoleType(!0),this.$router.go(0))):this.$message.error(this.$t(`subscribeErr.${Math.abs(t.code)}`))},goDeploy(){this.$router.push({name:"deviceDeploy"})}},created(){}},m=v,u=s(43736),C=(0,u.Z)(m,i,a,!1,null,"031d61ee",null),g=C.exports}}]);
2//# sourceMappingURL=278.b4751231.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.