This commit is contained in:
zhangzhiqiang
2022-12-16 18:06:55 +08:00
parent f1b69e8f90
commit 22ae7f3720
12 changed files with 113 additions and 20 deletions

View File

@@ -100,13 +100,11 @@
<el-radio label="">女</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="状态" prop="is_uesd">
<el-form-item label="状态" prop="isUesd">
<el-switch
v-model="form.isUsed"
active-color="#409EFF"
inactive-color="#F56C6C"
active-value="1"
inactive-value="0"
/>
</el-form-item>
<br v-if="!crud.status.edit">
@@ -156,7 +154,7 @@
<el-table-column prop="email" label="邮箱" :min-width="flexWidth('email',crud.data,'邮箱')" />
<el-table-column show-overflow-tooltip prop="depts" label="部门" >
<template slot-scope="scope">
<span>{{ scope.row.depts }}</span>
<span v-for=" item in scope.row.depts" :key="item.index">{{item.name}} </span>
</template>
</el-table-column>>
<el-table-column label="状态" align="center" prop="enabled">
@@ -345,7 +343,7 @@ const defaultForm = {
personName: null,
gender: '男',
email: null,
isUsed: '1',
isUsed: true,
roles: [],
phone: null,
password: null
@@ -441,7 +439,7 @@ export default {
})
},
caseStatusColorFilter(isUsed) {
if (isUsed === '1') {
if (isUsed === true) {
return '#378be2'
}
return '#F56C6C'
@@ -533,7 +531,7 @@ export default {
},
getDepts() {
console.log('获取部门')
crudDept.getDepts({ isUsed: 1 }).then(res => {
crudDept.getDepts({ isUsed: true }).then(res => {
console.log('获取的部门信息', res)
this.depts = res.content.map(function(obj) {
@@ -565,7 +563,7 @@ export default {
// 获取弹窗内部门数据
loadDepts({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
crudDept.getDeptvo({ isUsed: '1', pid: parentNode.dept_id }).then(res => {
crudDept.getDeptvo({ isUsed: true, pid: parentNode.dept_id }).then(res => {
parentNode.children = res.content.map(function(obj) {
obj.children = null
return obj