From e1234ebdb7070a983180a3219888db97eb0084ab Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Tue, 20 Dec 2022 14:53:54 +0800 Subject: [PATCH 1/9] =?UTF-8?q?(*)=E9=83=A8=E9=97=A8=E5=9F=B9=E8=AE=AD?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../humanAffairs/containers/departmentTrain/importModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/humanAffairs/containers/departmentTrain/importModal.js b/web/client/src/sections/humanAffairs/containers/departmentTrain/importModal.js index 4f8b2a0..a02b69c 100644 --- a/web/client/src/sections/humanAffairs/containers/departmentTrain/importModal.js +++ b/web/client/src/sections/humanAffairs/containers/departmentTrain/importModal.js @@ -116,7 +116,7 @@ const ImportModal = props => { { setMsg(''); setPostData([]); From aa45b9c350f1a147e4e9f9c8c5df6f8e61806ab3 Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Tue, 20 Dec 2022 15:02:24 +0800 Subject: [PATCH 2/9] =?UTF-8?q?(*)=E5=8E=BB=E6=8E=89=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/departmentTrain/departmentTrainRecord.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/web/client/src/sections/humanAffairs/containers/departmentTrain/departmentTrainRecord.jsx b/web/client/src/sections/humanAffairs/containers/departmentTrain/departmentTrainRecord.jsx index 12c2a73..9790ff7 100644 --- a/web/client/src/sections/humanAffairs/containers/departmentTrain/departmentTrainRecord.jsx +++ b/web/client/src/sections/humanAffairs/containers/departmentTrain/departmentTrainRecord.jsx @@ -128,11 +128,7 @@ const DepartmentTrainRecord = (props) => { render: (text, record) => { if (record.origin === 'import') return
- onEdit(record)}>编辑   - {/* confirmDelete(record.id)} style={{ width: 330 }} - > 删除 */} + onEdit(record)}>编辑
else return - From d04b9af679171e2494bcc8380e757ddb500761dd Mon Sep 17 00:00:00 2001 From: zhangminghua Date: Tue, 20 Dec 2022 15:19:02 +0800 Subject: [PATCH 3/9] =?UTF-8?q?(*)=E5=A2=9E=E5=8A=A0=E5=BF=85=E8=A6=81?= =?UTF-8?q?=E7=9A=84=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../humanAffairs/containers/departmentTrain/editModal.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/client/src/sections/humanAffairs/containers/departmentTrain/editModal.js b/web/client/src/sections/humanAffairs/containers/departmentTrain/editModal.js index 90019f8..8589533 100644 --- a/web/client/src/sections/humanAffairs/containers/departmentTrain/editModal.js +++ b/web/client/src/sections/humanAffairs/containers/departmentTrain/editModal.js @@ -82,7 +82,8 @@ const EditModal = (props) => { return ''; } }; - + //validate和validateContent写通用方法后,校验文本不提示了..奇怪 + //validate和validateContent-暂不修改合并 const validateContent = (val, values) => { if (!val) { setValidateStatus('error'); From eefb8795576ffddc48ad25bff263b2c0e50de574 Mon Sep 17 00:00:00 2001 From: Archer_cdm Date: Tue, 20 Dec 2022 16:53:38 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=EF=BC=88+=EF=BC=89=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95=E8=84=9A=E6=9C=AC=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../3.2.0/schema/personal_training_create.sql | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 doc/scripts/3.2.0/schema/personal_training_create.sql diff --git a/doc/scripts/3.2.0/schema/personal_training_create.sql b/doc/scripts/3.2.0/schema/personal_training_create.sql new file mode 100644 index 0000000..e81e4ba --- /dev/null +++ b/doc/scripts/3.2.0/schema/personal_training_create.sql @@ -0,0 +1,17 @@ +CREATE TABLE personal_training ( + ID serial PRIMARY KEY NOT NULL, + personalName VARCHAR ( 255 ) NOT NULL,-- 姓名 + departmentName VARCHAR ( 255 ) NOT NULL,-- 部门名称 + trainingType VARCHAR ( 255 ) NOT NULL,-- 培训类型 + topic VARCHAR ( 255 ) NOT NULL,-- 课程主题 + trainer VARCHAR ( 255 ) NOT NULL,-- 培训讲师 + trainDate TIMESTAMP NOT NULL,-- 培训时间 + trainTime VARCHAR ( 255 ) NOT NULL,-- 培训时长 + trainMethod VARCHAR ( 255 ) NOT NULL,-- 培训方式 + attendanceScore VARCHAR ( 255 ),-- 考勤分数 + appraisalMethod VARCHAR ( 255 ) NOT NULL,-- 考核形式 + appraisalScore VARCHAR ( 255 ),-- 考核分数 + totalScore VARCHAR ( 255 ),-- 总分 + origin VARCHAR ( 255 ) --来源 + +); \ No newline at end of file From 030afa900870fbc91c7a7e5d9d77a45888497016 Mon Sep 17 00:00:00 2001 From: Archer_cdm Date: Tue, 20 Dec 2022 17:18:51 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=EF=BC=88*=EF=BC=89=E4=B8=AA=E4=BA=BA?= =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95sql=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=92=8C=E9=83=A8=E9=97=A8=E5=9F=B9=E8=AE=AD=E8=AE=B0=E5=BD=95?= =?UTF-8?q?sql=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/scripts/3.2.0/schema/dept_training.sql | 32 +++++++++++ .../3.2.0/schema/personal_training_create.sql | 54 +++++++++++++------ 2 files changed, 70 insertions(+), 16 deletions(-) create mode 100644 doc/scripts/3.2.0/schema/dept_training.sql diff --git a/doc/scripts/3.2.0/schema/dept_training.sql b/doc/scripts/3.2.0/schema/dept_training.sql new file mode 100644 index 0000000..7731ec7 --- /dev/null +++ b/doc/scripts/3.2.0/schema/dept_training.sql @@ -0,0 +1,32 @@ +-- ---------------------------- +-- Table structure for dept_training +-- ---------------------------- +DROP TABLE IF EXISTS "public"."dept_training"; +CREATE TABLE "public"."dept_training" ( + "id" int4 NOT NULL DEFAULT nextval('dept_training_id_seq'::regclass), + "departmentname" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "trainingtype" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "traindate" timestamp(6) NOT NULL, + "traincontent" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "trainwho" varchar(255) COLLATE "pg_catalog"."default", + "trainer" varchar(255) COLLATE "pg_catalog"."default", + "trainmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "appraisalmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "traintime" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "attachpath" varchar(255) COLLATE "pg_catalog"."default", + "origin" varchar(255) COLLATE "pg_catalog"."default", + "filesize" varchar(255) COLLATE "pg_catalog"."default", + "filename" varchar(255) COLLATE "pg_catalog"."default", + "filetype" varchar(255) COLLATE "pg_catalog"."default", + "updatedate" timestamptz(6) +) +; + +-- ---------------------------- +-- Records of dept_training +-- ---------------------------- + +-- ---------------------------- +-- Primary Key structure for table dept_training +-- ---------------------------- +ALTER TABLE "public"."dept_training" ADD CONSTRAINT "dept_training_pkey" PRIMARY KEY ("id"); diff --git a/doc/scripts/3.2.0/schema/personal_training_create.sql b/doc/scripts/3.2.0/schema/personal_training_create.sql index e81e4ba..568f7b7 100644 --- a/doc/scripts/3.2.0/schema/personal_training_create.sql +++ b/doc/scripts/3.2.0/schema/personal_training_create.sql @@ -1,17 +1,39 @@ -CREATE TABLE personal_training ( - ID serial PRIMARY KEY NOT NULL, - personalName VARCHAR ( 255 ) NOT NULL,-- 姓名 - departmentName VARCHAR ( 255 ) NOT NULL,-- 部门名称 - trainingType VARCHAR ( 255 ) NOT NULL,-- 培训类型 - topic VARCHAR ( 255 ) NOT NULL,-- 课程主题 - trainer VARCHAR ( 255 ) NOT NULL,-- 培训讲师 - trainDate TIMESTAMP NOT NULL,-- 培训时间 - trainTime VARCHAR ( 255 ) NOT NULL,-- 培训时长 - trainMethod VARCHAR ( 255 ) NOT NULL,-- 培训方式 - attendanceScore VARCHAR ( 255 ),-- 考勤分数 - appraisalMethod VARCHAR ( 255 ) NOT NULL,-- 考核形式 - appraisalScore VARCHAR ( 255 ),-- 考核分数 - totalScore VARCHAR ( 255 ),-- 总分 - origin VARCHAR ( 255 ) --来源 +-- ---------------------------- +-- Table structure for personal_training +-- ---------------------------- +DROP TABLE IF EXISTS "public"."personal_training"; +CREATE TABLE "public"."personal_training" ( + "id" int4 NOT NULL DEFAULT nextval('personal_training_id_seq'::regclass), + "personalname" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "departmentname" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "trainingtype" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "topic" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "trainer" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "traindate" timestamp(6) NOT NULL, + "traintime" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "trainmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "attendancescore" varchar(255) COLLATE "pg_catalog"."default", + "appraisalmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, + "appraisalscore" varchar(255) COLLATE "pg_catalog"."default", + "totalscore" varchar(255) COLLATE "pg_catalog"."default", + "origin" varchar(255) COLLATE "pg_catalog"."default" +) +; +COMMENT ON COLUMN "public"."personal_training"."personalname" IS '姓名'; +COMMENT ON COLUMN "public"."personal_training"."departmentname" IS '部门名称'; +COMMENT ON COLUMN "public"."personal_training"."trainingtype" IS '培训类型'; +COMMENT ON COLUMN "public"."personal_training"."topic" IS '课程主题'; +COMMENT ON COLUMN "public"."personal_training"."trainer" IS '培训讲师'; +COMMENT ON COLUMN "public"."personal_training"."traindate" IS '培训时间'; +COMMENT ON COLUMN "public"."personal_training"."traintime" IS '培训时长'; +COMMENT ON COLUMN "public"."personal_training"."trainmethod" IS '培训方式'; +COMMENT ON COLUMN "public"."personal_training"."attendancescore" IS '考勤分数'; +COMMENT ON COLUMN "public"."personal_training"."appraisalmethod" IS '考核形式'; +COMMENT ON COLUMN "public"."personal_training"."appraisalscore" IS '考核分数'; +COMMENT ON COLUMN "public"."personal_training"."totalscore" IS '总分'; +COMMENT ON COLUMN "public"."personal_training"."origin" IS '来源'; -); \ No newline at end of file +-- ---------------------------- +-- Primary Key structure for table personal_training +-- ---------------------------- +ALTER TABLE "public"."personal_training" ADD CONSTRAINT "personal_training_pkey" PRIMARY KEY ("id"); From 546504d122663434d24ad90c6c3298c8a3ae4ab0 Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 20 Dec 2022 17:19:07 +0800 Subject: [PATCH 6/9] =?UTF-8?q?(*)=E5=9F=B9=E8=AE=AD=E8=B5=84=E6=96=99?= =?UTF-8?q?=E5=BA=93=EF=BC=9A=E5=B7=A6=E4=BE=A7=E6=96=B0=E5=A2=9E=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/resourceRepository/index.js | 40 ++++++- .../lib/routes/resourceRepository/index.js | 7 ++ .../actions/resourceRepository.js | 9 +- .../resourceRepository/folder-model.jsx | 99 ++++++++++++++++ .../containers/resourceRepository.jsx | 107 ++++++++++++------ web/client/src/utils/webapi.js | 4 +- 6 files changed, 221 insertions(+), 45 deletions(-) create mode 100644 web/client/src/sections/humanAffairs/components/resourceRepository/folder-model.jsx diff --git a/api/app/lib/controllers/resourceRepository/index.js b/api/app/lib/controllers/resourceRepository/index.js index d5ec279..cd70a08 100644 --- a/api/app/lib/controllers/resourceRepository/index.js +++ b/api/app/lib/controllers/resourceRepository/index.js @@ -6,7 +6,7 @@ async function getResourceClassify(ctx) { const { models } = ctx.fs.dc; let rlst = []; rlst = [{ - label: "公司培训资料", value: "company", key: "公司培训资料", operation: true, children: [] + label: "公司培训资料", value: "company", key: "公司培训资料", operation: false, children: [] }, { label: "部门培训资料", value: 'dept', key: '部门培训资料', operation: false, children: [] }]; const findObj = { order: [["departmentName", "asc"]] } const filterData = (arrayData, arrIndex, operation) => { @@ -173,20 +173,50 @@ async function postResourceClassify(ctx) { if (trainDate && '' != trainDate) { where.trainDate = trainDate; } - const oldData = await models.TrainingInformation.findOne(where); + const oldData = await models.TrainingInformation.findOne({ where }); + if (oldData) { + ctx.throw("该文件夹已存在"); + } else { + await models.TrainingInformation.create({ + departmentName: departmentName, + trainDate: trainDate + }) + } + } + ctx.status = 204; + } catch (err) { + ctx.status = 400; + ctx.body = { message: err.message || '新增培训资源储备库文件夹失败' } + } +} +async function putResourceClassify(ctx) { + try { + const { models } = ctx.fs.dc; + const { oldDepName, oldTrainDate, departmentName, trainDate } = ctx.request.body; + if (departmentName && '' != departmentName && oldDepName && '' != oldDepName) { + const where = { departmentName: oldDepName }; + + if (trainDate && '' != trainDate && oldTrainDate && '' != oldTrainDate) { + where.trainDate = oldTrainDate; + await models.TrainingInformation.update({ trainDate: trainDate }, { where }); + //三级目录 + } else { + //二级目录 + await models.TrainingInformation.update({ departmentName: departmentName }, { where }); + } } ctx.status = 204; } catch (err) { - ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.status = 400; - ctx.body = { message: err.message || '查询培训资源储备库文件列表失败' } + ctx.body = { message: err.message || '编辑培训资源储备库文件夹失败' }; } } module.exports = { getResourceClassify, getResourceFileList, - postResourceClassify + postResourceClassify, + putResourceClassify } \ No newline at end of file diff --git a/api/app/lib/routes/resourceRepository/index.js b/api/app/lib/routes/resourceRepository/index.js index 6a152e1..59f5727 100644 --- a/api/app/lib/routes/resourceRepository/index.js +++ b/api/app/lib/routes/resourceRepository/index.js @@ -9,4 +9,11 @@ module.exports = function (app, router, opts) { app.fs.api.logAttr['GET/train/trainFiles/resourceRepository/fileList'] = { content: '查询培训资源储备库文件列表', visible: false }; router.get('/train/trainFiles/resourceRepository/fileList', resourceRepository.getResourceFileList); + + app.fs.api.logAttr['POST/train/trainFiles/resourceRepository/classify'] = { content: '新增培训资源储备库文件夹', visible: false }; + router.post('/train/trainFiles/resourceRepository/classify', resourceRepository.postResourceClassify); + + app.fs.api.logAttr['PUT/train/trainFiles/resourceRepository/classify'] = { content: '编辑培训资源储备库文件夹', visible: false }; + router.put('/train/trainFiles/resourceRepository/classify', resourceRepository.putResourceClassify); + }; \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/actions/resourceRepository.js b/web/client/src/sections/humanAffairs/actions/resourceRepository.js index 970f1da..054831d 100644 --- a/web/client/src/sections/humanAffairs/actions/resourceRepository.js +++ b/web/client/src/sections/humanAffairs/actions/resourceRepository.js @@ -32,8 +32,7 @@ export function postResourceClassify(data) { data, actionType: "POST_RESOURCE_CLASSIFY", url: `${ApiTable.postResourceClassify}`, - msg: { option: "新增" }, - reducer: { name: "" }, + msg: { success: "新建成功" }, }); } @@ -45,8 +44,7 @@ export function putResourceClassify(data) { data, actionType: "PUT_RESOURCE_CLASSIFY", url: `${ApiTable.putResourceClassify}`, - msg: { option: "修改" }, - reducer: {}, + msg: { option: "编辑" }, }); } @@ -58,7 +56,6 @@ export function delResourceClassify(data) { dispatch: dispatch, actionType: "DEL_RESOURCE_CLASSIFY", url: `${ApiTable.delResourceClassify}`, - msg: { option: "删除" }, //删除 - reducer: {}, + msg: { option: "删除" }, }); } \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/components/resourceRepository/folder-model.jsx b/web/client/src/sections/humanAffairs/components/resourceRepository/folder-model.jsx new file mode 100644 index 0000000..eaa7178 --- /dev/null +++ b/web/client/src/sections/humanAffairs/components/resourceRepository/folder-model.jsx @@ -0,0 +1,99 @@ +import React, { useRef } from 'react'; +import { Modal, Form, Button, Input } from '@douyinfe/semi-ui'; + +const FolderModal = (props) => { + const { modalData, oldData, onCancel, onOk } = props; + const { title, childFolder, departmentName, trainDate } = modalData; + const add = title.includes("新建"); + + const form = useRef();//表单 + const validatName = (val) => { + if (val && '' == val.trim()) { + return '不可以为空'; + } else + if (val.length > 20) { + return '最大20字符'; + } else { + if (oldData.children) { + if (childFolder) {//三级目录 + let deptChild = oldData.children.find(r => r.label == departmentName).children; + if (!add) { + deptChild = deptChild.filter(r => trainDate != r.label); + } + const old = deptChild.find(r => r.label == val.trim()); + if (old) { + return ("该文件已存在"); + } else { + return ''; + } + } else { //二级目录 + let deptData = oldData.children; + if (!add) { + deptData = deptData.filter(r => departmentName != r.label); + } + const old = deptData.find(r => r.label == val.trim()); + if (old) { + return ("该文件已存在"); + } else { + return ''; + } + } + } + } + return ''; + } + const handleOk = () => { + + form.current.validate().then((values) => { + if (!add) { + values.oldDepName = departmentName; + values.oldTrainDate = trainDate; + } + onOk(add, values); + }); + } + return ( +
(form.current = formApi)} + labelPosition={'left'} + labelAlign={'right'} + labelCol={{ span: 6 }} + wrapperCol={{ span: 18 }} + > + {!childFolder && } + + {childFolder && + < Form.Input + field="trainDate" + label="子文件夹" + initValue={trainDate} + validate={validatName} + trigger='blur' + rules={[{ required: true, message: "请输入子文件夹" }]} + />} + +
+ ) +} +export default FolderModal \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx index 5fa3ef8..2f38afc 100644 --- a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx +++ b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx @@ -1,8 +1,9 @@ import React, { useEffect, useState, useRef } from 'react'; import { connect } from 'react-redux'; -import { Button, Col, Row, Input, Tree, Table, Space, Tooltip, Spin } from '@douyinfe/semi-ui'; +import { Button, Col, Row, Input, Tree, Table, Space, Tooltip, Spin, Notification } from '@douyinfe/semi-ui'; import { IconSearch, IconEditStroked, IconMinusCircleStroked, IconPlusCircleStroked } from '@douyinfe/semi-icons'; -import { getResourceClassify, getResourceFileList } from '../actions/resourceRepository'; +import { getResourceClassify, getResourceFileList, postResourceClassify, putResourceClassify, delResourceClassify } from '../actions/resourceRepository'; +import FolderModal from '../components/resourceRepository/folder-model'; import '../style.less'; const ResourceRepository = (props) => { @@ -10,27 +11,12 @@ const ResourceRepository = (props) => { const [treeData, setTreeData] = useState([]); const [currentSelect, setCurrentSelect] = useState(); const [defaultExpandedKey, setDefaultExpandedKey] = useState(); + const [modelVisiable, setModelVisiable] = useState(false); + const [modalData, setModalData] = useState(); const ref = useRef(); useEffect(() => { - dispatch(getResourceClassify()).then(res => { - const { success, payload } = res; - if (success) { - let defaultKey = ""; - if (payload.data.length) { - if (payload.data[0].children && payload.data[0].children.length) { - defaultKey = payload.data[0].children[0].key; - setDefaultExpandedKey([payload.data[0].key, payload.data[0].children[0].key]); - } else { - defaultKey = payload.data[0].key; - setDefaultExpandedKey([payload.data[0].key]); - } - } - setCurrentSelect([defaultKey]); - setTreeData(payload.data); - getFile(defaultKey); - } - }); + getClassify(); }, []) const style = { @@ -60,21 +46,50 @@ const ResourceRepository = (props) => { } ]; - const renderLabel = (label, data) => (
- {label.length > 8 ? label.substring(0, 8) + '...' : label} - {true == data.operation ? - - alert("bianji")} /> - alert("sahnchu")} /> - {data.children ? alert("+")} /> : ''} - - : ''} -
- ); + const renderLabel = (label, data) => { + const child = data.children ? true : false; + const key = data.key.split('/'); + return (
+ {label.length > 8 ? label.substring(0, 8) + '...' : label} + {true == data.operation ? + + handleFolderClick(child ? '编辑' : '编辑子', !child, key[1], key[2] || undefined)} /> + alert("sahnchu")} /> + {child ? + handleFolderClick('新建子', true, label, undefined)} + /> : ''} + + : ''} +
) + }; + const handleFolderClick = (title, childFolder, departmentName, trainDate) => { + setModelVisiable(true); + setModalData({ title, childFolder, departmentName, trainDate }); + } const handleSelect = (e) => { setCurrentSelect(e); getFile(e); } + const handleDataToSave = (add, body) => { + if (add) { + dispatch(postResourceClassify(body)).then(res => { + if (res.success) { + getClassify(); + setModelVisiable(false); + } + }); + } else { + dispatch(putResourceClassify(body)).then(res => { + if (res.success) { + getClassify(); + setModelVisiable(false); + } + }); + } + + } const getFile = (e) => { const arr = e.split("/"); const query = { type: arr[0] }; @@ -82,6 +97,26 @@ const ResourceRepository = (props) => { if (arr[2]) { query.trainDate = arr[2]; } dispatch(getResourceFileList(query)); } + const getClassify = () => { + dispatch(getResourceClassify()).then(res => { + const { success, payload } = res; + if (success) { + let defaultKey = ""; + if (payload.data.length) { + if (payload.data[0].children && payload.data[0].children.length) { + defaultKey = payload.data[0].children[0].key; + setDefaultExpandedKey([payload.data[0].key, payload.data[0].children[0].key]); + } else { + defaultKey = payload.data[0].key; + setDefaultExpandedKey([payload.data[0].key]); + } + } + setCurrentSelect([defaultKey]); + setTreeData(payload.data); + getFile(defaultKey); + } + }); + } return ( <> @@ -105,7 +140,7 @@ const ResourceRepository = (props) => { {/* 左侧 */} - +
} showClear onChange={v => ref.current.search(v)} placeholder="请输入"> {
+ {modelVisiable ? + '公司培训资料' == r.label)} + modalData={modalData} + onOk={handleDataToSave} + onCancel={() => { setModelVisiable(false) }} + /> : null + } ) diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 2c03b45..d27794f 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -51,8 +51,8 @@ export const ApiTable = { //-培训资料库 getResourceClassify: 'train/trainFiles/resourceRepository/classify', postResourceClassify: 'train/trainFiles/resourceRepository/classify', - putResourceClassify: 'train/trainFiles/resourceRepository/classify/{id}', - delResourceClassify: 'train/trainFiles/resourceRepository/classify/{id}', + putResourceClassify: 'train/trainFiles/resourceRepository/classify', + delResourceClassify: 'train/trainFiles/resourceRepository/classify', getResourceFileList: 'train/trainFiles/resourceRepository/fileList', }; From e4a4dc746b44552ce7b494f14bbc2c46c0cec881 Mon Sep 17 00:00:00 2001 From: Archer_cdm Date: Tue, 20 Dec 2022 17:43:05 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=EF=BC=88*=EF=BC=89=E4=BF=AE=E6=94=B9sql?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/scripts/3.2.0/schema/dept_training.sql | 50 +++++++---------- .../3.2.0/schema/personal_training_create.sql | 54 ++++++------------- 2 files changed, 34 insertions(+), 70 deletions(-) diff --git a/doc/scripts/3.2.0/schema/dept_training.sql b/doc/scripts/3.2.0/schema/dept_training.sql index 7731ec7..9ee4b71 100644 --- a/doc/scripts/3.2.0/schema/dept_training.sql +++ b/doc/scripts/3.2.0/schema/dept_training.sql @@ -1,32 +1,18 @@ --- ---------------------------- --- Table structure for dept_training --- ---------------------------- -DROP TABLE IF EXISTS "public"."dept_training"; -CREATE TABLE "public"."dept_training" ( - "id" int4 NOT NULL DEFAULT nextval('dept_training_id_seq'::regclass), - "departmentname" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "trainingtype" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "traindate" timestamp(6) NOT NULL, - "traincontent" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "trainwho" varchar(255) COLLATE "pg_catalog"."default", - "trainer" varchar(255) COLLATE "pg_catalog"."default", - "trainmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "appraisalmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "traintime" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "attachpath" varchar(255) COLLATE "pg_catalog"."default", - "origin" varchar(255) COLLATE "pg_catalog"."default", - "filesize" varchar(255) COLLATE "pg_catalog"."default", - "filename" varchar(255) COLLATE "pg_catalog"."default", - "filetype" varchar(255) COLLATE "pg_catalog"."default", - "updatedate" timestamptz(6) -) -; - --- ---------------------------- --- Records of dept_training --- ---------------------------- - --- ---------------------------- --- Primary Key structure for table dept_training --- ---------------------------- -ALTER TABLE "public"."dept_training" ADD CONSTRAINT "dept_training_pkey" PRIMARY KEY ("id"); +CREATE TABLE PUBLIC.dept_training ( + ID serial NOT NULL CONSTRAINT dept_training_pkey PRIMARY KEY, + departmentname VARCHAR ( 255 ) NOT NULL, + trainingtype VARCHAR ( 255 ) NOT NULL, + traindate TIMESTAMP NOT NULL, + traincontent VARCHAR ( 255 ) NOT NULL, + trainwho VARCHAR ( 255 ), + trainer VARCHAR ( 255 ), + trainmethod VARCHAR ( 255 ) NOT NULL, + appraisalmethod VARCHAR ( 255 ) NOT NULL, + traintime VARCHAR ( 255 ) NOT NULL, + attachpath VARCHAR ( 255 ), + origin VARCHAR ( 255 ), + filesize VARCHAR ( 255 ), + filename VARCHAR ( 255 ), + filetype VARCHAR ( 255 ), +updatedate TIMESTAMP WITH TIME ZONE +); \ No newline at end of file diff --git a/doc/scripts/3.2.0/schema/personal_training_create.sql b/doc/scripts/3.2.0/schema/personal_training_create.sql index 568f7b7..e81e4ba 100644 --- a/doc/scripts/3.2.0/schema/personal_training_create.sql +++ b/doc/scripts/3.2.0/schema/personal_training_create.sql @@ -1,39 +1,17 @@ --- ---------------------------- --- Table structure for personal_training --- ---------------------------- -DROP TABLE IF EXISTS "public"."personal_training"; -CREATE TABLE "public"."personal_training" ( - "id" int4 NOT NULL DEFAULT nextval('personal_training_id_seq'::regclass), - "personalname" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "departmentname" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "trainingtype" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "topic" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "trainer" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "traindate" timestamp(6) NOT NULL, - "traintime" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "trainmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "attendancescore" varchar(255) COLLATE "pg_catalog"."default", - "appraisalmethod" varchar(255) COLLATE "pg_catalog"."default" NOT NULL, - "appraisalscore" varchar(255) COLLATE "pg_catalog"."default", - "totalscore" varchar(255) COLLATE "pg_catalog"."default", - "origin" varchar(255) COLLATE "pg_catalog"."default" -) -; -COMMENT ON COLUMN "public"."personal_training"."personalname" IS '姓名'; -COMMENT ON COLUMN "public"."personal_training"."departmentname" IS '部门名称'; -COMMENT ON COLUMN "public"."personal_training"."trainingtype" IS '培训类型'; -COMMENT ON COLUMN "public"."personal_training"."topic" IS '课程主题'; -COMMENT ON COLUMN "public"."personal_training"."trainer" IS '培训讲师'; -COMMENT ON COLUMN "public"."personal_training"."traindate" IS '培训时间'; -COMMENT ON COLUMN "public"."personal_training"."traintime" IS '培训时长'; -COMMENT ON COLUMN "public"."personal_training"."trainmethod" IS '培训方式'; -COMMENT ON COLUMN "public"."personal_training"."attendancescore" IS '考勤分数'; -COMMENT ON COLUMN "public"."personal_training"."appraisalmethod" IS '考核形式'; -COMMENT ON COLUMN "public"."personal_training"."appraisalscore" IS '考核分数'; -COMMENT ON COLUMN "public"."personal_training"."totalscore" IS '总分'; -COMMENT ON COLUMN "public"."personal_training"."origin" IS '来源'; +CREATE TABLE personal_training ( + ID serial PRIMARY KEY NOT NULL, + personalName VARCHAR ( 255 ) NOT NULL,-- 姓名 + departmentName VARCHAR ( 255 ) NOT NULL,-- 部门名称 + trainingType VARCHAR ( 255 ) NOT NULL,-- 培训类型 + topic VARCHAR ( 255 ) NOT NULL,-- 课程主题 + trainer VARCHAR ( 255 ) NOT NULL,-- 培训讲师 + trainDate TIMESTAMP NOT NULL,-- 培训时间 + trainTime VARCHAR ( 255 ) NOT NULL,-- 培训时长 + trainMethod VARCHAR ( 255 ) NOT NULL,-- 培训方式 + attendanceScore VARCHAR ( 255 ),-- 考勤分数 + appraisalMethod VARCHAR ( 255 ) NOT NULL,-- 考核形式 + appraisalScore VARCHAR ( 255 ),-- 考核分数 + totalScore VARCHAR ( 255 ),-- 总分 + origin VARCHAR ( 255 ) --来源 --- ---------------------------- --- Primary Key structure for table personal_training --- ---------------------------- -ALTER TABLE "public"."personal_training" ADD CONSTRAINT "personal_training_pkey" PRIMARY KEY ("id"); +); \ No newline at end of file From 80b02c2695d692285ca80b617e4e8e1f61f3b22c Mon Sep 17 00:00:00 2001 From: zhouxin Date: Tue, 20 Dec 2022 17:59:07 +0800 Subject: [PATCH 8/9] =?UTF-8?q?(*)=E5=9F=B9=E8=AE=AD=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=BA=93=E5=B7=A6=E4=BE=A7=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/resourceRepository/index.js | 44 ++++++++++++++++--- .../lib/routes/resourceRepository/index.js | 7 ++- .../schema/01 create_training_information.sql | 29 ++++++++++++ .../actions/resourceRepository.js | 4 +- .../containers/resourceRepository.jsx | 29 ++++++++++-- 5 files changed, 101 insertions(+), 12 deletions(-) create mode 100644 doc/scripts/PEP V3.2.0/schema/01 create_training_information.sql diff --git a/api/app/lib/controllers/resourceRepository/index.js b/api/app/lib/controllers/resourceRepository/index.js index cd70a08..53edb19 100644 --- a/api/app/lib/controllers/resourceRepository/index.js +++ b/api/app/lib/controllers/resourceRepository/index.js @@ -147,6 +147,11 @@ async function getResourceFileList(ctx, next) { findObj.where = where; } if ("公司培训资料" == type) { + if (findObj.where) { + findObj.where.fileName = { $not: null }; + } else { + findObj.where = { fileName: { $not: null } }; + } rlst = await models.TrainingInformation.findAndCountAll(findObj); } else { rlst = await models.DeptTraining.findAndCountAll(findObj); @@ -163,6 +168,7 @@ async function getResourceFileList(ctx, next) { } } async function postResourceClassify(ctx) { + const transaction = await ctx.fs.dc.orm.transaction(); try { const { models } = ctx.fs.dc; const { departmentName, trainDate } = ctx.request.body; @@ -180,17 +186,19 @@ async function postResourceClassify(ctx) { await models.TrainingInformation.create({ departmentName: departmentName, trainDate: trainDate - }) + }, { transaction }) } } - + await transaction.commit(); ctx.status = 204; } catch (err) { + await transaction.rollback(); ctx.status = 400; ctx.body = { message: err.message || '新增培训资源储备库文件夹失败' } } } async function putResourceClassify(ctx) { + const transaction = await ctx.fs.dc.orm.transaction(); try { const { models } = ctx.fs.dc; const { oldDepName, oldTrainDate, departmentName, trainDate } = ctx.request.body; @@ -199,24 +207,50 @@ async function putResourceClassify(ctx) { if (trainDate && '' != trainDate && oldTrainDate && '' != oldTrainDate) { where.trainDate = oldTrainDate; - await models.TrainingInformation.update({ trainDate: trainDate }, { where }); + await models.TrainingInformation.update({ trainDate: trainDate }, { where, transaction }); //三级目录 } else { //二级目录 - await models.TrainingInformation.update({ departmentName: departmentName }, { where }); + await models.TrainingInformation.update({ departmentName: departmentName }, { where, transaction }); } } + await transaction.commit(); ctx.status = 204; } catch (err) { + await transaction.rollback(); ctx.status = 400; ctx.body = { message: err.message || '编辑培训资源储备库文件夹失败' }; } } +async function delResourceClassify(ctx) { + const transaction = await ctx.fs.dc.orm.transaction(); + try { + const { departmentName, trainDate } = ctx.query; + const { models } = ctx.fs.dc; + + if (departmentName && '' != departmentName) { + const where = { departmentName }; + if (trainDate && '' != trainDate) { + where.trainDate = trainDate; + } + await models.TrainingInformation.destroy({ where, transaction }); + } + + await transaction.commit(); + ctx.status = 204; + } catch (err) { + await transaction.rollback(); + ctx.status = 400; + ctx.body = { message: err.message || '新增培训资源储备库文件夹失败' } + } +} + module.exports = { getResourceClassify, getResourceFileList, postResourceClassify, - putResourceClassify + putResourceClassify, + delResourceClassify } \ No newline at end of file diff --git a/api/app/lib/routes/resourceRepository/index.js b/api/app/lib/routes/resourceRepository/index.js index 59f5727..61716a7 100644 --- a/api/app/lib/routes/resourceRepository/index.js +++ b/api/app/lib/routes/resourceRepository/index.js @@ -10,10 +10,13 @@ module.exports = function (app, router, opts) { app.fs.api.logAttr['GET/train/trainFiles/resourceRepository/fileList'] = { content: '查询培训资源储备库文件列表', visible: false }; router.get('/train/trainFiles/resourceRepository/fileList', resourceRepository.getResourceFileList); - app.fs.api.logAttr['POST/train/trainFiles/resourceRepository/classify'] = { content: '新增培训资源储备库文件夹', visible: false }; + app.fs.api.logAttr['POST/train/trainFiles/resourceRepository/classify'] = { content: '新增培训资源储备库文件夹', visible: true }; router.post('/train/trainFiles/resourceRepository/classify', resourceRepository.postResourceClassify); - app.fs.api.logAttr['PUT/train/trainFiles/resourceRepository/classify'] = { content: '编辑培训资源储备库文件夹', visible: false }; + app.fs.api.logAttr['PUT/train/trainFiles/resourceRepository/classify'] = { content: '编辑培训资源储备库文件夹', visible: true }; router.put('/train/trainFiles/resourceRepository/classify', resourceRepository.putResourceClassify); + app.fs.api.logAttr['DELETE/train/trainFiles/resourceRepository/classify'] = { content: '删除培训资源储备库文件夹', visible: true }; + router.delete('/train/trainFiles/resourceRepository/classify', resourceRepository.delResourceClassify); + }; \ No newline at end of file diff --git a/doc/scripts/PEP V3.2.0/schema/01 create_training_information.sql b/doc/scripts/PEP V3.2.0/schema/01 create_training_information.sql new file mode 100644 index 0000000..19006c7 --- /dev/null +++ b/doc/scripts/PEP V3.2.0/schema/01 create_training_information.sql @@ -0,0 +1,29 @@ +create table training_information +( + id serial not null + constraint training_information_record_pkey + primary key, + departmentname varchar(255) not null, + traindate varchar(255), + filetype varchar(255), + filename varchar(255), + filesize varchar(255), + updatedate timestamp, + attachpath varchar(255) +); + +comment on table training_information is '公司培训资源库'; + +comment on column training_information.departmentname is '部门分类'; + +comment on column training_information.traindate is '时间(三级目录)'; + +comment on column training_information.filetype is '文件类型'; + +comment on column training_information.filename is '文件名'; + +comment on column training_information.filesize is '文件大小'; + +comment on column training_information.updatedate is '更新时间'; + +comment on column training_information.attachpath is '文件路径'; diff --git a/web/client/src/sections/humanAffairs/actions/resourceRepository.js b/web/client/src/sections/humanAffairs/actions/resourceRepository.js index 054831d..1ecdd42 100644 --- a/web/client/src/sections/humanAffairs/actions/resourceRepository.js +++ b/web/client/src/sections/humanAffairs/actions/resourceRepository.js @@ -48,11 +48,11 @@ export function putResourceClassify(data) { }); } -export function delResourceClassify(data) { +export function delResourceClassify(query) { return (dispatch) => basicAction({ type: "del", - query: data, + query: query, dispatch: dispatch, actionType: "DEL_RESOURCE_CLASSIFY", url: `${ApiTable.delResourceClassify}`, diff --git a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx index 2f38afc..a12696d 100644 --- a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx +++ b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useState, useRef } from 'react'; import { connect } from 'react-redux'; -import { Button, Col, Row, Input, Tree, Table, Space, Tooltip, Spin, Notification } from '@douyinfe/semi-ui'; +import { Button, Col, Row, Input, Tree, Table, Space, Tooltip, Spin, Popconfirm } from '@douyinfe/semi-ui'; import { IconSearch, IconEditStroked, IconMinusCircleStroked, IconPlusCircleStroked } from '@douyinfe/semi-icons'; import { getResourceClassify, getResourceFileList, postResourceClassify, putResourceClassify, delResourceClassify } from '../actions/resourceRepository'; import FolderModal from '../components/resourceRepository/folder-model'; @@ -54,7 +54,15 @@ const ResourceRepository = (props) => { {true == data.operation ? handleFolderClick(child ? '编辑' : '编辑子', !child, key[1], key[2] || undefined)} /> - alert("sahnchu")} /> + handleDel(data.key)} + // onCancel={onCancel} + > + + + {child ? { } }); } - + } + + const handleDel = (key) => { + const arr = key.split('/'); + const query = { + departmentName: arr[1] + } + if (arr.length == 3) { + query.trainDate = arr[2]; + } + dispatch(delResourceClassify(query)).then(res => { + if (res.success) { + getClassify(); + setModelVisiable(false); + } + }); } const getFile = (e) => { const arr = e.split("/"); From 3eaed00da767c08eb85831758a57738ad52364da Mon Sep 17 00:00:00 2001 From: zhouxin Date: Wed, 21 Dec 2022 08:56:53 +0800 Subject: [PATCH 9/9] (*)dockerfile + dockerfile --- api/Dockerfile | 8 ++++--- jenkinsfile_poms_api | 11 +++++----- jenkinsfile_poms_web | 11 +++++----- web/Dockerfile | 21 ++++++++++++------- .../containers/resourceRepository.jsx | 4 ++-- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/api/Dockerfile b/api/Dockerfile index 74ac3c3..1cf0525 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -25,12 +25,14 @@ FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 +MAINTAINER liuxinyi "liu.xinyi@free-sun.com.cn" + COPY . /var/app WORKDIR /var/app -EXPOSE 8080 +RUN npm cache clean -f && npm install --production --force --registry http://10.8.30.22:7000 -CMD ["-u", "http://localhost:8088"] +RUN rm -rf package-lock.json -ENTRYPOINT [ "node", "server.js" ] \ No newline at end of file +CMD [ "node", "server.js" ] \ No newline at end of file diff --git a/jenkinsfile_poms_api b/jenkinsfile_poms_api index c9291bd..671e0e5 100644 --- a/jenkinsfile_poms_api +++ b/jenkinsfile_poms_api @@ -6,13 +6,12 @@ pipeline { } stages { - stage('Testing poms ......') { + stage('Testing hrm api......') { steps { - sh 'switch-auth.sh anxinyun' - buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}" - buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}" - sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./api' - sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}' + buildName '#${BUILD_NUMBER} ~/pep/${JOB_NAME}:${IMAGE_VERSION}' + buildDescription 'harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}' + sh 'nerdctl build -t harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION} ./api' + sh 'nerdctl push harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}' } } } diff --git a/jenkinsfile_poms_web b/jenkinsfile_poms_web index 9d43c6e..8f06fda 100644 --- a/jenkinsfile_poms_web +++ b/jenkinsfile_poms_web @@ -6,13 +6,12 @@ pipeline { } stages { - stage('Testing poms ......') { + stage('Testing hrm-web ......') { steps { - sh 'switch-auth.sh anxinyun' - buildName "#${BUILD_NUMBER} ~/fs-cloud/${JOB_NAME}:${IMAGE_VERSION}" - buildDescription "registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}" - sh 'docker build -t registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION} ./web' - sh 'docker push registry.cn-hangzhou.aliyuncs.com/${CLOUD}/${JOB_NAME}:${IMAGE_VERSION}' + buildName "#${BUILD_NUMBER} ~/pep/${JOB_NAME}:${IMAGE_VERSION}" + buildDescription "harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}" + sh 'nerdctl build -t harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION} ./web' + sh 'nerdctl push harbor.anxinyun.cn/pep/${JOB_NAME}:${IMAGE_VERSION}' } } } diff --git a/web/Dockerfile b/web/Dockerfile index 3991885..a9a3af6 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -27,14 +27,19 @@ # 旧版本构建方式 -FROM repository.anxinyun.cn/base-images/nodejs12:20.10.12.2 - +FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node:12-dev as builder COPY . /var/app - WORKDIR /var/app - EXPOSE 8080 - -CMD ["-u", "http://localhost:8088"] - -ENTRYPOINT [ "node", "server.js" ] \ No newline at end of file +RUN npm config set registry=http://10.8.30.22:7000 +RUN echo "{\"time\":\"$BUILD_TIMESTAMP\",\"build\": \"$BUILD_NUMBER\",\"revision\": \"$SVN_REVISION_1\",\"URL\":\"$SVN_URL_1\"}" > version.json +RUN npm cache clean -f +RUN npm install --registry http://10.8.30.22:7000 +RUN npm run build +RUN rm -rf client/src +RUN rm -rf node_modules +RUN npm install --production --force --registry http://10.8.30.22:7000 +FROM registry.cn-hangzhou.aliyuncs.com/fs-devops/node-16:7.22-06-20 +COPY --from=builder --chown=node /var/app /home/node/app +WORKDIR /home/node/app +CMD ["node", "server.js"] \ No newline at end of file diff --git a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx index a12696d..ad87084 100644 --- a/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx +++ b/web/client/src/sections/humanAffairs/containers/resourceRepository.jsx @@ -97,7 +97,7 @@ const ResourceRepository = (props) => { }); } } - + const handleDel = (key) => { const arr = key.split('/'); const query = { @@ -187,7 +187,7 @@ const ResourceRepository = (props) => { - + {currentSelect && currentSelect.includes("部门培训资料") ? null : } 当前文件夹:{currentSelect}