no message
This commit is contained in:
parent
780091a3bf
commit
fd5c4e42d9
@ -33,7 +33,7 @@
|
|||||||
.el-header .right-panel {display: flex;align-items: center;}
|
.el-header .right-panel {display: flex;align-items: center;}
|
||||||
.el-header .right-panel > * + * {margin-left:10px;}
|
.el-header .right-panel > * + * {margin-left:10px;}
|
||||||
.el-footer {background: #fff;border-top: 1px solid var(--el-border-color-light);padding:13px 15px;}
|
.el-footer {background: #fff;border-top: 1px solid var(--el-border-color-light);padding:13px 15px;}
|
||||||
.el-main {padding:15px;}
|
.el-main {padding:10px;}
|
||||||
.el-main.nopadding {padding:0;background: #fff;}
|
.el-main.nopadding {padding:0;background: #fff;}
|
||||||
.el-drawer__body {overflow: auto;padding:0;}
|
.el-drawer__body {overflow: auto;padding:0;}
|
||||||
.el-popconfirm__main {margin: 14px 0;}
|
.el-popconfirm__main {margin: 14px 0;}
|
||||||
|
@ -1,103 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-main>
|
<el-container>
|
||||||
<el-card shadow="never">
|
<el-main>
|
||||||
<el-tabs tab-position="top">
|
<el-card shadow="never">
|
||||||
|
<el-tabs tab-position="top" v-model="activename">
|
||||||
|
<el-tab-pane v-for="item in settingList" :key="item.key" :label="item.name" :name="item.key">
|
||||||
|
<sc-form ref="formref" :config="formList[item.key]" v-model="info" :loading="loading"> </sc-form>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="系统设置">
|
<el-tab-pane label="扩展配置">
|
||||||
<el-form ref="form" :model="sys" label-width="100px" style="margin-top: 20px;">
|
<el-alert title="扩展配置为系统业务所有的配置" type="warning" style="margin-bottom: 15px;"></el-alert>
|
||||||
<el-form-item label="系统名称">
|
<sc-form-table v-model="extend" :hideAdd="true" drag-sort placeholder="暂无数据">
|
||||||
<el-input v-model="sys.name"></el-input>
|
<el-table-column label="KEY" prop="key" width="150">
|
||||||
</el-form-item>
|
<template #default="scope">
|
||||||
<el-form-item label="LogoUrl">
|
<el-input v-model="scope.row.key" placeholder="请输入内容"></el-input>
|
||||||
<el-input v-model="sys.logoUrl"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="登录开关">
|
|
||||||
<el-switch v-model="sys.login"></el-switch>
|
|
||||||
<div class="el-form-item-msg" data-v-b33b3cf8="">关闭后普通用户无法登录,仅允许管理员角色登录</div>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="密码验证规则">
|
|
||||||
<el-input v-model="sys.passwordRules"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="版权信息">
|
|
||||||
<el-input type="textarea" :autosize="{minRows: 4}" v-model="sys.copyright"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary">保存</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-tab-pane>
|
|
||||||
|
|
||||||
<el-tab-pane label="短信配置">
|
|
||||||
<el-form ref="form" :model="msg" label-width="100px" style="margin-top: 20px;">
|
|
||||||
<el-form-item label="短信开关">
|
|
||||||
<el-switch v-model="msg.open"></el-switch>
|
|
||||||
<div class="el-form-item-msg" data-v-b33b3cf8="">关闭后用户无法收到短信,但日志中将记录</div>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="appKey">
|
|
||||||
<el-input v-model="msg.appKey"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="secretKey">
|
|
||||||
<el-input v-model="msg.secretKey"></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary">保存</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</el-tab-pane>
|
|
||||||
|
|
||||||
<el-tab-pane label="扩展配置">
|
|
||||||
<el-alert title="扩展配置为系统业务所有的配置,应该由系统管理员操作,如需用户配置应另起业务配置页面。" type="warning" style="margin-bottom: 15px;"></el-alert>
|
|
||||||
|
|
||||||
<el-table :data="setting" stripe>
|
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
|
||||||
<el-table-column label="KEY" prop="key" width="150">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-input v-if="scope.row.isSet" v-model="scope.row.key" placeholder="请输入内容"></el-input>
|
|
||||||
<span v-else>{{scope.row.key}}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="VALUE" prop="value" width="350">
|
|
||||||
<template #default="scope">
|
|
||||||
<template v-if="scope.row.isSet">
|
|
||||||
<el-switch v-if="typeof scope.row.value==='boolean'" v-model="scope.row.value"></el-switch>
|
|
||||||
<el-input v-else v-model="scope.row.value" placeholder="请输入内容"></el-input>
|
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{scope.row.value}}</span>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column label="VALUE" prop="value" width="350">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="CATEGORY" prop="category" width="150">
|
<el-input v-model="scope.row.value" placeholder="请输入内容"></el-input>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<el-input v-if="scope.row.isSet" v-model="scope.row.category" placeholder="请输入内容"></el-input>
|
</el-table-column>
|
||||||
<span v-else>{{scope.row.category}}</span>
|
<el-table-column label="备注" prop="title">
|
||||||
</template>
|
<template #default="scope">
|
||||||
</el-table-column>
|
<el-input v-model="scope.row.title" placeholder="请输入内容"></el-input>
|
||||||
<el-table-column label="TITLE" prop="title" width="350">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-input v-if="scope.row.isSet" v-model="scope.row.title" placeholder="请输入内容"></el-input>
|
</sc-form-table>
|
||||||
<span v-else>{{scope.row.title}}</span>
|
<el-button type="primary" icon="el-icon-plus" @click="table_add" style="margin-top: 20px;"></el-button>
|
||||||
</template>
|
</el-tab-pane>
|
||||||
</el-table-column>
|
</el-tabs>
|
||||||
<el-table-column min-width="1"></el-table-column>
|
<el-button type="primary" @click="submit" style="width: 500px;margin: 30px 0 0 150px;" :loading="submitloading">保存</el-button>
|
||||||
<el-table-column label="操作" fixed="right" width="120">
|
</el-card>
|
||||||
<template #default="scope">
|
</el-main>
|
||||||
<el-button-group>
|
</el-container>
|
||||||
<el-button @click="table_edit(scope.row, scope.$index)" text type="primary" size="small">{{scope.row.isSet?'保存':"修改"}}</el-button>
|
|
||||||
<el-button v-if="scope.row.isSet" @click="scope.row.isSet=false" text type="primary" size="small">取消</el-button>
|
|
||||||
<el-popconfirm v-if="!scope.row.isSet" title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
|
||||||
<template #reference>
|
|
||||||
<el-button text type="primary" size="small">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-popconfirm>
|
|
||||||
</el-button-group>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="table_add" style="margin-top: 20px;"></el-button>
|
|
||||||
</el-tab-pane>
|
|
||||||
|
|
||||||
</el-tabs>
|
|
||||||
</el-card>
|
|
||||||
</el-main>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -105,44 +40,13 @@
|
|||||||
name: 'system',
|
name: 'system',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sys: {
|
info: {},
|
||||||
name: "SCUI",
|
activename:'init',
|
||||||
logoUrl: "",
|
settingList:[],
|
||||||
login: true,
|
extend:[],
|
||||||
passwordRules: "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$",
|
formList:{},
|
||||||
copyright: "@SCUI"
|
loading:false,
|
||||||
},
|
submitloading:false,
|
||||||
msg: {
|
|
||||||
open: true,
|
|
||||||
appKey: "",
|
|
||||||
secretKey: ""
|
|
||||||
},
|
|
||||||
setting: [
|
|
||||||
{
|
|
||||||
key: "file_serve",
|
|
||||||
value: "https://file.scui.com",
|
|
||||||
category: "url",
|
|
||||||
title: "文件服务器地址"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "cloud_url",
|
|
||||||
value: "-",
|
|
||||||
category: "url",
|
|
||||||
title: "客户端地址"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "crm_url",
|
|
||||||
value: "-",
|
|
||||||
category: "url",
|
|
||||||
title: "CRM地址"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "autoSwitch",
|
|
||||||
value: true,
|
|
||||||
category: "user",
|
|
||||||
title: "自动判断boolean类型"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -152,34 +56,40 @@
|
|||||||
render(){
|
render(){
|
||||||
|
|
||||||
|
|
||||||
|
this.loading = true;
|
||||||
|
|
||||||
setTimeout(async ()=>{
|
setTimeout(async ()=>{
|
||||||
|
|
||||||
var res = await this.$http.get('system/setting/get');
|
var res = await this.$http.get('system/setting/get');
|
||||||
|
|
||||||
if (res.code!=200) {
|
if (res.code!=200) {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.settingList = res.data.settingList;
|
||||||
|
this.info = res.data.info;
|
||||||
|
this.formList = res.data.formList;
|
||||||
|
this.extend = res.data.extend || [];
|
||||||
|
this.loading = false;
|
||||||
|
|
||||||
|
if (res.data.activename) {
|
||||||
|
this.activename = res.data.activename;
|
||||||
}
|
}
|
||||||
|
|
||||||
},100)
|
},100)
|
||||||
|
},
|
||||||
|
async submit(){
|
||||||
|
this.submitloading = true;
|
||||||
|
this.$http.post('system/setting/submit', {info:this.info,extend:this.extend});
|
||||||
},
|
},
|
||||||
table_add(){
|
table_add(){
|
||||||
var newRow = {
|
var newRow = {
|
||||||
key: "",
|
key: "",
|
||||||
value: "",
|
value: "",
|
||||||
title: "",
|
title: ""
|
||||||
isSet: true
|
|
||||||
}
|
}
|
||||||
this.setting.push(newRow)
|
this.extend.push(newRow)
|
||||||
},
|
|
||||||
table_edit(row){
|
|
||||||
if(row.isSet){
|
|
||||||
row.isSet = false
|
|
||||||
}else{
|
|
||||||
row.isSet = true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
table_del(row, index){
|
|
||||||
this.setting.splice(index, 1)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user