no message

This commit is contained in:
小陌 2024-01-11 07:40:29 +08:00
parent a1a87b732e
commit 13bf7d53ba
16 changed files with 70 additions and 212 deletions

6
dist/config.js vendored
View File

@ -5,13 +5,13 @@ const APP_CONFIG = {
//主题设置
THEMESETTING: true,
// Cookie name
SESSIONNAME: 'miucms_session',
SESSIONNAME: 'MIUCMSSESSION',
//TokenName
TOKEN_NAME: "authorization",
TOKEN_NAME: "token",
// 网站LOGO, 正式形
APP_LOGO: '',
//接口地址
API_URL: 'https://app.gter.net/admin/',
API_URL: 'http://localhost/admin/',
// 微信扫码登录
MY_SHOW_LOGIN_OAUTH: true,
}

2
dist/index.html vendored
View File

@ -1,4 +1,4 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/><meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/favicon.ico"><title>X-PHP</title><script>document.write("<script src='config.js'><\/script>");</script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/echarts.49558cc4.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/elicons.4bccae06.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/modules.af2834df.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/app.4f7fee86.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/modules.34563575.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/app.794758f5.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but X-PHP doesn't work properly without JavaScript enabled.</strong></noscript><div id="app" class="aminui"><div class="app-loading"><div class="app-loading__logo"></div><div class="app-loading__loader"></div></div></div></body><div id="versionCheck" class="versionCheck"><h2>当前浏览器内核版本过低</h2><p>当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p><p>最低版本要求Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p><p>请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p></div><style>.app-loading {
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"/><meta content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=0" name="viewport"/><link rel="icon" href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/favicon.ico"><title>X-PHP</title><script>document.write("<script src='config.js'><\/script>");</script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/echarts.49558cc4.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/elicons.4bccae06.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/modules.af2834df.js"></script><script defer="defer" src="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/js/app.f15b4c83.js"></script><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/modules.34563575.css" rel="stylesheet"><link href="https://ansnid.oss-cn-shenzhen.aliyuncs.com/x-Admin/static/css/app.5ad3f495.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but X-PHP doesn't work properly without JavaScript enabled.</strong></noscript><div id="app" class="aminui"><div class="app-loading"><div class="app-loading__logo"></div><div class="app-loading__loader"></div></div></div></body><div id="versionCheck" class="versionCheck"><h2>当前浏览器内核版本过低</h2><p>当前版本:<span id="versionCheck-type">--</span> <span id="versionCheck-version">--</span></p><p>最低版本要求Chrome 71+、Firefox 65+、Safari 12+、Edge 97+。</p><p>请升级浏览器版本,或更换现代浏览器,如果你使用的是双核浏览器,请切换到极速/高速模式。</p></div><style>.app-loading {
position: absolute;
top:0px;
left:0px;

4
dist/report.html vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[251],{251:function(e,t,a){a.r(t),a.d(t,{default:function(){return m}});var r=a(6808),l=a(9511);const n={class:"left-panel"},i={class:"right-panel"},s={class:"right-panel-search"};function c(e,t,a,c,o,u){const h=(0,r.up)("el-date-picker"),p=(0,r.up)("el-input"),d=(0,r.up)("el-button"),m=(0,r.up)("el-header"),g=(0,r.up)("el-table-column"),f=(0,r.up)("xTable"),w=(0,r.up)("el-main"),b=(0,r.up)("el-container");return(0,r.wg)(),(0,r.j4)(b,{class:"container"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r._)("div",n,[(0,r.Wm)(h,{modelValue:o.date,"onUpdate:modelValue":t[0]||(t[0]=e=>o.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,r._)("div",i,[(0,r._)("div",s,[(0,r.Wm)(p,{modelValue:o.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>o.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,r.Wm)(d,{type:"primary",icon:"el-icon-search",onClick:u.upsearch},null,8,["onClick"])])])])),_:1}),(0,r.Wm)(w,{class:"nopadding"},{default:(0,r.w5)((()=>[(0,r.Wm)(f,{ref:"table",api:o.api,params:o.search,tableColumn:o.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:u.rowClick},{default:(0,r.w5)((()=>[(0,r.Wm)(g,{type:"index",width:"60",align:"center"},{default:(0,r.w5)((e=>[(0,r._)("span",null,(0,l.zw)(e.$index+(o.currentPage-1)*o.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})}var o=a(3380),u=a(1843),h={name:"log",components:{columnItem:o.Z,xMenuItem:u.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{},api:"",current:"",config:{},tableColumn:{},column:"default",currentPage:1,limit:20}},mounted(){this.getType()},watch:{current(){this.search.type=this.current,this.getCurrent()}},methods:{sideClick(e){this.info=e,this.search.type=e.value,this.current=e.value,this.column=e.column||"column"},changeURLArg(e,t,a){var r=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+r,"gi"),""),e=e.replace(new RegExp("\\??"+r+"&?","gi"),"?"),e;var l=t+"="+a;if(e.match(r)){var n="("+t+"=)([^&]*)";return n=e.replace(new RegExp(n,"gi"),l),n}return e.match("[?]")?e+"&"+l:e+"?"+l},nodeClick(e){if(e.disabled)return!1;this.current=e.label,this.column=e.column||"column"},getType(){this.$http.get("log/admin/types",{type:this.$route.query.type},{cacheparameters:!0}).then((e=>{if(200==e.code){Object.assign(this.$data,e.data);for(const e in this.search)Object.prototype.hasOwnProperty.call(this.$route.query,e)&&(this.search[e]=this.$route.query[e])}}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);let e=window.location.href;for(const[t,a]of Object.entries(this.search))e=this.changeURLArg(e,t,a);history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)},upsearch(){this.getCurrent()},rowClick(e){this.infoDrawer=!0,this.$nextTick((()=>{this.$refs.info.setData(e)}))}}},p=a(8700);const d=(0,p.Z)(h,[["render",c],["__scopeId","data-v-eba8b6d4"]]);var m=d}}]);
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[251],{251:function(e,t,a){a.r(t),a.d(t,{default:function(){return m}});var r=a(6808),l=a(9511);const n={class:"left-panel"},i={class:"right-panel"},s={class:"right-panel-search"};function c(e,t,a,c,o,u){const h=(0,r.up)("el-date-picker"),p=(0,r.up)("el-input"),d=(0,r.up)("el-button"),m=(0,r.up)("el-header"),g=(0,r.up)("el-table-column"),f=(0,r.up)("xTable"),w=(0,r.up)("el-main"),b=(0,r.up)("el-container");return(0,r.wg)(),(0,r.j4)(b,{class:"container"},{default:(0,r.w5)((()=>[(0,r.Wm)(m,null,{default:(0,r.w5)((()=>[(0,r._)("div",n,[(0,r.Wm)(h,{modelValue:o.date,"onUpdate:modelValue":t[0]||(t[0]=e=>o.date=e),type:"datetimerange","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},null,8,["modelValue"])]),(0,r._)("div",i,[(0,r._)("div",s,[(0,r.Wm)(p,{modelValue:o.search.keyword,"onUpdate:modelValue":t[1]||(t[1]=e=>o.search.keyword=e),placeholder:"输入关键词",clearable:""},null,8,["modelValue"]),(0,r.Wm)(d,{type:"primary",icon:"el-icon-search",onClick:u.upsearch},null,8,["onClick"])])])])),_:1}),(0,r.Wm)(w,{class:"nopadding"},{default:(0,r.w5)((()=>[(0,r.Wm)(f,{ref:"table",api:o.api,params:o.search,tableColumn:o.tableColumn,stripe:"",highlightCurrentRow:"",onRowClick:u.rowClick},{default:(0,r.w5)((()=>[(0,r.Wm)(g,{type:"index",width:"60",align:"center"},{default:(0,r.w5)((e=>[(0,r._)("span",null,(0,l.zw)(e.$index+(o.currentPage-1)*o.limit+1),1)])),_:1})])),_:1},8,["api","params","tableColumn","onRowClick"])])),_:1})])),_:1})}var o=a(9967),u=a(1843),h={name:"log",components:{columnItem:o.Z,xMenuItem:u.Z},data(){return{infoDrawer:!1,chartoption:{},typeList:[],date:[],data:[],search:{},api:"",current:"",config:{},tableColumn:{},column:"default",currentPage:1,limit:20}},mounted(){this.getType()},watch:{current(){this.search.type=this.current,this.getCurrent()}},methods:{sideClick(e){this.info=e,this.search.type=e.value,this.current=e.value,this.column=e.column||"column"},changeURLArg(e,t,a){var r=t+"=([^&]*)";if(""===a)return e=e.replace(new RegExp("&?"+r,"gi"),""),e=e.replace(new RegExp("\\??"+r+"&?","gi"),"?"),e;var l=t+"="+a;if(e.match(r)){var n="("+t+"=)([^&]*)";return n=e.replace(new RegExp(n,"gi"),l),n}return e.match("[?]")?e+"&"+l:e+"?"+l},nodeClick(e){if(e.disabled)return!1;this.current=e.label,this.column=e.column||"column"},getType(){this.$http.get("log/admin/types",{type:this.$route.query.type},{cacheparameters:!0}).then((e=>{if(200==e.code){Object.assign(this.$data,e.data);for(const e in this.search)Object.prototype.hasOwnProperty.call(this.$route.query,e)&&(this.search[e]=this.$route.query[e])}}))},getCurrent(){this.tableColumn=this.config[this.column]||this.config.default,this.api||(this.api="log/admin/lists"),this.$refs.table.reload(this.search);let e=window.location.href;for(const[t,a]of Object.entries(this.search))e=this.changeURLArg(e,t,a);history.replaceState(Object.assign({},window.history.state,{url:e}),"null",e)},upsearch(){this.getCurrent()},rowClick(e){this.infoDrawer=!0,this.$nextTick((()=>{this.$refs.info.setData(e)}))}}},p=a(8700);const d=(0,p.Z)(h,[["render",c],["__scopeId","data-v-eba8b6d4"]]);var m=d}}]);

View File

@ -1 +0,0 @@
"use strict";(self["webpackChunkx_php_admin"]=self["webpackChunkx_php_admin"]||[]).push([[633],{6633:function(e,a,l){l.r(a),l.d(a,{default:function(){return i}});var s=l(6808);function o(e,a,l,o,t,r){const d=(0,s.up)("x-upload"),i=(0,s.up)("el-form-item"),m=(0,s.up)("el-input"),p=(0,s.up)("el-cascader"),u=(0,s.up)("el-option"),n=(0,s.up)("el-select"),f=(0,s.up)("el-form"),h=(0,s.up)("el-button"),w=(0,s.up)("x-dialog");return(0,s.wg)(),(0,s.j4)(w,{title:t.titleMap[t.mode],modelValue:t.visible,"onUpdate:modelValue":a[9]||(a[9]=e=>t.visible=e),width:"500",padding:"20","destroy-on-close":"",onClosed:a[10]||(a[10]=a=>e.$emit("closed"))},{footer:(0,s.w5)((()=>[(0,s.Wm)(h,{onClick:a[7]||(a[7]=e=>t.visible=!1)},{default:(0,s.w5)((()=>[(0,s.Uk)("取 消")])),_:1}),"show"!=t.mode?((0,s.wg)(),(0,s.j4)(h,{key:0,type:"primary",loading:t.isSaveing,onClick:a[8]||(a[8]=e=>r.submit())},{default:(0,s.w5)((()=>[(0,s.Uk)("保 存")])),_:1},8,["loading"])):(0,s.kq)("",!0)])),default:(0,s.w5)((()=>[(0,s.Wm)(f,{model:t.form,rules:t.rules,disabled:"show"==t.mode,ref:"dialogForm","label-width":"100px","label-position":"left"},{default:(0,s.w5)((()=>[(0,s.Wm)(i,{label:"头像",prop:"avatar"},{default:(0,s.w5)((()=>[(0,s.Wm)(d,{modelValue:t.form.avatar,"onUpdate:modelValue":a[0]||(a[0]=e=>t.form.avatar=e),title:"上传头像"},null,8,["modelValue"])])),_:1}),(0,s.Wm)(i,{label:"登录账号",prop:"userName"},{default:(0,s.w5)((()=>[(0,s.Wm)(m,{modelValue:t.form.userName,"onUpdate:modelValue":a[1]||(a[1]=e=>t.form.userName=e),placeholder:"用于登录系统",clearable:""},null,8,["modelValue"])])),_:1}),(0,s.Wm)(i,{label:"姓名",prop:"name"},{default:(0,s.w5)((()=>[(0,s.Wm)(m,{modelValue:t.form.name,"onUpdate:modelValue":a[2]||(a[2]=e=>t.form.name=e),placeholder:"请输入完整的真实姓名",clearable:""},null,8,["modelValue"])])),_:1}),"add"==t.mode?((0,s.wg)(),(0,s.iD)(s.HY,{key:0},[(0,s.Wm)(i,{label:"登录密码",prop:"password"},{default:(0,s.w5)((()=>[(0,s.Wm)(m,{type:"password",modelValue:t.form.password,"onUpdate:modelValue":a[3]||(a[3]=e=>t.form.password=e),clearable:"","show-password":""},null,8,["modelValue"])])),_:1}),(0,s.Wm)(i,{label:"确认密码",prop:"password2"},{default:(0,s.w5)((()=>[(0,s.Wm)(m,{type:"password",modelValue:t.form.password2,"onUpdate:modelValue":a[4]||(a[4]=e=>t.form.password2=e),clearable:"","show-password":""},null,8,["modelValue"])])),_:1})],64)):(0,s.kq)("",!0),(0,s.Wm)(i,{label:"所属部门",prop:"dept"},{default:(0,s.w5)((()=>[(0,s.Wm)(p,{modelValue:t.form.dept,"onUpdate:modelValue":a[5]||(a[5]=e=>t.form.dept=e),options:t.depts,props:t.deptsProps,clearable:"",style:{width:"100%"}},null,8,["modelValue","options","props"])])),_:1}),(0,s.Wm)(i,{label:"所属角色",prop:"group"},{default:(0,s.w5)((()=>[(0,s.Wm)(n,{modelValue:t.form.group,"onUpdate:modelValue":a[6]||(a[6]=e=>t.form.group=e),multiple:"",filterable:"",style:{width:"100%"}},{default:(0,s.w5)((()=>[((0,s.wg)(!0),(0,s.iD)(s.HY,null,(0,s.Ko)(t.groups,(e=>((0,s.wg)(),(0,s.j4)(u,{key:e.id,label:e.label,value:e.id},null,8,["label","value"])))),128))])),_:1},8,["modelValue"])])),_:1})])),_:1},8,["model","rules","disabled"])])),_:1},8,["title","modelValue"])}var t={emits:["success","closed"],data(){return{mode:"add",titleMap:{add:"新增用户",edit:"编辑用户",show:"查看"},visible:!1,isSaveing:!1,form:{id:"",userName:"",avatar:"",name:"",dept:"",group:[]},rules:{avatar:[{required:!0,message:"请上传头像"}],userName:[{required:!0,message:"请输入登录账号"}],name:[{required:!0,message:"请输入真实姓名"}],password:[{required:!0,message:"请输入登录密码"},{validator:(e,a,l)=>{""!==this.form.password2&&this.$refs.dialogForm.validateField("password2"),l()}}],password2:[{required:!0,message:"请再次输入密码"},{validator:(e,a,l)=>{a!==this.form.password?l(new Error("两次输入密码不一致!")):l()}}],dept:[{required:!0,message:"请选择所属部门"}],group:[{required:!0,message:"请选择所属角色",trigger:"change"}]},groups:[],groupsProps:{value:"id",multiple:!0,checkStrictly:!0},depts:[],deptsProps:{value:"id",checkStrictly:!0}}},mounted(){this.getGroup(),this.getDept()},methods:{open(e="add"){return this.mode=e,this.visible=!0,this},async getGroup(){var e=await this.$api.system.role.list.get();this.groups=e.data.rows},async getDept(){var e=await this.$api.system.dept.list.get();this.depts=e.data},submit(){this.$refs.dialogForm.validate((async e=>{if(!e)return!1;this.isSaveing=!0;var a=await this.$api.demo.post.post(this.form);this.isSaveing=!1,200==a.code?(this.$emit("success",this.form,this.mode),this.visible=!1,this.$message.success("操作成功")):this.$alert(a.message,"提示",{type:"error"})}))},setData(e){this.form.id=e.id,this.form.userName=e.userName,this.form.avatar=e.avatar,this.form.name=e.name,this.form.group=e.group,this.form.dept=e.dept}}},r=l(8700);const d=(0,r.Z)(t,[["render",o]]);var i=d}}]);

File diff suppressed because one or more lines are too long

1
dist/static/js/app.f15b4c83.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
dist/static/js/xChunks.eaf743d8.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -5,13 +5,13 @@ const APP_CONFIG = {
//主题设置
THEMESETTING: true,
// Cookie name
SESSIONNAME: 'miucms_session',
SESSIONNAME: 'MIUCMSSESSION',
//TokenName
TOKEN_NAME: "authorization",
TOKEN_NAME: "token",
// 网站LOGO, 正式形
APP_LOGO: '',
//接口地址
API_URL: 'https://app.gter.net/admin/',
API_URL: 'http://localhost/admin/',
// 微信扫码登录
MY_SHOW_LOGIN_OAUTH: true,
}

View File

@ -25,7 +25,6 @@
</template>
<script>
import http from "@/utils/request"
export default {
props: {
modelValue: { type: Object, default: () => { } },
@ -106,7 +105,7 @@ export default {
var remoteData = []
this.config.column.forEach((item) => {
if (item.options && item.options.remote) {
var req = http.get(item.options.remote.api, item.options.remote.data).then(res => {
var req = this.$http.get(item.options.remote.api, item.options.remote.data).then(res => {
item.options.items = res.data
})
remoteData.push(req)
@ -123,7 +122,6 @@ export default {
obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" && (obj2[key] && obj2[key].toString() === "[object Object]") ? this.deepMerge(obj1[key], obj2[key]) : (obj1[key] = obj2[key])
}
return obj1
//return JSON.parse(JSON.stringify(obj1))
},
//
validate(valid, obj) {

View File

@ -13,8 +13,8 @@
</el-image>
<input v-else-if="item.columntype == 'input'" @click="handleClick(row, item)" style="cursor: pointer; " class="el-input__inner" type="text" readonly :value="row[item.name]">
<p v-else-if="item.columntype == 'status'">
<template v-for="{ value, type = 'success', label } in item.options.items">
<x-status-indicator :key="value" pulse :type="type" :label="label" @click="handleClick(row, item)" v-if="value == row[item.name]"></x-status-indicator>
<template v-for="{ value, type = 'success', label, options={} } in item.options.items">
<x-status-indicator :style="item.style" :key="value" pulse :type="type" :label="label" @click="handleClick(row, options || item)" v-if="value == row[item.name]"></x-status-indicator>
</template>
</p>
<p v-else-if="item.columntype == 'button'">

View File

@ -13,7 +13,7 @@
<img :src="info.icon" class="img" alt="">
<div style="flex:1;">
<div class="data-title">{{ info.name }}</div>
<div class="data-info-text">目录<code>{{ info.app }}</code></div>
<div class="data-info-text">目录<code>{{ info.app }}</code></div>
<span class="data-info-type data-info-type-m jus-x">
{{ info.islocal ? '本地插件' : '线上插件' }}
</span>
@ -92,6 +92,12 @@
<script>
import { ElMessageBox } from 'element-plus';
import tool from '@/utils/tool';
import store from '@/store'
import api from '@/api'
import router from '@/router/index.js';
export default {
props: {
showPop: {
@ -104,78 +110,98 @@ export default {
}
},
data() {
return {
info:this.item,
isupdate:false,
}
return {
info: this.item,
isupdate: false,
}
},
mounted() {
this.info = this.item;
this.info = this.item;
},
methods: {
//
closePop() {
this.showPop(this.isupdate)
},
//
uninstall(){
updateMenu() {
//
api.system.index.get().then((response) => {
if (response.code == 200) {
//
for (const key in response.data) {
tool.data.set(key, response.data[key]);
if (key == 'layout') {
store.commit("SET_layout", response.data[key])
}
}
router.x_getMenu();
}
}).catch((error) => {
console.log(error);
});
},
//
uninstall() {
ElMessageBox.confirm('当前操作不可逆,可能会造成无法访问或数据清空.', '正在卸载应用', {
type: 'error',
closeOnClickModal: false,
confirmButtonText: '确认卸载',
}).then(() => {
this.$http.post('admin/application/uninstall', {app:this.info.app}).then((res) => {
this.$http.post('admin/application/uninstall', { app: this.info.app }).then((res) => {
if (res.code == 200) {
this.info.installed = false;
this.isupdate = true;
// this.showPop(true)
//
this.updateMenu();
this.$message.success(res.message || "操作成功")
return true;
}
this.$alert(res.message, "提示", {type: 'error'});
this.$alert(res.message, "提示", { type: 'error' });
});
}).catch(() => {})
}).catch(() => { })
},
//
install(){
install() {
ElMessageBox.confirm(this.info.islocal?'在安装插件之前,请阅读插件的使用说明。':'此插件为远程应用, 如安装失败请确认是否有写入权限.或前往应用中心下载至本地再进行安装', '安装应用', {
ElMessageBox.confirm(this.info.islocal ? '在安装插件之前,请阅读插件的使用说明。' : '此插件为远程应用, 如安装失败请确认是否有写入权限.或前往应用中心下载至本地再进行安装', '安装应用', {
type: 'warning',
closeOnClickModal: false,
confirmButtonText: '确认安装',
}).then(() => {
this.$http.post('admin/application/install', {app:this.info.app}).then((res) => {
this.$http.post('admin/application/install', { app: this.info.app }).then((res) => {
//
if (res.code == 205) {
this.$message.warning(res.message || "请前往在线升级频道登录X-PHP后进行安装");
if (res.url) {
this.$router.replace({
path: res.url
})
})
}
return false;
}
if (res.code == 200) {
//
this.info.installed = true;
this.isupdate = true;
//
this.updateMenu();
this.$message.success(res.message || "操作成功")
return true;
}
this.$alert(res.message, "提示", {type: 'error'});
this.$alert(res.message, "提示", { type: 'error' });
});
}).catch(() => {})
}).catch(() => { })
}
}
@ -193,6 +219,7 @@ code {
display: initial;
cursor: pointer;
}
img {
object-fit: contain;
}
@ -482,7 +509,7 @@ img {
}
@media screen and (max-width:960px) {
.info-data-box{
.info-data-box {
padding: 10px;
}
@ -515,7 +542,7 @@ img {
.related-details .line {
height: 1px;
margin:20px 0;
margin: 20px 0;
width: 100%;
}
}

View File

@ -1,166 +0,0 @@
<template>
<x-dialog :title="titleMap[mode]" v-model="visible" width="500" padding="20" destroy-on-close @closed="$emit('closed')">
<el-form :model="form" :rules="rules" :disabled="mode=='show'" ref="dialogForm" label-width="100px" label-position="left">
<el-form-item label="头像" prop="avatar">
<x-upload v-model="form.avatar" title="上传头像"></x-upload>
</el-form-item>
<el-form-item label="登录账号" prop="userName">
<el-input v-model="form.userName" placeholder="用于登录系统" clearable></el-input>
</el-form-item>
<el-form-item label="姓名" prop="name">
<el-input v-model="form.name" placeholder="请输入完整的真实姓名" clearable></el-input>
</el-form-item>
<template v-if="mode=='add'">
<el-form-item label="登录密码" prop="password">
<el-input type="password" v-model="form.password" clearable show-password></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="password2">
<el-input type="password" v-model="form.password2" clearable show-password></el-input>
</el-form-item>
</template>
<el-form-item label="所属部门" prop="dept">
<el-cascader v-model="form.dept" :options="depts" :props="deptsProps" clearable style="width: 100%;"></el-cascader>
</el-form-item>
<el-form-item label="所属角色" prop="group">
<el-select v-model="form.group" multiple filterable style="width: 100%">
<el-option v-for="item in groups" :key="item.id" :label="item.label" :value="item.id"/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="visible=false" > </el-button>
<el-button v-if="mode!='show'" type="primary" :loading="isSaveing" @click="submit()"> </el-button>
</template>
</x-dialog>
</template>
<script>
export default {
emits: ['success', 'closed'],
data() {
return {
mode: "add",
titleMap: {
add: '新增用户',
edit: '编辑用户',
show: '查看'
},
visible: false,
isSaveing: false,
//
form: {
id:"",
userName: "",
avatar: "",
name: "",
dept: "",
group: []
},
//
rules: {
avatar:[
{required: true, message: '请上传头像'}
],
userName: [
{required: true, message: '请输入登录账号'}
],
name: [
{required: true, message: '请输入真实姓名'}
],
password: [
{required: true, message: '请输入登录密码'},
{validator: (rule, value, callback) => {
if (this.form.password2 !== '') {
this.$refs.dialogForm.validateField('password2');
}
callback();
}}
],
password2: [
{required: true, message: '请再次输入密码'},
{validator: (rule, value, callback) => {
if (value !== this.form.password) {
callback(new Error('两次输入密码不一致!'));
}else{
callback();
}
}}
],
dept: [
{required: true, message: '请选择所属部门'}
],
group: [
{required: true, message: '请选择所属角色', trigger: 'change'}
]
},
//
groups: [],
groupsProps: {
value: "id",
multiple: true,
checkStrictly: true
},
depts: [],
deptsProps: {
value: "id",
checkStrictly: true
}
}
},
mounted() {
this.getGroup()
this.getDept()
},
methods: {
//
open(mode='add'){
this.mode = mode;
this.visible = true;
return this
},
//
async getGroup(){
var res = await this.$api.system.role.list.get();
this.groups = res.data.rows;
},
async getDept(){
var res = await this.$api.system.dept.list.get();
this.depts = res.data;
},
//
submit(){
this.$refs.dialogForm.validate(async (valid) => {
if (valid) {
this.isSaveing = true;
var res = await this.$api.demo.post.post(this.form);
this.isSaveing = false;
if(res.code == 200){
this.$emit('success', this.form, this.mode)
this.visible = false;
this.$message.success("操作成功")
}else{
this.$alert(res.message, "提示", {type: 'error'})
}
}else{
return false;
}
})
},
//
setData(data){
this.form.id = data.id
this.form.userName = data.userName
this.form.avatar = data.avatar
this.form.name = data.name
this.form.group = data.group
this.form.dept = data.dept
//
//Object.assign(this.form, data)
}
}
}
</script>
<style>
</style>