From 7eaa49afbc214fbc79560137f556538cac691845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Thu, 24 Jul 2025 10:08:39 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat(router):=20=E6=B7=BB=E5=8A=A0=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=92=8C=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 router/index.js 中引入应用管理路由 - 新增应用管理路由配置文件 applicationManagement.js - 实现雇则风筛规则和雇则风筛记录两个页面组件 - 添加表格数据加载、查询、重置等功能- 实现新增、编辑、删除等操作的模拟 --- .../generatedRouter/applicationManagement.js | 29 +++ src/router/index.js | 7 +- .../employRecord/index.vue | 180 ++++++++++++++ .../employRule/index.vue | 225 ++++++++++++++++++ 4 files changed, 440 insertions(+), 1 deletion(-) create mode 100644 src/router/generatedRouter/applicationManagement.js create mode 100644 src/views/applicationManagement/employRecord/index.vue create mode 100644 src/views/applicationManagement/employRule/index.vue diff --git a/src/router/generatedRouter/applicationManagement.js b/src/router/generatedRouter/applicationManagement.js new file mode 100644 index 0000000..ac6453e --- /dev/null +++ b/src/router/generatedRouter/applicationManagement.js @@ -0,0 +1,29 @@ +import layout from '@/views/app/layout/index.vue' + +const applicationManagementRouter = [ + { + path: '/applicationManagement', + component: layout, + redirect: '/applicationManagement/employRule', + name: 'ApplicationManagement', + meta: { title: '应用管理', icon: 'el-icon-s-management' }, + children: [ + { + path: 'employRule', + name: 'EmployRule', + component: () => + import('@/views/applicationManagement/employRule/index.vue'), + meta: { title: '雇则风筛规则', icon: 'el-icon-setting' } + }, + { + path: 'employRecord', + name: 'EmployRecord', + component: () => + import('@/views/applicationManagement/employRecord/index.vue'), + meta: { title: '雇则风筛记录', icon: 'el-icon-document' } + } + ] + } +] + +export default applicationManagementRouter diff --git a/src/router/index.js b/src/router/index.js index 6fa3613..c3bc81b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,10 +2,15 @@ import Vue from 'vue' import Router from 'vue-router' import App from './app/index' import generatedRouter from './generatedRouter' +import applicationManagementRouter from './generatedRouter/applicationManagement' Vue.use(Router) -export const constantRouterMap = [...App, ...generatedRouter] // 静态路由 +export const constantRouterMap = [ + ...App, + ...generatedRouter, + ...applicationManagementRouter +] // 静态路由 export default new Router({ mode: 'hash', //路由模式 base: process.env.BASE_URL, diff --git a/src/views/applicationManagement/employRecord/index.vue b/src/views/applicationManagement/employRecord/index.vue new file mode 100644 index 0000000..239fcf1 --- /dev/null +++ b/src/views/applicationManagement/employRecord/index.vue @@ -0,0 +1,180 @@ + + + + + \ No newline at end of file diff --git a/src/views/applicationManagement/employRule/index.vue b/src/views/applicationManagement/employRule/index.vue new file mode 100644 index 0000000..9effebe --- /dev/null +++ b/src/views/applicationManagement/employRule/index.vue @@ -0,0 +1,225 @@ + + + + + \ No newline at end of file From f9b3698c485fb00331b8b119667de9bd6c75935e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Thu, 24 Jul 2025 10:24:10 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat(applicationManagement):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=9B=87=E5=91=98=E8=AE=B0=E5=BD=95=E5=92=8C=E8=A7=84?= =?UTF-8?q?=E5=88=99=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改雇员记录页面的查询条件和表格列 - 更新规则页面的查询条件和表格列 -增加规则页面的查看详情和删除功能 - 实现规则状态切换功能 --- .../employRecord/index.vue | 80 +++++++----- .../employRule/index.vue | 123 ++++++++++++++---- 2 files changed, 144 insertions(+), 59 deletions(-) diff --git a/src/views/applicationManagement/employRecord/index.vue b/src/views/applicationManagement/employRecord/index.vue index 239fcf1..a14b80c 100644 --- a/src/views/applicationManagement/employRecord/index.vue +++ b/src/views/applicationManagement/employRecord/index.vue @@ -9,24 +9,41 @@ ref="queryParams" inline > - + - - - + + + + + + + + +
{ - return h( - 'el-tag', - { - props: { - type: params.row.status === 0 ? 'success' : 'danger', - size: 'small' - } - }, - params.row.status === 0 ? '成功' : '失败' - ) - } - }, + { prop: 'index', key: '序号', width: 60 }, + { prop: 'approvalNo', key: '审批单号' }, + { prop: 'insuredName', key: '被保险人名称' }, + { prop: 'institution', key: '归属机构' }, + { prop: 'insurancePeriod', key: '保险期限' }, + { prop: 'submitTime', key: '提交时间' }, { key: '操作', isRedraw: true, @@ -99,7 +109,7 @@ export default { type: 'text', size: 'mini', icon: 'el-icon-view', - title: '查看' + title: '查看详情' }, class: 'normal-button', on: { click: () => this.handleView(params.row) } @@ -127,10 +137,12 @@ export default { this.tableData = [ { id: 1, - recordName: '记录1', - recordDesc: '记录描述1', - createTime: '2023-01-01 12:00:00', - status: 0 + index: 1, + approvalNo: 'AP20230101001', + insuredName: '张三', + institution: '机构1', + insurancePeriod: '2023-01-01 至 2024-01-01', + submitTime: '2023-01-01 12:00:00' } ] this.tableConfig.total = 1 diff --git a/src/views/applicationManagement/employRule/index.vue b/src/views/applicationManagement/employRule/index.vue index 9effebe..231e08a 100644 --- a/src/views/applicationManagement/employRule/index.vue +++ b/src/views/applicationManagement/employRule/index.vue @@ -9,16 +9,35 @@ ref="queryParams" inline > - + + + + + + + + + + + - - - + + { return h( 'el-tag', @@ -95,6 +131,20 @@ export default { isRedraw: true, render: (h, params) => { return h('div', [ + h( + 'el-button', + { + props: { + type: 'text', + size: 'mini', + icon: 'el-icon-view', + title: '查看详情' + }, + class: 'normal-button', + on: { click: () => this.handleView(params.row) } + }, + '' + ), h( 'el-button', { @@ -109,6 +159,20 @@ export default { }, '' ), + h( + 'el-button', + { + props: { + type: 'text', + size: 'mini', + style: 'color: #F56C6C', + icon: 'el-icon-delete', + title: '删除' + }, + on: { click: () => this.handleDelete(params.row) } + }, + '' + ), h( 'el-button', { @@ -122,18 +186,9 @@ export default { title: params.row.status === 0 ? '停用' : '启用' }, on: { click: () => this.handleToggleStatus(params.row) } - } - ), - h('el-button', { - props: { - type: 'text', - size: 'mini', - style: 'color: #F56C6C', - icon: 'el-icon-delete', - title: '删除' }, - on: { click: () => this.handleDelete(params.row) } - }) + '' + ) ]) } } @@ -155,9 +210,11 @@ export default { this.tableData = [ { id: 1, - ruleName: '规则1', + index: 1, + ruleType: '类型1', + fieldType: '字段类型1', ruleDesc: '规则描述1', - createTime: '2023-01-01 12:00:00', + riskMessage: '风险展示话术1', status: 0 } ] @@ -176,11 +233,27 @@ export default { handleAdd() { this.$message.info('新增功能待实现') }, + handleView(row) { + this.$message.info('查看详情功能待实现') + }, handleEdit(row) { this.$message.info('编辑功能待实现') }, handleToggleStatus(row) { - this.$message.info('状态切换功能待实现') + // 启用的数据能停用,停用的数据反之 + const newStatus = row.status === 0 ? 1 : 0; + const statusText = row.status === 0 ? '停用' : '启用'; + + this.$messageBox( + () => { + // 实际应该调用API更新状态 + row.status = newStatus; + this.$message.success(`${statusText}成功`) + }, + `确认${statusText}该规则吗?`, + 'warning', + '提示' + ) }, handleSizeChange(val) { this.queryParams.pageSize = val From 4764c6e1e400e524d7204b07558b62c367ec0504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Thu, 24 Jul 2025 10:28:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat(applicationManagement):=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=9B=87=E5=88=99=E9=A3=8E=E7=AD=9B=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E5=92=8C=E8=A7=84=E5=88=99=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?-=20=E6=B7=BB=E5=8A=A0=E9=9B=87=E5=88=99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81=E8=A7=84=E5=88=99=E7=B1=BB=E5=9E=8B=E7=AD=89?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E9=80=89=E9=A1=B9=E6=95=B0=E6=8D=AE=20-=20?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E6=9F=A5=E8=AF=A2=E3=80=81=E9=87=8D=E7=BD=AE?= =?UTF-8?q?=E3=80=81=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85=E7=AD=89=E5=9F=BA?= =?UTF-8?q?=E6=9C=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../employRecord/index.vue | 30 +++++++++++++- .../employRule/index.vue | 39 ++++++++++++++++++- 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/src/views/applicationManagement/employRecord/index.vue b/src/views/applicationManagement/employRecord/index.vue index a14b80c..b279e9a 100644 --- a/src/views/applicationManagement/employRecord/index.vue +++ b/src/views/applicationManagement/employRecord/index.vue @@ -1,5 +1,13 @@ +