添加权限

This commit is contained in:
qq787203167
2022-06-08 19:38:28 +08:00
parent 1ff997103a
commit 5f1428d3fd
4 changed files with 107 additions and 66 deletions
+2 -2
View File
@@ -582,7 +582,7 @@ module.exports = {
maintenanceList: 'Maintenance list', maintenanceList: 'Maintenance list',
instructionForUse: 'Instruction for use', instructionForUse: 'Instruction for use',
subtitle: 'Sub-Title', subtitle: 'Sub-Title',
scopeOfApplication: 'Scope of application', scopeOfApplication: 'Scope',
correspondingStandard: 'Compare', correspondingStandard: 'Compare',
implementationCategory: 'Usage', implementationCategory: 'Usage',
certificationType: 'Certification Type', certificationType: 'Certification Type',
@@ -920,5 +920,5 @@ module.exports = {
and: 'and', and: 'and',
judge: 'Judge', judge: 'Judge',
pleaseWaitWhileRunning: 'Please wait while running', pleaseWaitWhileRunning: 'Please wait while running',
roleSwitching:'Role switching', roleSwitching: 'Role switching'
} }
@@ -17,23 +17,23 @@
</div> </div>
<div class="doc-detail-right"> <div class="doc-detail-right">
<div @click="UpdateLog" class="operator-text-text" :title="$t('UpdateLog')"> <div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('UpdateLog')">
<a-icon type="reload"/> <a-icon type="reload"/>
{{$t('UpdateLog')}} {{$t('UpdateLog')}}
</div> </div>
<div @click="DocumentSplitting" class="operator-text-text" :title="$t('DocumentSplitting')"> <div @click="DocumentSplitting" v-has="'bussLog:page'" class="operator-text-text" :title="$t('DocumentSplitting')">
<a-icon type="codepen"/> <a-icon type="codepen"/>
{{$t('DocumentSplitting')}} {{$t('DocumentSplitting')}}
</div> </div>
<div @click="UpdateLog" class="operator-text-text" :title="$t('DocumentTranslation')"> <div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('DocumentTranslation')">
<a-icon type="file-pdf"/> <a-icon type="file-pdf"/>
{{$t('DocumentTranslation')}} {{$t('DocumentTranslation')}}
</div> </div>
<div @click="UpdateLog" class="operator-text-text" :title="$t('DocumentComparison')"> <div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('DocumentComparison')">
<a-icon type="wallet"/> <a-icon type="wallet"/>
{{$t('DocumentComparison')}} {{$t('DocumentComparison')}}
</div> </div>
<div @click="UpdateLog" class="operator-text-text" :title="$t('KnowledgeDatabase')"> <div @click="UpdateLog" v-has="'bussLog:page'" class="operator-text-text" :title="$t('KnowledgeDatabase')">
<a-icon type="folder"/> <a-icon type="folder"/>
{{$t('KnowledgeDatabase')}} {{$t('KnowledgeDatabase')}}
</div> </div>
@@ -10,7 +10,7 @@
{{this.title}} {{this.title}}
</span> </span>
</div> </div>
<div class="Virtual-detail-text-right" v-if="textTitle === '法规清单'"> <div class="Virtual-detail-text-right" v-if="textTitle === $t('listOfRegulations')">
<div class="operator-text" @click="commentClick"> <div class="operator-text" @click="commentClick">
<a-icon type="message"/> <a-icon type="message"/>
{{$t('comment')}} {{$t('comment')}}
@@ -28,33 +28,39 @@
<div style="padding: 67px 0 0 0;background: #ffffff;height:100%"> <div style="padding: 67px 0 0 0;background: #ffffff;height:100%">
<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')" @click="textClick(0,'项目详情')"> <div class="Virtual-detail-left-text" :title="$t('projectDetails')"
@click="textClick(0,$t('projectDetails'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('projectDetails')}} {{$t('projectDetails')}}
</div> </div>
<div class="Virtual-detail-left-text" :title="$t('listOfRegulations')" @click="textClick(1,'法规清单')"> <div class="Virtual-detail-left-text" v-has="'projectLawsInventory:list'" :title="$t('listOfRegulations')"
@click="textClick(1,$t('listOfRegulations'))">
<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,'任务清单')"> <div class="Virtual-detail-left-text" :title="$t('taskList')" @click="textClick(2,$t('taskList'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('taskList')}} {{$t('taskList')}}
</div> </div>
<div class="Virtual-detail-left-text" :title="$t('nonConformance')" @click="textClick(3,'未符合项')"> <div class="Virtual-detail-left-text" v-has="'ncrTrack:queryPageInfo'" :title="$t('nonConformance')"
@click="textClick(3,$t('nonConformance'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('nonConformance')}} {{$t('nonConformance')}}
</div> </div>
<div class="Virtual-detail-left-text" :title="$t('TaskParameterCollection')" @click="textClick(4,'认证参数收集')"> <div class="Virtual-detail-left-text" :title="$t('TaskParameterCollection')"
@click="textClick(4,$t('TaskParameterCollection'))">
<a-icon type="container"/> <a-icon type="container"/>
{{$t('TaskParameterCollection')}} {{$t('TaskParameterCollection')}}
</div> </div>
</div> </div>
<div class="Virtual-detail-right"> <div class="Virtual-detail-right">
<ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === '项目详情'"/> <ProjectDetailsName @TaskListChange="TaskListChange" v-if="textTitle === $t('projectDetails')"/>
<listOfRegulations v-else-if="textTitle === '法规清单'"/> <listOfRegulations v-else-if="textTitle === $t('listOfRegulations')"/>
<TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility" v-else-if="textTitle === '任务清单'"/> <TaskList :isDisplayNum="isDisplayNum" :areaOfResponsibility="areaOfResponsibility"
<ParameterItemCollectionList v-else-if="textTitle === '认证参数收集'" :paramsManifest='paramsManifest'/> v-else-if="textTitle === $t('taskList')"/>
<nonConformance v-else-if="textTitle === '未符合项'"/> <ParameterItemCollectionList v-else-if="textTitle === $t('TaskParameterCollection')"
:paramsManifest='paramsManifest'/>
<nonConformance v-else-if="textTitle === $t('nonConformance')"/>
</div> </div>
</div> </div>
</div> </div>
@@ -115,7 +121,11 @@
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
if (text && text.length > 0) { if (text && text.length > 0) {
text[4].classList.add('Virtual-detail-left-text-color') for (let i = 0; i < text.length; i++) {
if (text[i].title == this.$t('TaskParameterCollection')) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
} }
}, },
textClick(num, name) { textClick(num, name) {
@@ -125,7 +135,19 @@
textColor[0].classList.remove('Virtual-detail-left-text-color') textColor[0].classList.remove('Virtual-detail-left-text-color')
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
text[num].classList.add('Virtual-detail-left-text-color') for (let i = 0; i < text.length; i++) {
if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
}, },
UpdateLogClick() { UpdateLogClick() {
this.$refs.updateLogRef.getList({ projectLibraryId: this.$route.query.id }) this.$refs.updateLogRef.getList({ projectLibraryId: this.$route.query.id })
@@ -148,14 +170,18 @@
}, },
TaskListChange(item) { TaskListChange(item) {
this.areaOfResponsibility = item this.areaOfResponsibility = item
this.textTitle = '任务清单' this.textTitle = this.$t('taskList')
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) {
textColor[0].classList.remove('Virtual-detail-left-text-color') textColor[0].classList.remove('Virtual-detail-left-text-color')
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
text[2].classList.add('Virtual-detail-left-text-color') for (let i = 0; i < text.length; i++) {
}, if (text[i].title == this.$t('taskList')) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
}
} }
} }
</script> </script>
@@ -9,7 +9,7 @@
{{this.title}} {{this.title}}
</span> </span>
</div> </div>
<div class="Virtual-detail-text-right" v-if="textTitle === '法规清单'"> <div class="Virtual-detail-text-right" v-if="textTitle === $t('listOfRegulations')">
<div class="operator-text" v-has="'projectComment:list'" @click="commentClick"> <div class="operator-text" v-has="'projectComment:list'" @click="commentClick">
<a-icon type="message"/> <a-icon type="message"/>
{{$t('comment')}} {{$t('comment')}}
@@ -109,32 +109,44 @@
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') {
this.textColor(0) this.textColor(this.$t('projectDetails'))
this.textTitle = this.$t('projectDetails') this.textTitle = this.$t('projectDetails')
} else if (this.$route.query.type == '102') { } else if (this.$route.query.type == '102') {
this.textColor(1) this.textColor(this.$t('listOfRegulations'))
this.textTitle = this.$t('listOfRegulations') this.textTitle = this.$t('listOfRegulations')
} else if (this.$route.query.type == '103') { } else if (this.$route.query.type == '103') {
this.textColor(2) this.textColor(this.$t('taskList'))
this.textTitle = this.$t('taskList') this.textTitle = this.$t('taskList')
} else if (this.$route.query.type == '104') { } else if (this.$route.query.type == '104') {
this.textColor(3) this.textColor(this.$t('nonConformance'))
this.textTitle = this.$t('nonConformance') this.textTitle = this.$t('nonConformance')
} else if (this.$route.query.type == '105') { } else if (this.$route.query.type == '105') {
this.textColor(4) this.textColor(this.$t('TaskParameterCollection'))
this.textTitle = this.$t('TaskParameterCollection') this.textTitle = this.$t('TaskParameterCollection')
} }
} }
}, },
methods: { methods: {
textColor(num) { 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) {
textColor[0].classList.remove('Virtual-detail-left-text-color') textColor[0].classList.remove('Virtual-detail-left-text-color')
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
if (text && text.length > 0) { if (text && text.length > 0) {
text[num].classList.add('Virtual-detail-left-text-color') for (let i = 0; i < text.length; i++) {
if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
} else if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
} }
}, },
textClick(num, name) { textClick(num, name) {
@@ -144,7 +156,6 @@
textColor[0].classList.remove('Virtual-detail-left-text-color') textColor[0].classList.remove('Virtual-detail-left-text-color')
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
console.log(text)
for (let i = 0; i < text.length; i++) { for (let i = 0; i < text.length; i++) {
if (text[i].title == name) { if (text[i].title == name) {
text[i].classList.add('Virtual-detail-left-text-color') text[i].classList.add('Virtual-detail-left-text-color')
@@ -186,7 +197,11 @@
textColor[0].classList.remove('Virtual-detail-left-text-color') textColor[0].classList.remove('Virtual-detail-left-text-color')
} }
let text = document.getElementsByClassName('Virtual-detail-left-text') let text = document.getElementsByClassName('Virtual-detail-left-text')
text[2].classList.add('Virtual-detail-left-text-color') for (let i = 0; i < text.length; i++) {
if (text[i].title == this.$t('taskList')) {
text[i].classList.add('Virtual-detail-left-text-color')
}
}
} }
} }
} }