This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cyber-narrator-cn-ui/src/views/settings/User.vue

87 lines
2.1 KiB
Vue
Raw Normal View History

2021-06-11 10:00:22 +08:00
<template>
<div>
<cn-data-list
ref="dataList"
v-model:custom-table-title="tools.customTableTitle"
:api="url"
:from="fromRoute.user"
2021-06-18 15:25:13 +08:00
:layout="['columnCustomize','elementSet']"
2021-06-11 10:00:22 +08:00
>
<template #top-tool-right>
<button
id="account-add"
v-has="'user_add'"
class="top-tool-btn margin-r-10"
type="button"
@click="add"
>
2021-06-18 15:25:13 +08:00
<i class="cn-icon-add cn-icon"/>
2021-06-11 10:00:22 +08:00
</button>
</template>
<template #default>
<user-table
ref="dataTable"
v-loading="tools.loading"
:api="url"
:custom-table-title="tools.customTableTitle"
:height="mainTableHeight"
:table-data="tableData"
@delete="del"
2021-06-11 10:00:22 +08:00
@edit="edit"
@orderBy="tableDataSort"
@reload="getTableData"
@selectionChange="selectionChange"
@showBottomBox="(targetTab, object) => { $refs.dataList.showBottomBox(targetTab, object) }"
/>
</template>
<template #pagination>
<pagination ref="pagination" :page-obj="pageObj" :table-id="tableId" @pageNo='pageNo' @pageSize='pageSize'></pagination>
2021-06-11 10:00:22 +08:00
</template>
</cn-data-list>
<transition name="right-box">
<user-box
v-if="rightBox.show"
:object="object"
@close="closeRightBox"
/>
</transition>
</div>
</template>
<script>
import cnDataList from '@/components/table/CnDataList'
import dataListMixin from '@/mixins/dataList'
import userTable from '@/components/table/settings/UserTable'
import userBox from '@/components/rightBox/settings/UserBox'
import { put } from '@/utils/http'
export default {
name: 'User',
mixins: [dataListMixin],
2021-06-11 10:00:22 +08:00
components: {
cnDataList,
userTable,
userBox
},
data () {
return {
url: 'sys/user',
blankObject: { // 空白对象
id: '',
name: '',
username: '',
email: '',
pin: '',
mobile: '',
status: 1,
2021-06-11 10:00:22 +08:00
roleIds: '',
pinChange: ''
},
tableId: 'userTable'
}
},
methods: {
2021-06-16 15:28:06 +08:00
2021-06-11 10:00:22 +08:00
}
}
</script>