From 60499db2f21378c36dea0784e8f924bd9ec3aa61 Mon Sep 17 00:00:00 2001 From: LUCAS Date: Thu, 28 Jul 2022 18:56:20 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/.vscode/launch.json | 4 +- api/app/lib/controllers/file/index.js | 254 +++++++++++++ api/app/lib/index.js | 8 +- api/app/lib/models/file-road.js | 31 ++ api/app/lib/models/file-type.js | 32 ++ api/app/lib/models/files.js | 73 ++++ api/app/lib/routes/file/index.js | 21 ++ api/log/development.log | 18 + api/package.json | 2 +- web/client/assets/color.less | 170 ++------- .../src/sections/fillion/actions/file.js | 89 +++++ .../src/sections/fillion/actions/index.js | 2 + .../src/sections/fillion/actions/infor.js | 2 +- .../fillion/components/file/roadModal.js | 73 ++++ .../fillion/components/file/uploadModal.js | 45 +++ .../sections/fillion/components/fileTable.js | 356 ++++++++++++++++++ .../sections/fillion/components/protable.less | 38 +- .../src/sections/fillion/containers/file.js | 40 ++ .../src/sections/fillion/containers/index.js | 3 +- web/client/src/sections/fillion/nav-item.js | 3 + web/client/src/sections/fillion/routes.js | 19 +- web/client/src/themes/light.json | 2 +- web/client/src/utils/webapi.js | 182 ++++----- web/log/development.txt | 5 + web/package.json | 2 +- 25 files changed, 1229 insertions(+), 245 deletions(-) create mode 100644 api/app/lib/controllers/file/index.js create mode 100644 api/app/lib/models/file-road.js create mode 100644 api/app/lib/models/file-type.js create mode 100644 api/app/lib/models/files.js create mode 100644 api/app/lib/routes/file/index.js create mode 100644 web/client/src/sections/fillion/actions/file.js create mode 100644 web/client/src/sections/fillion/components/file/roadModal.js create mode 100644 web/client/src/sections/fillion/components/file/uploadModal.js create mode 100644 web/client/src/sections/fillion/components/fileTable.js create mode 100644 web/client/src/sections/fillion/containers/file.js diff --git a/api/.vscode/launch.json b/api/.vscode/launch.json index eaa8220c..35dd29e4 100644 --- a/api/.vscode/launch.json +++ b/api/.vscode/launch.json @@ -13,8 +13,8 @@ "NODE_ENV": "development" }, "args": [ - "-p 14000", - "-f http://localhost:14000", + "-p 4000", + "-f http://localhost:4000", "-g postgres://postgres:123@10.8.30.32:5432/highways4good", "--qnak XuDgkao6cL0HidoMAPnA5OB10Mc_Ew08mpIfRJK5", "--qnsk yewcieZLzKZuDfig0wLZ9if9jKp2P_1jd3CMJPSa", diff --git a/api/app/lib/controllers/file/index.js b/api/app/lib/controllers/file/index.js new file mode 100644 index 00000000..270447e9 --- /dev/null +++ b/api/app/lib/controllers/file/index.js @@ -0,0 +1,254 @@ +'use strict'; + +const request = require('superagent'); +const moment = require('moment'); + +async function createProjectDir(ctx, next) { + let error = { message: '新增项目目录失败' }, rs = null; + const { roadName } = ctx.query; + + try { + const models = ctx.fs.dc.models; + + rs = await models.FileRoad.create({ + roadName + }) + error = null; + } catch (err) { + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = { message: '新增项目目录成功!', result: rs }; + } +} + +async function getFileDirs(ctx, next) { + let error = { message: '查询项目目录失败' }, rslt = null; + + try { + const models = ctx.fs.dc.models; + + rslt = await models.FileRoad.findAll({ + // include: [{ + // model: models.FileType + // }] + }) + error = null; + } catch (err) { + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = rslt; + } +} + +async function delFileDir(ctx, next) { + let error = { message: '文件夹删除失败' }; + let rslt = [], fileDirIds = []; + + try { + const { type, id } = ctx.query, // type == parent / child + models = ctx.fs.dc.models; + const transaction = await ctx.fs.dc.orm.transaction(); + + if (type == 'parent') { + let fileTypes = await models.FileType.findAll({ where: { rId: id } }); + if (fileTypes && fileTypes.length) { + fileDirIds = fileTypes.map(item => item.fId); + } + + if (fileDirIds && fileDirIds.length) { + await models.Files.destroy({ + where: { + fId: { $in: fileDirIds } + }, + transaction + }) + } + await models.FileType.destroy({ where: { rId: id }, transaction }) + await models.FileRoad.destroy({ where: { rId: id }, transaction }) + } else { + await models.Files.destroy({ where: { fId: id }, transaction }) + await models.FileType.destroy({ where: { fId: id }, transaction }) + } + await transaction.commit(); + + error = null; + } catch (err) { + await transaction.rollback(); + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = { message: '文件夹删除成功' }; + } +} + +async function uploadFile(ctx, next) { + let error = { message: '文件上传失败' }, rslt = null; + const { typeId, userId, userName, fileSize, fileName, fileUrl, fileExt, roadId } = ctx.request.body + try { + const models = ctx.fs.dc.models; + + rslt = await models.Files.create({ + fId: typeId, + uploaderId: userId, + roadId, + createDate: moment().format('YYYY-MM-DD HH:mm:ss'), + fileSize, + fileName, + fileUrl, + fileExt, + uploaderName: userName, + isDelete: false + }) + error = null; + } catch (err) { + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = { message: '文件上传成功', rslt }; + } +} + +async function deleteFile(ctx, next) { + let error = { message: '文件删除失败' }, rslt = null; + const { id } = ctx.query; + try { + const models = ctx.fs.dc.models; + + rslt = await models.Files.update({ + isDelete: true + }, { + where: { id: id } + }) + error = null; + } catch (err) { + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = { message: '文件删除成功', rslt }; + } +} + +async function getFileList(ctx, next) { + let error = { message: '文件上传失败' }, rslt = { list: [], counter: 0, type: '' }; + const { fId, limit, offset, searchTxt, roadId } = ctx.query; + let limit_ = limit, offset_ = offset; + if (limit == null || limit < 0) { + limit_ = 10; + } + if (offset == null || offset < 0) { + offset_ = 0; + } + try { + const models = ctx.fs.dc.models; + let queryOptions = { isDelete: false } + if (searchTxt && searchTxt.trim() != '') { + queryOptions.fileName = { $like: `%${searchTxt}%` } + } + if (fId) { + queryOptions.fId = fId + } + + if (roadId) { + queryOptions.roadId = roadId + } + + rslt.type = await models.FileType.findOne({ + where: { fId } + }) + + rslt.list = await models.Files.findAll({ + where: queryOptions, + offset: offset_, + limit: limit_, + order: [ + ['id', 'DESC'] + ] + }) + rslt.counter = await models.Files.count({ + where: queryOptions + }) + error = null; + } catch (err) { + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = rslt; + } +} + +function updateStructDir(opts) { + + return async function (ctx, next) { + let error = { message: '文件夹名称更新失败' }; + const models = ctx.fs.dc.models; + const { id, name } = ctx.query; + try { + await models.FileRoad.update({ roadName: name }, { + where: { + id: id + }, + }) + + error = null; + } catch (err) { + ctx.status = 500; + ctx.body = { detail: err, ...error }; + } + + if (error) { + ctx.status = 400; + ctx.body = { ...error }; + } else { + ctx.status = 200; + ctx.body = { message: '文件夹名称更新成功' }; + } + } +} + +module.exports = { + uploadFile, + deleteFile, + getFileList, + createProjectDir, + delFileDir, + getFileDirs, + updateStructDir, +} \ No newline at end of file diff --git a/api/app/lib/index.js b/api/app/lib/index.js index 72b6097a..150e96f7 100644 --- a/api/app/lib/index.js +++ b/api/app/lib/index.js @@ -27,7 +27,7 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq require(`./models/${filename}`)(dc) }); - const { User, Department, Report } = dc.models; + const { User, Department, Report, FileType, Road, Files, FileRoad } = dc.models; // 定义外键 User.belongsTo(Department, { foreignKey: 'departmentId', targetKey: 'id' }); Department.hasMany(User, { foreignKey: 'departmentId', sourceKey: 'id' }); @@ -35,4 +35,10 @@ module.exports.models = function (dc) { // dc = { orm: Sequelize对象, ORM: Seq // 定义外键 Report.belongsTo(User, { foreignKey: 'userId', targetKey: 'id' }); User.hasMany(Report, { foreignKey: 'userId', sourceKey: 'id' }); + + Files.belongsTo(FileType, { foreignKey: 'fId', targetKey: 'fId' }); + FileType.hasMany(Files, { foreignKey: 'fId', targetKey: 'fId' }); + + // Files.belongsTo(Road, { foreignKey: 'roadId', targetKey: 'id' }); + // Road.hasMany(Files, { foreignKey: 'roadId', targetKey: 'id' }); }; diff --git a/api/app/lib/models/file-road.js b/api/app/lib/models/file-road.js new file mode 100644 index 00000000..b7f35592 --- /dev/null +++ b/api/app/lib/models/file-road.js @@ -0,0 +1,31 @@ +'use strict'; + +module.exports = function (dc) { + const FileRoad = dc.orm.define( + 'fileRoad', + { + rId: { + field: 'id', + type: dc.ORM.INTEGER, + primaryKey: true, + autoIncrement: true, + allowNull: false + }, + roadName: { + field: 'road_name', + type: dc.ORM.STRING, + }, + originalData: { + field: 'original_data', + type: dc.ORM.STRING, + }, + }, + { + tableName: 'file_road' + } + ); + + dc.models.FileRoad = FileRoad; + + return FileRoad; +}; diff --git a/api/app/lib/models/file-type.js b/api/app/lib/models/file-type.js new file mode 100644 index 00000000..2f8e7dbd --- /dev/null +++ b/api/app/lib/models/file-type.js @@ -0,0 +1,32 @@ +'use strict'; + +module.exports = function (dc) { + const FileType = dc.orm.define( + 'fileType', + { + fId: { + field: 'id', + type: dc.ORM.INTEGER, + primaryKey: true, + autoIncrement: true, + allowNull: false + }, + fileType: { + field: 'file_type', + type: dc.ORM.STRING, + }, + rId: { + field: 'file_road', + type: dc.ORM.INTEGER, + allowNull: false + }, + }, + { + tableName: 'file_type' + } + ); + + dc.models.FileType = FileType; + + return FileType; +}; diff --git a/api/app/lib/models/files.js b/api/app/lib/models/files.js new file mode 100644 index 00000000..387fd681 --- /dev/null +++ b/api/app/lib/models/files.js @@ -0,0 +1,73 @@ +'use strict'; + +module.exports = function (dc) { + const Files = dc.orm.define( + 'files', + { + id: { + field: 'id', + type: dc.ORM.INTEGER, + primaryKey: true, + autoIncrement: true, + allowNull: false + }, + fId: { + field: 'file_type', + type: dc.ORM.INTEGER + }, + roadId: { + field: 'road_id', + type: dc.ORM.INTEGER + }, + uploaderId: { + field: 'uploader_id', + type: dc.ORM.INTEGER + }, + uploaderName: { + field: 'uploader_name', + type: dc.ORM.INTEGER + }, + startDate: { + field: 'start_date', + type: dc.ORM.DATE, + }, + endDate: { + field: 'end_date', + type: dc.ORM.DATE, + }, + createDate: { + field: 'create_date', + type: dc.ORM.DATE, + }, + fileSize: { + field: 'file_size', + type: dc.ORM.INTEGER, + }, + fileName: { + field: 'file_name', + type: dc.ORM.STRING, + }, + + fileUrl: { + field: 'file_url', + type: dc.ORM.STRING, + }, + fileExt: { + field: 'file_ext', + type: dc.ORM.STRING, + }, + isDelete: { + field: 'is_delete', + type: dc.ORM.BOOLEAN, + }, + + }, + { + tableName: 'files' + } + ); + + dc.models.Files = Files; + + return Files; +}; diff --git a/api/app/lib/routes/file/index.js b/api/app/lib/routes/file/index.js new file mode 100644 index 00000000..7998ed5f --- /dev/null +++ b/api/app/lib/routes/file/index.js @@ -0,0 +1,21 @@ +'use strict'; + +const pan = require('../../controllers/file'); + +module.exports = function (app, router, opts, panCode) { + + router.get('/create/struct/dir', pan.createProjectDir); + + router.get('/get/file/dirs', pan.getFileDirs); + + router.get('/netdisk-files/dir/delete', pan.delFileDir); + + router.get('/netdisk-files/struct/dir/update', pan.updateStructDir(opts)) + + router.post('/netdisk-files/upload', pan.uploadFile); + + router.get('/netdisk-files/delete', pan.deleteFile); + + router.get('/netdisk-files/query', pan.getFileList); + +}; \ No newline at end of file diff --git a/api/log/development.log b/api/log/development.log index 2999be3e..fefa3fe6 100644 --- a/api/log/development.log +++ b/api/log/development.log @@ -10008,3 +10008,21 @@ 2022-07-27 15:49:28.071 - error: path: /vehicle/3/specific, error: TypeError: Cannot read property 'destroy' of undefined 2022-07-27 15:50:36.847 - error: path: /vehicle/3/specific, error: TypeError: Cannot read property 'destroy' of undefined 2022-07-27 15:51:05.608 - error: path: /vehicle/3/specific, error: TypeError: Cannot read property 'destroy' of undefined +2022-07-28 09:26:54.165 - debug: [FS-LOGGER] Init. +2022-07-28 09:26:54.278 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 09:26:54.278 - info: [FS-AUTH] Inject auth and api mv into router. +2022-07-28 09:31:20.509 - debug: [FS-LOGGER] Init. +2022-07-28 09:31:20.624 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 09:31:20.624 - info: [FS-AUTH] Inject auth and api mv into router. +2022-07-28 09:32:20.799 - debug: [FS-LOGGER] Init. +2022-07-28 09:32:20.888 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 09:32:20.889 - info: [FS-AUTH] Inject auth and api mv into router. +2022-07-28 10:12:11.608 - debug: [FS-LOGGER] Init. +2022-07-28 10:12:11.718 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 10:12:11.719 - info: [FS-AUTH] Inject auth and api mv into router. +2022-07-28 10:12:31.955 - debug: [FS-LOGGER] Init. +2022-07-28 10:12:32.043 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 10:12:32.043 - info: [FS-AUTH] Inject auth and api mv into router. +2022-07-28 10:24:23.635 - debug: [FS-LOGGER] Init. +2022-07-28 10:24:23.787 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 10:24:23.787 - info: [FS-AUTH] Inject auth and api mv into router. diff --git a/api/package.json b/api/package.json index 4dab3cf4..45bde8c4 100644 --- a/api/package.json +++ b/api/package.json @@ -5,7 +5,7 @@ "main": "server.js", "scripts": { "test": "set DEBUG=true&&\"node_modules/.bin/mocha\" --harmony --reporter spec app/test/*.test.js", - "start": "set NODE_ENV=development&&node server -p 14000 -g postgres://postgres:123@10.8.30.32:5432/yinjiguanli -f http://localhost:14000", + "start": "set NODE_ENV=development&&node server -p 4000 -g postgres://postgres:123@10.8.30.32:5432/highways4good -f http://localhost:14000", "start:linux": "export NODE_ENV=development&&node server -p 4000 -g postgres://FashionAdmin:123456@10.8.30.39:5432/pm1", "automate": "sequelize-automate -c sequelize-automate.config.js" }, diff --git a/web/client/assets/color.less b/web/client/assets/color.less index a522fd49..1a991dfa 100644 --- a/web/client/assets/color.less +++ b/web/client/assets/color.less @@ -174,7 +174,7 @@ button::-moz-focus-inner, [type='submit']::-moz-focus-inner {border-style: none;} fieldset {border: 0;} legend {color: inherit;} -mark {background-color: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);} +mark {background-color: #feffe6;} ::selection {color: #fff;background: @primary-color;} .anticon {color: inherit;} .ant-fade-enter, .ant-fade-appear {animation-fill-mode: both;} @@ -555,18 +555,6 @@ html {--antd-wave-shadow-color: @primary-color;} .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled], .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active {color: @disabled-color;border-color: @border-color-base;background: @disabled-bg;box-shadow: none;} .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled] > a:only-child, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover > a:only-child, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus > a:only-child, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active > a:only-child {color: currentcolor;} .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled] > a:only-child::after, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover > a:only-child::after, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus > a:only-child::after, .ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active > a:only-child::after {background: transparent;} -a.ant-btn-disabled, -a.ant-btn-disabled:hover, -a.ant-btn-disabled:focus, -a.ant-btn-disabled:active {color: @disabled-color;border-color: transparent;background: transparent;box-shadow: none;} -a.ant-btn-disabled > a:only-child, -a.ant-btn-disabled:hover > a:only-child, -a.ant-btn-disabled:focus > a:only-child, -a.ant-btn-disabled:active > a:only-child {color: currentcolor;} -a.ant-btn-disabled > a:only-child::after, -a.ant-btn-disabled:hover > a:only-child::after, -a.ant-btn-disabled:focus > a:only-child::after, -a.ant-btn-disabled:active > a:only-child::after {background: transparent;} .ant-btn-group-rtl.ant-btn-group .ant-btn-primary:last-child:not(:first-child), .ant-btn-group-rtl.ant-btn-group .ant-btn-primary + .ant-btn-primary {border-right-color: color(~`colorPalette("@{primary-color}", 5)`);border-left-color: @border-color-base;} .ant-btn-group-rtl.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled], .ant-btn-group-rtl.ant-btn-group .ant-btn-primary + .ant-btn-primary[disabled] {border-right-color: @border-color-base;border-left-color: color(~`colorPalette("@{primary-color}", 5)`);} .ant-picker-calendar {color: @text-color;background: @calendar-full-bg;} @@ -601,6 +589,7 @@ a.ant-btn-disabled:active > a:only-child::after {background: transparent;} .ant-card-type-inner .ant-card-head {background: @background-color-light;} .ant-card-meta-title {color: @heading-color;} .ant-card-meta-description {color: @text-color-secondary;} +.ant-card-loading-block {background: linear-gradient(90deg, fade(@card-skeleton-bg, 20%), fade(@card-skeleton-bg, 40%), fade(@card-skeleton-bg, 20%));background-size: 600% 600%;border-radius: 2px;} .ant-carousel {color: @text-color;} .ant-carousel .slick-slider {-webkit-tap-highlight-color: transparent;} .ant-carousel .slick-prev, .ant-carousel .slick-next {color: transparent;background: transparent;border: 0;} @@ -674,10 +663,8 @@ a.ant-btn-disabled:active > a:only-child::after {background: transparent;} .ant-comment-actions > li > span:hover {color: @comment-action-hover-color;} .ant-picker-status-error.ant-picker, .ant-picker-status-error.ant-picker:not([disabled]):hover {background-color: @input-bg;border-color: #ff4d4f;} .ant-picker-status-error.ant-picker-focused, .ant-picker-status-error.ant-picker:focus {border-color: #ff7875;box-shadow: 0 0 0 2px rgba(255, 77, 79, 0.2);border-right-width: 1px;} -.ant-picker-status-error.ant-picker .ant-picker-active-bar {background: #ff7875;} .ant-picker-status-warning.ant-picker, .ant-picker-status-warning.ant-picker:not([disabled]):hover {background-color: @input-bg;border-color: #faad14;} .ant-picker-status-warning.ant-picker-focused, .ant-picker-status-warning.ant-picker:focus {border-color: #ffc53d;box-shadow: 0 0 0 2px rgba(250, 173, 20, 0.2);border-right-width: 1px;} -.ant-picker-status-warning.ant-picker .ant-picker-active-bar {background: #ffc53d;} .ant-picker {color: @text-color;background: @picker-bg;border: 1px solid @border-color-base;border-radius: 2px;} .ant-picker:hover, .ant-picker-focused {border-color: color(~`colorPalette("@{primary-color}", 5)`);border-right-width: 1px;} .ant-input-rtl .ant-picker:hover, .ant-input-rtl .ant-picker-focused {border-right-width: 0;border-left-width: 1px !important;} @@ -708,7 +695,7 @@ a.ant-btn-disabled:active > a:only-child::after {background: transparent;} .ant-picker-range .ant-picker-active-bar {background: @primary-color;} .ant-picker-dropdown {color: @text-color;} .ant-picker-ranges .ant-picker-preset > .ant-tag-blue {color: @primary-color;background: color(~`colorPalette("@{primary-color}", 1)`);border-color: color(~`colorPalette("@{primary-color}", 3)`);} -.ant-picker-range-arrow {box-shadow: 2px 2px 6px -2px rgba(0, 0, 0, 0.1);border-radius: 0 0 2px;} +.ant-picker-range-arrow {background: linear-gradient(135deg, transparent 40%, @calendar-bg 40%);box-shadow: 2px 2px 6px -2px rgba(0, 0, 0, 0.1);border-radius: 0 0 2px;} .ant-picker-range-arrow::before {background: @calendar-bg;background-repeat: no-repeat;background-position: -10px -10px;} .ant-picker-panel-container {background: @calendar-bg;border-radius: 2px;box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);} .ant-picker-panel-container .ant-picker-panel {background: transparent;border-width: 0 0 1px 0;border-radius: 0;} @@ -814,7 +801,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-dropdown-menu-item.ant-dropdown-menu-item-danger {color: #ff4d4f;} .ant-dropdown-menu-item.ant-dropdown-menu-item-danger:hover {color: #fff;background-color: #ff4d4f;} .ant-dropdown {color: @text-color;} -.ant-dropdown-arrow {border-radius: 0 0 2px;} +.ant-dropdown-arrow {background: linear-gradient(135deg, transparent 40%, @popover-bg 40%);border-radius: 0 0 2px;} .ant-dropdown-arrow::before {background: @popover-bg;background-repeat: no-repeat;background-position: -10px -10px;} .ant-dropdown-placement-top > .ant-dropdown-arrow, .ant-dropdown-placement-topLeft > .ant-dropdown-arrow, .ant-dropdown-placement-topRight > .ant-dropdown-arrow {box-shadow: 3px 3px 7px -3px rgba(0, 0, 0, 0.1);} .ant-dropdown-placement-bottom > .ant-dropdown-arrow, .ant-dropdown-placement-bottomLeft > .ant-dropdown-arrow, .ant-dropdown-placement-bottomRight > .ant-dropdown-arrow {box-shadow: 2px 2px 5px -2px rgba(0, 0, 0, 0.1);} @@ -949,7 +936,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-input-group.ant-input-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search > .ant-input-group > .ant-input {border-radius: 2px 0 0 2px;} .ant-input-group > .ant-input-rtl:first-child, .ant-input-group-rtl .ant-input-group-addon:first-child {border-radius: 0 2px 2px 0;} .ant-input-group-rtl .ant-input-group-addon:first-child {border-right: 1px solid @border-color-base;border-left: 0;} -.ant-input-group-rtl .ant-input-group-addon:last-child {border-right: 0;border-left: 1px solid @border-color-base;border-radius: 2px 0 0 2px;} +.ant-input-group-rtl .ant-input-group-addon:last-child {border-right: 0;border-left: 1px solid @border-color-base;} .ant-input-group-rtl.ant-input-group > .ant-input:last-child, .ant-input-group-rtl.ant-input-group-addon:last-child {border-radius: 2px 0 0 2px;} .ant-input-group-rtl.ant-input-group .ant-input-affix-wrapper:not(:first-child) {border-radius: 2px 0 0 2px;} .ant-input-group-rtl.ant-input-group .ant-input-affix-wrapper:not(:last-child) {border-radius: 0 2px 2px 0;} @@ -957,10 +944,6 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-input-group-rtl.ant-input-group.ant-input-group-compact > *:first-child, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select:first-child > .ant-select-selector, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select-auto-complete:first-child .ant-input, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-cascader-picker:first-child .ant-input {border-radius: 0 2px 2px 0;} .ant-input-group-rtl.ant-input-group.ant-input-group-compact > *:last-child, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select:last-child > .ant-select-selector, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-select-auto-complete:last-child .ant-input, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-cascader-picker:last-child .ant-input, .ant-input-group-rtl.ant-input-group.ant-input-group-compact > .ant-cascader-picker-focused:last-child .ant-input {border-left-width: 1px;border-radius: 2px 0 0 2px;} .ant-input-group.ant-input-group-compact .ant-input-group-wrapper-rtl:not(:last-child).ant-input-search > .ant-input-group > .ant-input {border-radius: 0 2px 2px 0;} -.ant-input-group > .ant-input-rtl:first-child {border-radius: 0 2px 2px 0;} -.ant-input-group > .ant-input-rtl:last-child {border-radius: 2px 0 0 2px;} -.ant-input-group-rtl .ant-input-group-addon:first-child {border-right: 1px solid @border-color-base;border-left: 0;border-radius: 0 2px 2px 0;} -.ant-input-group-rtl .ant-input-group-addon:last-child {border-right: 0;border-left: 1px solid @border-color-base;border-radius: 2px 0 0 2px;} .ant-input-password-icon.anticon {color: @text-color-secondary;} .ant-input-password-icon.anticon:hover {color: @input-icon-hover-color;} .ant-input-textarea-show-count::after {color: @text-color-secondary;} @@ -1046,7 +1029,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search > .ant-input-group > .ant-input {border-radius: 2px 0 0 2px;} .ant-input-number-group > .ant-input-number-rtl:first-child, .ant-input-number-group-rtl .ant-input-number-group-addon:first-child {border-radius: 0 2px 2px 0;} .ant-input-number-group-rtl .ant-input-number-group-addon:first-child {border-right: 1px solid @border-color-base;border-left: 0;} -.ant-input-number-group-rtl .ant-input-number-group-addon:last-child {border-right: 0;border-left: 1px solid @border-color-base;border-radius: 2px 0 0 2px;} +.ant-input-number-group-rtl .ant-input-number-group-addon:last-child {border-right: 0;border-left: 1px solid @border-color-base;} .ant-input-number-group-rtl.ant-input-number-group > .ant-input-number:last-child, .ant-input-number-group-rtl.ant-input-number-group-addon:last-child {border-radius: 2px 0 0 2px;} .ant-input-number-group-rtl.ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child) {border-radius: 2px 0 0 2px;} .ant-input-number-group-rtl.ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child) {border-radius: 0 2px 2px 0;} @@ -1054,10 +1037,6 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > *:first-child, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-select:first-child > .ant-select-selector, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-select-auto-complete:first-child .ant-input, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-cascader-picker:first-child .ant-input {border-radius: 0 2px 2px 0;} .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > *:last-child, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-select:last-child > .ant-select-selector, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-select-auto-complete:last-child .ant-input, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-cascader-picker:last-child .ant-input, .ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact > .ant-cascader-picker-focused:last-child .ant-input {border-left-width: 1px;border-radius: 2px 0 0 2px;} .ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper-rtl:not(:last-child).ant-input-search > .ant-input-group > .ant-input {border-radius: 0 2px 2px 0;} -.ant-input-number-group > .ant-input-number-rtl:first-child {border-radius: 0 2px 2px 0;} -.ant-input-number-group > .ant-input-number-rtl:last-child {border-radius: 2px 0 0 2px;} -.ant-input-number-group-rtl .ant-input-number-group-addon:first-child {border-right: 1px solid @border-color-base;border-left: 0;border-radius: 0 2px 2px 0;} -.ant-input-number-group-rtl .ant-input-number-group-addon:last-child {border-right: 0;border-left: 1px solid @border-color-base;border-radius: 2px 0 0 2px;} .ant-input-number-handler {color: @text-color-secondary;border-left: 1px solid @border-color-base;} .ant-input-number-handler:active {background: @input-number-handler-active-bg;} .ant-input-number-handler:hover .ant-input-number-handler-up-inner, .ant-input-number-handler:hover .ant-input-number-handler-down-inner {color: color(~`colorPalette("@{primary-color}", 5)`);} @@ -1149,25 +1128,10 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-mentions-dropdown-menu-item-active {background-color: @item-hover-bg;} .ant-menu-item-danger.ant-menu-item {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-item-danger.ant-menu-item-active {color: #ff4d4f;} -<<<<<<< Updated upstream -<<<<<<< Updated upstream - -.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);} +.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{picker-date-hover-range-border-color}", 4)`);} .ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} .ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} -.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);} -======= -.ant-menu-item-danger.ant-menu-item:active {background: color(~`colorPalette("@{segmented-label-hover-color}", 1)`);} -.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} -.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} -.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{segmented-label-hover-color}", 1)`);} ->>>>>>> Stashed changes -======= -.ant-menu-item-danger.ant-menu-item:active {background: #fff1f0;} -.ant-menu-item-danger.ant-menu-item-selected {color: #ff4d4f;} -.ant-menu-item-danger.ant-menu-item-selected > a, .ant-menu-item-danger.ant-menu-item-selected > a:hover {color: #ff4d4f;} -.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: #fff1f0;} ->>>>>>> Stashed changes +.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {background-color: color(~`colorPalette("@{picker-date-hover-range-border-color}", 4)`);} .ant-menu-inline .ant-menu-item-danger.ant-menu-item::after {border-right-color: #ff4d4f;} .ant-menu-dark .ant-menu-item-danger.ant-menu-item, .ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover, .ant-menu-dark .ant-menu-item-danger.ant-menu-item > a {color: #ff4d4f;} .ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected {color: #fff;background-color: #ff4d4f;} @@ -1328,8 +1292,8 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-pagination-simple .ant-pagination-simple-pager input:hover {border-color: @primary-color;} .ant-pagination-simple .ant-pagination-simple-pager input:focus {border-color: color(~`colorPalette("@{primary-color}", 5)`);box-shadow: 0 0 0 2px fade(@primary-color, 20%);} .ant-pagination-simple .ant-pagination-simple-pager input[disabled] {color: @disabled-color;background: @disabled-bg;border-color: @border-color-base;} -.ant-pagination.ant-pagination-mini .ant-pagination-item:not(.ant-pagination-item-active) {background: transparent;border-color: transparent;} -.ant-pagination.ant-pagination-mini .ant-pagination-prev .ant-pagination-item-link, .ant-pagination.ant-pagination-mini .ant-pagination-next .ant-pagination-item-link {background: transparent;border-color: transparent;} +.ant-pagination.mini .ant-pagination-item:not(.ant-pagination-item-active) {background: transparent;border-color: transparent;} +.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link, .ant-pagination.mini .ant-pagination-next .ant-pagination-item-link {background: transparent;border-color: transparent;} .ant-pagination.ant-pagination-disabled .ant-pagination-item {background: @disabled-bg;border-color: @border-color-base;} .ant-pagination.ant-pagination-disabled .ant-pagination-item a {color: @disabled-color;background: transparent;border: none;} .ant-pagination.ant-pagination-disabled .ant-pagination-item-active {background: @pagination-item-disabled-bg-active;} @@ -1345,8 +1309,8 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-popover-message {color: @text-color;} .ant-popover-message > .anticon {color: #faad14;} .ant-popover-arrow {background: transparent;} -.ant-popover-arrow-content {--antd-arrow-background-color: @popover-bg;border-radius: 0 0 2px;} -.ant-popover-arrow-content::before {background: var(--antd-arrow-background-color);background-repeat: no-repeat;background-position: -10px -10px;} +.ant-popover-arrow-content {background-color: @popover-bg;border-radius: 0 0 2px;} +.ant-popover-arrow-content::before {background: @popover-bg;background-repeat: no-repeat;background-position: -10px -10px;} .ant-popover-placement-top .ant-popover-arrow-content, .ant-popover-placement-topLeft .ant-popover-arrow-content, .ant-popover-placement-topRight .ant-popover-arrow-content {box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);} .ant-popover-placement-right .ant-popover-arrow-content, .ant-popover-placement-rightTop .ant-popover-arrow-content, .ant-popover-placement-rightBottom .ant-popover-arrow-content {box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);} .ant-popover-placement-bottom .ant-popover-arrow-content, .ant-popover-placement-bottomLeft .ant-popover-arrow-content, .ant-popover-placement-bottomRight .ant-popover-arrow-content {box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.06);} @@ -1402,13 +1366,12 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-radio-wrapper {color: @text-color;} .ant-radio {color: @text-color;} .ant-radio-wrapper:hover .ant-radio, .ant-radio:hover .ant-radio-inner, .ant-radio-input:focus + .ant-radio-inner {border-color: @primary-color;} -.ant-radio-input:focus + .ant-radio-inner {box-shadow: 0 0 0 3px fade(@primary-color, 12%);} +.ant-radio-input:focus + .ant-radio-inner {box-shadow: 0 0 0 3px color(~`colorPalette("@{primary-color}", 1)`);} .ant-radio-checked::after {border: 1px solid @primary-color;border-radius: 50%;animation-fill-mode: both;} .ant-radio-inner {background-color: @btn-default-bg;border-color: @border-color-base;border-style: solid;border-width: 1px;border-radius: 50%;} .ant-radio-inner::after {background-color: @primary-color;border-top: 0;border-left: 0;border-radius: 16px;} -.ant-radio.ant-radio-disabled .ant-radio-inner {border-color: @border-color-base;} .ant-radio-checked .ant-radio-inner {border-color: @primary-color;} -.ant-radio-disabled .ant-radio-inner {background-color: @disabled-bg;} +.ant-radio-disabled .ant-radio-inner {background-color: @disabled-bg;border-color: @border-color-base !important;} .ant-radio-disabled .ant-radio-inner::after {background-color: @radio-dot-disabled-color;} .ant-radio-disabled + span {color: @disabled-color;} .ant-radio-button-wrapper {color: @text-color;background: @btn-default-bg;border: 1px solid @border-color-base;border-top-width: 1.02px;border-left-width: 0;} @@ -1418,7 +1381,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-radio-button-wrapper:last-child {border-radius: 0 2px 2px 0;} .ant-radio-button-wrapper:first-child:last-child {border-radius: 2px;} .ant-radio-button-wrapper:hover {color: @primary-color;} -.ant-radio-button-wrapper:focus-within {box-shadow: 0 0 0 3px fade(@primary-color, 12%);} +.ant-radio-button-wrapper:focus-within {box-shadow: 0 0 0 3px color(~`colorPalette("@{primary-color}", 1)`);} .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {color: @primary-color;background: @btn-default-bg;border-color: @primary-color;} .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled)::before {background-color: @primary-color;} .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child {border-color: @primary-color;} @@ -1426,11 +1389,11 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover::before {background-color: color(~`colorPalette("@{primary-color}", 5)`);} .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active {color: color(~`colorPalette("@{primary-color}", 7)`);border-color: color(~`colorPalette("@{primary-color}", 7)`);} .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active::before {background-color: color(~`colorPalette("@{primary-color}", 7)`);} -.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {box-shadow: 0 0 0 3px fade(@primary-color, 12%);} +.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {box-shadow: 0 0 0 3px color(~`colorPalette("@{primary-color}", 1)`);} .ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {color: @radio-solid-checked-color;background: @primary-color;border-color: @primary-color;} .ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover {color: @radio-solid-checked-color;background: color(~`colorPalette("@{primary-color}", 5)`);border-color: color(~`colorPalette("@{primary-color}", 5)`);} .ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active {color: @radio-solid-checked-color;background: color(~`colorPalette("@{primary-color}", 7)`);border-color: color(~`colorPalette("@{primary-color}", 7)`);} -.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {box-shadow: 0 0 0 3px fade(@primary-color, 12%);} +.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within {box-shadow: 0 0 0 3px color(~`colorPalette("@{primary-color}", 1)`);} .ant-radio-button-wrapper-disabled {color: @disabled-color;background-color: @disabled-bg;border-color: @border-color-base;} .ant-radio-button-wrapper-disabled:first-child, .ant-radio-button-wrapper-disabled:hover {color: @disabled-color;background-color: @disabled-bg;border-color: @border-color-base;} .ant-radio-button-wrapper-disabled:first-child {border-left-color: @border-color-base;} @@ -1497,11 +1460,14 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-skeleton-header .ant-skeleton-avatar.ant-skeleton-avatar-circle {border-radius: 50%;} .ant-skeleton-header .ant-skeleton-avatar-lg.ant-skeleton-avatar-circle {border-radius: 50%;} .ant-skeleton-header .ant-skeleton-avatar-sm.ant-skeleton-avatar-circle {border-radius: 50%;} -.ant-skeleton-content .ant-skeleton-title {background: @skeleton-color;border-radius: 2px;} -.ant-skeleton-content .ant-skeleton-paragraph > li {background: @skeleton-color;border-radius: 2px;} +.ant-skeleton-content .ant-skeleton-title {background: @skeleton-color;border-radius: 4px;} +.ant-skeleton-content .ant-skeleton-paragraph > li {background: @skeleton-color;border-radius: 4px;} .ant-skeleton-round .ant-skeleton-content .ant-skeleton-title, .ant-skeleton-round .ant-skeleton-content .ant-skeleton-paragraph > li {border-radius: 100px;} -.ant-skeleton-active .ant-skeleton-title, .ant-skeleton-active .ant-skeleton-paragraph > li, .ant-skeleton-active .ant-skeleton-avatar, .ant-skeleton-active .ant-skeleton-button, .ant-skeleton-active .ant-skeleton-input, .ant-skeleton-active .ant-skeleton-image {background: transparent;} -.ant-skeleton-active .ant-skeleton-title::after, .ant-skeleton-active .ant-skeleton-paragraph > li::after, .ant-skeleton-active .ant-skeleton-avatar::after, .ant-skeleton-active .ant-skeleton-button::after, .ant-skeleton-active .ant-skeleton-input::after, .ant-skeleton-active .ant-skeleton-image::after {background: linear-gradient(90deg, @skeleton-color 25%, @skeleton-to-color 37%, @skeleton-color 63%);} +.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title, .ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph > li {background: linear-gradient(90deg, @skeleton-color 25%, @skeleton-to-color 37%, @skeleton-color 63%);background-size: 400% 100%;} +.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar {background: linear-gradient(90deg, @skeleton-color 25%, @skeleton-to-color 37%, @skeleton-color 63%);background-size: 400% 100%;} +.ant-skeleton.ant-skeleton-active .ant-skeleton-button {background: linear-gradient(90deg, @skeleton-color 25%, @skeleton-to-color 37%, @skeleton-color 63%);background-size: 400% 100%;} +.ant-skeleton.ant-skeleton-active .ant-skeleton-input {background: linear-gradient(90deg, @skeleton-color 25%, @skeleton-to-color 37%, @skeleton-color 63%);background-size: 400% 100%;} +.ant-skeleton.ant-skeleton-active .ant-skeleton-image {background: linear-gradient(90deg, @skeleton-color 25%, @skeleton-to-color 37%, @skeleton-color 63%);background-size: 400% 100%;} .ant-skeleton-element .ant-skeleton-button {background: @skeleton-color;border-radius: 2px;} .ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-circle {border-radius: 50%;} .ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-round {border-radius: 32px;} @@ -1618,7 +1584,7 @@ tr > .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child::afte .ant-table.ant-table-bordered.ant-table-scroll-horizontal > .ant-table-container > .ant-table-body > table > tbody > tr.ant-table-expanded-row > td, .ant-table.ant-table-bordered.ant-table-scroll-horizontal > .ant-table-container > .ant-table-body > table > tbody > tr.ant-table-placeholder > td {border-right: 0;} .ant-table.ant-table-bordered > .ant-table-footer {border: 1px solid @border-color-split;border-top: 0;} .ant-table-cell .ant-table-container:first-child {border-top: 0;} -.ant-table-cell-scrollbar:not([rowspan]) {box-shadow: 0 1px 0 1px @table-header-bg;} +.ant-table-cell-scrollbar {box-shadow: 0 1px 0 1px @table-header-bg;} .ant-table {color: @text-color;background: @component-background;border-radius: 2px;} .ant-table table {border-radius: 2px 2px 0 0;border-collapse: separate;border-spacing: 0;} .ant-table-footer {color: @heading-color;background: @background-color-light;} @@ -1669,10 +1635,10 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-table-empty .ant-table-tbody > tr.ant-table-placeholder {color: @disabled-color;} .ant-table-tbody > tr.ant-table-placeholder:hover > td {background: @component-background;} .ant-table-cell-fix-left, .ant-table-cell-fix-right {background: @component-background;} -.ant-table-ping-left:not(.ant-table-has-fix-left) > .ant-table-container::before {box-shadow: inset 10px 0 8px -8px darken(@shadow-color, 5%);} +.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container::before {box-shadow: inset 10px 0 8px -8px darken(@shadow-color, 5%);} .ant-table-ping-left .ant-table-cell-fix-left-first::after, .ant-table-ping-left .ant-table-cell-fix-left-last::after {box-shadow: inset 10px 0 8px -8px darken(@shadow-color, 5%);} .ant-table-ping-left .ant-table-cell-fix-left-last::before {background-color: transparent !important;} -.ant-table-ping-right:not(.ant-table-has-fix-right) > .ant-table-container::after {box-shadow: inset -10px 0 8px -8px darken(@shadow-color, 5%);} +.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container::after {box-shadow: inset -10px 0 8px -8px darken(@shadow-color, 5%);} .ant-table-ping-right .ant-table-cell-fix-right-first::after, .ant-table-ping-right .ant-table-cell-fix-right-last::after {box-shadow: inset -10px 0 8px -8px darken(@shadow-color, 5%);} .ant-table-sticky-holder {background: @component-background;} .ant-table-sticky-scroll {background: lighten(@table-border-color, 80%);border-top: 1px solid @border-color-split;} @@ -1681,7 +1647,6 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-table-sticky-scroll-bar-active {background-color: fade(@table-sticky-scroll-bar-bg, 80%);} .ant-table-title {border-radius: 2px 2px 0 0;} .ant-table-title + .ant-table-container {border-top-left-radius: 0;border-top-right-radius: 0;} -.ant-table-title + .ant-table-container table {border-radius: 0;} .ant-table-title + .ant-table-container table > thead > tr:first-child th:first-child {border-radius: 0;} .ant-table-title + .ant-table-container table > thead > tr:first-child th:last-child {border-radius: 0;} .ant-table-container {border-top-left-radius: 2px;border-top-right-radius: 2px;} @@ -1737,78 +1702,31 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-tag-checkable:active, .ant-tag-checkable-checked {color: #fff;} .ant-tag-checkable-checked {background-color: @primary-color;} .ant-tag-checkable:active {background-color: color(~`colorPalette("@{primary-color}", 7)`);} -<<<<<<< Updated upstream -<<<<<<< Updated upstream - -.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{component-background}", 1)`);border-color: #ffadd2;} - -======= ->>>>>>> Stashed changes -======= ->>>>>>> Stashed changes .ant-tag-pink {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;} - .ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{component-background}", 1)`);border-color: #ffadd2;} +.ant-tag-magenta {color: #c41d7f;background: #fff0f6;border-color: #ffadd2;} .ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -<<<<<<< Updated upstream -.ant-tag-red {color: #cf1322;background: #fff1f0;border-color: #ffa39e;} -<<<<<<< Updated upstream - -.ant-tag-pink {color: #c41d7f;background: color(~`colorPalette("@{success-color-deprecated-bg}", 1)`);border-color: #ffadd2;} -.ant-tag-pink-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -.ant-tag-magenta {color: #c41d7f;background: color(~`colorPalette("@{success-color-deprecated-bg}", 1)`);border-color: #ffadd2;} -.ant-tag-magenta-inverse {color: #fff;background: #eb2f96;border-color: #eb2f96;} -.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{modal-header-border-color-split}", 1)`);border-color: #ffa39e;} - -======= -.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{segmented-label-hover-color}", 1)`);border-color: #ffa39e;} ->>>>>>> Stashed changes -======= ->>>>>>> Stashed changes +.ant-tag-red {color: #cf1322;background: color(~`colorPalette("@{picker-date-hover-range-border-color}", 4)`);border-color: #ffa39e;} .ant-tag-red-inverse {color: #fff;background: #f5222d;border-color: #f5222d;} .ant-tag-volcano {color: #d4380d;background: #fff2e8;border-color: #ffbb96;} .ant-tag-volcano-inverse {color: #fff;background: #fa541c;border-color: #fa541c;} -.ant-tag-orange {color: #d46b08;background: color(~`colorPalette("@{alert-warning-border-color}", 1)`);border-color: #ffd591;} +.ant-tag-orange {color: #d46b08;background: #fff7e6;border-color: #ffd591;} .ant-tag-orange-inverse {color: #fff;background: #fa8c16;border-color: #fa8c16;} -.ant-tag-yellow {color: #d4b106;background: color(~`colorPalette("@{modal-footer-border-color-split}", 1)`);border-color: #fffb8f;} +.ant-tag-yellow {color: #d4b106;background: #feffe6;border-color: #fffb8f;} .ant-tag-yellow-inverse {color: #fff;background: #fadb14;border-color: #fadb14;} .ant-tag-gold {color: #d48806;background: #fffbe6;border-color: #ffe58f;} .ant-tag-gold-inverse {color: #fff;background: #faad14;border-color: #faad14;} .ant-tag-cyan {color: #08979c;background: #e6fffb;border-color: #87e8de;} .ant-tag-cyan-inverse {color: #fff;background: #13c2c2;border-color: #13c2c2;} -.ant-tag-lime {color: #7cb305;background: color(~`colorPalette("@{text-color-secondary}", 1)`);border-color: #eaff8f;} +.ant-tag-lime {color: #7cb305;background: #fcffe6;border-color: #eaff8f;} .ant-tag-lime-inverse {color: #fff;background: #a0d911;border-color: #a0d911;} .ant-tag-green {color: #389e0d;background: #f6ffed;border-color: #b7eb8f;} .ant-tag-green-inverse {color: #fff;background: #52c41a;border-color: #52c41a;} -<<<<<<< Updated upstream -<<<<<<< Updated upstream - .ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;} .ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{btn-primary-bg}", 1)`);border-color: #adc6ff;} - - -.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: color(~`colorPalette("@{alert-info-border-color}", 5)`);} -.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{tree-bg}", 1)`);border-color: #adc6ff;} - +.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{calendar-input-bg}", 2)`);border-color: #adc6ff;} .ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} .ant-tag-purple {color: #531dab;background: #f9f0ff;border-color: #d3adf7;} -======= -.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;} -.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{dropdown-menu-submenu-disabled-bg}", 3)`);border-color: #adc6ff;} -.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} -.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{alert-error-bg-color}", 1)`);border-color: #d3adf7;} ->>>>>>> Stashed changes -======= -.ant-tag-blue {color: #096dd9;background: #e6f7ff;border-color: #91d5ff;} -.ant-tag-blue-inverse {color: #fff;background: #1890ff;border-color: #1890ff;} -.ant-tag-geekblue {color: #1d39c4;background: color(~`colorPalette("@{info-color-deprecated-bg}", 1)`);border-color: #adc6ff;} -.ant-tag-geekblue-inverse {color: #fff;background: #2f54eb;border-color: #2f54eb;} -.ant-tag-purple {color: #531dab;background: color(~`colorPalette("@{background-color-light}", 1)`);border-color: #d3adf7;} ->>>>>>> Stashed changes .ant-tag-purple-inverse {color: #fff;background: #722ed1;border-color: #722ed1;} .ant-tag-success {color: #52c41a;background: @success-color-deprecated-bg;border-color: @success-color-deprecated-border;} .ant-tag-processing {color: @primary-color;background: @info-color-deprecated-bg;border-color: @info-color-deprecated-border;} @@ -1831,7 +1749,7 @@ tr.ant-table-expanded-row:hover > td {background: @table-expanded-row-bg;} .ant-tooltip {color: @text-color;} .ant-tooltip-inner {color: #fff;background-color: @tooltip-bg;border-radius: 2px;box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);} .ant-tooltip-arrow {background: transparent;} -.ant-tooltip-arrow-content {--antd-arrow-background-color: linear-gradient(to right bottom, fadeout(@tooltip-bg, 10%), @tooltip-bg);border-radius: 0 0 2px;} +.ant-tooltip-arrow-content {--antd-arrow-background-color: linear-gradient(to right bottom, fadeout(@tooltip-bg, 10%), @tooltip-bg);background-color: transparent;border-radius: 0 0 2px;} .ant-tooltip-arrow-content::before {background: var(--antd-arrow-background-color);background-repeat: no-repeat;background-position: -10px -10px;} .ant-tooltip-placement-top .ant-tooltip-arrow-content, .ant-tooltip-placement-topLeft .ant-tooltip-arrow-content, .ant-tooltip-placement-topRight .ant-tooltip-arrow-content {box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);} .ant-tooltip-placement-right .ant-tooltip-arrow-content, .ant-tooltip-placement-rightTop .ant-tooltip-arrow-content, .ant-tooltip-placement-rightBottom .ant-tooltip-arrow-content {box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);} @@ -2021,7 +1939,6 @@ a.ant-typography.ant-typography-disabled:hover, .ant-typography a.ant-typography .ant-typography pre code {background: transparent;border: 0;} .ant-typography blockquote {border-left: 4px solid rgba(100, 100, 100, 0.2);} .ant-upload {color: @text-color;} -.ant-upload.ant-upload-disabled {color: @disabled-color;} .ant-upload.ant-upload-select-picture-card {background-color: @background-color-light;border: 1px dashed @border-color-base;border-radius: 2px;} .ant-upload.ant-upload-select-picture-card:hover {border-color: @primary-color;} .ant-upload-disabled.ant-upload.ant-upload-select-picture-card:hover {border-color: @border-color-base;} @@ -2046,22 +1963,13 @@ a.ant-typography.ant-typography-disabled:hover, .ant-typography a.ant-typography .ant-upload-list-picture .ant-upload-list-item-error, .ant-upload-list-picture-card .ant-upload-list-item-error {border-color: #ff4d4f;} .ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info, .ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info {background: transparent;} .ant-upload-list-picture .ant-upload-list-item-uploading, .ant-upload-list-picture-card .ant-upload-list-item-uploading {border-style: dashed;} -<<<<<<< Updated upstream -<<<<<<< Updated upstream - -.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;} - -.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;} - -======= -======= ->>>>>>> Stashed changes .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#e6f7ff'] {fill: @error-color-deprecated-bg;} .ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'], .ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill='#1890ff'] {fill: #ff4d4f;} .ant-upload-list-picture-card .ant-upload-list-item-info::before {background-color: rgba(0, 0, 0, 0.5);} .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete {color: rgba(255, 255, 255, 0.85);} .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye:hover, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download:hover, .ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete:hover {color: #fff;} .ant-upload-list-picture-card .ant-upload-list-item-uploading.ant-upload-list-item {background-color: @background-color-light;} +.ant-upload-list .ant-upload-animate-inline-appear, .ant-upload-list .ant-upload-animate-inline-enter, .ant-upload-list .ant-upload-animate-inline-leave {animation-fill-mode: cubic-bezier(0.78, 0.14, 0.15, 0.86);} .ant-pro-table-search {background-color: @component-background !important;} .bezierEasingMixin() { @functions: ~`(function() {var NEWTON_ITERATIONS = 4;var NEWTON_MIN_SLOPE = 0.001;var SUBDIVISION_PRECISION = 0.0000001;var SUBDIVISION_MAX_ITERATIONS = 10;var kSplineTableSize = 11;var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);var float32ArraySupported = typeof Float32Array === 'function';function A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } @@ -2511,8 +2419,7 @@ this.tinycolor = tinycolor;})()`;} .colorPaletteMixin() { @functions: ~`(function() {var hueStep = 2;var saturationStep = 0.16;var saturationStep2 = 0.05;var brightnessStep1 = 0.05;var brightnessStep2 = 0.15;var lightColorCount = 5;var darkColorCount = 4;var getHue = function(hsv, i, isLight) {var hue;if (hsv.h >= 60 && hsv.h <= 240) {hue = isLight ? hsv.h - hueStep * i : hsv.h + hueStep * i;} else {hue = isLight ? hsv.h + hueStep * i : hsv.h - hueStep * i;} if (hue < 0) {hue += 360;} else if (hue >= 360) {hue -= 360;} - return Math.round(hue);};var getSaturation = function(hsv, i, isLight) {if (hsv.h === 0 && hsv.s === 0) {return hsv.s;} - var saturation;if (isLight) {saturation = hsv.s - saturationStep * i;} else if (i === darkColorCount) {saturation = hsv.s + saturationStep;} else {saturation = hsv.s + saturationStep2 * i;} + return Math.round(hue);};var getSaturation = function(hsv, i, isLight) {var saturation;if (isLight) {saturation = hsv.s - saturationStep * i;} else if (i === darkColorCount) {saturation = hsv.s + saturationStep;} else {saturation = hsv.s + saturationStep2 * i;} if (saturation > 1) {saturation = 1;} if (isLight && i === lightColorCount && saturation > 0.1) {saturation = 0.1;} if (saturation < 0.06) {saturation = 0.06;} @@ -2969,7 +2876,7 @@ this.tinycolor = tinycolor;})()`;} @cascader-dropdown-line-height: @dropdown-line-height; @anchor-bg: transparent; @anchor-border-color: @border-color-split; -@anchor-link-top: 4px; +@anchor-link-top: 7px; @anchor-link-left: 16px; @anchor-link-padding: @anchor-link-top 0 @anchor-link-top @anchor-link-left; @tooltip-max-width: 250px; @@ -2994,7 +2901,7 @@ this.tinycolor = tinycolor;})()`;} @modal-header-border-style: @border-style-base; @modal-header-title-line-height: 22px; @modal-header-title-font-size: @font-size-lg; -@modal-header-close-size: @modal-header-title-line-height + 2 * @modal-header-padding-vertical; +@modal-header-close-size: 56px; @modal-heading-color: @heading-color; @modal-close-color: @text-color-secondary; @modal-footer-bg: transparent; @@ -3005,7 +2912,6 @@ this.tinycolor = tinycolor;})()`;} @modal-mask-bg: fade(@black, 45%); @modal-confirm-body-padding: 32px 32px 24px; @modal-confirm-title-font-size: @font-size-lg; -@modal-border-radius: @border-radius-base; @progress-default-color: @processing-color; @progress-remaining-color: @background-color-base; @progress-info-text-color: @progress-text-color; diff --git a/web/client/src/sections/fillion/actions/file.js b/web/client/src/sections/fillion/actions/file.js new file mode 100644 index 00000000..e453a967 --- /dev/null +++ b/web/client/src/sections/fillion/actions/file.js @@ -0,0 +1,89 @@ +import { basicAction } from '@peace/utils' +import { ApiTable } from '$utils' + + +export function createFileDir(query) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'CREATE_FILE_DIR', + url: ApiTable.createFileDir, + query, + msg: { error: '创建文件夹失败' }, + // reducer: { name: 'uploadFile' } + }); +} + +export function delFileDir(query) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'DEL_FILE_DIR', + url: ApiTable.delFileDir, + query, + msg: { error: '删除文件夹失败' }, + // reducer: { name: 'uploadFile' } + }); +} + +export function queryFileDir(query) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'QUERY_FILE_DIR', + url: ApiTable.queryFileDIr, + query, + msg: { error: '查询文件夹失败' }, + reducer: { name: 'fileDirs' } + }); +} + +export function updateFileDir(query) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'UPDATE_FILE_DIR', + url: ApiTable.updateFileDir, + query, + msg: { error: '更新文件夹名称失败' }, + // reducer: { name: 'fileDirs' } + }); +} + + +// query : {typeId, userId, userName, startDate, endDate, fileSize, fileName, fileUrl, fileExt} +export function uploadFile(query) { + return dispatch => basicAction({ + type: 'post', + dispatch: dispatch, + actionType: 'UPLOAD_FILE', + url: ApiTable.uploadFile, + query, + msg: { error: '上传文件失败' }, + reducer: { name: 'uploadFile' } + }); +} + +export function deleteFile(id) { + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'DELETE_FILE', + url: ApiTable.deleteFile, + msg: { error: '删除文件数据失败' }, + query: { id }, + reducer: { name: 'fileDel' } + }); +} + +export function getFileList(query) { // fId, limit, offset, searchTxt + return dispatch => basicAction({ + type: 'get', + dispatch: dispatch, + actionType: 'GET_FILE_LIST', + url: ApiTable.getFileList, + query, + msg: { error: '获取档案数据失败' }, + reducer: { name: 'fileList' } + }); +} \ No newline at end of file diff --git a/web/client/src/sections/fillion/actions/index.js b/web/client/src/sections/fillion/actions/index.js index 2b041438..e807a408 100644 --- a/web/client/src/sections/fillion/actions/index.js +++ b/web/client/src/sections/fillion/actions/index.js @@ -2,7 +2,9 @@ import * as infor from './infor' import * as patrol from './patrol' +import * as file from './file' export default { ...infor, ...patrol, + ...file, } \ No newline at end of file diff --git a/web/client/src/sections/fillion/actions/infor.js b/web/client/src/sections/fillion/actions/infor.js index 583d9454..96be12c9 100644 --- a/web/client/src/sections/fillion/actions/infor.js +++ b/web/client/src/sections/fillion/actions/infor.js @@ -97,7 +97,7 @@ export function getRoadway(query) { actionType: 'GET_ROADWAY', url: ApiTable.getRoadway, msg: { error: '获取道路信息失败' }, - // reducer: { name: 'reportstatistic' } + // reducer: { name: 'roads' } }); } export function putRoadway(query) { diff --git a/web/client/src/sections/fillion/components/file/roadModal.js b/web/client/src/sections/fillion/components/file/roadModal.js new file mode 100644 index 00000000..994b5224 --- /dev/null +++ b/web/client/src/sections/fillion/components/file/roadModal.js @@ -0,0 +1,73 @@ +import React, { useState, useEffect } from 'react' +import PropTypes from 'prop-types'; +import { Modal, Input, Row, Col } from 'antd'; +const { Search } = Input; +const RoadModal = props => { + const { isVisible, onSubmit, onCancel, roads } = props; + const [roadName, setRoadName] = useState(''); + const [isRepeated, setIsRepeated] = useState(true); + + let timer = null; + useEffect(() => { + if (timer) + clearTimeout(timer) + else { + timer = setTimeout(() => { + if (roads.some(item => item.roadName == roadName)) { + setIsRepeated(true) + } else { + setIsRepeated(false); + } + }, 500); + } + + }, [roadName]); + + + useEffect(() => { + if (!isVisible) { + setRoadName('') + setIsRepeated(false) + } + return () => { + setRoadName('') + } + }, [isVisible]) + + + const onInputText = (e) => { + const value = e.target.value; + setRoadName(value); + } + + const onConfirm = () => { + if (!isRepeated) + if (roadName && roadName.trim() != '') { + onSubmit(roadName) + } + } + + + return ( + + + + 请输入道路名称: + + + + + + { + isRepeated ? 道路名称重复 + : '' + } + + + + ) +} + +RoadModal.propTypes = {} + +export default RoadModal \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/file/uploadModal.js b/web/client/src/sections/fillion/components/file/uploadModal.js new file mode 100644 index 00000000..e57a0026 --- /dev/null +++ b/web/client/src/sections/fillion/components/file/uploadModal.js @@ -0,0 +1,45 @@ +import React, { useState, useEffect } from 'react' +import { Modal, Input, Row, Col } from 'antd'; +import Upload from '../../../../components/Upload'; +const UploadModal = props => { + const { isVisible, onSubmit, onCancel, } = props; + const [files, setFiles] = useState() + + + useEffect(() => { + if (!isVisible) { + } + return () => { + } + }, [isVisible]) + + + + const onConfirm = () => { + onSubmit(files); + } + + const onFileUploaded = (fileList) => { + console.log('fileList: ', fileList); + setFiles(fileList); + } + + return ( + + + + + + ) +} + +UploadModal.propTypes = {} + +export default UploadModal \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/fileTable.js b/web/client/src/sections/fillion/components/fileTable.js new file mode 100644 index 00000000..4052e40a --- /dev/null +++ b/web/client/src/sections/fillion/components/fileTable.js @@ -0,0 +1,356 @@ +import { connect } from 'react-redux'; +import './protable.less' +import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover } from 'antd'; +import ProTable from '@ant-design/pro-table'; +import { getFileList, createFileDir, queryFileDir } from '../actions/file'; +import React, { useEffect, useState } from 'react'; +import { httpDel } from '@peace/utils' +import { PinyinHelper } from '@peace/utils'; +import RoadModal from './file/roadModal'; + +// @ts-ignore +import UploadModal from './file/uploadModal'; + +const DetailList = (props) => { + const { fileList, loading, dispatch, handleOpen, handelRefresh, onPageChange } = props; + const [visible, setVisible] = useState(false) + const [selectRecord, setSelectRecord] = useState(); + const checkDetail = (record) => { + // dispatch(getReportDetail(record.id)) + } + + const handleRemove = (record) => { + let url = 'report/{reportId}'; + const actionType = "DEL_REPORT_RECORD"; + const msg = {} + if (record) { + url = url.replace('{reportId}', record.id) + httpDel(dispatch, { url, actionType, msg }).then(res => { + if (res.success) { + message.success("文件删除成功"); + handelRefresh() + } else { + message.error("文件删除失败") + } + }) + } + } + + const columns = [ + { + title: '资料名称', + key: 'fileName', + dataIndex: 'fileName', + align: 'center', + }, { + title: '所属道路', + key: 'road', + dataIndex: 'road', + align: 'center', + render: (text, record) => { + return ''; + } + }, { + title: '资料类型', + key: 'address', + dataIndex: 'address', + align: 'center', + render: (text, record) => { + return ''; + } + }, + { + title: '文件类型', + key: 'fileExt', + dataIndex: 'fileExt', + align: 'center' + }, + { + title: '文件大小', + width: 100, + key: 'fileSize', + dataIndex: 'fileSize', + align: 'center', + render: (text, record) => { + let size = 0; + if (record.fileSize < 1024 * 1024) { + size = (record.fileSize / 1024).toFixed(2) + 'KB' + } else { + size = (record.fileSize / 1024 / 1024).toFixed(2) + 'MB' + } + return {size} + } + }, { + title: '创建时间', + key: 'createDate', + dataIndex: 'createDate', + valueType: 'dateTime', + align: 'center' + }, { + title: '操作', + width: 200, + key: 'option', + valueType: 'option', + align: 'center', + render: (text, record) => { + return [ + , + + + + + ]} + visible={selectRecord == record.id && visible} + trigger="click" + onClick={() => setSelectRecord(record.id)} + title="是否删除该记录?" + onVisibleChange={(newVisible) => setVisible(newVisible)} + > + + + ] + } + }, + ]; + return ( + { + onPageChange(page, pageSize) + } + }} + rowKey="key" + toolBarRender={false} + search={false} + /> + ); +}; + + + +const RoadNameList = (props) => { + const [filterRoad, setFilterRoad] = useState([]); + const [addVisible, setAddVisible] = useState(false); + const [selectRoad, setSelectRoad] = useState(); + const { onChange, record, roads, loading, queryData, dispatch } = props; + const columns = [ + { + title: '道路名称', + key: 'roadName', + dataIndex: 'roadName', + align: 'center', + }, + + ]; + + useEffect(() => { + if (roads) { + setFilterRoad(roads) + } + }, [roads]) + + var timer = null; + const doRoadNameSearch = (e) => { + const name = e.target.value; + if (timer) { + clearTimeout(timer) + } else { + setTimeout(() => { + let _roads = roads.filter(road => PinyinHelper.isSearchMatched(road.roadName, name)); + setFilterRoad(_roads); + }, 500); + } + } + + const createRoadDir = (roadName) => { + dispatch(createFileDir({ roadName })).then(res => { + if (res.type == 'CREATE_FILE_DIR_SUCCESS') { + setAddVisible(false) + message.success('新增道路文件夹成功'); + dispatch(queryFileDir()) + } + }); + + } + + return ( +
+ { + return record.rId == selectRoad ? 'list-row-actived' : ''; + }} + toolBarRender={() => [ +
+ + +
+ ]} + options={false} + pagination={false} + search={false} + onRow={(record) => { + return { + onClick: () => { + if (record) { + setSelectRoad(record.rId); + onChange(record); + } + }, + }; + }} + /> + { setAddVisible(false) }} + /> +
+ + ); +}; + + + +const FileTable = (props) => { + const { roads, fileList, dispatch, fileListLoading, roadsLoading } = props; + const [record, setRecord] = useState(); + const [dateRange, setDateRange] = useState(); + const [detailVisible, setDetailVisible] = useState(false) + const [activeTabKey1, setActiveTabKey1] = useState('1'); + const [uploadVisible, setUploadVisible] = useState(false); + const { RangePicker } = DatePicker; + + useEffect(() => { + if (roads && roads instanceof Array) { + setRecord(roads[0]); + } + }, [roads]) + + useEffect(() => { + if (record) { + queryData(); + } + }, [record, dateRange]) + + const queryData = () => { + const { rId } = record; + dispatch(getFileList({ fId: activeTabKey1, limit: 10, offset: 0, roadId: rId })) + } + + const onPageChange = (page, pageSize) => { + dispatch(getFileList({ fId: activeTabKey1, limit: pageSize, offset: (page - 1) * pageSize, roadId: rId })) + } + + useEffect(() => { + if (record && activeTabKey1) { + queryData(); + } + + }, [activeTabKey1, record]) + + const handelRefresh = () => { + + } + + const handleClose = () => { + setDetailVisible(false) + } + const handleOpen = () => { + setDetailVisible(true) + } + + const tabList = [ + { + key: '1', + tab: '前期资料', + }, { + key: '2', + tab: '施工资料', + }, { + key: '3', + tab: '竣工资料', + }, { + key: '4', + tab: '维修资料', + }, { + key: '5', + tab: '道路资料', + }, + ]; + const onTab1Change = (key) => { + setActiveTabKey1(key); + }; + + const handleChangeRecord = (newRecord) => { + let target = null; + if (!record || newRecord.rId != record.rId) { + target = newRecord; + } + setRecord(target); + } + const hanleUpload = () => { + + } + + return ( +
+ + handleChangeRecord(record)} + record={record} + roads={roads} + loading={roadsLoading} /> + + { + onTab1Change(key); + }} + > + + + + + + + + { setUploadVisible(false) }} + onConfirm={hanleUpload} + /> +
+ + ); +}; + +function mapStateToProps(state) { + const { fileDirs, fileList } = state; + return { + roads: fileDirs.data, + roadsLoading: fileDirs.isRequesting, + fileList: fileList.data, + fileListLoading: fileList.isRequesting, + }; +} +export default connect(mapStateToProps)(FileTable); \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/protable.less b/web/client/src/sections/fillion/components/protable.less index 8379bd79..f788725f 100644 --- a/web/client/src/sections/fillion/components/protable.less +++ b/web/client/src/sections/fillion/components/protable.less @@ -1,21 +1,33 @@ -.protable-transpor{ - .ant-table-cell-fix-left{ +.protable-transpor { + .ant-table-cell-fix-left { background-color: #ffffff !important; } - .ant-table-cell-fix-right{ + + .ant-table-cell-fix-right { background-color: #ffffff !important; } - + } -.spilce{ - .split-row-select-active { - background-color: #e6f7ff; - } - th { - display: none; - } + +.list-row-actived{ + background-color: #7cafc6; + font-weight: 600; } -.card-protable{display: flex; - flex-direction:row; + + +// .spilce { +// .split-row-select-active { +// background-color: #7cafc6; +// font-weight: 600; +// } + +// th { +// display: none; +// } +// } + +.card-protable { + display: flex; + flex-direction: row; width: 100%; } \ No newline at end of file diff --git a/web/client/src/sections/fillion/containers/file.js b/web/client/src/sections/fillion/containers/file.js new file mode 100644 index 00000000..04803b9c --- /dev/null +++ b/web/client/src/sections/fillion/containers/file.js @@ -0,0 +1,40 @@ +import React, { useEffect, useState } from 'react'; +import { connect } from 'react-redux'; +import '../style.less'; +import { queryFileDir } from '../actions/file'; +import FileTable from '../components/fileTable'; +const superagent = require('superagent'); +const patrol = (props) => { + const { dispatch, user } = props + + useEffect(() => { + dispatch(queryFileDir()) + }, [true]) + //批量导出 + const exports = (ids, counts) => { + let reportIds = []; + if (ids.length) + reportIds = ids + else + reportIds = (counts || {}).ids || []; + superagent.post('/_report/http') + .send({ id: reportIds.map(i => Number(i)) }).end((err, res) => { + const resTextIs = res.text.split('/').pop() + window.open( + '/_api/' + + `attachments?src=files/${resTextIs}&filename=${encodeURIComponent(resTextIs)}&token=${user.token}`) + }) + } + + return ( + <> + + ) +} +function mapStateToProps(state) { + const { auth } = state + return { + user: auth.user, + } +} +export default connect(mapStateToProps)(patrol); \ No newline at end of file diff --git a/web/client/src/sections/fillion/containers/index.js b/web/client/src/sections/fillion/containers/index.js index 55870c0e..514e6631 100644 --- a/web/client/src/sections/fillion/containers/index.js +++ b/web/client/src/sections/fillion/containers/index.js @@ -11,4 +11,5 @@ import Videois from './videois'; import PromoTional from './promotional'; import Maintenance from './maintenance'; import Patrol from './patrol'; -export { Infor,transportation,BridgeTable,HigHways,OperaTional,Enforce,Public,Videois,PromoTional,Maintenance,Patrol }; \ No newline at end of file +import File from './file'; +export { Infor,transportation,BridgeTable,HigHways,OperaTional,Enforce,Public,Videois,PromoTional,Maintenance,Patrol,File}; \ No newline at end of file diff --git a/web/client/src/sections/fillion/nav-item.js b/web/client/src/sections/fillion/nav-item.js index 7ff3eedc..56f660d7 100644 --- a/web/client/src/sections/fillion/nav-item.js +++ b/web/client/src/sections/fillion/nav-item.js @@ -32,6 +32,9 @@ export function getNavItem(user, dispatch) { 公交管理 + + 档案管理 + 视频管理 diff --git a/web/client/src/sections/fillion/routes.js b/web/client/src/sections/fillion/routes.js index a3410fd4..175b336c 100644 --- a/web/client/src/sections/fillion/routes.js +++ b/web/client/src/sections/fillion/routes.js @@ -10,6 +10,7 @@ import { Videois } from './containers'; import { PromoTional } from './containers'; import { Maintenance } from './containers' import { Patrol } from './containers' +import { File } from './containers'; export default [{ type: 'inner', route: { @@ -31,14 +32,14 @@ export default [{ component: transportation, breadcrumb: '道路管理', } - , { + , { path: '/bridge', key: 'fillionbridge', menuSelectKeys: ['fillionbridge'], component: BridgeTable, breadcrumb: '桥梁管理', } - , { + , { path: '/highways', key: 'fillionhighways', menuSelectKeys: ['fillionhighways'], @@ -56,7 +57,7 @@ export default [{ menuSelectKeys: ['fillionenforce'], component: Enforce, breadcrumb: '执法管理', - }, { + }, { path: '/maintenance', key: 'fillionmaintenance', menuSelectKeys: ['fillionmaintenance'], @@ -74,14 +75,22 @@ export default [{ menuSelectKeys: ['fillionpublic'], component: Public, breadcrumb: '公交管理', - }, { + }, + { + path: '/file', + key: 'fileCont', + menuSelectKeys: ['fileCont'], + component: File, + breadcrumb: '档案管理', + }, + { path: '/videois', key: 'fillionvideois', menuSelectKeys: ['fillionvideois'], component: Videois, breadcrumb: '视频管理', } - , { + , { path: '/promotional', key: 'fillionpromotional', menuSelectKeys: ['fillionpromotional'], diff --git a/web/client/src/themes/light.json b/web/client/src/themes/light.json index c59ee5e5..a7c012cd 100644 --- a/web/client/src/themes/light.json +++ b/web/client/src/themes/light.json @@ -1 +1 @@ -{"@line-height-base":"1.66667","@mode":"compact","@font-size-base":"12px","@font-size-lg":"@font-size-base + 2px","@default-padding-lg":"24px","@default-padding-md":"16px","@default-padding-sm":"12px","@default-padding-xs":"8px","@default-padding-xss":"4px","@padding-lg":"16px","@padding-md":"8px","@padding-sm":"8px","@padding-xs":"4px","@padding-xss":"0px","@control-padding-horizontal":"@padding-sm","@control-padding-horizontal-sm":"@default-padding-xs","@margin-lg":"16px","@margin-md":"8px","@margin-sm":"8px","@margin-xs":"4px","@margin-xss":"0px","@height-base":"28px","@height-lg":"32px","@height-sm":"22px","@btn-padding-horizontal-base":"@default-padding-sm - 1px","@btn-padding-horizontal-lg":"@btn-padding-horizontal-base","@btn-padding-horizontal-sm":"@default-padding-xs - 1px","@btn-square-only-icon-size-lg":"16px","@btn-square-only-icon-size":"14px","@btn-square-only-icon-size-sm":"12px","@breadcrumb-font-size":"@font-size-base","@breadcrumb-icon-font-size":"@font-size-base","@dropdown-line-height":"18px","@menu-item-padding":"0 12px","@menu-horizontal-line-height":"38px","@menu-inline-toplevel-item-height":"32px","@menu-item-height":"32px","@menu-item-vertical-margin":"0px","@menu-item-boundary-margin":"0px","@menu-icon-margin-right":"8px","@checkbox-size":"14px","@checkbox-group-item-margin-right":"6px","@picker-panel-cell-height":"22px","@picker-panel-cell-width":"32px","@picker-text-height":"32px","@picker-time-panel-cell-height":"24px","@picker-panel-without-time-cell-height":"48px","@form-item-margin-bottom":"16px","@form-vertical-label-padding":"0 0 4px","@rate-star-size":"16px","@radio-size":"14px","@radio-wrapper-margin-right":"6px","@switch-height":"20px","@switch-sm-height":"14px","@switch-min-width":"40px","@switch-sm-min-width":"24px","@switch-inner-margin-min":"4px","@switch-inner-margin-max":"22px","@slider-handle-size":"12px","@slider-handle-margin-top":"-4px","@input-padding-vertical-base":"round(\n max(\n (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) -\n @border-width-base,\n 2px\n )\n)","@input-padding-horizontal-lg":"11px","@page-header-padding":"16px","@page-header-padding-vertical":"8px","@page-header-heading-title":"16px","@page-header-heading-sub-title":"12px","@page-header-tabs-tab-font-size":"14px","@pagination-mini-options-size-changer-top":"1px","@pagination-item-size-sm":"22px","@cascader-dropdown-line-height":"@dropdown-line-height","@select-dropdown-height":"@height-base","@select-single-item-height-lg":"32px","@select-multiple-item-height":"@input-height-base - max(@input-padding-vertical-base, 4) * 2","@select-multiple-item-height-lg":"24px","@select-multiple-item-spacing-half":"3px","@tree-title-height":"20px","@transfer-item-padding-vertical":"3px","@transfer-list-search-icon-top":"8px","@transfer-header-height":"36px","@comment-actions-margin-bottom":"0px","@comment-actions-margin-top":"@margin-xs","@comment-content-detail-p-margin-bottom":"0px","@steps-icon-size":"24px","@steps-icon-custom-size":"20px","@steps-icon-custom-font-size":"20px","@steps-icon-custom-top":"2px","@steps-icon-margin":"2px 8px 2px 0","@steps-icon-font-size":"@font-size-base","@steps-dot-top":"4px","@steps-icon-top":"0px","@steps-small-icon-size":"20px","@steps-vertical-icon-width":"12px","@steps-vertical-tail-width":"12px","@steps-vertical-tail-width-sm":"10px","@collapse-header-padding-extra":"32px","@collapse-content-padding":"@padding-md @padding-lg","@list-item-meta-description-font-size":"@font-size-sm","@list-item-padding-sm":"4px 12px","@list-item-padding-lg":"12px 16px","@drawer-header-padding":"11px @padding-lg","@drawer-footer-padding-vertical":"@padding-sm","@drawer-footer-padding-horizontal":"@padding-sm","@drawer-header-close-size":"44px","@modal-header-padding-vertical":"11px","@modal-header-padding":"@modal-header-padding-vertical @modal-header-padding-horizontal","@modal-footer-padding-vertical":"@padding-sm","@modal-header-close-size":"@modal-header-title-line-height + 2 * @modal-header-padding-vertical","@modal-confirm-body-padding":"24px 24px 16px","@message-notice-content-padding":"8px 16px","@popover-min-height":"28px","@popover-padding-horizontal":"@default-padding-sm","@card-padding-base":"12px","@card-head-height":"36px","@card-head-font-size":"@card-head-font-size-sm","@card-head-padding":"8.5px","@card-padding-base-sm":"@card-padding-base","@card-head-height-sm":"30px","@card-head-padding-sm":"6px","@card-actions-li-margin":"4px 0","@card-head-tabs-margin-bottom":"-9px","@table-padding-vertical":"12px","@table-padding-horizontal":"8px","@table-padding-vertical-md":"8px","@table-padding-horizontal-md":"8px","@table-padding-vertical-sm":"4px","@table-padding-horizontal-sm":"4px","@table-selection-column-width":"32px","@statistic-content-font-size":"20px","@alert-with-description-no-icon-padding-vertical":"7px","@alert-with-description-padding-vertical":"11px","@alert-icon-top":"7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2)","@alert-with-description-icon-size":"20px","@skeleton-paragraph-margin-top":"20px","@skeleton-paragraph-li-margin-top":"12px","@skeleton-paragraph-li-height":"14px","@skeleton-title-height":"14px","@skeleton-title-paragraph-margin-top":"20px","@descriptions-title-margin-bottom":"8px","@descriptions-default-padding":"12px @padding-lg","@descriptions-item-padding-bottom":"@padding-xs","@avatar-size-base":"28px","@avatar-size-lg":"32px","@avatar-size-sm":"22px","@avatar-font-size-base":"16px","@avatar-font-size-lg":"20px","@avatar-font-size-sm":"12px","@badge-height":"18px","@tag-line-height":"18px","@notification-padding-vertical":"12px","@notification-padding-horizontal":"16px","@result-title-font-size":"20px","@result-icon-font-size":"64px","@result-extra-margin":"24px 0 0 0","@anchor-link-top":"4px","@anchor-link-left":"16px","@anchor-link-padding":"@anchor-link-top 0 @anchor-link-top @anchor-link-left","@tabs-card-horizontal-padding":"4px @padding-md","@progress-circle-text-font-size":"0.833333em","@image-size-base":"48px","@image-font-size-base":"24px","@primary-color":"@blue-6","@layout-header-background":"#fff"} \ No newline at end of file +{"@line-height-base":"1.66667","@mode":"compact","@font-size-base":"12px","@font-size-lg":"@font-size-base + 2px","@default-padding-lg":"24px","@default-padding-md":"16px","@default-padding-sm":"12px","@default-padding-xs":"8px","@default-padding-xss":"4px","@padding-lg":"16px","@padding-md":"8px","@padding-sm":"8px","@padding-xs":"4px","@padding-xss":"0px","@control-padding-horizontal":"@padding-sm","@control-padding-horizontal-sm":"@default-padding-xs","@margin-lg":"16px","@margin-md":"8px","@margin-sm":"8px","@margin-xs":"4px","@margin-xss":"0px","@height-base":"28px","@height-lg":"32px","@height-sm":"22px","@btn-padding-horizontal-base":"@default-padding-sm - 1px","@btn-padding-horizontal-lg":"@btn-padding-horizontal-base","@btn-padding-horizontal-sm":"@default-padding-xs - 1px","@btn-square-only-icon-size-lg":"16px","@btn-square-only-icon-size":"14px","@btn-square-only-icon-size-sm":"12px","@breadcrumb-font-size":"@font-size-base","@breadcrumb-icon-font-size":"@font-size-base","@dropdown-line-height":"18px","@menu-item-padding":"0 12px","@menu-horizontal-line-height":"38px","@menu-inline-toplevel-item-height":"32px","@menu-item-height":"32px","@menu-item-vertical-margin":"0px","@menu-item-boundary-margin":"0px","@menu-icon-margin-right":"8px","@checkbox-size":"14px","@checkbox-group-item-margin-right":"6px","@picker-panel-cell-height":"22px","@picker-panel-cell-width":"32px","@picker-text-height":"32px","@picker-time-panel-cell-height":"24px","@picker-panel-without-time-cell-height":"48px","@form-item-margin-bottom":"16px","@form-vertical-label-padding":"0 0 4px","@rate-star-size":"16px","@radio-size":"14px","@radio-wrapper-margin-right":"6px","@switch-height":"20px","@switch-sm-height":"14px","@switch-min-width":"40px","@switch-sm-min-width":"24px","@switch-inner-margin-min":"4px","@switch-inner-margin-max":"22px","@slider-handle-size":"12px","@slider-handle-margin-top":"-4px","@input-padding-vertical-base":"round(\n max(\n (round(((@input-height-base - @font-size-base * @line-height-base) / 2) * 10) / 10) -\n @border-width-base,\n 2px\n )\n)","@input-padding-horizontal-lg":"11px","@page-header-padding":"16px","@page-header-padding-vertical":"8px","@page-header-heading-title":"16px","@page-header-heading-sub-title":"12px","@page-header-tabs-tab-font-size":"14px","@pagination-mini-options-size-changer-top":"1px","@pagination-item-size-sm":"22px","@cascader-dropdown-line-height":"@dropdown-line-height","@select-dropdown-height":"@height-base","@select-single-item-height-lg":"32px","@select-multiple-item-height":"@input-height-base - max(@input-padding-vertical-base, 4) * 2","@select-multiple-item-height-lg":"24px","@select-multiple-item-spacing-half":"3px","@tree-title-height":"20px","@transfer-item-padding-vertical":"3px","@transfer-list-search-icon-top":"8px","@transfer-header-height":"36px","@comment-actions-margin-bottom":"0px","@comment-actions-margin-top":"@margin-xs","@comment-content-detail-p-margin-bottom":"0px","@steps-icon-size":"24px","@steps-icon-custom-size":"20px","@steps-icon-custom-font-size":"20px","@steps-icon-custom-top":"2px","@steps-icon-margin":"2px 8px 2px 0","@steps-icon-font-size":"@font-size-base","@steps-dot-top":"4px","@steps-icon-top":"0px","@steps-small-icon-size":"20px","@steps-vertical-icon-width":"12px","@steps-vertical-tail-width":"12px","@steps-vertical-tail-width-sm":"10px","@collapse-header-padding-extra":"32px","@collapse-content-padding":"@padding-md @padding-lg","@list-item-meta-description-font-size":"@font-size-sm","@list-item-padding-sm":"4px 12px","@list-item-padding-lg":"12px 16px","@drawer-header-padding":"11px @padding-lg","@drawer-footer-padding-vertical":"@padding-sm","@drawer-footer-padding-horizontal":"@padding-sm","@drawer-header-close-size":"44px","@modal-header-padding":"11px @modal-header-padding-horizontal","@modal-footer-padding-vertical":"@padding-sm","@modal-header-close-size":"44px","@modal-confirm-body-padding":"24px 24px 16px","@message-notice-content-padding":"8px 16px","@popover-min-height":"28px","@popover-padding-horizontal":"@default-padding-sm","@card-padding-base":"12px","@card-head-height":"36px","@card-head-font-size":"@card-head-font-size-sm","@card-head-padding":"8.5px","@card-padding-base-sm":"@card-padding-base","@card-head-height-sm":"30px","@card-head-padding-sm":"6px","@card-actions-li-margin":"4px 0","@card-head-tabs-margin-bottom":"-9px","@table-padding-vertical":"12px","@table-padding-horizontal":"8px","@table-padding-vertical-md":"8px","@table-padding-horizontal-md":"8px","@table-padding-vertical-sm":"4px","@table-padding-horizontal-sm":"4px","@table-selection-column-width":"32px","@statistic-content-font-size":"20px","@alert-with-description-no-icon-padding-vertical":"7px","@alert-with-description-padding-vertical":"11px","@alert-icon-top":"7px + @font-size-base * (@line-height-base / 2) - (@font-size-base / 2)","@alert-with-description-icon-size":"20px","@skeleton-paragraph-margin-top":"20px","@skeleton-paragraph-li-margin-top":"12px","@skeleton-paragraph-li-height":"14px","@skeleton-title-height":"14px","@skeleton-title-paragraph-margin-top":"20px","@descriptions-title-margin-bottom":"8px","@descriptions-default-padding":"12px @padding-lg","@descriptions-item-padding-bottom":"@padding-xs","@avatar-size-base":"28px","@avatar-size-lg":"32px","@avatar-size-sm":"22px","@avatar-font-size-base":"16px","@avatar-font-size-lg":"20px","@avatar-font-size-sm":"12px","@badge-height":"18px","@tag-line-height":"18px","@notification-padding-vertical":"12px","@notification-padding-horizontal":"16px","@result-title-font-size":"20px","@result-icon-font-size":"64px","@result-extra-margin":"24px 0 0 0","@anchor-link-top":"4px","@anchor-link-left":"16px","@anchor-link-padding":"@anchor-link-top 0 @anchor-link-top @anchor-link-left","@tabs-card-horizontal-padding":"4px @padding-md","@progress-circle-text-font-size":"0.833333em","@image-size-base":"48px","@image-font-size-base":"24px","@primary-color":"@blue-6","@layout-header-background":"#fff"} \ No newline at end of file diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index 6a4e3a3e..d40ec0c8 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -4,97 +4,105 @@ import { ProxyRequest } from "@peace/utils"; export const GodTransRequest = new ProxyRequest("_godTrans"); export const ApiTable = { - login: 'login', - logout: 'logout', - - getEnterprisesMembers: 'enterprises/{enterpriseId}/members', - - //组织管理-用户管理-部门 - getDepMessage: 'department', - createDepMessage: 'department', - updateDepMessage: 'department', - delDepMessage: 'department/{depId}', - //组织管理-用户管理-用户 - getDepUser: 'department/{depId}/user', - createUser: 'department/user', - updateUser: 'department/user/{userId}', - delUser: 'department/user/{userIds}', - - resetPwd: 'department/user/{userId}/password', - - - //用户权限 - getResource: 'resource', - getUserResource: 'user/resource', - postUserRes: 'user/resource', - - //报表配置 - allAreas: 'allAreas', - addReportConfig: 'report/config', - getReportConfig: 'report/config', - editReportConfig: 'report/{reportId}/config', - delReportConfig: 'report/{reportId}/config', - - // 报表编辑 - getReportRectify: 'report/rectify', - getReportRectifyDetail: 'report/rectify/detail', - compileReportRectifyDetail: 'report/rectify/detail', - getReportList: 'report/list', - getReportDetail: 'report/{reportId}/detail', - getUsers: 'user', - - - //运政管理 - getOperaTional: 'vehicle',putOperaTional: 'vehicle', - getSpecificVehicle: 'vehicle/specific',putSpecificVehicle: 'vehicle/specific',delSpecificVehicle: 'vehicle/{vehicleId}/specific', - getHouseholds: 'vehicle/business',putHouseholds: 'vehicle/business',delHouseholds: 'vehicle/business/{businessId}', - getRoadway: 'road', - // 获取运政统计 - getYunZheng: "transportation/statistic", + login: 'login', + logout: 'logout', + + getEnterprisesMembers: 'enterprises/{enterpriseId}/members', + + //组织管理-用户管理-部门 + getDepMessage: 'department', + createDepMessage: 'department', + updateDepMessage: 'department', + delDepMessage: 'department/{depId}', + //组织管理-用户管理-用户 + getDepUser: 'department/{depId}/user', + createUser: 'department/user', + updateUser: 'department/user/{userId}', + delUser: 'department/user/{userIds}', + + resetPwd: 'department/user/{userId}/password', + + + //用户权限 + getResource: 'resource', + getUserResource: 'user/resource', + postUserRes: 'user/resource', + + //报表配置 + allAreas: 'allAreas', + addReportConfig: 'report/config', + getReportConfig: 'report/config', + editReportConfig: 'report/{reportId}/config', + delReportConfig: 'report/{reportId}/config', + + // 报表编辑 + getReportRectify: 'report/rectify', + getReportRectifyDetail: 'report/rectify/detail', + compileReportRectifyDetail: 'report/rectify/detail', + getReportList: 'report/list', + getReportDetail: 'report/{reportId}/detail', + getUsers: 'user', + + //档案管理 + uploadFile: 'netdisk-files/upload', + deleteFile: 'netdisk-files/delete', + getFileList: 'netdisk-files/query', + createFileDir: 'create/struct/dir', + delFileDir: 'netdisk-files/dir/delete', + queryFileDIr: 'get/file/dirs', + updateFileDir: 'netdisk-files/struct/dir/update', + + //运政管理 + getOperaTional: 'vehicle', putOperaTional: 'vehicle', + getSpecificVehicle: 'vehicle/specific', putSpecificVehicle: 'vehicle/specific', delSpecificVehicle: 'vehicle/{vehicleId}/specific', + getHouseholds: 'vehicle/business', putHouseholds: 'vehicle/business', delHouseholds: 'vehicle/business/{businessId}', + getRoadway: 'road', + // 获取运政统计 + getYunZheng: "transportation/statistic", //桥梁管理 -getBridge:'bridge', -putBridge:'bridge', -delBridge:'bridge/{bridgeId}', + getBridge: 'bridge', + putBridge: 'bridge', + delBridge: 'bridge/{bridgeId}', //工程数据 -getProject:'project', -putProject:'project', -delProject:'project/{projectId}', -//道路数据 -getRoadway: 'road', -putRoadway: 'road', -delRoadway:'road/{roadId}', - //道路统计 - getBgroadstatistics: "build/road_state", - - //治超监测点处理数据 - getzhichaomanager: 'manage/overspeed/processed', - - //获取治超详情数据 - getzhichaodetail: '/manage/overspeed', - // 获取道路养护统计及列表 - getroadmaintain: "conserve/statistic", - // 获取治超详情列 - getzhichaoList: "manage/overspeed", - - //大屏运营 —— 公交车辆层级信息 - getBusTier: '/operation/car_level', - - //获取路政列表 - getHighways: 'road_manage',putHighways: 'road_manage', - - //获取道路养护统计及列表 - getRoadMaintenance: 'conserve/statistic', - - //获取宣传数据 - getpropagata: 'publicity', -//公交信息 -getCircuit:'bus/line',putCircuit:'bus/line',delCircuit:'bus/line/{lineId}', -getVehicle:'bus/car',putVehicle:'bus/car',delVehicle:'bus/car/{carId}', + getProject: 'project', + putProject: 'project', + delProject: 'project/{projectId}', + //道路数据 + getRoadway: 'road', + putRoadway: 'road', + delRoadway: 'road/{roadId}', + //道路统计 + getBgroadstatistics: "build/road_state", + + //治超监测点处理数据 + getzhichaomanager: 'manage/overspeed/processed', + + //获取治超详情数据 + getzhichaodetail: '/manage/overspeed', + // 获取道路养护统计及列表 + getroadmaintain: "conserve/statistic", + // 获取治超详情列 + getzhichaoList: "manage/overspeed", + + //大屏运营 —— 公交车辆层级信息 + getBusTier: '/operation/car_level', + + //获取路政列表 + getHighways: 'road_manage', putHighways: 'road_manage', + + //获取道路养护统计及列表 + getRoadMaintenance: 'conserve/statistic', + + //获取宣传数据 + getpropagata: 'publicity', + //公交信息 + getCircuit: 'bus/line', putCircuit: 'bus/line', delCircuit: 'bus/line/{lineId}', + getVehicle: 'bus/car', putVehicle: 'bus/car', delVehicle: 'bus/car/{carId}', }; export const RouteTable = { - apiRoot: '/api/root', - fileUpload: '/_upload/new', - cleanUpUploadTrash: '/_upload/cleanup', + apiRoot: '/api/root', + fileUpload: '/_upload/new', + cleanUpUploadTrash: '/_upload/cleanup', }; \ No newline at end of file diff --git a/web/log/development.txt b/web/log/development.txt index 25844d79..63a72c68 100644 --- a/web/log/development.txt +++ b/web/log/development.txt @@ -20970,3 +20970,8 @@ } 2022-07-27 11:00:11.991 - debug: [FS-LOGGER] Init. >>>>>>> Stashed changes +2022-07-28 09:52:36.378 - debug: [FS-LOGGER] Init. +2022-07-28 10:26:19.323 - debug: [FS-LOGGER] Init. +2022-07-28 18:37:17.090 - debug: [FS-LOGGER] Init. +2022-07-28 18:47:31.071 - debug: [FS-LOGGER] Init. +2022-07-28 18:48:34.776 - debug: [FS-LOGGER] Init. diff --git a/web/package.json b/web/package.json index ad7d381b..18789876 100644 --- a/web/package.json +++ b/web/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "mocha", "start": "cross-env NODE_ENV=development npm run start-params", - "start-params": "npm run color && node server -p 5000 -u http://10.8.30.7:14000", + "start-params": "npm run color && node server -p 5000 -u http://localhost:4000", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", From 2fceb76eac560b8661d7f0677599400868fb1f1e Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Thu, 28 Jul 2022 21:20:46 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=A1=A5=E6=A2=81=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/client/src/sections/fillion/components/infor/details.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index a8a125a7..303e1dd2 100644 --- a/web/client/src/sections/fillion/components/infor/details.js +++ b/web/client/src/sections/fillion/components/infor/details.js @@ -171,7 +171,7 @@ const UserModal = (props) => { if (rewkeys === 'bridge') { if (typecard == '111') { setDelet(values) - const query = { ...values, roadId: records?.[0]?.value || '' } + const query = { ...values, bridgeId: records?.[0]?.value || '' } dispatch(putBridge(query)).then((res) => { }) From e6214053825de88a9d76682c3e2071c569181403 Mon Sep 17 00:00:00 2001 From: xingyongchun Date: Thu, 28 Jul 2022 21:59:36 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=B7=B2=E5=AE=8C=E6=88=90=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fillion/components/bridgeTable.js | 4 +- .../fillion/components/enforceTable.js | 2 +- .../components/highways/highwaysdata.js | 2 +- .../fillion/components/highwaysTable.js | 2 +- .../fillion/components/infor/details.js | 22 ++--- .../sections/fillion/components/inforTable.js | 2 +- .../fillion/components/operationalTable.js | 8 +- .../fillion/components/project/project.js | 90 +++++++++---------- .../fillion/components/publicTable.js | 4 +- .../fillion/components/transportationTable.js | 9 +- 10 files changed, 72 insertions(+), 73 deletions(-) diff --git a/web/client/src/sections/fillion/components/bridgeTable.js b/web/client/src/sections/fillion/components/bridgeTable.js index cf2e53a8..c6761572 100644 --- a/web/client/src/sections/fillion/components/bridgeTable.js +++ b/web/client/src/sections/fillion/components/bridgeTable.js @@ -1507,7 +1507,7 @@ const BrideTable = (props) => { return
@@ -1691,7 +1691,7 @@ const BrideTable = (props) => { return
{ deldatas(record.id) }}> diff --git a/web/client/src/sections/fillion/components/enforceTable.js b/web/client/src/sections/fillion/components/enforceTable.js index 1f239e22..cbeca915 100644 --- a/web/client/src/sections/fillion/components/enforceTable.js +++ b/web/client/src/sections/fillion/components/enforceTable.js @@ -1508,7 +1508,7 @@ const openModal = (type, record) => { return
diff --git a/web/client/src/sections/fillion/components/highways/highwaysdata.js b/web/client/src/sections/fillion/components/highways/highwaysdata.js index 854781da..c5bc3851 100644 --- a/web/client/src/sections/fillion/components/highways/highwaysdata.js +++ b/web/client/src/sections/fillion/components/highways/highwaysdata.js @@ -47,7 +47,7 @@ const HightModal = (props) => { }} initialValues={recortd} > - {typecard == '111' ? + {typecard == 'compile' ? { return
diff --git a/web/client/src/sections/fillion/components/infor/details.js b/web/client/src/sections/fillion/components/infor/details.js index 303e1dd2..4df3a38c 100644 --- a/web/client/src/sections/fillion/components/infor/details.js +++ b/web/client/src/sections/fillion/components/infor/details.js @@ -152,12 +152,12 @@ const UserModal = (props) => { if (Object.values(values).length > 0) { if (rewkeys === 'transportation') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, level: whichofits, roadId: records?.[0]?.value || '' } dispatch(putRoadway(query)).then((res) => { - return true - }) + }) + return true } else { setDelet(values) const query = { ...values, level: whichofits } @@ -169,7 +169,7 @@ const UserModal = (props) => { } if (rewkeys === 'bridge') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, bridgeId: records?.[0]?.value || '' } dispatch(putBridge(query)).then((res) => { @@ -186,7 +186,7 @@ const UserModal = (props) => { } } if (rewkeys === 'weihuo') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, vehicleId: records?.[0]?.value || '', type: '危货' } @@ -205,7 +205,7 @@ const UserModal = (props) => { } } if (rewkeys === 'chuzu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, vehicleId: records?.[0]?.value || '', type: '出租车' } @@ -224,7 +224,7 @@ const UserModal = (props) => { } } if (rewkeys === 'yehu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, businessId: records?.[0]?.value, type: values.type } dispatch(putHouseholds(query)).then((res) => { @@ -240,7 +240,7 @@ const UserModal = (props) => { return true } } if (rewkeys === 'xianlu') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, lineId: records?.[0]?.value || '' } dispatch(putCircuit(query)).then((res) => { @@ -257,7 +257,7 @@ const UserModal = (props) => { } } if (rewkeys === 'cheliang') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, carId: records?.[0]?.value || '' } dispatch(putVehicle(query)).then((res) => { @@ -274,7 +274,7 @@ const UserModal = (props) => { } } if (rewkeys === 'zhichao') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) const query = { ...values, overspeedId: records?.[0]?.value || '' } dispatch(putPurchase(query)).then((res) => { @@ -297,7 +297,7 @@ const UserModal = (props) => { }} initialValues={recortd} > - {typecard == '111' ? + {typecard == 'compile' ? { return
diff --git a/web/client/src/sections/fillion/components/operationalTable.js b/web/client/src/sections/fillion/components/operationalTable.js index 5e88d600..05ec484b 100644 --- a/web/client/src/sections/fillion/components/operationalTable.js +++ b/web/client/src/sections/fillion/components/operationalTable.js @@ -110,7 +110,7 @@ const OperaTionalTable = (props) => { return
@@ -697,7 +697,7 @@ const OperaTionalTable = (props) => { return
{ deldata(record.id) }}> @@ -1330,7 +1330,7 @@ const OperaTionalTable = (props) => { return
{ deldata(record.id) }}> @@ -1800,7 +1800,7 @@ const OperaTionalTable = (props) => { return
{ deldatas(record.id) }}> diff --git a/web/client/src/sections/fillion/components/project/project.js b/web/client/src/sections/fillion/components/project/project.js index fc292af8..9e6f852a 100644 --- a/web/client/src/sections/fillion/components/project/project.js +++ b/web/client/src/sections/fillion/components/project/project.js @@ -1,9 +1,9 @@ import React, { useEffect, useState } from 'react'; import { connect } from 'react-redux'; import { Form, Spin, Table } from 'antd'; -import { DrawerForm, ProForm, ProFormText,ProFormSelect } from '@ant-design/pro-form'; +import { DrawerForm, ProForm, ProFormText, ProFormSelect } from '@ant-design/pro-form'; import { putProject } from "../../actions/infor" -import _ from 'lodash' +import _ from 'lodash' const data = { "entryName": "项目名称", @@ -32,7 +32,7 @@ const ProjectModal = (props) => { setNewlys(array?.splice(0, 2)) setNewlysay(array) // console.log() - + } if (rewkeys === 'bridge') { _.forIn(data, function (value, key) { @@ -41,7 +41,7 @@ const ProjectModal = (props) => { setNewlys(array?.splice(0, 2)) setNewlysay(array) // console.log() - + } }, []) useEffect(() => { @@ -51,7 +51,7 @@ const ProjectModal = (props) => { arr.push({ value: value, type: key }) }); setRecordsay(arr.splice(1, 2)) - + setRecords(arr) } if (rewkeys === 'bridge') { @@ -79,68 +79,68 @@ const ProjectModal = (props) => { onFinish={(values) => { console.log(values) if (rewkeys === 'road') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) - const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' } + const query = { ...values, type: rewkeys, projectId: records?.[0]?.value || '', done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } else { setDelet(values) - const query = { ...values, type:rewkeys } + const query = { ...values, type: rewkeys,done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } } if (rewkeys === 'bridge') { - if (typecard == '111') { + if (typecard == 'compile') { setDelet(values) - const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' } + const query = { ...values, type: rewkeys, projectId: records?.[0]?.value || '',done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } else { setDelet(values) - const query = { ...values, type:rewkeys } + const query = { ...values, type: rewkeys,done: values.done === 'true' ? true : false } dispatch(putProject(query)).then((res) => { - + }) return true } } }} - initialValues={recortd} + initialValues={{ ...recortd, done: recortd.done ? 'true' : 'false' }} > - {typecard == '111' ? + {typecard == 'compile' ? { name={newlys?.[0]?.type} width="md" label={newlys?.[0]?.name} - + placeholder="请输入名称" - // value={recordssy?.[0]?.value} - // rules={[{ required: true, message: "必填" }]} + // value={recordssy?.[0]?.value} + // rules={[{ required: true, message: "必填" }]} /> - [ + { + value: 'true', + label: '是', + }, { + value: 'false', + label: '否', + }, + ]} + + name='done' + label='是否已完成' + rules={[{ required: true, message: "必填" }]} /> {newlysay?.map((item, index) => { return })} diff --git a/web/client/src/sections/fillion/components/publicTable.js b/web/client/src/sections/fillion/components/publicTable.js index 23d5b009..66510447 100644 --- a/web/client/src/sections/fillion/components/publicTable.js +++ b/web/client/src/sections/fillion/components/publicTable.js @@ -408,7 +408,7 @@ const PublicTable = (props) => { return
{ deldata(record.id) }}> @@ -1103,7 +1103,7 @@ const PublicTable = (props) => { return
{ deldatas(record.id) }}> diff --git a/web/client/src/sections/fillion/components/transportationTable.js b/web/client/src/sections/fillion/components/transportationTable.js index daca6ac0..53cba191 100644 --- a/web/client/src/sections/fillion/components/transportationTable.js +++ b/web/client/src/sections/fillion/components/transportationTable.js @@ -1178,7 +1178,7 @@ const TransporTationTable = (props) => { onClick={() => { setRecortd(record) openModal('edit', record) - setTypecard('111') + setTypecard('compile') }} >编辑 { deldata(record.id) }}> @@ -3832,7 +3832,6 @@ const TransporTationTable = (props) => { setRowSelected([]); const res = await dispatch(getProject(query)); setCounts(res.payload.data) - console.log(res) return { ...res, total: res.payload.data ? res.payload.data.count : 0 From 7bd8ad9634d960d18e34bf947b2f93037fb939ec Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 28 Jul 2022 22:04:29 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=AE=A3=E4=BC=A0=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=9D=E6=8A=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/data/project.js | 18 ++++++++++++++---- .../quanju/containers/footer/build/index.js | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/api/app/lib/controllers/data/project.js b/api/app/lib/controllers/data/project.js index 7fb0b2a6..b1dec293 100644 --- a/api/app/lib/controllers/data/project.js +++ b/api/app/lib/controllers/data/project.js @@ -3,14 +3,24 @@ async function projectGet (ctx) { try { const models = ctx.fs.dc.models; - const { type } = ctx.query; + const { type, entryName } = ctx.query; - const projectRes = await models.Project.findAll({ + let findOption = { where: { - type + }, order: [['id', 'DESC']] - }) + } + if (type) { + findOption.where.type = type + } + if (entryName) { + findOption.where.entryName = { + $like: `%${entryName}%` + } + } + + const projectRes = await models.Project.findAll(findOption) ctx.status = 200; ctx.body = projectRes diff --git a/web/client/src/sections/quanju/containers/footer/build/index.js b/web/client/src/sections/quanju/containers/footer/build/index.js index 679eb3da..fcf232fc 100644 --- a/web/client/src/sections/quanju/containers/footer/build/index.js +++ b/web/client/src/sections/quanju/containers/footer/build/index.js @@ -48,7 +48,7 @@ const Build = (props) => { const res = await dispatch(getxuanchuan()); // setdata(alltype.filter(item=>item.name!=='null')) - setxuandata(res.payload.data) + setxuandata(res.payload.data || []) console.log(res.payload.data,'宣传栏数据') } @@ -200,7 +200,7 @@ const Build = (props) => { }} customize={true}>
{/* */} - +

全面建设好农村公路,切实发挥先行官作用

From 50cb0e63c7ba996af0b773f76363a2a36e290cc0 Mon Sep 17 00:00:00 2001 From: LUCAS Date: Thu, 28 Jul 2022 22:21:15 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/file/index.js | 25 +-- api/log/development.log | 3 + web/client/src/components/Upload/index.js | 8 +- .../src/sections/fillion/actions/file.js | 6 +- .../fillion/components/file/functionMenu.js | 94 ++++++++ .../fillion/components/file/menu.less | 43 ++++ .../fillion/components/file/uploadModal.js | 5 +- .../sections/fillion/components/fileTable.js | 202 +++++++++++++----- .../sections/fillion/components/protable.less | 19 +- web/log/development.txt | 6 + web/package-lock.json | 25 ++- web/package.json | 3 +- 12 files changed, 332 insertions(+), 107 deletions(-) create mode 100644 web/client/src/sections/fillion/components/file/functionMenu.js create mode 100644 web/client/src/sections/fillion/components/file/menu.less diff --git a/api/app/lib/controllers/file/index.js b/api/app/lib/controllers/file/index.js index 270447e9..8870da3e 100644 --- a/api/app/lib/controllers/file/index.js +++ b/api/app/lib/controllers/file/index.js @@ -59,30 +59,13 @@ async function delFileDir(ctx, next) { let rslt = [], fileDirIds = []; try { - const { type, id } = ctx.query, // type == parent / child + const { id } = ctx.query, // type == parent / child models = ctx.fs.dc.models; const transaction = await ctx.fs.dc.orm.transaction(); - if (type == 'parent') { - let fileTypes = await models.FileType.findAll({ where: { rId: id } }); - if (fileTypes && fileTypes.length) { - fileDirIds = fileTypes.map(item => item.fId); - } - - if (fileDirIds && fileDirIds.length) { - await models.Files.destroy({ - where: { - fId: { $in: fileDirIds } - }, - transaction - }) - } - await models.FileType.destroy({ where: { rId: id }, transaction }) - await models.FileRoad.destroy({ where: { rId: id }, transaction }) - } else { - await models.Files.destroy({ where: { fId: id }, transaction }) - await models.FileType.destroy({ where: { fId: id }, transaction }) - } + await models.FileRoad.destroy({ where: { rId: id }, transaction }) + await models.Files.destroy({ where: { roadId: id }, transaction }) + await transaction.commit(); error = null; diff --git a/api/log/development.log b/api/log/development.log index 2542724b..58b473fe 100644 --- a/api/log/development.log +++ b/api/log/development.log @@ -10656,3 +10656,6 @@ headers: {} 2022-07-28 18:34:55.231 - error: path: /publicity, error: TypeError: values.map is not a function 2022-07-28 18:35:45.669 - error: path: /publicity, error: TypeError: values.map is not a function 2022-07-28 18:37:40.324 - error: path: /publicity, error: TypeError: values.map is not a function +2022-07-28 21:48:22.652 - debug: [FS-LOGGER] Init. +2022-07-28 21:48:22.760 - info: [FS-ATTACHMENT] Inject attachment mw into router. +2022-07-28 21:48:22.760 - info: [FS-AUTH] Inject auth and api mv into router. diff --git a/web/client/src/components/Upload/index.js b/web/client/src/components/Upload/index.js index eac0a27a..0bd3af10 100644 --- a/web/client/src/components/Upload/index.js +++ b/web/client/src/components/Upload/index.js @@ -54,7 +54,7 @@ class Uploads extends Component { componentWillReceiveProps(np) { const { dispatch, value: thisEditData, onChange } = this.props; - const { value: nextEditData } = np; + const { value: nextEditData, clearFileList } = np; const setFileList = () => { let defaultFileList = []; @@ -92,6 +92,12 @@ class Uploads extends Component { } } } + + if (clearFileList) { + this.setState({ + fileList: [] + }); + } // else{ // this.setState({ // fileList:[], diff --git a/web/client/src/sections/fillion/actions/file.js b/web/client/src/sections/fillion/actions/file.js index e453a967..2b6adc7f 100644 --- a/web/client/src/sections/fillion/actions/file.js +++ b/web/client/src/sections/fillion/actions/file.js @@ -51,14 +51,14 @@ export function updateFileDir(query) { } -// query : {typeId, userId, userName, startDate, endDate, fileSize, fileName, fileUrl, fileExt} -export function uploadFile(query) { +// data : {typeId, userId, userName, startDate, endDate, fileSize, fileName, fileUrl, fileExt} +export function uploadFile(data) { return dispatch => basicAction({ type: 'post', dispatch: dispatch, actionType: 'UPLOAD_FILE', url: ApiTable.uploadFile, - query, + data, msg: { error: '上传文件失败' }, reducer: { name: 'uploadFile' } }); diff --git a/web/client/src/sections/fillion/components/file/functionMenu.js b/web/client/src/sections/fillion/components/file/functionMenu.js new file mode 100644 index 00000000..b4211d18 --- /dev/null +++ b/web/client/src/sections/fillion/components/file/functionMenu.js @@ -0,0 +1,94 @@ +import React, { useEffect } from 'react'; +import PropTypes from 'prop-types'; +import { delFileDir, queryFileDir, updateFileDir, } from '../../actions/file'; +import './menu.less' +import { message, Modal } from 'antd'; +import { ExclamationCircleOutlined } from '@ant-design/icons' + +const { confirm } = Modal; + +const FunctionMenu = props => { + const { dispatch, onDelDir, selectRoad } = props; + + useEffect(() => { + const box = document.getElementById('tree-box'); + if (box) + box.oncontextmenu = function (e) { + //取消默认的浏览器自带右键 很重要!! + e.preventDefault(); + + //获取我们自定义的右键菜单 + var menu = document.querySelector("#rihgt-click-menu"); + + //根据事件对象中鼠标点击的位置,进行定位 + menu.style.left = e.clientX + 'px'; + menu.style.top = e.clientY + 'px'; + + //改变自定义菜单的高宽,让它显示出来 + menu.style.display = 'block'; + } + + //关闭右键菜单,很简单 + window.onclick = function (e) { + //用户触发click事件就可以关闭了,因为绑定在window上,按事件冒泡处理,不会影响菜单的功能 + document.querySelector('#rihgt-click-menu') ? document.querySelector('#rihgt-click-menu').style.display = 'none' : '' + } + }, [true]) + + const onDeleteDir = () => { + + if (selectRoad) { + const id = selectRoad + dispatch(delFileDir({ id })).then(res => { + const { type } = res; + if (type == 'DEL_FILE_DIR_SUCCESS') { + dispatch(queryFileDir()); + message.success('删除成功') + } else { + message.error('删除失败') + } + }); + } + } + + const showDeleteConfirm = () => { + + confirm({ + title: `是否确认删除该道路?`, + icon: , + // content: 'Some descriptions', + okText: '是', + okType: 'danger', + cancelText: '否', + onOk() { + onDeleteDir(); + }, + onCancel() { + }, + }); + } + + const refreshFileDir = () => { + dispatch(queryFileDir()); + } + + return ( +
+
+
+ 删除 +
+
+
+
+ 刷新 +
+
+
+ + ) +} + +FunctionMenu.propTypes = {} + +export default FunctionMenu \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/file/menu.less b/web/client/src/sections/fillion/components/file/menu.less new file mode 100644 index 00000000..c143c3b8 --- /dev/null +++ b/web/client/src/sections/fillion/components/file/menu.less @@ -0,0 +1,43 @@ +#rihgt-click-menu { + display: none; + font-size: 1.1em; + position: fixed; + width: 200px; + height: auto; + padding: 5px 0px; + border-radius: 5px; + top: 10; + left: 10; + background-color: #fff; + box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.24); + color: #333; + z-index: 999; +} + +#rihgt-click-menu .context_item { + height: 32px; + line-height: 32px; + cursor: pointer; + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +#rihgt-click-menu .context_item:hover { + background-color: #ddd; +} + +#rihgt-click-menu .context_item .inner_item { + margin: 0px 10px; +} + +#rihgt-click-menu .context_item .inner_item i { + margin: 0 5px 0 0; + font-weight: bold; +} + +#rihgt-click-menu .context_hr { + height: 1px; + border-top: 1px solid #bbb; + margin: 3px 10px; +} \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/file/uploadModal.js b/web/client/src/sections/fillion/components/file/uploadModal.js index e57a0026..b14b5b49 100644 --- a/web/client/src/sections/fillion/components/file/uploadModal.js +++ b/web/client/src/sections/fillion/components/file/uploadModal.js @@ -32,8 +32,9 @@ const UploadModal = props => { maxFilesNum={1} maxFileSize={10} onChange={onFileUploaded} - // value - // onStateChange + clearFileList={isVisible} + // value + // onStateChange /> diff --git a/web/client/src/sections/fillion/components/fileTable.js b/web/client/src/sections/fillion/components/fileTable.js index 4052e40a..a0fecdcd 100644 --- a/web/client/src/sections/fillion/components/fileTable.js +++ b/web/client/src/sections/fillion/components/fileTable.js @@ -1,32 +1,40 @@ import { connect } from 'react-redux'; import './protable.less' -import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input, Modal, Spin, Image, message, Popover } from 'antd'; +import { Card, Button, Row, DatePicker, Input, Modal, message, Image } from 'antd'; import ProTable from '@ant-design/pro-table'; -import { getFileList, createFileDir, queryFileDir } from '../actions/file'; +import { getFileList, createFileDir, queryFileDir, uploadFile, deleteFile } from '../actions/file'; +import { ExclamationCircleOutlined } from '@ant-design/icons'; import React, { useEffect, useState } from 'react'; import { httpDel } from '@peace/utils' import { PinyinHelper } from '@peace/utils'; import RoadModal from './file/roadModal'; +import Pdfh5 from "pdfh5"; +import "pdfh5/css/pdfh5.css"; +import FunctionMenu from './file/functionMenu'; +const { confirm } = Modal; // @ts-ignore import UploadModal from './file/uploadModal'; +var pdfh5 = null; const DetailList = (props) => { - const { fileList, loading, dispatch, handleOpen, handelRefresh, onPageChange } = props; - const [visible, setVisible] = useState(false) - const [selectRecord, setSelectRecord] = useState(); - const checkDetail = (record) => { - // dispatch(getReportDetail(record.id)) - } + const { fileList, loading, dispatch, handelRefresh, onPageChange } = props; + const [imgSrc, setImgSrc] = useState({ imageView: false, imgSrc: '' }) + const [pdfView, setPdfView] = useState({ showPDF: false, pdfName: '', pdfurl: '' }) + var tyApiRoot = localStorage.getItem('tyApiRoot') + + useEffect(() => { + if (pdfView.showPDF) { + pdfh5 = new Pdfh5("#pdf-loader", { + pdfurl: pdfView.pdfurl + }) + } + }, [pdfView]) - const handleRemove = (record) => { - let url = 'report/{reportId}'; - const actionType = "DEL_REPORT_RECORD"; - const msg = {} + const handleRemove = (record, filePath) => { if (record) { - url = url.replace('{reportId}', record.id) - httpDel(dispatch, { url, actionType, msg }).then(res => { - if (res.success) { + dispatch(deleteFile(record.id)).then(res => { + if (res.type == 'DELETE_FILE_SUCCESS') { message.success("文件删除成功"); handelRefresh() } else { @@ -34,6 +42,30 @@ const DetailList = (props) => { } }) } + let url = `${tyApiRoot}/attachments`, msg = {}; + const actionType = "DEL_FILE_RECORD"; + if (filePath) { + httpDel(dispatch, { url, actionType, msg, query: { src: filePath } }) + } + } + const overviewPDF = (record, filePath) => { + setPdfView({ showPDF: true, pdfName: record.fileName, pdfurl: filePath }) + } + + const showDeleteConfirm = (record, filePath) => { + confirm({ + title: '是否确认删除该文件?', + icon: , + // content: 'Some descriptions', + okText: '是', + okType: 'danger', + cancelText: '否', + onOk() { + handleRemove(record, filePath); + }, + onCancel() { + }, + }); } const columns = [ @@ -93,30 +125,36 @@ const DetailList = (props) => { valueType: 'option', align: 'center', render: (text, record) => { - return [ - , - - - -
- ]} - visible={selectRecord == record.id && visible} - trigger="click" - onClick={() => setSelectRecord(record.id)} - title="是否删除该记录?" - onVisibleChange={(newVisible) => setVisible(newVisible)} - > - - - ] - } + const regEx = /\bhttps?:\/\/[^:\/]+/ig; + const path = record.fileUrl; + const filename = path.substr(path.lastIndexOf("/") + 1); + const filePath = path.replace(regEx, ""); + const filePath_ = `${tyApiRoot}/attachments?src=${filePath}&filename=${filename}`; + + return + {/* {下载} */} + { { + window.open(filePath_); + }} >下载} + + { showDeleteConfirm(record, filePath) }}>删除 + { + ['.png', '.jpg'].some(item => item == record.fileExt) ? + [, + { setImgSrc({ imageView: true, imgSrc: path }) }}>预览] + : '' + } + { + ['.pdf'].some(item => item == record.fileExt) ? + [, + overviewPDF(record, path)}>预览] + : '' + } + + }, }, ]; - return ( + return [ { rowKey="key" toolBarRender={false} search={false} - /> - ); + />, + { + setImgSrc({ imageView: value, imgSrc: '' }); + }, + }} + />, + { + pdfh5 = null; + setPdfView({ showPDF: false, pdfName: '', pdfurl: '' }); + }} + > +
+ + + ]; }; @@ -143,7 +206,7 @@ const RoadNameList = (props) => { const [filterRoad, setFilterRoad] = useState([]); const [addVisible, setAddVisible] = useState(false); const [selectRoad, setSelectRoad] = useState(); - const { onChange, record, roads, loading, queryData, dispatch } = props; + const { onChange, roads, loading, queryData, dispatch } = props; const columns = [ { title: '道路名称', @@ -154,6 +217,13 @@ const RoadNameList = (props) => { ]; + useEffect(() => { + if (roads && roads instanceof Array) { + setSelectRoad(roads[0].rId) + onChange(roads[0]); + } + }, [roads]) + useEffect(() => { if (roads) { setFilterRoad(roads) @@ -184,8 +254,12 @@ const RoadNameList = (props) => { } + const onDelDir = () => { + + } + return ( -
+
{ onSubmit={createRoadDir} onCancel={() => { setAddVisible(false) }} /> + +
); @@ -228,10 +308,8 @@ const RoadNameList = (props) => { const FileTable = (props) => { - const { roads, fileList, dispatch, fileListLoading, roadsLoading } = props; + const { roads, fileList, dispatch, fileListLoading, roadsLoading, user } = props; const [record, setRecord] = useState(); - const [dateRange, setDateRange] = useState(); - const [detailVisible, setDetailVisible] = useState(false) const [activeTabKey1, setActiveTabKey1] = useState('1'); const [uploadVisible, setUploadVisible] = useState(false); const { RangePicker } = DatePicker; @@ -246,7 +324,7 @@ const FileTable = (props) => { if (record) { queryData(); } - }, [record, dateRange]) + }, [record]) const queryData = () => { const { rId } = record; @@ -265,14 +343,7 @@ const FileTable = (props) => { }, [activeTabKey1, record]) const handelRefresh = () => { - - } - - const handleClose = () => { - setDetailVisible(false) - } - const handleOpen = () => { - setDetailVisible(true) + queryData() } const tabList = [ @@ -304,8 +375,22 @@ const FileTable = (props) => { } setRecord(target); } - const hanleUpload = () => { - + const hanleUpload = (fileList) => { + let fileUrl, fileExt, fileName, fileSize; + if (fileList && fileList instanceof Array) { + const file = fileList[0]; + fileName = file.name; + fileExt = fileName.substr(fileName.lastIndexOf('.')); + fileUrl = file.url; + fileSize = file.size; + dispatch(uploadFile({ typeId: activeTabKey1, userId: user.id, fileSize, fileName, fileUrl, fileExt, roadId: record.rId })).then(res => { + if (res.type == 'UPLOAD_FILE_SUCCESS') { + message.success('文件新增成功'); + setUploadVisible(false); + queryData(); + } + }); + } } return ( @@ -331,13 +416,13 @@ const FileTable = (props) => { - + { setUploadVisible(false) }} - onConfirm={hanleUpload} + onSubmit={hanleUpload} />
@@ -345,12 +430,13 @@ const FileTable = (props) => { }; function mapStateToProps(state) { - const { fileDirs, fileList } = state; + const { fileDirs, fileList, auth } = state; return { roads: fileDirs.data, roadsLoading: fileDirs.isRequesting, fileList: fileList.data, fileListLoading: fileList.isRequesting, + user: auth.user, }; } export default connect(mapStateToProps)(FileTable); \ No newline at end of file diff --git a/web/client/src/sections/fillion/components/protable.less b/web/client/src/sections/fillion/components/protable.less index f788725f..6d66a5df 100644 --- a/web/client/src/sections/fillion/components/protable.less +++ b/web/client/src/sections/fillion/components/protable.less @@ -9,22 +9,19 @@ } -.list-row-actived{ +.list-row-actived { background-color: #7cafc6; font-weight: 600; } -// .spilce { -// .split-row-select-active { -// background-color: #7cafc6; -// font-weight: 600; -// } - -// th { -// display: none; -// } -// } +.ant-divider { + width: 0px; + height: 8px; + border-left: 1px solid gray; + margin: 0px 8px; + opacity: 0.8; +} .card-protable { display: flex; diff --git a/web/log/development.txt b/web/log/development.txt index 9b421be3..2bae49ab 100644 --- a/web/log/development.txt +++ b/web/log/development.txt @@ -30712,3 +30712,9 @@ 2022-07-28 16:51:10.270 - debug: [FS-LOGGER] Init. 2022-07-28 16:51:11.180 - info: [Router] Inject api: attachment/index >>>>>>> c5a4c8a87b2e23e891d4276a9cca953058b78bd7 +2022-07-28 19:02:55.701 - debug: [FS-LOGGER] Init. +2022-07-28 19:02:55.796 - info: [Router] Inject api: attachment/index +2022-07-28 19:04:01.860 - debug: [FS-LOGGER] Init. +2022-07-28 19:04:01.936 - info: [Router] Inject api: attachment/index +2022-07-28 20:47:45.618 - debug: [FS-LOGGER] Init. +2022-07-28 20:47:45.710 - info: [Router] Inject api: attachment/index diff --git a/web/package-lock.json b/web/package-lock.json index 25c2bba8..588c99ee 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -324,7 +324,7 @@ "@antv/g-svg": { "version": "0.5.6", "resolved": "http://npm.anxinyun.cn/@antv%2fg-svg/-/g-svg-0.5.6.tgz", - "integrity": "sha512-Xve1EUGk4HMbl2nq4ozR4QLh6GyoZ8Xw/+9kHYI4B5P2lIUQU95MuRsaLFfW5NNpZDx85ZeH97tqEmC9L96E7A==", + "integrity": "sha1-cLL6mAxDGzmtPFtLU+NqHWCVfWU=", "requires": { "@antv/g-base": "^0.5.3", "@antv/g-math": "^0.1.6", @@ -1921,7 +1921,7 @@ }, "@peace/utils": { "version": "0.0.51", - "resolved": "http://npm.anxinyun.cn/@peace%2futils/-/utils-0.0.51.tgz", + "resolved": "http://npm.anxinyun.cn:443/@peace%2futils/-/utils-0.0.51.tgz", "integrity": "sha512-+HeDYNCf4Cid2nWEIQxED2avueBgXL4AgY7SVngubfCS6qI2TKjyPuTrtDGHTvojuLQe5BlEiKMxIuiAMQmTag==", "requires": { "immutable": "^4.0.0-rc.12", @@ -4203,7 +4203,7 @@ "connect-history-api-fallback": { "version": "1.6.0", "resolved": "http://npm.anxinyun.cn/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz", - "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==" + "integrity": "sha1-izIIk1kwjRERFdgcrT/Oq4iPl7w=" }, "connected-react-router": { "version": "6.9.3", @@ -4625,7 +4625,7 @@ "define-property": { "version": "2.0.2", "resolved": "http://npm.anxinyun.cn/define-property/-/define-property-2.0.2.tgz", - "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "integrity": "sha1-1Flono1lS6d+AqgX+HENcCyxbp0=", "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -6178,7 +6178,7 @@ "he": { "version": "1.2.0", "resolved": "http://npm.anxinyun.cn/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", "dev": true }, "history": { @@ -6924,7 +6924,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "http://npm.anxinyun.cn/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha1-GSA/tZmR35jjoocFDUZHzerzJJk=" }, "jsbn": { "version": "0.1.1", @@ -7286,7 +7286,7 @@ "koa-static": { "version": "1.5.3", "resolved": "http://npm.anxinyun.cn/koa-static/-/koa-static-1.5.3.tgz", - "integrity": "sha512-FmfSFJOrtWGZ/Ae5Q7xeM+ck1IdofNEvIQhdPLvGHyTjilhYmFGoyRN1+BAbTknWnDoRRyHsGGq0FMRDTcCb1w==", + "integrity": "sha1-29IUbu5xeA3/0xLyPMSnYui839I=", "requires": { "debug": "^3.2.5", "koa-send": "~2.0.1" @@ -8359,6 +8359,11 @@ "through": "~2.3" } }, + "pdfh5": { + "version": "1.4.2", + "resolved": "http://npm.anxinyun.cn:443/pdfh5/-/pdfh5-1.4.2.tgz", + "integrity": "sha512-1BL8HIx/EEZowRPBgas7/WokbGEv1gxKNRmmHSimG113178mKxIBH4pxWBc0tj6d25Sy+EwnlQwv9cUUmQa42w==" + }, "perfect-scrollbar": { "version": "1.5.5", "resolved": "http://npm.anxinyun.cn/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", @@ -10518,7 +10523,7 @@ "source-map-resolve": { "version": "0.5.3", "resolved": "http://npm.anxinyun.cn/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "integrity": "sha1-GQhmvs51U+H48mei7oLGBrVQmho=", "requires": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0", @@ -11101,7 +11106,7 @@ "type-is": { "version": "1.6.18", "resolved": "http://npm.anxinyun.cn/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "integrity": "sha1-TlUs0F3wlGfcvE73Od6J8s83wTE=", "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -11341,7 +11346,7 @@ "use": { "version": "3.1.1", "resolved": "http://npm.anxinyun.cn/use/-/use-3.1.1.tgz", - "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + "integrity": "sha1-1QyMrHmhn7wg8pEfVuuXP04QBw8=" }, "use-json-comparison": { "version": "1.0.6", diff --git a/web/package.json b/web/package.json index 3f139646..073500da 100644 --- a/web/package.json +++ b/web/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "mocha", "start": "cross-env NODE_ENV=development npm run start-params", - "start-params": "node server -p 5000 -u http://10.8.30.7:14000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com", + "start-params": "node server -p 5000 -u http://localhost:4000 --qndmn http://rfkimpwbb.hn-bkt.clouddn.com", "deploy": "export NODE_ENV=production&&npm run color && npm run build && node server", "build-dev": "export NODE_ENV=development&&webpack --config webpack.config.js", "build": "export NODE_ENV=production&&webpack --config webpack.config.prod.js", @@ -92,6 +92,7 @@ "swiper": "^8.3.1", "uuid": "^8.3.1", "webpack-dev-server": "^3.11.2", + "pdfh5": "^1.4.2", "xlsx": "^0.16.9" } } From ab6b495aafbf536346fa6d31fa9c93fa07ef9498 Mon Sep 17 00:00:00 2001 From: LUCAS Date: Thu, 28 Jul 2022 22:33:58 +0800 Subject: [PATCH 6/8] RUN rm -rf package-lock.json->docker file --- web/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/web/Dockerfile b/web/Dockerfile index 9e05d4b0..e5ae3ee8 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -10,6 +10,7 @@ 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 rm -rf package-lock.json RUN npm run build RUN rm -rf client/src RUN rm -rf node_modules From 19efae5afa90b7b39c8bcb08b4df149bc1fb4354 Mon Sep 17 00:00:00 2001 From: LUCAS Date: Thu, 28 Jul 2022 22:58:03 +0800 Subject: [PATCH 7/8] =?UTF-8?q?pdf=E9=A2=84=E8=A7=88=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/fillion/components/fileTable.js | 48 +++++++++---------- web/log/development.txt | 8 ++++ web/package-lock.json | 7 +-- web/package.json | 1 - 4 files changed, 33 insertions(+), 31 deletions(-) diff --git a/web/client/src/sections/fillion/components/fileTable.js b/web/client/src/sections/fillion/components/fileTable.js index a0fecdcd..77fc8cce 100644 --- a/web/client/src/sections/fillion/components/fileTable.js +++ b/web/client/src/sections/fillion/components/fileTable.js @@ -8,28 +8,28 @@ import React, { useEffect, useState } from 'react'; import { httpDel } from '@peace/utils' import { PinyinHelper } from '@peace/utils'; import RoadModal from './file/roadModal'; -import Pdfh5 from "pdfh5"; -import "pdfh5/css/pdfh5.css"; +// import Pdfh5 from "pdfh5"; +// import "pdfh5/css/pdfh5.css"; import FunctionMenu from './file/functionMenu'; const { confirm } = Modal; // @ts-ignore import UploadModal from './file/uploadModal'; -var pdfh5 = null; +// var pdfh5 = null; const DetailList = (props) => { const { fileList, loading, dispatch, handelRefresh, onPageChange } = props; const [imgSrc, setImgSrc] = useState({ imageView: false, imgSrc: '' }) const [pdfView, setPdfView] = useState({ showPDF: false, pdfName: '', pdfurl: '' }) var tyApiRoot = localStorage.getItem('tyApiRoot') - useEffect(() => { - if (pdfView.showPDF) { - pdfh5 = new Pdfh5("#pdf-loader", { - pdfurl: pdfView.pdfurl - }) - } - }, [pdfView]) + // useEffect(() => { + // if (pdfView.showPDF) { + // pdfh5 = new Pdfh5("#pdf-loader", { + // pdfurl: pdfView.pdfurl + // }) + // } + // }, [pdfView]) const handleRemove = (record, filePath) => { if (record) { @@ -144,12 +144,12 @@ const DetailList = (props) => { { setImgSrc({ imageView: true, imgSrc: path }) }}>预览] : '' } - { + {/* { ['.pdf'].some(item => item == record.fileExt) ? [, overviewPDF(record, path)}>预览] : '' - } + } */} }, }, @@ -184,18 +184,18 @@ const DetailList = (props) => { }, }} />, - { - pdfh5 = null; - setPdfView({ showPDF: false, pdfName: '', pdfurl: '' }); - }} - > -
- + // { + // pdfh5 = null; + // setPdfView({ showPDF: false, pdfName: '', pdfurl: '' }); + // }} + // > + //
+ // ]; }; diff --git a/web/log/development.txt b/web/log/development.txt index e69de29b..aea1f8ad 100644 --- a/web/log/development.txt +++ b/web/log/development.txt @@ -0,0 +1,8 @@ +2022-07-28 22:42:53.030 - debug: [FS-LOGGER] Init. +2022-07-28 22:42:53.107 - info: [Router] Inject api: attachment/index +2022-07-28 22:49:11.218 - debug: [FS-LOGGER] Init. +2022-07-28 22:49:11.297 - info: [Router] Inject api: attachment/index +2022-07-28 22:54:17.432 - debug: [FS-LOGGER] Init. +2022-07-28 22:54:17.511 - info: [Router] Inject api: attachment/index +2022-07-28 22:55:15.428 - debug: [FS-LOGGER] Init. +2022-07-28 22:55:15.513 - info: [Router] Inject api: attachment/index diff --git a/web/package-lock.json b/web/package-lock.json index 588c99ee..31e24a83 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -8359,11 +8359,6 @@ "through": "~2.3" } }, - "pdfh5": { - "version": "1.4.2", - "resolved": "http://npm.anxinyun.cn:443/pdfh5/-/pdfh5-1.4.2.tgz", - "integrity": "sha512-1BL8HIx/EEZowRPBgas7/WokbGEv1gxKNRmmHSimG113178mKxIBH4pxWBc0tj6d25Sy+EwnlQwv9cUUmQa42w==" - }, "perfect-scrollbar": { "version": "1.5.5", "resolved": "http://npm.anxinyun.cn/perfect-scrollbar/-/perfect-scrollbar-1.5.5.tgz", @@ -9340,7 +9335,7 @@ }, "react-quill": { "version": "1.3.5", - "resolved": "http://npm.anxinyun.cn/react-quill/-/react-quill-1.3.5.tgz", + "resolved": "http://npm.anxinyun.cn:443/react-quill/-/react-quill-1.3.5.tgz", "integrity": "sha1-jErXWdoDNlsXx5xsUq+pdyJZhE4=", "dev": true, "requires": { diff --git a/web/package.json b/web/package.json index 073500da..b8aaf86a 100644 --- a/web/package.json +++ b/web/package.json @@ -92,7 +92,6 @@ "swiper": "^8.3.1", "uuid": "^8.3.1", "webpack-dev-server": "^3.11.2", - "pdfh5": "^1.4.2", "xlsx": "^0.16.9" } } From 7368e27f532ba71444f876d4b15c22b6f2d2ea60 Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Thu, 28 Jul 2022 22:58:35 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/overview/conserve.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/app/lib/controllers/overview/conserve.js b/api/app/lib/controllers/overview/conserve.js index 506c8a61..3e98400b 100644 --- a/api/app/lib/controllers/overview/conserve.js +++ b/api/app/lib/controllers/overview/conserve.js @@ -18,7 +18,9 @@ async function statistic (ctx) { } if (projectType) { + findOption.where.projectType = projectType; + } const reportRes = await await models.Report.findAll(findOption)