优化代码

This commit is contained in:
smallchill 2019-02-21 22:34:21 +08:00
parent d5e4c0f3cf
commit 9c6db088d1
33 changed files with 2478 additions and 2398 deletions

16
.editorconfig Normal file
View File

@ -0,0 +1,16 @@
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
[Makefile]
indent_style = tab

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

BIN
public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -13,7 +13,7 @@
<link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/1.0.0/index.css">
<link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/1.5.3/index.css"> <link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/1.5.3/index.css">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.png">
<title>Saber企业级开发平台</title> <title>Saber企业级开发平台</title>
<style> <style>
html, html,

View File

@ -1,4 +1,5 @@
import request from '@/router/axios'; import request from '@/router/axios';
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
return request({ return request({
url: 'api/blade-desk/notice/list', url: 'api/blade-desk/notice/list',

View File

@ -1,4 +1,5 @@
import request from '@/router/axios'; import request from '@/router/axios';
export const getUsualList = (current, size) => { export const getUsualList = (current, size) => {
return request({ return request({
url: 'api/blade-log/usual/list', url: 'api/blade-log/usual/list',

View File

@ -1,9 +1,12 @@
import request from '@/router/axios'; import request from '@/router/axios';
export const resetPassword = (userIds) => { export const resetPassword = (userIds) => {
return request({ return request({
url: 'api/blade-user/reset-password', url: 'api/blade-user/reset-password',
method: 'post', method: 'post',
data: userIds params: {
userIds,
}
}) })
} }
export const getList = (current, size, params) => { export const getList = (current, size, params) => {
@ -18,13 +21,10 @@ export const getList = (current, size, params) => {
} }
export const remove = (ids) => { export const remove = (ids) => {
return request({ return request({
url: 'api/blade-system/user/remove', url: 'api/blade-user/remove',
method: 'post', method: 'post',
data: { params: {
ids, ids,
},
meta: {
isSerialize: true,
} }
}) })
} }
@ -53,4 +53,4 @@ export const getUser = (id) => {
id, id,
} }
}) })
} }

View File

@ -1,4 +1,5 @@
import request from '@/router/axios'; import request from '@/router/axios';
export const getList = (current, size) => { export const getList = (current, size) => {
return request({ return request({
url: 'api/blade-develop/code/list', url: 'api/blade-develop/code/list',

View File

@ -1,51 +1,51 @@
import request from '@/router/axios'; import request from '@/router/axios';
import { baseUrl } from '@/config/env'; import {baseUrl} from '@/config/env';
export const loginByUsername = (account, password, type) => request({ export const loginByUsername = (account, password, type) => request({
url: 'api/blade-auth/token', url: 'api/blade-auth/token',
method: 'post', method: 'post',
data: { data: {
account, account,
password, password,
type type
}, },
meta: { meta: {
isSerialize: true, isSerialize: true,
} }
}) })
export const getButtons = () => request({ export const getButtons = () => request({
url: 'api/blade-system/menu/buttons', url: 'api/blade-system/menu/buttons',
method: 'get' method: 'get'
}); });
export const getUserInfo = () => request({ export const getUserInfo = () => request({
url: baseUrl + '/user/getUserInfo', url: baseUrl + '/user/getUserInfo',
method: 'get' method: 'get'
}); });
export const refeshToken = () => request({ export const refeshToken = () => request({
url: baseUrl + '/user/refesh', url: baseUrl + '/user/refesh',
method: 'post' method: 'post'
}) })
export const getMenu = () => request({ export const getMenu = () => request({
url: 'api/blade-system/menu/routes', url: 'api/blade-system/menu/routes',
method: 'get' method: 'get'
}); });
export const getTopMenu = () => request({ export const getTopMenu = () => request({
url: baseUrl + '/user/getTopMenu', url: baseUrl + '/user/getTopMenu',
method: 'get' method: 'get'
}); });
export const sendLogs = (list) => request({ export const sendLogs = (list) => request({
url: baseUrl + '/user/logout', url: baseUrl + '/user/logout',
method: 'post', method: 'post',
data: list data: list
}) })
export const logout = () => request({ export const logout = () => request({
url: baseUrl + '/user/logout', url: baseUrl + '/user/logout',
method: 'get' method: 'get'
}) })

View File

@ -7,6 +7,6 @@ import menu from './menu';
* mock是否开启模拟数据拦截 * mock是否开启模拟数据拦截
*/ */
user({ mock: true}); user({mock: true});
menu({ mock: true }); menu({mock: true});

View File

@ -1,46 +1,47 @@
import Mock from 'mockjs' import Mock from 'mockjs'
const top = [{ const top = [{
label: "首页", label: "首页",
path: "/wel/index", path: "/wel/index",
icon: 'el-icon-menu', icon: 'el-icon-menu',
meta: { meta: {
i18n: 'dashboard', i18n: 'dashboard',
}, },
parentId: 0 parentId: 0
}, },
{ {
label: "bladex官网", label: "bladex官网",
icon: 'el-icon-document', icon: 'el-icon-document',
meta: { meta: {
i18n: 'website', i18n: 'website',
}, },
path: "https://bladex.vip/#/", path: "https://bladex.vip/#/",
parentId: 1 parentId: 1
}, },
{ {
label: "avuex官网", label: "avuex官网",
icon: 'el-icon-document', icon: 'el-icon-document',
meta: { meta: {
i18n: 'avuexwebsite', i18n: 'avuexwebsite',
}, },
path: "https://avuex.avue.top", path: "https://avuex.avue.top",
parentId: 2 parentId: 2
}, },
{ {
label: "测试", label: "测试",
icon: 'el-icon-document', icon: 'el-icon-document',
path: "/test/index", path: "/test/index",
meta: { meta: {
i18n: 'test', i18n: 'test',
}, },
parentId: 3 parentId: 3
}] }]
export default ({ mock }) => { export default ({mock}) => {
if (!mock) return; if (!mock) return;
Mock.mock('/user/getTopMenu', 'get', () => { Mock.mock('/user/getTopMenu', 'get', () => {
return { return {
data: top data: top
} }
}) })
} }

View File

@ -19,7 +19,8 @@
icon="el-icon-delete" icon="el-icon-delete"
plain plain
v-if="permission.notice_delete" v-if="permission.notice_delete"
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="category"> slot="category">
@ -30,167 +31,168 @@
</template> </template>
<script> <script>
import { getList, remove, update, add, getNotice } from "@/api/dept/notice"; import {getList, remove, update, add, getNotice} from "@/api/dept/notice";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
selectionList: [],
option: {
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
{
label: "通知标题",
prop: "title",
row: true,
search: true
},
{
label: "通知类型",
type: "select",
row: true,
dicUrl: "/api/blade-system/dict/dictionary?code=notice",
props: {
label: "dictValue",
value: "dictKey"
},
slot: true,
prop: "category",
search: true
},
{
label: "通知内容",
prop: "content",
span: 24,
minRows: 6,
type: "textarea"
},
{
label: "通知日期",
type: "date",
prop: "date",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "yyyy-MM-dd hh:mm:ss"
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.notice_add, form: {},
viewBtn: this.permission.notice_view, page: {
delBtn: this.permission.notice_delete, pageSize: 10,
editBtn: this.permission.notice_edit currentPage: 1,
total: 0
},
selectionList: [],
option: {
border: true,
index: true,
viewBtn: true,
selection: true,
column: [
{
label: "通知标题",
prop: "title",
row: true,
search: true
},
{
label: "通知类型",
type: "select",
row: true,
dicUrl: "/api/blade-system/dict/dictionary?code=notice",
props: {
label: "dictValue",
value: "dictKey"
},
slot: true,
prop: "category",
search: true
},
{
label: "通知内容",
prop: "content",
span: 24,
minRows: 6,
type: "textarea"
},
{
label: "通知日期",
type: "date",
prop: "date",
format: "yyyy-MM-dd hh:mm:ss",
valueFormat: "yyyy-MM-dd hh:mm:ss"
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.notice_add,
return ids.join(","); viewBtn: this.permission.notice_view,
} delBtn: this.permission.notice_delete,
}, editBtn: this.permission.notice_edit
methods: { };
rowSave(row, loading) { },
add(row).then(() => { ids() {
loading(); let ids = [];
this.onLoad(this.page); this.selectionList.forEach(ele => {
this.$message({ ids.push(ele.id);
type: "success",
message: "操作成功!"
}); });
}); return ids.join(",");
},
rowUpdate(row, index, loading) {
update(row).then(() => {
loading();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() {
this.onLoad(this.page);
},
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
} }
this.$confirm("确定将选择账号删除?", { },
confirmButtonText: "确定", methods: {
cancelButtonText: "取消", rowSave(row, loading) {
type: "warning" add(row).then(() => {
}) loading();
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
this.$refs.crud.toggleSelection();
}); });
}, },
rowUpdate(row, index, loading) {
update(row).then(() => {
loading();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() {
this.onLoad(this.page);
},
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) { beforeOpen(done, type) {
if (["edit", "view"].includes(type)) { if (["edit", "view"].includes(type)) {
getNotice(this.form.id).then(res => { getNotice(this.form.id).then(res => {
this.form = res.data.data; this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}); });
} }
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -23,121 +23,122 @@
</template> </template>
<script> <script>
import { getApiList, getApiLogs } from "@/api/logs"; import {getApiList, getApiLogs} from "@/api/logs";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
viewBtn: true,
editBtn: false,
addBtn: false,
delBtn: false,
menuWidth: 120,
column: [
{
label: "服务id",
prop: "serviceId",
search: true
},
{
label: "服务host",
prop: "serverHost",
search: true
},
{
label: "服务ip",
prop: "serverIp"
},
{
label: "软件环境",
prop: "env"
},
{
label: "日志名",
prop: "title"
},
{
label: "请求方法",
prop: "method"
},
{
label: "请求接口",
prop: "requestUri"
},
{
label: "日志时间",
prop: "createTime"
},
{
label: "用户代理",
prop: "userAgent",
span: 24,
hide: true
},
{
label: "请求数据",
prop: "params",
type: "textarea",
span: 24,
minRows: 2,
hide: true
},
{
label: "日志数据",
prop: "stackTrace",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
};
},
computed: { export default {
...mapGetters(["permission"]), data() {
permissionList() {
return { return {
viewBtn: this.permission.log_api_view form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
viewBtn: true,
editBtn: false,
addBtn: false,
delBtn: false,
menuWidth: 120,
column: [
{
label: "服务id",
prop: "serviceId",
search: true
},
{
label: "服务host",
prop: "serverHost",
search: true
},
{
label: "服务ip",
prop: "serverIp"
},
{
label: "软件环境",
prop: "env"
},
{
label: "日志名",
prop: "title"
},
{
label: "请求方法",
prop: "method"
},
{
label: "请求接口",
prop: "requestUri"
},
{
label: "日志时间",
prop: "createTime"
},
{
label: "用户代理",
prop: "userAgent",
span: 24,
hide: true
},
{
label: "请求数据",
prop: "params",
type: "textarea",
span: 24,
minRows: 2,
hide: true
},
{
label: "日志数据",
prop: "stackTrace",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
}; };
}
},
methods: {
searchReset() {
this.onLoad(this.page);
}, },
searchChange(params) {
this.onLoad(this.page, params); computed: {
...mapGetters(["permission"]),
permissionList() {
return {
viewBtn: this.permission.log_api_view
};
}
}, },
beforeOpen(done, type) { methods: {
if (["edit", "view"].includes(type)) { searchReset() {
getApiLogs(this.form.strId).then(res => { this.onLoad(this.page);
this.form = res.data.data; },
searchChange(params) {
this.onLoad(this.page, params);
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getApiLogs(this.form.strId).then(res => {
this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getApiList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}); });
} }
done();
},
onLoad(page, params = {}) {
getApiList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -23,120 +23,121 @@
</template> </template>
<script> <script>
import { getErrorList, getErrorLogs } from "@/api/logs"; import {getErrorList, getErrorLogs} from "@/api/logs";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
viewBtn: true,
editBtn: false,
addBtn: false,
delBtn: false,
menuWidth: 120,
column: [
{
label: "服务id",
prop: "serviceId",
search: true
},
{
label: "服务host",
prop: "serverHost",
search: true
},
{
label: "服务ip",
prop: "serverIp"
},
{
label: "软件环境",
prop: "env"
},
{
label: "日志名",
prop: "title"
},
{
label: "请求方法",
prop: "method"
},
{
label: "请求接口",
prop: "requestUri"
},
{
label: "日志时间",
prop: "createTime"
},
{
label: "用户代理",
prop: "userAgent",
span: 24,
hide: true
},
{
label: "请求数据",
prop: "params",
type: "textarea",
span: 24,
minRows: 2,
hide: true
},
{
label: "日志数据",
prop: "stackTrace",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
viewBtn: this.permission.log_error_view form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
viewBtn: true,
editBtn: false,
addBtn: false,
delBtn: false,
menuWidth: 120,
column: [
{
label: "服务id",
prop: "serviceId",
search: true
},
{
label: "服务host",
prop: "serverHost",
search: true
},
{
label: "服务ip",
prop: "serverIp"
},
{
label: "软件环境",
prop: "env"
},
{
label: "日志名",
prop: "title"
},
{
label: "请求方法",
prop: "method"
},
{
label: "请求接口",
prop: "requestUri"
},
{
label: "日志时间",
prop: "createTime"
},
{
label: "用户代理",
prop: "userAgent",
span: 24,
hide: true
},
{
label: "请求数据",
prop: "params",
type: "textarea",
span: 24,
minRows: 2,
hide: true
},
{
label: "日志数据",
prop: "stackTrace",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
}; };
}
},
methods: {
searchReset() {
this.onLoad(this.page);
}, },
searchChange(params) { computed: {
this.onLoad(this.page, params); ...mapGetters(["permission"]),
permissionList() {
return {
viewBtn: this.permission.log_error_view
};
}
}, },
beforeOpen(done, type) { methods: {
if (["edit", "view"].includes(type)) { searchReset() {
getErrorLogs(this.form.strId).then(res => { this.onLoad(this.page);
this.form = res.data.data; },
searchChange(params) {
this.onLoad(this.page, params);
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getErrorLogs(this.form.strId).then(res => {
this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getErrorList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}); });
} }
done();
},
onLoad(page, params = {}) {
getErrorList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -23,120 +23,121 @@
</template> </template>
<script> <script>
import { getUsualList, getUsualLogs } from "@/api/logs"; import {getUsualList, getUsualLogs} from "@/api/logs";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
viewBtn: true,
editBtn: false,
addBtn: false,
delBtn: false,
menuWidth: 120,
column: [
{
label: "服务id",
prop: "serviceId",
search: true
},
{
label: "服务host",
prop: "serverHost",
search: true
},
{
label: "服务ip",
prop: "serverIp"
},
{
label: "软件环境",
prop: "env"
},
{
label: "日志级别",
prop: "logLevel"
},
{
label: "日志id",
prop: "logId"
},
{
label: "请求接口",
prop: "requestUri"
},
{
label: "日志时间",
prop: "logData"
},
{
label: "用户代理",
prop: "userAgent",
span: 24,
hide: true
},
{
label: "请求数据",
prop: "params",
type: "textarea",
span: 24,
minRows: 2,
hide: true
},
{
label: "日志数据",
prop: "stackTrace",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
viewBtn: this.permission.log_usual_view form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
viewBtn: true,
editBtn: false,
addBtn: false,
delBtn: false,
menuWidth: 120,
column: [
{
label: "服务id",
prop: "serviceId",
search: true
},
{
label: "服务host",
prop: "serverHost",
search: true
},
{
label: "服务ip",
prop: "serverIp"
},
{
label: "软件环境",
prop: "env"
},
{
label: "日志级别",
prop: "logLevel"
},
{
label: "日志id",
prop: "logId"
},
{
label: "请求接口",
prop: "requestUri"
},
{
label: "日志时间",
prop: "logData"
},
{
label: "用户代理",
prop: "userAgent",
span: 24,
hide: true
},
{
label: "请求数据",
prop: "params",
type: "textarea",
span: 24,
minRows: 2,
hide: true
},
{
label: "日志数据",
prop: "stackTrace",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
}; };
}
},
methods: {
searchReset() {
this.onLoad(this.page);
}, },
searchChange(params) { computed: {
this.onLoad(this.page, params); ...mapGetters(["permission"]),
permissionList() {
return {
viewBtn: this.permission.log_usual_view
};
}
}, },
beforeOpen(done, type) { methods: {
if (["edit", "view"].includes(type)) { searchReset() {
getUsualLogs(this.form.strId).then(res => { this.onLoad(this.page);
this.form = res.data.data; },
searchChange(params) {
this.onLoad(this.page, params);
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getUsualLogs(this.form.strId).then(res => {
this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getUsualList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}); });
} }
done();
},
onLoad(page, params = {}) {
getUsualList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -19,7 +19,8 @@
icon="el-icon-delete" icon="el-icon-delete"
v-if="permission.dept_delete" v-if="permission.dept_delete"
plain plain
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -34,170 +35,171 @@
</template> </template>
<script> <script>
import { import {
getList, getList,
remove, remove,
update, update,
add, add,
getDept, getDept,
getDeptTree getDeptTree
} from "@/api/system/dept"; } from "@/api/system/dept";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "部门名称",
prop: "deptName",
search: true
},
{
label: "部门全称",
prop: "fullName",
search: true
},
{
label: "上级部门",
prop: "parentId",
dicData: [],
type: "tree",
hide: true,
props: {
label: "title"
}
},
{ export default {
label: "排序", data() {
prop: "sort"
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.dept_add, form: {},
viewBtn: this.permission.dept_view, selectionList: [],
delBtn: this.permission.dept_delete, page: {
editBtn: this.permission.dept_edit pageSize: 10,
currentPage: 1,
total: 0
},
option: {
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "部门名称",
prop: "deptName",
search: true
},
{
label: "部门全称",
prop: "fullName",
search: true
},
{
label: "上级部门",
prop: "parentId",
dicData: [],
type: "tree",
hide: true,
props: {
label: "title"
}
},
{
label: "排序",
prop: "sort"
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.dept_add,
return ids.join(","); viewBtn: this.permission.dept_view,
} delBtn: this.permission.dept_delete,
}, editBtn: this.permission.dept_edit
methods: { };
rowSave(row, loading) { },
add(row).then(() => { ids() {
loading(); let ids = [];
this.onLoad(this.page); this.selectionList.forEach(ele => {
this.$message({ ids.push(ele.id);
type: "success",
message: "操作成功!"
}); });
}); return ids.join(",");
}
}, },
rowUpdate(row, index, loading) { methods: {
update(row).then(() => { rowSave(row, loading) {
loading(); add(row).then(() => {
this.onLoad(this.page); loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
handleDelete() { rowUpdate(row, index, loading) {
if (this.selectionList.length === 0) { update(row).then(() => {
this.$message.warning("请选择至少一条数据"); loading();
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
this.$refs.crud.toggleSelection();
}); });
}, },
searchReset() { rowDel(row) {
this.onLoad(this.page); this.$confirm("确定将选删除?", {
}, confirmButtonText: "确定",
searchChange(params) { cancelButtonText: "取消",
this.onLoad(this.page, params); type: "warning"
}, })
selectionChange(list) { .then(() => {
this.selectionList = list; return remove(row.id);
}, })
beforeOpen(done, type) { .then(() => {
if (["edit", "view"].includes(type)) { this.onLoad(this.page);
getDept(this.form.id).then(res => { this.$message({
this.form = res.data.data; type: "success",
}); message: "操作成功!"
} });
done(); });
}, },
onLoad(page, params = {}) { handleDelete() {
getList(page.currentPage, page.pageSize, params).then(res => { if (this.selectionList.length === 0) {
const data = res.data.data; this.$message.warning("请选择至少一条数据");
this.data = data; return;
getDeptTree().then(res => { }
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
searchReset() {
this.onLoad(this.page);
},
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDept(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data; const data = res.data.data;
const index = this.$refs.crud.findColumnIndex("parentId"); this.data = data;
this.option.column[index].dicData = data; getDeptTree().then(res => {
const data = res.data.data;
const index = this.$refs.crud.findColumnIndex("parentId");
this.option.column[index].dicData = data;
});
}); });
}); }
} }
} };
};
</script> </script>
<style> <style>

View File

@ -19,7 +19,8 @@
icon="el-icon-delete" icon="el-icon-delete"
v-if="permission.dict_delete" v-if="permission.dict_delete"
plain plain
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -34,173 +35,174 @@
</template> </template>
<script> <script>
import { import {
getList, getList,
remove, remove,
update, update,
add, add,
getDict, getDict,
getDictTree getDictTree
} from "@/api/system/dict"; } from "@/api/system/dict";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "字典名称",
prop: "dictValue",
search: true
},
{
label: "字典编号",
prop: "code",
search: true
},
{
label: "上级字典",
prop: "parentId",
type: "tree",
dicData: [],
hide: true,
props: {
label: "title"
}
},
{
label: "字典键值",
prop: "dictKey"
},
{
label: "排序",
prop: "sort"
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.dict_add, form: {},
viewBtn: this.permission.dict_view, selectionList: [],
delBtn: this.permission.dict_delete, page: {
editBtn: this.permission.dict_edit pageSize: 10,
currentPage: 1,
total: 0
},
option: {
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "字典名称",
prop: "dictValue",
search: true
},
{
label: "字典编号",
prop: "code",
search: true
},
{
label: "上级字典",
prop: "parentId",
type: "tree",
dicData: [],
hide: true,
props: {
label: "title"
}
},
{
label: "字典键值",
prop: "dictKey"
},
{
label: "排序",
prop: "sort"
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.dict_add,
return ids.join(","); viewBtn: this.permission.dict_view,
} delBtn: this.permission.dict_delete,
}, editBtn: this.permission.dict_edit
methods: { };
rowSave(row, loading) { },
add(row).then(() => { ids() {
loading(); let ids = [];
this.onLoad(this.page); this.selectionList.forEach(ele => {
this.$message({ ids.push(ele.id);
type: "success",
message: "操作成功!"
}); });
}); return ids.join(",");
}
}, },
rowUpdate(row, index, loading) { methods: {
update(row).then(() => { rowSave(row, loading) {
loading(); add(row).then(() => {
this.onLoad(this.page); loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
searchReset() { rowUpdate(row, index, loading) {
this.onLoad(this.page); update(row).then(() => {
}, loading();
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
this.$refs.crud.toggleSelection();
}); });
}, },
beforeOpen(done, type) { rowDel(row) {
if (["edit", "view"].includes(type)) { this.$confirm("确定将选删除?", {
getDict(this.form.id).then(res => { confirmButtonText: "确定",
this.form = res.data.data; cancelButtonText: "取消",
}); type: "warning"
} })
done(); .then(() => {
}, return remove(row.id);
onLoad(page, params = {}) { })
getList(page.currentPage, page.pageSize, params).then(res => { .then(() => {
const data = res.data.data; this.onLoad(this.page);
this.data = data; this.$message({
getDictTree().then(res => { type: "success",
message: "操作成功!"
});
});
},
searchReset() {
this.onLoad(this.page);
},
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDict(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data; const data = res.data.data;
const index = this.$refs.crud.findColumnIndex("parentId"); this.data = data;
this.option.column[index].dicData = data; getDictTree().then(res => {
const data = res.data.data;
const index = this.$refs.crud.findColumnIndex("parentId");
this.option.column[index].dicData = data;
});
}); });
}); }
} }
} };
};
</script> </script>
<style> <style>

View File

@ -19,7 +19,8 @@
icon="el-icon-delete" icon="el-icon-delete"
v-if="permission.menu_delete" v-if="permission.menu_delete"
plain plain
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -34,213 +35,214 @@
</template> </template>
<script> <script>
import { getList, remove, update, add, getMenu } from "@/api/system/menu"; import {getList, remove, update, add, getMenu} from "@/api/system/menu";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() {
return {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
dialogWidth: "70%",
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "菜单名称",
prop: "name",
search: true
},
{
label: "菜单编号",
prop: "code",
search: true
},
{
label: "菜单别名",
prop: "alias"
},
{
label: "路由地址",
prop: "path"
},
{ export default {
label: "上级菜单", data() {
prop: "parentId",
type: "tree",
dicUrl: "/api/blade-system/menu/tree",
hide: true,
props: {
label: "title"
}
},
{
label: "菜单类型",
prop: "category",
type: "radio",
dicData: [
{
label: "菜单",
value: 1
},
{
label: "按钮",
value: 2
}
],
hide: true
},
{
label: "排序",
prop: "sort"
},
{
label: "按钮功能",
prop: "action",
type: "radio",
dicData: [
{
label: "工具栏",
value: 0
},
{
label: "操作栏",
value: 1
},
{
label: "工具操作栏",
value: 2
}
],
hide: true
},
{
label: "菜单备注",
prop: "remark",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.menu_add, form: {},
viewBtn: this.permission.menu_view, selectionList: [],
delBtn: this.permission.menu_delete, page: {
editBtn: this.permission.menu_edit pageSize: 10,
currentPage: 1,
total: 0
},
option: {
dialogWidth: "70%",
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "菜单名称",
prop: "name",
search: true
},
{
label: "菜单编号",
prop: "code",
search: true
},
{
label: "菜单别名",
prop: "alias"
},
{
label: "路由地址",
prop: "path"
},
{
label: "上级菜单",
prop: "parentId",
type: "tree",
dicUrl: "/api/blade-system/menu/tree",
hide: true,
props: {
label: "title"
}
},
{
label: "菜单类型",
prop: "category",
type: "radio",
dicData: [
{
label: "菜单",
value: 1
},
{
label: "按钮",
value: 2
}
],
hide: true
},
{
label: "排序",
prop: "sort"
},
{
label: "按钮功能",
prop: "action",
type: "radio",
dicData: [
{
label: "工具栏",
value: 0
},
{
label: "操作栏",
value: 1
},
{
label: "工具操作栏",
value: 2
}
],
hide: true
},
{
label: "菜单备注",
prop: "remark",
type: "textarea",
span: 24,
minRows: 6,
hide: true
}
]
},
data: []
}; };
}, },
ids() {
let ids = []; computed: {
this.selectionList.forEach(ele => { ...mapGetters(["permission"]),
ids.push(ele.id); permissionList() {
}); return {
return ids.join(","); addBtn: this.permission.menu_add,
} viewBtn: this.permission.menu_view,
}, delBtn: this.permission.menu_delete,
methods: { editBtn: this.permission.menu_edit
rowSave(row, loading) { };
add(row).then(() => { },
loading(); ids() {
this.onLoad(this.page); let ids = [];
this.$message({ this.selectionList.forEach(ele => {
type: "success", ids.push(ele.id);
message: "操作成功!"
}); });
}); return ids.join(",");
}
}, },
rowUpdate(row, index, loading) { methods: {
update(row).then(() => { rowSave(row, loading) {
loading(); add(row).then(() => {
this.onLoad(this.page); loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
searchReset() { rowUpdate(row, index, loading) {
this.onLoad(this.page); update(row).then(() => {
}, loading();
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
this.$refs.crud.toggleSelection();
}); });
}, },
beforeOpen(done, type) { rowDel(row) {
if (["edit", "view"].includes(type)) { this.$confirm("确定将选删除?", {
getMenu(this.form.id).then(res => { confirmButtonText: "确定",
this.form = res.data.data; cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() {
this.onLoad(this.page);
},
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getMenu(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.data = data;
}); });
} }
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.data = data;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -18,7 +18,8 @@
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
plain plain
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -33,138 +34,139 @@
</template> </template>
<script> <script>
import { getList, remove, update, add } from "@/api/system/param"; import {getList, remove, update, add} from "@/api/system/param";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "参数名称",
prop: "paramName",
search: true
},
{
label: "参数键名",
prop: "paramKey",
search: true
},
{
label: "参数键值",
prop: "paramValue"
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.param_add, form: {},
viewBtn: this.permission.param_view, selectionList: [],
delBtn: this.permission.param_delete, page: {
editBtn: this.permission.param_edit pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "参数名称",
prop: "paramName",
search: true
},
{
label: "参数键名",
prop: "paramKey",
search: true
},
{
label: "参数键值",
prop: "paramValue"
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.param_add,
return ids.join(","); viewBtn: this.permission.param_view,
} delBtn: this.permission.param_delete,
}, editBtn: this.permission.param_edit
methods: { };
rowSave(row, loading) { },
add(row).then(() => { ids() {
loading(); let ids = [];
this.onLoad(this.page); this.selectionList.forEach(ele => {
this.$message({ ids.push(ele.id);
type: "success",
message: "操作成功!"
}); });
}); return ids.join(",");
}
}, },
rowUpdate(row, index, loading) { methods: {
update(row).then(() => { rowSave(row, loading) {
loading(); add(row).then(() => {
this.onLoad(this.page); loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
searchReset() { rowUpdate(row, index, loading) {
this.onLoad(this.page); update(row).then(() => {
}, loading();
searchChange(params) { this.onLoad(this.page);
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
this.$refs.crud.toggleSelection();
}); });
}, },
onLoad(page, params = {}) { rowDel(row) {
getList(page.currentPage, page.pageSize, params).then(res => { this.$confirm("确定将选删除?", {
const data = res.data.data; confirmButtonText: "确定",
this.page.total = data.total; cancelButtonText: "取消",
this.data = data.records; type: "warning"
}); })
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() {
this.onLoad(this.page);
},
searchChange(params) {
this.onLoad(this.page, params);
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
}
} }
} };
};
</script> </script>
<style> <style>

View File

@ -17,11 +17,13 @@
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
plain plain
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
<el-button size="small" <el-button size="small"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleRole" @click="handleRole"
plain>权限设置</el-button> plain>权限设置
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -54,181 +56,182 @@
</template> </template>
<script> <script>
import { import {
getList, getList,
remove, remove,
update, update,
add, add,
grant, grant,
getTree, getTree,
getRole getRole
} from "@/api/system/role"; } from "@/api/system/role";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
box: false,
props: {
label: "title",
valie: "key"
},
list: [],
defaultObj: [],
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "角色名称",
prop: "roleName",
search: true
},
{
label: "角色别名",
prop: "roleAlias",
search: true
},
{
label: "排序",
prop: "sort"
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.role_add, form: {},
viewBtn: this.permission.role_view, box: false,
delBtn: this.permission.role_delete, props: {
editBtn: this.permission.role_edit label: "title",
valie: "key"
},
list: [],
defaultObj: [],
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
tree: true,
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "角色名称",
prop: "roleName",
search: true
},
{
label: "角色别名",
prop: "roleAlias",
search: true
},
{
label: "排序",
prop: "sort"
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.role_add,
return ids.join(","); viewBtn: this.permission.role_view,
} delBtn: this.permission.role_delete,
}, editBtn: this.permission.role_edit
methods: { };
submit() { },
const menuLIst = this.$refs.tree.getCheckedKeys().join(","); ids() {
grant(this.ids[0], menuLIst).then(() => { let ids = [];
this.box = false; this.selectionList.forEach(ele => {
this.$message({ ids.push(ele.id);
type: "success",
message: "操作成功!"
}); });
this.onLoad(this.page); return ids.join(",");
}); }
}, },
rowSave(row, loading) { methods: {
add(row).then(() => { submit() {
loading(); const menuLIst = this.$refs.tree.getCheckedKeys().join(",");
this.onLoad(this.page); grant(this.ids[0], menuLIst).then(() => {
this.$message({ this.box = false;
type: "success", this.$message({
message: "操作成功!" type: "success",
message: "操作成功!"
});
this.onLoad(this.page);
}); });
}); },
}, rowSave(row, loading) {
rowUpdate(row, index, loading) { add(row).then(() => {
update(row).then(() => { loading();
this.onLoad(this.page);
loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
rowUpdate(row, index, loading) {
update(row).then(() => {
this.onLoad(this.page);
loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() { searchReset() {
this.onLoad(this.page); this.onLoad(this.page);
}, },
searchChange(params) { searchChange(params) {
this.onLoad(this.page, params); this.onLoad(this.page, params);
}, },
selectionChange(list) { selectionChange(list) {
this.selectionList = list; this.selectionList = list;
}, },
handleRole() { handleRole() {
if (this.selectionList.length !== 1) { if (this.selectionList.length !== 1) {
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
getTree() getTree()
.then(res => { .then(res => {
this.list = res.data.data; this.list = res.data.data;
return getRole(this.ids[0]); return getRole(this.ids[0]);
}) })
.then(res => { .then(res => {
this.defaultObj = res.data.data; this.defaultObj = res.data.data;
this.box = true; this.box = true;
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
}); });
this.$refs.crud.toggleSelection(); },
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.data = data;
}); });
}, }
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.data = data;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -20,13 +20,15 @@
icon="el-icon-delete" icon="el-icon-delete"
plain plain
v-if="permission.user_delete" v-if="permission.user_delete"
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
v-if="permission. user_reset" v-if="permission. user_reset"
icon="el-icon-refresh" icon="el-icon-refresh"
@click="handleReset">密码重置</el-button> @click="handleReset">密码重置
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -41,224 +43,225 @@
</template> </template>
<script> <script>
import { import {
getList, getList,
getUser, getUser,
remove, remove,
update, update,
add, add,
resetPassword resetPassword
} from "@/api/system/user"; } from "@/api/system/user";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "登录账号",
prop: "account",
search: true
},
{
label: "用户昵称",
prop: "name",
search: true
},
{
label: "用户姓名",
prop: "realName"
},
{
label: "所属角色",
prop: "roleId",
multiple: true,
type: "tree",
dicUrl: "/api/blade-system/role/tree",
props: {
label: "title"
},
slot: true
},
{
label: "所属部门",
prop: "deptId",
type: "tree",
multiple: true,
dicUrl: "/api/blade-system/dept/tree",
props: {
label: "title"
},
slot: true
},
{
label: "手机号码",
prop: "phone",
overHidden: true
},
{
label: "电子邮箱",
prop: "email",
overHidden: true
},
{
label: "账号状态",
prop: "statusName",
display: false
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.user_add, form: {},
viewBtn: this.permission.user_view, selectionList: [],
delBtn: this.permission.user_delete, page: {
editBtn: this.permission.user_edit pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
selection: true,
viewBtn: true,
column: [
{
label: "登录账号",
prop: "account",
search: true
},
{
label: "用户昵称",
prop: "name",
search: true
},
{
label: "用户姓名",
prop: "realName"
},
{
label: "所属角色",
prop: "roleId",
multiple: true,
type: "tree",
dicUrl: "/api/blade-system/role/tree",
props: {
label: "title"
},
slot: true
},
{
label: "所属部门",
prop: "deptId",
type: "tree",
multiple: true,
dicUrl: "/api/blade-system/dept/tree",
props: {
label: "title"
},
slot: true
},
{
label: "手机号码",
prop: "phone",
overHidden: true
},
{
label: "电子邮箱",
prop: "email",
overHidden: true
},
{
label: "账号状态",
prop: "statusName",
display: false
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.user_add,
return ids.join(","); viewBtn: this.permission.user_view,
} delBtn: this.permission.user_delete,
}, editBtn: this.permission.user_edit
methods: { };
rowSave(row, loading) { },
row.deptId = row.deptId.join(","); ids() {
row.roleId = row.roleId.join(","); let ids = [];
add(row).then(() => { this.selectionList.forEach(ele => {
loading(); ids.push(ele.id);
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
}); });
}); return ids.join(",");
}
}, },
rowUpdate(row, index, loading) { methods: {
row.deptId = row.deptId.join(","); rowSave(row, loading) {
row.roleId = row.roleId.join(","); row.deptId = row.deptId.join(",");
update(row).then(() => { row.roleId = row.roleId.join(",");
loading(); add(row).then(() => {
this.onLoad(this.page); loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
searchReset() { rowUpdate(row, index, loading) {
this.onLoad(this.page); row.deptId = row.deptId.join(",");
}, row.roleId = row.roleId.join(",");
searchChange(params) { update(row).then(() => {
this.onLoad(this.page, params); loading();
},
selectionChange(list) {
this.selectionList = list;
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
this.$refs.crud.toggleSelection();
}); });
}, },
handleReset() { rowDel(row) {
if (this.selectionList.length === 0) { this.$confirm("确定将选删除?", {
this.$message.warning("请选择至少一条数据"); confirmButtonText: "确定",
return; cancelButtonText: "取消",
} type: "warning"
this.$confirm("确定将选择账号密码重置为123456?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return resetPassword(this.ids);
}) })
.then(() => { .then(() => {
this.$message({ return remove(row.id);
type: "success", })
message: "操作成功!" .then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
}); });
this.$refs.crud.toggleSelection(); },
}); searchReset() {
}, this.onLoad(this.page);
beforeOpen(done, type) { },
if (["edit", "view"].includes(type)) { searchChange(params) {
getUser(this.form.id).then(res => { this.onLoad(this.page, params);
this.form = res.data.data; },
this.form.deptId = this.form.deptId.split(","); selectionChange(list) {
this.form.deptId.forEach((ele, index) => { this.selectionList = list;
this.form.deptId[index] = Number(ele); },
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
}); });
this.form.roleId = this.form.roleId.split(","); },
this.form.roleId.forEach((ele, index) => { handleReset() {
this.form.roleId[index] = Number(ele); if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择账号密码重置为123456?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return resetPassword(this.ids);
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
}); });
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getUser(this.form.id).then(res => {
this.form = res.data.data;
this.form.deptId = this.form.deptId.split(",");
this.form.deptId.forEach((ele, index) => {
this.form.deptId[index] = Number(ele);
});
this.form.roleId = this.form.roleId.split(",");
this.form.roleId.forEach((ele, index) => {
this.form.roleId[index] = Number(ele);
});
});
}
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}); });
} }
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -1,9 +1,9 @@
<template> <template>
<basic-container>测试页 </basic-container> <basic-container>测试页</basic-container>
</template> </template>
<script> <script>
export default {}; export default {};
</script> </script>
<style> <style>

View File

@ -19,12 +19,14 @@
size="small" size="small"
icon="el-icon-delete" icon="el-icon-delete"
plain plain
@click="handleDelete"> </el-button> @click="handleDelete">
</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
plain plain
icon="el-icon-refresh" icon="el-icon-refresh"
@click="handleBuild">代码生成</el-button> @click="handleBuild">代码生成
</el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}"
slot="roleId"> slot="roleId">
@ -39,198 +41,199 @@
</template> </template>
<script> <script>
import { getList, getCode, build, remove, add, update } from "@/api/tool/code"; import {getList, getCode, build, remove, add, update} from "@/api/tool/code";
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
data() { export default {
return { data() {
form: {},
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
selection: true,
labelWidth: 120,
viewBtn: true,
column: [
{
label: "模块名",
prop: "codeName",
search: true
},
{
label: "服务名",
prop: "serviceName",
search: true
},
{
label: "表名",
prop: "tableName"
},
{
label: "表前缀",
prop: "tablePrefix"
},
{
label: "主键名",
prop: "pkName"
},
{
label: "包名",
prop: "packageName",
overHidden: true
},
{
label: "后端生成路径",
prop: "apiPath",
span: 24,
hide: true
},
{
label: "前端生成路径",
prop: "webPath",
span: 24,
hide: true
}
]
},
data: []
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return { return {
addBtn: this.permission.code_add, form: {},
viewBtn: this.permission.code_view, selectionList: [],
delBtn: this.permission.code_delete, page: {
editBtn: this.permission.code_edit pageSize: 10,
currentPage: 1,
total: 0
},
option: {
border: true,
index: true,
selection: true,
labelWidth: 120,
viewBtn: true,
column: [
{
label: "模块名",
prop: "codeName",
search: true
},
{
label: "服务名",
prop: "serviceName",
search: true
},
{
label: "表名",
prop: "tableName"
},
{
label: "表前缀",
prop: "tablePrefix"
},
{
label: "主键名",
prop: "pkName"
},
{
label: "包名",
prop: "packageName",
overHidden: true
},
{
label: "后端生成路径",
prop: "apiPath",
span: 24,
hide: true
},
{
label: "前端生成路径",
prop: "webPath",
span: 24,
hide: true
}
]
},
data: []
}; };
}, },
ids() { computed: {
let ids = []; ...mapGetters(["permission"]),
this.selectionList.forEach(ele => { permissionList() {
ids.push(ele.id); return {
}); addBtn: this.permission.code_add,
return ids.join(","); viewBtn: this.permission.code_view,
} delBtn: this.permission.code_delete,
}, editBtn: this.permission.code_edit
methods: { };
rowSave(row, loading) { },
add(row).then(() => { ids() {
loading(); let ids = [];
this.onLoad(this.page); this.selectionList.forEach(ele => {
this.$message({ ids.push(ele.id);
type: "success",
message: "操作成功!"
}); });
}); return ids.join(",");
}
}, },
rowUpdate(row, index, loading) { methods: {
update(row).then(() => { rowSave(row, loading) {
loading(); add(row).then(() => {
this.onLoad(this.page); loading();
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
}); });
}, },
rowUpdate(row, index, loading) {
update(row).then(() => {
loading();
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
rowDel(row) {
this.$confirm("确定将选删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(row.id);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
});
},
searchReset() { searchReset() {
this.onLoad(this.page); this.onLoad(this.page);
}, },
searchChange(params) { searchChange(params) {
this.onLoad(this.page, params); this.onLoad(this.page, params);
}, },
selectionChange(list) { selectionChange(list) {
this.selectionList = list; this.selectionList = list;
}, },
handleDelete() { handleDelete() {
if (this.selectionList.length === 0) { if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据"); this.$message.warning("请选择至少一条数据");
return; return;
} }
this.$confirm("确定将选择账号删除?", { this.$confirm("确定将选择账号删除?", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
})
.then(() => {
return remove(this.ids);
}) })
.then(() => { .then(() => {
this.onLoad(this.page); return remove(this.ids);
this.$message({ })
type: "success", .then(() => {
message: "操作成功!" this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
}); });
this.$refs.crud.toggleSelection(); },
}); handleBuild() {
}, if (this.selectionList.length === 0) {
handleBuild() { this.$message.warning("请选择至少一条数据");
if (this.selectionList.length === 0) { return;
this.$message.warning("请选择至少一条数据"); }
return; this.$confirm("是否生成选中模块的代码?", {
} title: "代码生成确认",
this.$confirm("是否生成选中模块的代码?", { confirmButtonText: "确定",
title: "代码生成确认", cancelButtonText: "取消",
confirmButtonText: "确定", type: "warning"
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return build(this.ids);
}) })
.then(() => { .then(() => {
this.onLoad(this.page); return build(this.ids);
this.$message({ })
type: "success", .then(() => {
message: "操作成功!" this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
}); });
this.$refs.crud.toggleSelection(); },
});
},
beforeOpen(done, type) { beforeOpen(done, type) {
if (["edit", "view"].includes(type)) { if (["edit", "view"].includes(type)) {
getCode(this.form.id).then(res => { getCode(this.form.id).then(res => {
this.form = res.data.data; this.form = res.data.data;
});
}
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
}); });
} }
done();
},
onLoad(page, params = {}) {
getList(page.currentPage, page.pageSize, params).then(res => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
});
} }
} };
};
</script> </script>
<style> <style>

View File

@ -10,47 +10,48 @@
</template> </template>
<script> <script>
import option from "@/const/user/info"; import option from "@/const/user/info";
export default {
data() { export default {
return { data() {
type: "info", return {
option: option, type: "info",
form: {} option: option,
}; form: {}
}, };
created() {
this.handleWitch();
},
methods: {
handleSubmit() {
this.$message({
message: this.form,
type: "success"
});
}, },
handleWitch() { created() {
if (this.type === "info") {
this.form = {
username: "smallwei",
name: "smallwei",
phone: "1888888888888",
detail: "这是一个个性签名"
};
} else if (this.type === "password") {
this.form = {
oldpassword: 11111111,
newpassword: 22222222,
newpasswords: 22222222
};
}
},
handleChange(item) {
this.type = item.prop;
this.handleWitch(); this.handleWitch();
},
methods: {
handleSubmit() {
this.$message({
message: this.form,
type: "success"
});
},
handleWitch() {
if (this.type === "info") {
this.form = {
username: "smallwei",
name: "smallwei",
phone: "1888888888888",
detail: "这是一个个性签名"
};
} else if (this.type === "password") {
this.form = {
oldpassword: 11111111,
newpassword: 22222222,
newpasswords: 22222222
};
}
},
handleChange(item) {
this.type = item.prop;
this.handleWitch();
}
} }
} };
};
</script> </script>
<style> <style>

View File

@ -6,194 +6,194 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
option: { option: {
span: 8, span: 8,
data: [ data: [
{ {
title: "后台模版", title: "后台模版",
src: "/img/bg/vip1.png", src: "/img/bg/vip1.png",
money: "299", money: "299",
dismoney: "199", dismoney: "199",
tip: "/永久", tip: "/永久",
color: "#808695", color: "#808695",
subtext: "购买", subtext: "购买",
click: () => { click: () => {
this.box = true; this.box = true;
},
list: [
{
title: "点击体验",
href: "https://cli1.avue.top",
check: true
},
{
title: "面向全屏幕尺寸的响应式适配能力",
check: true
},
{
title: "支持IE9+等系列浏览器",
check: true
},
{
title: "全新的前端错误日志监控机制",
check: true
},
{
title: "基于最新的avuex底层开发",
check: true
},
{
title: "前端路由动态服务端加载",
check: true
},
{
title: "灵活的多款主题自由配置",
check: true
},
{
title: "模块的可拆卸化,达到开箱即用",
check: true
},
{
title: "免费的私人git私服"
},
{
title: "专属会员群"
},
{
title: "前端最新干货分享"
},
{
title: "赠送 Avue-cli脚手架文档价值¥59.99",
href: "https://www.kancloud.cn/smallwei/avue"
},
{
title: "赠送 Avue 修仙系列视频教程",
href: "https://www.bilibili.com/video/av24644922",
check: true
}
]
}, },
list: [ {
{ title: "Avuex源码",
title: "点击体验", src: "/img/bg/vip2.png",
href: "https://cli1.avue.top", color: "#ffa820",
check: true money: "999",
dismoney: "399",
tip: "/永久",
subtext: "购买",
click: () => {
this.box = true;
}, },
{ list: [
title: "面向全屏幕尺寸的响应式适配能力", {
check: true title: "一键集成表格的导出excel,打印,等功能",
}, check: true
{ },
title: "支持IE9+等系列浏览器", {
check: true title: "底层代码可重用轻松对接多个UI框架",
}, check: true
{ },
title: "全新的前端错误日志监控机制", {
check: true title: "底层更加完善的开发错误调试机制",
}, check: true
{ },
title: "基于最新的avuex底层开发", {
check: true title: "一套代码多个终端自适应",
}, check: true
{ },
title: "前端路由动态服务端加载", {
check: true title: "一键集成表格的导出excel打印等常用功能",
}, check: true
{ },
title: "灵活的多款主题自由配置", {
check: true title: "表格的批量操作,表单的级联操作更加便捷",
}, check: true
{ },
title: "模块的可拆卸化,达到开箱即用", {
check: true title: "新增大量常用组件(搜索,选项卡)",
}, check: true
{ },
title: "免费的私人git私服" {
}, title: "新增大量全新可配置的骚属性",
{ check: true
title: "专属会员群" },
}, {
{ title: "丰富的数据展示模版组件包",
title: "前端最新干货分享" check: true
}, },
{ {
title: "赠送 Avue-cli脚手架文档价值¥59.99", title: "专属的开发者文档,助你快速掌握",
href: "https://www.kancloud.cn/smallwei/avue" check: true
}, },
{ {
title: "赠送 Avue 修仙系列视频教程", title: "赠送 Avue-cli脚手架文档价值¥59.99",
href: "https://www.bilibili.com/video/av24644922", href: "https://www.kancloud.cn/smallwei/avue",
check: true check: true
} },
] {
}, title: "赠送 Avue 修仙系列视频教程",
{ href: "https://www.bilibili.com/video/av24644922",
title: "Avuex源码", check: true
src: "/img/bg/vip2.png", }
color: "#ffa820", ]
money: "999",
dismoney: "399",
tip: "/永久",
subtext: "购买",
click: () => {
this.box = true;
}, },
list: [ {
{ title: "全家桶",
title: "一键集成表格的导出excel,打印,等功能", src: "/img/bg/vip3.png",
check: true color: "#ef4868",
money: "999.99",
dismoney: "399.99",
tip: "/永久",
subtext: "购买",
click: () => {
this.box = true;
}, },
{ list: [
title: "底层代码可重用轻松对接多个UI框架", {
check: true title: "授权商业化开发,永久更新授权使用",
}, check: true
{ },
title: "底层更加完善的开发错误调试机制", {
check: true title: "后期更新和新产品将全部免费",
}, check: true
{ },
title: "一套代码多个终端自适应", {
check: true title: "拥有avuex系列的全部特权和全部源码",
}, check: true
{ },
title: "一键集成表格的导出excel打印等常用功能", {
check: true title: "免费的私人git私服",
}, check: true
{ },
title: "表格的批量操作,表单的级联操作更加便捷", {
check: true title: "专属会员群",
}, check: true
{ },
title: "新增大量常用组件(搜索,选项卡)", {
check: true title: "前端最新干货分享",
}, check: true
{ },
title: "新增大量全新可配置的骚属性", {
check: true title: "赠送 Avue-cli脚手架文档价值¥59.99",
}, href: "https://www.kancloud.cn/smallwei/avue",
{ check: true
title: "丰富的数据展示模版组件包", },
check: true {
}, title: "赠送 Avue 修仙系列视频教程",
{ href: "https://www.bilibili.com/video/av24644922",
title: "专属的开发者文档,助你快速掌握", check: true
check: true }
}, ]
{ }
title: "赠送 Avue-cli脚手架文档价值¥59.99", ]
href: "https://www.kancloud.cn/smallwei/avue", }
check: true };
}, }
{ };
title: "赠送 Avue 修仙系列视频教程",
href: "https://www.bilibili.com/video/av24644922",
check: true
}
]
},
{
title: "全家桶",
src: "/img/bg/vip3.png",
color: "#ef4868",
money: "999.99",
dismoney: "399.99",
tip: "/永久",
subtext: "购买",
click: () => {
this.box = true;
},
list: [
{
title: "授权商业化开发,永久更新授权使用",
check: true
},
{
title: "后期更新和新产品将全部免费",
check: true
},
{
title: "拥有avuex系列的全部特权和全部源码",
check: true
},
{
title: "免费的私人git私服",
check: true
},
{
title: "专属会员群",
check: true
},
{
title: "前端最新干货分享",
check: true
},
{
title: "赠送 Avue-cli脚手架文档价值¥59.99",
href: "https://www.kancloud.cn/smallwei/avue",
check: true
},
{
title: "赠送 Avue 修仙系列视频教程",
href: "https://www.bilibili.com/video/av24644922",
check: true
}
]
}
]
}
};
}
};
</script> </script>
<style> <style>
</style> </style>

View File

@ -7,48 +7,48 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
form: {}, form: {},
option: { option: {
labelWidth: 110, labelWidth: 110,
column: [ column: [
{ {
label: "用户名", label: "用户名",
prop: "username", prop: "username",
row: true row: true
}, },
{ {
label: "密码", label: "密码",
prop: "password", prop: "password",
type: "password", type: "password",
row: true row: true
}, },
{ {
label: "再次输入密码", label: "再次输入密码",
prop: "password", prop: "password",
type: "newpassword", type: "newpassword",
row: true row: true
}, },
{ {
label: "申请日期", label: "申请日期",
prop: "date", prop: "date",
type: "date", type: "date",
row: true row: true
}, },
{ {
label: "个性签名", label: "个性签名",
prop: "textarea", prop: "textarea",
type: "textarea", type: "textarea",
minRows: 8, minRows: 8,
row: true row: true
} }
] ]
} }
}; };
} }
}; };
</script> </script>
<style> <style>

View File

@ -3,16 +3,17 @@
<h3>请打开浏览器控制台然后点击下面的按钮</h3> <h3>请打开浏览器控制台然后点击下面的按钮</h3>
<el-button type="danger" <el-button type="danger"
size="small" size="small"
@click="handleNewError">触发一个错误</el-button> @click="handleNewError">触发一个错误
</el-button>
</basic-container> </basic-container>
</template> </template>
<script> <script>
export default { export default {
methods: { methods: {
handleNewError() { handleNewError() {
console.log(a); // eslint-disable-line console.log(a); // eslint-disable-line
}
} }
} };
}; </script>
</script>

View File

@ -14,66 +14,69 @@
</avue-crud> </avue-crud>
</basic-container> </basic-container>
<basic-container> <basic-container>
权限开关<el-switch :active-value="false" 权限开关
<el-switch :active-value="false"
:inactive-value="true" :inactive-value="true"
v-model="text" v-model="text"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949">
</el-switch> </el-switch>
<p> 具体参考<a href="https://avuex.avue.top/#/doc/crud-permission">https://avuex.avue.top/#/doc/crud-permission</a></p> <p> 具体参考<a
href="https://avuex.avue.top/#/doc/crud-permission">https://avuex.avue.top/#/doc/crud-permission</a>
</p>
</basic-container> </basic-container>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
text: false, text: false,
permission: {}, permission: {},
option: { option: {
expand: true, expand: true,
column: [ column: [
{
label: "姓名",
prop: "name"
},
{
label: "年龄",
prop: "sex"
}
]
},
data: [
{ {
label: "姓名", id: 1,
prop: "name" name: "张三",
sex: 12
}, },
{ {
label: "年龄", id: 2,
prop: "sex" name: "李四",
sex: 20
} }
] ]
}, };
data: [ },
{ watch: {
id: 1, text() {
name: "张三", if (this.text === true) {
sex: 12 this.permission = {
}, delBtn: false,
{ addBtn: false
id: 2, };
name: "李四", } else {
sex: 20 this.permission = {
delBtn: true,
addBtn: true
};
} }
]
};
},
watch: {
text() {
if (this.text === true) {
this.permission = {
delBtn: false,
addBtn: false
};
} else {
this.permission = {
delBtn: true,
addBtn: true
};
} }
} }
} };
};
</script> </script>
<style> <style>

View File

@ -2,106 +2,121 @@
<basic-container> <basic-container>
<h3>存储</h3> <h3>存储</h3>
<el-tag class="title" <el-tag class="title"
size="small">基本读写删(持久化存储)</el-tag> size="small">基本读写删(持久化存储)
</el-tag>
<div class="box"> <div class="box">
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="setItem({name:'username', value:'avuex'});">set('username', 'avuex')</el-button> @click="setItem({name:'username', value:'avuex'});">set('username', 'avuex')
</el-button>
<el-button type="success" <el-button type="success"
size="small" size="small"
@click="getItem({name:'username'});">get('username')</el-button> @click="getItem({name:'username'});">get('username')
</el-button>
<el-button type="danger" <el-button type="danger"
size="small" size="small"
@click="delItem({name:'username'});">remove('username')</el-button> @click="delItem({name:'username'});">remove('username')
</el-button>
</div> </div>
<el-tag class="title" <el-tag class="title"
size="small">设置session(session存储)</el-tag> size="small">设置session(session存储)
</el-tag>
<div class="box"> <div class="box">
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="setItem({name:'username', value:'avuex',type:'session'});">set('username', 'avuex')</el-button> @click="setItem({name:'username', value:'avuex',type:'session'});">set('username', 'avuex')
</el-button>
<el-button type="success" <el-button type="success"
size="small" size="small"
@click="getItem({name:'username',type:'session'});">get('username')</el-button> @click="getItem({name:'username',type:'session'});">get('username')
</el-button>
<el-button type="danger" <el-button type="danger"
size="small" size="small"
@click="delItem({name:'username',type:'session'});">remove('username')</el-button> @click="delItem({name:'username',type:'session'});">remove('username')
</el-button>
</div> </div>
<el-tag class="title" <el-tag class="title"
size="small">获取所有可以获得的数据</el-tag> size="small">获取所有可以获得的数据
</el-tag>
<div class="box"> <div class="box">
<el-button type="success" <el-button type="success"
size="small" size="small"
@click="getAll()">getAll(持久化存储)</el-button> @click="getAll()">getAll(持久化存储)
</el-button>
<el-button type="success" <el-button type="success"
size="small" size="small"
@click="getAll({type:'session'})">getAll(session存储)</el-button> @click="getAll({type:'session'})">getAll(session存储)
</el-button>
<el-button type="danger" <el-button type="danger"
size="small" size="small"
@click="clearAll()">delAll(持久化存储)</el-button> @click="clearAll()">delAll(持久化存储)
</el-button>
<el-button type="danger" <el-button type="danger"
size="small" size="small"
@click="clearAll({type:'session'})">delAll(session存储)</el-button> @click="clearAll({type:'session'})">delAll(session存储)
</el-button>
</div> </div>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { import {
setStore, setStore,
getStore, getStore,
removeStore, removeStore,
clearStore, clearStore,
getAllStore getAllStore
} from "@/util/store"; } from "@/util/store";
export default {
name: "store", export default {
methods: { name: "store",
setItem(params = {}) { methods: {
const { name, value, type } = params; setItem(params = {}) {
setStore({ const {name, value, type} = params;
name: name, setStore({
content: value, name: name,
type: type content: value,
}); type: type
this.$message(`设置数据 ${name} = ${value}`); });
}, this.$message(`设置数据 ${name} = ${value}`);
getItem(params = {}) { },
const { name, type } = params; getItem(params = {}) {
const content = getStore({ const {name, type} = params;
name: name, const content = getStore({
type: type name: name,
}); type: type
this.$message(`获取数据 ${name} = ${content}`); });
}, this.$message(`获取数据 ${name} = ${content}`);
delItem(params = {}) { },
const { name, type } = params; delItem(params = {}) {
removeStore({ name, type }); const {name, type} = params;
this.$message(`删除数据 ${name}`); removeStore({name, type});
}, this.$message(`删除数据 ${name}`);
clearAll(params = {}) { },
clearStore(params); clearAll(params = {}) {
this.$message(`清除全部数据完成`); clearStore(params);
}, this.$message(`清除全部数据完成`);
getAll(params = {}) { },
const list = getAllStore(params); getAll(params = {}) {
console.log(list); const list = getAllStore(params);
this.$message(`结果已经打印到控制台`); console.log(list);
this.$message(`结果已经打印到控制台`);
}
} }
} };
};
</script> </script>
<style lang="scss"> <style lang="scss">
.title { .title {
margin-bottom: 10px; margin-bottom: 10px;
} }
.box {
margin-bottom: 20px; .box {
} margin-bottom: 20px;
}
</style> </style>

View File

@ -8,121 +8,121 @@
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
page: { page: {
total: 122 total: 122
},
data: [
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
}, },
data: [
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
},
{
username: "smallwei",
name: "avue",
password: "123456",
newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
}
],
option: {
column: [
{ {
label: "用户名", username: "smallwei",
prop: "username", name: "avue",
span: 14, password: "123456",
row: true newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
}, },
{ {
label: "姓名", username: "smallwei",
prop: "name", name: "avue",
span: 14, password: "123456",
row: true newpassword: "123456",
date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
}, },
{ {
label: "密码", username: "smallwei",
prop: "password", name: "avue",
type: "password", password: "123456",
span: 14, newpassword: "123456",
row: true date: "2019-01-01",
textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
}, },
{ {
label: "确认密码", username: "smallwei",
prop: "newpassword", name: "avue",
type: "password", password: "123456",
hide: true, newpassword: "123456",
span: 14, date: "2019-01-01",
row: true textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
}, },
{ {
label: "申请日期", username: "smallwei",
prop: "date", name: "avue",
type: "date", password: "123456",
span: 14, newpassword: "123456",
row: true date: "2019-01-01",
}, textarea: "这是一条很长很长很长很长很长很长很长很长的个性签名"
{
label: "个性签名",
prop: "textarea",
type: "textarea",
minRows: 8,
span: 24,
overHidden: true,
row: true
} }
] ],
} option: {
}; column: [
} {
}; label: "用户名",
prop: "username",
span: 14,
row: true
},
{
label: "姓名",
prop: "name",
span: 14,
row: true
},
{
label: "密码",
prop: "password",
type: "password",
span: 14,
row: true
},
{
label: "确认密码",
prop: "newpassword",
type: "password",
hide: true,
span: 14,
row: true
},
{
label: "申请日期",
prop: "date",
type: "date",
span: 14,
row: true
},
{
label: "个性签名",
prop: "textarea",
type: "textarea",
minRows: 8,
span: 24,
overHidden: true,
row: true
}
]
}
};
}
};
</script> </script>
<style> <style>

View File

@ -3,22 +3,25 @@
<h3>标签</h3> <h3>标签</h3>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="$router.push('/test/index')">打开一个页面</el-button> @click="$router.push('/test/index')">打开一个页面
</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="$router.$avueRouter.closeTag('/test/index')">关闭打开的页面</el-button> @click="$router.$avueRouter.closeTag('/test/index')">关闭打开的页面
</el-button>
<el-button type="primary" <el-button type="primary"
size="small" size="small"
@click="$router.$avueRouter.closeTag()">关闭本标签</el-button> @click="$router.$avueRouter.closeTag()">关闭本标签
</el-button>
</basic-container> </basic-container>
</template> </template>
<script> <script>
export default { export default {
methods: {} methods: {}
}; };
</script> </script>
<style> <style>
</style> </style>

View File

@ -5,15 +5,16 @@
</template> </template>
<script> <script>
export default { export default {
name: "wel", name: "wel",
data() { data() {
return {}; return {};
}, },
computed: {}, computed: {},
created() {}, created() {
methods: {} },
}; methods: {}
};
</script> </script>
<style scoped="scoped" lang="scss"> <style scoped="scoped" lang="scss">

View File

@ -69,280 +69,294 @@
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import {mapGetters} from "vuex";
export default {
name: "wel", export default {
data() { name: "wel",
return { data() {
data: [
{
rw: "这是一条工作任务",
nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
sj: "2019-01-01"
},
{
rw: "这是一条工作任务",
nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
sj: "2019-01-01"
},
{
rw: "这是一条工作任务",
nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
sj: "2019-01-01"
},
{
rw: "这是一条工作任务",
nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
sj: "2019-01-01"
}
]
};
},
computed: {
...mapGetters(["userInfo"]),
option1() {
return { return {
span: 6,
data: [ data: [
{ {
title: this.$t("wel.data4.column1"), rw: "这是一条工作任务",
count: 12332, nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
icon: "el-icon-warning", sj: "2019-01-01"
color: "rgb(49, 180, 141)",
href: "https://avue.top",
target: "_blank"
}, },
{ {
title: this.$t("wel.data4.column2"), rw: "这是一条工作任务",
count: 33, nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
icon: "el-icon-view", sj: "2019-01-01"
color: "rgb(56, 161, 242)",
href: "https://avue.top",
target: "_blank"
}, },
{ {
title: this.$t("wel.data4.column3"), rw: "这是一条工作任务",
count: 2223, nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
icon: "el-icon-setting", sj: "2019-01-01"
color: "rgb(117, 56, 199)",
href: "https://avue.top",
target: "_blank"
}, },
{ {
title: this.$t("wel.data4.column4"), rw: "这是一条工作任务",
count: 2223, nr: "这是一条很长很长很长很长很长很长很长很长很长的工作内容",
icon: "el-icon-setting", sj: "2019-01-01"
color: "rgb(230, 71, 88)",
href: "https://avue.top",
target: "_blank"
} }
] ]
}; };
}, },
option3() { computed: {
return { ...mapGetters(["userInfo"]),
span: 8, option1() {
data: [ return {
{ span: 6,
title: this.$t("wel.data3.column1"), data: [
color: "rgb(178, 159, 255)", {
count: 32, title: this.$t("wel.data4.column1"),
href: "https://avue.top", count: 12332,
target: "_blank" icon: "el-icon-warning",
}, color: "rgb(49, 180, 141)",
{ href: "https://avue.top",
title: this.$t("wel.data3.column2"), target: "_blank"
color: "rgb(230, 71, 88)", },
count: 32, {
href: "https://avue.top", title: this.$t("wel.data4.column2"),
target: "_blank" count: 33,
}, icon: "el-icon-view",
{ color: "rgb(56, 161, 242)",
title: this.$t("wel.data3.column3"), href: "https://avue.top",
color: "rgb(230, 71, 88)", target: "_blank"
count: 32, },
href: "https://avue.top", {
target: "_blank" title: this.$t("wel.data4.column3"),
} count: 2223,
] icon: "el-icon-setting",
}; color: "rgb(117, 56, 199)",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data4.column4"),
count: 2223,
icon: "el-icon-setting",
color: "rgb(230, 71, 88)",
href: "https://avue.top",
target: "_blank"
}
]
};
},
option3() {
return {
span: 8,
data: [
{
title: this.$t("wel.data3.column1"),
color: "rgb(178, 159, 255)",
count: 32,
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data3.column2"),
color: "rgb(230, 71, 88)",
count: 32,
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data3.column3"),
color: "rgb(230, 71, 88)",
count: 32,
href: "https://avue.top",
target: "_blank"
}
]
};
},
option2() {
return {
span: 12,
data: [
{
title: this.$t("wel.data2.column1"),
count: 12678,
icon: "el-icon-tickets",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data2.column2"),
count: 22139,
icon: "el-icon-success",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data2.column3"),
count: 35623,
icon: "el-icon-info",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data2.column4"),
count: 16826,
icon: "el-icon-message",
href: "https://avue.top",
target: "_blank"
}
]
};
},
option() {
return {
span: 8,
data: [
{
title: this.$t("wel.data.column1"),
subtitle: this.$t("wel.data.subtitle"),
count: 7993,
allcount: 10222,
text: this.$t("wel.data.text1"),
color: "rgb(27, 201, 142)",
key: this.$t("wel.data.key1")
},
{
title: this.$t("wel.data.column2"),
subtitle: this.$t("wel.data.subtitle"),
count: 3112,
allcount: 10222,
text: this.$t("wel.data.text2"),
color: "rgb(230, 71, 88)",
key: this.$t("wel.data.key2")
},
{
title: this.$t("wel.data.column3"),
subtitle: this.$t("wel.data.subtitle"),
count: 908,
allcount: 10222,
text: this.$t("wel.data.text3"),
color: "rgb(56, 161, 242)",
key: this.$t("wel.data.key3")
}
]
};
},
option4() {
return {
index: true,
column: [
{
label: this.$t("wel.table.rw"),
prop: "rw"
},
{
width: 500,
label: this.$t("wel.table.nr"),
prop: "nr",
overHidden: true
},
{
label: this.$t("wel.table.sj"),
prop: "sj"
}
]
};
}
}, },
option2() { created() {
return {
span: 12,
data: [
{
title: this.$t("wel.data2.column1"),
count: 12678,
icon: "el-icon-tickets",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data2.column2"),
count: 22139,
icon: "el-icon-success",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data2.column3"),
count: 35623,
icon: "el-icon-info",
href: "https://avue.top",
target: "_blank"
},
{
title: this.$t("wel.data2.column4"),
count: 16826,
icon: "el-icon-message",
href: "https://avue.top",
target: "_blank"
}
]
};
}, },
option() { methods: {}
return { };
span: 8,
data: [
{
title: this.$t("wel.data.column1"),
subtitle: this.$t("wel.data.subtitle"),
count: 7993,
allcount: 10222,
text: this.$t("wel.data.text1"),
color: "rgb(27, 201, 142)",
key: this.$t("wel.data.key1")
},
{
title: this.$t("wel.data.column2"),
subtitle: this.$t("wel.data.subtitle"),
count: 3112,
allcount: 10222,
text: this.$t("wel.data.text2"),
color: "rgb(230, 71, 88)",
key: this.$t("wel.data.key2")
},
{
title: this.$t("wel.data.column3"),
subtitle: this.$t("wel.data.subtitle"),
count: 908,
allcount: 10222,
text: this.$t("wel.data.text3"),
color: "rgb(56, 161, 242)",
key: this.$t("wel.data.key3")
}
]
};
},
option4() {
return {
index: true,
column: [
{
label: this.$t("wel.table.rw"),
prop: "rw"
},
{
width: 500,
label: this.$t("wel.table.nr"),
prop: "nr",
overHidden: true
},
{
label: this.$t("wel.table.sj"),
prop: "sj"
}
]
};
}
},
created() {},
methods: {}
};
</script> </script>
<style scoped="scoped" lang="scss"> <style scoped="scoped" lang="scss">
.wel { .wel {
&__header { &__header {
padding: 25px 40px; padding: 25px 40px;
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
&__info {
display: flex; &__info {
align-items: center; display: flex;
&-img { align-items: center;
border-radius: 72px;
display: block; &-img {
width: 72px; border-radius: 72px;
height: 72px;
img {
width: 100%;
height: 100%;
display: block; display: block;
} width: 72px;
} height: 72px;
&-content {
position: relative; img {
margin-left: 24px; width: 100%;
color: rgba(0, 0, 0, 0.45); height: 100%;
line-height: 22px; display: block;
}
&-title {
font-size: 20px;
line-height: 28px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
margin-bottom: 12px;
}
&-subtitle {
position: relative;
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 22px;
}
}
&__extra {
&-item {
position: relative;
padding: 0 32px;
display: inline-block;
&:last-child {
&::after {
display: none;
} }
} }
&:after {
background-color: #e8e8e8; &-content {
position: absolute; position: relative;
top: 30px; margin-left: 24px;
right: 0; color: rgba(0, 0, 0, 0.45);
width: 1px; line-height: 22px;
height: 40px; }
content: "";
&-title {
font-size: 20px;
line-height: 28px;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
margin-bottom: 12px;
}
&-subtitle {
position: relative;
font-size: 14px;
color: rgba(0, 0, 0, 0.45);
line-height: 22px;
} }
} }
&-title {
color: rgba(0, 0, 0, 0.45); &__extra {
font-size: 14px; &-item {
line-height: 22px; position: relative;
margin-bottom: 4px; padding: 0 32px;
} display: inline-block;
&-subtitle {
color: rgba(0, 0, 0, 0.85); &:last-child {
font-size: 30px; &::after {
line-height: 38px; display: none;
margin: 0; }
span { }
&:after {
background-color: #e8e8e8;
position: absolute;
top: 30px;
right: 0;
width: 1px;
height: 40px;
content: "";
}
}
&-title {
color: rgba(0, 0, 0, 0.45); color: rgba(0, 0, 0, 0.45);
font-size: 20px; font-size: 14px;
line-height: 22px;
margin-bottom: 4px;
}
&-subtitle {
color: rgba(0, 0, 0, 0.85);
font-size: 30px;
line-height: 38px;
margin: 0;
span {
color: rgba(0, 0, 0, 0.45);
font-size: 20px;
}
} }
} }
} }
}
</style> </style>