修改禅道已知bug

This commit is contained in:
sunFlower
2022-11-01 16:12:53 +08:00
parent 2e798e417a
commit 81c9c76fb0
2 changed files with 26 additions and 6 deletions
@@ -5,7 +5,7 @@
{{$t('basicInformationOfParameters')}} {{$t('basicInformationOfParameters')}}
</div> </div>
<div class="header-tight"> <div class="header-tight">
<a-button v-if="this.$route.query.studioEngineer == this.userInfo().id" class="box-button" <a-button v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators" class="box-button"
style="line-height: 32px" @click="edit"> style="line-height: 32px" @click="edit">
{{$t('edit')}} {{$t('edit')}}
</a-button> </a-button>
@@ -93,7 +93,8 @@
{{$t('regulatoryCertificationTaskPlan')}} {{$t('regulatoryCertificationTaskPlan')}}
</div> </div>
<div class="header-tight"> <div class="header-tight">
<a-button class="box-button" v-if="this.$route.query.studioEngineer == this.userInfo().id" <a-button class="box-button"
v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators"
style="line-height: 32px" style="line-height: 32px"
@click="settingClick">{{$t('setting')}} @click="settingClick">{{$t('setting')}}
</a-button> </a-button>
@@ -161,6 +162,7 @@
data() { data() {
return { return {
queryForm: {}, queryForm: {},
administrators:false,
activeKey: this.$t('CurrentStatusOfTheProject'), activeKey: this.$t('CurrentStatusOfTheProject'),
url: { url: {
queryById: 'project/projectLibraryBase/queryById', queryById: 'project/projectLibraryBase/queryById',
@@ -177,6 +179,14 @@
mounted() { mounted() {
this.getForm() this.getForm()
this.getSetting() this.getSetting()
this.administrators = false
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
@@ -83,14 +83,14 @@
</div> </div>
<div class="operator-text" <div class="operator-text"
v-has="'projectRelatedPersonnel:importExcel'" v-has="'projectRelatedPersonnel:importExcel'"
v-if="this.$route.query.studioEngineer == this.userInfo().id"> v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators">
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'" <ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
@getList="getPersonnelList"/> @getList="getPersonnelList"/>
</div> </div>
<div class="operator-text" <div class="operator-text"
@click="batSettingClick" @click="batSettingClick"
v-has="'projectRelatedPersonnel:setting'" v-has="'projectRelatedPersonnel:setting'"
v-if="this.$route.query.studioEngineer == this.userInfo().id"> v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators">
<a-icon type="setting"/> <a-icon type="setting"/>
{{$t('batSetting')}} {{$t('batSetting')}}
</div> </div>
@@ -388,13 +388,15 @@
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer' queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
}, },
selectedRowKeys: [], selectedRowKeys: [],
dictOptionsValue: [] dictOptionsValue: [],
administrators: false
} }
}, },
computed: { computed: {
columns() { columns() {
let columnResult = JSON.parse(JSON.stringify(this.columnsAll)) let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
if (this.$route.query.studioEngineer != this.userInfo().id) { if (this.$route.query.studioEngineer == this.userInfo().id || this.administrators) {
} else {
for (var i = 0; i < columnResult.length; i++) { for (var i = 0; i < columnResult.length; i++) {
if (columnResult[i].title === this.$t('operation')) { if (columnResult[i].title === this.$t('operation')) {
columnResult.splice(i, 1) columnResult.splice(i, 1)
@@ -441,6 +443,14 @@
getData() { getData() {
this.visible = true this.visible = true
this.queryParam = {} this.queryParam = {}
this.administrators = false
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
this.getList() this.getList()
this.queryCertificationEngineer() this.queryCertificationEngineer()
}, },