rev:基础功能维护修改
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="dict_sort">
|
||||
<el-input-number
|
||||
v-model.number="form.dictSort"
|
||||
v-model.number="form.dict_sort"
|
||||
:min="0"
|
||||
:max="999"
|
||||
controls-position="right"
|
||||
@@ -74,7 +74,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="label" label="字典标签" align="center" width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="value" label="字典值" align="center" width="60" />
|
||||
<el-table-column prop="dictSort" label="排序" align="center" width="65" />
|
||||
<el-table-column prop="dict_sort" label="排序" align="center" width="65" />
|
||||
<el-table-column prop="para1" label="参数1" align="center" width="65" />
|
||||
<el-table-column prop="para2" label="参数2" align="center" width="65" />
|
||||
<el-table-column prop="para3" label="参数3" align="center" width="65" />
|
||||
@@ -106,7 +106,7 @@ import pagination from '@crud/Pagination'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
|
||||
const defaultForm = { dictId: null, name: null, label: null, value: null, dictSort: null, dictType: null, para1: null, para2: null, para3: null, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
const defaultForm = { dict_id: null, name: null, label: null, value: null, dictSort: null, dictType: null, para1: null, para2: null, para3: null, createId: null, createName: null, createTime: null, updateId: null, updateName: null, updateTime: null }
|
||||
|
||||
export default {
|
||||
components: { pagination, rrOperation, udOperation },
|
||||
@@ -116,8 +116,8 @@ export default {
|
||||
title: '字典详情',
|
||||
url: 'api/dict/dictDetail',
|
||||
query: { code: '' },
|
||||
idField: 'dictId',
|
||||
sort: ['dictSort,asc', 'dictId,desc'],
|
||||
idField: 'dict_id',
|
||||
sort: ['dict_sort,asc', 'dict_id,desc'],
|
||||
crudMethod: { ...crudDictDetail },
|
||||
optShow: {
|
||||
add: true,
|
||||
@@ -133,11 +133,11 @@ export default {
|
||||
presenter(),
|
||||
header(),
|
||||
form(function() {
|
||||
return Object.assign({ dict: { dictId: this.dictId }}, defaultForm)
|
||||
return Object.assign({ dict: { dict_id: this.dict_id }}, defaultForm)
|
||||
})],
|
||||
data() {
|
||||
return {
|
||||
dictId: null,
|
||||
dict_id: null,
|
||||
rules: {
|
||||
label: [
|
||||
{ required: true, message: '请输入字典标签', trigger: 'blur' }
|
||||
|
||||
@@ -122,9 +122,9 @@
|
||||
<!--:disabled="level !== 1 && item.level <= level"-->
|
||||
<el-option
|
||||
v-for="item in roles"
|
||||
:key="item.roleId"
|
||||
:key="item.role_id"
|
||||
:label="item.name"
|
||||
:value="item.roleId"
|
||||
:value="item.role_id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -214,7 +214,7 @@
|
||||
:data="deptsDatas"
|
||||
:default-checked-keys="depChecked"
|
||||
:props="deptProps"
|
||||
node-key="dept_ud"
|
||||
node-key="dept_id"
|
||||
highlight-current
|
||||
check-strictly
|
||||
@check="handCheck"
|
||||
@@ -348,7 +348,7 @@ export default {
|
||||
name: 'User',
|
||||
components: { RelevanceDeptDialog, RelevanceUserDialog, Treeselect, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '用户', idField: 'userId', url: 'api/users', crudMethod: { ...crudUser }})
|
||||
return CRUD({ title: '用户', idField: 'user_id', url: 'api/users', crudMethod: { ...crudUser }})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
// 数据字典
|
||||
@@ -445,6 +445,7 @@ export default {
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
debugger
|
||||
this.crud.delAllLoading = true
|
||||
this.crud.doDelete(datas)
|
||||
}).catch(() => {
|
||||
@@ -453,10 +454,10 @@ export default {
|
||||
// 新增与编辑前做的操作
|
||||
[CRUD.HOOK.afterToCU](crud, form) {
|
||||
this.getRoles()
|
||||
if (form.dept_ud == null) {
|
||||
if (form.dept_id == null) {
|
||||
crudDept.getDepts()
|
||||
} else {
|
||||
this.getSupDepts(form.dept_ud)
|
||||
this.getSupDepts(form.dept_id)
|
||||
}
|
||||
// this.getRoleLevel() 暂时不用
|
||||
form.is_used = form.enabled.toString()
|
||||
@@ -541,8 +542,8 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
getSupDepts(dept_ud) {
|
||||
crudDept.getDeptSuperior(dept_ud).then(res => {
|
||||
getSupDepts(dept_id) {
|
||||
crudDept.getDeptSuperior(dept_id).then(res => {
|
||||
console.log('父部门', res)
|
||||
const date = res.content
|
||||
this.buildDepts(date)
|
||||
@@ -575,17 +576,18 @@ export default {
|
||||
},
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.dept_ud,
|
||||
id: node.dept_id,
|
||||
label: node.name,
|
||||
children: node.children
|
||||
}
|
||||
},
|
||||
// 切换部门
|
||||
handleNodeClick(data) {
|
||||
this.query.dept_ud = data.dept_ud
|
||||
debugger
|
||||
this.query.dept_id = data.dept_id
|
||||
this.query.needAll = true
|
||||
this.crud.toQuery()
|
||||
this.query.dept_ud = null
|
||||
this.query.dept_id = null
|
||||
},
|
||||
// 改变状态
|
||||
changeEnabled(row) {
|
||||
@@ -660,7 +662,7 @@ export default {
|
||||
this.$nextTick(function() {
|
||||
for (let j = 0; j < row.roles.length; j++) {
|
||||
for (let i = 0; i < this.rolesDatas.length; i++) {
|
||||
if (this.rolesDatas[i].roleId == row.roles[j].roleId) {
|
||||
if (this.rolesDatas[i].role_id === row.roles[j].role_id) {
|
||||
this.$refs.roleTable.toggleRowSelection(this.rolesDatas[i], true)
|
||||
break
|
||||
}
|
||||
@@ -686,11 +688,11 @@ export default {
|
||||
this.permissions = res
|
||||
this.dataDialog.person_name = row.person_name
|
||||
this.dataDialog.username = row.username
|
||||
this.dataDialog.userId = row.userId
|
||||
this.dataDialog.user_id = row.user_id
|
||||
this.dataPermissionTitle = '[' + row.person_name + '] 数据权限'
|
||||
this.dataPerm = true
|
||||
// 回显数据
|
||||
crudDataPermission.getDataShow(row.userId).then(res => {
|
||||
crudDataPermission.getDataShow(row.user_id).then(res => {
|
||||
this.$nextTick(function() {
|
||||
for (var index = 0; index < res.length; index++) {
|
||||
for (var i = 0; i < this.dataDialog.dataScopeType.length; i++) {
|
||||
@@ -733,7 +735,7 @@ export default {
|
||||
this.relevanceDept = true
|
||||
} else if (row.permissionId == '1605128919449735168') { // 自身
|
||||
const param = {
|
||||
userId: this.dataDialog.userId
|
||||
user_id: this.dataDialog.user_id
|
||||
}
|
||||
this.dataDialog.dataScopeType[index].users = []
|
||||
this.dataDialog.dataScopeType[index].users.push(param)
|
||||
@@ -767,7 +769,7 @@ export default {
|
||||
},
|
||||
savePermise() {
|
||||
const param = {
|
||||
userId: this.dataDialog.userId,
|
||||
user_id: this.dataDialog.user_id,
|
||||
datas: this.multipleSelection
|
||||
}
|
||||
console.log('param', param)
|
||||
@@ -783,7 +785,7 @@ export default {
|
||||
this.depChecked = []
|
||||
},
|
||||
giveValue(row) {
|
||||
this.depCheckedId = row.userId
|
||||
this.depCheckedId = row.user_id
|
||||
},
|
||||
clearCheck() { // 清空选中
|
||||
if (this.flag) this.$refs.deptUser.setCheckedKeys([])
|
||||
@@ -801,12 +803,12 @@ export default {
|
||||
},
|
||||
saveChecked() {
|
||||
const user = {
|
||||
userId: this.depCheckedId
|
||||
user_id: this.depCheckedId
|
||||
}
|
||||
if (this.flag) {
|
||||
user.deptIds = this.$refs.deptUser.getCheckedKeys()
|
||||
} else {
|
||||
user.rolesIds = this.crud.selections.map(item => (item.roleId))
|
||||
user.rolesIds = this.crud.selections.map(item => (item.role_id))
|
||||
}
|
||||
crudUser.edit(user).then(res => {
|
||||
this.cancelForm()
|
||||
@@ -860,7 +862,7 @@ export default {
|
||||
},
|
||||
showDatas(row) {
|
||||
const param = {
|
||||
userId: this.dataDialog.userId,
|
||||
user_id: this.dataDialog.user_id,
|
||||
permissionScopeType: row.value
|
||||
}
|
||||
crudDataPermission.getDataDetail(param).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user