Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/90.ef74697756c015d6c8d7.js
T
反编译工作区 4f79e10bd6 chore: cleanup stray nested directories in frontend-source
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
2026-04-29 13:07:40 +08:00

1 line
17 KiB
JavaScript

webpackJsonp([90],{HXf4:function(t,e,s){(t.exports=s("FZ+f")(!1)).push([t.i,"\n.el-input__inner[data-v-5fc84800],\n.el-textarea__inner[data-v-5fc84800] {\n border-color: #999999;\n}\n.el-input.is-active .el-input__inner[data-v-5fc84800],\n.el-input__inner[data-v-5fc84800]:focus {\n border-color: #c0c4cc;\n}\n.el-select .el-input.is-focus .el-input__inner[data-v-5fc84800] {\n border-color: #c0c4cc;\n}\n.el-menu-item.is-active[data-v-5fc84800] {\n background: #e4071e !important;\n color: #ffffff;\n}\n.el-input-number.is-controls-right .el-input-number__increase[data-v-5fc84800] {\n top: 2px;\n}\n.el-input-number.is-controls-right .el-input-number__decrease[data-v-5fc84800] {\n bottom: 2px;\n}\n.el-button--primary[data-v-5fc84800] {\n color: #fff;\n background: #e4071e;\n border-radius: 4px !important;\n border: 1px solid #e4071e;\n}\n.el-button--primary[data-v-5fc84800]:hover {\n background: #e94959;\n border: 1px solid #e94959;\n opacity: 0.6;\n}\n.el-button--primary[data-v-5fc84800]:focus {\n background: #bb0014;\n border: 1px solid #bb0014;\n}\n.el-button--danger.is-plain[data-v-5fc84800] {\n background: #f7f3ea;\n color: #8b270e;\n border: none;\n}\n.el-button--danger.is-plain[data-v-5fc84800]:hover {\n background: #8b270e;\n color: #fff;\n border: none;\n}\n.el-button--warning[data-v-5fc84800] {\n background: #3399ff;\n border: 1px solid #3399ff;\n border-radius: 4px;\n}\n.el-button--warning[data-v-5fc84800]:hover {\n border: 1px solid #63b1ff;\n background: #63b1ff;\n opacity: 0.6;\n}\n.el-button--warning[data-v-5fc84800]:focus {\n border: 1px solid #1378dd;\n background: #1378dd;\n}\n.el-button--success.is-plain[data-v-5fc84800] {\n border: none;\n}\n.el-button--success.is-plain[data-v-5fc84800]:hover {\n border: none;\n}\n.el-button--default[data-v-5fc84800] {\n color: #606266;\n border: 1px solid #bcc0c5;\n}\n.el-button--default[data-v-5fc84800]:hover {\n color: #606266;\n background: #fff;\n border: 1px solid #d7d9dc;\n opacity: 0.6;\n}\n.el-button--default[data-v-5fc84800]:focus {\n color: #606266;\n background: #fff;\n border: 1px solid #74777c;\n}\n.el-button--text[data-v-5fc84800] {\n color: #3399ff;\n}\n.el-button--text[data-v-5fc84800]:hover {\n color: #3399ff;\n}\n.web-terminal .el-loading-mask[data-v-5fc84800] {\n background-color: transparent;\n}\n.label-icon[data-v-5fc84800] {\n float: right;\n position: absolute;\n top: 12px;\n left: 676px;\n}\n.top-title[data-v-5fc84800] {\n border-bottom: 1px dashed #ddd;\n}\n.setting-type[data-v-5fc84800] {\n margin-left: 100px;\n}\n.setting-type li[data-v-5fc84800] {\n display: inline-block;\n margin: 0px 40px 20px 0;\n}\n.cur[data-v-5fc84800] {\n background: #e4071e;\n padding: 4px 6px;\n border-radius: 4px;\n color: #fff;\n}\nli[data-v-5fc84800] {\n list-style: none;\n cursor: pointer;\n}\n[data-v-5fc84800] .el-input {\n width: 660px;\n height: 36px;\n}\n[data-v-5fc84800] .el-form-item__label {\n font-weight: 400;\n}\n.password-input[data-v-5fc84800] .el-input {\n width: 70%;\n}\n[data-v-5fc84800] .el-dialog__body {\n padding-bottom: 0px;\n}\n",""])},IANy:function(t,e,s){var n=s("HXf4");"string"==typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);s("rjj0")("46564f9b",n,!0)},ICQ6:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s("woOf"),i=s.n(n),o=s("Xxa5"),a=s.n(o),c=s("exGp"),r=s.n(c),l=s("pFYg"),d=s.n(l),p=s("EEkg"),u=s("/W+i"),h=s("Dm4i"),f=s("imqz"),v={components:{Empty:s("iVvP").a},filters:{filterEncryptionType:function(t){if(null===t||void 0===(void 0===t?"undefined":d()(t)))return"";return["不加密","公钥加密","SM4加密","AES加密","DES"][t]||""}},data:function(){return{hasAuth:0,normalRule:h.normalRule,setForm:{encryptionType:3,newTokenTime:"",accessKeyId:""},businessId:window.sessionStorage.getItem("businessId"),isEdit:!1,showEmpty:!1,temTokenTime:"",curTab:"",typeList:[],shortTypeList:[],longTypeList:[],isShowOpen:!1,noClose:!0,dialogVisible:!1,ruleForm2:{password:""},isASshow:!1,isEncryptionShow:!1,isAESshow:!1,deviceKey:"",isShow:"",companies:[],curCompany:"",shortCode:""}},created:function(){this.getAuthedInfo()},methods:{fetchAddAuth:function(){var t=this;return r()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:try{f.a.post("/portal/device/setting/add",{deviceTypeIds:[t.curTab],businessId:t.businessId}).then(function(e){t.$message.success("添加成功"),t.getAuthedInfo()})}catch(e){t.$message.error(e.message)}case 1:case"end":return e.stop()}},e,t)}))()},cancelAdd:function(){var t=this;return r()(a.a.mark(function e(){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.getAuthedInfo();case 1:case"end":return e.stop()}},e,t)}))()},getAuthedInfo:function(){var t=this;return r()(a.a.mark(function e(){var s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t.refreshTabs(),t.hasAuth=0,s=[],e.prev=3,e.next=6,f.a.post("/portal/device/setting/type/list",{hasAuth:t.hasAuth,businessId:t.businessId});case 6:s=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3);case 12:s.success&&(t.companies=s.data,t.showEmpty=t.checkIsEmpty(s.data));case 13:case"end":return e.stop()}},e,t,[[3,9]])}))()},refreshTabs:function(){this.curTab="",this.curCompany="",this.shortTypeList=[],this.typeList=[]},fetchDeviceTypes:function(){var t=this;return r()(a.a.mark(function e(){var s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=[],e.prev=1,e.next=4,f.a.post("/portal/device/setting/type/list",{hasAuth:1,businessId:t.businessId});case 4:s=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1);case 10:s.success&&(t.checkIsEmpty(s.data)?t.$message.warning("暂无未授权设备"):(t.hasAuth=1,t.showEmpty=!1,t.companies=s.data)),t.refreshTabs();case 12:case"end":return e.stop()}},e,t,[[1,7]])}))()},checkIsEmpty:function(t){var e=0;return t.forEach(function(t){t.children&&t.children.length&&e++}),!e},chooseCompany:function(t){this.curCompany!==t.id&&this.close(),this.curCompany=t.id,this.fetchType(t.children),this.isASshow=!1,this.shortCode=""},fetchType:function(t){return t=t.map(function(t){return{label:t.name,value:t.id,typeCode:t.deviceTypeCode}}),this.longTypeList=t,t.length?(this.curTab=t[0].value,this.fetchData(this.curTab),t.length<=6?(this.isShowOpen=!1,this.typeList=t,void(this.typeCode=this.typeList[0].typeCode)):(this.isShowOpen=!0,this.shortTypeList=t.slice(0,6),void(this.typeList=this.shortTypeList))):(this.curTab="",this.shortTypeList=[],void(this.typeList=[]))},fetchData:function(t){var e=this;p.a.settingGet(t,this.businessId).then(function(t){e.setForm.encryptionType=t.data.encryptionType||3,e.temTokenTime=t.data.newTokenTime,e.setForm.newTokenTime=t.data.newTokenTime,e.setForm.accessKeyId=t.data.accessKeyId})},edit:function(){this.isEdit=!0},tabClick:function(t,e){this.accessKeySecret="",this.encryptionSecret="",this.aesSalt="",this.curTab=t,this.isAESshow=!1,this.isEncryptionShow=!1,this.isASshow=!1,this.fetchData(t),this.typeCode=e,this.shortCode=""},cancel:function(){this.isEdit=!1,this.setForm.newTokenTime=this.temTokenTime},save:function(t){var e=this;this.setForm.newTokenTime>120||this.setForm.newTokenTime<30?this.$message.error("设备通信令牌过期时间,范围[30分-120分]"):this.$refs[t].validate(function(t){if(!t)return!1;e.setForm.encryptionType=3,e.setForm.deviceTypeId=e.curTab,p.a.settingEdit(i()({businessId:e.businessId},e.setForm)).then(function(t){e.$message.success(t.message),e.isEdit=!1})})},open:function(){this.isOpen=!0,this.typeList=this.longTypeList,this.noClose=!1},close:function(){this.noClose=!0,this.isOpen=!1,this.typeList=this.shortTypeList},ASshow:function(){this.dialogVisible=!0,this.deviceKey="accessKeySecret"},encryptionShow:function(){this.dialogVisible=!0,this.deviceKey="encryptionSecret"},AESshow:function(){this.dialogVisible=!0,this.deviceKey="aesSalt"},checkPassword:function(t){var e=this;this.$refs[t].validate(function(s){if(!s)return!1;var n=e.ruleForm2.password;p.a.checkPassword({password:Object(u.a)(n),deviceSettingKey:e.deviceKey,deviceTypeId:e.curTab,businessId:e.businessId}).then(function(t){"shortCode"===e.deviceKey?e.refreshShortCode(n):"accessKeySecret"===e.deviceKey?(e.isASshow=!0,e.accessKeySecret=t.data):"encryptionSecret"===e.deviceKey?(e.isEncryptionShow=!0,e.encryptionSecret=t.data):"aesSalt"===e.deviceKey&&(e.isAESshow=!0,e.aesSalt=t.data),e.$message.success(t.message),e.dialogVisible=!1,e.isShow=e.curTab}).catch(function(t){"accessKeySecret"===e.deviceKey?e.isASshow=!1:"encryptionSecret"===e.deviceKey?e.isEncryptionShow=!1:"aesSalt"===e.deviceKey&&(e.isAESshow=!1),e.$message.error(t.message)}),e.$refs[t].resetFields()})},AShidden:function(){this.isASshow=!1},encryptionHidden:function(){this.isEncryptionShow=!1},AEShidden:function(){this.isAESshow=!1},handleRefreshShortCode:function(){this.dialogVisible=!0,this.deviceKey="shortCode"},refreshShortCode:function(t){var e=this;p.a.refreshShortCode({businessId:this.businessId,password:Object(u.a)(t),deviceTypeId:this.curTab}).then(function(t){"00000000"===t.code&&(e.shortCode=t.data||"")})}}},y={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"app-container"},[s("el-card",{attrs:{shadow:"hover"}},[0!==t.hasAuth||t.showEmpty?t._e():s("el-button",{staticStyle:{"margin-bottom":"12px"},attrs:{type:"primary"},on:{click:t.fetchDeviceTypes}},[t._v("添加授权")]),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:!t.showEmpty,expression:"!showEmpty"}],staticClass:"top-title"},[s("span",{staticStyle:{float:"left",display:"inline-block","padding-top":"6px"}},[t._v("设备类型:")]),t._v(" "),s("ul",{staticClass:"setting-type"},t._l(t.companies,function(e){return s("li",{key:e.id,class:t.curCompany==e.id?"cur":"",on:{click:function(s){return t.chooseCompany(e)}}},[t._v("\n "+t._s(e.name)+"\n ")])}),0),t._v(" "),s("div",{staticStyle:{clear:"both"}}),t._v(" "),s("span",{staticStyle:{float:"left",display:"inline-block","padding-top":"6px"}},[t._v("设备型号:")]),t._v(" "),s("ul",{staticClass:"setting-type",staticStyle:{"margin-bottom":"20px"}},[t._l(t.typeList,function(e){return s("li",{key:e.label,class:t.curTab==e.value?"cur":"",on:{click:function(s){return t.tabClick(e.value,e.typeCode)}}},[t._v("\n "+t._s(e.label)+"\n ")])}),t._v(" "),t.typeList.length?s("li",[!t.isOpen&&t.isShowOpen&&t.noClose?s("el-button",{attrs:{type:"text"},on:{click:t.open}},[t._v("\n 展开\n "),s("i",{staticClass:"el-icon-arrow-down"})]):t._e(),t._v(" "),t.noClose?t._e():s("el-button",{attrs:{type:"text"},on:{click:t.close}},[t._v("\n 收起\n "),s("i",{staticClass:"el-icon-arrow-down"})])],1):t._e()],2)]),t._v(" "),s("el-form",{directives:[{name:"show",rawName:"v-show",value:!t.showEmpty&&0===t.hasAuth&&t.curTab,expression:"!showEmpty && hasAuth === 0 && curTab"}],ref:"setForm",staticStyle:{width:"60%","margin-left":"10%","margin-top":"30px","font-size":"12px"},attrs:{model:t.setForm,"label-width":"200px"}},[s("el-form-item",{attrs:{label:"数据内容加密类型:",prop:"encryptionType"}},[s("div",{staticStyle:{width:"660px",overflow:"hidden"}},[t._v("\n "+t._s(t._f("filterEncryptionType")(t.setForm.encryptionType))+"\n ")])]),t._v(" "),s("el-form-item",{attrs:{label:"AccessKey ID:"}},[s("div",{staticStyle:{width:"660px",overflow:"hidden"}},[t._v(t._s(t.setForm.accessKeyId))]),t._v(" "),s("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"相机类型标识ID(每一类相机都有一个AccessKey ID),需要AES加密",placement:"right"}},[s("i",{staticClass:"el-icon-info label-icon",staticStyle:{color:"#546DE9"}})])],1),t._v(" "),s("el-form-item",{attrs:{label:"AccessKey Secret:"}},[s("div",{staticStyle:{width:"660px",overflow:"hidden"}},[t._v("\n "+t._s(t.isASshow?t.accessKeySecret:"******")+"\n ")]),t._v(" "),t.isASshow?s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.AShidden}},[t._v("隐藏")]):s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.ASshow}},[t._v("显示")]),t._v(" "),s("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"相机类型密码AS(每一类相机都有一个AccessKey Secret),需要AES加密",placement:"right"}},[s("i",{staticClass:"el-icon-info label-icon",staticStyle:{color:"#546DE9"}})])],1),t._v(" "),s("el-form-item",{attrs:{label:"密钥短码:"}},[s("div",{staticStyle:{width:"660px",overflow:"hidden"}},[t._v("\n "+t._s(t.shortCode||"******")+"\n ")]),t._v(" "),t.shortCode?s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.handleRefreshShortCode}},[t._v("刷新")]):s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.handleRefreshShortCode}},[t._v("显示")]),t._v(" "),s("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"相机类型密码AS(每一类相机都有一个AccessKey Secret),需要AES加密",placement:"right"}},[s("i",{staticClass:"el-icon-info label-icon",staticStyle:{color:"#546DE9"}})])],1),t._v(" "),s("el-form-item",{attrs:{label:"对称加密的密钥:"}},[s("div",{staticStyle:{width:"660px",overflow:"hidden"}},[t._v("\n "+t._s(t.isEncryptionShow?t.encryptionSecret:"******")+"\n ")]),t._v(" "),t.isEncryptionShow?s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.encryptionHidden}},[t._v("隐藏")]):s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.encryptionShow}},[t._v("显示")]),t._v(" "),s("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"对称加密的密钥",placement:"right"}},[s("i",{staticClass:"el-icon-info label-icon",staticStyle:{color:"#546DE9"}})])],1),t._v(" "),s("el-form-item",{attrs:{rules:[t.$rule.normalRule("int+")],label:"新令牌时间(分):",prop:"newTokenTime"}},[s("el-input",{attrs:{disabled:!t.isEdit,placeholder:"请输入令牌更新时间"},model:{value:t.setForm.newTokenTime,callback:function(e){t.$set(t.setForm,"newTokenTime",e)},expression:"setForm.newTokenTime"}}),t._v(" "),s("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"设备通信令牌过期时间,范围[30分-120分]",placement:"right"}},[s("i",{staticClass:"el-icon-info label-icon",staticStyle:{color:"#546DE9"}})])],1),t._v(" "),s("el-form-item",{attrs:{label:"AES加密后的盐(base64):"}},[s("div",{staticStyle:{width:"660px",overflow:"hidden"}},[t._v(t._s(t.isAESshow?t.aesSalt:"******"))]),t._v(" "),t.isAESshow?s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.AEShidden}},[t._v("隐藏")]):s("el-button",{staticStyle:{position:"absolute",left:"730px",top:"5px",color:"#cd061b"},attrs:{type:"text",size:"small"},on:{click:t.AESshow}},[t._v("显示")]),t._v(" "),s("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"AES加密后的盐(base64),防止相同密码加密后出现相同结果被破解风险",placement:"right"}},[s("i",{staticClass:"el-icon-info label-icon",staticStyle:{color:"#546DE9"}})])],1),t._v(" "),s("el-form-item",{staticStyle:{width:"100%"}},[t.isEdit?t._e():s("el-button",{attrs:{disabled:!t.curTab,type:"primary"},on:{click:t.edit}},[t._v("编辑")]),t._v(" "),t.isEdit?s("el-button",{attrs:{disabled:!t.curTab,type:"primary"},on:{click:function(e){return t.save("setForm")}}},[t._v("确定")]):t._e(),t._v(" "),t.isEdit?s("el-button",{on:{click:t.cancel}},[t._v("取消")]):t._e()],1)],1),t._v(" "),1===t.hasAuth?s("el-button",{staticStyle:{margin:"24px 12px 12px 100px"},attrs:{disabled:!t.curTab,type:"primary"},on:{click:t.fetchAddAuth}},[t._v("确定")]):t._e(),t._v(" "),1===t.hasAuth?s("el-button",{staticStyle:{margin:"24px 12px 12px 0"},on:{click:t.cancelAdd}},[t._v("取消")]):t._e(),t._v(" "),t.showEmpty?s("div",{staticStyle:{"text-align":"center"}},[s("Empty"),t._v(" "),s("el-button",{staticStyle:{margin:"12px 0 40px"},attrs:{type:"primary"},on:{click:t.fetchDeviceTypes}},[t._v("添加授权")])],1):t._e()],1),t._v(" "),s("el-dialog",{attrs:{visible:t.dialogVisible,"close-on-click-modal":!1,title:"身份认证",width:"460px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[s("el-form",{ref:"ruleForm2",staticClass:"demo-ruleForm password-input",attrs:{model:t.ruleForm2,"status-icon":"","label-width":"100px"}},[s("el-form-item",{attrs:{rules:[{required:!0,message:"身份认证不能为空"}],label:"身份认证",prop:"password"}},[s("el-input",{attrs:{type:"password",maxlength:"20","auto-complete":"off"},model:{value:t.ruleForm2.password,callback:function(e){t.$set(t.ruleForm2,"password",e)},expression:"ruleForm2.password"}}),t._v(" "),s("p",{staticStyle:{color:"#e9394b","font-size":"12px","margin-left":"3px"}},[t._v("\n 秘钥类信息查看需要重新认证系统登录密码\n ")])],1)],1),t._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.checkPassword("ruleForm2")}}},[t._v("确 定")]),t._v(" "),s("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v("取 消")])],1)],1)],1)},staticRenderFns:[]};var b=s("VU/8")(v,y,!1,function(t){s("IANy")},"data-v-5fc84800",null);e.default=b.exports}});