diff --git a/src/api/ticket.ts b/src/api/ticket.ts index 1372174..7efac5e 100644 --- a/src/api/ticket.ts +++ b/src/api/ticket.ts @@ -11,6 +11,7 @@ export interface TicketCreateRecord { auditorId: string; submit: boolean; userId: undefined; + comment: string; } export interface TicketRecord extends TicketCreateRecord { @@ -18,12 +19,7 @@ export interface TicketRecord extends TicketCreateRecord { id: undefined; status: string } -export interface auditRecord { - auditorId: string; - comment: string; - result: string; - ticketId: string; -} + // 票据列表 export function queryTicket(data: any) { @@ -62,20 +58,10 @@ export function uploadFile(file: any) { // 获取附件信息 export function attachment(id:string){ - return axios.get(`/api/rest/attachment/find/${id}`) + return axios.get(`/api/rest/attachment/find/${id}`); } -// 审核 -export function audit(ticketId: string, params: auditRecord) { - return axios.patch(`/api/rest/bill/audit/${ticketId}`, params); +// 首页数据 +export function home(data: any){ + return axios.get('/api/rest/bill/home',data); } - -// 审核员管理的票据列表 -export function auditTickctList(data: any){ - return axios({ - url: '/api/rest/bill/audit/list', // 路径 - method: 'get', - params: data, // 参数 - }); -} - diff --git a/src/api/user.ts b/src/api/user.ts index ea213fb..87b5538 100644 --- a/src/api/user.ts +++ b/src/api/user.ts @@ -160,6 +160,8 @@ export function deptAudit(id: string,roleId:string){ }); } + + export function switchRole(roleId: number) { return axios.patch(`/api/user/self/switch-role/${roleId}`); } diff --git a/src/components/navbar/index.vue b/src/components/navbar/index.vue index 0fefe3b..e254742 100644 --- a/src/components/navbar/index.vue +++ b/src/components/navbar/index.vue @@ -154,22 +154,6 @@ avatar - + + diff --git a/src/views/dashboard/workplace/index.vue b/src/views/dashboard/workplace/index.vue index 379e5ce..2eb930a 100644 --- a/src/views/dashboard/workplace/index.vue +++ b/src/views/dashboard/workplace/index.vue @@ -1,148 +1,105 @@ diff --git a/src/views/dashboard/workplace/locale/en-US.ts b/src/views/dashboard/workplace/locale/en-US.ts index 5eef6ad..718ea4e 100644 --- a/src/views/dashboard/workplace/locale/en-US.ts +++ b/src/views/dashboard/workplace/locale/en-US.ts @@ -35,4 +35,9 @@ export default { 'workplace.popularContent.video': 'video', 'workplace.categoriesPercent': 'Categories Percent', 'workplace.pecs': 'pecs', + + 'workplace.pass': 'pass', + 'workplace.notPass': 'notPass', + 'workplace.notAudit': 'notAudit', + 'workplace.notFiled': 'notFiled', }; diff --git a/src/views/dashboard/workplace/locale/zh-CN.ts b/src/views/dashboard/workplace/locale/zh-CN.ts index 4eebcc8..077194d 100644 --- a/src/views/dashboard/workplace/locale/zh-CN.ts +++ b/src/views/dashboard/workplace/locale/zh-CN.ts @@ -34,4 +34,8 @@ export default { 'workplace.popularContent.video': '视频', 'workplace.categoriesPercent': '内容类型占比', 'workplace.pecs': '个', + 'workplace.pass': '审核通过', + 'workplace.notPass': '审核不通过', + 'workplace.notAudit': '待审核', + 'workplace.notFiled': '待提交', }; diff --git a/src/views/login/components/login-form.vue b/src/views/login/components/login-form.vue index d271e8f..70f8b56 100644 --- a/src/views/login/components/login-form.vue +++ b/src/views/login/components/login-form.vue @@ -208,7 +208,10 @@ const formData = ref({ }); const deptOptions = computedAsync(async () => { const { data } = await deptList(); - return data; + const deptData = data.filter((item: any) => { + return item.enabled !== false; + }); + return deptData; }); const loginConfig = useStorage('login-config', { // 使用 useStorage 创建一个响应式变量,存储登录相关配置 diff --git a/src/views/system/user/components/user-edit.vue b/src/views/system/user/components/user-edit.vue index bcfbc34..ac1a9d7 100644 --- a/src/views/system/user/components/user-edit.vue +++ b/src/views/system/user/components/user-edit.vue @@ -115,14 +115,21 @@ /> - - + - {{ i.name }} - + :options="roleOptions" + :field-names="{ + value: 'id', + label: 'name', + }" + :placeholder="$t('user.info.role.placeholder')" + /> @@ -137,7 +144,6 @@ import { FormInstance } from '@arco-design/web-vue/es/form'; import { queryRoleList } from '@/api/role'; import { deptList } from '@/api/dept'; import { computedAsync } from '@vueuse/core'; -import { SelectOptionData } from '@arco-design/web-vue/es/select/interface'; import { Message } from '@arco-design/web-vue'; import { useUserStore } from '@/store'; @@ -176,13 +182,19 @@ const userStore = useUserStore(); // 部门数据 const deptOptions = computedAsync(async () => { const { data } = await deptList(); - return data; + const deptData = data.filter((item: any) => { + return item.enabled !== false; + }); + return deptData; }); // 角色数据 const roleOptions = computedAsync(async () => { const res = await queryRoleList(); - return res.data; + const roleData = res.data.filter((item: any) => { + return item.enabled !== false; + }); + return roleData; }); const emit = defineEmits(['refresh']); diff --git a/src/views/system/user/locale/en-US.ts b/src/views/system/user/locale/en-US.ts index bc46e57..3f3b9f5 100644 --- a/src/views/system/user/locale/en-US.ts +++ b/src/views/system/user/locale/en-US.ts @@ -62,6 +62,7 @@ export default { 'user.info.dept.placeholder':'Please select Dept', 'user.info.dept.required': 'Dept is required', 'user.info.role':'Role', + 'user.info.role.placeholder': 'Please select Role', 'user.info.role.required': 'Role is required', }; diff --git a/src/views/system/user/locale/zh-CN.ts b/src/views/system/user/locale/zh-CN.ts index fcdc0b6..2d8ded8 100644 --- a/src/views/system/user/locale/zh-CN.ts +++ b/src/views/system/user/locale/zh-CN.ts @@ -62,6 +62,7 @@ export default { 'user.info.dept.placeholder':'请选择部门', 'user.info.dept.required': '部门不能为空', 'user.info.role':'角色', + 'user.info.role.placeholder': '请选择角色', 'user.info.role.required': '请选择一个', } \ No newline at end of file diff --git a/src/views/ticket/manage/components/form-edit.vue b/src/views/ticket/manage/components/form-edit.vue index c439165..b11672c 100644 --- a/src/views/ticket/manage/components/form-edit.vue +++ b/src/views/ticket/manage/components/form-edit.vue @@ -1,5 +1,6 @@