mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-07-05 01:58:15 +08:00
refactor: ♻️ 框架代码同步
This commit is contained in:
@ -121,7 +121,12 @@
|
||||
</div>
|
||||
<scContextmenu @command="contextMenuCommand" @visible-change="contextMenuVisibleChange" ref="contextmenu">
|
||||
<scContextmenuItem
|
||||
v-for="(menu, index) in contextMenus.filter((x) => x === current.column?.property)"
|
||||
v-for="(menu, index) in contextMenus.filter((x) => {
|
||||
if (current.column?.property === x) {
|
||||
return true
|
||||
}
|
||||
return this.contextMulti && !!this.contextMulti[current.column?.property]?.find((y) => y === x)
|
||||
})"
|
||||
:command="menu"
|
||||
:key="index"
|
||||
:title="`${menu}`">
|
||||
@ -214,6 +219,7 @@ export default {
|
||||
contextMenus: { type: Array },
|
||||
contextOpers: { type: Array, default: ['copy', 'add', 'view', 'edit', 'del'] },
|
||||
contextAdvs: { type: Array, default: [] },
|
||||
contextMulti: { type: Object },
|
||||
tableName: { type: String, default: '' },
|
||||
beforePost: {
|
||||
type: Function,
|
||||
|
@ -60,6 +60,7 @@
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
:context-menus="['id', 'userRegisterConfirm', 'userRegisterDept.name', 'userRegisterRole.name', 'enabled', 'createdTime']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:export-api="$API.sys_config.export"
|
||||
:params="query"
|
||||
:query-api="$API.sys_config.pagedQuery"
|
||||
|
@ -67,6 +67,7 @@
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
:context-menus="['id', 'name', 'sort', 'enabled', 'createdTime', 'summary']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'sort', order: 'descending' }"
|
||||
:export-api="$API.sys_dept.export"
|
||||
:params="query"
|
||||
|
@ -74,6 +74,7 @@
|
||||
<scTable
|
||||
:before-post="(data) => data.dynamicFilter.filters.length > 0"
|
||||
:context-menus="['key', 'value', 'enabled', 'createdTime', 'id', 'summary']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_dic.exportContent"
|
||||
:params="query"
|
||||
|
@ -85,6 +85,7 @@
|
||||
<scTable
|
||||
:before-post="(data) => data.dynamicFilter.filters.length > 0"
|
||||
:context-menus="['title', 'enabled', 'createdTime', 'id', 'visibility']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_doc.exportContent"
|
||||
:params="query"
|
||||
|
@ -125,6 +125,7 @@
|
||||
'createdTime',
|
||||
'lastDuration',
|
||||
]"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'lastExecTime', order: 'descending' }"
|
||||
:export-api="$API.sys_job.export"
|
||||
:page-size="100"
|
||||
|
@ -99,6 +99,7 @@
|
||||
}
|
||||
"
|
||||
:context-menus="['id', 'duration', 'httpMethod', 'requestUrl', 'httpStatusCode', 'createdTime', 'jobId', 'responseBody']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_job.exportRecord"
|
||||
:params="query"
|
||||
|
@ -93,6 +93,7 @@
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
:context-menus="['id', 'httpStatusCode', 'loginUserName', 'createdClientIp', 'createdUserAgent', 'createdTime']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:context-opers="['view']"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_loginlog.export"
|
||||
|
@ -119,6 +119,7 @@
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
:context-menus="['id', 'httpStatusCode', 'apiPathCrc32', 'ownerId', 'httpMethod', 'duration', 'createdClientIp', 'createdTime']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:context-opers="[]"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:export-api="$API.sys_requestlog.export"
|
||||
|
@ -58,6 +58,7 @@
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
:context-menus="['id', 'createdUserName', 'msgType', 'title', 'summary', 'createdTime']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_sitemsg.export"
|
||||
:params="query"
|
||||
|
@ -115,6 +115,7 @@
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
:context-menus="['id', 'name', 'sort', 'enabled', 'ignorePermissionControl', 'dataScope', 'displayDashboard', 'createdTime']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:default-sort="{ prop: 'sort', order: 'descending' }"
|
||||
:export-api="$API.sys_role.export"
|
||||
:params="query"
|
||||
|
@ -93,6 +93,7 @@
|
||||
<el-col :lg="20">
|
||||
<scTable
|
||||
:context-menus="['id', 'userName', 'mobile', 'email', 'enabled', 'createdTime', 'lastLoginTime']"
|
||||
:context-multi="{ id: ['createdTime'] }"
|
||||
:context-opers="['view', 'edit']"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_user.export"
|
||||
|
@ -86,9 +86,9 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item :label="$t('性别')" prop="profile.sex">
|
||||
<el-select v-model="form.profile.sex" clearable filterable>
|
||||
<el-option v-for="(item, i) in $GLOBAL.enums.sexes" :key="i" :label="item[1]" :value="i" />
|
||||
<el-form-item :label="$t('性别')" prop="profile.gender">
|
||||
<el-select v-model="form.profile.gender" clearable filterable>
|
||||
<el-option v-for="(item, i) in $GLOBAL.enums.genders" :key="i" :label="item[1]" :value="i" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -104,7 +104,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item :label="$t('婚姻状况')" prop="profile.sex">
|
||||
<el-form-item :label="$t('婚姻状况')" prop="profile.gender">
|
||||
<el-select v-model="form.profile.marriageStatus" clearable filterable>
|
||||
<el-option v-for="(item, i) in $GLOBAL.enums.marriageStatues" :key="i" :label="item[1]" :value="i" />
|
||||
</el-select>
|
||||
|
Reference in New Issue
Block a user