diff --git a/src/api/work/adminWorkDetailApi.js b/src/api/work/adminWorkDetailApi.js new file mode 100644 index 0000000..9cfbec4 --- /dev/null +++ b/src/api/work/adminWorkDetailApi.js @@ -0,0 +1,161 @@ +import request from '@/utils/request' + +// 获取工作单详情 +export function getWorkDetail(params) { + return new Promise((resolve, reject) => { + request({ + url: '/work.listAdminWorkPool', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work detail')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单任务列表 +export function listAdminWorkTask(params) { + return new Promise((resolve, reject) => { + request({ + url: '/work.listAdminWorkTask', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work tasks')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单任务项列表 +export function listAdminWorkTaskItem(params) { + return new Promise((resolve, reject) => { + request({ + url: '/task.listAdminWorkTaskItem', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work task items')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单抄送人列表 +export function listAdminWorkCopy(params) { + return new Promise((resolve, reject) => { + request({ + url: '/work.listAdminWorkCopy', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work copy list')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单事件列表 +export function listAdminWorkEvent(params) { + return new Promise((resolve, reject) => { + request({ + url: '/workEvent.listAdminWorkEvent', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work events')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单文件列表 +export function listAdminWorkPoolFile(params) { + return new Promise((resolve, reject) => { + request({ + url: '/work.listAdminWorkPoolFile', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work files')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单类型列表 +export function listAdminWorkType(params) { + return new Promise((resolve, reject) => { + request({ + url: '/workType.listAdminWorkType', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work types')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取工作单周期列表 +export function listAdminWorkCycle(params) { + return new Promise((resolve, reject) => { + request({ + url: '/workCycle.listAdminWorkCycle', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve(res) + } else { + reject(new Error(res.msg || 'Failed to get work cycles')) + } + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/api/work/adminWorkPoolApi.js b/src/api/work/adminWorkPoolApi.js new file mode 100644 index 0000000..dabdb6c --- /dev/null +++ b/src/api/work/adminWorkPoolApi.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +// 获取工作单池列表 +export function listAdminWorkTask(params) { + return new Promise((resolve, reject) => { + request({ + url: '/work.listAdminWorkTask', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve({ + data: res.data, + total: res.total + }) + } else { + reject(new Error(res.msg || '获取工作单池列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} + +// 获取管理员小区列表 +export function listAdminCommunitys(params) { + return new Promise((resolve, reject) => { + request({ + url: '/community.listAdminCommunitys', + method: 'get', + params + }).then(response => { + const res = response.data + if (res.code === 0) { + resolve({ + data: res.data, + total: res.total + }) + } else { + reject(new Error(res.msg || '获取管理员小区列表失败')) + } + }).catch(error => { + reject(error) + }) + }) +} \ No newline at end of file diff --git a/src/components/work/aWorkDetailCopy.vue b/src/components/work/aWorkDetailCopy.vue new file mode 100644 index 0000000..6af57ee --- /dev/null +++ b/src/components/work/aWorkDetailCopy.vue @@ -0,0 +1,125 @@ + + + + + + + + {{ $t('common.search') }} + {{ $t('common.reset') }} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/work/aWorkDetailCycle.vue b/src/components/work/aWorkDetailCycle.vue new file mode 100644 index 0000000..ad86821 --- /dev/null +++ b/src/components/work/aWorkDetailCycle.vue @@ -0,0 +1,100 @@ + + + + + + + {{ $t('adminWorkDetail.once') }} + {{ $t('adminWorkDetail.periodic') }} + + + + + + {{ $t('adminWorkDetail.monthDay') }} + {{ $t('adminWorkDetail.weekly') }} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/work/aWorkDetailEvent.vue b/src/components/work/aWorkDetailEvent.vue new file mode 100644 index 0000000..bcacbf6 --- /dev/null +++ b/src/components/work/aWorkDetailEvent.vue @@ -0,0 +1,217 @@ + + + + + + 问题{{ item.seqNum }} + + + + + + + + + + + + + + + {{ $t('common.search') }} + {{ $t('common.reset') }} + + + + + + + + + {{ scope.row.startTime }} + ~{{ scope.row.endTime }} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/work/aWorkDetailFile.vue b/src/components/work/aWorkDetailFile.vue new file mode 100644 index 0000000..8dab612 --- /dev/null +++ b/src/components/work/aWorkDetailFile.vue @@ -0,0 +1,216 @@ + + + + + + 问题{{ item.seqNum }} + + + + + + + + + + + + + + + {{ $t('common.search') }} + {{ $t('common.reset') }} + + + + + + + + + {{ $t('common.download') }} + + -- + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/work/aWorkDetailTask.vue b/src/components/work/aWorkDetailTask.vue new file mode 100644 index 0000000..fc5dbf2 --- /dev/null +++ b/src/components/work/aWorkDetailTask.vue @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + {{ $t('common.search') }} + {{ $t('common.reset') }} + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/work/aWorkDetailTaskItem.vue b/src/components/work/aWorkDetailTaskItem.vue new file mode 100644 index 0000000..6df6d30 --- /dev/null +++ b/src/components/work/aWorkDetailTaskItem.vue @@ -0,0 +1,152 @@ + + + + + + {{ item.staffName }} + ({{ formatDate(item.startTime) }} ~ {{ formatDate(item.endTime) }}) + + + + + + + + + {{ $t('adminWorkDetail.copyProcessed') }} + {{ $t('adminWorkDetail.processed') }} + {{ $t('adminWorkDetail.pending') }} + + + + + + + {{ $t('common.download') }} + + - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/work/aWorkDetailType.vue b/src/components/work/aWorkDetailType.vue new file mode 100644 index 0000000..f5a2657 --- /dev/null +++ b/src/components/work/aWorkDetailType.vue @@ -0,0 +1,93 @@ + + + + + + + {{ $t('adminWorkDetail.wechat') }} + {{ $t('adminWorkDetail.sms') }} + {{ $t('adminWorkDetail.unknown') }} + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/i18n/index.js b/src/i18n/index.js index d33281e..d3dc2c5 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -74,6 +74,8 @@ import { messages as adminInspectionTaskMessages } from '../views/inspection/adm import { messages as adminInspectionTaskDetailMessages } from '../views/inspection/adminInspectionTaskDetailLang' import { messages as adminComplaintMessages } from '../views/complaint/adminComplaintLang' import { messages as adminComplaintDetailMessages } from '../views/complaint/adminComplaintDetailLang' +import { messages as adminWorkPoolMessages } from '../views/work/adminWorkPoolLang' +import { messages as adminWorkDetailMessages } from '../views/work/adminWorkDetailLang' Vue.use(VueI18n) @@ -152,6 +154,8 @@ const messages = { ...adminInspectionTaskDetailMessages.en, ...adminComplaintMessages.en, ...adminComplaintDetailMessages.en, + ...adminWorkPoolMessages.en, + ...adminWorkDetailMessages.en, }, zh: { ...loginMessages.zh, @@ -226,6 +230,8 @@ const messages = { ...adminInspectionTaskDetailMessages.zh, ...adminComplaintMessages.zh, ...adminComplaintDetailMessages.zh, + ...adminWorkPoolMessages.zh, + ...adminWorkDetailMessages.zh, } } diff --git a/src/router/index.js b/src/router/index.js index 5090391..b728f20 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -347,15 +347,25 @@ const routes = [ component: () => import('@/views/inspection/adminInspectionTaskDetailList.vue') }, { - path:'/pages/complaint/adminComplaint', - name:'/pages/complaint/adminComplaint', + path: '/pages/complaint/adminComplaint', + name: '/pages/complaint/adminComplaint', component: () => import('@/views/complaint/adminComplaintList.vue') - }, - { - path:'/views/complaint/adminComplaintDetail', - name:'/views/complaint/adminComplaintDetail', - component: () => import('@/views/complaint/adminComplaintDetailList.vue') - }, + }, + { + path: '/views/complaint/adminComplaintDetail', + name: '/views/complaint/adminComplaintDetail', + component: () => import('@/views/complaint/adminComplaintDetailList.vue') + }, + { + path: '/pages/oa/adminWorkPool', + name: '/pages/oa/adminWorkPool', + component: () => import('@/views/work/adminWorkPoolList.vue') + }, + { + path: '/views/work/adminWorkDetail', + name: '/views/work/adminWorkDetail', + component: () => import('@/views/work/adminWorkDetailList.vue') + }, // 其他子路由可以在这里添加 ] }, diff --git a/src/views/work/adminWorkDetailLang.js b/src/views/work/adminWorkDetailLang.js new file mode 100644 index 0000000..e15b292 --- /dev/null +++ b/src/views/work/adminWorkDetailLang.js @@ -0,0 +1,102 @@ +export const messages = { + en: { + adminWorkDetail: { + title: 'Work Order Details', + workId: 'Work Order ID', + workName: 'Work Order Name', + typeName: 'Type Name', + workCycle: 'Type', + once: 'One-time Work Order', + periodic: 'Periodic Work Order', + startTime: 'Start Time', + endTime: 'End Time', + createUserName: 'Creator', + curStaffName: 'Processor', + curCopyName: 'Copy To', + stateName: 'Status', + createTime: 'Create Time', + attachment: 'Attachment', + content: 'Content', + processor: 'Processor', + processContent: 'Process Content', + copyTo: 'Copy To', + workFlow: 'Work Flow', + flowAttachment: 'Flow Attachment', + workType: 'Work Type', + taskId: 'Task ID', + preProcessor: 'Previous Processor', + taskPeriod: 'Task Period', + remark: 'Remark', + finishTime: 'Finish Time', + copyProcessed: 'Copy Processed', + processed: 'Processed', + pending: 'Pending', + score: 'Score', + deductionMoney: 'Deduction Amount', + deductionReason: 'Deduction Reason', + deductionPerson: 'Deduction Person', + notifyType: 'Notification Type', + wechat: 'WeChat', + sms: 'SMS', + unknown: 'Unknown', + completeHours: 'Complete Hours', + cycle: 'Cycle', + monthDay: 'Month/Day', + weekly: 'Weekly', + month: 'Month', + day: 'Day', + week: 'Week', + fetchError: 'Failed to fetch work order details' + } + }, + zh: { + adminWorkDetail: { + title: '工作单详情', + workId: '工单编号', + workName: '工单名称', + typeName: '类型名称', + workCycle: '标识', + once: '一次性工单', + periodic: '周期性工单', + startTime: '开始时间', + endTime: '结束时间', + createUserName: '发起人', + curStaffName: '处理人', + curCopyName: '抄送人', + stateName: '状态', + createTime: '创建时间', + attachment: '附件', + content: '内容', + processor: '处理人', + processContent: '处理内容', + copyTo: '抄送人', + workFlow: '工作单流转', + flowAttachment: '流转附件', + workType: '工作单类型', + taskId: '任务编号', + preProcessor: '前处理人', + taskPeriod: '任务有效期', + remark: '说明', + finishTime: '完成时间', + copyProcessed: '抄送人已办理', + processed: '处理人已办理', + pending: '待处理', + score: '评分', + deductionMoney: '扣款金额', + deductionReason: '扣款原因', + deductionPerson: '扣款人', + notifyType: '通知方式', + wechat: '微信', + sms: '短信', + unknown: '未知', + completeHours: '完成小时', + cycle: '周期', + monthDay: '月/天', + weekly: '按周', + month: '月', + day: '日', + week: '周', + fetchError: '获取工作单详情失败' + } + } +} \ No newline at end of file diff --git a/src/views/work/adminWorkDetailList.vue b/src/views/work/adminWorkDetailList.vue new file mode 100644 index 0000000..8c7db73 --- /dev/null +++ b/src/views/work/adminWorkDetailList.vue @@ -0,0 +1,261 @@ + + + + + {{ $t('adminWorkDetail.title') }} + + {{ $t('common.back') }} + + + + + + + + {{ $t('adminWorkDetail.workId') }}: + {{ adminWorkDetailInfo.workId }} + + + + + {{ $t('adminWorkDetail.workName') }}: + {{ adminWorkDetailInfo.workName }} + + + + + {{ $t('adminWorkDetail.typeName') }}: + {{ adminWorkDetailInfo.typeName }} + + + + + {{ $t('adminWorkDetail.workCycle') }}: + {{ adminWorkDetailInfo.workCycle == '1001' ? $t('adminWorkDetail.once') : $t('adminWorkDetail.periodic') }} + + + + + + + + {{ $t('adminWorkDetail.startTime') }}: + {{ adminWorkDetailInfo.startTime }} + + + + + {{ $t('adminWorkDetail.endTime') }}: + {{ adminWorkDetailInfo.endTime }} + + + + + {{ $t('adminWorkDetail.createUserName') }}: + {{ adminWorkDetailInfo.createUserName }} + + + + + {{ $t('adminWorkDetail.curStaffName') }}: + {{ adminWorkDetailInfo.curStaffName }} + + + + + + + + {{ $t('adminWorkDetail.curCopyName') }}: + {{ adminWorkDetailInfo.curCopyName }} + + + + + {{ $t('adminWorkDetail.stateName') }}: + {{ adminWorkDetailInfo.stateName }} + + + + + {{ $t('adminWorkDetail.createTime') }}: + {{ adminWorkDetailInfo.createTime }} + + + + + {{ $t('adminWorkDetail.attachment') }}: + + + {{ $t('common.download') }} + + - + + + + + + + + + + + + {{item.seqNum}}、 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/work/adminWorkPoolLang.js b/src/views/work/adminWorkPoolLang.js new file mode 100644 index 0000000..845fcf6 --- /dev/null +++ b/src/views/work/adminWorkPoolLang.js @@ -0,0 +1,84 @@ +export const messages = { + en: { + adminWorkPool: { + search: { + title: 'Search Conditions', + workName: 'Work Order Name', + createUser: 'Creator', + staffName: 'Handler', + startTime: 'Start Time', + endTime: 'End Time' + }, + list: { + title: 'Work Order Pool' + }, + table: { + id: 'ID', + communityName: 'Community Name', + workName: 'Work Order Name', + typeName: 'Type Name', + workCycle: 'Cycle', + createUser: 'Creator', + staffName: 'Handler', + timeRange: 'Time Range', + status: 'Status', + createTime: 'Create Time', + finishTime: 'Finish Time' + }, + status: { + timeout: 'Timeout' + }, + workCycle: { + once: 'One-time', + periodic: 'Periodic' + }, + community: { + title: 'Community Selection', + all: 'All Communities', + fetchError: 'Failed to load communities' + }, + fetchError: 'Failed to load work orders' + } + }, + zh: { + adminWorkPool: { + search: { + title: '查询条件', + workName: '工单名称', + createUser: '发起人', + staffName: '处理人', + startTime: '开始时间', + endTime: '结束时间' + }, + list: { + title: '工作单池' + }, + table: { + id: '编号', + communityName: '小区名称', + workName: '工单名称', + typeName: '类型名称', + workCycle: '标识', + createUser: '发起人', + staffName: '处理人', + timeRange: '时间段', + status: '状态', + createTime: '创建时间', + finishTime: '完成时间' + }, + status: { + timeout: '超时' + }, + workCycle: { + once: '一次性工单', + periodic: '周期性工单' + }, + community: { + title: '小区选择', + all: '全部小区', + fetchError: '加载小区失败' + }, + fetchError: '加载工单失败' + } + } +} \ No newline at end of file diff --git a/src/views/work/adminWorkPoolList.vue b/src/views/work/adminWorkPoolList.vue new file mode 100644 index 0000000..d0068ec --- /dev/null +++ b/src/views/work/adminWorkPoolList.vue @@ -0,0 +1,208 @@ + + + + + + + + + + {{ $t('adminWorkPool.search.title') }} + + + + + + + + + + + + + + + + + + + + + {{ $t('common.search') }} + + + + {{ $t('common.reset') }} + + + + + + + + {{ $t('adminWorkPool.list.title') }} + + + + + + + + + {{ scope.row.workCycle === '1001' ? $t('adminWorkPool.workCycle.once') : + $t('adminWorkPool.workCycle.periodic') }} + + + + + + {{ scope.row.staffName || '-' }} + + + + + {{ scope.row.startTime }}~{{ scope.row.endTime }} + + + + + {{ scope.row.stateName }} + + ({{ $t('adminWorkPool.status.timeout') }}) + + + + + + + {{ scope.row.finishTime || '-' }} + + + + + + {{ $t('common.detail') }} + + + + + + + + + + + + + + + \ No newline at end of file