From 0b193de9e0070eb0d49c21164bdf51abdf1d0451 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Mon, 25 Sep 2023 15:51:34 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BF=AE=E6=94=B9=E8=87=AA=E6=B5=8B?= =?UTF-8?q?bug=EF=BC=8C=E5=AE=8C=E5=96=84=E9=97=AE=E7=AD=94=E5=BA=93?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/lang/businessSupport/en.js | 22 ++- src/common/lang/businessSupport/zh.js | 8 +- src/components/customField/Search.vue | 2 +- .../selection/StandardModelSelection.vue | 8 +- .../selection/StandardModelSelectionModal.vue | 14 +- src/mixins/JeroListMixin.js | 43 +++++ .../QuestionAnswerList.vue | 38 +++- .../modules/QuizModal.vue | 132 +++++++------ .../{modules => page}/AnswerPage.vue | 180 +++++++++++------- .../check/CheckList.vue | 6 +- .../plan/PlanList.vue | 2 +- .../publicize/EnterpriseStandardPublicize.vue | 5 +- .../reviewMeeting/ReviewMeetingList.vue | 4 +- .../reviewPlan/ReviewPlanList.vue | 4 +- .../FriendshipLinkList.vue | 6 +- .../internalWorkGroup/WorkingGroupList.vue | 2 +- 16 files changed, 318 insertions(+), 158 deletions(-) rename src/views/businessSupport/questionAnswerLibrary/{modules => page}/AnswerPage.vue (52%) diff --git a/src/common/lang/businessSupport/en.js b/src/common/lang/businessSupport/en.js index 18b52e6e..02625ce5 100644 --- a/src/common/lang/businessSupport/en.js +++ b/src/common/lang/businessSupport/en.js @@ -5,13 +5,19 @@ module.exports = { }, // 问答库 questionAnswer: { - classify: '分类', - title: '标题', - quiz: '提问', - questionDesc: '问题描述', - attach: '附件', - quizTime: '提问时间', - answer: '回答', - poster: '发帖人' + classify: 'Classify', + title: 'Title', + quiz: 'Quiz', + questionDesc: 'Problem Description', + attach: 'Attachment', + quizTime: 'Question Time', + answer: 'answer', + poster: 'Poster', + answerNum: 'replies', + top: '【top】', + cancelTop: 'untop', + setTop: 'Set To Top', + answerQuestion: 'reply to a question', + word: 'word' } } diff --git a/src/common/lang/businessSupport/zh.js b/src/common/lang/businessSupport/zh.js index 5af68475..36ddb563 100644 --- a/src/common/lang/businessSupport/zh.js +++ b/src/common/lang/businessSupport/zh.js @@ -12,6 +12,12 @@ module.exports = { attach: '附件', quizTime: '提问时间', answer: '回答', - poster: '发帖人' + poster: '发帖人', + answerNum: '个回复', + top: '【置顶】', + cancelTop: '取消置顶', + setTop: '设置为置顶', + answerQuestion: '回复问题', + word: '字' } } diff --git a/src/components/customField/Search.vue b/src/components/customField/Search.vue index e3f966ff..597496fa 100644 --- a/src/components/customField/Search.vue +++ b/src/components/customField/Search.vue @@ -197,7 +197,7 @@ {{ $t('query') }} - {{ $t('reset') }} + {{ $t('reset') }} diff --git a/src/components/selection/StandardModelSelection.vue b/src/components/selection/StandardModelSelection.vue index e9d780f1..4eefd4e3 100644 --- a/src/components/selection/StandardModelSelection.vue +++ b/src/components/selection/StandardModelSelection.vue @@ -8,7 +8,7 @@ {{this.$t('standardSelect.standardSelection')}} - + @@ -39,10 +39,10 @@ export default { }, // 输入框输入监听 indexClick (event) { - this.$emit('input', event.target.value) + this.$emit('change', event.target.value) }, modalInput (value) { - this.$emit('input', value) + this.$emit('change', value) }, modalNameChange (value) { this.$emit('nameChange', value) @@ -50,7 +50,7 @@ export default { }, model: { prop: 'value', - event: 'input' + event: 'change' } } diff --git a/src/components/selection/StandardModelSelectionModal.vue b/src/components/selection/StandardModelSelectionModal.vue index a312eaff..36f1c439 100644 --- a/src/components/selection/StandardModelSelectionModal.vue +++ b/src/components/selection/StandardModelSelectionModal.vue @@ -15,6 +15,7 @@ @@ -66,6 +67,10 @@ export default { value: { type: String, default: '' + }, + disabledSourceSearch: { + type: Boolean, + default: false } }, data () { @@ -132,10 +137,11 @@ export default { }, methods: { open () { - this.source ? this.queryParam.source = this.source : this.queryParam = {} this.visible = true - this.queryParam = {} - this.replacePage() + this.$nextTick(() => { + this.source ? this.queryParam.source = this.source : this.queryParam = {} + this.replacePage() + }) }, // 获取表格数据 replacePage () { @@ -181,7 +187,7 @@ export default { serialNumber.push(res.standardNumber) serialNameArr.push(res.standardName) }) - this.$emit('input', serialNumber.join(',')) + this.$emit('change', serialNumber.join(',')) this.$emit('nameChange', serialNameArr.join(',')) this.visible = false } else { diff --git a/src/mixins/JeroListMixin.js b/src/mixins/JeroListMixin.js index 72c94de0..eaf78aba 100644 --- a/src/mixins/JeroListMixin.js +++ b/src/mixins/JeroListMixin.js @@ -324,6 +324,49 @@ export const JeroListMixin = { modalLoading.destroy() }) }, + // 带文件导出 + handleFileExport (fileName) { + if (!fileName || typeof fileName !== 'string') { + fileName = '导出文件' + } + const param = this.getQueryParams() + if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + param.selections = this.selectedRowKeys.join(',') + } + console.log('导出参数', param) + // 加一个大的提示 + const modalLoading = this.$info({ + title: '提示', + content: 正在导出,请稍候 , + keyboard: false + }) + // 把知道了这个按钮去掉 + this.$nextTick(() => { + document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none' + }) + downFile(this.url.exportZipUrl, param).then((data) => { + if (!data) { + this.$message.warning('文件下载失败') + return + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data]), fileName + '.zip') + } else { + const url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' })) + const link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName + '.zip') + document.body.appendChild(link) + link.click() + document.body.removeChild(link) // 下载完成移除元素 + window.URL.revokeObjectURL(url) // 释放掉blob对象 + } + }).finally(() => { + // 销毁这个提示 + modalLoading.destroy() + }) + }, /* 导入 */ handleImportExcel (info) { // 加一个大的提示 diff --git a/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue b/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue index ba42bfef..936f5cc7 100644 --- a/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue +++ b/src/views/businessSupport/questionAnswerLibrary/QuestionAnswerList.vue @@ -37,7 +37,7 @@ {{ $t('query') }} - {{ $t('reset') }} + {{ $t('reset') }} @@ -155,7 +155,7 @@ export default { title: this.$t('title'), align: 'center', width: 180, - dataIndex: 'title', + dataIndex: 'titleSlot', scopedSlots: { customRender: 'text' } }, { @@ -195,9 +195,16 @@ export default { } ], url: { - list: '' + list: '', + delete: '' }, - userInfo: {} + userInfo: {}, + dataSource: [ + { + id: 1, + // createBy: 'e9ca23d68d884d4ebb19d07889727dae' + } + ] } }, mounted () { @@ -208,9 +215,6 @@ export default { handleQuiz () { this.$refs.quizModal.title = this.$t('businessSupport.questionAnswer.quiz') this.$refs.quizModal.open() - // this.$router.push({ - // path: '/businessSupport/questionDetail' - // }) }, // 点击相关材料 handleAttachClick (record) { @@ -236,6 +240,26 @@ export default { // 其余可预览文件仍使用KKFile进行预览 const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}` window.open(url) + }, + // 查看 + handleDetail (record) { + this.$router.push({ + path: '/businessSupport/questionDetail', + query: { + id: record.id, + canAnswer: 0 + } + }) + }, + // 回答 + handleAnswer (record) { + this.$router.push({ + path: '/businessSupport/questionDetail', + query: { + id: record.id, + canAnswer: 1 + } + }) } } } diff --git a/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue b/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue index d5015ad5..37eb870d 100644 --- a/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue +++ b/src/views/businessSupport/questionAnswerLibrary/modules/QuizModal.vue @@ -10,58 +10,76 @@ - - - 请选择 - 国内标准 - 海外标准 - 企业标准 - 其他问题 - - - - - - - - - - - - - - 请选择 - {{ item.projectName }} - - - - - - - - - - + + + + + 请选择 + 国内标准 + 海外标准 + 企业标准 + 其他问题 + + + + + + + + + + + + + + + + + + + + + + 请选择 + {{ item.projectName }} + + + + + + + + + + + + + + + + @@ -91,7 +109,15 @@ export default { }, wrapperCol: { xs: { span: 24 }, - sm: { span: 16 } + sm: { span: 18 } + }, + longLabelCol: { + xs: { span: 24 }, + sm: { span: 3 } + }, + longWrapperCol: { + xs: { span: 24 }, + sm: { span: 20 } }, validatorRules: { classify: { diff --git a/src/views/businessSupport/questionAnswerLibrary/modules/AnswerPage.vue b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue similarity index 52% rename from src/views/businessSupport/questionAnswerLibrary/modules/AnswerPage.vue rename to src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue index 7c80530f..b5918432 100644 --- a/src/views/businessSupport/questionAnswerLibrary/modules/AnswerPage.vue +++ b/src/views/businessSupport/questionAnswerLibrary/page/AnswerPage.vue @@ -1,62 +1,79 @@