安督部打回功能

5_7_地图同步
liujun 2024-04-07 14:04:59 +08:00
parent 5eb411831a
commit 567358d10d
3 changed files with 495 additions and 0 deletions

View File

@ -0,0 +1,275 @@
<template>
<div class="app-container">
<el-form label-width="130px">
<el-row>
<el-col :span="6">
<el-form-item label="用户名">
<el-input v-model="KEYWORDS" placeholder="请输入用户名"/>
</el-form-item>
</el-col>
<el-col v-if="false" :span="6">
<el-form-item label="培训状态">
<el-select v-model="STATUS" placeholder="请选择培训状态" style="width: 100%;" clearable>
<el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table
ref="multipleTable"
:data="varList"
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
:row-key="getRowKey"
:reserve-selection="true"
tooltip-effect="dark"
border
fit
highlight-current-row
@select="handleRowSelect">
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" align="center" reserve-selection/>
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="USERNAME" label="用户名" align="center"/>
<el-table-column prop="NAME" label="姓名" align="center"/>
<el-table-column prop="BELONG_TO_CORP_NAME" label="外派公司名称" align="center"/>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="{row}">
<el-row>
<el-col :span="24">
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleShow(row)"></el-button>
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleFlowShow(row)"></el-button>
<el-button type="text" icon="el-icon-edit" size="mini" @click="handleFlowStepShow(row)"></el-button>
</el-col>
<el-col>
<el-button type="text" icon="el-icon-edit" size="mini" @click="repulse(row)"></el-button>
</el-col>
</el-row>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button v-if="false" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button v-if="false" type="primary" icon="el-icon-s-claim" size="mini" @click="entrustByBatch()"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
<user-info ref="userInfos" append-to-body/>
<flow-info-list ref="flowInfo"/>
<flow-step ref="flowStep" />
<repulse ref="repulse"/>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import vueQr from 'vue-qr'
import FlowInfoList from '../../flow/components/flowInfoList.vue'
import FlowStep from '../../flow/components/flowStep.vue'
import UserInfo from '../../flow_audit/userInfo.vue'
import repulse from './repulse.vue'
export default {
components: { FlowInfoList, FlowStep, UserInfo, Pagination, vueQr, repulse },
directives: { waves },
data() {
return {
config: config,
QRCodeDialog: false,
qrcodeStr: '',
userDetailForm: {},
specialUsersList: {},
detailForm: {},
userEntryForm: {},
imgUrl: '',
SUPERVISE_CORPINFO_ID: '',
wenhuachengduList: [], //
postList: [], //
photosOfLevel: [], //
trainRecordList: [], //
contractFileList: [], //
insuranceFileList: [], //
gongshangbaoxianFile: [],
userPhotoFile: [], //
userCardIDPhotoFile: [], //
socialPhotoFile: [], //
listQuery: {
page: 1,
limit: 20
},
total: 0,
varList: [],
KEYWORDS: '',
statusList: [{ value: 0, label: '未培训' }, { value: 1, label: '培训中' }, {
value: 2,
label: '已培训(合格)'
}, { value: 3, label: '已培训(不合格)' }, { value: 9, label: '申请中' }],
STATUS: '',
add: false, //
del: false, //
edit: false, //
selectedRowKeys: []
}
},
created() {
this.getDict()
this.getList()
this.hasButton()
},
methods: {
getRowKey(row) {
return row.XGF_USER_ID
},
handleRowSelect(rows, row) {
console.log(rows)
this.selectedRowKeys = rows.map(row => row.XGF_USER_ID)
console.log(this.selectedRowKeys)
},
handleSelectWithDifferentStatus(row, rowIndex) {
return row.power_flag === '1' && ((row.FLOWS_TYPE === '1' && row.FLOWS_STEP === 1) || (row.FLOWS_TYPE === '2' && row.FLOWS_STEP === 0))
},
getQuery() {
if (this.$refs.multipleTable) {
this.$refs.multipleTable.clearSelection()
}
this.listQuery = {
page: 1,
limit: 10
}
this.getList()
},
goKeyReset() {
this.KEYWORDS = ''
this.STATUS = ''
this.getQuery()
},
getList() {
this.listLoading = true
requestFN(
'/xgf/user/getPassUserList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS: this.KEYWORDS,
STATUS: '2',
VALID_FLAG: '1',
CHECK_STATUS: '2',
STUDY_STATUS: '9'
}
).then((data) => {
this.listLoading = false
this.varList = data.list
this.total = data.page.totalResult
}).catch((e) => {
this.listLoading = false
})
},
updateList() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
handleShow(row) {
this.$refs.userInfos.init(row)
},
handleFlowShow(row) {
this.$refs.flowInfo.init(row)
},
handleFlowStepShow(row) {
this.$refs.flowStep.init(row)
},
approve(row) {
this.$refs.sendUtil.init(row)
},
entrust(row) {
this.$refs.entrust.init(row)
},
entrustByBatch() {
this.$refs.entrust.init(this.$refs.multipleTable.selection)
},
getUserInfo(row) {
this.$refs.userInfo.init(row)
},
repulse(row) {
this.$refs.repulse.init(row)
},
handleAdd() {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '未勾选培训人员...',
type: 'error'
})
return false
}
var users = []
_selectData.map(item => {
if (item.STATUS === 0) {
users.push(item.USER_ID)
}
})
if (users == null || users.length == 0) {
this.$message({
message: '勾选人员暂无法提交申请...',
type: 'error'
})
return false
}
this.$refs.apply.init(users)
},
hasButton() {
var keys = 'trainingbatch:add,trainingbatch:del,trainingbatch:edit,fhSms,email,fromExcel,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys, tm: new Date().getTime()
}
).then((data) => {
if (data.result == 'success') {
this.add = data.trainingbatchfhadminadd //
this.del = data.trainingbatchfhadmindel //
this.edit = data.trainingbatchfhadminedit //
this.fromExcel = data.fromExcel // excel
this.toExcel = data.toExcel // excel
} else if (data.result == 'exception') {
// showException('', data.exception)//
console.info('按钮权限:', data.exception)
}
})
.catch((e) => {
this.listLoading = false
})
},
getDict: function() {
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: 'd7d80f08d73a4accbccf4fd3d8d1d867' }
).then((data) => {
this.wenhuachengduList = data.list
}).catch((e) => {
this.listLoading = false
})
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: '09e36ac01e9540f8bc84eab1c1a78754' }
).then((data) => {
this.postList = data.list
}).catch((e) => {
this.listLoading = false
})
}
}
}
</script>

View File

@ -0,0 +1,199 @@
<template>
<div>
<el-dialog
v-loading="loading"
:visible.sync="visible"
:append-to-body="appendToBody"
:before-close="beforeClose"
title="审批"
width="1200px"
destroy-on-close>
<el-form ref="form" :model="form" :rules="rules" label-width="200px" label-position="right" type="flex">
<el-row>
<el-col :span="12">
<el-form-item prop="OPINION" label="打回原因:">
<el-input v-model="form.OPINION" :rows="2" type="textarea" placeholder="填写审批意见"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleClose"> </el-button>
<el-button type="primary" @click="sendMessage('1')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import vueQr from 'vue-qr'
import Treeselect from '@riophae/vue-treeselect'
import { requestFN } from '@/utils/request'
import uploadFile from '../../../util/uploadFile/index.vue'
export default {
components: { uploadFile, Treeselect, vueQr },
props: {
appendToBody: {
type: Boolean,
default: false
}
},
data() {
return {
visible: false,
loading: false,
form: {
STATUS: null,
APPOINT_CORP_ID: '',
APPOINT_CORP_NAME: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: null,
APPOINT_USER_NAME: '',
APPOINT_ANNEX: null,
OPINION: '',
STEP: false,
LIMIT_END_TIME: '',
user: '',
tm: new Date().getTime(),
list: [],
isShow: true,
info: {},
TYPE: null
},
rules: {
OPINION: [
{ required: true, message: '请填写打回原因', trigger: 'change' }
]
},
heirloom: {},
normalizer(node) {
return {
id: node.id,
label: node.name,
children: node.nodes
}
},
departmentTree: [],
peopleList: []
}
},
methods: {
async init(e) {
this.loading = true
this.visible = true
this.heirloom = JSON.stringify(e)
if (Array.isArray(e)) {
this.form.list = JSON.stringify(e)
} else {
this.form.list = JSON.stringify([e])
}
this.loading = false
},
sendMessage(e) {
this.$refs.form.validate((valid) => {
if (!valid) {
this.$message.error('请填写打回信息')
} else {
requestFN('/xgf/user/repulse', this.form)
.then((data) => {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
this.handleClose()
}).catch((e) => {
console.log(e)
})
}
})
},
getDepartmentTree() {
return new Promise(resolve => {
requestFN(
'/department/listTree',
{}
).then((data) => {
this.departmentTree = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
resolve(true)
}).catch((e) => {
})
})
},
getCorpDepartmentTree() {
return new Promise(resolve => {
requestFN(
'/openApi/corpDepartment/listTree',
{}
).then((data) => {
this.departmentTree = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
resolve(true)
}).catch((e) => {
})
})
},
getPeopleList(e) {
this.form.APPOINT_DEPARTMENT_NAME = e.name
requestFN(
'/user/listAll',
{
DEPARTMENT_ID: e.id
}
).then((data) => {
this.peopleList = data.userList
this.form.user = ''
}).catch((e) => {
console.log(e)
})
},
chooseUser(e) {
const entity = JSON.parse(e)
this.form.APPOINT_USER_ID = entity.USER_ID
this.form.APPOINT_USER_NAME = entity.NAME
},
handleClose() {
this.form = {
STATUS: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
OPINION: '',
user: '',
list: [],
tm: new Date().getTime()
}
this.visible = false
},
beforeClose() {
this.visible = false
this.form = {
STATUS: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
OPINION: '',
user: '',
list: [],
tm: new Date().getTime()
}
},
clearInfo() {
this.form.APPOINT_DEPARTMENT_ID = null
this.form.APPOINT_DEPARTMENT_NAME = ''
this.form.APPOINT_USER_ID = null
this.form.APPOINT_USER_NAME = ''
this.form.OPINION = ''
this.form.user = ''
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,21 @@
<template>
<component :is="activeName" />
</template>
<script>
import List from './components/list'
export default {
components: {
List: List
},
data() {
return {
activeName: 'List',
SUPERVISE_CORPINFO_ID: ''
}
}
}
</script>
<style scoped>
</style>