refactor: 优化部分前端代码
1.前端部分 id 类型调整为 number(去除 Jackson 针对 Long 等类型的全局转换后,需要调整下前端部分 id 的类) 2.前端部分表格列去除 data-index(部分表格列,使用了 slot,则无需再使用 data-index 属性) 3.部分字典状态遗漏更改
This commit is contained in:
parent
1f73aa732d
commit
2755bc8479
@ -20,6 +20,7 @@ import lombok.Getter;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import top.charles7c.cnadmin.common.base.BaseEnum;
|
import top.charles7c.cnadmin.common.base.BaseEnum;
|
||||||
|
import top.charles7c.cnadmin.common.constant.UIConsts;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启用/禁用状态枚举
|
* 启用/禁用状态枚举
|
||||||
@ -32,11 +33,12 @@ import top.charles7c.cnadmin.common.base.BaseEnum;
|
|||||||
public enum DisEnableStatusEnum implements BaseEnum<Integer> {
|
public enum DisEnableStatusEnum implements BaseEnum<Integer> {
|
||||||
|
|
||||||
/** 启用 */
|
/** 启用 */
|
||||||
ENABLE(1, "启用"),
|
ENABLE(1, "启用", UIConsts.COLOR_SUCCESS),
|
||||||
|
|
||||||
/** 禁用 */
|
/** 禁用 */
|
||||||
DISABLE(2, "禁用"),;
|
DISABLE(2, "禁用", UIConsts.COLOR_ERROR),;
|
||||||
|
|
||||||
private final Integer value;
|
private final Integer value;
|
||||||
private final String description;
|
private final String description;
|
||||||
|
private final String color;
|
||||||
}
|
}
|
||||||
|
@ -261,7 +261,7 @@
|
|||||||
import checkPermission from '@/utils/permission';
|
import checkPermission from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
// const { DisEnableStatusEnum } = proxy.useDict('DisEnableStatusEnum');
|
// const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const dataDetail = ref<DataRecord>({
|
const dataDetail = ref<DataRecord>({
|
||||||
|
@ -27,7 +27,7 @@ export interface DashboardGeoDistributionRecord {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DashboardAnnouncementRecord {
|
export interface DashboardAnnouncementRecord {
|
||||||
id: string;
|
id: number;
|
||||||
title: string;
|
title: string;
|
||||||
type: number;
|
type: number;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import qs from 'query-string';
|
|||||||
const BASE_URL = '/monitor/log';
|
const BASE_URL = '/monitor/log';
|
||||||
|
|
||||||
export interface LogRecord {
|
export interface LogRecord {
|
||||||
id?: string;
|
id?: number;
|
||||||
clientIp: string;
|
clientIp: string;
|
||||||
location: string;
|
location: string;
|
||||||
browser: string;
|
browser: string;
|
||||||
@ -102,6 +102,6 @@ export function listSystemLog(params: SystemLogParam) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSystemLog(id: string) {
|
export function getSystemLog(id: number) {
|
||||||
return axios.get<SystemLogDetailRecord>(`${BASE_URL}/system/${id}`);
|
return axios.get<SystemLogDetailRecord>(`${BASE_URL}/system/${id}`);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import qs from 'query-string';
|
|||||||
const BASE_URL = '/system/announcement';
|
const BASE_URL = '/system/announcement';
|
||||||
|
|
||||||
export interface DataRecord {
|
export interface DataRecord {
|
||||||
id?: string;
|
id?: number;
|
||||||
title?: string;
|
title?: string;
|
||||||
content?: string;
|
content?: string;
|
||||||
status?: number;
|
status?: number;
|
||||||
@ -42,7 +42,7 @@ export function list(params: ListParam) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get(id: string) {
|
export function get(id: number) {
|
||||||
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,10 +50,10 @@ export function add(req: DataRecord) {
|
|||||||
return axios.post(BASE_URL, req);
|
return axios.post(BASE_URL, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update(req: DataRecord, id: string) {
|
export function update(req: DataRecord, id: number) {
|
||||||
return axios.put(`${BASE_URL}/${id}`, req);
|
return axios.put(`${BASE_URL}/${id}`, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function del(ids: string | Array<string>) {
|
export function del(ids: number | Array<number>) {
|
||||||
return axios.delete(`${BASE_URL}/${ids}`);
|
return axios.delete(`${BASE_URL}/${ids}`);
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import qs from 'query-string';
|
|||||||
const BASE_URL = '/system/dept';
|
const BASE_URL = '/system/dept';
|
||||||
|
|
||||||
export interface DataRecord {
|
export interface DataRecord {
|
||||||
id?: string;
|
id?: number;
|
||||||
name: string;
|
name: string;
|
||||||
parentId?: string;
|
parentId?: number;
|
||||||
description?: string;
|
description?: string;
|
||||||
sort: number;
|
sort: number;
|
||||||
status?: number;
|
status?: number;
|
||||||
@ -34,7 +34,7 @@ export function list(params: ListParam) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get(id: string) {
|
export function get(id: number) {
|
||||||
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,10 +42,10 @@ export function add(req: DataRecord) {
|
|||||||
return axios.post(BASE_URL, req);
|
return axios.post(BASE_URL, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update(req: DataRecord, id: string) {
|
export function update(req: DataRecord, id: number) {
|
||||||
return axios.put(`${BASE_URL}/${id}`, req);
|
return axios.put(`${BASE_URL}/${id}`, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function del(ids: string | Array<string>) {
|
export function del(ids: number | Array<number>) {
|
||||||
return axios.delete(`${BASE_URL}/${ids}`);
|
return axios.delete(`${BASE_URL}/${ids}`);
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,9 @@ import qs from 'query-string';
|
|||||||
const BASE_URL = '/system/menu';
|
const BASE_URL = '/system/menu';
|
||||||
|
|
||||||
export interface DataRecord {
|
export interface DataRecord {
|
||||||
id?: string;
|
id?: number;
|
||||||
title: string;
|
title: string;
|
||||||
parentId?: string;
|
parentId?: number;
|
||||||
type: number;
|
type: number;
|
||||||
path?: string;
|
path?: string;
|
||||||
name?: string;
|
name?: string;
|
||||||
@ -40,7 +40,7 @@ export function list(params: ListParam) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get(id: string) {
|
export function get(id: number) {
|
||||||
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,10 +48,10 @@ export function add(req: DataRecord) {
|
|||||||
return axios.post(BASE_URL, req);
|
return axios.post(BASE_URL, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update(req: DataRecord, id: string) {
|
export function update(req: DataRecord, id: number) {
|
||||||
return axios.put(`${BASE_URL}/${id}`, req);
|
return axios.put(`${BASE_URL}/${id}`, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function del(ids: string | Array<string>) {
|
export function del(ids: number | Array<number>) {
|
||||||
return axios.delete(`${BASE_URL}/${ids}`);
|
return axios.delete(`${BASE_URL}/${ids}`);
|
||||||
}
|
}
|
||||||
|
@ -4,14 +4,14 @@ import qs from 'query-string';
|
|||||||
const BASE_URL = '/system/role';
|
const BASE_URL = '/system/role';
|
||||||
|
|
||||||
export interface DataRecord {
|
export interface DataRecord {
|
||||||
id?: string;
|
id?: number;
|
||||||
name: string;
|
name: string;
|
||||||
code?: string;
|
code?: string;
|
||||||
sort?: number;
|
sort?: number;
|
||||||
description?: string;
|
description?: string;
|
||||||
menuIds?: Array<string>;
|
menuIds?: Array<number>;
|
||||||
dataScope: number;
|
dataScope: number;
|
||||||
deptIds?: Array<string>;
|
deptIds?: Array<number>;
|
||||||
status?: number;
|
status?: number;
|
||||||
type?: number;
|
type?: number;
|
||||||
createUserString?: string;
|
createUserString?: string;
|
||||||
@ -43,7 +43,7 @@ export function list(params: ListParam) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get(id: string) {
|
export function get(id: number) {
|
||||||
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,10 +51,10 @@ export function add(req: DataRecord) {
|
|||||||
return axios.post(BASE_URL, req);
|
return axios.post(BASE_URL, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update(req: DataRecord, id: string) {
|
export function update(req: DataRecord, id: number) {
|
||||||
return axios.put(`${BASE_URL}/${id}`, req);
|
return axios.put(`${BASE_URL}/${id}`, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function del(ids: string | Array<string>) {
|
export function del(ids: number | Array<number>) {
|
||||||
return axios.delete(`${BASE_URL}/${ids}`);
|
return axios.delete(`${BASE_URL}/${ids}`);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ import qs from 'query-string';
|
|||||||
const BASE_URL = '/system/user';
|
const BASE_URL = '/system/user';
|
||||||
|
|
||||||
export interface DataRecord {
|
export interface DataRecord {
|
||||||
id?: string;
|
id?: number;
|
||||||
username: string;
|
username: string;
|
||||||
nickname: string;
|
nickname: string;
|
||||||
gender: number;
|
gender: number;
|
||||||
@ -18,9 +18,9 @@ export interface DataRecord {
|
|||||||
createTime?: string;
|
createTime?: string;
|
||||||
updateUserString?: string;
|
updateUserString?: string;
|
||||||
updateTime?: string;
|
updateTime?: string;
|
||||||
deptId?: string;
|
deptId?: number;
|
||||||
deptName?: string;
|
deptName?: string;
|
||||||
roleIds?: Array<string>;
|
roleIds?: Array<number>;
|
||||||
roleNames?: Array<string>;
|
roleNames?: Array<string>;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
@ -48,7 +48,7 @@ export function list(params: ListParam) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function get(id: string) {
|
export function get(id: number) {
|
||||||
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
return axios.get<DataRecord>(`${BASE_URL}/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,22 +56,22 @@ export function add(req: DataRecord) {
|
|||||||
return axios.post(BASE_URL, req);
|
return axios.post(BASE_URL, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function update(req: DataRecord, id: string) {
|
export function update(req: DataRecord, id: number) {
|
||||||
return axios.put(`${BASE_URL}/${id}`, req);
|
return axios.put(`${BASE_URL}/${id}`, req);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function del(ids: string | Array<string>) {
|
export function del(ids: number | Array<number>) {
|
||||||
return axios.delete(`${BASE_URL}/${ids}`);
|
return axios.delete(`${BASE_URL}/${ids}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function resetPassword(id: string) {
|
export function resetPassword(id: number) {
|
||||||
return axios.patch(`${BASE_URL}/${id}/password`);
|
return axios.patch(`${BASE_URL}/${id}/password`);
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UpdateUserRoleReq {
|
export interface UpdateUserRoleReq {
|
||||||
roleIds?: Array<string>;
|
roleIds?: Array<number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateUserRole(req: UpdateUserRoleReq, id: string) {
|
export function updateUserRole(req: UpdateUserRoleReq, id: number) {
|
||||||
return axios.patch(`${BASE_URL}/${id}/role`, req);
|
return axios.patch(`${BASE_URL}/${id}/role`, req);
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toDetail = async (id: string) => {
|
const toDetail = async (id: number) => {
|
||||||
if (detailLoading.value) return;
|
if (detailLoading.value) return;
|
||||||
detailLoading.value = true;
|
detailLoading.value = true;
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
{{ rowIndex + 1 }}
|
{{ rowIndex + 1 }}
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column title="模块" data-index="module">
|
<a-table-column title="模块">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-typography-paragraph
|
<a-typography-paragraph
|
||||||
:ellipsis="{
|
:ellipsis="{
|
||||||
@ -35,7 +35,6 @@
|
|||||||
<a-table-column title="总浏览量" data-index="pvCount" />
|
<a-table-column title="总浏览量" data-index="pvCount" />
|
||||||
<a-table-column
|
<a-table-column
|
||||||
title="日涨幅"
|
title="日涨幅"
|
||||||
data-index="newPvFromYesterday"
|
|
||||||
:sortable="{
|
:sortable="{
|
||||||
sortDirections: ['ascend', 'descend'],
|
sortDirections: ['ascend', 'descend'],
|
||||||
}"
|
}"
|
||||||
|
@ -14,10 +14,7 @@
|
|||||||
:title="$t('basicProfile.column.updateContent')"
|
:title="$t('basicProfile.column.updateContent')"
|
||||||
data-index="updateContent"
|
data-index="updateContent"
|
||||||
/>
|
/>
|
||||||
<a-table-column
|
<a-table-column :title="$t('basicProfile.column.status')">
|
||||||
:title="$t('basicProfile.column.status')"
|
|
||||||
data-index="status"
|
|
||||||
>
|
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<p v-if="record.status === 0">
|
<p v-if="record.status === 0">
|
||||||
<span class="circle"></span>
|
<span class="circle"></span>
|
||||||
|
@ -343,7 +343,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toDetail = async (id: string) => {
|
const toDetail = async (id: number) => {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getSystemLog(id)
|
getSystemLog(id)
|
||||||
|
@ -363,7 +363,7 @@
|
|||||||
// TODO 待补充详情字段默认值
|
// TODO 待补充详情字段默认值
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const ids = ref<Array<string>>([]);
|
const ids = ref<Array<number>>([]);
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
@ -427,7 +427,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toUpdate = (id: string) => {
|
const toUpdate = (id: number) => {
|
||||||
reset();
|
reset();
|
||||||
get(id).then((res) => {
|
get(id).then((res) => {
|
||||||
form.value = res.data;
|
form.value = res.data;
|
||||||
@ -482,7 +482,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toDetail = async (id: string) => {
|
const toDetail = async (id: number) => {
|
||||||
if (detailLoading.value) return;
|
if (detailLoading.value) return;
|
||||||
detailLoading.value = true;
|
detailLoading.value = true;
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
@ -527,7 +527,7 @@
|
|||||||
*
|
*
|
||||||
* @param ids ID 列表
|
* @param ids ID 列表
|
||||||
*/
|
*/
|
||||||
const handleDelete = (ids: Array<string>) => {
|
const handleDelete = (ids: Array<number>) => {
|
||||||
del(ids).then((res) => {
|
del(ids).then((res) => {
|
||||||
proxy.$message.success(res.msg);
|
proxy.$message.success(res.msg);
|
||||||
getList();
|
getList();
|
||||||
|
@ -254,8 +254,10 @@
|
|||||||
<a-skeleton-line :rows="1" />
|
<a-skeleton-line :rows="1" />
|
||||||
</a-skeleton>
|
</a-skeleton>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<a-tag v-if="dataDetail.status === 1" color="green">启用</a-tag>
|
<dict-tag
|
||||||
<a-tag v-else color="red">禁用</a-tag>
|
:value="dataDetail.status"
|
||||||
|
:dict="dis_enable_status_enum"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="部门排序">
|
<a-descriptions-item label="部门排序">
|
||||||
@ -330,7 +332,7 @@
|
|||||||
updateTime: '',
|
updateTime: '',
|
||||||
parentName: '',
|
parentName: '',
|
||||||
});
|
});
|
||||||
const ids = ref<Array<string>>([]);
|
const ids = ref<Array<number>>([]);
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
@ -397,7 +399,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toUpdate = (id: string) => {
|
const toUpdate = (id: number) => {
|
||||||
reset();
|
reset();
|
||||||
listDeptTree({}).then((res) => {
|
listDeptTree({}).then((res) => {
|
||||||
treeData.value = res.data;
|
treeData.value = res.data;
|
||||||
@ -462,7 +464,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toDetail = async (id: string) => {
|
const toDetail = async (id: number) => {
|
||||||
if (detailLoading.value) return;
|
if (detailLoading.value) return;
|
||||||
detailLoading.value = true;
|
detailLoading.value = true;
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
@ -506,7 +508,7 @@
|
|||||||
*
|
*
|
||||||
* @param ids ID 列表
|
* @param ids ID 列表
|
||||||
*/
|
*/
|
||||||
const handleDelete = (ids: Array<string>) => {
|
const handleDelete = (ids: Array<number>) => {
|
||||||
del(ids).then((res) => {
|
del(ids).then((res) => {
|
||||||
proxy.$message.success(res.msg);
|
proxy.$message.success(res.msg);
|
||||||
getList();
|
getList();
|
||||||
|
@ -358,7 +358,7 @@
|
|||||||
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
const { dis_enable_status_enum } = proxy.useDict('dis_enable_status_enum');
|
||||||
|
|
||||||
const dataList = ref<DataRecord[]>([]);
|
const dataList = ref<DataRecord[]>([]);
|
||||||
const ids = ref<Array<string>>([]);
|
const ids = ref<Array<number>>([]);
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
@ -425,7 +425,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toUpdate = (id: string) => {
|
const toUpdate = (id: number) => {
|
||||||
reset();
|
reset();
|
||||||
listMenuTree({}).then((res) => {
|
listMenuTree({}).then((res) => {
|
||||||
treeData.value = res.data;
|
treeData.value = res.data;
|
||||||
@ -517,7 +517,7 @@
|
|||||||
*
|
*
|
||||||
* @param ids ID 列表
|
* @param ids ID 列表
|
||||||
*/
|
*/
|
||||||
const handleDelete = (ids: Array<string>) => {
|
const handleDelete = (ids: Array<number>) => {
|
||||||
del(ids).then((res) => {
|
del(ids).then((res) => {
|
||||||
proxy.$message.success(res.msg);
|
proxy.$message.success(res.msg);
|
||||||
getList();
|
getList();
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
>
|
>
|
||||||
<template #columns>
|
<template #columns>
|
||||||
<a-table-column title="ID" data-index="id" />
|
<a-table-column title="ID" data-index="id" />
|
||||||
<a-table-column title="角色名称" data-index="name" :width="130">
|
<a-table-column title="角色名称" :width="130">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-link @click="toDetail(record.id)">{{ record.name }}</a-link>
|
<a-link @click="toDetail(record.id)">{{ record.name }}</a-link>
|
||||||
</template>
|
</template>
|
||||||
@ -129,7 +129,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column title="角色排序" align="center" data-index="sort" />
|
<a-table-column title="角色排序" align="center" data-index="sort" />
|
||||||
<a-table-column title="状态" align="center" data-index="status">
|
<a-table-column title="状态" align="center">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-switch
|
<a-switch
|
||||||
v-model="record.status"
|
v-model="record.status"
|
||||||
@ -344,8 +344,10 @@
|
|||||||
<a-skeleton-line :rows="1" />
|
<a-skeleton-line :rows="1" />
|
||||||
</a-skeleton>
|
</a-skeleton>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<a-tag v-if="dataDetail.status === 1" color="green">启用</a-tag>
|
<dict-tag
|
||||||
<a-tag v-else color="red">禁用</a-tag>
|
:value="dataDetail.status"
|
||||||
|
:dict="dis_enable_status_enum"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="数据权限">
|
<a-descriptions-item label="数据权限">
|
||||||
@ -455,7 +457,7 @@
|
|||||||
deptIds: undefined,
|
deptIds: undefined,
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const ids = ref<Array<string>>([]);
|
const ids = ref<Array<number>>([]);
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
@ -544,7 +546,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toUpdate = (id: string) => {
|
const toUpdate = (id: number) => {
|
||||||
reset();
|
reset();
|
||||||
menuCheckStrictly.value = false;
|
menuCheckStrictly.value = false;
|
||||||
deptCheckStrictly.value = false;
|
deptCheckStrictly.value = false;
|
||||||
@ -695,7 +697,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toDetail = async (id: string) => {
|
const toDetail = async (id: number) => {
|
||||||
if (detailLoading.value) return;
|
if (detailLoading.value) return;
|
||||||
getMenuTree();
|
getMenuTree();
|
||||||
getDeptTree();
|
getDeptTree();
|
||||||
@ -741,7 +743,7 @@
|
|||||||
*
|
*
|
||||||
* @param ids ID 列表
|
* @param ids ID 列表
|
||||||
*/
|
*/
|
||||||
const handleDelete = (ids: Array<string>) => {
|
const handleDelete = (ids: Array<number>) => {
|
||||||
del(ids).then((res) => {
|
del(ids).then((res) => {
|
||||||
proxy.$message.success(res.msg);
|
proxy.$message.success(res.msg);
|
||||||
getList();
|
getList();
|
||||||
|
@ -439,8 +439,10 @@
|
|||||||
<a-skeleton-line :rows="1" />
|
<a-skeleton-line :rows="1" />
|
||||||
</a-skeleton>
|
</a-skeleton>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
<a-tag v-if="dataDetail.status === 1" color="green">启用</a-tag>
|
<dict-tag
|
||||||
<a-tag v-else color="red">禁用</a-tag>
|
:value="dataDetail.status"
|
||||||
|
:dict="dis_enable_status_enum"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="邮箱">
|
<a-descriptions-item label="邮箱">
|
||||||
@ -543,7 +545,7 @@
|
|||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const ids = ref<Array<string>>([]);
|
const ids = ref<Array<number>>([]);
|
||||||
const title = ref('');
|
const title = ref('');
|
||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
@ -636,7 +638,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toUpdate = (id: string) => {
|
const toUpdate = (id: number) => {
|
||||||
reset();
|
reset();
|
||||||
getDeptOptions();
|
getDeptOptions();
|
||||||
getRoleOptions();
|
getRoleOptions();
|
||||||
@ -652,7 +654,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toUpdateRole = (id: string) => {
|
const toUpdateRole = (id: number) => {
|
||||||
reset();
|
reset();
|
||||||
getRoleOptions();
|
getRoleOptions();
|
||||||
get(id).then((res) => {
|
get(id).then((res) => {
|
||||||
@ -703,7 +705,7 @@
|
|||||||
description: '',
|
description: '',
|
||||||
status: 1,
|
status: 1,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
roleIds: [] as Array<string>,
|
roleIds: [] as Array<number>,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
};
|
};
|
||||||
proxy.$refs.formRef?.resetFields();
|
proxy.$refs.formRef?.resetFields();
|
||||||
@ -764,7 +766,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const toDetail = async (id: string) => {
|
const toDetail = async (id: number) => {
|
||||||
if (detailLoading.value) return;
|
if (detailLoading.value) return;
|
||||||
detailLoading.value = true;
|
detailLoading.value = true;
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
@ -808,7 +810,7 @@
|
|||||||
*
|
*
|
||||||
* @param ids ID 列表
|
* @param ids ID 列表
|
||||||
*/
|
*/
|
||||||
const handleDelete = (ids: Array<string>) => {
|
const handleDelete = (ids: Array<number>) => {
|
||||||
del(ids).then((res) => {
|
del(ids).then((res) => {
|
||||||
proxy.$message.success(res.msg);
|
proxy.$message.success(res.msg);
|
||||||
getList();
|
getList();
|
||||||
@ -820,7 +822,7 @@
|
|||||||
*
|
*
|
||||||
* @param id ID
|
* @param id ID
|
||||||
*/
|
*/
|
||||||
const handleResetPassword = (id: string) => {
|
const handleResetPassword = (id: number) => {
|
||||||
resetPassword(id).then((res) => {
|
resetPassword(id).then((res) => {
|
||||||
proxy.$message.success(res.msg);
|
proxy.$message.success(res.msg);
|
||||||
});
|
});
|
||||||
|
@ -152,37 +152,22 @@
|
|||||||
ellipsis
|
ellipsis
|
||||||
tooltip
|
tooltip
|
||||||
/>
|
/>
|
||||||
<a-table-column title="描述" data-index="comment" :width="170">
|
<a-table-column title="描述" :width="170">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-input v-model="record.comment" />
|
<a-input v-model="record.comment" />
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column
|
<a-table-column title="列表" :width="60" align="center">
|
||||||
title="列表"
|
|
||||||
data-index="showInList"
|
|
||||||
:width="60"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-checkbox v-model="record.showInList" value="true" />
|
<a-checkbox v-model="record.showInList" value="true" />
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column
|
<a-table-column title="表单" :width="60" align="center">
|
||||||
title="表单"
|
|
||||||
data-index="showInForm"
|
|
||||||
:width="60"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-checkbox v-model="record.showInForm" value="true" />
|
<a-checkbox v-model="record.showInForm" value="true" />
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column
|
<a-table-column title="必填" :width="60" align="center">
|
||||||
title="必填"
|
|
||||||
data-index="isRequired"
|
|
||||||
:width="60"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
v-if="record.showInForm"
|
v-if="record.showInForm"
|
||||||
@ -192,21 +177,12 @@
|
|||||||
<a-checkbox v-else disabled />
|
<a-checkbox v-else disabled />
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column
|
<a-table-column title="查询" :width="60" align="center">
|
||||||
title="查询"
|
|
||||||
data-index="showInQuery"
|
|
||||||
:width="60"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-checkbox v-model="record.showInQuery" value="true" />
|
<a-checkbox v-model="record.showInQuery" value="true" />
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column
|
<a-table-column title="表单类型" :width="150">
|
||||||
title="表单类型"
|
|
||||||
data-index="formType"
|
|
||||||
:width="150"
|
|
||||||
>
|
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-select
|
<a-select
|
||||||
v-if="record.showInForm || record.showInQuery"
|
v-if="record.showInForm || record.showInQuery"
|
||||||
@ -217,7 +193,7 @@
|
|||||||
<span v-else>无需设置</span>
|
<span v-else>无需设置</span>
|
||||||
</template>
|
</template>
|
||||||
</a-table-column>
|
</a-table-column>
|
||||||
<a-table-column title="查询方式" data-index="queryType">
|
<a-table-column title="查询方式">
|
||||||
<template #cell="{ record }">
|
<template #cell="{ record }">
|
||||||
<a-select
|
<a-select
|
||||||
v-if="record.showInQuery"
|
v-if="record.showInQuery"
|
||||||
|
Loading…
Reference in New Issue
Block a user