x-php-Admin/dist/static/js/444.fe195afe.js

1 line
4.5 KiB
JavaScript
Raw Normal View History

2024-01-30 15:24:43 +00:00
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[444],{2444:function(e,t,a){a.r(t),a.d(t,{default:function(){return r}});var i=a(6808);const l={key:0};function n(e,t,a,n,o,d){const s=(0,i.up)("x-page-header"),r=(0,i.up)("el-alert"),u=(0,i.up)("el-option"),p=(0,i.up)("el-select"),m=(0,i.up)("el-input"),c=(0,i.up)("el-table-column"),g=(0,i.up)("x-form-table"),h=(0,i.up)("el-button"),w=(0,i.up)("x-form"),f=(0,i.up)("el-tab-pane"),y=(0,i.up)("el-tabs"),b=(0,i.up)("el-card"),k=(0,i.up)("el-main"),v=(0,i.up)("el-footer"),x=(0,i.up)("el-container"),_=(0,i.Q2)("loading");return(0,i.wg)(),(0,i.j4)(x,null,{default:(0,i.w5)((()=>[(0,i.Wm)(k,null,{default:(0,i.w5)((()=>[(0,i.Wm)(b,{shadow:"never",class:"setting"},{default:(0,i.w5)((()=>[(0,i.Wm)(s,{title:"系统设置",description:"可以修改网站及应用的各种配置",icon:"el-icon-setting"}),(0,i.wy)(((0,i.wg)(),(0,i.j4)(y,{"tab-position":o.tabposition,modelValue:o.activename,"onUpdate:modelValue":t[1]||(t[1]=e=>o.activename=e)},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(o.settingList,(e=>((0,i.wg)(),(0,i.j4)(f,{key:e.key,label:e.name,name:e.key},{default:(0,i.w5)((()=>["extend"==e.type?((0,i.wg)(),(0,i.iD)("div",l,[e.tips?((0,i.wg)(),(0,i.j4)(r,{key:0,title:e.tips,type:"warning",style:{"margin-bottom":"15px"}},null,8,["title"])):(0,i.kq)("",!0),(0,i.Wm)(g,{modelValue:o.extend[e.key],"onUpdate:modelValue":t=>o.extend[e.key]=t,hideAdd:!0,"drag-sort":"",placeholder:"暂无数据"},{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.column,((e,t)=>((0,i.wg)(),(0,i.j4)(c,{label:e.label,prop:e.prop,width:e.width,key:t},{default:(0,i.w5)((t=>["select"==e.component?((0,i.wg)(),(0,i.j4)(p,(0,i.dG)({key:0,modelValue:t.row[e.prop],"onUpdate:modelValue":a=>t.row[e.prop]=a},e.bind,{clearable:"",filterable:"",style:{width:"100%"}}),{default:(0,i.w5)((()=>[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(e.options,((e,t)=>((0,i.wg)(),(0,i.j4)(u,(0,i.dG)({key:t},e),null,16)))),128))])),_:2},1040,["modelValue","onUpdate:modelValue"])):((0,i.wg)(),(0,i.j4)(m,{key:1,modelValue:t.row[e.prop],"onUpdate:modelValue":a=>t.row[e.prop]=a,placeholder:e.placeholder},null,8,["modelValue","onUpdate:modelValue","placeholder"]))])),_:2},1032,["label","prop","width"])))),128))])),_:2},1032,["modelValue","onUpdate:modelValue"]),(0,i.Wm)(h,{type:"primary",icon:"el-icon-plus",onClick:t=>d.table_add(e),style:{"margin-top":"20px"}},null,8,["onClick"])])):((0,i.wg)(),(0,i.j4)(w,{key:1,ref_for:!0,ref:"formref",config:o.formList[e.key],modelValue:o.info,"onUpdate:modelValue":t[0]||(t[0]=e=>o.info=e),loading:o.loading},null,8,["config","modelValue","loading"]))])),_:2},1032,["label","name"])))),128))])),_:1},8,["tab-position","modelValue"])),[[_,o.loading]])])),_:1})])),_:1}),(0,i.Wm)(v,null,{default:(0,i.w5)((()=>[(0,i.Wm)(h,{type:"primary",onClick:d.submit,style:{"max-width":"500px",width:"100%"},loading:o.submitloading},{default:(0,i.w5)((()=>[(0,i.Uk)("保存")])),_:1},8,["onClick","loading"])])),_:1})])),_:1})}a(8311);var o={name:"setting",data(){return{info:{},activename:"init",tabposition:"left",settingList:[],extend:[],formList:{},loading:!1,submitloading:!1}},watch:{activename(){let e=window.location.href;e=this.changeURLArg(e,"type",this.activename),history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)}},mounted(){this.render()},created(){this.onLayoutResize(),window.addEventListener("resize",this.onLayoutResize)},methods:{onLayoutResize(){this.tabposition=document.body.clientWidth<992?"top":"left"},changeURLArg(e,t,a){var i=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+i,"gi"),""),e=e.replace(new RegExp("\\??"+i+"&?","gi"),"?"),e;var l=t+"="+a;if(e.match(i)){var n="("+t+"=)([^&]*)";return n=e.replace(new RegExp(n,"gi"),l),n}return e.match("[?]")?e+"&"+l:e+"?"+l},async render(){this.loading=!0;var e=await this.$http.get("setting/get",this.$route.query);if(200!=e.code)return this.$message.warning(e.message),!1;this.settingList=e.data.settingList,this.info=e.data.info,this.formList=e.data.formList,t