From 5f7fc56dc8299a4e7865a21b5bebb00b05147bff Mon Sep 17 00:00:00 2001 From: dengyinhuan Date: Fri, 3 Mar 2023 09:06:17 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/1.0.3/schema/13.updata_resource.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 script/1.0.3/schema/13.updata_resource.sql diff --git a/script/1.0.3/schema/13.updata_resource.sql b/script/1.0.3/schema/13.updata_resource.sql new file mode 100644 index 0000000..7e62a51 --- /dev/null +++ b/script/1.0.3/schema/13.updata_resource.sql @@ -0,0 +1,2 @@ +DELETE FROM public.resource WHERE code = 'XIUGAIJIUHA'; +DELETE FROM public.user_resource WHERE resource = 'XIUGAIJIUHA'; \ No newline at end of file From a625ecb75ec91e86a76d94d231785d5dd3bfca28 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Fri, 3 Mar 2023 10:27:53 +0800 Subject: [PATCH 2/3] =?UTF-8?q?(+)=20=E5=B7=A1=E6=A3=80=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../1.0.4/schema/1.create_report_serial.sql | 34 ++++++++++++++++ script/1.0.4/schema/2.create_report_info.sql | 39 +++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 script/1.0.4/schema/1.create_report_serial.sql create mode 100644 script/1.0.4/schema/2.create_report_info.sql diff --git a/script/1.0.4/schema/1.create_report_serial.sql b/script/1.0.4/schema/1.create_report_serial.sql new file mode 100644 index 0000000..13613af --- /dev/null +++ b/script/1.0.4/schema/1.create_report_serial.sql @@ -0,0 +1,34 @@ +/* + Navicat Premium Data Transfer + + Source Server : 10.8.30.156 + Source Server Type : PostgreSQL + Source Server Version : 100019 + Source Host : 10.8.30.156:5432 + Source Catalog : inspection + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 100019 + File Encoding : 65001 + + Date: 03/03/2023 09:20:08 +*/ + + +-- ---------------------------- +-- Table structure for report_serial +-- ---------------------------- +DROP TABLE IF EXISTS "public"."report_serial"; +CREATE TABLE "public"."report_serial" ( + "project_id" int4 NOT NULL, + "serial_no" int4 +) +; +COMMENT ON COLUMN "public"."report_serial"."project_id" IS '结构物id'; +COMMENT ON COLUMN "public"."report_serial"."serial_no" IS '报告序号'; + +-- ---------------------------- +-- Primary Key structure for table report_serial +-- ---------------------------- +ALTER TABLE "public"."report_serial" ADD CONSTRAINT "report_serial_pkey" PRIMARY KEY ("project_id"); diff --git a/script/1.0.4/schema/2.create_report_info.sql b/script/1.0.4/schema/2.create_report_info.sql new file mode 100644 index 0000000..cde2c83 --- /dev/null +++ b/script/1.0.4/schema/2.create_report_info.sql @@ -0,0 +1,39 @@ +/* + Navicat Premium Data Transfer + + Source Server : 10.8.30.156 + Source Server Type : PostgreSQL + Source Server Version : 100019 + Source Host : 10.8.30.156:5432 + Source Catalog : inspection + Source Schema : public + + Target Server Type : PostgreSQL + Target Server Version : 100019 + File Encoding : 65001 + + Date: 03/03/2023 09:20:24 +*/ + + +-- ---------------------------- +-- Table structure for report_info +-- ---------------------------- +DROP TABLE IF EXISTS "public"."report_info"; +CREATE TABLE "public"."report_info" ( + "id" int4 NOT NULL DEFAULT nextval('report_info_id_seq'::regclass), + "project_id" int4 NOT NULL, + "excel_path" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "inspect_tm" timestamp(0) NOT NULL, + "report_tm" timestamp(0) NOT NULL +) +; +COMMENT ON COLUMN "public"."report_info"."project_id" IS '结构物id'; +COMMENT ON COLUMN "public"."report_info"."excel_path" IS '文件路径'; +COMMENT ON COLUMN "public"."report_info"."inspect_tm" IS '巡检时间'; +COMMENT ON COLUMN "public"."report_info"."report_tm" IS '文件生成时间'; + +-- ---------------------------- +-- Primary Key structure for table report_info +-- ---------------------------- +ALTER TABLE "public"."report_info" ADD CONSTRAINT "report_info_pkey" PRIMARY KEY ("id"); From 1e9366910a72d40c9bf17acc9fa6b4982f571bba Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Fri, 3 Mar 2023 10:29:05 +0800 Subject: [PATCH 3/3] =?UTF-8?q?(+)=20=E5=B7=A1=E6=A3=80=E6=8A=A5=E5=91=8Aw?= =?UTF-8?q?eb=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/patrolManage/actions/index.js | 2 + .../sections/patrolManage/actions/report.js | 15 ++++ .../sections/patrolManage/containers/index.js | 3 +- .../patrolManage/containers/patrolReport.js | 88 +++++++++++++++++++ .../src/sections/patrolManage/nav-item.js | 3 + .../src/sections/patrolManage/routes.js | 10 ++- 6 files changed, 117 insertions(+), 4 deletions(-) create mode 100644 web/client/src/sections/patrolManage/actions/report.js create mode 100644 web/client/src/sections/patrolManage/containers/patrolReport.js diff --git a/web/client/src/sections/patrolManage/actions/index.js b/web/client/src/sections/patrolManage/actions/index.js index d6e7974..ad713eb 100644 --- a/web/client/src/sections/patrolManage/actions/index.js +++ b/web/client/src/sections/patrolManage/actions/index.js @@ -2,12 +2,14 @@ import * as plan from './plan' import * as record from './record' +import * as report from './report' import * as template from './template' import * as checkItems from './checkItems' export default { ...plan, ...record, + ...report, ...template, ...checkItems, } \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/actions/report.js b/web/client/src/sections/patrolManage/actions/report.js new file mode 100644 index 0000000..ca1d63e --- /dev/null +++ b/web/client/src/sections/patrolManage/actions/report.js @@ -0,0 +1,15 @@ +'use strict'; + +import { basicAction } from '@peace/utils' +import { ApiTable } from '$utils' + +// export function getPatrolReport (query) { +// return dispatch => basicAction({ +// type: 'get', +// query, +// dispatch: dispatch, +// actionType: 'GET_PATROL_REPORT', +// url: ApiTable.getPatrolReport, +// msg: { error: '获取巡检报告失败' }, +// }); +// } \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/index.js b/web/client/src/sections/patrolManage/containers/index.js index acdb15d..8bcbd53 100644 --- a/web/client/src/sections/patrolManage/containers/index.js +++ b/web/client/src/sections/patrolManage/containers/index.js @@ -2,7 +2,8 @@ import PatrolPlan from './patrolPlan'; import PatrolReocrd from './patrolRecord'; +import PatrolReport from './patrolReport'; import CheckItems from './checkItems'; import PlanTemplate from './patrolTemplate'; -export { PatrolPlan, PatrolReocrd, CheckItems, PlanTemplate }; \ No newline at end of file +export { PatrolPlan, PatrolReocrd, PatrolReport, CheckItems, PlanTemplate }; \ No newline at end of file diff --git a/web/client/src/sections/patrolManage/containers/patrolReport.js b/web/client/src/sections/patrolManage/containers/patrolReport.js new file mode 100644 index 0000000..dee37e8 --- /dev/null +++ b/web/client/src/sections/patrolManage/containers/patrolReport.js @@ -0,0 +1,88 @@ +import React, { useState, useRef } from 'react'; +import { connect } from 'react-redux'; +import { Button } from 'antd'; +import ProTable from '@ant-design/pro-table'; +import { getCheckItems } from '../actions/checkItems'; + +function patrolReport(props) { + const { dispatch } = props; + const tableRef = useRef(); + const [dataSource, setDataSource] = useState([{}]); + + const columns = [{ + title: '结构物名称', + dataIndex: 'name', + key: 'name', + ellipsis: true, + width: 150, + }, { + title: '巡检报告名称', + dataIndex: 'groupName', + key: 'groupName', + ellipsis: true, + search: false, + width: 250, + render: (_, record) => { + return
{record?.checkItemsGroup?.name}
+ } + }, { + title: '巡检日期', + dataIndex: 'date', + key: 'date', + valueType: 'dateRange', + ellipsis: true, + width: 150, + render: (_, record) => { + return
{record?.checkItemsGroup?.name}
+ } + }, { + title: '操作', + dataIndex: 'action', + key: 'action', + search: false, + width: 200, + render: (_, record) => { + return <> + + + + }, + }]; + + return ( + <> + { + // const res = await dispatch(getCheckItems({ + // limit: params.pageSize, + // page: params.current - 1, + // name: params?.name + // })); + // setDataSource(res?.payload.data?.rows); + // return { + // ...res, + // total: res.payload.data.count ? res.payload.data.count : 0, + // }; + }} + onReset={() => { }} + /> + + ) +} + +function mapStateToProps(state) { + const { auth } = state + return { + user: auth.user + } +} +export default connect(mapStateToProps)(patrolReport); diff --git a/web/client/src/sections/patrolManage/nav-item.js b/web/client/src/sections/patrolManage/nav-item.js index 7b75be9..4951534 100644 --- a/web/client/src/sections/patrolManage/nav-item.js +++ b/web/client/src/sections/patrolManage/nav-item.js @@ -17,6 +17,9 @@ export function getNavItem (user, dispatch) { {Func.isAuthorized('PATROL_RECORD_VIEW') && 巡检记录 } + {Func.isAuthorized('CHECKREPORT') && + 巡检报告 + } {Func.isAuthorized('CHECKITEMSET') && 检查项设定 } diff --git a/web/client/src/sections/patrolManage/routes.js b/web/client/src/sections/patrolManage/routes.js index ba0f6e4..fd8190f 100644 --- a/web/client/src/sections/patrolManage/routes.js +++ b/web/client/src/sections/patrolManage/routes.js @@ -1,5 +1,5 @@ 'use strict'; -import { PatrolPlan, PatrolReocrd, CheckItems, PlanTemplate } from './containers'; +import { PatrolPlan, PatrolReocrd, PatrolReport, CheckItems, PlanTemplate } from './containers'; export default [{ type: 'inner', @@ -17,8 +17,12 @@ export default [{ key: 'patrolRecord', component: PatrolReocrd, breadcrumb: '巡检记录', - }, - { + }, { + path: '/patrolReport', + key: 'patrolReport', + component: PatrolReport, + breadcrumb: '巡检报告', + }, { path: '/checkItems', key: 'checkItems', component: CheckItems,