【修改】zengjia删除

This commit is contained in:
zhoulingpo
2023-04-28 17:45:08 +08:00
parent a30a20524b
commit 4d1a4ed002
3 changed files with 31 additions and 2 deletions
+8
View File
@@ -63,5 +63,13 @@ export default {
method: 'GET', method: 'GET',
params: data params: data
}) })
},
// 删除草稿
delDraf(data){
return request({
url: '/api/deleteDraft',
method: 'GET',
params: data
})
} }
} }
+2 -2
View File
@@ -74,7 +74,7 @@
<el-button <el-button
type="primary" type="primary"
size="large" size="large"
class="common-button-primary submitColor" class="common-button-primary"
@click="handleSubmit" @click="handleSubmit"
:loading="submitLoading" :loading="submitLoading"
v-if="showSubmit" round v-if="showSubmit" round
@@ -396,7 +396,7 @@ export default {
border: none; border: none;
} }
.submitColor{ .submitColor{
background-color:#8400ff; //background-color:#8400ff;
border: none; border: none;
} }
</style> </style>
@@ -32,6 +32,9 @@
<el-button @click.native.prevent="handle(row)" type="text" size="small"> <el-button @click.native.prevent="handle(row)" type="text" size="small">
办理 办理
</el-button> </el-button>
<el-button @click.native.prevent="classDel(row.id)" type="text" size="small" class="deleRed">
删除
</el-button>
</template> </template>
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
@@ -77,6 +80,21 @@ export default {
this.loadData() this.loadData()
}, },
methods: { methods: {
classDel(row) {
this.$confirm('确认删除该条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
}).then(() => {
this.$api.processCenter.delDraf({id:row}).then(()=>{
this.$message.success('删除成功')
this.q.current = 1
this.loadData()
})
})
},
loadData() { loadData() {
let userId=this.$store.getters.userInfo.usid let userId=this.$store.getters.userInfo.usid
this.$api.processCenter.draftProcessPage({...this.q,...this.form,userId:userId}).then(res=>{ this.$api.processCenter.draftProcessPage({...this.q,...this.form,userId:userId}).then(res=>{
@@ -126,4 +144,7 @@ export default {
padding-bottom: 10px; padding-bottom: 10px;
} }
} }
.deleRed{
color: red !important;
}
</style> </style>