fix: 修复选择候选人员数据为空导致页面加载失败问题
parent
6361cef3ed
commit
bd47623b68
|
|
@ -25,7 +25,7 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="expressionList" @current-change="handleSingleExpSelect">
|
||||
<el-table v-loading="loading" :data="expressionList" row-key="id" @current-change="handleSingleExpSelect">
|
||||
<el-table-column width="55" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<!-- 可以手动的修改label的值,从而控制选择哪一项 -->
|
||||
|
|
@ -51,6 +51,7 @@
|
|||
|
||||
<script>
|
||||
import { listExpression } from "@/api/system/expression";
|
||||
import {StrUtil} from "@/utils/StrUtil";
|
||||
|
||||
export default {
|
||||
name: "Expression",
|
||||
|
|
@ -98,7 +99,9 @@ export default {
|
|||
watch: {
|
||||
selectValues: {
|
||||
handler(newVal) {
|
||||
this.radioSelected = newVal
|
||||
if (StrUtil.isNotBlank(newVal)) {
|
||||
this.radioSelected = newVal
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@
|
|||
<script>
|
||||
import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role";
|
||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu";
|
||||
import {StrUtil} from "@/utils/StrUtil";
|
||||
|
||||
export default {
|
||||
name: "FlowRole",
|
||||
|
|
@ -109,23 +110,25 @@ export default {
|
|||
// 表单参数
|
||||
form: {},
|
||||
radioSelected: null, // 单选框传值
|
||||
selectRoleList: null // 回显数据传值
|
||||
selectRoleList: [] // 回显数据传值
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
selectValues: {
|
||||
handler(newVal) {
|
||||
if (newVal instanceof Number || newVal instanceof String) {
|
||||
this.radioSelected = newVal
|
||||
} else {
|
||||
this.selectRoleList = newVal;
|
||||
if (StrUtil.isNotBlank(newVal)) {
|
||||
if (newVal instanceof Number || newVal instanceof String) {
|
||||
this.radioSelected = newVal
|
||||
} else {
|
||||
this.selectRoleList = newVal;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
roleList: {
|
||||
handler(newVal) {
|
||||
if (newVal && this.selectRoleList) {
|
||||
if (StrUtil.isNotBlank(newVal) && this.selectRoleList.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataTable.clearSelection();
|
||||
this.selectRoleList?.split(',').forEach(key => {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
import { listUser, deptTreeSelect } from "@/api/system/user";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {StrUtil} from "@/utils/StrUtil";
|
||||
|
||||
export default {
|
||||
name: "FlowUser",
|
||||
|
|
@ -125,7 +126,7 @@ export default {
|
|||
// 总条数
|
||||
total: 0,
|
||||
// 用户表格数据
|
||||
userList: null,
|
||||
userList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 部门树选项
|
||||
|
|
@ -160,7 +161,7 @@ export default {
|
|||
{ key: 6, label: `创建时间`, visible: true }
|
||||
],
|
||||
radioSelected: null, // 单选框传值
|
||||
selectUserList: null // 回显数据传值
|
||||
selectUserList: [] // 回显数据传值
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -170,17 +171,19 @@ export default {
|
|||
},
|
||||
selectValues: {
|
||||
handler(newVal) {
|
||||
if (newVal instanceof Number) {
|
||||
this.radioSelected = newVal
|
||||
} else {
|
||||
this.selectUserList = newVal;
|
||||
if (StrUtil.isNotBlank(newVal)) {
|
||||
if (newVal instanceof Number) {
|
||||
this.radioSelected = newVal
|
||||
} else {
|
||||
this.selectUserList = newVal;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
userList: {
|
||||
handler(newVal) {
|
||||
if (newVal && this.selectUserList) {
|
||||
if (StrUtil.isNotBlank(newVal) && this.selectUserList.length > 0) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataTable.clearSelection();
|
||||
this.selectUserList?.split(',').forEach(key => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue