Files
starRiverProperty/frontend-source/decompiled/cwos-portal/static/js/198.e0ff0585e87efb4ac753.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
9.5 KiB
JavaScript

webpackJsonp([198],{h97t:function(e,t,a){(e.exports=a("FZ+f")(!1)).push([e.i,"\n.left[data-v-0008be84] {\n display: inline-block;\n margin-right: 20px;\n position: absolute;\n right: 110px;\n}\n[data-v-0008be84] .el-button + .el-button {\n margin-left: 0 !important;\n}\n.btn-border-right[data-v-0008be84] {\n margin-right: 10px;\n}\n",""])},jSSX:function(e,t,a){var n=a("h97t");"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);a("rjj0")("41060604",n,!0)},jl6W:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("Xxa5"),i=a.n(n),r=a("exGp"),s=a.n(r),o=a("Dd8w"),l=a.n(o),c=a("yfAY"),u=a("vMX1"),p=a("hmNX"),m=a("x1DN"),h={data:function(){return{activeName:"",total:0,tableData:[],tableLoading:!1,statusType:[],appType:[],appSubTypes:[{name:null,code:null}],searchForm:{status:null,name:null,groupCode:null,rowsOfPage:10,currentPage:1},showImport:!1}},computed:{groupName:function(){var e=this,t="";return this.appType.map(function(a){a.value===e.activeName&&(t=a.label)}),t}},beforeDestroy:function(){this.appSubTypes=[]},created:function(){this.fetchOptions(),this.activeName=localStorage.getItem("activeName"),this.appSubTypes=[]},methods:{fetchOptions:function(){var e=this;c.b.appstatus().then(function(t){e.statusType=t}),c.b.appType().then(function(t){e.appType=t,t.length>0&&(e.activeName=localStorage.getItem("activeName")||t[0].value),e.handleAppChange(e.activeName),e.fetchData()})},selectChange:function(e){},handleAppChange:function(e){var t=this;this.appSubTypes=[],this.$nextTick(function(){t.searchForm.groupCode=null,t.appSubTypes=t.$store.getters.dicts.filter(function(t){return t.typeCode===e&&1===t.status}),t.appSubTypes.unshift({name:"全部",code:null})})},handleClick:function(){var e=this;this.searchForm.currentPage=1,this.$nextTick(function(){e.handleAppChange(e.activeName),e.handleReset()})},fetchData:function(){var e=this;localStorage.getItem("activeName")!=this.activeName&&localStorage.setItem("activeName",this.activeName),this.tableLoading=!0;var t=l()({},this.searchForm);t.typeCode=this.activeName,p.a.search(t).then(function(t){setTimeout(function(){e.tableData=t.data,e.total=t.total,e.tableLoading=!1},500)}).catch(function(t){e.tableLoading=!1})},goDetail:function(e){"sceneServiceType"===this.activeName?this.$router.push({path:"/application/sceneDetail",query:{id:e.id}}):this.$router.push({name:"ApplicationDetail",params:{id:e.id}})},goEdit:function(e,t){"sceneServiceType"===this.activeName?this.$router.push({path:"/application/sceneEdit",query:{id:e.id}}):this.$router.push({name:"ApplicationEdit",params:{id:e.id,type:t,name:e.name}})},goEnable:function(e,t){var a=this;return s()(i.a.mark(function n(){return i.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a.$single){n.next=7;break}return n.next=3,a.$confirm("是否确定要上架该应用?","确认上架",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"});case 3:a.$set(e,"eloading",!0),p.a.enable(e.id).then(function(t){a.$set(e,"eloading",!1),a.$message.success(t.message),a.fetchData()}).catch(function(t){a.$set(e,"eloading",!1),a.$message.error(t.message)}),n.next=8;break;case 7:a.$router.push({name:"ApplicationUp",params:{id:e.id,type:t,name:e.name}});case 8:case"end":return n.stop()}},n,a)}))()},enable:function(e){var t=this;this.$set(e,"loading",!0),p.a.enable(e.id).then(function(a){t.$set(e,"loading",!1),t.fetchData(),t.$message.success(a.message)}).catch(function(a){t.$message.error(a.message),t.$set(e,"loading",!1),t.fetchData()})},disable:function(e){var t=this;this.$confirm('确认下架<span style="color:blue">'+e.name+"</span>AI应用?","确认下架",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",dangerouslyUseHTMLString:!0}).then(function(){t.$set(e,"loading",!0),p.a.disable(e.id).then(function(a){t.$set(e,"loading",!1),t.fetchData(),t.$message.success(a.message)}).catch(function(a){t.$set(e,"loading",!1),t.fetchData(),t.$message.error(a.message)})}).catch(function(){})},handleReset:function(){this.$refs.queryForm.resetFields(),this.fetchData()},handleQuery:function(){this.searchForm.currentPage=1,this.fetchData()},transterPerson:function(e){if(e){var t=e.split("#"),a=t.length>1?t[1]:"";return this.personType.some(function(e){if(e.value===a)return a=e.label,!0}),a}return""},transterCard:function(e){if(e){var t=e.split("#"),a=t.length>1?t[1]:"";return this.cardTypes.some(function(e){if(e.value===a)return a=e.label,!0}),a}return""}},components:{searchPage:u.a,cascader:m.a}},d={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-card",{attrs:{shadow:"hover"}},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.appType,function(e,t){return a("el-tab-pane",{key:t,attrs:{label:e.label,name:e.value}})}),1),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-form",{ref:"queryForm",staticStyle:{"margin-top":"9px"},attrs:{inline:!0,"label-width":"100px",model:e.searchForm}},[a("el-form-item",{attrs:{label:"应用分类",prop:"groupCode"}},[a("el-select",{on:{change:function(t){return e.selectChange(e.appSubTypes)}},model:{value:e.searchForm.groupCode,callback:function(t){e.$set(e.searchForm,"groupCode",t)},expression:"searchForm.groupCode"}},e._l(e.appSubTypes,function(e,t){return a("el-option",{key:t,attrs:{label:e.name,value:e.code}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"应用名称",prop:"name"}},[a("el-input",{attrs:{placeholder:"应用名称(模糊)",maxlength:"64"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.searchForm.name,callback:function(t){e.$set(e.searchForm,"name","string"==typeof t?t.trim():t)},expression:"searchForm.name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-select",{staticStyle:{width:"185px"},model:{value:e.searchForm.status,callback:function(t){e.$set(e.searchForm,"status",t)},expression:"searchForm.status"}},e._l(e.statusType,function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}),1)],1),e._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.aiAppSearch],expression:"[$auth.aiAppSearch]"}],attrs:{type:"warning"},on:{click:e.handleQuery}},[e._v("查询")]),e._v(" "),a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.aiAppSearch],expression:"[$auth.aiAppSearch]"}],on:{click:e.handleReset}},[e._v("重置")]),e._v(" "),"sceneServiceType"===e.activeName?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.SceneAppAdd],expression:"[$auth.SceneAppAdd]"}],attrs:{type:"primary"},on:{click:function(t){return e.$router.push("/application/addScene")}}},[e._v("新建")]):e._e()],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.tableLoading,expression:"tableLoading"}],staticClass:"table_expand",attrs:{data:e.tableData}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{prop:"code",label:"应用代码"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"应用名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"version",label:"应用版本"}}),e._v(" "),a("el-table-column",{attrs:{prop:"groupName",label:"应用分类"}}),e._v(" "),a("el-table-column",{attrs:{prop:"ext1",label:"应用地址","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("status-point",{staticStyle:{display:"inline"},attrs:{disabled:2==t.row.status}}),e._v("\n "+e._s(1==t.row.status?"已发布":"未发布")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"status",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.aiAppDetail],expression:"[$auth.aiAppDetail]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text"},on:{click:function(a){return e.goDetail(t.row)}}},[e._v("详情")]),e._v(" "),e.$single&&"sceneServiceType"===e.activeName?e._e():a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.aiAppEdit],expression:"[$auth.aiAppEdit]"}],staticClass:"btn-border-right",attrs:{size:"middle",type:"text"},on:{click:function(a){return e.goEdit(t.row,"goEdit")}}},[e._v("编辑")]),e._v(" "),1==t.row.status?a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.aiAppEnable],expression:"[$auth.aiAppEnable]"}],staticClass:"btn-border-right",attrs:{size:"middle",loading:t.row.loading,type:"text"},on:{click:function(a){return e.disable(t.row)}}},[e._v("下架")]):a("el-button",{directives:[{name:"permission",rawName:"v-permission",value:[e.$auth.aiAppEnable],expression:"[$auth.aiAppEnable]"}],staticClass:"btn-border-right",attrs:{size:"middle",loading:t.row.eloading,type:"text"},on:{click:function(a){return e.goEnable(t.row,"goEnable")}}},[e._v("上架")])]}}])})],1)],1)],1)],1)},staticRenderFns:[]};var f=a("VU/8")(h,d,!1,function(e){a("jSSX")},"data-v-0008be84",null);t.default=f.exports}});