diff --git a/jero-web/src/api/manage.js b/jero-web/src/api/manage.js index 24c7c2b61..349700e7a 100644 --- a/jero-web/src/api/manage.js +++ b/jero-web/src/api/manage.js @@ -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) { if (!data || data.size === 0) { diff --git a/jero-web/src/views/projectManagement/ProjectDetails/index.vue b/jero-web/src/views/projectManagement/ProjectDetails/index.vue index 8689d5db1..8bb0a5ba3 100644 --- a/jero-web/src/views/projectManagement/ProjectDetails/index.vue +++ b/jero-web/src/views/projectManagement/ProjectDetails/index.vue @@ -28,7 +28,7 @@
{{$t('projectDetails')}} @@ -38,7 +38,9 @@ {{$t('listOfRegulations')}}
-
+
{{$t('taskList')}}
@@ -47,7 +49,8 @@ {{$t('nonConformance')}}
-
{{$t('TaskParameterCollection')}} @@ -79,6 +82,7 @@ import historicalVersionList from '../components/historicalVersionList' import commentList from '../components/commentList' import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage' + import { mapGetters } from 'vuex' export default { name: 'ProjectDetails', @@ -96,20 +100,21 @@ return { title: this.$t('projectDetails'), isDisplayNum: '', - textTitle: this.$t('projectDetails'), + textTitle: '', + isTrue: false, url: { logList: '/project/projectLawsInventoryLogEO/page', historicalVersionUrl: '', queryUserPremissionByProjectLibraryId: '/project/projectCertificationDirectoryEO/queryUserPremissionByProjectLibraryId' }, - areaOfResponsibility: {} + areaOfResponsibility: {}, + engineeringInterfacePerson: '' } }, created() { document.title = this.$t('projectDetails') + '-' + this.$route.query.projectName }, mounted() { - this.textColor(0) this.getTaskId() if (this.$route.query.type) { if (this.$route.query.type == '101') { @@ -128,9 +133,12 @@ this.textColor(this.$t('TaskParameterCollection')) this.textTitle = this.$t('TaskParameterCollection') } + } else { + this.getList() } }, methods: { + ...mapGetters(['userInfo']), textColor(name) { let textColor = document.getElementsByClassName('Virtual-detail-left-text-color') if (textColor && textColor.length > 0) { @@ -139,6 +147,7 @@ let text = document.getElementsByClassName('Virtual-detail-left-text') if (name == 0) { text[name].classList.add('Virtual-detail-left-text-color') + this.textTitle = text[name].title } else { if (text && text.length > 0) { 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) { this.areaOfResponsibility = item this.textTitle = this.$t('taskList')