opt:优化前端
This commit is contained in:
@@ -130,8 +130,8 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|||||||
public List<String> getPermissionList(JSONObject userDto) {
|
public List<String> getPermissionList(JSONObject userDto) {
|
||||||
List<String> permission = new LinkedList<>();
|
List<String> permission = new LinkedList<>();
|
||||||
// 查看是否为管理员
|
// 查看是否为管理员
|
||||||
String username = userDto.getString("username");
|
Boolean is_admin = userDto.getBoolean("is_admin");
|
||||||
if("admin".equals(username)){
|
if(is_admin){
|
||||||
permission.add("admin");
|
permission.add("admin");
|
||||||
}
|
}
|
||||||
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id")));
|
permission.addAll(sysMenuMapper.getPermissionByUserId(userDto.getString("user_id")));
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
for (var k = 0; k < this.depts.length; k++) {
|
for (var k = 0; k < this.depts.length; k++) {
|
||||||
for (var i = 0; i < this.crud.data.length; i++) {
|
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)
|
this.$refs.table.toggleRowSelection(this.crud.data[i], true)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,6 @@ export default {
|
|||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
this.$emit('selectDepts', this.rows)
|
this.$emit('selectDepts', this.rows)
|
||||||
// console.log(this.rows)
|
|
||||||
},
|
},
|
||||||
getDeptDatas(tree, treeNode, resolve) {
|
getDeptDatas(tree, treeNode, resolve) {
|
||||||
const params = { pid: tree.deptId }
|
const params = { pid: tree.deptId }
|
||||||
|
|||||||
@@ -118,10 +118,9 @@ export default {
|
|||||||
},
|
},
|
||||||
open() {
|
open() {
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
console.log(this.crud.data)
|
|
||||||
for (var k = 0; k < this.users.length; k++) {
|
for (var k = 0; k < this.users.length; k++) {
|
||||||
for (var i = 0; i < this.crud.data.length; i++) {
|
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)
|
this.$refs.table.toggleRowSelection(this.crud.data[i], true)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@
|
|||||||
<template slot-scope="scope">
|
<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-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-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-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item icon="el-icon-refresh-right"><span @click="resetPassword(scope.row)">重置密码</span></el-dropdown-item>
|
<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() {
|
this.$nextTick(function() {
|
||||||
for (let j = 0; j < row.roles.length; j++) {
|
for (let j = 0; j < row.roles.length; j++) {
|
||||||
for (let i = 0; i < this.rolesDatas.length; i++) {
|
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)
|
this.$refs.roleTable.toggleRowSelection(this.rolesDatas[i], true)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -680,11 +680,9 @@ export default {
|
|||||||
this.multipleSelection = []
|
this.multipleSelection = []
|
||||||
// 获取权限范围
|
// 获取权限范围
|
||||||
crudDataPermission.getDataScopeType().then(res => {
|
crudDataPermission.getDataScopeType().then(res => {
|
||||||
console.log('权限范围', res)
|
|
||||||
this.dataDialog.dataScopeType = res
|
this.dataDialog.dataScopeType = res
|
||||||
// permissions
|
// permissions
|
||||||
crudDataPermission.getDataPermissionOption().then(res => {
|
crudDataPermission.getDataPermissionOption().then(res => {
|
||||||
console.log('数据权限', res)
|
|
||||||
this.permissions = res
|
this.permissions = res
|
||||||
this.dataDialog.person_name = row.person_name
|
this.dataDialog.person_name = row.person_name
|
||||||
this.dataDialog.username = row.username
|
this.dataDialog.username = row.username
|
||||||
@@ -693,7 +691,6 @@ export default {
|
|||||||
this.dataPerm = true
|
this.dataPerm = true
|
||||||
// 回显数据
|
// 回显数据
|
||||||
crudDataPermission.getDataShow(row.user_id).then(res => {
|
crudDataPermission.getDataShow(row.user_id).then(res => {
|
||||||
console.log('要回显的数据', res)
|
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
for (var index = 0; index < res.length; index++) {
|
for (var index = 0; index < res.length; index++) {
|
||||||
for (var i = 0; i < this.dataDialog.dataScopeType.length; i++) {
|
for (var i = 0; i < this.dataDialog.dataScopeType.length; i++) {
|
||||||
@@ -841,7 +838,6 @@ export default {
|
|||||||
},
|
},
|
||||||
checkChange(data, checked, indeterminate) {
|
checkChange(data, checked, indeterminate) {
|
||||||
const _this = this
|
const _this = this
|
||||||
// console.log(data, checked, indeterminate);
|
|
||||||
// 选中全部子节点,父节点也默认选中,但是子节点再次取消勾选或者全部子节点取消勾选也不会影响父节点勾选状态
|
// 选中全部子节点,父节点也默认选中,但是子节点再次取消勾选或者全部子节点取消勾选也不会影响父节点勾选状态
|
||||||
const checkNode = _this.$refs.deptUser.getNode(data)// 获取当前节点
|
const checkNode = _this.$refs.deptUser.getNode(data)// 获取当前节点
|
||||||
// 勾选部分子节点,父节点变为半选状态
|
// 勾选部分子节点,父节点变为半选状态
|
||||||
|
|||||||
@@ -176,17 +176,6 @@
|
|||||||
禁用
|
禁用
|
||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</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-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;">
|
<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"
|
style="display: inline"
|
||||||
:data="scope.row"
|
:data="scope.row"
|
||||||
:permission="permission"
|
:permission="permission"
|
||||||
:disabled-dle="true"
|
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)"
|
v-if="showQtyButton(scope.row.vehicle_qty,scope.row.region_code)"
|
||||||
@@ -427,7 +415,11 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
permission: {},
|
permission: {
|
||||||
|
add: ['admin', 'point:add'],
|
||||||
|
edit: ['admin', 'point:edit'],
|
||||||
|
del: ['admin', 'point:del']
|
||||||
|
},
|
||||||
rules: {
|
rules: {
|
||||||
point_code: [
|
point_code: [
|
||||||
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
{ required: true, message: '点位编码不能为空', trigger: 'blur' }
|
||||||
@@ -451,8 +443,7 @@ export default {
|
|||||||
pointStatusList: [],
|
pointStatusList: [],
|
||||||
pointStatusDialogList: [],
|
pointStatusDialogList: [],
|
||||||
pointTypesDialogList: [],
|
pointTypesDialogList: [],
|
||||||
pointDialog: false,
|
pointDialog: false
|
||||||
dialogVisible: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -584,9 +575,6 @@ export default {
|
|||||||
this.$message.error('提交失败,废包材位有货')
|
this.$message.error('提交失败,废包材位有货')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
showConfirmationDialog() {
|
|
||||||
this.dialogVisible = true
|
|
||||||
},
|
|
||||||
mysubmit() {
|
mysubmit() {
|
||||||
// 弹出输入回温时间和回温模式的对话框
|
// 弹出输入回温时间和回温模式的对话框
|
||||||
this.$confirm('当前货位信息发生变更,请确认货位信息与实际一致', '提示', {
|
this.$confirm('当前货位信息发生变更,请确认货位信息与实际一致', '提示', {
|
||||||
@@ -602,19 +590,6 @@ export default {
|
|||||||
message: '已取消删除'
|
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