Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # web/src/components/selector-table/selector-table.vuepull/107/head
commit
84a2a781cc
|
@ -4,6 +4,7 @@ from django.conf import settings
|
||||||
from django.db import connection
|
from django.db import connection
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from dvadmin.utils.validator import CustomValidationError
|
from dvadmin.utils.validator import CustomValidationError
|
||||||
|
from django.db.models import Q
|
||||||
|
|
||||||
dispatch_db_type = getattr(settings, 'DISPATCH_DB_TYPE', 'memory') # redis
|
dispatch_db_type = getattr(settings, 'DISPATCH_DB_TYPE', 'memory') # redis
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ def _get_all_system_config():
|
||||||
from dvadmin.system.models import SystemConfig
|
from dvadmin.system.models import SystemConfig
|
||||||
|
|
||||||
system_config_obj = (
|
system_config_obj = (
|
||||||
SystemConfig.objects.filter(parent_id__isnull=False)
|
SystemConfig.objects.filter(~Q(parent_id__form_item_type=11), parent_id__isnull=False)
|
||||||
.values("parent__key", "key", "value", "form_item_type")
|
.values("parent__key", "key", "value", "form_item_type")
|
||||||
.order_by("sort")
|
.order_by("sort")
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,6 +6,6 @@ VUE_APP_TITLE=企业级后台管理系统
|
||||||
VUE_APP_PM_ENABLED = true
|
VUE_APP_PM_ENABLED = true
|
||||||
# 后端接口地址及端口(域名)
|
# 后端接口地址及端口(域名)
|
||||||
VUE_APP_API = "http://127.0.0.1:8000"
|
VUE_APP_API = "http://127.0.0.1:8000"
|
||||||
VUE_APP_VERSION = '2.0.4'
|
VUE_APP_VERSION = '2.1.5'
|
||||||
# 文件存储引擎
|
# 文件存储引擎
|
||||||
VUE_APP_FILE_ENGINE = 'local' # oss、cos、local
|
VUE_APP_FILE_ENGINE = 'local' # oss、cos、local
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "django-vue-admin",
|
"name": "django-vue-admin",
|
||||||
"version": "2.1.4",
|
"version": "2.1.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve --open",
|
"serve": "vue-cli-service serve --open",
|
||||||
"start": "npm run serve",
|
"start": "npm run serve",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<el-button size="small" type="success" icon="el-icon-upload" @click="handleImport">
|
<el-button size="small" type="success" icon="el-icon-upload" @click="handleImport">
|
||||||
<slot>导入</slot>
|
<slot>导入</slot>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body destroy-on-close>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
|
@ -25,8 +25,11 @@
|
||||||
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
<div slot="tip" class="el-upload__tip" style="color:red">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="importTemplate">下载导入模板</el-button>
|
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="importTemplate">下载导入模板
|
||||||
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="updateTemplate">批量更新模板</el-button>
|
</el-button>
|
||||||
|
<el-button type="warning" style="font-size:14px;margin-top: 20px" @click="updateTemplate" v-if="showUpdate">
|
||||||
|
批量更新模板
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
|
@ -75,6 +78,12 @@ export default {
|
||||||
default () {
|
default () {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
showUpdate: {
|
||||||
|
type: Boolean,
|
||||||
|
default () {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -131,6 +140,8 @@ export default {
|
||||||
that.refreshView()
|
that.refreshView()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}).finally(() => {
|
||||||
|
that.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 提交上传文件
|
// 提交上传文件
|
||||||
|
|
|
@ -440,11 +440,11 @@ export default {
|
||||||
this.selected.length === 0
|
this.selected.length === 0
|
||||||
? sizeInMap + 'px'
|
? sizeInMap + 'px'
|
||||||
: Math.max(
|
: Math.max(
|
||||||
tags
|
tags
|
||||||
? tags.clientHeight + (tags.clientHeight > sizeInMap ? 6 : 0)
|
? tags.clientHeight + (tags.clientHeight > sizeInMap ? 6 : 0)
|
||||||
: 0,
|
: 0,
|
||||||
sizeInMap
|
sizeInMap
|
||||||
) + 'px'
|
) + 'px'
|
||||||
input.style.height = height
|
input.style.height = height
|
||||||
if (this.visible && this.emptyText !== false) {
|
if (this.visible && this.emptyText !== false) {
|
||||||
this.broadcast('ElSelectDropdown', 'updatePopper')
|
this.broadcast('ElSelectDropdown', 'updatePopper')
|
||||||
|
|
|
@ -9,6 +9,9 @@
|
||||||
<span>
|
<span>
|
||||||
当前租户:{{info.tenant_name}}
|
当前租户:{{info.tenant_name}}
|
||||||
</span>
|
</span>
|
||||||
|
<span style="color: #E6A23C;" v-if="info.tenant_id && info.tenant_id !== 100000" @click="clientInfo">
|
||||||
|
切换套餐
|
||||||
|
</span>
|
||||||
<span class="btn-text">{{
|
<span class="btn-text">{{
|
||||||
info.name ? `你好 ${info.name}` : "未登录"
|
info.name ? `你好 ${info.name}` : "未登录"
|
||||||
}}</span>
|
}}</span>
|
||||||
|
@ -20,7 +23,7 @@
|
||||||
<el-dropdown-item @click.native="userInfo">
|
<el-dropdown-item @click.native="userInfo">
|
||||||
<d2-icon name="cog" class="d2-mr-5" />个人信息
|
<d2-icon name="cog" class="d2-mr-5" />个人信息
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click.native="clientInfo" v-if="info.tenant_id === 100000">
|
<el-dropdown-item @click.native="clientInfo" v-if="info.tenant_id && info.tenant_id !== 100000">
|
||||||
<d2-icon name="cog" class="d2-mr-5" />租户信息
|
<d2-icon name="cog" class="d2-mr-5" />租户信息
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click.native="logOff" divided>
|
<el-dropdown-item @click.native="logOff" divided>
|
||||||
|
|
|
@ -86,10 +86,27 @@ router.beforeEach(async (to, from, next) => {
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
const childrenPath = window.qiankunActiveRule || []
|
const childrenPath = window.qiankunActiveRule || []
|
||||||
|
// 判断,是否是租户模式
|
||||||
|
if (to.path !== '/clientRenew' && store.state.d2admin.user.info.tenant_id) {
|
||||||
|
// 如果租户到期,跳转到续费页面
|
||||||
|
if (store.state.d2admin.user.info.tenant_expire) {
|
||||||
|
next({ path: '/clientRenew' })
|
||||||
|
// 取消当前导航
|
||||||
|
NProgress.done()
|
||||||
|
return
|
||||||
|
// 如果是普通租户,如果没有试用套餐,且是试用阶段
|
||||||
|
} else if (store.state.d2admin.user.info.tenant_id !== 100000 && !store.state.d2admin.user.info.package_manage && store.state.d2admin.user.info.tenant_experience) {
|
||||||
|
next({ path: '/clientRenew' })
|
||||||
|
// 取消当前导航
|
||||||
|
NProgress.done()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
if (to.name) {
|
if (to.name) {
|
||||||
if (to.meta.openInNewWindow && (from.query.newWindow && to.query.newWindow !== '1' || from.path === '/')) {
|
if (to.meta.openInNewWindow && ((from.query.newWindow && to.query.newWindow !== '1') || from.path === '/')) {
|
||||||
to.query.newWindow = '1'
|
to.query.newWindow = '1'
|
||||||
}
|
}
|
||||||
|
|
||||||
// 有 name 属性,说明是主应用的路由
|
// 有 name 属性,说明是主应用的路由
|
||||||
if (to.meta.openInNewWindow && !to.query.newWindow && !from.query.newWindow && from.path !== '/') {
|
if (to.meta.openInNewWindow && !to.query.newWindow && !from.query.newWindow && from.path !== '/') {
|
||||||
// 在新窗口中打开路由
|
// 在新窗口中打开路由
|
||||||
|
@ -101,6 +118,8 @@ router.beforeEach(async (to, from, next) => {
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
next(false)
|
next(false)
|
||||||
} else {
|
} else {
|
||||||
|
// 取消当前导航
|
||||||
|
NProgress.done()
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
} else if (childrenPath.some((item) => to.path.includes(item))) {
|
} else if (childrenPath.some((item) => to.path.includes(item))) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
* @param {Object} context
|
* @param {Object} context
|
||||||
* @param {Object} payload confirm {Boolean} 是否需要确认
|
* @param {Object} payload confirm {Boolean} 是否需要确认
|
||||||
*/
|
*/
|
||||||
logout ({ commit, dispatch }, { confirm = false } = {}) {
|
logout ({ commit, dispatch }, { confirm = false, refresh = true } = {}) {
|
||||||
/**
|
/**
|
||||||
* @description 注销
|
* @description 注销
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +87,9 @@ export default {
|
||||||
|
|
||||||
// 跳转路由
|
// 跳转路由
|
||||||
router.push({ name: 'login' })
|
router.push({ name: 'login' })
|
||||||
router.go(0)
|
if (refresh) {
|
||||||
|
router.go(0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 判断是否需要确认
|
// 判断是否需要确认
|
||||||
if (confirm) {
|
if (confirm) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async getVer () {
|
async getVer () {
|
||||||
this.ver = `v${process.env.VUE_APP_VERSION}` || 'v2.1.1'
|
this.ver = `v${process.env.VUE_APP_VERSION}` || 'v2.1.5'
|
||||||
this.title = this.siteName || process.env.VUE_APP_TITLE
|
this.title = this.siteName || process.env.VUE_APP_TITLE
|
||||||
},
|
},
|
||||||
// 生成一个颜色
|
// 生成一个颜色
|
||||||
|
|
Loading…
Reference in New Issue