Merge remote-tracking branch 'origin/dev' into dev

hyx_2024-9-29_tongbu
water_xu 2024-09-13 18:43:51 +08:00
commit c427a58f28
36 changed files with 14435 additions and 28301 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -63,7 +63,11 @@
<el-table-column prop="CLASS_NAME" width="300px" label="班级名称" />
<el-table-column prop="TRAINING_TYPE_NAME" width="200px" label="培训类型" />
<el-table-column prop="OPENING_TIME" label="开班时间" />
<el-table-column prop="PLACE_NAME" width="200px" label="培训地点" />
<el-table-column prop="PLACE" width="200px" label="培训地点">
<template slot-scope="{row}">
{{ row.PLACE_NAME ? row.PLACE_NAME : row.PLACE }}
</template>
</el-table-column>
<el-table-column prop="CLASS_SIZE" label="班级容量" />
<el-table-column prop="TRAINEES_NUM" label="培训人员数量" />
<el-table-column prop="CLASS_STATUS" label="班级状态">

View File

@ -0,0 +1,757 @@
<template>
<div>
<div style="padding:10px 20px 20px 20px">
<div class="title_super">
<div>{{ this.$parent.USER_ID == '' ? '新增用户' : '查看用户' }}</div>
</div>
<el-form ref="form" :rules="rules" :model="form" label-width="140px">
<el-row :gutter="20">
<el-col :span="12">
<div class="left_super">
<el-form-item label="用户名" prop="USERNAME">
<el-input v-model="form.USERNAME" placeholder="默认用户手机号码..."/>
</el-form-item>
<el-form-item label="姓名" prop="NAME">
<el-input v-model="form.NAME" placeholder="这里输入姓名..."/>
</el-form-item>
<el-form-item label="邮箱" prop="EMAIL">
<el-input v-model="form.EMAIL" placeholder=""/>
</el-form-item>
<el-form-item label="部门" prop="ORG_PATH">
<el-input v-model="form.ORG_PATH" placeholder=""/>
</el-form-item>
<el-form-item label="身份证号" prop="CARD_NO">
<el-input v-model="form.CARD_NO" placeholder=""/>
</el-form-item>
<el-form-item label="民族" prop="NATION">
<el-input v-model="form.NATION" placeholder=""/>
</el-form-item>
<el-form-item label="性别" prop="SEX">
<el-input v-model="form.SEX" placeholder=""/>
</el-form-item>
</div>
</el-col>
<el-col :span="12">
<div class="left_border_super">
<template v-if="form.ISSTUDENT">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="民族" prop="NATION">
<el-select v-model="form.NATION_NAME" placeholder="请选择">
<el-option
v-for="item in uesrInfoDic.minzuList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="政治面貌" prop="POLITICAL_OUTLOOK">
<el-select v-model="form.POLITICAL_OUTLOOK_NAME" placeholder="请选择">
<el-option
v-for="item in uesrInfoDic.zhengzhimianmaoList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="出生年月" prop="DATE_OF_BIRTH">
<el-date-picker
v-model="form.DATE_OF_BIRTH"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="文化程度" prop="DEGREE_OF_EDUCATION">
<el-select v-model="form.DEGREE_OF_EDUCATION_NAME" placeholder="请选择">
<el-option
v-for="item in uesrInfoDic.wenhuachengduList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="人员类型" prop="PERSONNEL_TYPE">
<el-select v-model="form.PERSONNEL_TYPE_NAME" placeholder="请选择">
<el-option
v-for="item in uesrInfoDic.renyuanleixingList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="职务" prop="DUTIES">
<div class="uo-flex">
<el-select
v-if="form.letDutiesType =='select'"
id="leaPostSel"
v-model="form.DUTIESNAME"
placeholder="请选择"
class="filter-item"
@change="forceUpdate">
<el-option
v-for="(item,index) in uesrInfoDic.zhiwuList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID">
<span style="float: left">{{ item.NAME }}</span>
<div style="float: right;" @click.stop="removeDuties(index,'POSITION')"><i
class="el-icon-circle-close"/></div>
</el-option>
</el-select>
<el-input
v-if="form.letDutiesType =='value'"
id="leaPostVal"
:disabled="form.letDutiesType =='select'"
v-model="form.DUTIESValue"
placeholder="这里输入新的职务名称..."/>
<el-button
class="ml5"
@click="form.letDutiesType = (form.letDutiesType =='select') ? 'value' : 'select'">
{{ form.letDutiesType === 'select' ? '输入' : '选择' }}
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="职称" prop="TITLE">
<div class="uo-flex">
<el-select
v-if="form.letTitleType =='select'"
id="letTitleSel"
v-model="form.TITLE_NAME"
placeholder="请选择"
class="filter-item"
@change="forceUpdate">
<el-option
v-for="(item,index) in uesrInfoDic.zhichengList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID">
<span style="float: left">{{ item.NAME }}</span>
<div style="float: right;" @click.stop="removeDuties(index,'JOB_TITLE')"><i
class="el-icon-circle-close"/></div>
</el-option>
</el-select>
<el-input
v-show="form.letTitleType =='value'"
id="letTitleVal"
v-model="form.letTitleValue"
placeholder="这里输入新的职称名称..."/>
<el-button
class="ml5"
@click="form.letTitleType = (form.letTitleType =='select') ? 'value' : 'select'">
{{ form.letTitleType === 'select' ? '输入' : '选择' }}
</el-button>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="工种" prop="TYPE_OF_WORK">
<div class="uo-flex">
<el-select
v-if="form.letTypeOfWorkType =='select'"
id="letTypeOfWorkSel"
v-model="form.TYPE_OF_WORKNAME"
placeholder="请选择"
class="filter-item"
@change="forceUpdate">
<el-option
v-for="(item,index) in uesrInfoDic.gongzhongList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID">
<span style="float: left">{{ item.NAME }}</span>
<div style="float: right;" @click.stop="removeDuties(index,'WORK_TYPE')"><i
class="el-icon-circle-close"/></div>
</el-option>
</el-select>
<el-input
v-show="form.letTypeOfWorkType =='value'"
id="letTypeOfWorkVal"
v-model="form.letTypeOfWorkValue"
placeholder="这里输入新的工种名称..."/>
<el-button
class="ml5"
@click="form.letTypeOfWorkType = (form.letTypeOfWorkType =='select') ? 'value' : 'select'">
{{ form.letTypeOfWorkType === 'select' ? '输入' : '选择' }}
</el-button>
</div>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入职日期" prop="ENTRY_DATE">
<el-date-picker
v-model="form.ENTRY_DATE"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="参加工作日期" prop="WORKING_DATE">
<el-date-picker
v-model="form.WORKING_DATE"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="在职情况" prop="INCUMBENCY">
<el-select v-model="form.INCUMBENCY_NAME" placeholder="请选择">
<el-option
v-for="item in uesrInfoDic.zaizhiqingkuangList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item v-if="form.userCerList.length > 0" label="已上传证书">
<div class="slideshow">
<div class="disContent">
<div v-for="(item, index) in form.userCerList" :key="index" class="img-div">
<img :src="config.fileUrl + item.FILEPATH" alt="">
<div class="disContent-hide">
<el-tooltip class="item" effect="dark" content="预览" placement="top">
<span class="el-icon-zoom-in yuLan">
<viewer :images="form.userCerLis">
<img :src="config.fileUrl + item.FILEPATH" alt="" class="yuLanImg">
</viewer>
</span>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<span class="Delete" @click="deleteCertificate(index)"><i class="el-icon-delete"/></span>
</el-tooltip>
</div>
</div>
</div>
</div>
</el-form-item>
</template>
</div>
</el-col>
</el-row>
</el-form>
</div>
<div class="ui-height"/>
<div class="ui-foot">
<!-- <el-button type="success" @click="confirm"> </el-button>-->
<el-button plain type="info" @click="goBack"> </el-button>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
export default {
components: { Pagination, SelectTree },
directives: { waves },
data() {
// eslint-disable-next-line no-unused-vars
var hasUser = (rule, value, callback) => {
requestFN(
'/user/hasUser',
{
USERNAME: value,
VERIFYUSER_ID: this.form.USER_ID
}
).then((data) => {
if (data.result == 'success') {
if (data.pd.USER_ID) {
callback(new Error('用户名重复'))
}
callback()
}
}).catch((e) => {
callback()
})
}
var hasEmail = (rule, value, callback) => {
if (value) {
requestFN(
'/user/hasEmail',
{
EMAIL: value,
USERNAME: this.form.USERNAME
}
).then((data) => {
if (data.result == 'success') {
callback()
} else {
callback(new Error('邮箱重复'))
}
}).catch((e) => {
})
} else {
callback()
}
}
return {
dayTime: [],
LevelsData: [],
dialogFormEditDate: false,
dialogFormLicenseInformation: false,
listLoading: true,
treeLoading: false,
add: false,
del: false,
edit: false,
KEYWORDS: '',
SHIFTDUTYONE: '',
SHIFTDUTYTWO: '',
selectPeriod: [],
tzzyry: '',
periodList: [],
DEPARTMENT_ID: '',
varList: [],
multipleSelectionAll: [], //
multipleSelection: [], //
dialogFormEdit: false,
dialogType: 'saveUser',
disabledLCSelect: false,
displayLCSelect: 'display: block',
disabledLCInput: true,
displayLCInput: 'display: none',
LearnerCategoryList: [],
certificatenamearr: [
{ value: '主要负责人证', label: '主要负责人证' },
{ value: '安全管理人员证', label: '安全管理人员证' },
{ value: '特种作业人员证', label: '特种作业人员证' }
], rules: {
NAME: [{ required: true, message: '姓名不能为空', trigger: 'blur' }]
}, defaultProps: {
value: 'id',
children: 'odes',
label: 'name'
},
treeData: [],
form: {
CORPINFO_NAME: "",
CARD_NO: null,
OPERATTIME: "",
ISDELETE: "",
DEPARTMENT_NAME: "",
ORG_PATH: "",
DEPARTMENT_ID: "",
CARD_TYPE_NAME: "",
SEX: "",
USER_ID: "",
CARD_TYPE: "",
CORPINFO_ID: "",
EMAIL: "",
NAME: "",
NATION: "",
OPERATOR: "",
USER_TYPE: "",
CREATOR: "",
USERNAME: "",
CREATTIME: ""
},
uesrInfoDic: {
minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd
zhengzhimianmaoList: [], // 6351efdd12dc4730952e5d195718e252
wenhuachengduList: [], // d7d80f08d73a4accbccf4fd3d8d1d867
renyuanleixingList: [], // 0b62f92b0b624aab8e89a77304a64d5e
zhiwuList: [], // 09e36ac01e9540f8bc84eab1c1a78754
gongzhongList: [], // 55484e491a5e442d839c4595380713ec
zaizhiqingkuangList: [], // 548764b5d4bf4bd7a18ef88274ef49e4
xingbieList: [], // 21501808bbc344d593fbf9ccfe6c4531
zhichengList: []// 945a6b10e59946078b500f0fbafa8679
},
certificate_files: [],
config: config,
dialogImageUrl: [],
dialogVisible: false,
SchedulingFrom: false,
roleList: [],
roleList1: [],
roleList_z: [],
role1List: [],
postList: [],
oldPostId: '', // ID
oldDepartId: '', // ID
dialogFormDaoru: false,
daoruFrom: {
FFILE: '',
FFILEName: ''
},
PARENTID: '0',
shiftDutyListOne: [],
shiftDutyListTwo: [],
queryShiftOneList: [],
queryShiftTwoList: [],
datePage: 0,
workDateList: [],
USER_ID: ''
}
},
created() {
this.handleEdit(this.$parent.USER_ID)
},
methods: {
goBack() {
this.$parent.activeName = 'IndexView'
},
handleEdit(USER_ID) {
this.shiftDutyListTwo = []
this.periodList = []
this.USER_ID = ''
this.dialogType = 'editUser'
requestFN(
'/core/corpinfo/getCorpUser',
{
USER_ID: USER_ID
}
).then((data) => {
this.form = data.varList[0]
}).catch((e) => {
this.listLoading = false
})
},
confirm() {
// debugger
// this.uploadImgByZhengshu(this.form.USER_ID) //
this.$refs.form.validate(valid => {
if (this.form.SHIFTDUTYONE) {
// var
if (!this.form.SHIFTDUTYTWO || this.selectPeriod.DURATION == undefined) {
this.$message({
message: '请选择完整的排班类型',
type: 'error'
})
return false
}
}
// if (this.form.USERAVATARURL == '') {
// this.$message({
// message: '',
// type: 'warning'
// })
// return false
// }
if (valid) {
console.log(this.selectPeriod.WORKSTATUS)
console.log(this.form.WORKSTATUS)
this.form.WORKSTATUS = this.selectPeriod.WORKSTATUS
this.form.DURATION = this.selectPeriod.DURATION
this.form.WORKPERIOD = this.selectPeriod.WORKPERIOD
if (this.dialogType == 'saveUser') {
this.form.ROLE_ID = this.form.ROLE_ID.join(',')
this.listLoading = true
requestFN(
'/user/' + this.dialogType,
this.form
).then((data) => {
this.listLoading = false
if (this.form.ISSTUDENT) {
this.uploadImgByZhengshu(data.USER_ID)
} else {
this.$message({
message: '操作成功',
type: 'success'
})
this.$parent.activeName = 'List'
}
}).catch((e) => {
this.listLoading = false
this.form.ROLE_ID = ''
this.form.USERNAME = ''
})
} else {
if (this.oldDepartId != this.form.DEPARTMENT_ID || this.oldPostId != this.form.POST_ID) {
this.$confirm('如变更了部门或岗位,保存后将删除该用户所有清单,是否确定?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.form.ROLE_ID = this.form.ROLE_ID.join(',')
this.listLoading = true
requestFN(
'/user/' + this.dialogType,
this.form
).then((data) => {
this.listLoading = false
if (this.form.ISSTUDENT) {
this.uploadImgByZhengshu(this.form.USER_ID)
} else {
this.$message({
message: '操作成功',
type: 'success'
})
this.$parent.activeName = 'List'
}
}).catch((e) => {
this.listLoading = false
})
})
} else {
this.form.ROLE_ID = this.form.ROLE_ID.join(',')
this.listLoading = true
requestFN(
'/user/' + this.dialogType,
this.form
).then((data) => {
this.listLoading = false
if (this.form.ISSTUDENT) {
this.uploadImgByZhengshu(this.form.USER_ID)
} else {
this.$message({
message: '操作成功',
type: 'success'
})
this.$parent.activeName = 'List'
}
}).catch((e) => {
this.listLoading = false
})
}
}
} else {
return false
}
})
},
}
}
</script>
<style lang="scss" scoped>
.el-dialog__body {
padding: 0;
background: red;
}
.mark_up {
margin-bottom: 20px;
margin-left: 110px;
}
.icons-container {
margin: 0;
overflow: hidden;
.grid {
position: relative;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}
.icon-item {
margin-bottom: 10px;
height: 70px;
text-align: center;
width: 100px;
float: left;
font-size: 24px;
color: #24292e;
cursor: pointer;
span {
display: block;
font-size: 14px;
margin-top: 10px;
}
}
.disabled {
pointer-events: none;
}
}
.filter-btn-group {
position: relative;
}
.filter-flot {
position: absolute;
right: 0;
top: 0;
}
.uploader {
width: 570px;
display: flex;
align-items: center;
}
.el-form-item__content {
line-height: 1;
}
.uo-flex {
display: flex;
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
border: 1px dashed #c0ccda;
font-size: 28px;
color: #8c939d;
width: 110px;
height: 110px;
line-height: 110px;
border-radius: 6px;
text-align: center;
background-color: #fbfdff;
}
.avatar-uploader-icon:hover,
.avatar-uploader-icon:focus {
border-color: #1890ff;
color: #1890ff;
}
.avatar {
width: 110px;
height: 110px;
display: block;
border: 1px dashed #c0ccda;
}
</style>
<style lang="sass" scoped>
.el-row
margin-bottom: 16px
&:last-child
margin-bottom: 0
.form-group
display: flex
align-items: center
margin-right: 20px
.form-label
padding: 9px 15px
font-size: 14px
width: 240px
font-weight: 400
line-height: 20px
text-align: right
margin-bottom: 0
.star
color: red
padding-right: 4px
.input-block
flex: 1
min-height: 36px
position: relative
.disContent
padding: 0 20px
display: flex
align-items: center
flex-wrap: wrap
.img-div
position: relative
margin: auto 10px 10px 10px
width: 120px
height: 120px
border-radius: 4px
& > img
width: 100%
height: 100%
.disContent-hide
position: absolute
width: 100%
height: 100%
border-radius: 4px
background-color: rgba(48, 48, 48, 0.59)
display: none
top: 0
left: 0
.Delete
position: absolute
bottom: 14px
right: 10px
font-size: 16px
color: white
cursor: pointer
.editCss
.Delete
font-size: 16px
right: 90px
.yuLan
position: absolute
bottom: 23px
right: 50px
font-size: 16px
color: white
cursor: pointer
.yuLanImg
position: absolute
bottom: 0
right: 0
width: 100%
height: 100%
opacity: 0
.img-div:hover .disContent-hide
display: block
.pitchCss
border: 1px solid #202e78
transition: all linear 0.1s
width: 116px
height: 116px
</style>

View File

@ -0,0 +1,280 @@
<template>
<div class="app-container">
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CORP_NAME" label="分公司名称" />
<el-table-column label="操作" align="left" width="110">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row.CORPINFO_ID)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
</div>
<!-- <pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> -->
</div>
<el-dialog :visible.sync="dialogFormEdit" title="查看公司组织架构" width="600px">
<el-tree :data="treeData" :props="defaultProps"/>
</el-dialog>
</div>
</template>
<script>
import SelectTree from '@/components/SelectTree'
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination, SelectTree },
directives: { waves },
data() {
return {
listLoading: true,
add: true,
del: true,
edit: true,
listQuery: {
page: 1,
limit: 20
},
searchForm: {
CORP_NAME: '',
PROVINCE: '',
CITY: '',
CORP_STATE: '',
CREATTIME: ''
},
total: 0,
varList: [],
qyztList: [],
options: [{
value: '0',
label: '启用'
}, {
value: '1',
label: '禁用'
}],
STATE: [],
industryList: [],
countryList: [],
villageList: [],
treeData: [],
CITY_CODE: '',
COUNTRY: '',
VILLAGE: '',
config: config,
dialogFormEdit: false,
rules: {
CORP_NAME: [{ required: true, message: '分公司名称不能为空', trigger: 'blur' }],
NEWCORP_NAME: [{ required: true, message: '新分公司名称不能为空', trigger: 'blur' }],
PASSWORD: [{ required: true, message: '分公司密码不能为空', trigger: 'blur' }]
},
updateBranchNameForm: {
CORPINFO_ID: '',
CORP_NAME: '',
NEWCORP_NAME: '',
PASSWORD: ''
},
defaultProps: {
children: 'nodes',
label: 'name'
}
}
},
created() {
this.getList()
// this.getDicList('qyztList', '07c2674470c1498ba1ebd74906b3b518')
// this.getDicList('industryList', 'f2598ba72e864eadabf0ca4b664d26b9')
},
methods: {
getRowKey(row) {
return row.CORPINFO_ID
},
//
getQuery() {
this.getList()
},
//
getList() {
this.listLoading = true
requestFN(
'/core/corpinfo/listRetrieval'
).then((data) => {
this.listLoading = false
this.varList = data.varList
// this.getCountryList()
}).catch((e) => {
this.listLoading = false
})
},
getCountryList() {
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID: this.CITY_CODE
}
).then((data) => {
this.countryList = data.list
}).catch((e) => {
})
},
getVillageList(value, id) {
this.COUNTRY = value
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID: id
}
).then((data) => {
this.villageList = data.list
}).catch((e) => {
})
},
changeVillage(village) {
this.VILLAGE = village
},
//
handleEdit(ID) {
this.$parent.activeName = 'IndexView'
this.$parent.indexVal = ID
},
enableORDisable(ISUSE, CORPINFO_ID) {
this.$confirm(ISUSE === '0' ? '确定要启用该账户吗?' : '确定要禁用该账户吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/corpinfo/editisuse',
{
CORPINFO_ID,
ISUSE
}
).then(() => {
this.$message({
message: ISUSE === '0' ? '启用成功' : '禁用成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {})
},
//
hasButton: function() {
var keys = 'corpinfo:add,corpinfo:del,corpinfo:edit,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys
}
).then((data) => {
this.add = data.corpinfofhadminadd //
this.del = data.corpinfofhadmindel //
this.edit = data.corpinfofhadminedit //
}).catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.searchForm = {
CORP_NAME: '',
PROVINCE: '',
CITY: '',
CORP_STATE: '',
CREATTIME: ''
}
this.getList()
},
resetPwd(id) {
this.$confirm('确定要重置选中的密码吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/corpinfo/resetPwd',
{
CORPINFO_ID: id
}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
//
getDicList(list, DICTIONARIES_ID) {
requestFN(
'/dictionaries/getLevels',
{
DICTIONARIES_ID
}
).then((data) => {
this[list] = data.list
}).catch((e) => {
})
},
translate(list, id) {
for (let i = 0; i < list.length; i++) {
if (list[i].BIANMA === id || list[i].DICTIONARIES_ID === id) {
return list[i].NAME
}
}
},
showBranchName(CORPINFO_ID, CORP_NAME) {
this.$refs.form && this.$refs.form.resetFields()
this.dialogFormEdit = true
this.updateBranchNameForm.CORPINFO_ID = CORPINFO_ID
this.updateBranchNameForm.CORP_NAME = CORP_NAME
},
updateBranchName(ID) {
requestFN(
'/department/listTreeCorpInfo',
{
CORPINFO_ID: ID
}
).then((data) => {
this.treeData = JSON.parse(data.varList)
}).catch((e) => {
})
}
}
}
</script>

View File

@ -0,0 +1,281 @@
<template>
<div class="icons-container">
<el-container>
<el-aside width="200px" style="background-color:#fff">
<div class="filter-btn-group">
<!-- <el-input-->
<!-- v-model="filterText"-->
<!-- placeholder="输入关键字进行过滤"-->
<!-- style="margin:10px 0"/>-->
<el-tree
v-loading="treeLoading"
ref="tree"
:data="treeData"
:props="defaultProps"
:filter-node-method="filterNode"
class="filter-tree"
@node-click="handleNodeClick"/>
</div>
</el-aside>
<el-main>
<el-form label-width="60px">
</el-form>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="USERNAME" label="用户名" />
<el-table-column prop="NAME" label="姓名" />
<el-table-column prop="ORG_PATH" label="部门"/>
<el-table-column label="操作" align="left" width="150">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="handleEdit(row.USER_ID)"></el-button>
<!-- <template v-if="row.ISMAIN==0">-->
<!-- <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleDelete(row.USER_ID,row.NAME)"></el-button>-->
<!-- </template>-->
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<!--
<el-button 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>
</el-main>
</el-container>
<div class="heightt"/>
<div class="subdy-foot">
<el-row style="text-align: center">
<el-button @click="goBack"></el-button>
</el-row>
</div>
</div>
</template>
<script>
import SelectTree from '@/components/SelectTree'
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination, SelectTree },
directives: { waves },
data() {
return {
treeLoading: false,
listLoading: true,
add: true,
del: true,
edit: true,
readonly: true,
listQuery: {
page: 1,
limit: 20
},
searchForm: {
DEPARTMENT_ID: '',
CORP_NAME: '',
PROVINCE: '',
CITY: '',
CORP_STATE: '',
CREATTIME: '',
USERNAME: '',
NAME: '',
DEPTNAME: ''
},
userForm: {
PARENT_ID: '',
USER_ID: '',
DEPARTMENT_ID: '',
DEPTNAME: '',
USERNAME: '',
NAME: ''
},
DEPARTMENT_ID: '',
total: 0,
PARENT_ID: '0', // ID
varList: [],
qyztList: [],
options: [{
value: '0',
label: '启用'
}, {
value: '1',
label: '禁用'
}],
STATE: [],
industryList: [],
countryList: [],
villageList: [],
treeData: [],
CITY_CODE: '',
COUNTRY: '',
VILLAGE: '',
config: config,
dialogFormEdit: false,
defaultProps: {
id:'DEPARTMENT_ID',
value: 'DEPARTMENT_ID',
children: 'SUB_DEPT',
label: 'NAME'
}
}
},
created() {
this.updateBranchName(this.$parent.indexVal)
this.getList()
// this.getDicList('qyztList', '07c2674470c1498ba1ebd74906b3b518')
// this.getDicList('industryList', 'f2598ba72e864eadabf0ca4b664d26b9')
},
methods: {
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.searchForm.DEPARTMENT_ID = node.DEPARTMENT_ID
this.getList(node.DEPARTMENT_ID)
},
//
getList(DEPARTMENT_ID) {
this.listLoading = true
if (DEPARTMENT_ID) {
this.DEPARTMENT_ID = DEPARTMENT_ID
}
requestFN(
'/core/corpinfo/findByCorpInfo?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
CORPINFO_ID: this.$parent.indexVal,
DEPARTMENT_ID: this.searchForm.DEPARTMENT_ID,
DEPTNAME: this.searchForm.DEPTNAME,
NAME: this.searchForm.NAME,
USERNAME: this.searchForm.USERNAME
}
).then((data) => {
this.listLoading = false
this.varList = data.userList
this.total = data.page.totalResult
this.hasButton()
this.CITY_CODE = data.CITY_CODE
this.getCountryList()
}).catch((e) => {
this.listLoading = false
})
},
getDeptList(DEPARTMENT_ID) {
this.listLoading = true
this.varList = []
this.DEPARTMENT_ID = DEPARTMENT_ID
requestFN(
'/department/findByDeptId?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
DEPARTMENT_ID: this.searchForm.DEPARTMENT_ID,
KEYWORDS: this.searchForm.KEYWORDS
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.form.PARENT_ID = data.PARENT_ID
this.total = data.page.totalResult
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
getRowKey(row) {
return row.CORPINFO_ID
},
goReturn() {
this.$parent.activeName = 'IndexList'
},
//
getQuery() {
this.getList()
},
getTreeList() {
this.treeLoading = true
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeLoading = false
// this.treeData = JSON.parse(data.zTreeNodes)
console.infot(this.treeData)
}).catch((e) => {
this.treeLoading = false
})
},
changeVillage(village) {
this.VILLAGE = village
},
//
handleEdit(ID) {
this.$parent.USER_ID = ID
this.$parent.activeName = 'Detail'
},
goBack() {
this.$parent.activeName = 'IndexList'
},
goKeyReset() {
this.searchForm = {
CORP_NAME: '',
PROVINCE: '',
CITY: '',
CORP_STATE: '',
CREATTIME: ''
}
this.getList()
},
translate(list, id) {
for (let i = 0; i < list.length; i++) {
if (list[i].BIANMA === id || list[i].DICTIONARIES_ID === id) {
return list[i].NAME
}
}
},
showBranchName(CORPINFO_ID, CORP_NAME) {
this.$refs.form && this.$refs.form.resetFields()
this.dialogFormEdit = true
this.updateBranchNameForm.CORPINFO_ID = CORPINFO_ID
this.updateBranchNameForm.CORP_NAME = CORP_NAME
},
updateBranchName(ID) {
requestFN(
'/core/corpinfo/listTreeCorpInfo',
{
CORPINFO_ID: ID
}
).then((data) => {
this.treeData = data.varList
}).catch((e) => {
})
}
}
}
</script>

View File

@ -0,0 +1,37 @@
<template>
<!-- <div class="">-->
<!-- <transition name="fade" mode="out-in">-->
<!-- <component :is="activeName"/>-->
<!-- </transition>-->
<!-- </div>-->
<div>
<IndexList v-show="activeName=='IndexList'" ref="list" />
<IndexView v-if="activeName=='IndexView'" />
<Detail v-if="activeName=='Detail'" />
</div>
</template>
<script>
import IndexList from './components/indexList'
import IndexView from './components/index_view'
import Detail from './components/detail'
export default {
components: { IndexList, IndexView, Detail },
data() {
return { // src/views/corpInfo/examine/index.vue
activeName: 'IndexList'
}
},
watch: {
activeName(val) {
if (val == 'IndexList') {
this.$refs.list.getList()
}
}
},
methods: {
}
}
</script>

View File

@ -82,6 +82,19 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" v-if="searchForm.userIs == '1'">
<el-form-item label="本人考评时间">
<el-date-picker
v-model="searchForm.userIsDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 100%;"/>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getList">
@ -154,6 +167,13 @@
</template>
</template>
</el-table-column>
<el-table-column prop="userIsTime" label="本人考评时间" v-if="searchForm.userIsDate != undefined && searchForm.userIsDate != '' && searchForm.userIsDate[0]">
<template slot-scope="{row}">
<template>
<span>{{ row.userIsTime }}</span>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="400px">
<template slot-scope="{row}">
<el-button type="info" icon="el-icon-view" @click="fnViewHidden(row.HIDDEN_ID)"></el-button>
@ -185,6 +205,8 @@
<tr :key="item.CONFIG_USER_ID">
<td class="tbg">考评人员</td>
<td>{{ item.USER_NAME }}</td>
<td class="tbg">考评时间</td>
<td>{{ item.CREATTIME ? item.CREATTIME : "暂未考评" }}</td>
<td class="tbg">是否符合</td>
<td>
<span v-if="item.RESULT === 1"></span>
@ -265,7 +287,8 @@ export default {
DEPARTMENT_ID: null,
STATE: '',
hiddendescr: '',
userIs: ''
userIs: '',
userIsDate : []
},
evaluationDialog: {
visible: false,
@ -323,6 +346,7 @@ export default {
this.searchForm.STATE = ''
this.searchForm.hiddendescr = ''
this.searchForm.userIs = ''
this.searchForm.userIsDate = ''
this.getList()
},
//
@ -334,6 +358,8 @@ export default {
...this.searchForm,
START_TIME: this.searchForm.dates && this.searchForm.dates[0],
END_TIME: this.searchForm.dates && this.searchForm.dates[1],
USER_IS_START_TIME: this.searchForm.userIsDate && this.searchForm.userIsDate[0],
USER_IS_END_TIME: this.searchForm.userIsDate && this.searchForm.userIsDate[1],
CORPINFO_ID: this.$parent.CORPINFO_ID,
EVALUATIONCONFIG_ID: this.$parent.EVALUATIONCONFIG_ID,
TYPE: this.$parent.TYPE

View File

@ -154,11 +154,13 @@
<span>({{ row.VIDEO_ONLINE_COUNT }})</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="400">
<el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-1" type="success" icon="el-icon-view" size="mini" @click="handleState(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-2" type="success" icon="el-icon-view" size="mini" @click="handleJie(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="1 == row.STATE" type="danger" icon="el-icon-delete" size="mini" @click="handlePreForceDelete(row)"></el-button>
<el-button v-if="2 == row.STATE" type="success" icon="el-icon-view" size="mini" @click="handlePreForceDelete(row)"></el-button>
<el-button v-show="edit" v-if="0 === row.IS_CORP_TYPE" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)"></el-button>
<el-button v-show="del" v-if="0 === row.IS_CORP_TYPE" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)"></el-button>
</template>
@ -183,6 +185,152 @@
<el-button v-print="'#printTest'" type="primary"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogPreDeleteShow" title="强制结束" width="80%" class="top-dialog">
<p>待确认的安全环保检查</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="inspectList"
:row-key="getRowKeyInsp"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="INSPECTION_PLACE" label="检查场所" show-overflow-tooltip />
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" show-overflow-tooltip />
<el-table-column prop="INSPECTION_USERS" label="检查人" show-overflow-tooltip />
<el-table-column prop="PERSON_NAME" label="被检查人" show-overflow-tooltip />
<el-table-column label="检查时间" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.INSPECTION_TIME_START }}-{{ row.INSPECTION_TIME_END }}
</template>
</el-table-column>
<el-table-column prop="HIDDEN_COUNT" label="检查隐患数" />
</el-table>
<p>待整改隐患</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="zgList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" show-overflow-tooltip />
<el-table-column label="隐患发现人" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.CREATOR_NAME || row.CREATOR_NAMES }}
</template>
</el-table-column>
<el-table-column prop="CREATTIME" label="隐患发现时间" show-overflow-tooltip />
<el-table-column prop="RECTIFICATIONOR_NAME" label="隐患整改人" show-overflow-tooltip />
<el-table-column prop="CREATOR_NAME" label="隐患验收人" show-overflow-tooltip />
<el-table-column label="是否处罚">
<template slot-scope="{row}">
{{ row.ISPUNISH === "1" ? "是" : row.ISPUNISH === "2" ?"否":"处罚人未处理" }}
</template>
</el-table-column>
</el-table>
<p>待验收隐患</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="ysList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" show-overflow-tooltip />
<el-table-column prop="CREATTIME" label="隐患发现时间" show-overflow-tooltip />
<el-table-column prop="RECTIFICATIONOR_NAME" label="隐患整改人" show-overflow-tooltip />
<el-table-column prop="RECTIFICATIONTIME" label="整改时间" show-overflow-tooltip />
<el-table-column prop="CREATOR_NAME" label="隐患验收人" show-overflow-tooltip />
<el-table-column label="是否处罚">
<template slot-scope="{row}">
{{ row.ISPUNISH === "1" ? "是" : row.ISPUNISH === "2" ?"否":"处罚人未处理" }}
</template>
</el-table-column>
</el-table>
<p>待处罚</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="cfList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CREATOR_NAME" label="下发人" show-overflow-tooltip />
<el-table-column label="是否处罚">
<template slot-scope="{row}">
{{ row.ISPUNISH === "1" ? "是" : row.ISPUNISH === "2" ?"否":"处罚人未处理" }}
</template>
</el-table-column>
</el-table>
<p>待反馈处罚</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="fkList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="REASON" label="处罚原因" show-overflow-tooltip />
<el-table-column prop="CREATOR_NAME" label="下发人" show-overflow-tooltip />
<el-table-column prop="UNITS_NAME" label="被处罚单位" show-overflow-tooltip />
<el-table-column prop="PERSON_NAME" label="被处罚人" show-overflow-tooltip />
<el-table-column label="处罚处理状态" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.HANDLED === "0" ? "待处理" : "已处理" }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button v-if="selectOSTATE == 1" @click="forceJie" type="danger" icon="el-icon-delete"></el-button>
<el-button @click="dialogPreDeleteShow = false"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
@ -221,6 +369,7 @@ export default {
STATE: '',
varList: [],
dialogFormShow: false,
dialogPreDeleteShow: false,
pd: [],
unitsList: [],
corpList: [],
@ -228,6 +377,14 @@ export default {
groupCorpList: [],
treeDataInspectDept: [],
treeDeptOptions: [],
inspectList:[],//
zgList:[],//
ysList:[],//
cfList:[],//
fkList:[],//
aiList:[],// AI
selectOID: '',
selectOSTATE:'',
defaultProps: {
value: 'id',
children: 'nodes',
@ -280,6 +437,12 @@ export default {
getRowKey(row) {
return row.OUTSOURCED_ID
},
getRowKeyInsp(row) {
return row.KEYPROJECTCHECK_ID
},
getRowKeyCf(row) {
return row.HIDDEN_ID
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
@ -459,6 +622,57 @@ export default {
}).catch(() => {
})
},
handlePreForceDelete(row){
this.dialogPreDeleteShow = true
requestFN(
'/outsourced/preForceDelete',
{ OUTSOURCED_ID: row.OUTSOURCED_ID }
).then((data) => {
this.inspectList = data.inspectList //
this.zgList = data.zgList //
this.ysList = data.ysList //
this.cfList = data.cfList //
this.fkList = data.fkList //
this.aiList = data.aiList // AI
this.selectOID = row.OUTSOURCED_ID
this.selectOSTATE = row.STATE
}).catch((e) => {
})
},
//
forceJie(){
if (!this.selectOID) {
this.$message('请勿重复点击', {
confirmButtonText: '确定',
type: 'warning'
})
}
// ---
this.$confirm('确定要结束该重点工程吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/outsourced/forceJie',
{OUTSOURCED_ID: this.selectOID}
).then((data) => {
this.dialogPreDeleteShow = false
this.selectOID = ''
this.selectOSTATE = ''
this.getList()
this.$forceUpdate()
}).catch((e) => {
this.selectOID = ''
this.selectOSTATE = ''
})
}).catch(() => {
})
// ---
},
getUnitsList() {
requestFN(
'/units/listAll',

View File

@ -226,13 +226,13 @@
enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutUp"
>
<div class="people_trajectory" v-if="isPeopleTrajectory">
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select">
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
</el-select>
<el-button class="search_btn" @click="addTrajectory"></el-button>
<el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button>
</div>
<div v-if="isPeopleTrajectory" class="people_trajectory">
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select">
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
</el-select>
<el-button class="search_btn" @click="addTrajectory"></el-button>
<el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button>
</div>
</transition>
</div>
</transition>
@ -256,7 +256,7 @@
:gangkou="gangkouActive"
:infoname="dialog.infoname"
:name="dialog.name"
:GATE_VIDEO_ID="dialog.GATE_VIDEO_ID"
:gate-video-id="dialog.GATE_VIDEO_ID"
:person-photo="dialog.personPhoto"
:ry-dept-name="dialog.RyDeptName"
:ry-post-name="dialog.RyPostName"
@ -461,6 +461,18 @@ export default {
checkImg: require('../../assets/map/index/map_on.png'),
check: '',
label: '气象监测'
},
{
img: require('../../assets/map/index/sisetu.png'),
checkImg: require('../../assets/map/index/sisetu_on.png'),
check: false,
label: '四色图'
},
{
img: require('../../assets/map/index/bianjie.png'),
checkImg: require('../../assets/map/index/bianjie_on.png'),
check: false,
label: '边界'
}
],
myEntityCollection: {},
@ -925,7 +937,7 @@ export default {
RyPostName: '',
RyRealName: '',
personTypeName: '',
GATE_VIDEO_ID:''
GATE_VIDEO_ID: ''
},
/* 曹妃甸使用参数开始*/
//
@ -1215,8 +1227,8 @@ export default {
VIIDPort: '8088'
},
trajectoryEntityCollection: {},
isPeopleTrajectory:false,
peopleTrajectoryValue:''
isPeopleTrajectory: false,
peopleTrajectoryValue: ''
}
},
mounted() {
@ -1435,7 +1447,7 @@ export default {
}
const point_type = pick.id._monitoItems.data.point_type
const point_id = pick.id._monitoItems.data.id
if (point_type == '标记点CAMERA'){
if (point_type == '标记点CAMERA') {
console.log(pick.id._monitoItems.data)
this.dialog.GATE_VIDEO_ID = pick.id._monitoItems.data.GATE_VIDEO_ID
}
@ -1670,7 +1682,6 @@ export default {
this.bottomOptionsKey = Math.random()
this.bottomOptionsAnimationComplex = false
this.toCenter({ longitude, latitude, height })
drag.addPolygon(id)
if (id === '00003') {
this.addBranchPoint()
} else {
@ -1952,6 +1963,26 @@ export default {
this.dialog.corpInfoId = ''
this.dialog.infoname = ''
this.dialog.width = '96%'
} else if (index === 7) {
if (!this.gangkouActive) {
this.$message.warning('请先选择港口')
return
}
if (this.rightOptionsList[index].check) {
drag.addPolygon(this.gangkouActive, '')
} else {
drag.removeFourColorDiagram()
}
} else if (index === 8) {
if (!this.gangkouActive) {
this.$message.warning('请先选择港口')
return
}
if (this.rightOptionsList[index].check) {
drag.addPolygon(this.gangkouActive, 'wall')
} else {
drag.removeWall()
}
}
},
changeSceneMode(check) {
@ -2067,6 +2098,8 @@ export default {
this.poinEntity = {}
this.toCenter(this.initCenter)
this.dragAreaEntity(this.initPoint)
this.rightOptionsList[7].check = false
this.rightOptionsList[8].check = false
}
this.componentKey = Math.random()
@ -2121,7 +2154,7 @@ export default {
}
this.carLocArr = []
}
if(urlType === 'peopleTrajectory'){
if (urlType === 'peopleTrajectory') {
this.isPeopleTrajectory = false
}
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
@ -2129,8 +2162,8 @@ export default {
this.clearMqttPoint('+/UwbBQ/')
this.removeTrajectory()
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
if(this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory'){
if(this.bottomOptionsList[pindex].list[i].check){
if (this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory') {
if (this.bottomOptionsList[pindex].list[i].check) {
this.bottomOptionsList[pindex].list[i].check = false
this.isPeopleTrajectory = false
break
@ -2154,20 +2187,20 @@ export default {
}
})
} else {
if(urlType === 'peopleTrajectory'){
if (urlType === 'peopleTrajectory') {
let flag = false
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
if(this.bottomOptionsList[pindex].list[i].type === 'peoplePosition'){
if(!this.bottomOptionsList[pindex].list[i].check){
if (this.bottomOptionsList[pindex].list[i].type === 'peoplePosition') {
if (!this.bottomOptionsList[pindex].list[i].check) {
flag = true
break
}
}
}
if(flag){
if (flag) {
this.$message.warning('请先选择人员定位!!!')
return
}else{
} else {
this.isPeopleTrajectory = true
}
}
@ -2652,7 +2685,7 @@ export default {
personTypeName: item.personTypeName,
data_id: item.cardId + '',
point_type: 'peoplePositionCzks',
label: item.realName,
label: item.realName
}
czksPerLoc.push(perLoc)

View File

@ -87,6 +87,7 @@ const polygonMap = {
export default class DragEntity {
constructor(val) {
this.viewer = val.viewer
this.id = []
}
addEntity(value) {
@ -118,10 +119,10 @@ export default class DragEntity {
}
}
if (value.point_type.indexOf('标记点') !== -1) {
console.info('====' )
console.info(value )
console.info('====' )
if (value.label == '人员' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){
console.info('====')
console.info(value)
console.info('====')
if (value.label == '人员' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
billboard = {
image: GGimg1,
height: 36,
@ -131,7 +132,7 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}else if (value.label == '车辆' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){
} else if (value.label == '车辆' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
billboard = {
image: GGimg2,
height: 36,
@ -141,9 +142,9 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}else if (value.label == '摄像头' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){
} else if (value.label == '摄像头' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
billboard = {
image: imgMap['img0_2' ],
image: imgMap['img0_2' ],
height: 36,
width: 30,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
@ -151,9 +152,9 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}else if (value.label == '摄像头' ){
} else if (value.label == '摄像头') {
billboard = {
image: imgMap['img0_2' ],
image: imgMap['img0_2' ],
height: 36,
width: 30,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
@ -161,7 +162,7 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}else{
} else {
billboard = {
image: imgMap['img' + value.icon_type],
height: 36,
@ -172,7 +173,6 @@ export default class DragEntity {
disableDepthTestDistance: Number.POSITIVE_INFINITY
}
}
}
// 曹妃甸使用
if (value.gangkou === '00004') {
@ -296,16 +296,24 @@ export default class DragEntity {
})
}
addPolygon(id) {
addPolygon(id, type) {
if (!polygonMap[id]) return
const loadMapBoxObj = polygonMap[id]()
if (type === 'wall') {
const loadMapBoxItem = loadMapBoxObj['wallList']
for (let i = 0; i < loadMapBoxItem.length; i++) {
this.addWall(this.formatPolygon(loadMapBoxItem[i]))
}
return
}
// 循环获取所有颜色
for (const loadMapBoxKey in loadMapBoxObj) {
// 获取每种颜色
const loadMapBoxItem = loadMapBoxObj[loadMapBoxKey]
if (loadMapBoxKey === 'wallList') continue
// 循环每种颜色里每一块创建多边形
for (let i = 0; i < loadMapBoxItem.length; i++) {
this.formatPolygon(loadMapBoxItem[i])
this.addFourColorDiagram(this.formatPolygon(loadMapBoxItem[i]), loadMapBoxItem[i])
}
}
}
@ -316,33 +324,68 @@ export default class DragEntity {
latitudeAndLongitude.push(item.x)
latitudeAndLongitude.push(item.y)
})
if (item.type === 'wall') {
const target = new Cesium.Entity({
wall: {
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
material: new Cesium.PolylineTrailLinkMaterialProperty({
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
duration: 2000
}, this.viewer),
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
}
})
this.viewer.entities.add(target)
} else {
const target = new Cesium.Entity({
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
extrudedHeight: item.stretchHeight,
height: item.height,
// eslint-disable-next-line new-cap
material: new Cesium.Color.fromCssColorString(item.color),
outline: !!item.strokeColor,
// eslint-disable-next-line new-cap
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
}
})
this.viewer.entities.add(target)
return latitudeAndLongitude
}
addFourColorDiagram(latitudeAndLongitude, item) {
const id = Cesium.createGuid()
this.id.push({
id,
key: 'FourColorDiagram'
})
const target = new Cesium.Entity({
id,
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
extrudedHeight: item.stretchHeight,
height: item.height,
// eslint-disable-next-line new-cap
material: new Cesium.Color.fromCssColorString(item.color),
outline: !!item.strokeColor,
// eslint-disable-next-line new-cap
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
}
})
this.viewer.entities.add(target)
}
addWall(latitudeAndLongitude) {
const id = Cesium.createGuid()
this.id.push({
id,
key: 'Wall'
})
const target = new Cesium.Entity({
id,
wall: {
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
material: new Cesium.PolylineTrailLinkMaterialProperty({
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
duration: 2000
}, this.viewer),
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
}
})
this.viewer.entities.add(target)
}
removeFourColorDiagram() {
for (let i = 0; i < this.id.length; i++) {
if (this.id[i].key === 'FourColorDiagram') {
this.viewer.entities.removeById(this.id[i].id)
this.id.splice(i, 1)
i--
}
}
}
removeWall() {
for (let i = 0; i < this.id.length; i++) {
if (this.id[i].key === 'Wall') {
this.viewer.entities.removeById(this.id[i].id)
this.id.splice(i, 1)
i--
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -62,6 +62,11 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="检查人">
<el-input v-model="search.INSPECTION_USER_NAME" placeholder="检查人..." />
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label-width="10px">
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
@ -99,6 +104,8 @@
<el-table-column prop="INSPECTED_DEPARTMENT_NAME" label="被检查单位" align="center" />
<el-table-column prop="INSPECTION_DEPARTMENT_NAME" label="检查部门" align="center" />
<el-table-column prop="INSPECTION_ORIGINATOR_NAME" label="检查发起人" align="center" />
<el-table-column prop="INSPECTION_USER_NAME" label="检查人" align="center" />
<el-table-column prop="HIDDEN_COUNT" label="隐患数" align="center" />
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" align="center" />
<el-table-column label="检查时间" width="260" align="center" >
<template slot-scope="{row}">
@ -162,7 +169,8 @@ export default {
INSPECTION_TYPE: '', //
INSPECTION_TIME: ['', ''], //
INSPECTION_STATUS: '', //
CORPINFO_ID: ''
CORPINFO_ID: '',
INSPECTION_USER_NAME:'' //
},
CORPINFO_ID: '',
varList: [],

View File

@ -0,0 +1,973 @@
<template>
<div class="app-container">
<el-container>
<!-- <el-aside width="300px" style="background-color:#fff">
<el-input
v-model="filterText"
placeholder="输入关键字进行过滤"
style="margin:10px 0"/>
<el-tree
v-loading="treeLoading"
ref="tree"
:data="treeData"
:props="defaultProps"
:filter-node-method="filterNode"
class="filter-tree"
@node-click="handleNodeClick"/>
</el-aside>-->
<el-main>
<div class="filter-container">
<div class="filter-lable w80">用户名称</div>
<el-input v-model="keyUserName" clearable placeholder="搜索用户名" class="filter-item" style="width: 200px;"/>
<div class="filter-lable w80">人员类型</div>
<el-select ref="refDeptLeven" v-model="keyJobLeven" clearable placeholder="请选择人员类型" class="filter-item"
style="width: 200px;">
<el-option v-for="item in userType" :key="item.id" :label="item.name"
:value="item.id"/>
</el-select>
<!-- <div class="filter-lable w80">行政区域</div>-->
<!-- <el-cascader ref="shudi" v-model="keyShudi" :props="areaprops" clearable placeholder="请选择行政区域" style="width: 200px" />-->
<!-- <div class="filter-lable w80">单位类型</div>-->
<!-- <el-select ref="refDeptType" v-model="keyDeptType" clearable placeholder="请选择单位类型" class="filter-item">-->
<!-- <el-option v-for="item in unitTypeList" :key="item.DICTIONARIES_ID" :label="item.NAME" :value="item.DICTIONARIES_ID" />-->
<!-- </el-select>-->
<div class="filter-lable w80">部门名称</div>
<el-input v-model="keyDepeName" clearable placeholder="搜索部门名称" class="filter-item"
style="width: 200px;"/>
<!-- <div class="filter-lable w80">职务级别</div>-->
<!-- <el-select ref="refJobLeven" v-model="keyJobLeven" clearable placeholder="请选择" class="filter-item">-->
<!-- <el-option v-for="item in jobTypeAllList" :key="item.DICTIONARIES_ID" :label="item.NAME" :value="item.DICTIONARIES_ID" />-->
<!-- </el-select>-->
<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-button v-waves v-if="LOGIN_USER === '1'" class="filter-item" type="warning" icon="el-icon-warning"
size="mini" plain @click="resetPassword">
一键密码重置
</el-button>-->
</div>
<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
type="selection"
width="55"
align="center"/>
<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="USER_TYPE" label="用户类型" align="center">
<template slot-scope="{row}">
<span v-if="row.USER_TYPE =='0'"></span>
<span v-else-if="row.USER_TYPE =='1'">分公司</span>
<span v-else></span>
</template>
</el-table-column>
<!-- <el-table-column prop="SEX" label="性别"/>-->
<el-table-column prop="ORG_PATH" label="部门" align="center"/>
<el-table-column prop="CORPINFO_NAME" label="企业" align="center"/>
<el-table-column label="操作" align="center" width="120">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleRecord(row.USER_ID)">
</el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
</div>
</el-main>
</el-container>
<el-dialog v-loading="editloading" :visible.sync="dialogFormRecord"
:title="dialogType === 'record'?'查看记录':'修改'" width="1800px">
<el-table
ref="multipleTable"
:data="recordList"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center"/>
<el-table-column prop="NAME" label="用户名" align="center"/>
<el-table-column prop="CREATTIME" label="新增时间" align="center"/>
<el-table-column prop="CREATORNAME" label="新增人" align="center">
<template slot-scope="{row}">
<span>{{row.CREATORNAME ? row.CREATORNAME : row.NAMEX ? row.NAMEX : row.NAMER}}</span>
</template>
</el-table-column>
<el-table-column prop="REMARKS" label="记录" align="center"/>
</el-table>
</el-dialog>
<el-dialog v-loading="editloading" :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'"
width="600px">
<el-form ref="form" :rules="rules" :model="pd" label-width="110px" style="width: 500px;">
<el-form-item label="角色" prop="ROLE_ID">
<el-select v-model="pd.ROLE_ID" multiple placeholder="请选择角色">
<el-option v-for="item in roleList" :key="item.role_ID" :label="item.role_NAME" :value="item.role_ID"/>
</el-select>
</el-form-item>
<el-form-item label="用户名" prop="USERNAME">
<el-input v-model="pd.USERNAME" :disabled="dialogType == 'editUser'" placeholder="这里输入用户名..."
@blur="goCheck()"/>
</el-form-item>
<el-form-item label="姓名" prop="NAME">
<el-input v-model="pd.NAME" placeholder="这里输入姓名..."/>
</el-form-item>
<el-form-item v-if="dialogType != 'editUser'" label="密码" prop="PASSWORD">
<el-input v-model="pd.userPASSWORD" show-password placeholder="这里输入密码..."/>
</el-form-item>
<el-form-item label="身份证号" prop="USER_ID_CARD">
<el-input v-model="pd.USER_ID_CARD" placeholder="这里输入身份证号..." @blur="goCheck()"/>
</el-form-item>
<el-form-item label="性别" prop="SEX">
<el-radio v-model="pd.SEX" :label="'0'"></el-radio>
<el-radio v-model="pd.SEX" :label="'1'"></el-radio>
</el-form-item>
<el-form-item label="手机号" prop="PHONE">
<el-input v-model="pd.PHONE" placeholder="这里输入手机号..."/>
</el-form-item>
<!-- <el-form-item label="部门级别" prop="deptTypeID"> &lt;!&ndash;目的是选择部门到这个级别 &ndash;&gt;-->
<!-- <el-select v-model="pd.deptTypeID" placeholder="请选择" class="filter-item" >-->
<!-- <el-option v-for="item in deptTypeLevenAllList" :key="item.BIANMA" :label="item.NAME" :value="item.DICTIONARIES_ID" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="单位部门" prop="DEPARTMENT_ID">
<SelectTree
v-if="dialogFormEdit"
ref="deptTree"
:clearable="false"
:options="deptTreeData"
:props="deptDefaultProps"
v-model="pd.DEPARTMENT_ID"
placeholder="请选择部门"
/>
</el-form-item>
<el-form-item label="行政区域" prop="shudi"> <!--河北省的就可以 -->
<el-cascader v-if="dialogFormEdit" id="shudi" ref="shudi" v-model="pd.shudi" :props="areaprops"
placeholder="请选择省市县" style="width: 100%"/>
</el-form-item>
<el-form-item label="职务级别" prop="JOB_LEVEL">
<el-select ref="refJobLevel" v-model="pd.JOB_LEVEL" placeholder="请选择" class="filter-item">
<el-option v-for="item in deptTypeLevenAllList" :key="item.BIANMA" :label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
<el-form-item label="民族" prop="NATION">
<el-select v-model="pd.NATION" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in uesrInfoDic.minzuList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
<!-- 相关方的业务需求,是否为审核人员.如果为是的情况,就是可以在入场培训中选择 -->
<el-form-item label="是否审核人员" prop="ISASSESS">
<el-radio v-model="pd.ISASSESS" :label="'1'"></el-radio>
<el-radio v-model="pd.ISASSESS" :label="'0'"></el-radio>
</el-form-item>
<el-form-item label="职务" prop="JOB">
<el-input v-model="pd.JOB" placeholder="这里输入职务..."/>
</el-form-item>
<el-form-item label="邮箱" prop="EMAIL">
<el-input v-model="pd.EMAIL" placeholder="这里输入邮箱..."/>
</el-form-item>
<el-form-item label="排序" prop="SORT">
<el-input v-model.number="pd.SORT" placeholder="这里输入排序..."/>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="pd.BZ" type="textarea" placeholder="这里输入备注说明..."/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button v-show="ISCHECK || dialogType === 'editUser'" type="primary" @click="confirm"> </el-button>
<el-button v-show="!ISCHECK && dialogType !== 'editUser'" type="primary" @click="goCheck"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import {requestFN} from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
export default {
components: {Pagination, SelectTree},
directives: {waves},
data() {
var hasUser = (rule, value, callback) => {
if (this.dialogType != 'editUser') {
requestFN(
'/user/hasUser',
{
USERNAME: value,
tm: new Date().getTime()
}
).then((data) => {
if (data.result == 'success') {
callback()
} else {
callback(new Error('用户名重复'))
}
}).catch((e) => {
})
} else {
callback()
}
}
var hasEmail = (rule, value, callback) => {
if (value) {
requestFN(
'/user/hasEmail',
{
EMAIL: value,
USERNAME: this.pd.USERNAME
}
).then((data) => {
if (data.result == 'success') {
callback()
} else {
callback(new Error('邮箱重复'))
}
}).catch((e) => {
})
} else {
callback()
}
}
return {
LOGIN_USER: JSON.parse(sessionStorage.getItem('user')).USER_ID,
treeLoading: false,
treeData: [],
userType: [
{ id: '0', name: '股份' },
{ id: '1', name: '分公司' },
{ id: '2', name: '相关方' }
],
defaultProps: {
children: 'nodes',
label: 'name'
},
listQuery: {
page: 1,
limit: 20
},
total: 0,
varList: [],
recordList: [],
filterText: '',
keyUserName: '',
keyDeptLeven: '',
keyShudi: '',
keyDeptType: '',
keyDepeName: '',
keyJobLeven: '',
ISCHECK: false,
dialogFormEdit: false,
dialogFormRecord: false,
editloading: false,
dialogType: 'add',
USER_ID: '',
TYPE: '',
loading: true,
rules: {
EMAIL: [
{required: true, message: '请输入邮箱', trigger: 'blur'},
{
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
message: '请输入正确的邮箱'
},
{validator: hasEmail, trigger: 'blur'}
],
ROLE_ID: [
{required: true, message: '角色不能为空', trigger: 'blur'}
],
USERNAME: [
{required: true, message: '用户名不能为空', trigger: 'blur'}
// ,{
// pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
// message: '使'
// },
// {validator: hasUser, trigger: 'blur'}
],
NAME: [
{required: true, message: '姓名不能为空', trigger: 'blur'},
{min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur'}
],
SEX: [
{required: true, message: '请选择性别', trigger: 'blur'}
],
NATION: [
{required: true, message: '请选择民族', trigger: 'blur'}
],
PHONE: [
{required: true, message: '手机号不能为空', trigger: 'blur'},
{min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur'},
{
pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
message: '请输入正确的手机号码'
}
],
deptTypeID: [
{required: true, message: '请选择部门级别', trigger: 'blur'}
],
shudi: [
{required: true, message: '请选择属地', trigger: 'blur'}
],
JOB_LEVEL: [
{required: true, message: '请选择职务级别', trigger: 'blur'}
],
DEPARTMENT_ID: [
{required: true, message: '请选择单位部门', trigger: 'blur'}
],
ISASSESS: [
{required: true, message: '请选择是否审核人员', trigger: 'blur'}
],
USER_ID_CARD: [{required: true, message: '身份证号不能为空', trigger: 'blur'},
{
pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
message: '请输入正确的身份证号'
}
]
},
uesrInfoDic: {
minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd
xingbieList: [], // 21501808bbc344d593fbf9ccfe6c4531
},
pd: {
ROLE_ID: [], // ID
USERNAME: '', //
NAME: '', //
userPASSWORD: 'Aa@123456789', //
SEX: '', // 01
PHONE: '', //
deptTypeID: '', //
DEPARTMENT_ID: '', //
shudi: '',
BZ: '', //
EMAIL: '', //
SORT: '', //
PROVINCE: '', //
CITY: '', //
COUNTRY: '', //
VILLAGE: '', //
JOB_LEVEL: '', //
ISASSESS: '',
JOB: '', //
USER_ID_CARD: '', //
NATION: '' //
},
roleList: [],
multipleSelectionAll: [], //
multipleSelection: [], //
fromExcel: false, // excel
toExcel: false, // excel
add: false, //
del: false, //
edit: false, //
record: false, //
hasUserRet: false,
deptTypeLevenAllList: [], //
jobTypeAllList: [], //
deptTreeData: [], // ,
userRecordInfo: {},
recordInfo: {},
deptDefaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
unitTypeList: [],
areaprops: {
lazy: true,
lazyLoad(node, resolve) {
setTimeout(() => {
const areaLeven = node.level
var areaParID = ''
if (areaLeven == '0') {
areaParID = 'e725d2a91b8248f4b8f49889038df7de'
} else {
areaParID = node.data.id
}
requestFN(
'dictionaries/getLevels',
{DICTIONARIES_ID: areaParID}
).then((data) => {
const nodes = data.list.map(item => ({
value: item.DICTIONARIES_ID,
label: item.NAME.toString(),
id: item.DICTIONARIES_ID.toString(),
leaf: areaLeven > 2
}))
resolve(nodes) // resolve
}).catch((e) => {
this.editloading = false
this.listLoading = false
})
}, 500)
}
}
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
created() {
this.getList(this.USER_ID)
this.hasButton()
this.getDict2('0a0e406f27f74ee698fe9979d25f62dd', 'minzuList')
this.getDict2('21501808bbc344d593fbf9ccfe6c4531', 'xingbieList')
this.getDict('3e057d284c294a48af32948d58e92e3d', 'deptTypeLevenAllList')
this.getDict('3f3a6ac41247438e91df2830765068ba', 'unitTypeList')
this.getDepartTreeList()
this.getDict('f1fbdf9a286342ae98e6a56bf823f221', 'jobTypeAllList')
this.goAddUser()
this.getTreeList()
},
methods: {
goPush(row) {
requestFN(
'user/goPush',
{
STATUS: row.STATUS,
BZ: row.BZ,
SKIN: row.SKIN,
PHONE: row.PHONE,
NUMBER: row.NUMBER,
ISMAIN: row.ISMAIN,
OPENID: row.APPID,
SORT: row.SORT,
LEARNERCATEGORY: row.LEARNERCATEGORY,
USERAVATARPREFIX: row.USERAVATARPREFIX,
USERAVATARURL: row.USERAVATARURL,
SHIFTDUTYONE: row.SHIFTDUTYONE,
SHIFTDUTYTWO: row.SHIFTDUTYTWO,
DURATION: row.DURATION,
WORKSTATUS: row.WORKSTATUS,
WORKPERIOD: row.WORKPERIOD,
PERSONNEL_TYPE: row.PERSONNEL_TYPE,
TITLE: row.TITLE,
ISSTATE: row.ISSTATE,
INCUMBENCY: row.INCUMBENCY,
WORKING_DATE: row.WORKING_DATE,
ENTRY_DATE: row.ENTRY_DATE,
TYPE_OF_WORK: row.TYPE_OF_WORK,
DUTIES: row.DUTIES,
DEGREE_OF_EDUCATION: row.DEGREE_OF_EDUCATION,
DATE_OF_BIRTH: row.DATE_OF_BIRTH,
POLITICAL_OUTLOOK: row.POLITICAL_OUTLOOK,
PROVINCE: row.PROVINCE,
CITY: row.CITY,
COUNTRY: row.COUNTRY,
VILLAGE: row.VILLAGE,
USER_ID: row.USER_ID,
CARD_NO: row.USER_ID_CARD,
USERNAME: row.USERNAME,
NAME: row.NAME,
CORPINFO_ID: row.CORPINFO_ID,
CORPINFO_NAME: row.CORPINFO_NAME || '',
DEPARTMENT_ID: row.DEPARTMENT_ID,
DEPARTMENT_NAME: row.DEPARTMENT_NAME,
EMAIL: row.EMAIL || '',
CARD_TYPE: '111',
CARD_TYPE_NAME: '身份证',
NATION: row.NATION_NAME || '',
SEX: row.SEX === '0' ? '男' : '女',
USER_TYPE: '1',
ISDELETE: row.ISDELETE
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('推送成功')
this.getList()
} else {
this.$message.error('推送失败,' + data.msg)
}
}).catch((e) => {
this.listLoading = false
})
},
goCheck() {
if (this.pd.USER_ID_CARD && this.pd.USERNAME) {
const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
const phoneResult = phoneJudge.test(this.pd.USERNAME)
const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
if (phoneResult && cardResult) {
console.log('格式校验通过')
requestFN(
'user/goCheck',
{
CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.USERNAME
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.error('验证失败,请确认身份证号与手机号是否正确')
this.ISCHECK = false
}
}).catch((e) => {
this.listLoading = false
this.ISCHECK = false
})
} else {
this.ISCHECK = false
}
} else {
this.ISCHECK = false
}
},
getList() {
this.listLoading = true
requestFN(
'/user/centerUserList?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
keyUserName: this.keyUserName,
keyDeptLeven: this.keyDeptLeven,
keyShudi: this.keyShudi,
keyDeptType: this.keyDeptType,
keyDepeName: this.keyDepeName,
keyJobLeven: this.keyJobLeven,
DEPARTMENT_ID: this.DEPARTMENT_ID,
PROVINCE: this.keyShudi[0] || '',
CITY: this.keyShudi[1] || '',
COUNTRY: this.keyShudi[2] || '',
VILLAGE: this.keyShudi[3] || '',
ISPUSH: '0'
}
).then((data) => {
this.listLoading = false
this.varList = data.userList
this.total = data.page.totalResult
})
.catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.keyUserName = ''
this.keyDeptLeven = ''
this.keyShudi = ''
this.keyDeptType = ''
this.keyDepeName = ''
this.keyJobLeven = ''
this.getList()
if (this.$refs.refDeptLeven) {
this.$refs.refDeptLeven.clearHandle()
}
if (this.$refs.shudi) {
this.$refs.shudi.clearHandle()
}
if (this.$refs.refDeptType) {
this.$refs.refDeptType.clearHandle()
}
if (this.$refs.refJobLeven) {
this.$refs.refJobLeven.clearHandle()
}
},
goAddUser() { //
requestFN(
'/user/goAddUser',
{}
).then((data) => {
this.roleList = data.roleList
})
.catch((e) => {
})
},
unLockUser(id, name) {
this.$confirm('确定要解锁 [ 帐号:' + name + ' ] 吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/unLockUser',
{
USER_ID: id
}
).then(() => {
this.$message({
message: '解锁成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
handleAdd() {
this.dialogFormEdit = true
this.ISCHECK = false
this.pd = {}
this.dialogType = 'saveUser'
this.pd.PASSWORD = 'Aa@123456789'
},
confirm() {
this.$refs.form.validate(valid => {
if (valid) {
this.listLoading = true
if (this.pd.ROLE_ID) {
var roleIDs = ''
this.pd.ROLE_ID.forEach((item) => {
roleIDs += item + ';'
})
this.pd.roleIDs = roleIDs
}
if (this.pd.shudi) {
this.pd.PROVINCE = this.pd.shudi[0]
this.pd.CITY = this.pd.shudi[1]
this.pd.COUNTRY = this.pd.shudi[2] || ''
this.pd.VILLAGE = this.pd.shudi[3] || ''
}
requestFN(
'/user/' + this.dialogType,
this.pd
).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.varList = []
this.$refs.deptTree.clearHandle()
this.listQuery.page = 1
this.goPush(data.pd)
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
}
})
},
handleDelete(row) {
this.$confirm('确定要删除[' + row.USERNAME + ']吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/deleteUser',
{
USER_ID: row.USER_ID,
ISPUSH: row.ISPUSH
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
makeAll(msg) {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const ids = _selectData.map((item, index) => {
return item.USER_ID
}).join(',')
var tishi = ''
if (msg == '0') {
tishi = '确定要删除选中的数据吗?'
} else if (msg == '1') {
tishi = '确定要给选中的用户发送站内信吗?'
} else {
this.$message({
message: '请选择操作类型...',
type: 'error'
})
return false
}
this.$confirm(tishi, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (msg == '0') {
this.listLoading = true
requestFN(
'/user/deleteAllUser',
{
USER_IDS: ids
}
).then(() => {
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}
}).catch(() => {
})
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
handleRecord(USER_ID) {
this.dialogType = 'record'
this.dialogFormRecord = true
requestFN(
'/user/getUserRecord',
{
USER_ID: USER_ID
}
).then((data) => {
if (data.result == 'success') {
this.recordList = data.varList
}
})
.catch((e) => {
this.listLoading = false
})
},
async handleEdit(row) {
this.dialogType = 'editUser'
this.pd = JSON.parse(JSON.stringify(row))
const areaRefID = []
if (this.pd.PROVINCE) {
areaRefID.push(this.pd.PROVINCE)
}
if (this.pd.CITY) {
areaRefID.push(this.pd.CITY)
}
if (this.pd.COUNTRY) {
areaRefID.push(this.pd.COUNTRY)
}
if (this.pd.VILLAGE) {
areaRefID.push(this.pd.VILLAGE)
}
this.$set(this.pd, 'shudi', areaRefID)
const refDeptLevelVal = {}
refDeptLevelVal.id = this.pd.deptLevenlID
const deptRefsValue = {}
deptRefsValue.id = this.pd.DEPARTMENT_ID
var arrString = []
if (this.pd.ROLE_ID != null && this.pd.ROLE_ID != '') {
arrString.push(this.pd.ROLE_ID)
}
if (this.pd.ROLE_IDS != null && this.pd.ROLE_IDS != '' && this.pd.ROLE_IDS != undefined && this.pd.ROLE_IDS != 'undefined') {
//
this.pd.ROLE_IDS = this.pd.ROLE_IDS.substring(0, this.pd.ROLE_IDS.length - 1)
var arrList = this.pd.ROLE_IDS && this.pd.ROLE_IDS != '' ? this.pd.ROLE_IDS.split(';') : ''
// eslint-disable-next-line no-unused-vars
for (const item1 of arrList) { // ID
arrString.push(item1)
}
}
this.pd.ROLE_ID = arrString
this.dialogFormEdit = true
await this.$nextTick()
},
handleEditStatus(row, type) {
const typeName = type == '1' ? '禁用' : '启用'
this.$confirm('确定要' + typeName + '[' + row.USERNAME + ']吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/updateUserStatus',
{
USER_ID: row.USER_ID,
status: type
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.goPush(row)
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function () {
var keys = 'user:add,user:del,user:edit,fhSms,email,fromExcel,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys, tm: new Date().getTime()
}
).then((data) => {
if (data.result == 'success') {
this.add = data.userfhadminadd //
this.del = data.userfhadmindel //
this.edit = data.userfhadminedit //
this.fromExcel = data.fromExcel // excel
this.toExcel = data.toExcel // excel
} else if (data.result == 'exception') {
// showException('', data.exception)//
}
})
.catch((e) => {
this.listLoading = false
})
},
//
getDict(dicID, listName) {
requestFN(
'dictionaries/getLevels',
{DICTIONARIES_ID: dicID}
).then((data) => {
this[listName] = data.list
}).catch((e) => {
this.listLoading = false
})
},
//
getDict2(dicID, listName) {
requestFN(
'dictionaries/getLevels',
{DICTIONARIES_ID: dicID}
).then((data) => {
this.uesrInfoDic[listName] = data.list
}).catch((e) => {
this.listLoading = false
})
},
getDepartTreeList() {
this.pd.DEPARTMENT_ID = ''
if (this.$refs.deptTree) {
this.$refs.deptTree.clearHandle()
}
return new Promise((resolve) => {
requestFN(
'/department/listTreeByType'
).then((data) => {
this.deptTreeData = JSON.parse(data.zTreeNodes)
resolve()
}).catch((e) => {
})
})
},
resetPwd(id, name) {
this.$confirm('是否重置密码为Aa@123456789?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/resetPwd',
{
USER_ID: id
}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.DEPARTMENT_ID = node.id
this.getList()
},
/*resetPassword() {
this.$confirm('一键重置密码,会将所有未修改过密码的用户进行密码重置重置,是否继续?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/resetPwdAll',
{}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},*/
getTreeList() {
this.treeLoading = true
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeLoading = false
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
this.treeLoading = false
})
},
}
}
</script>

View File

@ -78,7 +78,7 @@
<span v-if="row.STATUS =='1'"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="400">
<el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}">
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="edit" type="success" icon="el-icon-view" size="mini" @click="resetPwd(row.USER_ID)"></el-button>
@ -86,6 +86,7 @@
<el-button v-show="row.STATUS== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEditStatus(row,'1', row.USER_ID)"></el-button>
<el-button v-show="row.STATUS== 1" type="primary" icon="el-icon-edit" size="mini" @click="handleEditStatus(row,'0', row.USER_ID)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.USER_ID,row.USERNAME)"></el-button>
<el-button v-if="row.ISPUSH == '0'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)"></el-button>
</template>
</el-table-column>
</el-table>
@ -108,13 +109,16 @@
</el-select>
</el-form-item>
<el-form-item label="用户名" prop="USERNAME">
<el-input v-model="pd.USERNAME" :disabled="dialogType == 'editUser'" placeholder="这里输入用户名..." />
<el-input v-model="pd.USERNAME" :disabled="dialogType == 'editUser'" placeholder="这里输入用户名..." @blur="goCheck()"/>
</el-form-item>
<el-form-item label="姓名" prop="NAME">
<el-input v-model="pd.NAME" placeholder="这里输入姓名..." />
</el-form-item>
<el-form-item v-if="dialogType != 'editUser'" label="密码" prop="PASSWORD">
<el-input v-model="pd.userPASSWORD" show-password placeholder="这里输入密码..." />
<!-- <el-form-item v-if="dialogType != 'editUser'" label="密码" prop="PASSWORD">-->
<!-- <el-input v-model="pd.userPASSWORD" show-password placeholder="这里输入密码..." />-->
<!-- </el-form-item>-->
<el-form-item label="身份证号" prop="USER_ID_CARD">
<el-input v-model="pd.USER_ID_CARD" placeholder="这里输入身份证号..." @blur="goCheck()"/>
</el-form-item>
<el-form-item label="性别" prop="SEX">
<el-radio v-model="pd.SEX" :label="'0'"></el-radio>
@ -147,6 +151,15 @@
<el-option v-for="item in deptTypeLevenAllList" :key="item.BIANMA" :label="item.NAME" :value="item.DICTIONARIES_ID" />
</el-select>
</el-form-item>
<el-form-item label="民族" prop="NATION">
<el-select v-model="pd.NATION" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in uesrInfoDic.minzuList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
<!-- 相关方的业务需求,是否为审核人员.如果为是的情况,就是可以在入场培训中选择 -->
<el-form-item label="是否审核人员" prop="ISASSESS">
<el-radio v-model="pd.ISASSESS" :label="'1'"></el-radio>
@ -167,7 +180,8 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
<el-button v-show="ISCHECK" type="primary" @click="confirm"> </el-button>
<el-button v-show="!ISCHECK" type="primary" @click="goCheck"> </el-button>
</div>
</el-dialog>
</div>
@ -245,12 +259,13 @@ export default {
keyDeptType: '',
keyDepeName: '',
keyJobLeven: '',
ISCHECK: false,
dialogFormEdit: false,
editloading: false,
dialogType: 'add',
rules: {
EMAIL: [
{ required: false, message: '请输入邮箱', trigger: 'blur' },
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
message: '请输入正确的邮箱'
@ -260,11 +275,7 @@ export default {
ROLE_ID: [
{ required: true, message: '角色不能为空', trigger: 'blur' }
],
USERNAME: [
{ required: true, message: '用户名不能为空', trigger: 'blur' },
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' },
{ validator: hasUser, trigger: 'blur' }
],
NAME: [
{ required: true, message: '姓名不能为空', trigger: 'blur' },
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }
@ -272,6 +283,9 @@ export default {
SEX: [
{ required: true, message: '请选择性别', trigger: 'blur' }
],
NATION: [
{ required: true, message: '请选择民族', trigger: 'blur' }
],
PHONE: [
{ required: true, message: '手机号不能为空', trigger: 'blur' },
{ min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' },
@ -294,9 +308,20 @@ export default {
],
ISASSESS: [
{ required: true, message: '请选择是否审核人员', trigger: 'blur' }
],
USER_ID_CARD: [{ required: true, message: '身份证号不能为空', trigger: 'blur' },
{
pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
message: '请输入正确的身份证号'
}
]
},
uesrInfoDic: {
minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd
xingbieList: [], // 21501808bbc344d593fbf9ccfe6c4531
},
pd: {
USER_ID: '',
ROLE_ID: [], // ID
USERNAME: '', //
NAME: '', //
@ -315,7 +340,9 @@ export default {
VILLAGE: '', //
JOB_LEVEL: '', //
ISASSESS: '',
JOB: ''//
JOB: '', //
USER_ID_CARD: '', //
NATION: '' //
},
roleList: [],
multipleSelectionAll: [], //
@ -374,6 +401,8 @@ export default {
created() {
this.getList()
this.hasButton()
this.getDict2('0a0e406f27f74ee698fe9979d25f62dd', 'minzuList')
this.getDict2('21501808bbc344d593fbf9ccfe6c4531', 'xingbieList')
this.getDict('3e057d284c294a48af32948d58e92e3d', 'deptTypeLevenAllList')
this.getDict('3f3a6ac41247438e91df2830765068ba', 'unitTypeList')
this.getDepartTreeList()
@ -382,6 +411,103 @@ export default {
this.getTreeList()
},
methods: {
goPush(row) {
requestFN(
'user/goPush',
{
STATUS: row.STATUS,
BZ: row.BZ,
SKIN: row.SKIN,
PHONE: row.PHONE,
NUMBER: row.NUMBER,
ISMAIN: row.ISMAIN,
OPENID: row.APPID,
SORT: row.SORT,
LEARNERCATEGORY: row.LEARNERCATEGORY,
USERAVATARPREFIX: row.USERAVATARPREFIX,
USERAVATARURL: row.USERAVATARURL,
SHIFTDUTYONE: row.SHIFTDUTYONE,
SHIFTDUTYTWO: row.SHIFTDUTYTWO,
DURATION: row.DURATION,
WORKSTATUS: row.WORKSTATUS,
WORKPERIOD: row.WORKPERIOD,
PERSONNEL_TYPE: row.PERSONNEL_TYPE,
TITLE: row.TITLE,
ISSTATE: row.ISSTATE,
INCUMBENCY: row.INCUMBENCY,
WORKING_DATE: row.WORKING_DATE,
ENTRY_DATE: row.ENTRY_DATE,
TYPE_OF_WORK: row.TYPE_OF_WORK,
DUTIES: row.DUTIES,
DEGREE_OF_EDUCATION: row.DEGREE_OF_EDUCATION,
DATE_OF_BIRTH: row.DATE_OF_BIRTH,
POLITICAL_OUTLOOK: row.POLITICAL_OUTLOOK,
PROVINCE: row.PROVINCE,
CITY: row.CITY,
COUNTRY: row.COUNTRY,
VILLAGE: row.VILLAGE,
USER_ID: row.USER_ID,
CARD_NO: row.USER_ID_CARD,
USERNAME: row.USERNAME,
NAME: row.NAME,
CORPINFO_ID: row.CORPINFO_ID,
CORPINFO_NAME: row.CORPINFO_NAME || '',
DEPARTMENT_ID: row.DEPARTMENT_ID,
DEPARTMENT_NAME: row.DEPARTMENT_NAME,
EMAIL: row.EMAIL || '',
CARD_TYPE: '111',
CARD_TYPE_NAME: '身份证',
NATION: row.NATION_NAME || '',
SEX: row.SEX === '0' ? '男' : '女',
USER_TYPE: '1',
ISDELETE: row.ISDELETE
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('推送成功')
this.getList()
} else {
this.$message.error('推送失败,' + data.msg)
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
},
goCheck() {
if (this.pd.USER_ID_CARD && this.pd.PHONE) {
const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
const phoneResult = phoneJudge.test(this.pd.PHONE)
const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
if (phoneResult && cardResult) {
console.log('格式校验通过')
requestFN(
'user/goCheck',
{
CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.PHONE,
USER_ID: this.pd.USER_ID || ''
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.error('验证失败,请确认身份证号与手机号是否正确')
this.ISCHECK = false
}
}).catch((e) => {
this.listLoading = false
this.ISCHECK = false
})
} else {
this.ISCHECK = false
}
} else {
this.ISCHECK = false
}
},
getList() {
this.listLoading = true
requestFN(
@ -397,7 +523,8 @@ export default {
PROVINCE: this.keyShudi[0] || '',
CITY: this.keyShudi[1] || '',
COUNTRY: this.keyShudi[2] || '',
VILLAGE: this.keyShudi[3] || ''
VILLAGE: this.keyShudi[3] || '',
ISPUSH: '1'
}
).then((data) => {
this.listLoading = false
@ -471,6 +598,7 @@ export default {
},
handleAdd() {
this.dialogFormEdit = true
this.ISCHECK = false
this.pd = {}
this.dialogType = 'saveUser'
this.pd.PASSWORD = 'Aa@123456789'
@ -501,7 +629,7 @@ export default {
this.varList = []
this.$refs.deptTree.clearHandle()
this.listQuery.page = 1
this.getList()
this.goPush(data.pd)
}).catch((e) => {
this.listLoading = false
})
@ -643,6 +771,7 @@ export default {
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.goPush(row)
this.getList()
}
}).catch((e) => {
@ -684,6 +813,17 @@ export default {
this.listLoading = false
})
},
//
getDict2(dicID, listName) {
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: dicID }
).then((data) => {
this.uesrInfoDic[listName] = data.list
}).catch((e) => {
this.listLoading = false
})
},
getDepartTreeList() {
this.pd.DEPARTMENT_ID = ''
if (this.$refs.deptTree) {

View File

@ -0,0 +1,930 @@
<template>
<div class="app-container">
<el-container>
<el-aside width="300px" style="background-color:#fff">
<el-input
v-model="filterText"
placeholder="输入关键字进行过滤"
style="margin:10px 0"/>
<el-tree
v-loading="treeLoading"
ref="tree"
:data="treeData"
:props="defaultProps"
:filter-node-method="filterNode"
class="filter-tree"
@node-click="handleNodeClick"/>
</el-aside>
<el-main>
<div class="filter-container">
<div class="filter-lable w80">用户名称</div>
<el-input v-model="keyUserName" clearable placeholder="搜索用户名" class="filter-item" style="width: 200px;"/>
<div class="filter-lable w80">职务级别</div>
<el-select ref="refDeptLeven" v-model="keyJobLeven" clearable placeholder="请选择部门级别" class="filter-item" style="width: 200px;" >
<el-option v-for="item in deptTypeLevenAllList" :key="item.BIANMA" :label="item.NAME" :value="item.DICTIONARIES_ID" />
</el-select>
<!-- <div class="filter-lable w80">行政区域</div>-->
<!-- <el-cascader ref="shudi" v-model="keyShudi" :props="areaprops" clearable placeholder="请选择行政区域" style="width: 200px" />-->
<!-- <div class="filter-lable w80">单位类型</div>-->
<!-- <el-select ref="refDeptType" v-model="keyDeptType" clearable placeholder="请选择单位类型" class="filter-item">-->
<!-- <el-option v-for="item in unitTypeList" :key="item.DICTIONARIES_ID" :label="item.NAME" :value="item.DICTIONARIES_ID" />-->
<!-- </el-select>-->
<div class="filter-lable w80">部门名称</div>
<el-input v-model="keyDepeName" clearable placeholder="搜索部门名称" class="filter-item" style="width: 200px;"/>
<!-- <div class="filter-lable w80">职务级别</div>-->
<!-- <el-select ref="refJobLeven" v-model="keyJobLeven" clearable placeholder="请选择" class="filter-item">-->
<!-- <el-option v-for="item in jobTypeAllList" :key="item.DICTIONARIES_ID" :label="item.NAME" :value="item.DICTIONARIES_ID" />-->
<!-- </el-select>-->
<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-button v-waves v-if="LOGIN_USER === '1'" class="filter-item" type="warning" icon="el-icon-warning" size="mini" plain @click="resetPassword">
一键密码重置
</el-button>
</div>
<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
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="USERNAME" label="用户名" />
<el-table-column prop="NAME" label="姓名" />
<el-table-column prop="SEX" label="性别">
<template slot-scope="{row}">
<span v-if="row.SEX =='0'"></span>
<span v-if="row.SEX =='1'"></span>
</template>
</el-table-column>
<el-table-column prop="DEPARTMENT_NAME" label="部门" />
<el-table-column prop="jobLevenName" label="职务级别" />
<el-table-column prop="STATUS" label="状态" >
<template slot-scope="{row}">
<span v-if="row.STATUS =='0'"></span>
<span v-if="row.STATUS =='1'"></span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}">
<el-button v-show="edit" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row)"></el-button>
<el-button v-show="edit" type="success" icon="el-icon-view" size="mini" @click="resetPwd(row.USER_ID)"></el-button>
<el-button v-show="edit && row.STATUS === '99'" type="warning" icon="el-icon-unlock" size="mini" @click="unLockUser(row.USER_ID, row.NAME)"></el-button>
<el-button v-show="row.STATUS== 0" type="primary" icon="el-icon-edit" size="mini" @click="handleEditStatus(row,'1', row.USER_ID)"></el-button>
<el-button v-show="row.STATUS== 1" type="primary" icon="el-icon-edit" size="mini" @click="handleEditStatus(row,'0', row.USER_ID)"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row)"></el-button>
<el-button v-if="row.ISPUSH != '1'" type="primary" icon="el-icon-position" size="mini" @click="goPush(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<template >
<el-button v-show="add" type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<el-button v-show="del" type="danger" icon="el-icon-delete" plain @click="makeAll('0')"></el-button>
</template>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</el-main>
</el-container>
<el-dialog v-loading="editloading" :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="600px">
<el-form ref="form" :rules="rules" :model="pd" label-width="110px" style="width: 500px;">
<el-form-item label="角色" prop="ROLE_ID">
<el-select v-model="pd.ROLE_ID" multiple placeholder="请选择角色">
<el-option v-for="item in roleList" :key="item.role_ID" :label="item.role_NAME" :value="item.role_ID" />
</el-select>
</el-form-item>
<el-form-item label="用户名" prop="USERNAME">
<el-input v-model="pd.USERNAME" :disabled="dialogType == 'editUser'" placeholder="这里输入用户名..." @blur="goCheck()"/>
</el-form-item>
<el-form-item label="姓名" prop="NAME">
<el-input v-model="pd.NAME" placeholder="这里输入姓名..." />
</el-form-item>
<el-form-item v-if="dialogType != 'editUser'" label="密码" prop="PASSWORD">
<el-input v-model="pd.userPASSWORD" show-password placeholder="这里输入密码..." />
</el-form-item>
<el-form-item label="身份证号" prop="USER_ID_CARD">
<el-input v-model="pd.USER_ID_CARD" placeholder="这里输入身份证号..." @blur="goCheck()"/>
</el-form-item>
<el-form-item label="性别" prop="SEX">
<el-radio v-model="pd.SEX" :label="'0'"></el-radio>
<el-radio v-model="pd.SEX" :label="'1'"></el-radio>
</el-form-item>
<el-form-item label="手机号" prop="PHONE">
<el-input v-model="pd.PHONE" placeholder="这里输入手机号..." />
</el-form-item>
<!-- <el-form-item label="部门级别" prop="deptTypeID"> &lt;!&ndash;目的是选择部门到这个级别 &ndash;&gt;-->
<!-- <el-select v-model="pd.deptTypeID" placeholder="请选择" class="filter-item" >-->
<!-- <el-option v-for="item in deptTypeLevenAllList" :key="item.BIANMA" :label="item.NAME" :value="item.DICTIONARIES_ID" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="单位部门" prop="DEPARTMENT_ID">
<SelectTree
v-if="dialogFormEdit"
ref="deptTree"
:clearable="false"
:options="deptTreeData"
:props="deptDefaultProps"
v-model="pd.DEPARTMENT_ID"
placeholder="请选择部门"
/>
</el-form-item>
<el-form-item label="行政区域" prop="shudi"> <!--河北省的就可以 -->
<el-cascader v-if="dialogFormEdit" id="shudi" ref="shudi" v-model="pd.shudi" :props="areaprops" placeholder="请选择省市县" style="width: 100%" />
</el-form-item>
<el-form-item label="职务级别" prop="JOB_LEVEL">
<el-select ref="refJobLevel" v-model="pd.JOB_LEVEL" placeholder="请选择" class="filter-item">
<el-option v-for="item in deptTypeLevenAllList" :key="item.BIANMA" :label="item.NAME" :value="item.DICTIONARIES_ID" />
</el-select>
</el-form-item>
<el-form-item label="民族" prop="NATION">
<el-select v-model="pd.NATION" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in uesrInfoDic.minzuList"
:key="item.DICTIONARIES_ID"
:label="item.NAME"
:value="item.DICTIONARIES_ID"/>
</el-select>
</el-form-item>
<!-- 相关方的业务需求,是否为审核人员.如果为是的情况,就是可以在入场培训中选择 -->
<el-form-item label="是否审核人员" prop="ISASSESS">
<el-radio v-model="pd.ISASSESS" :label="'1'"></el-radio>
<el-radio v-model="pd.ISASSESS" :label="'0'"></el-radio>
</el-form-item>
<el-form-item label="职务" prop="JOB">
<el-input v-model="pd.JOB" placeholder="这里输入职务..." />
</el-form-item>
<el-form-item label="邮箱" prop="EMAIL">
<el-input v-model="pd.EMAIL" placeholder="这里输入邮箱..." />
</el-form-item>
<el-form-item label="排序" prop="SORT">
<el-input v-model.number="pd.SORT" placeholder="这里输入排序..." />
</el-form-item>
<el-form-item label="备注">
<el-input v-model="pd.BZ" type="textarea" placeholder="这里输入备注说明..." />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button v-show="ISCHECK" type="primary" @click="confirm"> </el-button>
<el-button v-show="!ISCHECK" type="primary" @click="goCheck"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import SelectTree from '@/components/SelectTree'
export default {
components: { Pagination, SelectTree },
directives: { waves },
data() {
var hasUser = (rule, value, callback) => {
if (this.dialogType != 'editUser') {
requestFN(
'/user/hasUser',
{
USERNAME: value,
tm: new Date().getTime()
}
).then((data) => {
if (data.result == 'success') {
callback()
} else {
callback(new Error('用户名重复'))
}
}).catch((e) => {
})
} else {
callback()
}
}
var hasEmail = (rule, value, callback) => {
if (value) {
requestFN(
'/user/hasEmail',
{
EMAIL: value,
USERNAME: this.pd.USERNAME
}
).then((data) => {
if (data.result == 'success') {
callback()
} else {
callback(new Error('邮箱重复'))
}
}).catch((e) => {
})
} else {
callback()
}
}
return {
LOGIN_USER: JSON.parse(sessionStorage.getItem('user')).USER_ID,
treeLoading: false,
treeData: [],
defaultProps: {
children: 'nodes',
label: 'name'
},
listQuery: {
page: 1,
limit: 20
},
total: 0,
varList: [],
filterText: '',
keyUserName: '',
keyDeptLeven: '',
keyShudi: '',
keyDeptType: '',
keyDepeName: '',
keyJobLeven: '',
ISCHECK: false,
dialogFormEdit: false,
editloading: false,
dialogType: 'add',
rules: {
EMAIL: [
{ required: true, message: '请输入邮箱', trigger: 'blur' },
{
pattern: /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/,
message: '请输入正确的邮箱'
},
{ validator: hasEmail, trigger: 'blur' }
],
ROLE_ID: [
{ required: true, message: '角色不能为空', trigger: 'blur' }
],
USERNAME: [
{ required: true, message: '用户名不能为空', trigger: 'blur' }
// ,{
// pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
// message: '使'
// },
// { validator: hasUser, trigger: 'blur' }
],
NAME: [
{ required: true, message: '姓名不能为空', trigger: 'blur' },
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }
],
SEX: [
{ required: true, message: '请选择性别', trigger: 'blur' }
],
NATION: [
{ required: true, message: '请选择民族', trigger: 'blur' }
],
PHONE: [
{ required: true, message: '手机号不能为空', trigger: 'blur' },
{ min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' },
{
pattern: /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/,
message: '请输入正确的手机号码'
}
],
deptTypeID: [
{ required: true, message: '请选择部门级别', trigger: 'blur' }
],
shudi: [
{ required: true, message: '请选择属地', trigger: 'blur' }
],
JOB_LEVEL: [
{ required: true, message: '请选择职务级别', trigger: 'blur' }
],
DEPARTMENT_ID: [
{ required: true, message: '请选择单位部门', trigger: 'blur' }
],
ISASSESS: [
{ required: true, message: '请选择是否审核人员', trigger: 'blur' }
],
USER_ID_CARD: [{ required: true, message: '身份证号不能为空', trigger: 'blur' },
{
pattern: /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/,
message: '请输入正确的身份证号'
}
]
},
uesrInfoDic: {
minzuList: [], // 0a0e406f27f74ee698fe9979d25f62dd
xingbieList: [], // 21501808bbc344d593fbf9ccfe6c4531
},
pd: {
ROLE_ID: [], // ID
USERNAME: '', //
NAME: '', //
userPASSWORD: 'Aa@123456789', //
SEX: '', // 01
PHONE: '', //
deptTypeID: '', //
DEPARTMENT_ID: '', //
shudi: '',
BZ: '', //
EMAIL: '', //
SORT: '', //
PROVINCE: '', //
CITY: '', //
COUNTRY: '', //
VILLAGE: '', //
JOB_LEVEL: '', //
ISASSESS: '',
JOB: '', //
USER_ID_CARD: '', //
NATION: '' //
},
roleList: [],
multipleSelectionAll: [], //
multipleSelection: [], //
fromExcel: false, // excel
toExcel: false, // excel
add: false, //
del: false, //
edit: false, //
hasUserRet: false,
deptTypeLevenAllList: [], //
jobTypeAllList: [], //
deptTreeData: [], // ,
deptDefaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
unitTypeList: [],
areaprops: {
lazy: true,
lazyLoad(node, resolve) {
setTimeout(() => {
const areaLeven = node.level
var areaParID = ''
if (areaLeven == '0') {
areaParID = 'e725d2a91b8248f4b8f49889038df7de'
} else {
areaParID = node.data.id
}
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: areaParID }
).then((data) => {
const nodes = data.list.map(item => ({
value: item.DICTIONARIES_ID,
label: item.NAME.toString(),
id: item.DICTIONARIES_ID.toString(),
leaf: areaLeven > 2
}))
resolve(nodes) // resolve
}).catch((e) => {
this.editloading = false
this.listLoading = false
})
}, 500)
}
}
}
},
watch: {
filterText(val) {
this.$refs.tree.filter(val)
}
},
created() {
this.getList()
this.hasButton()
this.getDict2('0a0e406f27f74ee698fe9979d25f62dd', 'minzuList')
this.getDict2('21501808bbc344d593fbf9ccfe6c4531', 'xingbieList')
this.getDict('3e057d284c294a48af32948d58e92e3d', 'deptTypeLevenAllList')
this.getDict('3f3a6ac41247438e91df2830765068ba', 'unitTypeList')
this.getDepartTreeList()
this.getDict('f1fbdf9a286342ae98e6a56bf823f221', 'jobTypeAllList')
this.goAddUser()
this.getTreeList()
},
methods: {
goPush(row) {
requestFN(
'user/goPush',
{
STATUS: row.STATUS,
BZ: row.BZ,
SKIN: row.SKIN,
PHONE: row.PHONE,
NUMBER: row.NUMBER,
ISMAIN: row.ISMAIN,
OPENID: row.APPID,
SORT: row.SORT,
LEARNERCATEGORY: row.LEARNERCATEGORY,
USERAVATARPREFIX: row.USERAVATARPREFIX,
USERAVATARURL: row.USERAVATARURL,
SHIFTDUTYONE: row.SHIFTDUTYONE,
SHIFTDUTYTWO: row.SHIFTDUTYTWO,
DURATION: row.DURATION,
WORKSTATUS: row.WORKSTATUS,
WORKPERIOD: row.WORKPERIOD,
PERSONNEL_TYPE: row.PERSONNEL_TYPE,
TITLE: row.TITLE,
ISSTATE: row.ISSTATE,
INCUMBENCY: row.INCUMBENCY,
WORKING_DATE: row.WORKING_DATE,
ENTRY_DATE: row.ENTRY_DATE,
TYPE_OF_WORK: row.TYPE_OF_WORK,
DUTIES: row.DUTIES,
DEGREE_OF_EDUCATION: row.DEGREE_OF_EDUCATION,
DATE_OF_BIRTH: row.DATE_OF_BIRTH,
POLITICAL_OUTLOOK: row.POLITICAL_OUTLOOK,
PROVINCE: row.PROVINCE,
CITY: row.CITY,
COUNTRY: row.COUNTRY,
VILLAGE: row.VILLAGE,
USER_ID: row.USER_ID,
CARD_NO: row.USER_ID_CARD,
USERNAME: row.USERNAME,
NAME: row.NAME,
CORPINFO_ID: row.CORPINFO_ID,
CORPINFO_NAME: row.CORPINFO_NAME || '',
DEPARTMENT_ID: row.DEPARTMENT_ID,
DEPARTMENT_NAME: row.DEPARTMENT_NAME,
EMAIL: row.EMAIL || '',
CARD_TYPE: '111',
CARD_TYPE_NAME: '身份证',
NATION: row.NATION_NAME || '',
SEX: row.SEX === '0' ? '男' : '女',
USER_TYPE: '0',
ISDELETE: row.ISDELETE != null ? row.ISDELETE : "0"
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('推送成功')
this.getList()
} else {
this.$message.error('推送失败,' + data.msg)
}
}).catch((e) => {
this.listLoading = false
})
},
goCheck() {
if (this.pd.USER_ID_CARD && this.pd.PHONE) {
const phoneJudge = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[0-9])\d{8}$/
const phoneResult = phoneJudge.test(this.pd.PHONE)
const cardJudge = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
// alert(this.pd.PHONE)
// alert(phoneResult)
// alert(this.pd.USER_ID_CARD)
// alert(cardResult)
if (phoneResult && cardResult) {
console.log('格式校验通过')
requestFN(
'user/goCheck',
{
CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.PHONE,
USER_ID: this.pd.USER_ID
}
).then((data) => {
if (data.result === 'success') {
this.$message.success('验证通过')
this.ISCHECK = true
} else {
this.$message.error('验证失败,请确认身份证号与手机号是否正确')
this.ISCHECK = false
}
}).catch((e) => {
this.listLoading = false
this.ISCHECK = false
})
} else {
this.ISCHECK = false
}
} else {
this.ISCHECK = false
}
},
getList() {
this.listLoading = true
requestFN(
'/user/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
keyUserName: this.keyUserName,
keyDeptLeven: this.keyDeptLeven,
keyShudi: this.keyShudi,
keyDeptType: this.keyDeptType,
keyDepeName: this.keyDepeName,
keyJobLeven: this.keyJobLeven,
DEPARTMENT_ID: this.DEPARTMENT_ID,
PROVINCE: this.keyShudi[0] || '',
CITY: this.keyShudi[1] || '',
COUNTRY: this.keyShudi[2] || '',
VILLAGE: this.keyShudi[3] || '',
ISPUSH: '0'
}
).then((data) => {
this.listLoading = false
this.varList = data.userList
this.total = data.page.totalResult
})
.catch((e) => {
this.listLoading = false
})
},
goKeyReset() {
this.keyUserName = ''
this.keyDeptLeven = ''
this.keyShudi = ''
this.keyDeptType = ''
this.keyDepeName = ''
this.keyJobLeven = ''
this.getList()
if (this.$refs.refDeptLeven) {
this.$refs.refDeptLeven.clearHandle()
}
if (this.$refs.shudi) {
this.$refs.shudi.clearHandle()
}
if (this.$refs.refDeptType) {
this.$refs.refDeptType.clearHandle()
}
if (this.$refs.refJobLeven) {
this.$refs.refJobLeven.clearHandle()
}
},
goAddUser() { //
requestFN(
'/user/goAddUser',
{
}
).then((data) => {
this.roleList = data.roleList
})
.catch((e) => {
})
},
unLockUser(id, name) {
this.$confirm('确定要解锁 [ 帐号:' + name + ' ] 吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/unLockUser',
{
USER_ID: id
}
).then(() => {
this.$message({
message: '解锁成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
handleAdd() {
this.dialogFormEdit = true
this.ISCHECK = false
this.pd = {}
this.dialogType = 'saveUser'
this.pd.PASSWORD = 'Aa@123456789'
},
confirm() {
this.$refs.form.validate(valid => {
if (valid) {
this.listLoading = true
if (this.pd.ROLE_ID) {
var roleIDs = ''
this.pd.ROLE_ID.forEach((item) => {
roleIDs += item + ';'
})
this.pd.roleIDs = roleIDs
}
if (this.pd.shudi) {
this.pd.PROVINCE = this.pd.shudi[0]
this.pd.CITY = this.pd.shudi[1]
this.pd.COUNTRY = this.pd.shudi[2] || ''
this.pd.VILLAGE = this.pd.shudi[3] || ''
}
requestFN(
'/user/' + this.dialogType,
this.pd
).then((data) => {
this.listLoading = false
this.dialogFormEdit = false
this.varList = []
this.$refs.deptTree.clearHandle()
this.listQuery.page = 1
console.log(data.pd)
this.goPush(data.pd)
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
}
})
},
handleDelete(row) {
this.$confirm('确定要删除[' + row.USERNAME + ']吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/deleteUser',
{
USER_ID: row.USER_ID,
ISPUSH: row.ISPUSH
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
makeAll(msg) {
const _selectData = this.$refs.multipleTable.selection
if (_selectData == null || _selectData.length == 0) {
this.$message({
message: '请选中要删除的项...',
type: 'error'
})
return false
}
const ids = _selectData.map((item, index) => {
return item.USER_ID
}).join(',')
var tishi = ''
if (msg == '0') {
tishi = '确定要删除选中的数据吗?'
} else if (msg == '1') {
tishi = '确定要给选中的用户发送站内信吗?'
} else {
this.$message({
message: '请选择操作类型...',
type: 'error'
})
return false
}
this.$confirm(tishi, {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (msg == '0') {
this.listLoading = true
requestFN(
'/user/deleteAllUser',
{
USER_IDS: ids
}
).then(() => {
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.$refs.multipleTable.clearSelection()
this.getList()
}).catch((e) => {
this.listLoading = false
})
}
}).catch(() => {
})
},
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
async handleEdit(row) {
console.log(row)
this.dialogType = 'editUser'
this.pd = JSON.parse(JSON.stringify(row))
const areaRefID = []
if (this.pd.PROVINCE) {
areaRefID.push(this.pd.PROVINCE)
}
if (this.pd.CITY) {
areaRefID.push(this.pd.CITY)
}
if (this.pd.COUNTRY) {
areaRefID.push(this.pd.COUNTRY)
}
if (this.pd.VILLAGE) {
areaRefID.push(this.pd.VILLAGE)
}
this.$set(this.pd, 'shudi', areaRefID)
const refDeptLevelVal = {}
refDeptLevelVal.id = this.pd.deptLevenlID
const deptRefsValue = {}
deptRefsValue.id = this.pd.DEPARTMENT_ID
var arrString = []
if (this.pd.ROLE_ID != null && this.pd.ROLE_ID != '') {
arrString.push(this.pd.ROLE_ID)
}
if (this.pd.ROLE_IDS != null && this.pd.ROLE_IDS != '' && this.pd.ROLE_IDS != undefined && this.pd.ROLE_IDS != 'undefined') {
//
this.pd.ROLE_IDS = this.pd.ROLE_IDS.substring(0, this.pd.ROLE_IDS.length - 1)
var arrList = this.pd.ROLE_IDS && this.pd.ROLE_IDS != '' ? this.pd.ROLE_IDS.split(';') : ''
// eslint-disable-next-line no-unused-vars
for (const item1 of arrList) { // ID
arrString.push(item1)
}
}
this.pd.ROLE_ID = arrString
this.dialogFormEdit = true
await this.$nextTick()
},
handleEditStatus(row, type) {
const typeName = type == '1' ? '禁用' : '启用'
this.$confirm('确定要' + typeName + '[' + row.USERNAME + ']吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/updateUserStatus',
{
USER_ID: row.USER_ID,
status: type
}
).then((data) => {
if (data.result == 'success') {
this.listLoading = false
this.goPush(row)
this.getList()
}
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
hasButton: function() {
var keys = 'user:add,user:del,user:edit,fhSms,email,fromExcel,toExcel'
requestFN(
'/head/hasButton',
{
keys: keys, tm: new Date().getTime()
}
).then((data) => {
if (data.result == 'success') {
this.add = data.userfhadminadd //
this.del = data.userfhadmindel //
this.edit = data.userfhadminedit //
this.fromExcel = data.fromExcel // excel
this.toExcel = data.toExcel // excel
} else if (data.result == 'exception') {
// showException('', data.exception)//
}
})
.catch((e) => {
this.listLoading = false
})
},
//
getDict(dicID, listName) {
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: dicID }
).then((data) => {
this[listName] = data.list
}).catch((e) => {
this.listLoading = false
})
},
//
getDict2(dicID, listName) {
requestFN(
'dictionaries/getLevels',
{ DICTIONARIES_ID: dicID }
).then((data) => {
this.uesrInfoDic[listName] = data.list
}).catch((e) => {
this.listLoading = false
})
},
getDepartTreeList() {
this.pd.DEPARTMENT_ID = ''
if (this.$refs.deptTree) {
this.$refs.deptTree.clearHandle()
}
return new Promise((resolve) => {
requestFN(
'/department/listTreeByType'
).then((data) => {
this.deptTreeData = JSON.parse(data.zTreeNodes)
resolve()
}).catch((e) => {
})
})
},
resetPwd(id, name) {
this.$confirm('是否重置密码为Aa@123456789?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/resetPwd',
{
USER_ID: id
}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
filterNode(value, data) {
if (!value) return true
return data.name.indexOf(value) !== -1
},
handleNodeClick(node, data, value) {
this.DEPARTMENT_ID = node.id
this.getList()
},
resetPassword() {
this.$confirm('一键重置密码,会将所有未修改过密码的用户进行密码重置重置,是否继续?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.listLoading = true
requestFN(
'/user/resetPwdAll',
{}
).then(() => {
this.$message({
message: '重置成功',
type: 'success'
})
this.listLoading = false
this.varList = []
this.listQuery.page = 1
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
},
getTreeList() {
this.treeLoading = true
requestFN(
'/department/listTree',
{}
).then((data) => {
this.treeLoading = false
this.treeData = JSON.parse(data.zTreeNodes)
}).catch((e) => {
this.treeLoading = false
})
}
}
}
</script>

View File

@ -95,6 +95,7 @@
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column align="center" prop="TYPE_NAME" label="文件类型" />
<el-table-column align="center" prop="FILE_NAME" label="文件名称" />
<el-table-column align="center" prop="TYPE_TWO_NAME" label="部门分类" />
<el-table-column align="center" prop="UPLOAD_TIME" label="上传时间" />
<el-table-column align="center" prop="UPLOAD_USER_NAME" label="上传人" />

View File

@ -60,11 +60,12 @@
<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 label="操作" align="center" width="350">
<el-table-column label="操作" align="center" width="450">
<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.CHECK_STATUS == '2'" type="success" size="mini" @click="sendMessage(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>
@ -127,6 +128,31 @@ export default {
page: 1,
limit: 10
},
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: '',
XGF_USER_ID:'',
FLOWS_STEP:'1',
FLOWS_TYPE:'2',
repeatPush: '1',
tm: new Date().getTime(),
list: [],
isShow: true,
info: {},
TYPE: null,
BACK_NAME: '',
BACK_STEP: ''
},
total: 0,
varList: [],
KEYWORDS: '',
@ -168,6 +194,72 @@ export default {
}
this.getList()
},
//
sendMessage(item){
this.form.STATUS = 1
this.form.STEP = false
this.form.TYPE = 2
this.form.BACK_STEP = -1
this.form.XGF_USER_ID = item.XGF_USER_ID
this.form.repeatPush = '1'
this.form.FLOWS_STEP = '1'
this.form.FLOWS_TYPE = '2'
if (this.form.TYPE !== '2') {
this.loading = true
requestFN('/xgf/user/repeatPush', this.form)
.then((data) => {
if (data.code === '0') {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
this.handleClose()
} else {
this.$message.error(data.errorMessage)
}
this.loading = false
})
.catch((e) => {
console.log(e)
})
} else {
const formData = new FormData()
this.form.chengNuoFlag = '1'
Object.keys(this.form).map(key => {
formData.append(key, this.form[key])
})
if (this.form.APPOINT_ANNEX) {
for (let i = 0; i < this.form.APPOINT_ANNEX.length; i++) {
formData.append('weiTuoShu', this.form.APPOINT_ANNEX[i].raw)
}
}
this.loading = true
upload('/xgf/user/repeatPush', formData)
.then((data) => {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
this.handleClose()
this.loading = false
})
.catch((e) => {
console.log(e)
})
}
},
handleClose() {
this.form = {
STATUS: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
OPINION: '',
user: '',
list: [],
tm: new Date().getTime()
}
},
goKeyReset() {
this.KEYWORDS = ''
this.STATUS = ''

View File

@ -275,6 +275,7 @@
style="object-fit: cover; width: 40px; height: 40px"/>
<el-image
v-if="item.FILEPATH_BACK"
:src="config.fileUrl + item.FILEPATH_BACK"
:preview-src-list="[config.fileUrl + item.FILEPATH_BACK]"
z-index="8000"
style="object-fit: cover; width: 40px; height: 40px"/>

View File

@ -0,0 +1,22 @@
<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 lang="scss">
</style>

View File

@ -0,0 +1,740 @@
<template>
<div class="app-container">
<!-- 顶部搜索能力 -->
<el-form :model="searchParmas" label-width="130px">
<el-row>
<el-col :span="6">
<el-form-item label="企业名称">
<el-input v-model="searchParmas.enterpriseName" placeholder="请输入企业名称" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="集团单位">
<el-input v-model="searchParmas.groupUnit" placeholder="请输入集团单位" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="股份主管部门" style="margin-right: 20px">
<el-input v-model="searchParmas.shareSuperdepart" placeholder="请输入股份主管部门" />
</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
v-loading="loading"
ref="multipleTable"
:data="varList"
:header-cell-style="{ 'font-weight': 'bold', color: '#000' }"
:max-height="tableMaxHeight"
tooltip-effect="dark"
border
fit
stripe
highlight-current-row
@selection-change="selectionChange"
@select-all="selectAll">
<!-- 固定列 -->
<el-table-column :selectable="handleSelectWithDifferentStatus" type="selection" width="55" fixed align="center" />
<!-- 序号列及弹出框 -->
<el-table-column type="index" fixed="left" label="序号" align="center" width="90">
<template slot="header">
<el-popover ref="tablePopover" v-model="popoverVisible" width="240" trigger="manual">
<span slot="reference" style="cursor: pointer" @click="openPopover">
序号
<i class="el-icon-finished" style="font-weight: bold" />
</span>
<div class="popoverCheckBoxArea">
<el-checkbox
v-model="checked"
:indeterminate="indeterminate"
@change="handleCheckAllChange">全选</el-checkbox>
<div style="margin: 10px 0" />
<el-tree
ref="treeRef"
:data="dataSourceForTree"
:props="defaultProps"
:default-expand-all="true"
show-checkbox
node-key="id"
class="treeColumnStyle"
@check-change="changeCheck" />
</div>
<div class="popoverCheckBoxButton">
<el-button size="mini" @click="canclePopover"></el-button>
<el-button type="primary" size="mini" @click="confirmPopover"></el-button>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column v-if="showColumn('RELEVANT_UNIT_NAME')" prop="RELEVANT_UNIT_NAME" label="企业名称" align="center" show-overflow-tooltip width="120"/>
<el-table-column v-if="showColumn('CORP_TYPE_NAME')" prop="CORP_TYPE_NAME" label="集团单位" show-overflow-tooltip align="center" width="120"/>
<el-table-column v-if="showColumn('MAIN_DEPARTMENT_NAME')" prop="MAIN_DEPARTMENT_NAME" label="股份主管部门" align="center" width="120"/>
<el-table-column v-if="showColumn('CORP_SIZE_NAME')" prop="CORP_SIZE_NAME" label="企业规模" align="center" width="120"/>
<el-table-column v-if="showColumn('CONTACT_PERSON')" prop="CONTACT_PERSON" label="主要负责人" align="center" width="120"/>
<el-table-column v-if="showColumn('CONTACT_TEL')" prop="CONTACT_TEL" label="主要负责人联系电话" align="center" width="120"/>
<el-table-column v-if="showColumn('REGISTER_COUNT')" prop="REGISTER_COUNT" label="注册人数" align="center" width="120"/>
<el-table-column v-if="showColumn('PASS_COUNT')" prop="PASS_COUNT" label="培训合格人数" align="center" width="120"/>
<el-table-column v-if="showColumn('personAgeStruc')" prop="personAgeStruc" label="人员年龄结构" align="center">
<el-table-column v-if="showColumn('AVG_AGE')" prop="AVG_AGE" label="平均年龄" align="center" width="120"/>
<el-table-column v-if="showColumn('MORE_THAN_60_COUNT')" prop="MORE_THAN_60_COUNT" label="大于60岁人数" align="center" width="120"/>
<el-table-column v-if="showColumn('BETWEEN_55_AND_60_COUNT')" prop="BETWEEN_55_AND_60_COUNT" label="55-60岁人数" align="center" width="120"/>
<el-table-column v-if="showColumn('LESS_THAN_55_COUNT')" prop="LESS_THAN_55_COUNT" label="55岁以下人数" align="center" width="120"/>
</el-table-column>
<el-table-column v-if="false" prop="workExprien" label="在港工作经历(年)" align="center" width="120"/>
<el-table-column v-if="showColumn('personEducation')" prop="personEducation" label="人员学历" align="center">
<el-table-column v-if="showColumn('BELOW_HIGH_SCHOOL')" prop="BELOW_HIGH_SCHOOL" label="高中以下" align="center" width="120"/>
<el-table-column v-if="showColumn('HIGH_SCHOOL')" prop="HIGH_SCHOOL" label="高中" align="center" width="120"/>
<el-table-column v-if="showColumn('TECHNICAL_SCHOOL')" prop="TECHNICAL_SCHOOL" label="技工" align="center" width="120"/>
<el-table-column v-if="showColumn('TECHNICAL_SECONDARY_SCHOOL')" prop="TECHNICAL_SECONDARY_SCHOOL" label="中专或中等技术学校" align="center" width="130"/>
<el-table-column v-if="showColumn('JUNIOR_COLLEGE')" prop="JUNIOR_COLLEGE" label="大学专科或专科院校" align="center" width="130"/>
<el-table-column v-if="showColumn('UNDERGRADUATE')" prop="UNDERGRADUATE" label="大学本科" align="center" width="120"/>
<el-table-column v-if="showColumn('ABOVE_UNDERGRADUATE')" prop="ABOVE_UNDERGRADUATE" label="大学本科以上" align="center" width="120"/>
</el-table-column>
<el-table-column v-if="showColumn('man')" prop="man" label="男职工" align="center">
<el-table-column v-if="showColumn('MAN_COUNT')" prop="MAN_COUNT" label="人数" align="center" width="120"/>
<el-table-column v-if="showColumn('MAN_PERCENT')" prop="MAN_PERCENT" label="占比" align="center" width="120"/>
</el-table-column>
<el-table-column v-if="showColumn('woman')" prop="woman" label="女职工" align="center">
<el-table-column v-if="showColumn('WOMAN_COUNT')" prop="WOMAN_COUNT" label="人数" align="center" width="120"/>
<el-table-column v-if="showColumn('WOMAN_PERCENT')" prop="WOMAN_PERCENT" label="占比" align="center" width="120"/>
</el-table-column>
<el-table-column v-if="showColumn('insurance')" prop="insurance" label="保险相关" align="center">
<el-table-column v-if="showColumn('SOCIAL')" prop="SOCIAL" label="有社保人数" align="center" width="120"/>
<el-table-column v-if="showColumn('OCCUPATIONAL_INJURY')" prop="OCCUPATIONAL_INJURY" label="有工伤保险人数" align="center" width="120"/>
<el-table-column v-if="showColumn('COMMERCIAL_INSURANCE')" prop="COMMERCIAL_INSURANCE" label="有商业保险人数" align="center" width="120"/>
<el-table-column v-if="showColumn('OTHER_INSURANCE')" prop="OTHER_INSURANCE" label="其他保险人数" align="center" width="120"/>
<el-table-column v-if="showColumn('NO_INSURANCE')" prop="NO_INSURANCE" label="无保险人数" align="center" width="120"/>
</el-table-column>
<el-table-column v-if="showColumn('numOfSpecialOperation')" prop="numOfSpecialOperation" label="取得特种作业证书人数" align="center">
<el-table-column v-if="showColumn('SPECIAL_TOTAL')" prop="SPECIAL_TOTAL" label="总人数" align="center" width="120"/>
<el-table-column v-if="showColumn('ELECTRICIAN')" prop="ELECTRICIAN" label="电工作业" align="center" width="120"/>
<el-table-column v-if="showColumn('WELDING')" prop="WELDING" label="焊接与热切割作业" align="center" width="120"/>
<el-table-column v-if="showColumn('HIGH_WORK')" prop="HIGH_WORK" label="高处作业" align="center" width="120"/>
<el-table-column v-if="showColumn('CRANE_OPERATION')" prop="CRANE_OPERATION" label="起重机械作业" align="center" width="120"/>
<el-table-column v-if="showColumn('MOTOR_VEHICLE')" prop="MOTOR_VEHICLE" label="企业内机动车辆作业" align="center" width="130"/>
<el-table-column v-if="showColumn('OTHER_SPECIAL')" prop="OTHER_SPECIAL" label="其他特种作业" align="center" width="120"/>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div>
<el-button type="primary" icon="el-icon-upload2" @click="handleExportBtn"></el-button>
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
// import axios from 'axios'
// import moment from 'moment'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
config: config,
searchParmas: {
enterpriseName: '',
groupUnit: '',
shareSuperdepart: ''
},
varList: [],
// el-table
tableMaxHeight: 0,
//
loading: false,
//
listQuery: {
page: 1,
limit: 10
},
total: 0,
//
dataSourceForTree: [
{
id: '1',
label: '企业名称',
value: 'RELEVANT_UNIT_NAME',
disabled: false,
show: true,
children: []
},
{
id: '2',
label: '集团单位',
value: 'CORP_TYPE_NAME',
disabled: false,
show: true,
children: []
},
{
id: '3',
label: '股份主管部门',
value: 'MAIN_DEPARTMENT_NAME',
disabled: false,
show: true,
children: []
},
{
id: '4',
label: '企业规模',
value: 'CORP_SIZE_NAME',
disabled: false,
show: true,
children: []
},
{
id: '5',
label: '主要负责人',
value: 'CONTACT_PERSON',
disabled: false,
show: true,
children: []
},
{
id: '6',
label: '主要负责人联系电话',
value: 'CONTACT_TEL',
disabled: false,
show: true,
children: []
},
{
id: '7',
label: '注册人数',
value: 'REGISTER_COUNT',
disabled: false,
show: true,
children: []
},
{
id: '8',
label: '培训合格人数',
value: 'PASS_COUNT',
disabled: false,
show: true,
children: []
},
{
id: '9',
label: '人员年龄结构',
disabled: false,
value: 'personAgeStruc',
show: true,
children: [
{
id: '9-1',
label: '平均年龄',
value: 'AVG_AGE',
disabled: false,
show: true,
children: []
},
{
id: '9-2',
label: '大于60岁人数',
value: 'MORE_THAN_60_COUNT',
disabled: false,
show: true,
children: []
},
{
id: '9-3',
label: '55-60岁人数:',
value: 'BETWEEN_55_AND_60_COUNT',
disabled: false,
show: true,
children: []
},
{
id: '9-4',
label: '55岁以下人数',
value: 'LESS_THAN_55_COUNT',
disabled: false,
show: true,
children: []
}
]
},
{
id: '11',
label: '人员学历',
disabled: false,
value: 'personEducation',
show: true,
children: [
{
id: '11-1',
label: '高中以下',
value: 'BELOW_HIGH_SCHOOL',
disabled: false,
show: true,
children: []
},
{
id: '11-2',
label: '高中',
value: 'HIGH_SCHOOL',
disabled: false,
show: true,
children: []
},
{
id: '11-3',
label: '技工',
value: 'TECHNICAL_SCHOOL',
disabled: false,
show: true,
children: []
},
{
id: '11-4',
label: '中专或中等技术学校',
value: 'TECHNICAL_SECONDARY_SCHOOL',
disabled: false,
show: true,
children: []
},
{
id: '11-5',
label: '大学专科或专科院校',
value: 'JUNIOR_COLLEGE',
disabled: false,
show: true,
children: []
},
{
id: '11-6',
label: '大学本科',
value: 'UNDERGRADUATE',
disabled: false,
show: true,
children: []
},
{
id: '11-7',
label: '大学本科以上',
value: 'ABOVE_UNDERGRADUATE',
disabled: false,
show: true,
children: []
}
]
},
{
id: '12',
label: '男职工',
value: 'man',
show: true,
disabled: false,
children: [
{
id: '12-1',
label: '人数',
value: 'MAN_COUNT',
disabled: false,
show: true,
children: []
},
{
id: '12-2',
label: '占比',
value: 'MAN_PERCENT',
disabled: false,
show: true,
children: []
}
]
},
{
id: '13',
label: '女职工',
show: true,
value: 'woman',
disabled: false,
children: [
{
id: '13-1',
label: '人数',
value: 'WOMAN_COUNT',
disabled: false,
show: true,
children: []
},
{
id: '13-2',
label: '占比',
value: 'WOMAN_PERCENT',
disabled: false,
show: true,
children: []
}
]
},
{
id: '14',
label: '保险相关',
value: 'insurance',
disabled: false,
show: true,
children: [
{
id: '14-1',
label: '有社保人数',
value: 'SOCIAL',
disabled: false,
show: true,
children: []
},
{
id: '14-2',
label: '有工伤保险人数',
value: 'OCCUPATIONAL_INJURY',
disabled: false,
show: true,
children: []
},
{
id: '14-3',
label: '有商业保险人数',
value: 'COMMERCIAL_INSURANCE',
disabled: false,
show: true,
children: []
},
{
id: '14-4',
label: '其他保险人数',
value: 'OTHER_INSURANCE',
disabled: false,
show: true,
children: []
},
{
id: '14-5',
label: '无保险人数',
value: 'NO_INSURANCE',
disabled: false,
show: true,
children: []
}
]
},
{
id: '15',
label: '取得特种作业证书人数',
value: 'numOfSpecialOperation',
disabled: false,
show: true,
children: [
{
id: '15-1',
label: '总人数',
value: 'SPECIAL_TOTAL',
disabled: false,
show: true,
children: []
},
{
id: '15-2',
label: '电工作业',
value: 'ELECTRICIAN',
disabled: false,
show: true,
children: []
},
{
id: '15-3',
label: '焊接与热切割作业',
value: 'WELDING',
disabled: false,
show: true,
children: []
},
{
id: '15-4',
label: '高处作业',
value: 'HIGH_WORK',
disabled: false,
show: true,
children: []
},
{
id: '15-5',
label: '起重机械作业',
value: 'CRANE_OPERATION',
disabled: false,
show: true,
children: []
},
{
id: '15-6',
label: '企业内机动车辆作业',
value: 'MOTOR_VEHICLE',
disabled: false,
show: true,
children: []
},
{
id: '15-7',
label: '其他特种作业',
value: 'OTHER_SPECIAL',
disabled: false,
show: true,
children: []
}
]
}
],
treeCheckedIds: [], // id
defaultProps: {
children: 'children',
label: 'label'
},
checked: true, //
popoverVisible: false,
indeterminate: false, //
selectionSelected: [],
head: []
}
},
created() {
// el-table
this.tableMaxHeight = window.innerHeight - 230
// ,
this.getList() //
},
mounted() {
// el-table
this.$nextTick(() => {
window.onresize = () => {
this.tableMaxHeight = window.innerHeight - 230
}
this.$refs.treeRef.setCheckedNodes(
this.dataSourceForTree.filter(node => !node.disabled)
)
})
},
methods: {
handleSelectWithDifferentStatus(row, rowIndex) {
return true
},
getQuery() {
if (this.$refs.multipleTable) {
this.$refs.multipleTable.clearSelection()
}
this.listQuery = {
page: 1,
limit: 10
}
this.getList()
},
goKeyReset() {
this.searchParmas = {
enterpriseName: '',
groupUnit: '',
shareSuperdepart: ''
}
this.getQuery()
},
/** 获取列表数据 */
getList() {
this.loading = true
requestFN(
'/xgf/user/statistics?showCount=' +
this.listQuery.limit +
'&currentPage=' +
this.listQuery.page,
{ KEYWORDS: this.KEYWORDS, ISSMALL: '2' }
)
.then(data => {
this.loading = false
this.varList = data.list
this.total = data.page.totalResult
})
.catch(e => {
console.log(e)
this.loading = false
})
},
selectionChange(row) {
this.selectionSelected = row
},
selectAll(selection) {
this.selectionSelected = selection
},
handleExportBtn() {
const ids = this.selectionSelected
.map(item => {
return item.CORPINFO_ID
})
.toString(',')
const result = this.collectValues(this.dataSourceForTree)
this.head = result.toString(',')
if (
this.selectionSelected.map(item => {
return item.CORPINFO_ID
}).length === 0
) {
// ~ modified by xuyifeng
// this.$message.error('!')
}
this.exportExcelHandler(ids, this.head)
},
collectValues(data, resultArray = []) {
data.forEach(item => {
if (item.show) {
resultArray.push(item.value) // value
}
if (item.children && item.children.length > 0) {
this.collectValues(item.children, resultArray) //
}
})
return resultArray
},
// excel
exportExcelHandler(ids, head) {
window.open(`${this.config.httpurl}/xgf/user/exportExcel?ids=${ids}&head=${head}`)
},
//
openPopover() {
this.popoverVisible = true
},
//
canclePopover() {
this.popoverVisible = false
},
//
handleCheckAllChange() {
if (this.checked) {
this.$refs.treeRef.setCheckedNodes(
this.dataSourceForTree.filter(node => !node.disabled)
)
this.treeCheckedIds = this.$refs.treeRef
.getCheckedNodes(false, true)
.map(i => i.id)
this.head = this.$refs.treeRef.getCheckedNodes(false, true).map(i => i.value)
} else {
this.$refs.treeRef.setCheckedNodes([])
this.treeCheckedIds = []
this.head = []
}
},
//
changeCheck(checkedNode, isChecked, selfNode) {
const res = this.updateShowProperty(
this.dataSourceForTree,
checkedNode,
isChecked
)
this.dataSourceForTree = res
},
updateShowProperty(dataSource, curNode, isChecked) {
//
function recursiveUpdate(node) {
//
let allChildrenUnchecked = true
//
if (node.children && node.children.length > 0) {
node.children.forEach(child => {
const childChecked = recursiveUpdate(child)
if (childChecked) {
allChildrenUnchecked = false
}
})
}
// show
if (node.id === curNode.id) {
node.show = isChecked
}
// show
if (node.children && node.children.length > 0) {
if (allChildrenUnchecked) {
node.show = false
} else {
node.show = true
}
}
return node.show // show
}
//
dataSource.forEach(node => recursiveUpdate(node))
return dataSource
},
//
confirmPopover() {
this.popoverVisible = false
},
//
showColumn(columnValue) {
//
const findItem = (data, value) => {
for (let i = 0; i < data.length; i++) {
const item = data[i]
if (item.value === value) {
return item
}
if (item.children && item.children.length > 0) {
const foundInChildren = findItem(item.children, value)
if (foundInChildren) {
return foundInChildren
}
}
}
return null
}
//
const foundItem = findItem(this.dataSourceForTree, columnValue)
// show false
return foundItem ? foundItem.show : false
}
}
}
</script>
<style lang="scss" scoped>
.treeColumnStyle {
height: 400px;
overflow-y: auto;
overflow-x: auto;
&::-webkit-scrollbar {
display: none;
}
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -71,7 +71,7 @@
<a href="javascript:;" class="weui-btn bg-blue" style="font-size: 14px;line-height:2.6;" onclick="back()">返回列表</a>
</div>
-->
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">

View File

@ -345,7 +345,7 @@
<div style="padding: 0 20px;">
<a href="javascript:;" class="weui-btn bg-blue" style="font-size: 14px;line-height:2.6;" onclick="back()">返回列表</a>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">

View File

@ -81,7 +81,7 @@
</div>
<script src="//api.map.BAIDU.com/api?type=webgl&v=1.0&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr"></script>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">

View File

@ -119,7 +119,7 @@
</div>
</div>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">

View File

@ -36,7 +36,7 @@
<van-image-preview v-model="show" :images="images" :start-position="startPosition">
</van-image-preview>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript">
var vm = new Vue({
el: '#app',

View File

@ -70,7 +70,7 @@
<div style="padding: 0 20px;">
<a href="javascript:;" class="weui-btn bg-blue" style="font-size: 14px;line-height:2.6;" onclick="back()">返回列表</a>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">
@ -114,7 +114,7 @@
var nameArray=[];
for (var i = 0; i < vm.varList.length; i++) {
var ACCIDENTS_NAME=vm.varList[i].ACCIDENTS_NAME;
if(ACCIDENTS_NAME){
console.info(ACCIDENTS_NAME)
console.info(nameArray)
@ -123,7 +123,7 @@
nameArray.push(names[j]);
}
}
}
$.unique(nameArray);
vm.ACCIDENTS_NAME=nameArray.join(",");

View File

@ -85,7 +85,7 @@
</ul>
</div>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>

View File

@ -321,7 +321,7 @@
<div style="padding: 0 20px;">
<a href="javascript:;" class="weui-btn bg-blue" style="font-size: 14px;line-height:2.6;" onclick="back()">返回列表</a>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">

View File

@ -82,7 +82,7 @@
<script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr"></script>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">

View File

@ -60,7 +60,7 @@
<div style="padding: 0 20px;margin-top:20px">
<a href="javascript:;" class="weui-btn bg-blue" style="font-size: 14px;line-height:2.6;" onclick="back()">返回列表</a>
</div>
<script type="text/javascript" src="../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../assets/js/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../assets/js/pre-loader.js"></script>
<script src="../../assets/js/sweetalert.min.js"></script>
<script type="text/javascript">