From ff0068715ee313888095cd6c9a621db036626311 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Fri, 5 Aug 2022 14:33:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=96=87=E6=A1=A3=E5=AF=B9?= =?UTF-8?q?=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/commentList.vue | 8 +- .../components/comparisonResults.vue | 35 +++++-- .../components/documentDataComparison.vue | 91 +++++++++++++++---- 3 files changed, 106 insertions(+), 28 deletions(-) diff --git a/jero-web/src/views/documentTools/documentComparison/components/commentList.vue b/jero-web/src/views/documentTools/documentComparison/components/commentList.vue index 1dc268765..d670543d8 100644 --- a/jero-web/src/views/documentTools/documentComparison/components/commentList.vue +++ b/jero-web/src/views/documentTools/documentComparison/components/commentList.vue @@ -20,7 +20,7 @@
- +
@@ -112,8 +112,8 @@ confirmLoading: false, visibleComment: false, url: { - list: '/project/projectCommentEO/list', - add: '/project/projectCommentEO/add', + list: '/compare/sarFileCompareResComment/list', + add: '/sarFileCompareResComment/add', edit: '/project/projectReplyEO/add' }, rules: { @@ -387,7 +387,7 @@ } \ No newline at end of file diff --git a/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue b/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue index 52e4c4497..899ba83b6 100644 --- a/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue +++ b/jero-web/src/views/documentTools/documentComparison/components/comparisonResults.vue @@ -28,14 +28,14 @@ style="margin-left: 20px;float: left">
+ :class="{'detail-content-header-content-left-active':isDisplay}"> 所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
+ :class="{'detail-content-header-content-left-active':isDisplay}"> 所选标准:GB 23456-2020 机动车标准 FMVSS 114 中文.word
-
+
操作
@@ -47,7 +47,7 @@
+ :class="{'detail-content-content-text-dis':isDisplay}">
第10条 @@ -77,7 +77,7 @@
-
+
{{$t('edit')}} {{$t('delete')}} @@ -91,7 +91,7 @@
+ :class="{'detail-content-content-text-dis':isDisplay}">
{{$t('fullTextComments')}}: 文字占位符评论文字内容文字占位符评论文 字内容文字占位符评论文字内容文字 @@ -110,7 +110,7 @@ 占位符评论文字内容文字占位符评论文字内容文字占
-
+
{{$t('edit')}} @@ -184,9 +184,18 @@ rulesText: {}, title: '', indeterminate: false, - checkAll: false + checkAll: false, + isDisplay: false } }, + mounted() { + if (this.$route.query.isDisplay == 2) { + this.isDisplay = false + } else { + this.isDisplay = true + } + this.getData() + }, methods: { Fallback() { this.$router.push({ @@ -198,6 +207,16 @@ }, exportComparisonReportClick() { + }, + getData() { + let query = { + id: this.$route.query.id + } + getAction('/compare/sarFileCompareItemComment/list', query).then((res) => { + if (res.success) { + + } + }) }, checkboxChange(checkedList) { this.indeterminate = !!checkedList.length && checkedList.length < this.checkboxList.length diff --git a/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue b/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue index 28e5f759b..aabcbf708 100644 --- a/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue +++ b/jero-web/src/views/documentTools/documentComparison/components/documentDataComparison.vue @@ -76,7 +76,7 @@
+ :class="{'detail-content-content-right-data-blue-right':false}">
{{item.itemsNum + ' ' + item.itemsName}}
@@ -93,9 +93,9 @@
{{$t('comparativeComments')}}
- +
@@ -119,7 +119,7 @@ {{$t('edit')}} - + {{$t('submit')}} @@ -128,16 +128,16 @@
{{$t('fullTextComments')}}
- +
- {{$t('dataLoading')}} + {{dataLoadingText}}
@@ -150,8 +150,18 @@ return { formInline: {}, formInlineText: {}, + dataLoadingText: '', rules: { - fullTextComments: [ + comment: [ + { + max: 300, + message: this.$t('comparativeComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'), + trigger: 'blur' + } + ] + }, + rulesText: { + comment: [ { max: 300, message: this.$t('fullTextComments') + this.$t('cannotExceed') + 300 + this.$t('Characters'), @@ -159,7 +169,6 @@ } ] }, - rulesText: {}, loading: false, visible: false, confirmLoading: false, @@ -186,13 +195,36 @@ } this.$refs.ruleForm.validate(valid => { if (valid) { - + let query = { + itemsIdLeft: this.dataLeft.id, + itemsIdRight: this.dataRight.id, + infoId: this.$route.query.id, + comment: this.formInline.comment + } + this.dataLoadingText = this.$t('pleaseWaitWhileRunning') + this.loading = true + postAction('/compare/sarFileCompareItemComment/add', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.loading = false + // this.$router.push({ + // path: '/documentComparison' + // }) + } else { + this.$message.warning(this.$t('operationFailed')) + this.loading = false + } + }) } }) }, viewTheComparisonResultsClick() { let newUrl = this.$router.resolve({ - path: '/comparisonResults' + path: '/comparisonResults', + query: { + id: this.$route.query.id, + isDisplay: 2 + } }) window.open(newUrl.href, '_blank') }, @@ -208,12 +240,31 @@ this.fullTextDisabled = false }, fullTextCommentsSubmit() { - + this.$refs.ruleFormText.validate(valid => { + if (valid) { + this.confirmLoading = true + let query = { + infoId: this.$route.query.id, + comment: this.formInlineText.comment + } + postAction('/compare/sarFileCompareItemComment/add', query).then((res) => { + if (res.success) { + this.$message.success(this.$t('OperationSuccessful')) + this.confirmLoading = false + this.fullTextDisabled = false + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false + } + }) + } + }) }, getData() { let query = { id: this.$route.query.id } + this.dataLoadingText = this.$t('dataLoading') this.loading = true postAction('/compare/sarFileCompareInfo/getComparisonDetail', query).then((res) => { if (res.success) { @@ -231,6 +282,10 @@ if (detailLeftColor && detailLeftColor.length > 0) { detailLeftColor[0].classList.remove('detail-content-content-right-data-color') } + if (item.id == this.dataLeft.id && !this.isMatching) { + this.dataLeft = {} + return + } let detailLeft = document.getElementsByClassName('detail-content-content-right-data') if (detailLeft && detailLeft.length > 0) { detailLeft[num].classList.add('detail-content-content-right-data-color') @@ -243,10 +298,10 @@ } let detailContent = document.getElementsByClassName('detail-content-content-right-right-top') let detailRight = document.getElementsByClassName('detail-content-content-right-data-right') - this.dataRight = this.resultData.textRight[item.itemsDisplayNum - 1] + this.dataRight = this.resultData.textRight[item.targetStand - 1] if (detailRight && detailRight.length > 0) { detailRight[item.itemsDisplayNum - 1].classList.add('detail-content-content-right-data-color-right') - detailContent[0].scrollTop = detailRight[item.itemsDisplayNum - 1].offsetTop - 150 + detailContent[0].scrollTop = detailRight[item.targetStand - 1].offsetTop - 150 } } }, @@ -255,6 +310,10 @@ if (detailRightColor && detailRightColor.length > 0) { detailRightColor[0].classList.remove('detail-content-content-right-data-color-right') } + if (item.id == this.dataRight.id && !this.isMatching) { + this.dataRight = {} + return + } let detailRight = document.getElementsByClassName('detail-content-content-right-data-right') if (detailRight && detailRight.length > 0) { detailRight[num].classList.add('detail-content-content-right-data-color-right') @@ -265,12 +324,12 @@ if (detailLeftColor && detailLeftColor.length > 0) { detailLeftColor[0].classList.remove('detail-content-content-right-data-color') } - this.dataLeft = this.resultData.textLeft[item.itemsDisplayNum - 1] + this.dataLeft = this.resultData.textLeft[item.targetStand - 1] let detailContent = document.getElementsByClassName('detail-content-content-right-top') let detailLeft = document.getElementsByClassName('detail-content-content-right-data') if (detailLeft && detailLeft.length > 0) { detailLeft[item.itemsDisplayNum - 1].classList.add('detail-content-content-right-data-color') - detailContent[0].scrollTop = detailLeft[item.itemsDisplayNum - 1].offsetTop - 150 + detailContent[0].scrollTop = detailLeft[item.targetStand - 1].offsetTop - 150 } } },