Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-05-16 15:30:20 +08:00
2 changed files with 35 additions and 1 deletions
@@ -13,6 +13,10 @@
@change="tableOnChange"
@onHeaderRow='onHeaderRow'
>
<span slot="operationbtn" slot-scope="record">
<span v-if='homo'>按钮 </span>
<span>{{ record }}</span>
</span>
<span slot="operation" slot-scope="record">
<a v-for="(ol,index) in OperationList"
@click="OperationClick(ol,record)">
@@ -76,7 +80,10 @@ export default {
searchParmes: {},
loading: false,
orderBy: '1',
orderByField: ''
orderByField: '',
homo: 0, // 认证工程师
sdt: 0, // 工程接口人
dre: 0, // 填写人
}
},
mounted() {},
@@ -84,6 +91,25 @@ export default {
onHeaderRow(column, index) {
console.log(column, index)
},
getLoginUserType() {
let params = {
paramsManifestId: this.paramsManifest.id,
projectId: this.$route.query.id
}
getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) {
res.result.split(',').forEach((item,index) => {
if(item === 'homo') {
this.homo = 1
} else if(item === 'sdt') {
this.sdt = 1
} else if(item === 'dre') {
this.dre = 1
}
})
}
})
},
getData() {
let params = {
paramsManifestId: this.paramsManifest.id,
@@ -106,6 +132,12 @@ export default {
customRender: 'detailClick'
}
}
if(res.click) {
// 工程接口人列表修改
this.columns[index].scopedSlots = {
customRender: 'operationbtn'
}
}
})
if (this.showAction) {
this.columns.push({
@@ -173,6 +205,7 @@ export default {
watch: {
paramsManifest(newVal, oldVal) {
this.getData()
this.getLoginUserType()
this.getTableList()
}
}
@@ -196,6 +196,7 @@ export default {
tableHeader: 'params/collectManifest/getHeader',
tableList: 'params/collectManifest/list',
add: 'params/collectManifest/submit',
getLoginUserType: 'params/collectManifest/getLoginUserType',
// edit: 'params/manifest/edit',
// queryById: 'params/manifest/queryById',
deleteBatch: 'params/collectManifest/deleteBatch',