bug修复

main
liujun 2023-12-19 15:01:43 +08:00
parent b3fae3e234
commit 731986f7da
2 changed files with 17 additions and 101 deletions

View File

@ -38,20 +38,18 @@
<el-table-column type="index" label="序号" width="50" align="center"/> <el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="USERNAME" label="用户名" align="center"/> <el-table-column prop="USERNAME" label="用户名" align="center"/>
<el-table-column prop="NAME" label="姓名" align="center"/> <el-table-column prop="NAME" label="姓名" align="center"/>
<el-table-column prop="DEPARTMENT_NAME" label="部门" align="center"/> <el-table-column prop="BELONG_TO_CORP_NAME" label="外派公司名称" align="center"/>
<el-table-column prop="EMPLOYER_NAME" label="外派公司名称" align="center"/>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作" align="center" width="250">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button> <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button>
<el-button type="primary" icon="el-icon-s-claim" size="mini" @click="sendMessage([row])"></el-button> <el-button type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])"></el-button>
<el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)"> <el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)"></el-button>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page-btn-group"> <div class="page-btn-group">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button> <el-button v-if="false" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
</div> </div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/> <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div> </div>
@ -69,7 +67,7 @@ import vueQr from 'vue-qr'
import apply from './apply' import apply from './apply'
import user from './user.vue' import user from './user.vue'
import SendUtil from './sendUtil.vue' import SendUtil from './sendUtil.vue'
import UserInfo from "./userInfo.vue"; import UserInfo from './userInfo.vue'
export default { export default {
components: { UserInfo, SendUtil, Pagination, apply, vueQr, user }, components: { UserInfo, SendUtil, Pagination, apply, vueQr, user },
@ -163,27 +161,8 @@ export default {
handleShow(row) { handleShow(row) {
this.$refs.userInfos.init(row) this.$refs.userInfos.init(row)
}, },
sendMessage(row) { approve(row) {
this.$confirm('确定要提交人员撤回申请吗?', '提示', { this.$refs.sendUtil.init(row)
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/trainingbatch/submitApplication', { xgf_user_ids: row.map(item => item.USER_ID).join(',') }
).then((data) => {
this.getList()
})
this.$message({
type: 'success',
message: '申请提交成功!'
})
}).catch(() => {
this.$message({
type: 'info',
message: '申请提交取消'
})
})
}, },
getUserInfo(row) { getUserInfo(row) {
this.$refs.userInfo.init(row) this.$refs.userInfo.init(row)

View File

@ -2,22 +2,16 @@
<div> <div>
<el-dialog :visible.sync="visible" :append-to-body="appendToBody" :before-close="beforeClose" title="头像" width="370px" destroy-on-close> <el-dialog :visible.sync="visible" :append-to-body="appendToBody" :before-close="beforeClose" title="头像" width="370px" destroy-on-close>
<el-form> <el-form>
<el-form-item prop="TERRITORIALITY" label="集团单位 "> <el-form-item prop="TERRITORIALITY" label="是否通过 ">
<Treeselect <el-select v-model="value" placeholder="请选择">
:options="jituanDanweiTreeData" <el-option label="是" value="1"/>
:normalizer="normalizer" <el-option label="否" value="0"/>
v-model="corp_id" </el-select>
placeholder="请选择集团单位 "
no-options-text="暂无数据"
no-children-text="暂无数据"
style="width: 100%;"
@select="getInfo($event)"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="visible = false"> </el-button> <el-button @click="visible = false"> </el-button>
<el-button type="primary" @click="sendMessage()"></el-button> <el-button type="primary" @click="sendMessage()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -39,81 +33,24 @@ export default {
data() { data() {
return { return {
visible: false, visible: false,
jituanDanwei: '',
loading: false, loading: false,
jituanDanweiTreeData: [], value: null,
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
corp_id: null,
corp_name: '',
heirloom: {} heirloom: {}
} }
}, },
methods: { methods: {
init(e) { init(e) {
this.visible = true this.visible = true
this.getCorpinfo()
this.heirloom = JSON.stringify(e) this.heirloom = JSON.stringify(e)
}, },
getCorpinfo() {
requestFN(
'/corpinfo/getDataForEditByCorpInfoId',
{
CORPINFO_ID: JSON.parse(sessionStorage.getItem('user')).CORPINFO_ID,
tm: new Date().getTime()
}
).then((data) => {
this.corpinfo = data.pd
// jtdw002 1e6dbbe16004402f8d2c0e52afd9a676
// jtdw003 3a854eefa7894e06aaa1a2611bca80f6
// jtdw004 020578a4c1f04bc692ee25145c2efbe5
// jtdw005 90966974de3c4b83aca6f8fd6432d5c2
if (data.pd.CORP_TYPE == 'jtdw002') {
this.jituanDanwei = '1e6dbbe16004402f8d2c0e52afd9a676'
}
if (data.pd.CORP_TYPE == 'jtdw003') {
this.jituanDanwei = '3a854eefa7894e06aaa1a2611bca80f6'
}
if (data.pd.CORP_TYPE == 'jtdw004') {
this.jituanDanwei = '020578a4c1f04bc692ee25145c2efbe5'
}
if (data.pd.CORP_TYPE == 'jtdw005') {
this.jituanDanwei = '90966974de3c4b83aca6f8fd6432d5c2'
}
this.getTreeData()
})
},
getTreeData() {
if (this.jituanDanwei) {
requestFN(
'/companyApi/department/listTree',
{ CORPINFO_ID: this.jituanDanwei }
).then((data) => {
this.jituanDanweiTreeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
})
}
},
getInfo(e) {
console.log(e)
this.corp_name = e.name
},
beforeClose() { beforeClose() {
this.corp_id = null
}, },
sendMessage(row) { sendMessage(row) {
requestFN( requestFN(
'/trainingbatch/sendMessage', '/xgf/user/approve',
{ {
list: this.heirloom, list: this.heirloom,
corp_id: this.corp_id, STATUS: this.value,
corp_name: this.corp_name,
tm: new Date().getTime() tm: new Date().getTime()
} }
).then((data) => { ).then((data) => {