Merge branch 'pet' into dev

dev
liujun 2024-12-24 17:15:20 +08:00
commit 7b416f962c
1 changed files with 73 additions and 38 deletions

View File

@ -134,7 +134,7 @@
<template slot-scope="{row}">
<div style="display: flex;">
<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>
</div>
<template v-show="loginUser.ACCOUNT_TYPE === '0'">
@ -146,6 +146,7 @@
</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.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>
</template>
</el-table-column>
@ -452,10 +453,10 @@ export default {
this.$refs.tree.filter(val)
}
},
created() {
this.getList('')
this.hasButton()
this.getTreeList()
async created() {
await this.getList('')
await this.hasButton()
await this.getTreeList()
},
methods: {
goPush(row) {
@ -499,6 +500,38 @@ export default {
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) {
return row.USER_ID
},
@ -655,41 +688,43 @@ export default {
},
getList(DEPARTMENT_ID) {
console.info(DEPARTMENT_ID)
this.listLoading = true
if (DEPARTMENT_ID) {
this.DEPARTMENT_ID = DEPARTMENT_ID
}
this.CORPINFO_ID = JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
requestFN(
'/user/list?showCount=' + this.listQuery.limit + '&currentPage=' + 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
return new Promise((resolve, reject) => {
this.listLoading = true
if (DEPARTMENT_ID) {
this.DEPARTMENT_ID = DEPARTMENT_ID
}
).then((data) => {
this.listLoading = false
this.varList = data.userList
console.log(this.varList)
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.CORPINFO_ID = JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID
requestFN(
'/user/list?showCount=' + this.listQuery.limit + '&currentPage=' + 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
}
}
this.total = data.page.total
}).catch((e) => {
this.listLoading = false
).then((data) => {
this.listLoading = false
this.varList = data.userList
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()
})
})
},
//