Merge remote-tracking branch 'origin/v2.x' into to_merge
commit
645b2ab37b
|
@ -364,3 +364,6 @@ REGISTER_PLUGINS = (
|
||||||
# 初始化需要执行的列表,用来初始化后执行
|
# 初始化需要执行的列表,用来初始化后执行
|
||||||
INITIALIZE_LIST = []
|
INITIALIZE_LIST = []
|
||||||
INITIALIZE_RESET_LIST = []
|
INITIALIZE_RESET_LIST = []
|
||||||
|
# 表前缀
|
||||||
|
TABLE_PREFIX = getattr(locals(), "TABLE_PREFIX", "dvadmin_")
|
||||||
|
DEFAULT_PASSWORD = getattr(locals(), "DEFAULT_PASSWORD", "admin123456")
|
||||||
|
|
|
@ -24,7 +24,7 @@ DATABASE_USER = "root"
|
||||||
DATABASE_PASSWORD = "123456"
|
DATABASE_PASSWORD = "123456"
|
||||||
|
|
||||||
# 表前缀
|
# 表前缀
|
||||||
TABLE_PREFIX = "sys_"
|
TABLE_PREFIX = "dvadmin_"
|
||||||
# ================================================= #
|
# ================================================= #
|
||||||
# ******** redis配置,无redis 可不进行配置 ******** #
|
# ******** redis配置,无redis 可不进行配置 ******** #
|
||||||
# ================================================= #
|
# ================================================= #
|
||||||
|
@ -37,8 +37,8 @@ TABLE_PREFIX = "sys_"
|
||||||
DEBUG = False
|
DEBUG = False
|
||||||
# 启动登录详细概略获取(通过调用api获取ip详细地址。如果是内网,关闭即可)
|
# 启动登录详细概略获取(通过调用api获取ip详细地址。如果是内网,关闭即可)
|
||||||
ENABLE_LOGIN_ANALYSIS_LOG = True
|
ENABLE_LOGIN_ANALYSIS_LOG = True
|
||||||
# 是否启用登录验证码,不需要可以设置为False
|
# 是否启用登录验证码,不需要可以设置为False,线上环境建议开启
|
||||||
CAPTCHA_STATE = False
|
CAPTCHA_STATE = True
|
||||||
# 登录接口 /api/token/ 是否需要验证码认证,用于测试,正式环境建议取消
|
# 登录接口 /api/token/ 是否需要验证码认证,用于测试,正式环境建议取消
|
||||||
LOGIN_NO_CAPTCHA_AUTH = True
|
LOGIN_NO_CAPTCHA_AUTH = True
|
||||||
# ================================================= #
|
# ================================================= #
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
DVAdmin-web:
|
dvadmin-web:
|
||||||
container_name: DVAdmin-web
|
container_name: dvadmin-web
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
build:
|
build:
|
||||||
|
@ -15,20 +15,20 @@ services:
|
||||||
- "8080"
|
- "8080"
|
||||||
networks:
|
networks:
|
||||||
network:
|
network:
|
||||||
ipv4_address: 177.7.0.11
|
ipv4_address: 177.8.0.11
|
||||||
|
|
||||||
DVAdmin-django:
|
dvadmin-django:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./docker_env/django/Dockerfile
|
dockerfile: ./docker_env/django/Dockerfile
|
||||||
container_name: DVAdmin-django
|
container_name: dvadmin-django
|
||||||
working_dir: /backend
|
working_dir: /backend
|
||||||
# 打开mysql 时,打开此选项
|
# 打开mysql 时,打开此选项
|
||||||
# depends_on:
|
# depends_on:
|
||||||
# - DVAdmin-mysql
|
# - dvadmin-mysql
|
||||||
environment:
|
environment:
|
||||||
PYTHONUNBUFFERED: 1
|
PYTHONUNBUFFERED: 1
|
||||||
DATABASE_HOST: DVAdmin-mysql
|
DATABASE_HOST: dvadmin-mysql
|
||||||
TZ: Asia/Shanghai
|
TZ: Asia/Shanghai
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend:/backend
|
- ./backend:/backend
|
||||||
|
@ -40,11 +40,11 @@ services:
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
network:
|
network:
|
||||||
ipv4_address: 177.7.0.12
|
ipv4_address: 177.8.0.12
|
||||||
|
|
||||||
# DVAdmin-mysql:
|
# dvadmin-mysql:
|
||||||
# image: mysql:5.7
|
# image: mysql:5.7
|
||||||
# container_name: DVAdmin-mysql
|
# container_name: dvadmin-mysql
|
||||||
# #使用该参数,container内的root拥有真正的root权限,否则,container内的root只是外部的一个普通用户权限
|
# #使用该参数,container内的root拥有真正的root权限,否则,container内的root只是外部的一个普通用户权限
|
||||||
# #设置为true,不然数据卷可能挂载不了,启动不起
|
# #设置为true,不然数据卷可能挂载不了,启动不起
|
||||||
## privileged: true
|
## privileged: true
|
||||||
|
@ -66,22 +66,22 @@ services:
|
||||||
# - "./docker_env/mysql/logs:/logs"
|
# - "./docker_env/mysql/logs:/logs"
|
||||||
# networks:
|
# networks:
|
||||||
# network:
|
# network:
|
||||||
# ipv4_address: 177.7.0.13
|
# ipv4_address: 177.8.0.13
|
||||||
|
|
||||||
|
|
||||||
# 如果使用celery 插件,请自行打开此注释
|
# 如果使用celery 插件,请自行打开此注释
|
||||||
# DVAdmin-celery:
|
# dvadmin-celery:
|
||||||
# build:
|
# build:
|
||||||
# context: .
|
# context: .
|
||||||
# dockerfile: ./docker_env/celery/Dockerfile
|
# dockerfile: ./docker_env/celery/Dockerfile
|
||||||
# # image: django:2.2
|
# # image: django:2.2
|
||||||
# container_name: DVAdmin-celery
|
# container_name: dvadmin-celery
|
||||||
# working_dir: /backend
|
# working_dir: /backend
|
||||||
# depends_on:
|
# depends_on:
|
||||||
# - DVAdmin-mysql
|
# - dvadmin-mysql
|
||||||
# environment:
|
# environment:
|
||||||
# PYTHONUNBUFFERED: 1
|
# PYTHONUNBUFFERED: 1
|
||||||
# DATABASE_HOST: DVAdmin-mysql
|
# DATABASE_HOST: dvadmin-mysql
|
||||||
# TZ: Asia/Shanghai
|
# TZ: Asia/Shanghai
|
||||||
# volumes:
|
# volumes:
|
||||||
# - ./backend:/backend
|
# - ./backend:/backend
|
||||||
|
@ -89,12 +89,12 @@ services:
|
||||||
# restart: always
|
# restart: always
|
||||||
# networks:
|
# networks:
|
||||||
# network:
|
# network:
|
||||||
# ipv4_address: 177.7.0.14
|
# ipv4_address: 177.8.0.14
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
network:
|
network:
|
||||||
ipam:
|
ipam:
|
||||||
driver: default
|
driver: default
|
||||||
config:
|
config:
|
||||||
- subnet: '177.7.0.0/16'
|
- subnet: '177.8.0.0/16'
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
Binary file not shown.
After Width: | Height: | Size: 225 KiB |
Binary file not shown.
After Width: | Height: | Size: 927 KiB |
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
Binary file not shown.
After Width: | Height: | Size: 100 KiB |
|
@ -14,7 +14,7 @@ export default {
|
||||||
if (value instanceof Array) {
|
if (value instanceof Array) {
|
||||||
row[col.key] = value.toString()
|
row[col.key] = value.toString()
|
||||||
} else {
|
} else {
|
||||||
row[col.key] = value[0]
|
row[col.key] = value
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
row[col.key] = null
|
row[col.key] = null
|
||||||
|
@ -24,7 +24,7 @@ export default {
|
||||||
// 接收时,处理数据
|
// 接收时,处理数据
|
||||||
valueBuilder (row, col) {
|
valueBuilder (row, col) {
|
||||||
const value = row[col.key]
|
const value = row[col.key]
|
||||||
if (value != null) {
|
if (value != null && value) {
|
||||||
row[col.key] = value.split(',')
|
row[col.key] = value.split(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
||||||
if (value instanceof Array) {
|
if (value instanceof Array) {
|
||||||
row[col.key] = value.toString()
|
row[col.key] = value.toString()
|
||||||
} else {
|
} else {
|
||||||
row[col.key] = value[0]
|
row[col.key] = value
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
row[col.key] = null
|
row[col.key] = null
|
||||||
|
@ -54,7 +54,7 @@ export default {
|
||||||
// 接收时,处理数据
|
// 接收时,处理数据
|
||||||
valueBuilder (row, col) {
|
valueBuilder (row, col) {
|
||||||
const value = row[col.key]
|
const value = row[col.key]
|
||||||
if (value != null) {
|
if (value != null && value) {
|
||||||
row[col.key] = value.split(',')
|
row[col.key] = value.split(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@ export default {
|
||||||
if (value instanceof Array) {
|
if (value instanceof Array) {
|
||||||
row[col.key] = value.toString()
|
row[col.key] = value.toString()
|
||||||
} else {
|
} else {
|
||||||
row[col.key] = value[0]
|
row[col.key] = value
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
row[col.key] = null
|
row[col.key] = null
|
||||||
|
@ -80,7 +80,7 @@ export default {
|
||||||
// 接收时,处理数据
|
// 接收时,处理数据
|
||||||
valueBuilder (row, col) {
|
valueBuilder (row, col) {
|
||||||
const value = row[col.key]
|
const value = row[col.key]
|
||||||
if (value != null) {
|
if (value != null && value) {
|
||||||
row[col.key] = value.split(',')
|
row[col.key] = value.split(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -92,10 +92,25 @@ export default {
|
||||||
view: {
|
view: {
|
||||||
component: { props: { height: 100, width: 100 } }
|
component: { props: { height: 100, width: 100 } }
|
||||||
},
|
},
|
||||||
|
// 提交时,处理数据
|
||||||
|
valueResolve (row, col) {
|
||||||
|
const value = row[col.key]
|
||||||
|
if (value != null) {
|
||||||
|
if (value.length >= 0) {
|
||||||
|
if (value instanceof Array) {
|
||||||
|
row[col.key] = value.toString()
|
||||||
|
} else {
|
||||||
|
row[col.key] = value
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
row[col.key] = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 接收时,处理数据
|
// 接收时,处理数据
|
||||||
valueBuilder (row, col) {
|
valueBuilder (row, col) {
|
||||||
const value = row[col.key]
|
const value = row[col.key]
|
||||||
if (value != null) {
|
if (value != null && value) {
|
||||||
row[col.key] = value.split(',')
|
row[col.key] = value.split(',')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ export const crudOptions = (vm) => {
|
||||||
rowKey: true // 必须设置,true or false
|
rowKey: true // 必须设置,true or false
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
width: 320,
|
width: 230,
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
view: {
|
view: {
|
||||||
thin: true,
|
thin: true,
|
||||||
|
@ -211,7 +211,7 @@ export const crudOptions = (vm) => {
|
||||||
}, {
|
}, {
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
key: 'email',
|
key: 'email',
|
||||||
minWidth: 160,
|
minWidth: 180,
|
||||||
form: {
|
form: {
|
||||||
rules: [
|
rules: [
|
||||||
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
|
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
|
||||||
|
|
Loading…
Reference in New Issue