修改已知问题

This commit is contained in:
qq787203167
2022-05-26 17:01:04 +08:00
parent 4a3b80c904
commit cbcba93bbb
4 changed files with 237 additions and 9 deletions
+1
View File
@@ -893,4 +893,5 @@ module.exports = {
ExportReport:'Export Report',
basicInformation:'Basic Information',
replyFromProjectContact:'Reply from project contact person',
pleaseUpload:'Please Upload',
}
+1
View File
@@ -898,4 +898,5 @@ module.exports = {
ExportReport:'导出报告',
basicInformation:'基础信息',
replyFromProjectContact:'工程接口人回复',
pleaseUpload:'请上传',
}
@@ -51,7 +51,8 @@
<div class="Virtual-detail-right">
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === '项目详情'"/>
<listOfRegulations v-else-if="textTitle === '法规清单'"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility" v-else-if="textTitle === '任务清单'"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
v-else-if="textTitle === '任务清单'"/>
<TaskParameterCollection v-else-if="textTitle === '认证参数收集'"/>
<nonConformance v-else-if="textTitle === '未符合项'"/>
</div>
@@ -89,29 +90,47 @@
data() {
return {
title: this.$t('projectDetails'),
isDisplayNum:'',
isDisplayNum: '',
textTitle: '项目详情',
url: {
logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '',
queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId'
},
areaOfResponsibility:{},
areaOfResponsibility: {}
}
},
mounted() {
this.textColor()
this.textColor(0)
this.getTaskId()
if (this.$route.query.type) {
if (this.$route.query.type == '101') {
this.textColor(0)
this.textTitle = '详情详情'
} else if (this.$route.query.type == '102') {
this.textColor(1)
this.textTitle = '法规清单'
} else if (this.$route.query.type == '103') {
this.textColor(2)
this.textTitle = '任务清单'
} else if (this.$route.query.type == '104') {
this.textColor(3)
this.textTitle = '未符合项'
} else if (this.$route.query.type == '105') {
this.textColor(4)
this.textTitle = '认证参数收集'
}
}
},
methods: {
textColor() {
textColor(num) {
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) {
textColor[0].classList.remove('Virtual-detail-left-text-color')
}
let text = document.getElementsByClassName('Virtual-detail-left-text')
if (text && text.length > 0) {
text[0].classList.add('Virtual-detail-left-text-color')
text[num].classList.add('Virtual-detail-left-text-color')
}
},
textClick(num, name) {
@@ -138,11 +157,11 @@
}
getAction(this.url.queryUserPremissionByProjectLibraryId, query).then((res) => {
if (res.success) {
this.isDisplayNum = res.result
this.isDisplayNum = res.result
}
})
},
TaskListChange(item){
TaskListChange(item) {
this.areaOfResponsibility = item
this.textTitle = '任务清单'
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
@@ -151,7 +170,7 @@
}
let text = document.getElementsByClassName('Virtual-detail-left-text')
text[2].classList.add('Virtual-detail-left-text-color')
},
}
}
}
</script>
@@ -0,0 +1,207 @@
<template>
<div>
<a-modal v-model="visible"
:maskClosable="false"
@ok="handleOk"
:confirm-loading="confirmLoading"
@cancel="handleCancel"
:title="title">
<a-upload-dragger
accept='*.*'
:disabled="disabled"
class="ant-upload-list"
:class="{'uploadFile':isUploadFile}"
name="file"
:file-list="myfileList"
:multiple="true"
:action="uploadAction+'?state='+state+'&cut='+cut"
:headers="headers"
@preview="preview"
:before-upload="beforeUpload"
:remove='remove'
@change="handleChange">
<p v-if="!isUploadFile">
<a-icon class="action-upload" type="cloud-upload"/>
</p>
<p v-if="!isUploadFile" class="ant-upload-text" style="font-size: 14px;line-height: 30px">
{{this.$t('clickUpload')}}</p>
</a-upload-dragger>
</a-modal>
</div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
export default {
name: 'resultReportedUpload',
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile'],
data() {
return {
visible: false,
title: this.$t('upload1') + this.$t('resultReported'),
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
fileList: [],
myfileList: [],
isLoding: false,
cut: '',
confirmLoading: false,
uploadQuery: {},
}
},
created() {
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
},
methods: {
clickButtonToUploadFile(item) {
this.uploadQuery = item
this.myfileList = []
this.visible = true
getAction('sys/common/getFileInfos', { id: item }).then((res) => {
if (res.success) {
let data = res.result
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
}
}
})
},
handleOk() {
if (this.myfileList && this.myfileList.length == 0) {
this.$message.warning(this.$t('pleaseUpload') + this.$t('resultReported'))
} else {
}
},
handleCancel() {
this.visible = false
},
beforeUpload(file) {
this.fileTypeSatus = true
this.$message.destroy()
},
remove() {
this.fileTypeSatus = true
},
handleChange(info) {
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
if (status === 'error') {
this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$message.destroy()
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
}
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功。`);
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
}
}
}
</script>
<style>
.ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important;
}
.action-upload {
font-size: 67px;
color: #c0c4cc;
}
.uploadFile {
}
</style>