[update] 修改bug77937,77958,78028,78031

This commit is contained in:
lideqin
2023-11-02 11:24:27 +08:00
parent 1d5a739b52
commit 2c88bfdc57
7 changed files with 90 additions and 25 deletions
@@ -1,5 +1,5 @@
<template>
<div class="detail-page">
<internal-detail-page :title="pageTitle" :loading="loading">
<div class="detail-page-title">{{ model.title }}</div>
<div class="detail-page-second-title">
<!-- todo: 发帖人部门没有返回 -->
@@ -105,7 +105,7 @@
<img v-show="image" :src="imageUrl">
</div>
</div>
</div>
</internal-detail-page>
</template>
<script>
@@ -115,6 +115,7 @@ import { getFileAccessHttpUrl, downloadFile } from '@/api/manage'
import { getQuizById, answerQuiz, setOrCancelTop, deleteAnswer } from '@/api/businessSupport'
import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf'
import InternalDetailPage from '@/components/InternalDetailPage'
// 支持预览的文件后缀
const CAN_PREVIEW_FILE_SUFFIX = ['jpg', 'jpeg', 'png', 'raw', 'pdf', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'mp3', 'mp4', 'flv']
@@ -124,8 +125,11 @@ const Base64 = require('js-base64').Base64
export default {
name: 'AnswerPage',
components: { InternalDetailPage },
data () {
return {
loading: false,
pageTitle: '',
model: {},
answerArr: [],
fileList: [],
@@ -147,10 +151,16 @@ export default {
this.userInfo = userInfo
this.currentUser = Object.assign({}, userInfo)
this.canAnswer = Number(this.$route.query.canAnswer)
if (this.canAnswer === 1) {
this.pageTitle = this.$t('businessSupport.questionAnswer.answerQuestionTitle')
} else {
this.pageTitle = this.$t('businessSupport.questionAnswer.questionDetail')
}
},
methods: {
// 初始化获取数据信息
initData (id) {
this.loading = true
getQuizById({ id: id }).then(res => {
if (res.success) {
this.model = Object.assign({}, res.result)
@@ -167,6 +177,8 @@ export default {
}
this.answerArr = this.model.answerList
}
}).finally(() => {
this.loading = false
})
},
// 获取头像
@@ -27,7 +27,7 @@
</a-range-picker>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<template v-if="toggleSearchStatus">
<!-- 宣贯人 -->
<a-col :span="6">
<a-form-item :label="$t('enterpriseStandardLibrary.publicize.publicist')" :labelCol="labelCol" :wrapperCol="wrapperCol">
@@ -123,13 +123,15 @@
</template>
<!-- 没有编辑删除权限 -->
<template v-else>
<a v-for="(operation, index) in operationList.slice(0, operateMaxNum)" :key="index" @click="operationClick(operation,record)">
<template v-if="operation.text === $t('enterpriseStandardLibrary.standard.collection')">
<template v-if="operationList.find(item => item.text === $t('enterpriseStandardLibrary.standard.collection'))">
<a @click="operationClick(operationList.find(item => item.text === $t('enterpriseStandardLibrary.standard.collection')),record)">
<i class="iconfont icon-star1" v-show="record.collectionFlag" />
<i class="iconfont icon-star" v-show="!record.collectionFlag" />
</template>
</a>
<a-divider v-if="operationList.find(item => item.text === $t('share'))" type="vertical" />
</a>
</template>
<a-divider v-if="operationList.find(item => item.text === $t('share')) &&
operationList.find(item => item.text === $t('enterpriseStandardLibrary.standard.collection'))"
type="vertical" />
<template v-if="operationList.find(item => item.text === $t('share'))">
<template v-for="(operation, index) in operationList.slice(operateMaxNum)">
<a :key="index" @click="operationClick(operation,record)" v-if="operation.text === $t('share')">