|
|
@@ -83,13 +83,12 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</template>
|
|
|
-
|
|
|
<template #slot-modify="{scope}">
|
|
|
- <el-button type="text" @click="replaceCpFn(scope.row.id)" style="margin-right:20px;">修改</el-button>
|
|
|
+ <el-button type="text" @click="replaceCpFn(scope.row.id)" style="">修改</el-button>
|
|
|
</template>
|
|
|
-
|
|
|
<template #slot-pleaseAuth="{scope}">
|
|
|
- <el-button type="text" @click="authFn(scope.row.id)" style="margin-right:20px;">认证</el-button>
|
|
|
+ <el-button type="text" @click="authFn(scope.row)" style="margin-right:15px;" v-if="scope.row.auth == 0">申请认证</el-button>
|
|
|
+ <el-button type="text" @click="authFn(scope.row)" style="margin-right:15px;" v-else>取消认证</el-button>
|
|
|
</template>
|
|
|
|
|
|
</x-crud>
|
|
|
@@ -209,9 +208,13 @@ export default {
|
|
|
this.$refs['replaceForm'].resetFields();
|
|
|
this.replaceCpPop = false;
|
|
|
},
|
|
|
- authFn(id){
|
|
|
- this.$service.ptCp.pleaseAuth({id:id}).then(res=>{
|
|
|
+ authFn(info){
|
|
|
+ let that = this
|
|
|
+ this.$service.ptCp.pleaseAuth({id:info.id}).then(res=>{
|
|
|
this.$message.success('操作成功')
|
|
|
+ setTimeout(() => {
|
|
|
+ that.app.refresh({ classStyle:this.classStyle,classId:this.currentCpClassId })
|
|
|
+ }, 1000)
|
|
|
})
|
|
|
},
|
|
|
replaceCpFn(id){
|
|
|
@@ -264,6 +267,11 @@ export default {
|
|
|
ctx.service(this.$service.ptCp)
|
|
|
.set('table', {
|
|
|
columns: [
|
|
|
+ {
|
|
|
+ type: 'selection',
|
|
|
+ align: 'center',
|
|
|
+ width: '60'
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'id',
|
|
|
label: 'ID',
|