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