304 lines
10 KiB
Vue
304 lines
10 KiB
Vue
<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 :span="6">
|
|
<el-form-item label="培训状态">
|
|
<el-select v-model="STUDY_STATUS" placeholder="请选择培训状态" style="width: 100%;" clearable>
|
|
<el-option v-for="item in studyStatusList" :key="item.STUDY_STATUS" :label="item.STUDY_STATUS_NAME" :value="item.STUDY_STATUS"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item label="审核状态">
|
|
<el-select v-model="CHECK_STATUS" placeholder="请选择培训状态" style="width: 100%;" clearable>
|
|
<el-option v-for="item in checkStatusList" :key="item.CHECK_STATUS" :label="item.CHECK_STATUS_NAME" :value="item.CHECK_STATUS"/>
|
|
</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-col :span="6">
|
|
<el-form-item label="归属企业">
|
|
<el-select v-model="BELONG_TO_CORP" filterable placeholder="请选择" style="width: 100%" >
|
|
<el-option
|
|
v-for="item in companyList"
|
|
:key="item.BELONG_TO_CORP"
|
|
:label="item.BELONG_TO_CORP_NAME"
|
|
:value="item.BELONG_TO_CORP"/>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-table
|
|
ref="multipleTable"
|
|
:data="varList"
|
|
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
|
|
tooltip-effect="dark"
|
|
border
|
|
fit
|
|
highlight-current-row>
|
|
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" align="center"/>
|
|
<el-table-column type="index" label="序号" width="50" align="center"/>
|
|
<el-table-column prop="USERNAME" label="用户名" align="center"/>xgf/user
|
|
<el-table-column prop="NAME" label="姓名" align="center"/>
|
|
<el-table-column prop="BELONG_TO_CORP_NAME" label="外派公司名称" align="center"/>
|
|
<el-table-column prop="STUDY_STATUS_NAME" label="培训状态" align="center"/>
|
|
<el-table-column prop="CHECK_STATUS_NAME" label="审核状态" align="center"/>
|
|
<el-table-column prop="VALIDITY_PERIOD_START" label="培训有效期开始时间" align="center"/>
|
|
<el-table-column prop="VALIDITY_PERIOD_END" label="培训有效期结束时间" align="center"/>
|
|
<el-table-column label="操作" align="center" width="350">
|
|
<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="handleShowStep(row)">审批详情</el-button>
|
|
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleShowFlow(row)">审批流程</el-button>
|
|
<el-button v-if="row.power_flag === '1'" type="primary" icon="el-icon-s-claim" size="mini" @click="approve([row])">审批</el-button>
|
|
<el-button v-if="row.power_flag === '1' && row.FLOWS_STEP === 2" type="primary" icon="el-icon-s-claim" size="mini" @click="entrust([row])">委托制单单位审批</el-button>
|
|
<el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)">电子合格证</el-button>
|
|
</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>
|
|
</div>
|
|
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
|
|
</div>
|
|
<user ref="userInfo" append-to-body/>
|
|
<user-info ref="userInfos" append-to-body/>
|
|
<send-util ref="sendUtil" append-to-body @refresh="getList"/>
|
|
<entrust ref="entrust" append-to-body @refresh="getList"/>
|
|
<flow-step ref="step" append-to-body/>
|
|
<flow-info-list ref="flowInfoList" />
|
|
</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 apply from './apply'
|
|
import user from './user.vue'
|
|
import SendUtil from './sendUtil.vue'
|
|
import UserInfo from '../../flow_audit/userInfo.vue'
|
|
import Entrust from './entrust.vue'
|
|
import FlowStep from '../../flow/components/flowStep.vue'
|
|
import FlowInfoList from '../../flow/components/flowInfoList.vue'
|
|
|
|
export default {
|
|
components: { FlowInfoList, FlowStep, Entrust, UserInfo, SendUtil, Pagination, apply, vueQr, user },
|
|
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: 10
|
|
},
|
|
total: 0,
|
|
varList: [],
|
|
KEYWORDS: '',
|
|
STATUS: '',
|
|
add: false, // 新增按钮
|
|
del: false, // 删除按钮
|
|
edit: false, // 修改按钮
|
|
|
|
studyStatusList: [],
|
|
checkStatusList: [],
|
|
STUDY_STATUS: '',
|
|
CHECK_STATUS: '',
|
|
BELONG_TO_CORP: '',
|
|
companyList: []
|
|
}
|
|
},
|
|
created() {
|
|
this.getDict()
|
|
this.getList()
|
|
this.hasButton()
|
|
},
|
|
methods: {
|
|
handleSelectWithDifferentStatus(row, rowIndex) {
|
|
if (row.STATUS === 0) {
|
|
// 不禁用
|
|
return true
|
|
} else {
|
|
// 禁用
|
|
return false
|
|
}
|
|
},
|
|
getQuery() {
|
|
if (this.$refs.multipleTable) {
|
|
this.$refs.multipleTable.clearSelection()
|
|
}
|
|
this.listQuery = {
|
|
page: 1,
|
|
limit: 10
|
|
}
|
|
this.getList()
|
|
},
|
|
goKeyReset() {
|
|
this.KEYWORDS = ''
|
|
this.STATUS = ''
|
|
this.CHECK_STATUS = ''
|
|
this.BELONG_TO_CORP = ''
|
|
this.STUDY_STATUS = ''
|
|
this.getQuery()
|
|
},
|
|
getList() {
|
|
this.listLoading = true
|
|
requestFN(
|
|
'/xgf/user/getRecord?showCount=' + this.listQuery.limit + '¤tPage=' + this.listQuery.page,
|
|
{
|
|
KEYWORDS: this.KEYWORDS,
|
|
Step: '1',
|
|
CHECK_STATUS: this.CHECK_STATUS,
|
|
STUDY_STATUS: this.STUDY_STATUS,
|
|
BELONG_TO_CORP: this.BELONG_TO_CORP
|
|
}
|
|
).then((data) => {
|
|
this.listLoading = false
|
|
this.varList = data.list
|
|
this.total = data.page.totalResult
|
|
})
|
|
.catch((e) => {
|
|
this.listLoading = false
|
|
})
|
|
},
|
|
handleShow(row) {
|
|
this.$refs.userInfos.init(row)
|
|
},
|
|
handleShowStep(row) {
|
|
this.$refs.step.init(row)
|
|
},
|
|
handleShowFlow(row) {
|
|
this.$refs.flowInfoList.init(row)
|
|
},
|
|
approve(row) {
|
|
this.$refs.sendUtil.init(row)
|
|
},
|
|
entrust(row) {
|
|
this.$refs.entrust.init(row)
|
|
},
|
|
getUserInfo(row) {
|
|
this.$refs.userInfo.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
|
|
})
|
|
|
|
requestFN('/xgf/user/translate').then((data) => {
|
|
this.studyStatusList = data.studyStatusList
|
|
this.checkStatusList = data.checkStatusList
|
|
}).catch((e) => {
|
|
this.listLoading = false
|
|
})
|
|
|
|
requestFN(
|
|
'/xgf/user/getAllCorpInfo', {}
|
|
).then((data) => {
|
|
this.companyList = data.list
|
|
}).catch((e) => {
|
|
this.loading = false
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|