Unverified 提交 b95b1870 authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw 提交者: GitHub

Merge pull request #1172 from dataease/pr@v1.4@fix_some_bug

fix: 前端用户列表控制台报错
......@@ -45,8 +45,13 @@ export default {
} else {
res = await window.SyncComponentCache[this.url]
}
const Fn = Function
this.mode = new Fn(`return ${res.data || res}`)()
/* if (res && res.data) {
const Fn = Function
this.mode = new Fn(`return ${res.data || res}`)()
} */
}
}
},
......
......@@ -127,7 +127,7 @@ export default {
/* pwd && (this.form.pwd = decrypt(pwd)) */
/* overTime && (this.form.overTime = overTime) */
overTime && (this.$set(this.form, 'overTime', overTime))
this.requestShort()
// this.requestShort()
})
},
......
<template>
<layout-content :header="formType=='add' ? $t('user.create') : $t('user.modify')" back-name="system-user">
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="auto" label-position="right">
<el-form ref="createUserForm" :model="form" :rules="rule" size="small" label-width="80px" label-position="right">
<el-form-item label="ID" prop="username">
<el-input v-model="form.username" :disabled="formType !== 'add'" />
</el-form-item>
......
<template>
<layout-content v-loading="$store.getters.loadingMap[$store.getters.currentPath]">
<complex-table
v-if="canLoadDom"
:data="data"
:columns="columns"
local-key="userGrid"
......@@ -174,7 +175,8 @@ import { PHONE_REGEX } from '@/utils/validate'
import { LOAD_CHILDREN_OPTIONS, LOAD_ROOT_OPTIONS } from '@riophae/vue-treeselect'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { ldapStatus, pluginLoaded } from '@/api/user'
import { pluginLoaded } from '@/api/user'
/* import { ldapStatus, pluginLoaded } from '@/api/user' */
import { userLists, addUser, editUser, delUser, editPassword, editStatus, allRoles } from '@/api/system/user'
import { getDeptTree, treeByDeptId } from '@/api/system/dept'
......@@ -214,11 +216,14 @@ export default {
{ label: this.$t('commons.disable'), value: '0' }
],
multiple: false
}
]
},
extraFilterComponents: [
{ field: 'd.name', label: this.$t('commons.organization'), component: 'DeComplexInput' },
{ field: 'r.name', label: this.$t('commons.role'), component: 'DeComplexInput' }
]
},
],
paginationConfig: {
currentPage: 1,
pageSize: 10,
......@@ -307,7 +312,8 @@ export default {
orderConditions: [],
last_condition: null,
openLdap: false,
isPluginLoaded: false
isPluginLoaded: false,
canLoadDom: false
}
},
mounted() {
......@@ -315,13 +321,17 @@ export default {
this.search()
},
beforeCreate() {
ldapStatus().then(res => {
this.openLdap = res.success && res.data
})
pluginLoaded().then(res => {
this.isPluginLoaded = res.success && res.data
if (this.isPluginLoaded) {
this.searchConfig.components.push(...this.extraFilterComponents)
}
this.canLoadDom = true
}).catch(e => {
this.canLoadDom = true
})
},
methods: {
sortChange({ column, prop, order }) {
this.orderConditions = []
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论