|
|
@@ -7,7 +7,6 @@
|
|
|
:editData="mainData"
|
|
|
:mainAreaData="mainAreaData"
|
|
|
turnPageId="20221102090303"
|
|
|
- delApiId="20221102090403"
|
|
|
idname="hrid"
|
|
|
ownertable="sys_hr"
|
|
|
tags=""
|
|
|
@@ -22,6 +21,7 @@
|
|
|
<div slot="customOperation" >
|
|
|
<linkAccount class="inline-16" v-if="tool.checkAuth($route.name,'update')" :data="mainData" @onSuccess="queryMainData"></linkAccount>
|
|
|
<createUser class="inline-16" v-if="tool.checkAuth($route.name,'update') && !mainData.userid" :data="mainData" @onSuccess="queryMainData"></createUser>
|
|
|
+ <el-button v-if="tool.checkAuth($route.name,'delete')" type="primary" class="inline-16" size="mini" @click="deleteData">删 除</el-button>
|
|
|
<!-- <restPas v-if="tool.checkAuth($route.name,'restpas')" :userid="mainData.userid" class="inline-16"></restPas> -->
|
|
|
</div>
|
|
|
<div class="container normal-panel" slot="slot0" >
|
|
|
@@ -41,6 +41,7 @@ import linkAccount from "./modules/linkAccount.vue"
|
|
|
import createUser from "./modules/createUser.vue"
|
|
|
import accountInfo from "./modules/accountInfo.vue"
|
|
|
import commissionSet from '@/components/commissionSet/index.vue'
|
|
|
+import {Message} from "element-ui";
|
|
|
export default {
|
|
|
name: "detail",
|
|
|
data() {
|
|
|
@@ -160,6 +161,40 @@ export default {
|
|
|
this.visible = false
|
|
|
this.queryMainData(this.$route.query.id)
|
|
|
this.$emit('onSuccess')
|
|
|
+ },
|
|
|
+ deleteData(){
|
|
|
+ this.$confirm('确定删除当前数据吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async() => {
|
|
|
+ let param = {
|
|
|
+ "id": 20221102090403,
|
|
|
+ "content":{
|
|
|
+ "hrids":[this.$route.query.id]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const res = await this.$api.requested(param)
|
|
|
+ console.log(res,'删除')
|
|
|
+ if (res.data === '成功'){
|
|
|
+ this.tool.showMessage(res,()=>{
|
|
|
+ this.$store.dispatch('changeDetailDrawer',false)
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ Message({
|
|
|
+ message: res.data,
|
|
|
+ type: 'error',
|
|
|
+ duration:3000,
|
|
|
+ showClose:true
|
|
|
+ });
|
|
|
+ this.onSuccess()
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|