mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 08:50:29 +08:00
4f79e10bd6
Former-commit-id: 376f94edd602d3dfed1cbada6e08361ee7b08e73
1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
webpackJsonp([33],{"5lYz":function(e,t,n){"use strict";t.a={computed:{applicationTypeStore:function(){return this.$route.matched[1].meta.serviceCode}}}},AcfF:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"\n[data-v-54ff27a2] .el-radio-button__orig-radio:checked + .el-radio-button__inner {\n background: #e4071e;\n border: 1px solid #e4071e;\n -webkit-box-shadow: 0 0 0 0;\n box-shadow: 0 0 0 0;\n}\n[data-v-54ff27a2] .el-radio-button__orig-radio:checked + .el-radio-button__inner:hover {\n color: #fff;\n}\n[data-v-54ff27a2] .el-radio-button__inner {\n height: 36px;\n line-height: 10px;\n border-radius: 0;\n}\n[data-v-54ff27a2] .el-radio-button__inner:hover {\n color: #606266;\n}\n.warning-info[data-v-54ff27a2] {\n font-size: 12px;\n color: #74777c;\n background: rgba(51, 153, 255, 0.1);\n height: 32px;\n line-height: 32px;\n padding: 0 10px;\n border-radius: 4px;\n margin: 20px 0 20px 0;\n}\n.demo-table-expand[data-v-54ff27a2] {\n font-size: 0;\n}\n.demo-table-expand label[data-v-54ff27a2] {\n width: 90px;\n color: #99a9bf;\n}\n.demo-table-expand .el-form-item[data-v-54ff27a2] {\n margin-right: 0;\n margin-bottom: 0;\n width: 50%;\n}\n[data-v-54ff27a2] .el-table--enable-row-transition .el-table__body td:nth-child(1) div {\n display: none;\n}\n[data-v-54ff27a2] .el-table--enable-row-transition .el-table__body td:nth-child(2) div {\n margin-left: -40px;\n}\n[data-v-54ff27a2] .el-table thead.has-gutter th:nth-child(2) {\n position: absolute;\n left: 10px;\n width: 1000px;\n}\n[data-v-54ff27a2] .el-table__expanded-cell {\n background: #f4f5f6;\n padding: 15px 25px;\n}\n[data-v-54ff27a2] .el-table__expanded-cell:hover {\n background: #f4f5f6 !important;\n}\n[data-v-54ff27a2] .el-form-item__error--inline {\n position: static;\n width: 140px;\n}\n[data-v-54ff27a2] .el-table__expand-icon .el-icon-arrow-right {\n display: none;\n}\n[data-v-54ff27a2] .el-checkbox + .el-checkbox {\n margin-left: 0px !important;\n}\n[data-v-54ff27a2] .el-checkbox {\n margin-right: 48px;\n}\n.word-limit-ctnr .word-limit[data-v-54ff27a2] {\n bottom: -4px;\n right: -30px;\n}\n[data-v-54ff27a2] .el-radio-button__inner:nth-child(2) {\n width: 126px;\n}\n[data-v-54ff27a2] .el-table td:nth-child(2) div {\n left: -40px;\n position: relative;\n}\n[data-v-54ff27a2] .el-button--primary:focus {\n background: #e4071e;\n border: 1px solid #e4071e;\n}\n.null-data-wrap[data-v-54ff27a2] {\n text-align: center;\n margin-top: 180px;\n color: #2c2d2f;\n font-size: 16px;\n}\n",""])},NLjP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("mvHQ"),s=n.n(a),i=n("Xxa5"),o=n.n(i),r=n("woOf"),l=n.n(r),c=n("exGp"),d=n.n(c),u=n("SR6C"),p=n("Bv8y"),f=n("5lYz"),h=n("/W+i"),b=n("vMX1"),g={mixins:[p.a,f.a],components:{searchPage:b.a},data:function(){return{isOpen:!0,appList:[],keyTableData:[],id:null,expands:[],ruleForm2:{password:""},dialogVisible:!1,cur:"",secretId:"",authId:null,service:null,detailStorage:JSON.parse(window.sessionStorage.getItem("authDetailData")),searchForm:{rowsOfPage:10,currentPage:1},isRequesetEnd:!1}},watch:{isOpen:function(){this.isOpen&&this.fetchData()}},created:function(){this.getStatus()},methods:{initAuth:function(){},getStatus:function(){var e=this,t=window.sessionStorage.getItem("businessId");u.a.companyDetail({id:t}).then(function(t){t=t.data;e.isOpen=!!t.ext2&&{1:!0,2:!1}[t.ext2],e.appList=t.appList,e.isOpen&&e.fetchData()}).catch(function(t){e.$message.error(t.message)}).finally(function(t){e.isRequesetEnd=!0})},hideAS:function(e){this.keyTableData[e].AS=""},creatKey:function(){this.$router.push("/authmanage/add")},fetchData:function(){var e=this;return d()(o.a.mark(function t(){var n,a;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n={businessId:window.sessionStorage.getItem("businessId")},l()(n,e.searchForm),t.prev=2,t.next=5,u.a.queryKeySecret(n);case 5:a=t.sent,e.keyTableData=a.data.datas,e.total=a.data.totalRows,t.next=15;break;case 10:t.prev=10,t.t0=t.catch(2),e.keyTableData=[],e.total=0;case 15:case"end":return t.stop()}},t,e,[[2,10]])}))()},handleCheckedCitiesChange:function(){this.editChannel()},editChannel:function(){var e=this,t=[],n=!1;this.keyTableData.forEach(function(e){var a={};a.keySecretId=e.id,a.bindType=2,a.bindInfos=e.totalList.filter(function(t){return e.bindInfos.indexOf(t.bindValue)>-1}),0==a.bindInfos.length&&(n=!0),t.push(a)});var a={keySecretExts:t};u.a.keyAdd(a).then(function(t){n&&e.fetchData(),e.$message.success(t.data.message)})},disable:function(e){var t=this,n=this.$createElement;this.$msgbox({showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",title:"提示",message:n("div",null,[n("p",null,"是否确定要禁用该AKAS?"),n("p",null,"禁用之后,该AKAS将不可以继续使用")])}).then(function(){t.$set(e,"loading",!0);var n={apiKey:e.apiKey,businessId:window.sessionStorage.getItem("businessId")};u.a.disableKey(n).then(function(n){t.$set(e,"loading",!1),t.fetchData(),t.$message.success(n.message)})})},detail:function(e){window.sessionStorage.setItem("authDetailData",s()(e)),this.$router.push("/authmanage/detail")},edit:function(e){window.sessionStorage.setItem("authDetailData",s()(e)),this.$router.push({path:"/authmanage/edit",query:{apiKey:e.apiKey}})},enable:function(e){var t=this,n={apiKey:e.apiKey,businessId:window.sessionStorage.getItem("businessId")};u.a.enableKey(n).then(function(n){t.$set(e,"loading",!1),t.fetchData(),t.$message.success(n.message)})},del:function(e){var t=this;this.$confirm("确认删除此秘钥吗?","确认删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var n={businessId:window.sessionStorage.getItem("businessId"),apiKey:e.apiKey};u.a.delKey(n).then(function(e){t.$message.success("删除成功"),t.fetchData()}).catch(function(e){t.$message.error(e.message)})})},authEanble:function(){var e=this,t={id:window.sessionStorage.getItem("businessId"),ext2:1};if(this.isOpen)u.a.applicationAuth(t).then(function(t){t.data.success?e.$message.success("应用授权开启成功"):e.$message.error("应用授权开启失败")}).catch(function(t){e.$message.error(t.message)});else{var n={id:window.sessionStorage.getItem("businessId"),ext2:2};u.a.applicationAuth(n).then(function(t){t.data.success?e.$message.success("应用授权关闭成功"):e.$message.error("应用授权关闭失败")}).catch(function(t){e.$message.error(t.message)})}},open:function(e){if(0==this.expands.length)this.expands.push(this.keyTableData[e].id);else if(this.expands.includes(this.keyTableData[e].id)){var t=this.expands.indexOf(this.keyTableData[e].id);this.expands.splice(t,1)}else this.expands.push(this.keyTableData[e].id)},getRowKeys:function(e){return e.id},showAS:function(e,t){this.dialogVisible=!0,this.cur=t,this.secretId=e.apiKey,this.ruleForm2.password=""},checkPassword:function(e){var t=this;this.$refs[e].validate(function(n){n&&(u.a.getKey({businessId:window.sessionStorage.getItem("businessId"),apiKey:t.secretId,password:Object(h.a)(t.ruleForm2.password)}).then(function(e){t.$set(t.keyTableData[t.cur],"AS",e.data),t.dialogVisible=!1}).catch(function(e){t.$message.error(e.message)}),t.$refs[e].resetFields())})}}},m={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container auth-index"},[a("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"step-two"},[a("el-radio-group",{staticStyle:{"margin-bottom":"-4px"},on:{change:e.authEanble},model:{value:e.isOpen,callback:function(t){e.isOpen=t},expression:"isOpen"}},[a("el-radio-button",{attrs:{label:!0}},[e._v("应用授权开启")]),e._v(" "),a("el-radio-button",{attrs:{label:!1}},[e._v("关闭")])],1),e._v(" "),a("p",{staticClass:"warning-info"},[a("el-icon",{staticClass:"el-icon-warning"}),e._v("\n 应用授权开启后,新建授权将会自动生成一组授权AK,AS;访问此应用,必须通过此AK,AS进行鉴权,授权关闭,则访问此应用无需鉴权\n ")],1),e._v(" "),e.isOpen&&e.appList.length>0?a("div",[a("el-button",{staticStyle:{"margin-top":"30px","margin-bottom":"20px"},attrs:{type:"primary"},on:{click:e.creatKey}},[e._v("新建授权")]),e._v(" "),a("search-page",{attrs:{pageSize:e.searchForm.rowsOfPage,pageNum:e.searchForm.currentPage,total:e.total},on:{"update:pageSize":function(t){return e.$set(e.searchForm,"rowsOfPage",t)},"update:page-size":function(t){return e.$set(e.searchForm,"rowsOfPage",t)},"update:pageNum":function(t){return e.$set(e.searchForm,"currentPage",t)},"update:page-num":function(t){return e.$set(e.searchForm,"currentPage",t)},change:e.fetchData}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.keyTableData}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{display:"inline-block","margin-bottom":"10px"}},[e._v("渠道授权:")]),e._v(" "),a("el-checkbox-group",{staticStyle:{display:"inline-block"},on:{change:e.handleCheckedCitiesChange},model:{value:t.row.bindInfos,callback:function(n){e.$set(t.row,"bindInfos",n)},expression:"scope.row.bindInfos"}},e._l(t.row.totalList,function(t){return a("el-checkbox",{key:t.bindValue,attrs:{label:t.bindValue}},[e._v("\n "+e._s(t.bindValueName))])}),1)]}}],null,!1,4268281804)}),e._v(" "),a("el-table-column",{attrs:{label:"APP Key /App Secret",prop:"apiKey","min-width":"140"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",[e._v("AK: "+e._s(t.row.apiKey))]),e._v(" "),a("p",[e._v("\n AS: \n "),t.row.AS?a("span",[e._v(e._s(t.row.AS))]):a("span",[e._v("***************")]),e._v(" \n "),t.row.AS?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return e.hideAS(t.$index)}}},[e._v("隐藏")]):a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return e.showAS(t.row,t.$index)}}},[e._v("显示\n ")])],1)]}}],null,!1,1200938999)}),e._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"lastUpdateTime"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e._f("datetime")(t.row.lastUpdateTime)))]}}],null,!1,1167102571)}),e._v(" "),a("el-table-column",{attrs:{label:"状态",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("status-point",{attrs:{disabled:2==e.row.status,value:e.row.status}})]}}],null,!1,1286229955)}),e._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return e.detail(t.row)}}},[e._v("详情")]),e._v(" "),2!==t.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return e.edit(t.row)}}},[e._v("编辑")]):e._e(),e._v(" "),2==t.row.status?a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return e.enable(t.row)}}},[e._v("启用")]):a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(n){return e.disable(t.row)}}},[e._v("禁用")]),e._v(" "),2==t.row.status?a("el-button",{staticStyle:{color:"rgb(250, 85, 85)"},attrs:{type:"text",size:"small"},on:{click:function(n){return e.del(t.row)}}},[e._v("删除")]):e._e()]}}],null,!1,3155181108)})],1)],1)],1):e._e(),e._v(" "),e.isOpen&&0===e.appList.length&&e.isRequesetEnd?a("div",{staticClass:"null-data-wrap"},[a("img",{attrs:{src:n("gIXt"),alt:"img_aiyingyongempty"}}),e._v(" "),a("p",[e._v("当前未关联任何应用,请联系管理员关联应用")])]):e._e()],1),e._v(" "),a("el-dialog",{attrs:{title:"密码确认",visible:e.dialogVisible,width:"500px","close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{ref:"ruleForm2",staticClass:"demo-ruleForm password-input",attrs:{model:e.ruleForm2,"status-icon":"","label-width":"100px"}},[a("el-form-item",{staticStyle:{width:"85%"},attrs:{label:"密码",prop:"password",rules:[{required:!0,message:"密码不能为空"}]}},[a("el-input",{attrs:{type:"password","auto-complete":"off"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.checkPassword("ruleForm2")}},model:{value:e.ruleForm2.password,callback:function(t){e.$set(e.ruleForm2,"password",t)},expression:"ruleForm2.password"}}),e._v(" "),a("p",{staticStyle:{color:"#e9394b","font-size":"12px","margin-left":"3px"}},[e._v("秘钥类信息查看需要重新认证系统登录密码")])],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.checkPassword("ruleForm2")}}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")])],1)],1)],1)},staticRenderFns:[]};var v=n("VU/8")(g,m,!1,function(e){n("VcPg"),n("uue4")},"data-v-54ff27a2",null);t.default=v.exports},SdQW:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"\n.auth-index .el-card {\n min-height: 100%;\n}\n",""])},VcPg:function(e,t,n){var a=n("AcfF");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);n("rjj0")("c2899f20",a,!0)},uue4:function(e,t,n){var a=n("SdQW");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);n("rjj0")("fd20be48",a,!0)}}); |