Merge branch 'pet' into dev
commit
7b416f962c
|
@ -134,7 +134,7 @@
|
||||||
<template slot-scope="{row}">
|
<template slot-scope="{row}">
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<div style="margin-right: 13px;">
|
<div style="margin-right: 13px;">
|
||||||
<el-button v-if="row.USER_ID != userId" type="primary" icon="el-icon-view" size="mini" @click="handleShow(row)">查看</el-button>
|
<el-button v-if="row.USER_ID !== userId" type="primary" icon="el-icon-view" size="mini" @click="handleShow(row)">查看</el-button>
|
||||||
<el-button v-if="row.AUDIT_STATE == 1 && row.USER_ID != userId" type="success" icon="el-icon-s-check" size="mini" @click="handleEditState(row)">审核</el-button>
|
<el-button v-if="row.AUDIT_STATE == 1 && row.USER_ID != userId" type="success" icon="el-icon-s-check" size="mini" @click="handleEditState(row)">审核</el-button>
|
||||||
</div>
|
</div>
|
||||||
<template v-show="loginUser.ACCOUNT_TYPE === '0'">
|
<template v-show="loginUser.ACCOUNT_TYPE === '0'">
|
||||||
|
@ -146,6 +146,7 @@
|
||||||
</template>
|
</template>
|
||||||
<el-button v-if="row.ACCOUNT_TYPE == '1'" type="info" icon="el-icon-postcard" size="mini" @click="handlePrinting(row)">打印</el-button>
|
<el-button v-if="row.ACCOUNT_TYPE == '1'" type="info" icon="el-icon-postcard" size="mini" @click="handlePrinting(row)">打印</el-button>
|
||||||
<el-button v-if="row.ISPUSH == '0'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)">推送</el-button>
|
<el-button v-if="row.ISPUSH == '0'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)">推送</el-button>
|
||||||
|
<el-button v-if="row.USER_ID !== userId" type="danger" icon="el-icon-position" size="mini" @click="resign(row)">离职</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -452,10 +453,10 @@ export default {
|
||||||
this.$refs.tree.filter(val)
|
this.$refs.tree.filter(val)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
async created() {
|
||||||
this.getList('')
|
await this.getList('')
|
||||||
this.hasButton()
|
await this.hasButton()
|
||||||
this.getTreeList()
|
await this.getTreeList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goPush(row) {
|
goPush(row) {
|
||||||
|
@ -499,6 +500,38 @@ export default {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
resign(e) {
|
||||||
|
this.$confirm('确定后该员工会离职, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
requestFN(
|
||||||
|
'user/resign',
|
||||||
|
{
|
||||||
|
USER_ID: e.USER_ID
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
if (data.result === 'success') {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: '离职成功!'
|
||||||
|
})
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.$message.error('推送失败,' + data.msg)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消离职'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
getRowKey(row) {
|
getRowKey(row) {
|
||||||
return row.USER_ID
|
return row.USER_ID
|
||||||
},
|
},
|
||||||
|
@ -655,41 +688,43 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
getList(DEPARTMENT_ID) {
|
getList(DEPARTMENT_ID) {
|
||||||
console.info(DEPARTMENT_ID)
|
return new Promise((resolve, reject) => {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
if (DEPARTMENT_ID) {
|
if (DEPARTMENT_ID) {
|
||||||
this.DEPARTMENT_ID = DEPARTMENT_ID
|
this.DEPARTMENT_ID = DEPARTMENT_ID
|
||||||
}
|
|
||||||
this.CORPINFO_ID = JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
|
||||||
requestFN(
|
|
||||||
'/user/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
|
||||||
{
|
|
||||||
KEYWORDS: this.KEYWORDS,
|
|
||||||
DEPARTMENT_ID: this.DEPARTMENT_ID,
|
|
||||||
CORPINFO_ID: this.CORPINFO_ID,
|
|
||||||
ISFLOW: this.ISFLOW,
|
|
||||||
AUDIT_STATE: this.AUDIT_STATE,
|
|
||||||
DEPART_STATE: this.DEPART_STATE,
|
|
||||||
BASIC_STATE: this.BASIC_STATE,
|
|
||||||
CARD_ID: this.ID_CARD,
|
|
||||||
USER_ID: this.USER_ID
|
|
||||||
}
|
}
|
||||||
).then((data) => {
|
this.CORPINFO_ID = JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
|
||||||
this.listLoading = false
|
requestFN(
|
||||||
this.varList = data.userList
|
'/user/list?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
||||||
console.log(this.varList)
|
{
|
||||||
for (let i = 0; i < this.varList.length; i++) {
|
KEYWORDS: this.KEYWORDS,
|
||||||
if (this.varList[i].cardImgCount) {
|
DEPARTMENT_ID: this.DEPARTMENT_ID,
|
||||||
this.varList[i].BASIC_STATE = 1
|
CORPINFO_ID: this.CORPINFO_ID,
|
||||||
} else if (this.varList[i].ROLE_ID == '362add4102cd4d1ebe3768a8e58c737f') {
|
ISFLOW: this.ISFLOW,
|
||||||
this.varList[i].BASIC_STATE = ''
|
AUDIT_STATE: this.AUDIT_STATE,
|
||||||
} else {
|
DEPART_STATE: this.DEPART_STATE,
|
||||||
this.varList[i].BASIC_STATE = 2
|
BASIC_STATE: this.BASIC_STATE,
|
||||||
|
CARD_ID: this.ID_CARD,
|
||||||
|
USER_ID: this.USER_ID
|
||||||
}
|
}
|
||||||
}
|
).then((data) => {
|
||||||
this.total = data.page.total
|
this.listLoading = false
|
||||||
}).catch((e) => {
|
this.varList = data.userList
|
||||||
this.listLoading = false
|
for (let i = 0; i < this.varList.length; i++) {
|
||||||
|
if (this.varList[i].cardImgCount) {
|
||||||
|
this.varList[i].BASIC_STATE = 1
|
||||||
|
} else if (this.varList[i].ROLE_ID == '362add4102cd4d1ebe3768a8e58c737f') {
|
||||||
|
this.varList[i].BASIC_STATE = ''
|
||||||
|
} else {
|
||||||
|
this.varList[i].BASIC_STATE = 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.total = data.page.total
|
||||||
|
resolve()
|
||||||
|
}).catch((e) => {
|
||||||
|
this.listLoading = false
|
||||||
|
reject()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 禁用 启用
|
// 禁用 启用
|
||||||
|
|
Loading…
Reference in New Issue