Compare commits
12 Commits
main
...
dev-2024年1月8日
Author | SHA1 | Date |
---|---|---|
liujun | 4be34ded89 | |
liujun | c5919657e5 | |
liujun | 0ffdfd2149 | |
liujun | d7d5fd6fa9 | |
liujun | d74cb3930d | |
liujun | be9d06d481 | |
liujun | 426a7648c9 | |
liujun | efd87d7ac5 | |
liujun | e105f75dc0 | |
liujun | a567d36025 | |
liujun | 64935b4b54 | |
liujun | ff31836619 |
12
src/main.js
12
src/main.js
|
@ -54,6 +54,18 @@ Vue.config.productionTip = false
|
||||||
Vue.use(Element, {
|
Vue.use(Element, {
|
||||||
size: Cookies.get('size') || 'small' // set element-ui default size
|
size: Cookies.get('size') || 'small' // set element-ui default size
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// 树数据结构去除空子级
|
||||||
|
Vue.prototype.removeEmptyChildren = function(data) {
|
||||||
|
for (let i = 0; i < data.length; i++) {
|
||||||
|
if (data[i].nodes && data[i].nodes.length > 0) {
|
||||||
|
this.removeEmptyChildren(data[i].nodes)
|
||||||
|
} else {
|
||||||
|
delete data[i].nodes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
}
|
||||||
/* eslint-disable no-new */
|
/* eslint-disable no-new */
|
||||||
new Vue({
|
new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|
|
@ -118,12 +118,7 @@
|
||||||
<span v-if="row.USER_ID != userId">
|
<span v-if="row.USER_ID != userId">
|
||||||
<el-tag v-if="row.STATUS == 1" type="warning">培训中</el-tag>
|
<el-tag v-if="row.STATUS == 1" type="warning">培训中</el-tag>
|
||||||
<el-tag v-if="row.STATUS == 0" type="info">未培训</el-tag>
|
<el-tag v-if="row.STATUS == 0" type="info">未培训</el-tag>
|
||||||
<el-tag v-if="row.STATUS == 2" type="success">
|
<el-tag v-if="row.STATUS == 2" type="success">已培训</el-tag>
|
||||||
<template v-if="row.TRAIN_STATUS == '1'">
|
|
||||||
已培训(合格)
|
|
||||||
</template>
|
|
||||||
<template v-else>已培训(不合格)</template>
|
|
||||||
</el-tag>
|
|
||||||
<el-tag v-if="row.STATUS == 9">申请中</el-tag>
|
<el-tag v-if="row.STATUS == 9">申请中</el-tag>
|
||||||
</span>
|
</span>
|
||||||
<span v-else />
|
<span v-else />
|
||||||
|
|
|
@ -877,6 +877,7 @@ export default {
|
||||||
this.dataForm.businessLicenseDate = []
|
this.dataForm.businessLicenseDate = []
|
||||||
this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_START)
|
this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_START)
|
||||||
this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_END)
|
this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_END)
|
||||||
|
this.dataForm.USER_NAME = this.dataForm.USER_NAME ? this.dataForm.USER_NAME : this.dataForm.USER_NAME_B
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
// 将对象中的 选取形式 转为数组以多选形式展现 2023-08-31 转换开始
|
// 将对象中的 选取形式 转为数组以多选形式展现 2023-08-31 转换开始
|
||||||
if (this.dataForm.SELECT_FORM) {
|
if (this.dataForm.SELECT_FORM) {
|
||||||
|
|
|
@ -16,11 +16,6 @@
|
||||||
@node-click="handleNodeClick"/>
|
@node-click="handleNodeClick"/>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
<el-main>
|
<el-main>
|
||||||
<!-- <div class="filter-btn-group">
|
|
||||||
<div>
|
|
||||||
<el-button @click="showGraph()">结构图</el-button>
|
|
||||||
</div>
|
|
||||||
</div>-->
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
|
@ -83,23 +78,6 @@
|
||||||
<el-form-item label="部门职能">
|
<el-form-item label="部门职能">
|
||||||
<el-input :rows="3" v-model="form.FUNCTIONS" type="textarea" placeholder="这里输入部门职能..." />
|
<el-input :rows="3" v-model="form.FUNCTIONS" type="textarea" placeholder="这里输入部门职能..." />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="是否监管部门">
|
|
||||||
<el-radio-group v-model="form.IS_REGULATORY" @change="changeIssup">
|
|
||||||
<el-radio :label="'1'">是</el-radio>
|
|
||||||
<el-radio :label="'0'">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>-->
|
|
||||||
<!-- <el-form-item v-show="form.IS_REGULATORY=='1'" label="监管部门" prop="MAIN_DEPARTMENT" class="is-required">
|
|
||||||
<SelectTree
|
|
||||||
ref="deptTree"
|
|
||||||
:clearable="false"
|
|
||||||
:options="treeData"
|
|
||||||
:props="defaultProps"
|
|
||||||
v-model="form.MAIN_DEPARTMENT"
|
|
||||||
placeholder="请选择监管部门"
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</el-form-item>-->
|
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input :rows="3" v-model="form.BZ" type="textarea" placeholder="这里输入备注..." />
|
<el-input :rows="3" v-model="form.BZ" type="textarea" placeholder="这里输入备注..." />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -386,6 +364,7 @@ export default {
|
||||||
}
|
}
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
this.form = Object.assign({}, data.pd) // copy obj
|
this.form = Object.assign({}, data.pd) // copy obj
|
||||||
|
this.form.DEPT_SORT = Number(this.form.DEPT_SORT)
|
||||||
this.pds = data.pds || [] // 父级部门信息
|
this.pds = data.pds || [] // 父级部门信息
|
||||||
|
|
||||||
this.dialogFormAdd = true
|
this.dialogFormAdd = true
|
||||||
|
|
|
@ -45,12 +45,10 @@
|
||||||
<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="DEPARTMENT_NAME" label="部门" align="center"/>
|
||||||
<el-table-column prop="EMPLOYER_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="100">
|
||||||
<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 v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)">电子合格证</el-button>
|
||||||
<el-button v-if="false" type="success" icon="el-icon-edit" size="mini" @click="getUserInfo(row)">电子合格证
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
|
@ -5,18 +5,47 @@
|
||||||
:append-to-body="appendToBody"
|
:append-to-body="appendToBody"
|
||||||
:before-close="beforeClose"
|
:before-close="beforeClose"
|
||||||
title="推送"
|
title="推送"
|
||||||
width="500px"
|
width="1100px"
|
||||||
destroy-on-close>
|
destroy-on-close>
|
||||||
<el-form label-position="right" label-width="100px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="200px" label-position="right" type="flex">
|
||||||
<el-form-item prop="TERRITORIALITY" label="集团单位 ">
|
<el-row>
|
||||||
<el-select v-model="corp_id" placeholder="请选择集团单位 " style="width: 90%" @change="getInfo">
|
<el-col :span="12">
|
||||||
<el-option
|
<el-form-item prop="APPOINT_CORP_ID" label="单位 ">
|
||||||
v-for="item in jituanDanweiTreeData"
|
<el-select v-model="corp_id" filterable placeholder="请选择单位 " style="width: 300px" @change="getInfo">
|
||||||
:key="item.CORPINFO_ID"
|
<el-option
|
||||||
:label="item.CORP_NAME"
|
v-for="item in jituanDanweiTreeData"
|
||||||
:value="JSON.stringify(item)"/>
|
:key="item.CORPINFO_ID"
|
||||||
</el-select>
|
:label="item.CORP_NAME"
|
||||||
</el-form-item>
|
:value="JSON.stringify(item)"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="APPOINT_DEPARTMENT_ID" label="指定部门:">
|
||||||
|
<Treeselect
|
||||||
|
:options="departmentTree"
|
||||||
|
:normalizer="normalizer"
|
||||||
|
v-model="form.APPOINT_DEPARTMENT_ID"
|
||||||
|
placeholder="请选择部门"
|
||||||
|
no-options-text="暂无数据"
|
||||||
|
no-children-text="暂无数据"
|
||||||
|
style="width: 300px"
|
||||||
|
@select="getPeopleList($event)"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item prop="APPOINT_USER_ID" label="指定审批人:">
|
||||||
|
<el-select v-model="form.user" style="width: 300px" placeholder="请选择" @change="chooseUser">
|
||||||
|
<el-option v-for="item in peopleList" :key="item.USER_ID" :value="JSON.stringify(item)" :label="item.NAME"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
</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>
|
||||||
|
@ -48,7 +77,39 @@ export default {
|
||||||
corp_id: null,
|
corp_id: null,
|
||||||
corp_name: '',
|
corp_name: '',
|
||||||
heirloom: {},
|
heirloom: {},
|
||||||
listFlag: false
|
listFlag: false,
|
||||||
|
departmentTree: [],
|
||||||
|
peopleList: [],
|
||||||
|
normalizer(node) {
|
||||||
|
return {
|
||||||
|
id: node.id,
|
||||||
|
label: node.name,
|
||||||
|
children: node.nodes
|
||||||
|
}
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
STATUS: null,
|
||||||
|
APPOINT_CORP_ID: '',
|
||||||
|
APPOINT_CORP_NAME: '',
|
||||||
|
APPOINT_DEPARTMENT_ID: null,
|
||||||
|
APPOINT_DEPARTMENT_NAME: '',
|
||||||
|
APPOINT_USER_ID: '',
|
||||||
|
APPOINT_USER_NAME: '',
|
||||||
|
user: '',
|
||||||
|
tm: new Date().getTime(),
|
||||||
|
list: []
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
APPOINT_DEPARTMENT_ID: [
|
||||||
|
{ required: true, message: '请选择指定部门', trigger: 'change' }
|
||||||
|
],
|
||||||
|
APPOINT_USER_ID: [
|
||||||
|
{ required: true, message: '请选择指定审批人', trigger: 'change' }
|
||||||
|
],
|
||||||
|
APPOINT_CORP_ID: [
|
||||||
|
{ required: true, message: '请选择企业', trigger: 'change' }
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -80,32 +141,83 @@ export default {
|
||||||
},
|
},
|
||||||
getInfo(e) {
|
getInfo(e) {
|
||||||
const info = JSON.parse(e)
|
const info = JSON.parse(e)
|
||||||
this.corp_name = info.CORP_NAME
|
this.form.APPOINT_CORP_ID = info.CORPINFO_ID
|
||||||
|
this.form.APPOINT_CORP_NAME = info.CORP_NAME
|
||||||
|
this.form.APPOINT_DEPARTMENT_ID = null
|
||||||
|
this.form.APPOINT_DEPARTMENT_NAME = ''
|
||||||
|
this.form.APPOINT_USER_ID = ''
|
||||||
|
this.form.APPOINT_USER_NAME = ''
|
||||||
|
this.form.user = ''
|
||||||
|
this.getDepartmentTree()
|
||||||
},
|
},
|
||||||
beforeClose() {
|
beforeClose() {
|
||||||
this.corp_id = null
|
this.corp_id = null
|
||||||
this.visible = false
|
this.visible = false
|
||||||
|
this.form = {
|
||||||
|
STATUS: null,
|
||||||
|
APPOINT_CORP_ID: '',
|
||||||
|
APPOINT_CORP_NAME: '',
|
||||||
|
APPOINT_DEPARTMENT_ID: null,
|
||||||
|
APPOINT_DEPARTMENT_NAME: '',
|
||||||
|
APPOINT_USER_ID: '',
|
||||||
|
APPOINT_USER_NAME: '',
|
||||||
|
user: '',
|
||||||
|
tm: new Date().getTime(),
|
||||||
|
list: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
sendMessage() {
|
sendMessage() {
|
||||||
const corp_id = JSON.parse(this.corp_id).CORPINFO_ID
|
this.$refs.form.validate((valid) => {
|
||||||
requestFN(
|
if (!valid) {
|
||||||
'/trainingbatch/sendMessage',
|
this.$message.error('请填写完整信息')
|
||||||
{
|
|
||||||
list: this.heirloom,
|
|
||||||
corp_id: corp_id,
|
|
||||||
corp_name: this.corp_name,
|
|
||||||
tm: new Date().getTime()
|
|
||||||
}
|
|
||||||
).then((data) => {
|
|
||||||
if (data.code !== '0') {
|
|
||||||
this.$message.error(data.msg)
|
|
||||||
} else {
|
} else {
|
||||||
this.$message.success('推送成功')
|
this.form.list = this.heirloom
|
||||||
this.visible = false
|
requestFN('/trainingbatch/sendMessage', this.form
|
||||||
this.$emit('refresh', '')
|
).then((data) => {
|
||||||
|
if (data.code !== '0') {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
} else {
|
||||||
|
this.$message.success('推送成功')
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refresh', '')
|
||||||
|
this.beforeClose()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getDepartmentTree() {
|
||||||
|
requestFN(
|
||||||
|
'/companyApi/department/listTree',
|
||||||
|
{ CORPINFO_ID: this.form.APPOINT_CORP_ID }
|
||||||
|
).then((data) => {
|
||||||
|
this.departmentTree = this.removeEmptyChildren(JSON.parse(data.zTreeNodes))
|
||||||
|
}).catch((e) => {
|
||||||
|
console.log(e)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPeopleList(e) {
|
||||||
|
this.form.APPOINT_DEPARTMENT_NAME = e.name
|
||||||
|
requestFN(
|
||||||
|
'/companyApi/user/listAll',
|
||||||
|
{
|
||||||
|
DEPARTMENT_ID: e.id
|
||||||
|
}
|
||||||
|
).then((data) => {
|
||||||
|
this.form.APPOINT_USER_ID = ''
|
||||||
|
this.form.APPOINT_USER_NAME = ''
|
||||||
|
this.form.user = ''
|
||||||
|
this.peopleList = data.userList
|
||||||
|
}).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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue