Merge remote-tracking branch 'origin/v2.x' into v2.x
# Conflicts: # backend/dvadmin/system/views/user.pypull/71/MERGE
commit
7dd6065a29
|
@ -6,9 +6,11 @@
|
|||
@Remark: 部门管理
|
||||
"""
|
||||
from rest_framework import serializers
|
||||
from rest_framework.decorators import action
|
||||
|
||||
from dvadmin.system.models import Dept
|
||||
from dvadmin.utils.json_response import DetailResponse, SuccessResponse
|
||||
from dvadmin.utils.permission import AnonymousUserPermission
|
||||
from dvadmin.utils.serializers import CustomModelSerializer
|
||||
from dvadmin.utils.viewset import CustomModelViewSet
|
||||
|
||||
|
@ -18,18 +20,17 @@ class DeptSerializer(CustomModelSerializer):
|
|||
部门-序列化器
|
||||
"""
|
||||
parent_name = serializers.CharField(read_only=True, source='parent.name')
|
||||
has_children = serializers.SerializerMethodField()
|
||||
status_label = serializers.SerializerMethodField()
|
||||
has_children = serializers.SerializerMethodField()
|
||||
|
||||
def get_status_label(self, obj: Dept):
|
||||
if obj.status:
|
||||
return "启用"
|
||||
return "禁用"
|
||||
|
||||
def get_has_children(self, obj: Dept):
|
||||
return Dept.objects.filter(parent_id=obj.id).count()
|
||||
|
||||
def get_status_label(self, instance):
|
||||
status = instance.status
|
||||
if status:
|
||||
return "启用"
|
||||
return "禁用"
|
||||
|
||||
class Meta:
|
||||
model = Dept
|
||||
fields = '__all__'
|
||||
|
@ -59,7 +60,7 @@ class DeptInitSerializer(CustomModelSerializer):
|
|||
filter_data = {
|
||||
"name": menu_data['name'],
|
||||
"parent": menu_data['parent'],
|
||||
"key":menu_data['key']
|
||||
"key": menu_data['key']
|
||||
}
|
||||
instance_obj = Dept.objects.filter(**filter_data).first()
|
||||
if instance_obj and not self.initial_data.get('reset'):
|
||||
|
@ -73,7 +74,7 @@ class DeptInitSerializer(CustomModelSerializer):
|
|||
class Meta:
|
||||
model = Dept
|
||||
fields = ['name', 'sort', 'owner', 'phone', 'email', 'status', 'parent', 'creator', 'dept_belong_id',
|
||||
'children','key']
|
||||
'children', 'key']
|
||||
extra_kwargs = {
|
||||
'creator': {'write_only': True},
|
||||
'dept_belong_id': {'write_only': True}
|
||||
|
@ -123,7 +124,13 @@ class DeptViewSet(CustomModelViewSet):
|
|||
if lazy:
|
||||
# 如果懒加载模式,返回全部
|
||||
if not parent:
|
||||
if self.request.user.is_superuser:
|
||||
role_list = request.user.role.filter(status=1).values("admin", "data_range")
|
||||
is_admin = False
|
||||
for ele in role_list:
|
||||
if 3 == ele.get("data_range") or ele.get("admin") == True:
|
||||
is_admin = True
|
||||
break
|
||||
if self.request.user.is_superuser or is_admin:
|
||||
queryset = queryset.filter(parent__isnull=True)
|
||||
else:
|
||||
queryset = queryset.filter(id=self.request.user.dept_id)
|
||||
|
@ -147,3 +154,10 @@ class DeptViewSet(CustomModelViewSet):
|
|||
queryset = queryset.filter(id=self.request.user.dept_id)
|
||||
data = queryset.filter(status=True).order_by('sort').values('name', 'id', 'parent')
|
||||
return DetailResponse(data=data, msg="获取成功")
|
||||
|
||||
@action(methods=["GET"], detail=False, permission_classes=[AnonymousUserPermission])
|
||||
def all_dept(self, request, *args, **kwargs):
|
||||
self.extra_filter_backends = []
|
||||
queryset = self.filter_queryset(self.get_queryset())
|
||||
data = queryset.filter(status=True).order_by('sort').values('name', 'id', 'parent')
|
||||
return DetailResponse(data=data, msg="获取成功")
|
||||
|
|
|
@ -3,7 +3,7 @@ import hashlib
|
|||
from django.contrib.auth.hashers import make_password
|
||||
from django_restql.fields import DynamicSerializerMethodField
|
||||
from rest_framework import serializers
|
||||
from rest_framework.decorators import action
|
||||
from rest_framework.decorators import action, permission_classes
|
||||
from rest_framework.permissions import IsAuthenticated
|
||||
|
||||
from application import dispatch
|
||||
|
@ -281,12 +281,26 @@ class UserViewSet(CustomModelViewSet):
|
|||
"""获取当前用户信息"""
|
||||
user = request.user
|
||||
result = {
|
||||
"id": user.id,
|
||||
"name": user.name,
|
||||
"mobile": user.mobile,
|
||||
"user_type": user.user_type,
|
||||
"gender": user.gender,
|
||||
"email": user.email,
|
||||
"avatar": user.avatar,
|
||||
"dept": user.dept.id,
|
||||
"is_superuser": user.is_superuser,
|
||||
"role": user.role.values_list('id', flat=True),
|
||||
}
|
||||
dept = getattr(user, 'dept', None)
|
||||
if dept:
|
||||
result['dept_info'] = {
|
||||
'dept_id': dept.id,
|
||||
'dept_name': dept.name
|
||||
}
|
||||
role = getattr(user, 'role', None)
|
||||
if role:
|
||||
result['role_info'] = role.values('id', 'name', 'key')
|
||||
return DetailResponse(data=result, msg="获取成功")
|
||||
|
||||
@action(methods=["PUT"], detail=False, permission_classes=[IsAuthenticated])
|
||||
|
@ -303,7 +317,7 @@ class UserViewSet(CustomModelViewSet):
|
|||
old_pwd = data.get("oldPassword")
|
||||
new_pwd = data.get("newPassword")
|
||||
new_pwd2 = data.get("newPassword2")
|
||||
if old_pwd or new_pwd or new_pwd2:
|
||||
if old_pwd is None or new_pwd is None or new_pwd2 is None:
|
||||
return ErrorResponse(msg="参数不能为空")
|
||||
if new_pwd != new_pwd2:
|
||||
return ErrorResponse(msg="两次密码不匹配")
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
"lowdb": "^1.0.0",
|
||||
"nprogress": "^0.2.0",
|
||||
"qiankun": "^2.7.2",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"screenfull": "^5.0.2",
|
||||
"sortablejs": "^1.10.1",
|
||||
"ua-parser-js": "^0.7.20",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1666798594366" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2218" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M512 2C230.2 2 2 230.2 2 512s228.2 510 510 510 510-228.2 510-510S793.3 2 512 2z m235.9 442c-1 4.6-3.6 10.8-7.2 19.1l-0.5 0.5c-21.6 45.8-77.3 135.5-77.3 135.5l-0.5-0.5-16.5 28.3h78.8L574.3 826.8l34-136h-61.8l21.6-90.2c-17.5 4.1-38.1 9.8-62.3 18 0 0-33 19.1-94.8-37.1 0 0-41.7-37.1-17.5-45.8 10.3-4.1 50-8.8 81.4-12.9 42.2-5.7 68.5-8.8 68.5-8.8s-130.3 2.1-161.2-3.1c-30.9-4.6-70.1-56.7-78.3-102 0 0-12.9-24.7 27.8-12.9 40.2 11.8 209.2 45.8 209.2 45.8S321.4 375 307 358.5c-14.4-16.5-42.8-89.6-39.2-134.5 0 0 1.5-11.3 12.9-8.2 0 0 161.8 74.2 272.5 114.4C664.5 371.4 760.8 392 747.9 444z" fill="#ffffff" p-id="2219"></path></svg>
|
After Width: | Height: | Size: 957 B |
|
@ -0,0 +1,7 @@
|
|||
function install (Vue) {
|
||||
Vue.component('dept-format', () => import('./lib/dept-format'))
|
||||
}
|
||||
|
||||
export default {
|
||||
install
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<template>
|
||||
<div>
|
||||
{{$store.state.d2admin.dept.data[currentValue] || ''}}
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
// 行展示组件进阶版
|
||||
// 本示例演示要对传入的值做一些改变,然后再展示
|
||||
export default {
|
||||
name: 'dept-format',
|
||||
props: {
|
||||
// 接收row.xxx的值
|
||||
value: {
|
||||
type: Number || String,
|
||||
required: false
|
||||
},
|
||||
color: {
|
||||
require: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
currentValue: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
value (value) {
|
||||
// this.$emit('change', value)
|
||||
if (this.currentValue === value) {
|
||||
return
|
||||
}
|
||||
this.setValue(value)
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.setValue(this.value)
|
||||
},
|
||||
methods: {
|
||||
setValue (value) {
|
||||
// 在这里对 传入的value值做处理
|
||||
this.currentValue = String(this.value)
|
||||
// 根据值的key 递归获取对应的名称
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Footer
|
|
@ -9,3 +9,4 @@ Vue.component('d2-icon-svg', () => import('./d2-icon-svg/index.vue'))
|
|||
Vue.component('importExcel', () => import('./importExcel/index.vue'))
|
||||
Vue.component('foreignKey', () => import('./foreign-key/index.vue'))
|
||||
Vue.component('manyToMany', () => import('./many-to-many/index.vue'))
|
||||
Vue.component('dept-format', () => import('./dept-format/lib/dept-format.vue'))
|
||||
|
|
|
@ -16,7 +16,6 @@ import { request } from '@/api/service'
|
|||
import util from '@/libs/util'
|
||||
import XEUtils from 'xe-utils'
|
||||
import store from '@/store/index'
|
||||
import { urlPrefix as deptPrefix } from '@/views/system/dept/api'
|
||||
import types from '@/config/d2p-extends/types'
|
||||
import { checkPlugins, plugins } from '@/views/plugins'
|
||||
|
||||
|
@ -243,7 +242,8 @@ Vue.prototype.commonEndColumns = function (param = {}) {
|
|||
},
|
||||
dept_belong_id: {
|
||||
showForm: (param.dept_belong_id && param.dept_belong_id.showForm) !== undefined ? param.dept_belong_id.showForm : false,
|
||||
showTable: (param.dept_belong_id && param.dept_belong_id.showTable) !== undefined ? param.dept_belong_id.showTable : false
|
||||
showTable: (param.dept_belong_id && param.dept_belong_id.showTable) !== undefined ? param.dept_belong_id.showTable : false,
|
||||
showSearch: (param.dept_belong_id && param.dept_belong_id.showSearch) !== undefined ? param.dept_belong_id.showSearch : false
|
||||
},
|
||||
modifier_name: {
|
||||
showForm: (param.modifier_name && param.modifier_name.showForm) !== undefined ? param.modifier_name.showForm : false,
|
||||
|
@ -293,61 +293,41 @@ Vue.prototype.commonEndColumns = function (param = {}) {
|
|||
}
|
||||
},
|
||||
{
|
||||
title: '数据归属部门',
|
||||
title: '所属部门',
|
||||
key: 'dept_belong_id',
|
||||
show: showData.dept_belong_id.showTable,
|
||||
width: 150,
|
||||
search: {
|
||||
disabled: true
|
||||
disabled: !showData.dept_belong_id.showSearch
|
||||
},
|
||||
type: 'table-selector',
|
||||
type: 'tree-selector',
|
||||
dict: {
|
||||
cache: true,
|
||||
url: deptPrefix,
|
||||
isTree: true,
|
||||
cache: false,
|
||||
url: '/api/system/dept/all_dept/',
|
||||
// isTree: true,
|
||||
// dept: true,
|
||||
value: 'id', // 数据字典中value字段的属性名
|
||||
label: 'name', // 数据字典中label字段的属性名
|
||||
children: 'children', // 数据字典中children字段的属性名
|
||||
getData: (url, dict, {
|
||||
_,
|
||||
component
|
||||
}) => {
|
||||
return request({
|
||||
url: url,
|
||||
params: { limit: 999, status: 1 }
|
||||
}).then(ret => {
|
||||
return ret.data.data
|
||||
})
|
||||
}
|
||||
children: 'children' // 数据字典中children字段的属性名
|
||||
// getData: (url, dict, {
|
||||
// _,
|
||||
// component
|
||||
// }) => {
|
||||
// return request({
|
||||
// url: url
|
||||
// }).then(ret => {
|
||||
// return XEUtils.toArrayTree(ret.data, { parentKey: 'parent', strict: false })
|
||||
// })
|
||||
// }
|
||||
},
|
||||
component: {
|
||||
name: 'dept-format',
|
||||
props: { multiple: false, clearable: true }
|
||||
},
|
||||
form: {
|
||||
disabled: !showData.dept_belong_id.showForm,
|
||||
component: {
|
||||
props: {
|
||||
elProps: {
|
||||
treeConfig: {
|
||||
transform: true,
|
||||
rowField: 'id',
|
||||
parentField: 'parent',
|
||||
expandAll: true
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'name',
|
||||
title: '部门名称',
|
||||
treeNode: true
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '状态'
|
||||
},
|
||||
{
|
||||
field: 'parent_name',
|
||||
title: '父级部门'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
props: { multiple: false, clearable: true }
|
||||
},
|
||||
helper: {
|
||||
render (h) {
|
||||
|
@ -355,6 +335,12 @@ Vue.prototype.commonEndColumns = function (param = {}) {
|
|||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
// 接收时,处理数据
|
||||
valueBuilder (row, col) {
|
||||
if (row[col.key]) {
|
||||
row[col.key] = Number(row[col.key])
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1 +1,9 @@
|
|||
module.exports = file => () => import('@great-dream/' + file)
|
||||
module.exports = file => {
|
||||
var result
|
||||
try {
|
||||
result = require('@great-dream/' + file).default
|
||||
} catch (error) {
|
||||
result = require('@/views/plugins/' + file).default
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
|
|
@ -38,12 +38,24 @@ util.open = function (url) {
|
|||
*/
|
||||
util.baseURL = function () {
|
||||
var baseURL = process.env.VUE_APP_API
|
||||
if (window.pluginsAll && window.pluginsAll.indexOf('dvadmin-tenant-web') !== -1) {
|
||||
var param = baseURL.split('/')[3] || ''
|
||||
if (window.pluginsAll && window.pluginsAll.indexOf('dvadmin-tenant-web') !== -1 && (!param || baseURL.startsWith('/'))) {
|
||||
// 1.把127.0.0.1 替换成和前端一样域名
|
||||
// 2.把 ip 地址替换成和前端一样域名
|
||||
// 3.把 /api 或其他类似的替换成和前端一样域名
|
||||
// document.domain
|
||||
var host = baseURL.split('/')[2]
|
||||
var prot = host.split(':')[1] || 80
|
||||
host = document.domain + ':' + prot
|
||||
baseURL = baseURL.split('/')[0] + '//' + baseURL.split('/')[1] + host + '/' + (baseURL.split('/')[3] || '')
|
||||
if (host) {
|
||||
var prot = baseURL.split(':')[2] || 80
|
||||
if (prot === 80 || prot === 443) {
|
||||
host = document.domain
|
||||
} else {
|
||||
host = document.domain + ':' + prot
|
||||
}
|
||||
baseURL = baseURL.split('/')[0] + '//' + baseURL.split('/')[1] + host + '/' + param
|
||||
} else {
|
||||
baseURL = location.protocol + '//' + location.hostname + (location.port ? ':' : '') + location.port + baseURL
|
||||
}
|
||||
}
|
||||
if (!baseURL.endsWith('/')) {
|
||||
baseURL += '/'
|
||||
|
@ -79,4 +91,30 @@ util.randomString = function (e) {
|
|||
return n
|
||||
}
|
||||
|
||||
util.ArrayToTree = function (rootList, parentValue, parentName, list) {
|
||||
for (const item of rootList) {
|
||||
if (item.parent === parentValue) {
|
||||
if (parentName) {
|
||||
item.name = parentName + '/' + item.name
|
||||
}
|
||||
list.push(item)
|
||||
}
|
||||
}
|
||||
|
||||
for (const i of list) {
|
||||
// 如果子元素里面存在children就直接递归,不存在就生成一个children
|
||||
if (i.children) {
|
||||
util.ArrayToTree(rootList, i.id, i.name, i.children)
|
||||
} else {
|
||||
i.children = []
|
||||
util.ArrayToTree(rootList, i.id, i.name, i.children)
|
||||
}
|
||||
|
||||
if (i.children.length === 0) {
|
||||
delete i.children
|
||||
}
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
export default util
|
||||
|
|
|
@ -17,6 +17,7 @@ import util from '@/libs/util.js'
|
|||
// 路由数据
|
||||
import routes from './routes'
|
||||
import { getMenu, handleAsideMenu, handleRouter, checkRouter } from '@/menu'
|
||||
import { request } from '@/api/service'
|
||||
|
||||
// fix vue-router NavigationDuplicated
|
||||
const VueRouterPush = VueRouter.prototype.push
|
||||
|
@ -55,6 +56,24 @@ router.beforeEach(async (to, from, next) => {
|
|||
// 请根据自身业务需要修改
|
||||
const token = util.cookies.get('token')
|
||||
if (token && token !== 'undefined') {
|
||||
if (!store.state.d2admin.user.info.name) {
|
||||
var res = await request({
|
||||
url: '/api/system/user/user_info/',
|
||||
method: 'get',
|
||||
params: {}
|
||||
})
|
||||
await store.dispatch('d2admin/user/set', {
|
||||
name: res.data.name,
|
||||
user_id: res.data.id,
|
||||
avatar: res.data.avatar,
|
||||
role_info: res.data.role_info,
|
||||
dept_info: res.data.dept_info,
|
||||
is_superuser: res.data.is_superuser
|
||||
}, { root: true })
|
||||
await store.dispatch('d2admin/account/load')
|
||||
store.dispatch('d2admin/dept/load')
|
||||
store.dispatch('d2admin/settings/init')
|
||||
}
|
||||
if (!store.state.d2admin.menu || store.state.d2admin.menu.aside.length === 0) {
|
||||
// 动态添加路由
|
||||
getMenu().then(ret => {
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
import { request } from '@/api/service'
|
||||
import util from '@/libs/util'
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
// 用户信息
|
||||
data: undefined
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* @description 初始化部门数据
|
||||
* @param {Object} context
|
||||
* @param {*} info info
|
||||
*/
|
||||
async getDeptName ({ state, dispatch }, { data }) {
|
||||
const nameDict = {}
|
||||
for (const items of data) {
|
||||
if (items.children) {
|
||||
const filterData = await dispatch('getDeptName', { data: items.children })
|
||||
for (var key in filterData) {
|
||||
nameDict[key] = filterData[key]
|
||||
}
|
||||
}
|
||||
nameDict[items.id] = items.name
|
||||
}
|
||||
return nameDict
|
||||
},
|
||||
async load ({ state, dispatch }, info) {
|
||||
// 持久化
|
||||
const ret = await request({
|
||||
url: '/api/system/dept/all_dept/'
|
||||
})
|
||||
const data = util.ArrayToTree(ret.data.data || ret.data, null, null, [])
|
||||
state.data = await dispatch('getDeptName', { data: data })
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,12 +14,12 @@ export default {
|
|||
// store 赋值
|
||||
state.info = info
|
||||
// 持久化
|
||||
await dispatch('d2admin/db/set', {
|
||||
dbName: 'sys',
|
||||
path: 'user.info',
|
||||
value: info,
|
||||
user: true
|
||||
}, { root: true })
|
||||
// await dispatch('d2admin/db/set', {
|
||||
// dbName: 'sys',
|
||||
// path: 'user.info',
|
||||
// value: info,
|
||||
// user: true
|
||||
// }, { root: true })
|
||||
},
|
||||
/**
|
||||
* @description 从数据库取用户数据
|
||||
|
@ -27,12 +27,12 @@ export default {
|
|||
*/
|
||||
async load ({ state, dispatch }) {
|
||||
// store 赋值
|
||||
state.info = await dispatch('d2admin/db/get', {
|
||||
dbName: 'sys',
|
||||
path: 'user.info',
|
||||
defaultValue: {},
|
||||
user: true
|
||||
}, { root: true })
|
||||
// state.info = await dispatch('d2admin/db/get', {
|
||||
// dbName: 'sys',
|
||||
// path: 'user.info',
|
||||
// defaultValue: {},
|
||||
// user: true
|
||||
// }, { root: true })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,13 +49,17 @@ export default {
|
|||
},
|
||||
addRequest (row) {
|
||||
d2CrudPlus.util.dict.clear()
|
||||
this.$store.dispatch('d2admin/dept/load')
|
||||
return api.createObj(row)
|
||||
},
|
||||
updateRequest (row) {
|
||||
d2CrudPlus.util.dict.clear()
|
||||
this.$store.dispatch('d2admin/dept/load')
|
||||
return api.UpdateObj(row)
|
||||
},
|
||||
delRequest (row) {
|
||||
d2CrudPlus.util.dict.clear()
|
||||
this.$store.dispatch('d2admin/dept/load')
|
||||
return api.DelObj(row.id)
|
||||
},
|
||||
// 授权
|
||||
|
|
|
@ -121,7 +121,7 @@ img {
|
|||
|
||||
/*-- form styling --*/
|
||||
.w3l-form-info {
|
||||
padding-top: 6em;
|
||||
padding-top: 2em;
|
||||
}
|
||||
.w3l-signinform{
|
||||
padding: 40px 40px;
|
||||
|
@ -241,8 +241,10 @@ img {
|
|||
.w3_info {
|
||||
padding: 1em 1em;
|
||||
background: transparent;
|
||||
max-width: 450px;
|
||||
width: 450px;
|
||||
display: grid;
|
||||
position: fixed;
|
||||
right: 12vw;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
@ -317,7 +319,7 @@ h5 {
|
|||
color: #000;
|
||||
}
|
||||
.footer {
|
||||
padding-top: 3em;
|
||||
padding-top: 1em;
|
||||
}
|
||||
.footer p {
|
||||
text-align: center;
|
||||
|
|
|
@ -68,9 +68,10 @@
|
|||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<button class="btn btn-primary btn-block" @click="submit">
|
||||
<button class="btn btn-primary btn-block" style="padding: 10px 10px;" @click="submit">
|
||||
登录
|
||||
</button>
|
||||
<component v-if="componentTag" :is="componentTag"></component>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
|
@ -125,16 +126,25 @@
|
|||
</template>
|
||||
<script>
|
||||
import base from './base.vue'
|
||||
|
||||
const pluginImport = require('@/libs/util.import.plugin')
|
||||
export default {
|
||||
extends: base,
|
||||
name: 'page',
|
||||
data () {
|
||||
return {
|
||||
activeName: 'first'
|
||||
activeName: 'first',
|
||||
componentTag: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// 注册第三方登录插件
|
||||
var componentTag = ''
|
||||
try {
|
||||
componentTag = pluginImport('dvadmin-third-web/src/login/index')
|
||||
} catch (error) {
|
||||
componentTag = ''
|
||||
}
|
||||
this.componentTag = componentTag
|
||||
},
|
||||
mounted () {
|
||||
},
|
||||
|
|
|
@ -182,7 +182,7 @@ export const crudOptions = (vm) => {
|
|||
dict: {
|
||||
cache: false,
|
||||
isTree: true,
|
||||
url: deptPrefix,
|
||||
url: '/api/system/dept/all_dept/',
|
||||
value: 'id', // 数据字典中value字段的属性名
|
||||
label: 'name' // 数据字典中label字段的属性名
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue