合并分支 'dev_third_stage' 到 'dev_2nd_period_test'

Dev third stage

查看合并请求 laws-nio/laws-weilai!226
This commit is contained in:
高嵩
2022-11-02 09:07:54 +08:00
37 changed files with 664 additions and 242 deletions
@@ -5,7 +5,7 @@
{{$t('basicInformationOfParameters')}}
</div>
<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">
{{$t('edit')}}
</a-button>
@@ -115,7 +115,8 @@
{{$t('regulatoryCertificationTaskPlan')}}
</div>
<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"
@click="settingClick">{{$t('setting')}}
</a-button>
@@ -183,6 +184,7 @@
data() {
return {
queryForm: {},
administrators:false,
activeKey: this.$t('CurrentStatusOfTheProject'),
url: {
queryById: 'project/projectLibraryBase/queryById',
@@ -199,6 +201,14 @@
mounted() {
this.getForm()
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: {
...mapGetters(['userInfo']),
@@ -173,7 +173,8 @@
</div>
</div>
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 0px">
<div @click="handleExport" v-has="'projectLawsInventory:exportData'" v-if="isRoleSwitching"
<div @click="handleExport" v-has="'projectLawsInventory:exportData'"
v-if="isRoleSwitching || formInlineRoleSwitching.roleSwitchingCode == '12'"
class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
@@ -83,14 +83,14 @@
</div>
<div class="operator-text"
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'"
@getList="getPersonnelList"/>
</div>
<div class="operator-text"
@click="batSettingClick"
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"/>
{{$t('batSetting')}}
</div>
@@ -388,13 +388,15 @@
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
},
selectedRowKeys: [],
dictOptionsValue: []
dictOptionsValue: [],
administrators: false
}
},
computed: {
columns() {
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++) {
if (columnResult[i].title === this.$t('operation')) {
columnResult.splice(i, 1)
@@ -441,6 +443,14 @@
getData() {
this.visible = true
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.queryCertificationEngineer()
},