修改禅道已知bug

This commit is contained in:
sunFlower
2022-11-01 14:26:45 +08:00
parent fc16d2328a
commit 2214853d6a
4 changed files with 49 additions and 14 deletions
+12 -3
View File
@@ -21,11 +21,11 @@
<!-- <span v-if="ol.text==$t('check')">-->
<!-- {{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}-->
<!-- </span>-->
<span v-if="ol.text==$t('download') && record.createBy == userData.username"
<span v-if="ol.text==$t('download') && (record.createBy == userData.username || administrators)"
v-has="'ocr:ocrRestful:downFile'">
{{record.resultContent=='转换成功'?ol.text:''}}
</span>
<span v-if="ol.text==$t('delete') && record.createBy == userData.username" v-has="'ocr:ocrRecord:delete'">
<span v-if="ol.text==$t('delete') && (record.createBy == userData.username || administrators)" v-has="'ocr:ocrRecord:delete'">
{{ol.text}}
</span>
</a>
@@ -105,7 +105,8 @@
searchParmes: {},
loading: false,
orderBy: '1',
orderByField: ''
orderByField: '',
administrators:false
}
},
mounted() {
@@ -131,6 +132,14 @@
this.getData()
this.getTableList()
this.userData = this.userInfo()
this.administrators = false
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
},
beforeDestroy(){
eventBUs.$off('searchQuery')
+12 -3
View File
@@ -18,7 +18,7 @@
<!-- <span class="text">-->
<!-- {{ol.text}}-->
<!-- </span>-->
<span v-if="ol.text==$t('backDocument')&&record.flag==0 && record.createBy == userData.username"
<span v-if="ol.text==$t('backDocument') && record.flag==0 && (record.createBy == userData.username || administrators)"
class="text"
v-has="'split:sarFileSplitInfo:bind'">
{{ol.text}}
@@ -27,7 +27,7 @@
v-has="'split:sarFileSplitItems:page'">
{{ol.text}}
</span>
<span v-if="ol.text==$t('delete') && record.createBy == userData.username"
<span v-if="ol.text==$t('delete') && (record.createBy == userData.username || administrators)"
v-has="'split:sarFileSplitInfo:delete'">
{{ol.text}}
</span>
@@ -109,7 +109,8 @@
loading: false,
orderBy: '1',
userData: {},
orderByField: ''
orderByField: '',
administrators:false,
}
},
mounted() {
@@ -141,6 +142,14 @@
this.getData()
this.getTableList()
this.userData = this.userInfo()
this.administrators = false
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
this.userInfo().userRoleList.forEach(res => {
if (res.roleCode == 'admin') {
this.administrators = true
}
})
}
},
beforeDestroy() {
eventBUs.$off('searchQuery')
@@ -65,16 +65,16 @@
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)"
v-has="'dummyInventoryBase:deleteBatch'"
v-if="record.createBy == userData.username"
v-if="record.createBy == userData.username || administrators"
:disabled="record.state == 1?true:false">{{$t('edit')}}</a>
<a class="text-operation"
v-if="record.createBy == userData.username"
v-if="record.createBy == userData.username || administrators"
v-has="'dummyInventoryBase:issue'"
@click="withdraw(record)">
{{record.state == 2 ? $t('release') : $t('withdraw')}}
</a>
<a class="text-operation" :disabled="record.state == 1?true:false"
v-if="record.createBy == userData.username"
v-if="record.createBy == userData.username || administrators"
v-has="'dummyInventoryBase:deleteBatch'"
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
<a class="text-operation"
@@ -84,7 +84,7 @@
</a>
<a class="text-operation" :disabled="record.state == 1?true:false"
v-has="'dummyInventoryBase:deleteBatch'"
v-if="record.createBy == userData.username"
v-if="record.createBy == userData.username || administrators"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
</span>
</a-table>
@@ -244,13 +244,21 @@
scopedSlots: { customRender: 'operation' }
}
],
queryParam: {}
queryParam: {},
administrators:false,
}
},
mounted() {
this.getList()
this.userData = this.userInfo()
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']),
@@ -131,7 +131,7 @@
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation"
v-has="'projectLibraryBase:delete'"
v-if="record.createBy == userInfoQuery.username"
v-if="record.createBy == userInfoQuery.username || administrators"
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
</span>
@@ -246,12 +246,21 @@
}
],
userInfoQuery: {},
queryParam: {}
queryParam: {},
administrators: false
}
},
mounted() {
this.getList()
this.userInfoQuery = this.userInfo()
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']),