From 1944cd5122eebe93a4e9dc54f62b0b7bbc6c9632 Mon Sep 17 00:00:00 2001 From: sunFlower <787203167@qq.com> Date: Tue, 29 Nov 2022 10:06:27 +0800 Subject: [PATCH 01/54] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E6=B8=85=E5=8D=95=E7=9A=84=E6=8B=96=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/package.json | 1 + jero-web/src/assets/less/common.less | 22 +- jero-web/src/mixins/header.js | 229 ++++++++++++++++++ .../components/listOfRegulations.vue | 23 +- 4 files changed, 272 insertions(+), 3 deletions(-) create mode 100644 jero-web/src/mixins/header.js diff --git a/jero-web/package.json b/jero-web/package.json index c6b13b18e..1cd46fe3c 100644 --- a/jero-web/package.json +++ b/jero-web/package.json @@ -27,6 +27,7 @@ "js-base64": "^3.7.2", "js-cookie": "^2.2.0", "jsencrypt": "^3.0.0-rc.1", + "lodash": "^4.17.21", "lodash.get": "^4.4.2", "lodash.pick": "^4.4.0", "mammoth": "^1.4.21", diff --git a/jero-web/src/assets/less/common.less b/jero-web/src/assets/less/common.less index 801cf50a5..4315c49a9 100644 --- a/jero-web/src/assets/less/common.less +++ b/jero-web/src/assets/less/common.less @@ -99,6 +99,26 @@ line-height: 38px; } -.ant-table-fixed-left table, .ant-table-fixed-right table .ant-table-fixed{ +.ant-table-fixed-left table, .ant-table-fixed-right table .ant-table-fixed { width: min-content; +} + +.nio-header-th { + position: relative; + isolation: isolate; +} + +.nio-drag-handler { + position: absolute; + right: 0; + top: 0; + height: 100%; + width: 1px; + z-index: 1; + border-left: 1px #e8e8e8 solid; +} +.nio-drag-handler:hover, +.nio-drag-handler:focus{ + cursor: col-resize!important; + border: 1px solid #0bd9d9!important; } \ No newline at end of file diff --git a/jero-web/src/mixins/header.js b/jero-web/src/mixins/header.js new file mode 100644 index 000000000..75982d9b0 --- /dev/null +++ b/jero-web/src/mixins/header.js @@ -0,0 +1,229 @@ +import _ from 'lodash' + +const events = { + start: 'mousedown', + move: 'mousemove', + stop: 'mouseup' +} +var columnsAll = [] +var columnsKey = '' +const DragHandler = { + name: 'nio-drag-handler', + //获取混入的方法(重新设置表头宽度) + inject: ['onResizeColumn'], + props: { + column: { type: Object, required: true }, + minWidth: { type: Number, required: true } + }, + + data() { + return { + dragging: false, + thWidth: 0,// 列头的宽度,用于计算 + startX: 0, + moveEvent: { + remove: function() { + } + }, + stopEvent: { + remove: function() { + } + } + } + }, + //销毁监听 + beforeDestroy() { + this.removeEvents() + }, + methods: { + //鼠标开始拖拽 + handleMouseDown(e) { + e.stopPropagation() + e.preventDefault() + this.handleStart(e) + }, + + handleStart(e) { + console.log(e) + this.dragging = true + this.removeEvents() + this.thWidth = this.$el.parentNode.getBoundingClientRect().width + if (e instanceof MouseEvent && e.which !== 1) { + return + } + if (e.stopPropagation) e.stopPropagation() + this.startX = e.pageX + this.moveEvent = addEventListenerWrap(document.documentElement, events.move, this.handleMove) + this.stopEvent = addEventListenerWrap(document.documentElement, events.stop, this.handleStop) + }, + + handleMove(e) { + this.updateWidth(e) + }, + handleStop(e) { + this.dragging = false + this.updateWidth(e) + this.removeEvents() + }, + + updateWidth(e) { + let pageX = e.pageX + const tmpDeltaX = this.startX - pageX + let w = Math.max(this.thWidth - tmpDeltaX, this.minWidth) + w = Math.min(w, Infinity) + this.onResizeColumn(w, this.column) + }, + + removeEvents() { + this.moveEvent.remove() + this.stopEvent.remove() + } + }, + //渲染div 绑定拖拽 + render(h) { + const line = h('div', { class: 'nio-drag-handler-line' }, []) + return h('div', { class: 'nio-drag-handler', on: { mousedown: this.handleMouseDown } }, [line]) + } +} +const ResizeHeaderOne = function(val, name) { + columnsAll = val + columnsKey = name + return (h, props, children) => { + const { key, column, ...restProps } = props + let col = {} + // 处理多级表头 + col = getRenderCoL(key, val) + let content = [].concat(children) + if (col) { + const handlerVNode = h(DragHandler, { + props: { + width: col.width, + minWidth: Math.min(col.width, 100), + column: col + } + }, []) + content = content.concat( + handlerVNode + ) + } + return h('th', { + key, + props: { col }, + ...Object.assign({}, restProps, { class: (restProps.class || '') + ' nio-header-th' }) + }, content) + } +} +export const ResizeHeader = { + methods: { + drag(columns, name) { + return { + header: { + cell: ResizeHeaderOne(columns, name) + } + } + } + } +} +const getRenderCoL = (key, tbCols) => { + let result = '' + _.forEach(tbCols, (item) => { + if (item.children) { + result = getRenderCoL(key, item.children) + return !result + } else { + const k = item.dataIndex || item.key + if (k === key) { + result = item + return false + } + } + }) + return result +} +//拖拽的节流方法 +const throttle2 = (fn, delay) => { + let valid = true + return (...args) => { + if (!valid) { + return + } + valid = false + setTimeout(() => { + fn(...args) + valid = true + }, delay) + } +} +//对table组件进行重构的核心方法组件 + + +//监听鼠标移动的方法 +function addEventListenerWrap(target, eventType, cb) { + if (target && target.addEventListener) { + target.addEventListener(eventType, cb) + } + + return { + remove: () => { + if (target && target.removeEventListener) { + target.removeEventListener(eventType, cb) + } + } + } +} + +//在table组件中混入的一个方法 provide => onResizeColumn +//目的是在table重写中(DragHandler方法) +//可以用到构造的onResizeColumn方法(重新设置表头的宽度) +export const ResizeColumnProvide = { + name: 'ResizeColumnProvideMixin', + provide() { + return { + onResizeColumn: this.onResizeColumn + } + }, + + data() { + const onResizeColumn = throttle2(this._resizeColumn, 30) + return { + moving: false, //这个属性是为了在拖拽时 阻止表头触发排序的功能 + onResizeColumn + } + }, + methods: { + _resizeColumn(w, column) { + this.moving = true + let time = setTimeout(() => { + this.moving = false + clearTimeout(time) + }, 2000) + //在拖拽时找到对应表头 重新设置表头的宽度 + let num = -1 + let numOne = -1 + for (let i = 0; i < columnsAll.length; i++) { + if (columnsAll[i].dataIndex === column.dataIndex) { + num = i + break + } + if (columnsAll[i].children && columnsAll[i].children.length > 0) { + for (let j = 0; j < columnsAll[i].children.length; j++) { + if (columnsAll[i].children[j].dataIndex === column.dataIndex) { + num = i + numOne = j + break + } + } + } + } + // const matchedIndex = columns.findIndex(item => item.dataIndex === column.dataIndex) + // console.log(matchedIndex) + // columns[matchedIndex].width = w + if (numOne > -1) { + columnsAll[num].children[numOne].width = w + } else { + columnsAll[num].width = w + } + this[columnsKey] = columnsAll + } + } +} \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 1fd293f24..eebaee1d0 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -202,6 +202,7 @@
- + \ No newline at end of file From 31bcf72d31420b35652504ec44da218a6d7aa0d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Fri, 2 Dec 2022 13:36:24 +0800 Subject: [PATCH 02/54] =?UTF-8?q?UI=E7=95=8C=E9=9D=A2=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 17 ++++++++------ jero-web/src/common/lang/zh-cn.js | 9 +++++--- .../components/globalAdvancedQuery/index.vue | 6 +++-- .../src/components/tools/HeaderNotice.vue | 2 ++ jero-web/src/components/tools/UserMenu.vue | 2 ++ .../components/evaluationResultsList.vue | 6 +++-- .../components/problemKnowledgeBaseList.vue | 4 ++-- .../problemKnowledgeBaseListView.vue | 2 +- .../components/modules/defaultTemplate.vue | 8 +++---- .../components/TermInformation.vue | 12 +++++++++- .../components/initiatingProcess.vue | 2 +- .../library/docDetail/index.vue | 10 ++++++++- .../splitting/modules/SplitAddForm.vue | 6 ++++- .../splitting/modules/SplitDetail.vue | 4 ++-- .../components/documentDataComparison.vue | 6 ++--- .../components/DocumentLibrary.vue | 2 +- .../searchCenter/components/whole.vue | 12 +++++++--- .../components/engineeringConfirmation.vue | 2 +- .../ParameterItemCollectionList.vue | 22 ++++++++++++------- .../components/settingList.vue | 14 ++++++------ .../components/TaskPlanList.vue | 4 ++-- .../projectStatusBoard/index.vue | 6 ++--- .../components/batchProcessing.vue | 2 +- 23 files changed, 104 insertions(+), 56 deletions(-) diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index 2049d8217..b6507fcd6 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -99,6 +99,7 @@ module.exports = { RoleCode: 'Role Code', createTime: 'Creation Time', userName: 'User Name', + userManual:'User Manual', selectOneRule: 'Please select a role!', setAttribute: 'Please set the url.list2 attribute!', setDelAttribute: 'Please set the url.delete2 attribute!', @@ -426,6 +427,7 @@ module.exports = { MessageType: 'Message Type', NotificationTime: 'Notification Time', MessageNotification: 'Message Notification', + MessageCenter:'Message Center', SeeMore: 'See More', OperationSuccessful: 'Operation Successful', Intheexport: 'In The Export...', @@ -609,7 +611,7 @@ module.exports = { Deliverables: 'Deliverables', personLiable: 'Assignee', PrehomoConfirmation: 'Pre-Homo Confirmation', - verificationAndConformityconfirmation: 'Validation Compliance Check', + verificationAndConformityconfirmation: 'Validation Compliance Check ', StandardImplementationDate: 'New Type Execution Date', regulatoryEngineer: 'Regulation Engineer', certifiedEngineer: 'Homo Engineer', @@ -720,11 +722,11 @@ module.exports = { time: 'Time', uploadMaximumATime: 'Upload a Maximum of 20 Images at a time', - confirmationOfRegulationsList: 'Regulation List Confirmation', - regulatoryTaskConfirmation: 'Regulation Task Confirmation', - certificationStart: 'Homo Completion', - preHomoCompletion: 'Pre-Homo Confirmation', - certificationEnd: 'Homo KO', + confirmationOfRegulationsList: 'Regulation List Confirmation ', + regulatoryTaskConfirmation: 'Regulation Task Confirmation ', + certificationStart: 'Homo Completion ', + preHomoCompletion: 'Pre-Homo Confirmation ', + certificationEnd: 'Homo KO ', directoryName: 'Catalogue Name', batch: 'Batch', uploadTime: 'Upload Time', @@ -880,7 +882,7 @@ module.exports = { number: 'No.', Deadline: 'Deadline', toBeConfirmed: 'To Confirm', - designComplianceReview: 'Design Compliance Confirmation', + designComplianceReview: 'Design Compliance Confirmation ', preHomeConfirmation: 'Pre-Homo Confirmation', verificationComplianceReview: 'Validation Compliance Confirmation', Deployment: 'Deploy', @@ -1170,6 +1172,7 @@ module.exports = { RemarkInfo: 'Remarks Info', initiateDocumentComparison: 'Initiate Document Comparison', comparativeComments: 'Comparative Comments', + Comparisonofarticles:'Comparison Of Articles', viewTheComparisonResults: 'View Results', addFullTextComment: 'Full Text Comment', turnOffAutomaticMatching: 'Turn Off Auto Match', diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index af3986456..d835378b0 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -101,6 +101,7 @@ module.exports = { RoleCode: '角色编码', createTime: '创建时间', userName: '用户名称', + userManual:'用户手册', selectOneRule: '请选择一个角色!', setAttribute: '请设置url.list2属性!', setDelAttribute: '请设置url.delete2 属性!', @@ -431,6 +432,7 @@ module.exports = { MessageType: '消息类型', NotificationTime: '通知时间', MessageNotification: '消息通知', + MessageCenter:'消息中心', SeeMore: '查看更多', OperationSuccessful: '操作成功', Intheexport: '导出中...', @@ -1001,9 +1003,9 @@ module.exports = { taskConfirmationResponsiblePerson: '责任人任务确认', or: '或', warningTime: '预警时间', - RegulationMonthlyManagement: '法规月报管理', - RegulationMonthlyFill: '法规月报填写', - RegulationMonthlyName: '法规月报名称', + RegulationMonthlyManagement: '月报管理', + RegulationMonthlyFill: '月报填写', + RegulationMonthlyName: '月报名称', monthlyLanguage: '月报语种', releaseStatus: '发布状态', uploadedBy: '上传人', @@ -1175,6 +1177,7 @@ module.exports = { RemarkInfo: '备注信息', initiateDocumentComparison: '发起文档对比', comparativeComments: '对比评论', + Comparisonofarticles:'条款对比评论', viewTheComparisonResults: '查看对比结果', addFullTextComment: '添加全文评论', turnOffAutomaticMatching: '关闭自动匹配', diff --git a/jero-web/src/components/globalAdvancedQuery/index.vue b/jero-web/src/components/globalAdvancedQuery/index.vue index 3bce861ad..ed1fba712 100644 --- a/jero-web/src/components/globalAdvancedQuery/index.vue +++ b/jero-web/src/components/globalAdvancedQuery/index.vue @@ -12,7 +12,8 @@ - + + {{$t('advancedQuery')}} @@ -21,7 +22,7 @@ {{$t('advancedQuery')}} + + diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index 65ed8a73a..63059fb63 100644 --- a/jero-web/src/components/tools/UserMenu.vue +++ b/jero-web/src/components/tools/UserMenu.vue @@ -33,7 +33,9 @@
+ +
diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue index 85e38ad5a..095f0e8c0 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/components/evaluationResultsList.vue @@ -57,12 +57,14 @@ {{$t('filingExternalOpinions')}}:
- + {{$t('clickUpload')}} +
- + {{$t('viewFile')}} +
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue index 9c4249f90..1c1d57c65 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseList.vue @@ -111,7 +111,7 @@
- {{$t('forward')}} + {{$t('share')}}
@@ -174,7 +174,7 @@ {{$t('dataLoading')}} - +
diff --git a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue index 4fd6b4a18..8db575b4d 100644 --- a/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue +++ b/jero-web/src/views/businessSupport/problemKnowledgeBase/components/problemKnowledgeBaseListView.vue @@ -55,7 +55,7 @@
- {{$t('forward')}} + {{$t('share')}}
diff --git a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue index e9fb33a95..3baa708c8 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/modules/defaultTemplate.vue @@ -48,7 +48,7 @@ {{$t('technicalField')}}
- + {{$t('scopeOfApplication')}}
- + {{$t('status')}}
- + {{$t('usage')}} - +
- + @@ -322,6 +322,16 @@ } + + + \ No newline at end of file From d0f261b43d6bf25545a3c71bc906cd35a3c0b6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=A6=E6=B3=BD?= Date: Tue, 27 Dec 2022 17:57:34 +0800 Subject: [PATCH 10/54] =?UTF-8?q?UI=E7=95=8C=E9=9D=A2=E5=8F=98=E6=9B=B4-?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DocumentLibrary.vue | 28 ++++++++++++------- .../searchCenter/components/whole.vue | 10 ++++++- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue index 9f2c56347..775dc9048 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/DocumentLibrary.vue @@ -261,21 +261,21 @@ columns: [ { title: this.$t('standard'), - align: 'center', + align: 'left', dataIndex: 'serial_number', width: 170, scopedSlots: { customRender: 'serial_number' } }, { title: this.$t('title'), - align: 'center', + align: 'left', dataIndex: 'title', width: 170, scopedSlots: { customRender: 'titleName' } }, { title: this.$t('fileName'), - align: 'center', + align: 'left', dataIndex: 'file_name', ellipsis: true, width: 170, @@ -283,7 +283,7 @@ }, { title: this.$t('status'), - align: 'center', + align: 'left', width: 140, sorter: true, ellipsis: true, @@ -291,7 +291,7 @@ }, { title: this.$t('zoneOfApplication'), - align: 'center', + align: 'left', width: 170, sorter: true, ellipsis: true, @@ -304,14 +304,14 @@ // }, { title: this.$t('technicalField'), - align: 'center', + align: 'left', ellipsis: true, width: 170, dataIndex: 'technology_territory' }, { title: this.$t('releaseDate'), - align: 'center', + align: 'left', ellipsis: true, width: 170, sorter: true, @@ -319,7 +319,7 @@ }, { title: this.$t('vehicleInProductionDate'), - align: 'center', + align: 'left', ellipsis: true, width: 210, sorter: true, @@ -327,7 +327,7 @@ }, { title: this.$t('ImplementationDate'), - align: 'center', + align: 'left', ellipsis: true, sorter: true, width: 210, @@ -335,7 +335,7 @@ }, { title: this.$t('operation'), - align: 'center', + align: 'left', fixed: 'right', width: 200, scopedSlots: { customRender: 'operation' } @@ -955,4 +955,12 @@ /*::v-deep .ant-select {*/ /* max-width: calc(100% - 126px) !important;*/ /*}*/ + + /deep/.ant-table-thead > tr > th { + font-weight: bolder; + } + + ///deep/.ant-table-tbody > tr > td { + // color: #040B29 ; + //} \ No newline at end of file diff --git a/jero-web/src/views/documentTools/searchCenter/components/whole.vue b/jero-web/src/views/documentTools/searchCenter/components/whole.vue index b896339b6..a0f74948c 100644 --- a/jero-web/src/views/documentTools/searchCenter/components/whole.vue +++ b/jero-web/src/views/documentTools/searchCenter/components/whole.vue @@ -283,16 +283,24 @@ } } - diff --git a/jero-web/src/components/SplitDetailTable/index.vue b/jero-web/src/components/SplitDetailTable/index.vue index ea4f0014d..486c723e4 100644 --- a/jero-web/src/components/SplitDetailTable/index.vue +++ b/jero-web/src/components/SplitDetailTable/index.vue @@ -171,7 +171,7 @@ this.columns.push({ title: res.db_field_txt, dataIndex: res.db_field_name, - align: 'center', + align: 'left', ellipsis: true, sorter: res.sort }) @@ -201,7 +201,7 @@ if (this.showAction) { this.columns.push({ title: this.$t('operation'), - align: 'center', + align: 'left', fixed: 'right', width: width, scopedSlots: { customRender: 'operation' } diff --git a/jero-web/src/components/SplitSearch/index.vue b/jero-web/src/components/SplitSearch/index.vue index c15b6b177..a1ce0b7c8 100644 --- a/jero-web/src/components/SplitSearch/index.vue +++ b/jero-web/src/components/SplitSearch/index.vue @@ -2,7 +2,7 @@ -