修改已知问题

This commit is contained in:
qq787203167
2022-06-14 15:27:55 +08:00
parent 58d1c1258f
commit c863af79fb
2 changed files with 47 additions and 6 deletions
+8
View File
@@ -184,6 +184,14 @@ export function downloadFile(url, fileName, parameter, callback) {
}) })
} }
}) })
} else {
if (!jsonData.success) {
index.showDrawer({
loading: false,
isTrue: isTrue
})
Vue.prototype['$message'].warning(jsonData.message)
}
} }
} catch (e) { } catch (e) {
if (!data || data.size === 0) { if (!data || data.size === 0) {
@@ -28,7 +28,7 @@
<div class="detail-content" style="height: 100%"> <div class="detail-content" style="height: 100%">
<div class="Virtual-detail-left"> <div class="Virtual-detail-left">
<div class="Virtual-detail-left-text" :title="$t('projectDetails')" <div class="Virtual-detail-left-text" :title="$t('projectDetails')"
v-has="'projectLibraryBase:queryById'" v-has="'projectLawsInventory:projectDetails'"
@click="textClick(0,$t('projectDetails'))"> @click="textClick(0,$t('projectDetails'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('projectDetails')}} {{$t('projectDetails')}}
@@ -38,7 +38,9 @@
<a-icon type="container"/> <a-icon type="container"/>
{{$t('listOfRegulations')}} {{$t('listOfRegulations')}}
</div> </div>
<div class="Virtual-detail-left-text" :title="$t('taskList')" @click="textClick(2,$t('taskList'))"> <div class="Virtual-detail-left-text" :title="$t('taskList')"
v-has="'projectLawsInventory:taskList'"
@click="textClick(2,$t('taskList'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('taskList')}} {{$t('taskList')}}
</div> </div>
@@ -47,7 +49,8 @@
<a-icon type="container"/> <a-icon type="container"/>
{{$t('nonConformance')}} {{$t('nonConformance')}}
</div> </div>
<div class="Virtual-detail-left-text" :title="$t('TaskParameterCollection')" <div class="Virtual-detail-left-text" v-has="'projectLawsInventory:TaskParameterCollection'"
:title="$t('TaskParameterCollection')"
@click="textClick(4,$t('TaskParameterCollection'))"> @click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('TaskParameterCollection')}} {{$t('TaskParameterCollection')}}
@@ -79,6 +82,7 @@
import historicalVersionList from '../components/historicalVersionList' import historicalVersionList from '../components/historicalVersionList'
import commentList from '../components/commentList' import commentList from '../components/commentList'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import { mapGetters } from 'vuex'
export default { export default {
name: 'ProjectDetails', name: 'ProjectDetails',
@@ -96,20 +100,21 @@
return { return {
title: this.$t('projectDetails'), title: this.$t('projectDetails'),
isDisplayNum: '', isDisplayNum: '',
textTitle: this.$t('projectDetails'), textTitle: '',
isTrue: false,
url: { url: {
logList: '/project/projectLawsInventoryLogEO/page', logList: '/project/projectLawsInventoryLogEO/page',
historicalVersionUrl: '', historicalVersionUrl: '',
queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId' queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId'
}, },
areaOfResponsibility: {} areaOfResponsibility: {},
engineeringInterfacePerson: ''
} }
}, },
created() { created() {
document.title = this.$t('projectDetails') + '-' + this.$route.query.projectName document.title = this.$t('projectDetails') + '-' + this.$route.query.projectName
}, },
mounted() { mounted() {
this.textColor(0)
this.getTaskId() this.getTaskId()
if (this.$route.query.type) { if (this.$route.query.type) {
if (this.$route.query.type == '101') { if (this.$route.query.type == '101') {
@@ -128,9 +133,12 @@
this.textColor(this.$t('TaskParameterCollection')) this.textColor(this.$t('TaskParameterCollection'))
this.textTitle = this.$t('TaskParameterCollection') this.textTitle = this.$t('TaskParameterCollection')
} }
} else {
this.getList()
} }
}, },
methods: { methods: {
...mapGetters(['userInfo']),
textColor(name) { textColor(name) {
let textColor = document.getElementsByClassName('Virtual-detail-left-text-color') let textColor = document.getElementsByClassName('Virtual-detail-left-text-color')
if (textColor && textColor.length > 0) { if (textColor && textColor.length > 0) {
@@ -139,6 +147,7 @@
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
if (name == 0) { if (name == 0) {
text[name].classList.add('Virtual-detail-left-text-color') text[name].classList.add('Virtual-detail-left-text-color')
this.textTitle = text[name].title
} else { } else {
if (text && text.length > 0) { if (text && text.length > 0) {
for (let i = 0; i < text.length; i++) { for (let i = 0; i < text.length; i++) {
@@ -197,6 +206,30 @@
} }
}) })
}, },
getList() {
let query = {
projectId: this.$route.query.id
}
this.loading = true
postAction('/project/projectRelatedPersonnel/page', query).then((res) => {
if (res.success) {
let dataSource = res.result || []
dataSource.forEach(res => {
this.engineeringInterfacePerson += res.engineeringInterfacePerson + ','
})
this.$nextTick(() => {
if (this.engineeringInterfacePerson.includes(this.userInfo().id)) {
this.isTrue = true
} else {
this.isTrue = false
}
})
this.textColor(0)
} else {
this.textColor(0)
}
})
},
TaskListChange(item) { TaskListChange(item) {
this.areaOfResponsibility = item this.areaOfResponsibility = item
this.textTitle = this.$t('taskList') this.textTitle = this.$t('taskList')