修改禅道已知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')">--> <!-- <span v-if="ol.text==$t('check')">-->
<!-- {{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}--> <!-- {{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}-->
<!-- </span>--> <!-- </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'"> v-has="'ocr:ocrRestful:downFile'">
{{record.resultContent=='转换成功'?ol.text:''}} {{record.resultContent=='转换成功'?ol.text:''}}
</span> </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}} {{ol.text}}
</span> </span>
</a> </a>
@@ -105,7 +105,8 @@
searchParmes: {}, searchParmes: {},
loading: false, loading: false,
orderBy: '1', orderBy: '1',
orderByField: '' orderByField: '',
administrators:false
} }
}, },
mounted() { mounted() {
@@ -131,6 +132,14 @@
this.getData() this.getData()
this.getTableList() this.getTableList()
this.userData = this.userInfo() 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(){ beforeDestroy(){
eventBUs.$off('searchQuery') eventBUs.$off('searchQuery')
+12 -3
View File
@@ -18,7 +18,7 @@
<!-- <span class="text">--> <!-- <span class="text">-->
<!-- {{ol.text}}--> <!-- {{ol.text}}-->
<!-- </span>--> <!-- </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" class="text"
v-has="'split:sarFileSplitInfo:bind'"> v-has="'split:sarFileSplitInfo:bind'">
{{ol.text}} {{ol.text}}
@@ -27,7 +27,7 @@
v-has="'split:sarFileSplitItems:page'"> v-has="'split:sarFileSplitItems:page'">
{{ol.text}} {{ol.text}}
</span> </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'"> v-has="'split:sarFileSplitInfo:delete'">
{{ol.text}} {{ol.text}}
</span> </span>
@@ -109,7 +109,8 @@
loading: false, loading: false,
orderBy: '1', orderBy: '1',
userData: {}, userData: {},
orderByField: '' orderByField: '',
administrators:false,
} }
}, },
mounted() { mounted() {
@@ -141,6 +142,14 @@
this.getData() this.getData()
this.getTableList() this.getTableList()
this.userData = this.userInfo() 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() { beforeDestroy() {
eventBUs.$off('searchQuery') eventBUs.$off('searchQuery')
@@ -65,16 +65,16 @@
<span slot="operation" slot-scope="text,record"> <span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="edit(record)" <a class="text-operation" @click="edit(record)"
v-has="'dummyInventoryBase:deleteBatch'" 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> :disabled="record.state == 1?true:false">{{$t('edit')}}</a>
<a class="text-operation" <a class="text-operation"
v-if="record.createBy == userData.username" v-if="record.createBy == userData.username || administrators"
v-has="'dummyInventoryBase:issue'" v-has="'dummyInventoryBase:issue'"
@click="withdraw(record)"> @click="withdraw(record)">
{{record.state == 2 ? $t('release') : $t('withdraw')}} {{record.state == 2 ? $t('release') : $t('withdraw')}}
</a> </a>
<a class="text-operation" :disabled="record.state == 1?true:false" <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'" v-has="'dummyInventoryBase:deleteBatch'"
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a> @click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
<a class="text-operation" <a class="text-operation"
@@ -84,7 +84,7 @@
</a> </a>
<a class="text-operation" :disabled="record.state == 1?true:false" <a class="text-operation" :disabled="record.state == 1?true:false"
v-has="'dummyInventoryBase:deleteBatch'" v-has="'dummyInventoryBase:deleteBatch'"
v-if="record.createBy == userData.username" v-if="record.createBy == userData.username || administrators"
@click="deleteLib(record)">{{$t('deleteLib')}}</a> @click="deleteLib(record)">{{$t('deleteLib')}}</a>
</span> </span>
</a-table> </a-table>
@@ -244,13 +244,21 @@
scopedSlots: { customRender: 'operation' } scopedSlots: { customRender: 'operation' }
} }
], ],
queryParam: {} queryParam: {},
administrators:false,
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.userData = this.userInfo() 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: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
@@ -131,7 +131,7 @@
<!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>--> <!-- <a class="text-operation" @click="edit(record)">{{$t('edit')}}</a>-->
<a class="text-operation" <a class="text-operation"
v-has="'projectLibraryBase:delete'" v-has="'projectLibraryBase:delete'"
v-if="record.createBy == userInfoQuery.username" v-if="record.createBy == userInfoQuery.username || administrators"
@click="deleteLib(record)">{{$t('deleteLib')}}</a> @click="deleteLib(record)">{{$t('deleteLib')}}</a>
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>--> <!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
</span> </span>
@@ -246,12 +246,21 @@
} }
], ],
userInfoQuery: {}, userInfoQuery: {},
queryParam: {} queryParam: {},
administrators: false
} }
}, },
mounted() { mounted() {
this.getList() this.getList()
this.userInfoQuery = this.userInfo() 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: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),