mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 00:40:30 +08:00
0c56a3e599
Made-with: Cursor Former-commit-id: 571c9a99ee26d90505e550c287eb8ad8d743ff8d
1 line
7.5 KiB
JavaScript
1 line
7.5 KiB
JavaScript
webpackJsonp([19],{P32n:function(e,t,n){var a=n("yYUT");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);n("rjj0")("128798ca",a,!0)},oF1k:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("Xxa5"),i=n.n(a),s=n("exGp"),o=n.n(s),r=n("YwUV"),c=n("NC6I"),l=n.n(c),f={name:"DetailDialog",components:{},props:{value:{type:Boolean,default:!1},id:{type:Number,default:null},list:{type:Object,default:null}},data:function(){return{form:{pwd:""}}},computed:{visible:{get:function(){return this.value},set:function(e){this.$emit("input",e)}},user:function(){return this.$store.state.user.user}},methods:{handleOpenDialog:function(){},handleClose:function(e){this.visible=!1,this.$message.success("已取消"),this.$refs[e].resetFields()},handleConfirm:function(e){var t=this;this.$refs[e].validate(function(e){if(!e)return!1;var n={username:t.user.username,password:l()(t.form.pwd)};t.$emit("confirmRecovery",n)})}}},p={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{attrs:{visible:e.visible,title:"提示",width:"400px"},on:{"update:visible":function(t){e.visible=t},open:e.handleOpenDialog}},[n("div",{staticStyle:{padding:"0 20px"}},[n("div",{staticStyle:{"line-height":"24px"}},[n("span",[n("i",{staticClass:"el-icon-warning",staticStyle:{color:"#E6A23C","font-size":"16px","margin-right":"5px"}}),e._v("已经初始化过,将再次从底座同步集群环境信息到manager,可能会存在操作风险!")])]),e._v(" "),n("br"),e._v(" "),n("div",[n("el-form",{ref:"form",attrs:{model:e.form,"label-width":"80px","label-position":"left"}},[n("el-form-item",{attrs:{rules:[e.$rule.normalRule("empty","登录密码不能为空"),e.$rule.normalRule("newPwd")],label:"密码:",prop:"pwd"}},[n("el-input",{attrs:{type:"password",placeholder:"请输入登录密码"},model:{value:e.form.pwd,callback:function(t){e.$set(e.form,"pwd","string"==typeof t?t.trim():t)},expression:"form.pwd"}})],1)],1)],1)]),e._v(" "),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:function(t){return e.handleClose("form")}}},[e._v("取 消")]),e._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.handleConfirm("form")}}},[e._v("确 定")])],1)])},staticRenderFns:[]};var d={name:"ManagerInfo",components:{recoveryManager:n("VU/8")(f,p,!1,function(e){n("P32n")},"data-v-0a649bc2",null).exports},data:function(){return{managerCode:null,form:{},isShowDialog:!1,isShowRecoveryDialog:!1,isShowInit:!1,isCanClick:!1}},created:function(){this.fetchData(),this.isHasInit()},methods:{fetchData:function(){var e=this;this.isCanClick=!0,r.f.getManagerInfo().then(function(t){e.form=t.data,e.managerCode=t.data.managerId}).catch(function(e){})},isHasInit:function(){var e=this;r.f.isHasInit().then(function(t){t.data?e.isShowInit=!1:e.isShowInit=!0}).catch(function(e){})},initManage:function(){var e=this;this.isCanClick&&this.$confirm("将从底座同步集群环境信息到manager,以便正常使用manager系统!","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.isCanClick=!1;var t=!1;setTimeout(function(){t||e.$message.success({message:"同步进行中,请稍等,请不要进行其他操作!",duration:2e3})},1e3),r.f.initManager().then(function(n){e.isCanClick=!0,n.data?e.$confirm("同步已完成!欢迎使用系统","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.fetchData(),e.isHasInit()}).catch(function(){}):(t=!0,e.$message.error(n.errorMsg))}).catch(function(n){t=!0,e.isCanClick=!0})}).catch(function(){e.$message.success("已取消")})},recoveryManage:function(){this.isShowRecoveryDialog=!0},confirmRecovery:function(e){var t=this;return o()(i.a.mark(function n(){var a,s;return i.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t.isShowRecoveryDialog=!1,t.isCanClick=!1,a=!1,n.prev=3,setTimeout(function(){a||t.$message.success({message:"同步进行中,请稍等,请不要进行其他操作!",duration:2e3})},1e3),n.next=7,r.f.recoveryManager(e);case 7:(s=n.sent).data?t.$confirm("同步已完成!欢迎使用系统","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.fetchData(),t.isHasInit()}).catch(function(){}):t.$message.error(s.errorMsg),n.next=15;break;case 11:n.prev=11,n.t0=n.catch(3),a=!0,t.isCanClick=!0;case 15:case"end":return n.stop()}},n,t,[[3,11]])}))()}}},u={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("el-card",{staticClass:"card",staticStyle:{padding:"20px 0"}},[n("div",{staticClass:"nameCard"},[n("span",{staticClass:"name"},[e._v(e._s(e.managerCode)),n("span",{staticClass:"new"},[e._v("NEW")])]),e._v(" "),e.isShowInit?n("el-button",{attrs:{disabled:!e.isCanClick,type:"primary"},on:{click:e.initManage}},[e._v("初始化")]):e._e(),e._v(" "),e.isShowInit?e._e():n("el-button",{attrs:{disabled:!e.isCanClick,type:"primary"},on:{click:e.recoveryManage}},[e._v("初始化")])],1)]),e._v(" "),n("el-card",{staticClass:"card"},[n("el-form",{staticClass:"item",attrs:{model:e.form,"label-position":"right","label-width":"100px"}},[n("el-form-item",{attrs:{label:"系统版本:"}},[n("span",{staticClass:"item_content"},[e._v(e._s(e.form.sysVersion))])]),e._v(" "),n("el-form-item",{attrs:{label:"场景名称:"}},[n("span",{staticClass:"item_content"},[e._v(e._s(e.form.name))])]),e._v(" "),n("el-form-item",{attrs:{label:"场景版本:"}},[n("span",{staticClass:"item_content"},[e._v(e._s(e.form.version))])]),e._v(" "),n("el-form-item",{attrs:{label:"型号:"}},[e.form.productModel?n("span",{staticClass:"item_content"},[e._v(e._s(e.form.productModel))]):n("span",{staticClass:"item_content"},[e._v("-")])]),e._v(" "),n("el-form-item",{attrs:{label:"货号:"}},[e.form.productNo?n("span",{staticClass:"item_content"},[e._v(e._s(e.form.productNo))]):n("span",{staticClass:"item_content"},[e._v("-")])]),e._v(" "),n("el-form-item")],1)],1),e._v(" "),n("recoveryManager",{on:{confirmRecovery:e.confirmRecovery},model:{value:e.isShowRecoveryDialog,callback:function(t){e.isShowRecoveryDialog=t},expression:"isShowRecoveryDialog"}})],1)},staticRenderFns:[]};var m=n("VU/8")(d,u,!1,function(e){n("qYzB")},"data-v-e1c2af06",null);t.default=m.exports},"pu/D":function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"\n.app-container[data-v-e1c2af06] .el-form-item {\n margin-bottom: 16px;\n}\n.app-container[data-v-e1c2af06] .el-select,\n.app-container .el-cascader[data-v-e1c2af06],\n.app-container .el-date-editor[data-v-e1c2af06] {\n display: block;\n}\n.app-container[data-v-e1c2af06] .el-form-item__content .el-input__inner {\n width: 200px;\n}\n.app-container[data-v-e1c2af06] .el-col-8 {\n padding-right: 40px;\n}\n@media screen and (min-width: 1600px) {\n.app-container[data-v-e1c2af06] .el-col-8 {\n padding-right: 140px;\n}\n}\n.card[data-v-e1c2af06] {\n margin: 0 0 10px 0;\n}\n.nameCard[data-v-e1c2af06] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: justify;\n -ms-flex-pack: justify;\n justify-content: space-between;\n}\n.name[data-v-e1c2af06] {\n font-size: 1.5em;\n font-weight: 600;\n}\n.new[data-v-e1c2af06] {\n font-size: 0.5em;\n border: 1px solid red;\n padding: 2px;\n border-radius: 10px;\n background-color: red;\n color: #FFFFFF;\n margin-left: 5px;\n}\n",""])},qYzB:function(e,t,n){var a=n("pu/D");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);n("rjj0")("0d0fd8b2",a,!0)},yYUT:function(e,t,n){(e.exports=n("FZ+f")(!1)).push([e.i,"",""])}}); |