From 71abc697ac23be909a98a4fc6219b42a5757d3e4 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Tue, 10 Mar 2026 13:29:29 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1=E3=80=81=E7=B3=BB=E7=BB=9F=E7=BA=A7?= =?UTF-8?q?=E5=88=AB=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=202=E3=80=81?= =?UTF-8?q?=E6=9C=BA=E6=9E=84=E5=8A=A0=E7=9B=9F=E5=B7=A5=E5=8D=95-?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E9=85=8D=E7=BD=AE=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../errorrecordlog/ErrorRecordLog.api.ts | 72 +++++ .../errorrecordlog/ErrorRecordLog.data.ts | 83 ++++++ .../errorrecordlog/ErrorRecordLogList.vue | 225 ++++++++++++++ .../components/ErrorRecordLogForm.vue | 274 ++++++++++++++++++ .../components/ErrorRecordLogModal.vue | 82 ++++++ .../workorder/components/DataSourceForm.vue | 46 ++- 6 files changed, 779 insertions(+), 3 deletions(-) create mode 100644 src/views/admin/errorrecordlog/ErrorRecordLog.api.ts create mode 100644 src/views/admin/errorrecordlog/ErrorRecordLog.data.ts create mode 100644 src/views/admin/errorrecordlog/ErrorRecordLogList.vue create mode 100644 src/views/admin/errorrecordlog/components/ErrorRecordLogForm.vue create mode 100644 src/views/admin/errorrecordlog/components/ErrorRecordLogModal.vue diff --git a/src/views/admin/errorrecordlog/ErrorRecordLog.api.ts b/src/views/admin/errorrecordlog/ErrorRecordLog.api.ts new file mode 100644 index 0000000..4d341bb --- /dev/null +++ b/src/views/admin/errorrecordlog/ErrorRecordLog.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/errorrecordlog/errorRecordLog/list', + save='/errorrecordlog/errorRecordLog/add', + edit='/errorrecordlog/errorRecordLog/edit', + deleteOne = '/errorrecordlog/errorRecordLog/delete', + deleteBatch = '/errorrecordlog/errorRecordLog/deleteBatch', + importExcel = '/errorrecordlog/errorRecordLog/importExcel', + exportXls = '/errorrecordlog/errorRecordLog/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/admin/errorrecordlog/ErrorRecordLog.data.ts b/src/views/admin/errorrecordlog/ErrorRecordLog.data.ts new file mode 100644 index 0000000..9c7ec25 --- /dev/null +++ b/src/views/admin/errorrecordlog/ErrorRecordLog.data.ts @@ -0,0 +1,83 @@ +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '错误发生平台', + align: 'center', + dataIndex: 'orgName', + ellipsis: false, + }, + { + title: '错误发生平台编码', + align: 'center', + dataIndex: 'orgCode', + ellipsis: false, + }, + { + title: '功能模块', + align: 'center', + dataIndex: 'functionModule', + ellipsis: false, + }, + { + title: '具体环节', + align: 'center', + dataIndex: 'functionAction', + ellipsis: false, + }, + { + title: '错误简介', + align: 'center', + dataIndex: 'errorBrief', + ellipsis: false, + }, + { + title: '错误类型', + align: 'center', + dataIndex: 'errorType', + ellipsis: false, + width:120 + }, + { + title: '错误级别', + align: 'center', + dataIndex: 'errorLevel', + width:120 + }, + { + title: '处理状态', + align: 'center', + dataIndex: 'handleStatus', + width:120 + }, + { + title: '处理人', + align: 'center', + dataIndex: 'handler', + ellipsis: false, + width:120 + }, + { + title: '处理时间', + align: 'center', + dataIndex: 'handleTime', + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + functionModule: { title: '功能模块', order: 0, view: 'text', type: 'string' }, + functionAction: { title: '具体环节', order: 1, view: 'text', type: 'string' }, + errorBrief: { title: '错误简介', order: 2, view: 'text', type: 'string' }, + errorType: { title: '错误类型', order: 6, view: 'text', type: 'string' }, + errorLevel: { title: '错误级别', order: 8, view: 'number', type: 'number' }, + handleStatus: { title: '处理状态', order: 11, view: 'number', type: 'number' }, + handler: { title: '处理人', order: 13, view: 'text', type: 'string' }, + handleTime: { title: '处理时间', order: 14, view: 'datetime', type: 'string' }, + orgName: { title: '机构名称', order: 20, view: 'text', type: 'string' }, + orgCode: { title: '机构编码', order: 21, view: 'text', type: 'string' }, +}; diff --git a/src/views/admin/errorrecordlog/ErrorRecordLogList.vue b/src/views/admin/errorrecordlog/ErrorRecordLogList.vue new file mode 100644 index 0000000..f9c6ecf --- /dev/null +++ b/src/views/admin/errorrecordlog/ErrorRecordLogList.vue @@ -0,0 +1,225 @@ + + + + + diff --git a/src/views/admin/errorrecordlog/components/ErrorRecordLogForm.vue b/src/views/admin/errorrecordlog/components/ErrorRecordLogForm.vue new file mode 100644 index 0000000..80f7d6e --- /dev/null +++ b/src/views/admin/errorrecordlog/components/ErrorRecordLogForm.vue @@ -0,0 +1,274 @@ + + + + + diff --git a/src/views/admin/errorrecordlog/components/ErrorRecordLogModal.vue b/src/views/admin/errorrecordlog/components/ErrorRecordLogModal.vue new file mode 100644 index 0000000..1dfa779 --- /dev/null +++ b/src/views/admin/errorrecordlog/components/ErrorRecordLogModal.vue @@ -0,0 +1,82 @@ + + + + + + diff --git a/src/views/admin/workorder/components/DataSourceForm.vue b/src/views/admin/workorder/components/DataSourceForm.vue index 1b7cf21..325a6ce 100644 --- a/src/views/admin/workorder/components/DataSourceForm.vue +++ b/src/views/admin/workorder/components/DataSourceForm.vue @@ -218,9 +218,49 @@ const validatorRules = reactive({ dbUsername: [{ required: true, message: '请输入数据库用户名!' },], dbPassword: [{ required: true, message: '请输入数据库密码!' },], mediaUrl: [{ required: true, message: '请输入媒体资源地址!' },], - frontPath: [{ required: true, message: '请输入前台路径!' },], - contextPath: [{ required: true, message: '请输入后台路径!' },], - url: [{ required: true, message: '请输入域名' },], + frontPath: [ + { + required: true, + message: '请输入前台路径!' + }, + { + validator: (rule, value) => { + if (value && value.includes('/')) { + return Promise.reject('请勿使用斜杠(/)'); + } + return Promise.resolve(); + }, + trigger: 'blur' + } + ], + contextPath: [ + { + required: true, + message: '请输入后台路径!' + }, + { + validator: (rule, value) => { + if (value && value.includes('/')) { + return Promise.reject('请勿使用斜杠(/)'); + } + return Promise.resolve(); + }, + trigger: 'blur' + }], + url: [ + { + required: true, + message: '请输入域名' + }, + { + validator: (rule, value) => { + if (value && !value.endsWith('/')) { + return Promise.reject('需以斜杠(/)结尾'); + } + return Promise.resolve(); + }, + trigger: 'blur' + }], netUrl: [{ required: true, message: '请输入访问地址' },], accountNo: [{ required: true, message: '请输入账号' },], passwordText: [{ required: true, message: '请输入密码' },], From 4ea50fcab31648c92dcf9712836f6c476bc46dc2 Mon Sep 17 00:00:00 2001 From: "1378012178@qq.com" <1378012178@qq.com> Date: Tue, 10 Mar 2026 17:11:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=BA=BA=E3=80=81=E5=8F=8D=E9=A6=88=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=9B=9E=E6=98=BE=202=E3=80=81=E5=B7=A5=E5=8D=95=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E4=B8=AD=E5=8E=BB=E6=8E=89=E5=A4=84=E7=90=86=E4=BA=BA?= =?UTF-8?q?=E3=80=81=E5=8F=8D=E9=A6=88=E6=97=B6=E9=97=B4=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=80=BC=E7=9A=84=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/workorder/WorkOrder.data.ts | 76 +++++++++++-------- .../workorder/components/WorkOrderForm.vue | 4 +- .../workorder/components/WorkOrderModal.vue | 2 +- 3 files changed, 47 insertions(+), 35 deletions(-) diff --git a/src/views/admin/workorder/WorkOrder.data.ts b/src/views/admin/workorder/WorkOrder.data.ts index 4f52bcd..9468120 100644 --- a/src/views/admin/workorder/WorkOrder.data.ts +++ b/src/views/admin/workorder/WorkOrder.data.ts @@ -1,31 +1,31 @@ -import {BasicColumn} from '/@/components/Table'; -import {FormSchema} from '/@/components/Table'; -import { rules} from '/@/utils/helper/validator'; +import { BasicColumn } from '/@/components/Table'; +import { FormSchema } from '/@/components/Table'; +import { rules } from '/@/utils/helper/validator'; import { render } from '/@/utils/common/renderUtils'; import { getWeekMonthQuarterYear } from '/@/utils'; //列表数据 export const columns: BasicColumn[] = [ { title: '机构名称', - align: "center", + align: 'center', dataIndex: 'orgName', - width:260 + width: 260, }, { title: '机构编码', - align: "center", + align: 'center', dataIndex: 'orgCode', - width:120 + width: 120, }, { title: '平台类型', - align: "center", - dataIndex: 'platType_dictText' + align: 'center', + dataIndex: 'platType_dictText', }, { title: '工单类型', - align: "center", - dataIndex: 'workType_dictText' + align: 'center', + dataIndex: 'workType_dictText', }, // { // title: '标题', @@ -35,42 +35,54 @@ export const columns: BasicColumn[] = [ // }, { title: '工单状态', - align: "center", - dataIndex: 'status_dictText' + align: 'center', + dataIndex: 'status_dictText', }, { title: '提交人', - align: "center", - dataIndex: 'createBy' + align: 'center', + dataIndex: 'createBy', }, { title: '提交时间', - align: "center", - dataIndex: 'createTime' + align: 'center', + dataIndex: 'createTime', }, { title: '处理人', - align: "center", - dataIndex: 'handleBy' + align: 'center', + dataIndex: 'handleBy', + customRender: ({ text }) => { + if (!!text) { + return text; + } + return '-'; + }, }, { title: '反馈时间', - align: "center", - dataIndex: 'replyTime' + align: 'center', + dataIndex: 'replyTime', + customRender: ({ text }) => { + if (!!text) { + return text; + } + return '-'; + }, }, ]; // 高级查询数据 export const superQuerySchema = { - orgId: {title: '机构ID',order: 0,view: 'text', type: 'string',}, - orgCode: {title: '机构编码',order: 1,view: 'text', type: 'string',}, - orgName: {title: '机构名称',order: 2,view: 'text', type: 'string',}, - platType: {title: '平台类型pc wechat pad',order: 3,view: 'text', type: 'string',}, - title: {title: '标题',order: 4,view: 'text', type: 'string',}, - content: {title: '描述',order: 5,view: 'text', type: 'string',}, - status: {title: '状态 0待接收 1处理中 3已解决 4工单异常 5外部原因',order: 6,view: 'text', type: 'string',}, - createBy: {title: '创建人',order: 7,view: 'text', type: 'string',}, - createTime: {title: '创建时间',order: 8,view: 'datetime', type: 'string',}, - replyTime: {title: '反馈时间',order: 9,view: 'datetime', type: 'string',}, - handleBy: {title: '处理人',order: 10,view: 'text', type: 'string',}, + orgId: { title: '机构ID', order: 0, view: 'text', type: 'string' }, + orgCode: { title: '机构编码', order: 1, view: 'text', type: 'string' }, + orgName: { title: '机构名称', order: 2, view: 'text', type: 'string' }, + platType: { title: '平台类型pc wechat pad', order: 3, view: 'text', type: 'string' }, + title: { title: '标题', order: 4, view: 'text', type: 'string' }, + content: { title: '描述', order: 5, view: 'text', type: 'string' }, + status: { title: '状态 0待接收 1处理中 3已解决 4工单异常 5外部原因', order: 6, view: 'text', type: 'string' }, + createBy: { title: '创建人', order: 7, view: 'text', type: 'string' }, + createTime: { title: '创建时间', order: 8, view: 'datetime', type: 'string' }, + replyTime: { title: '反馈时间', order: 9, view: 'datetime', type: 'string' }, + handleBy: { title: '处理人', order: 10, view: 'text', type: 'string' }, }; diff --git a/src/views/admin/workorder/components/WorkOrderForm.vue b/src/views/admin/workorder/components/WorkOrderForm.vue index a5ed7f9..26156c0 100644 --- a/src/views/admin/workorder/components/WorkOrderForm.vue +++ b/src/views/admin/workorder/components/WorkOrderForm.vue @@ -63,13 +63,13 @@ - + - + diff --git a/src/views/admin/workorder/components/WorkOrderModal.vue b/src/views/admin/workorder/components/WorkOrderModal.vue index 6a49b05..4ec54be 100644 --- a/src/views/admin/workorder/components/WorkOrderModal.vue +++ b/src/views/admin/workorder/components/WorkOrderModal.vue @@ -89,7 +89,7 @@ function add() { * @param record */ function edit(record) { - title.value = disableSubmit.value ? '详情' : '编辑'; + title.value = disableSubmit.value ? '工单详情' : '编辑'; visible.value = true; nextTick(() => { registerForm.value.edit(record);