opt:优化前端
This commit is contained in:
@@ -130,8 +130,8 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||
public List<String> getPermissionList(JSONObject userDto) {
|
||||
List<String> permission = new LinkedList<>();
|
||||
// 查看是否为管理员
|
||||
String username = userDto.getString("username");
|
||||
if("admin".equals(username)){
|
||||
Boolean is_admin = userDto.getBoolean("is_admin");
|
||||
if(is_admin){
|
||||
permission.add("admin");
|
||||
}
|
||||
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id")));
|
||||
|
||||
@@ -119,7 +119,7 @@ export default {
|
||||
this.$nextTick(function() {
|
||||
for (var k = 0; k < this.depts.length; k++) {
|
||||
for (var i = 0; i < this.crud.data.length; i++) {
|
||||
if (this.crud.data[i].deptId == this.depts[k].deptId) {
|
||||
if (this.crud.data[i].dept_id == this.depts[k]) {
|
||||
this.$refs.table.toggleRowSelection(this.crud.data[i], true)
|
||||
break
|
||||
}
|
||||
@@ -157,7 +157,6 @@ export default {
|
||||
this.crud.resetQuery(false)
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.$emit('selectDepts', this.rows)
|
||||
// console.log(this.rows)
|
||||
},
|
||||
getDeptDatas(tree, treeNode, resolve) {
|
||||
const params = { pid: tree.deptId }
|
||||
|
||||
@@ -118,10 +118,9 @@ export default {
|
||||
},
|
||||
open() {
|
||||
this.$nextTick(function() {
|
||||
console.log(this.crud.data)
|
||||
for (var k = 0; k < this.users.length; k++) {
|
||||
for (var i = 0; i < this.crud.data.length; i++) {
|
||||
if (this.crud.data[i].userId == this.users[k].userId) {
|
||||
if (this.crud.data[i].user_id == this.users[k].user_id) {
|
||||
this.$refs.table.toggleRowSelection(this.crud.data[i], true)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="crud.toEdit(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handdeleted(scope.row)">删除</el-button>
|
||||
<el-dropdown v-hasPermi="['system:user:resetPwd', 'system:user:edit']" size="mini">
|
||||
<el-dropdown size="mini">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-refresh-right"><span @click="resetPassword(scope.row)">重置密码</span></el-dropdown-item>
|
||||
@@ -661,7 +661,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
|
||||
}
|
||||
@@ -680,11 +680,9 @@ export default {
|
||||
this.multipleSelection = []
|
||||
// 获取权限范围
|
||||
crudDataPermission.getDataScopeType().then(res => {
|
||||
console.log('权限范围', res)
|
||||
this.dataDialog.dataScopeType = res
|
||||
// permissions
|
||||
crudDataPermission.getDataPermissionOption().then(res => {
|
||||
console.log('数据权限', res)
|
||||
this.permissions = res
|
||||
this.dataDialog.person_name = row.person_name
|
||||
this.dataDialog.username = row.username
|
||||
@@ -693,7 +691,6 @@ export default {
|
||||
this.dataPerm = true
|
||||
// 回显数据
|
||||
crudDataPermission.getDataShow(row.user_id).then(res => {
|
||||
console.log('要回显的数据', res)
|
||||
this.$nextTick(function() {
|
||||
for (var index = 0; index < res.length; index++) {
|
||||
for (var i = 0; i < this.dataDialog.dataScopeType.length; i++) {
|
||||
@@ -841,7 +838,6 @@ export default {
|
||||
},
|
||||
checkChange(data, checked, indeterminate) {
|
||||
const _this = this
|
||||
// console.log(data, checked, indeterminate);
|
||||
// 选中全部子节点,父节点也默认选中,但是子节点再次取消勾选或者全部子节点取消勾选也不会影响父节点勾选状态
|
||||
const checkNode = _this.$refs.deptUser.getNode(data)// 获取当前节点
|
||||
// 勾选部分子节点,父节点变为半选状态
|
||||
|
||||
@@ -176,17 +176,6 @@
|
||||
禁用
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<el-dialog
|
||||
title="确认"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
>
|
||||
<span>您确定要移库吗?</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="confirmMove">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="540px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;">
|
||||
@@ -335,7 +324,6 @@
|
||||
style="display: inline"
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-dle="true"
|
||||
/>
|
||||
<el-button
|
||||
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)"
|
||||
@@ -427,7 +415,11 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
permission: {
|
||||
add: ['admin', 'point:add'],
|
||||
edit: ['admin', 'point:edit'],
|
||||
del: ['admin', 'point:del']
|
||||
},
|
||||
rules: {
|
||||
point_code: [
|
||||
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||
@@ -451,8 +443,7 @@ export default {
|
||||
pointStatusList: [],
|
||||
pointStatusDialogList: [],
|
||||
pointTypesDialogList: [],
|
||||
pointDialog: false,
|
||||
dialogVisible: false
|
||||
pointDialog: false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -584,9 +575,6 @@ export default {
|
||||
this.$message.error('提交失败,废包材位有货')
|
||||
})
|
||||
},
|
||||
showConfirmationDialog() {
|
||||
this.dialogVisible = true
|
||||
},
|
||||
mysubmit() {
|
||||
// 弹出输入回温时间和回温模式的对话框
|
||||
this.$confirm('当前货位信息发生变更,请确认货位信息与实际一致', '提示', {
|
||||
@@ -602,19 +590,6 @@ export default {
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
confirmMove() {
|
||||
this.$axios.post('/api/schBaseTask/move', { })
|
||||
.then(response => {
|
||||
console.log(response.data)
|
||||
})
|
||||
.catch(error => {
|
||||
// Handle error response
|
||||
console.error(error)
|
||||
})
|
||||
.finally(() => {
|
||||
this.dialogVisible = false // Close the dialog
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user