企业信息管理 - 中心用户管理页面

xuyifeng-0724-人员中台对接-dev
water_xu 2024-08-15 10:01:44 +08:00
parent 2a6c20c687
commit a2649cd1a7
5 changed files with 1359 additions and 11 deletions

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

@ -275,14 +275,7 @@ export default {
ROLE_ID: [ ROLE_ID: [
{ required: true, message: '角色不能为空', trigger: 'blur' } { 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: [ NAME: [
{ required: true, message: '姓名不能为空', trigger: 'blur' }, { required: true, message: '姓名不能为空', trigger: 'blur' },
{ min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' } { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }
@ -482,9 +475,9 @@ export default {
}) })
}, },
goCheck() { goCheck() {
if (this.pd.USER_ID_CARD && this.pd.USERNAME) { 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 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 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 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) const cardResult = cardJudge.test(this.pd.USER_ID_CARD)
if (phoneResult && cardResult) { if (phoneResult && cardResult) {
@ -493,7 +486,7 @@ export default {
'user/goCheck', 'user/goCheck',
{ {
CARD_NO: this.pd.USER_ID_CARD, CARD_NO: this.pd.USER_ID_CARD,
USERNAME: this.pd.USERNAME, USERNAME: this.pd.PHONE,
USER_ID: this.pd.USER_ID || '' USER_ID: this.pd.USER_ID || ''
} }
).then((data) => { ).then((data) => {