更新
This commit is contained in:
@@ -57,70 +57,70 @@ export default {
|
||||
},
|
||||
dictionary: {
|
||||
category: {
|
||||
url: `${config.API_URL}/system/dictionary/category`,
|
||||
url: `${config.API_URL}system/dict/category`,
|
||||
name: "获取字典树",
|
||||
get: async function(){
|
||||
return await http.get(this.url);
|
||||
}
|
||||
},
|
||||
editcate:{
|
||||
url: `${config.API_URL}/system/dictionary/editcate`,
|
||||
url: `${config.API_URL}system/dict/editcate`,
|
||||
name: "编辑字典树",
|
||||
post: async function(data = {}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
addcate:{
|
||||
url: `${config.API_URL}/system/dictionary/addcate`,
|
||||
url: `${config.API_URL}system/dict/addcate`,
|
||||
name: "添加字典树",
|
||||
post: async function(data = {}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
delCate:{
|
||||
url: `${config.API_URL}/system/dictionary/delcate`,
|
||||
url: `${config.API_URL}system/dict/delcate`,
|
||||
name: "删除字典树",
|
||||
post: async function(data = {}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
list: {
|
||||
url: `${config.API_URL}/system/dictionary/lists`,
|
||||
url: `${config.API_URL}system/dict/lists`,
|
||||
name: "字典明细",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
get: {
|
||||
url: `${config.API_URL}/system/dictionary/detail`,
|
||||
url: `${config.API_URL}system/dict/detail`,
|
||||
name: "获取字典数据",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
edit:{
|
||||
url: `${config.API_URL}/system/dictionary/edit`,
|
||||
url: `${config.API_URL}system/dict/edit`,
|
||||
name: "编辑字典明细",
|
||||
post: async function(data = {}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
add:{
|
||||
url: `${config.API_URL}/system/dictionary/add`,
|
||||
url: `${config.API_URL}system/dict/add`,
|
||||
name: "添加字典明细",
|
||||
post: async function(data = {}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
delete:{
|
||||
url: `${config.API_URL}/system/dictionary/delete`,
|
||||
url: `${config.API_URL}system/dict/delete`,
|
||||
name: "删除字典明细",
|
||||
post: async function(data = {}){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
detail: {
|
||||
url: `${config.API_URL}/system/dictionary/detail`,
|
||||
url: `${config.API_URL}system/dict/detail`,
|
||||
name: "字典明细",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
|
||||
@@ -3,21 +3,21 @@ import http from "@/utils/request"
|
||||
|
||||
export default {
|
||||
list: {
|
||||
url: `${config.API_URL}/user/user/index`,
|
||||
url: `${config.API_URL}/auth/user/index`,
|
||||
name: "获得用户列表",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
add: {
|
||||
url: `${config.API_URL}/user/user/add`,
|
||||
url: `${config.API_URL}/auth/user/add`,
|
||||
name: "添加用户",
|
||||
post: async function(params){
|
||||
return await http.post(this.url, params);
|
||||
}
|
||||
},
|
||||
edit: {
|
||||
url: `${config.API_URL}/user/user/edit`,
|
||||
url: `${config.API_URL}/auth/user/edit`,
|
||||
name: "编辑用户",
|
||||
post: async function(params){
|
||||
return await http.post(this.url, params);
|
||||
@@ -25,14 +25,14 @@ export default {
|
||||
},
|
||||
role: {
|
||||
list: {
|
||||
url: `${config.API_URL}/user/role/index`,
|
||||
url: `${config.API_URL}/auth/role/index`,
|
||||
name: "获得角色列表",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
edit: {
|
||||
url: `${config.API_URL}/user/role/edit`,
|
||||
url: `${config.API_URL}/auth/role/edit`,
|
||||
name: "编辑角色",
|
||||
post: async function(params){
|
||||
return await http.post(this.url, params);
|
||||
@@ -41,14 +41,14 @@ export default {
|
||||
},
|
||||
department: {
|
||||
list: {
|
||||
url: `${config.API_URL}/user/department/index`,
|
||||
url: `${config.API_URL}/auth/department/index`,
|
||||
name: "获得部门列表",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
}
|
||||
},
|
||||
edit: {
|
||||
url: `${config.API_URL}/user/department/edit`,
|
||||
url: `${config.API_URL}/auth/department/edit`,
|
||||
name: "编辑部门",
|
||||
post: async function(params){
|
||||
return await http.post(this.url, params);
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
}
|
||||
},
|
||||
userinfo:{
|
||||
url: `${config.API_URL}/user/user/info`,
|
||||
url: `${config.API_URL}/auth/user/info`,
|
||||
name: "获得部门列表",
|
||||
get: async function(params){
|
||||
return await http.get(this.url, params);
|
||||
|
||||
@@ -27,11 +27,11 @@ export default {
|
||||
data(){
|
||||
return {
|
||||
pageLoading: true,
|
||||
dashboard: '1'
|
||||
dashboard: '0'
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.dashboard = this.$TOOL.data.get("USER_INFO").dashboard || '1';
|
||||
this.dashboard = this.$TOOL.data.get("USER_INFO").dashboard || '0';
|
||||
},
|
||||
mounted(){
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div style="height: 200px;text-align: center;">
|
||||
<img src="img/ver.svg" style="height:130px"/>
|
||||
<h2 style="margin-top: 15px;">电子通行证 {{$CONFIG.CORE_VER}}</h2>
|
||||
<p style="margin-top: 5px;">最新版本 {{ver.version}}</p>
|
||||
<p style="margin-top: 5px;">最新版本 {{ver}}</p>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="welcome">
|
||||
<div class="logo">
|
||||
<img src="img/logo.png">
|
||||
<h2>南昌工程学院电子通行证管理系统</h2>
|
||||
<h2>SentOS</h2>
|
||||
</div>
|
||||
<div class="tips">
|
||||
<div class="tips-item">
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功")
|
||||
}else{
|
||||
this.$alert(res.msg, "提示", {type: 'error'})
|
||||
this.$alert(res.message, "提示", {type: 'error'})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -201,9 +201,9 @@ export default {
|
||||
addInfo(){
|
||||
this.dialog.list = true
|
||||
this.$nextTick(() => {
|
||||
var dicCurrentKey = this.$refs.dic.getCurrentKey();
|
||||
var node = this.$refs.dic.getCurrentNode();
|
||||
const data = {
|
||||
dic: dicCurrentKey
|
||||
dic_type: node.code
|
||||
}
|
||||
this.$refs.listDialog.open().setData(data)
|
||||
})
|
||||
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功")
|
||||
}else{
|
||||
this.$alert(res.msg, "提示", {type: 'error'})
|
||||
this.$alert(res.message, "提示", {type: 'error'})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,171 +1,177 @@
|
||||
<template>
|
||||
<el-main>
|
||||
<el-card shadow="never">
|
||||
<el-tabs tab-position="top">
|
||||
<el-main>
|
||||
<el-card shadow="never">
|
||||
<el-tabs tab-position="top">
|
||||
|
||||
<el-tab-pane label="系统设置">
|
||||
<el-form ref="form" :model="sys" label-width="100px" style="margin-top: 20px;">
|
||||
<el-form-item label="系统名称">
|
||||
<el-input v-model="sys.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="LogoUrl">
|
||||
<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="sys" label-width="100px" style="margin-top: 20px;">
|
||||
<el-form-item label="系统名称">
|
||||
<el-input v-model="sys.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="LogoUrl">
|
||||
<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-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-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>
|
||||
<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>
|
||||
</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>
|
||||
<span v-else>{{scope.row.value}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="CATEGORY" prop="category" width="150">
|
||||
<template #default="scope">
|
||||
<el-input v-if="scope.row.isSet" v-model="scope.row.category" placeholder="请输入内容"></el-input>
|
||||
<span v-else>{{scope.row.category}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="TITLE" prop="title" width="350">
|
||||
<template #default="scope">
|
||||
<el-input v-if="scope.row.isSet" v-model="scope.row.title" placeholder="请输入内容"></el-input>
|
||||
<span v-else>{{scope.row.title}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="1"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template #default="scope">
|
||||
<el-button @click="table_edit(scope.row, scope.$index)" type="text" size="small">{{scope.row.isSet?'保存':"修改"}}</el-button>
|
||||
<el-button v-if="scope.row.isSet" @click="scope.row.isSet=false" type="text" size="small">取消</el-button>
|
||||
<el-popconfirm v-if="!scope.row.isSet" title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
</template>
|
||||
<span v-else>{{scope.row.value}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="CATEGORY" prop="category" width="150">
|
||||
<template #default="scope">
|
||||
<el-input v-if="scope.row.isSet" v-model="scope.row.category" placeholder="请输入内容"></el-input>
|
||||
<span v-else>{{scope.row.category}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="TITLE" prop="title" width="350">
|
||||
<template #default="scope">
|
||||
<el-input v-if="scope.row.isSet" v-model="scope.row.title" placeholder="请输入内容"></el-input>
|
||||
<span v-else>{{scope.row.title}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="1"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template #default="scope">
|
||||
<el-button @click="table_edit(scope.row, scope.$index)" type="text" size="small">{{scope.row.isSet?'保存':"修改"}}</el-button>
|
||||
<el-button v-if="scope.row.isSet" @click="scope.row.isSet=false" type="text" size="small">取消</el-button>
|
||||
<el-popconfirm v-if="!scope.row.isSet" title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</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-popconfirm>
|
||||
</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>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'system',
|
||||
data() {
|
||||
return {
|
||||
sys: {
|
||||
name: "SCUI",
|
||||
logoUrl: "",
|
||||
login: true,
|
||||
passwordRules: "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$",
|
||||
copyright: "@SCUI"
|
||||
export default {
|
||||
name: 'system',
|
||||
data() {
|
||||
return {
|
||||
sys: {
|
||||
name: "SCUI",
|
||||
logoUrl: "",
|
||||
login: true,
|
||||
passwordRules: "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$",
|
||||
copyright: "@SCUI"
|
||||
},
|
||||
msg: {
|
||||
open: true,
|
||||
appKey: "",
|
||||
secretKey: ""
|
||||
},
|
||||
setting: [
|
||||
{
|
||||
key: "file_serve",
|
||||
value: "https://file.scui.com",
|
||||
category: "url",
|
||||
title: "文件服务器地址"
|
||||
},
|
||||
msg: {
|
||||
open: true,
|
||||
appKey: "",
|
||||
secretKey: ""
|
||||
{
|
||||
key: "cloud_url",
|
||||
value: "-",
|
||||
category: "url",
|
||||
title: "客户端地址"
|
||||
},
|
||||
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类型"
|
||||
}
|
||||
]
|
||||
{
|
||||
key: "crm_url",
|
||||
value: "-",
|
||||
category: "url",
|
||||
title: "CRM地址"
|
||||
},
|
||||
{
|
||||
key: "autoSwitch",
|
||||
value: true,
|
||||
category: "user",
|
||||
title: "自动判断boolean类型"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
async mounted(){
|
||||
await this.getConfigField();
|
||||
},
|
||||
methods: {
|
||||
getConfigField(){
|
||||
this.$API.system.setting.list.get();
|
||||
},
|
||||
table_add(){
|
||||
var newRow = {
|
||||
key: "",
|
||||
value: "",
|
||||
title: "",
|
||||
isSet: true
|
||||
}
|
||||
this.setting.push(newRow)
|
||||
},
|
||||
table_edit(row){
|
||||
if(row.isSet){
|
||||
row.isSet = false
|
||||
}else{
|
||||
row.isSet = true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
table_add(){
|
||||
var newRow = {
|
||||
key: "",
|
||||
value: "",
|
||||
title: "",
|
||||
isSet: true
|
||||
}
|
||||
this.setting.push(newRow)
|
||||
},
|
||||
table_edit(row){
|
||||
if(row.isSet){
|
||||
row.isSet = false
|
||||
}else{
|
||||
row.isSet = true
|
||||
}
|
||||
},
|
||||
table_del(row, index){
|
||||
this.setting.splice(index, 1)
|
||||
},
|
||||
}
|
||||
table_del(row, index){
|
||||
this.setting.splice(index, 1)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
</style>
|
||||
@@ -84,7 +84,7 @@ export default {
|
||||
userType: 'admin',
|
||||
ruleForm: {
|
||||
user: "admin",
|
||||
password: "admin888",
|
||||
password: "password",
|
||||
autologin: false
|
||||
},
|
||||
rules: {
|
||||
|
||||
Reference in New Issue
Block a user