Compare commits
2 Commits
df477c6988
...
5a4fa5a63d
Author | SHA1 | Date |
---|---|---|
|
5a4fa5a63d | |
|
cc227f0e34 |
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dialog v-if="visible" :visible.sync="visible" v-dialogDrag width="540px" :close-on-click-modal="false"
|
<el-dialog v-if="visible" :visible.sync="visible" v-dialogDrag width="540px" :close-on-click-modal="false"
|
||||||
:close-on-press-escape="false" append-to-body :title="$t('system:userlist:roleList:title')"
|
:close-on-press-escape="false" append-to-body :title="$t('system:userlist:button:groups')"
|
||||||
:before-close="cancel">
|
:before-close="cancel">
|
||||||
<el-button size="mini" type="primary" @click.stop="openAdd" style="float: right">
|
<el-button size="mini" type="primary" @click.stop="openAdd" style="float: right">
|
||||||
{{ $t('common:button:new') }}
|
{{ $t('common:button:new') }}
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
<template slot="genderSlot" slot-scope="{ scope }">
|
<template slot="genderSlot" slot-scope="{ scope }">
|
||||||
{{ scope.row.Sex ? 'Male' : 'Female' }}
|
{{ scope.row.Sex ? 'Male' : 'Female' }}
|
||||||
</template>
|
</template>
|
||||||
|
<template slot="HospitalGroupListSlot" slot-scope="{ scope }">
|
||||||
|
{{
|
||||||
|
Array.isArray(scope.row.HospitalGroupList) &&
|
||||||
|
scope.row.HospitalGroupList.length > 0
|
||||||
|
? scope.row.HospitalGroupList.map((item) => item.Name).join(', ')
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
<template slot="UserTypeSlot" slot-scope="{ scope }">
|
<template slot="UserTypeSlot" slot-scope="{ scope }">
|
||||||
{{
|
{{
|
||||||
Array.isArray(scope.row.UserRoleList) &&
|
Array.isArray(scope.row.UserRoleList) &&
|
||||||
|
@ -59,7 +67,7 @@
|
||||||
</box-content>
|
</box-content>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getUserList, getUserTypeList, deleteSysUser } from "@/api/admin";
|
import { getUserList, getUserTypeList, deleteSysUser, getHospitalGroupList } from "@/api/admin";
|
||||||
// import { searchForm, searchHandle, columns } from './list'
|
// import { searchForm, searchHandle, columns } from './list'
|
||||||
import BoxContent from "@/components/BoxContent";
|
import BoxContent from "@/components/BoxContent";
|
||||||
import SearchForm from "@/components/BaseForm/search-form";
|
import SearchForm from "@/components/BaseForm/search-form";
|
||||||
|
@ -146,6 +154,14 @@ export default {
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'HospitalGroupId',
|
||||||
|
label: this.$t('system:userlist:table:HospitalGroupList'),
|
||||||
|
minWidth: 100,
|
||||||
|
slot: 'HospitalGroupListSlot',
|
||||||
|
// sortable: 'custom',
|
||||||
|
showOverflowTooltip: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'UserType',
|
prop: 'UserType',
|
||||||
label: this.$t('system:userlist:table:UserType'),
|
label: this.$t('system:userlist:table:UserType'),
|
||||||
|
@ -163,15 +179,15 @@ export default {
|
||||||
sortable: 'custom',
|
sortable: 'custom',
|
||||||
showOverflowTooltip: true,
|
showOverflowTooltip: true,
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
prop: 'IsTestUser',
|
// prop: 'IsTestUser',
|
||||||
label: this.$t('system:userlist:table:IsTestUser'),
|
// label: this.$t('system:userlist:table:IsTestUser'),
|
||||||
hidden: true,
|
// hidden: true,
|
||||||
slot: 'isTestUserSlot',
|
// slot: 'isTestUserSlot',
|
||||||
minWidth: 120,
|
// minWidth: 120,
|
||||||
sortable: 'custom',
|
// sortable: 'custom',
|
||||||
showOverflowTooltip: true,
|
// showOverflowTooltip: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'Status',
|
prop: 'Status',
|
||||||
label: this.$t('system:userlist:table:Status'),
|
label: this.$t('system:userlist:table:Status'),
|
||||||
|
@ -280,25 +296,25 @@ export default {
|
||||||
change: (scope) => '',
|
change: (scope) => '',
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
type: 'Select',
|
// type: 'Select',
|
||||||
label: this.$t('system:userlist:label:IsTestUser'),
|
// label: this.$t('system:userlist:label:IsTestUser'),
|
||||||
prop: 'IsTestUser',
|
// prop: 'IsTestUser',
|
||||||
width: '100px',
|
// width: '100px',
|
||||||
options: [
|
// options: [
|
||||||
{
|
// {
|
||||||
label: this.$t('system:userlist:label:IsTestUser:Yes'),
|
// label: this.$t('system:userlist:label:IsTestUser:Yes'),
|
||||||
value: true,
|
// value: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: this.$t('system:userlist:label:IsTestUser:No'),
|
// label: this.$t('system:userlist:label:IsTestUser:No'),
|
||||||
value: false,
|
// value: false,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
props: { label: 'label', value: 'value' },
|
// props: { label: 'label', value: 'value' },
|
||||||
change: (scope) => '',
|
// change: (scope) => '',
|
||||||
placeholder: '',
|
// placeholder: '',
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
label: this.$t('system:userlist:label:Status'),
|
label: this.$t('system:userlist:label:Status'),
|
||||||
|
@ -315,6 +331,15 @@ export default {
|
||||||
change: (scope) => '',
|
change: (scope) => '',
|
||||||
placeholder: '',
|
placeholder: '',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'Select',
|
||||||
|
label: this.$t('system:userlist:label:HospitalGroupList'),
|
||||||
|
prop: 'HospitalGroupId',
|
||||||
|
width: '100px',
|
||||||
|
options: [], // 下拉选项
|
||||||
|
props: { label: 'Name', value: 'Id' }, // 下拉选项配置信息,必填
|
||||||
|
placeholder: '',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'Select',
|
type: 'Select',
|
||||||
label: this.$t('system:userlist:label:UserType'),
|
label: this.$t('system:userlist:label:UserType'),
|
||||||
|
@ -374,11 +399,24 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
|
this.getHospitalGroupList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
diffTime(time) {
|
diffTime(time) {
|
||||||
return moment(new Date()).diff(time, 'days')
|
return moment(new Date()).diff(time, 'days')
|
||||||
},
|
},
|
||||||
|
async getHospitalGroupList() {
|
||||||
|
try {
|
||||||
|
let res = await getHospitalGroupList({})
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
let hospitalGroupList = res.Result
|
||||||
|
const index = this.findItemIndex("HospitalGroupId");
|
||||||
|
this.$set(this.searchForm[index], "options", hospitalGroupList);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
Loading…
Reference in New Issue