|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { getCurrentInstanc, getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue'
|
|
|
|
|
import {onMounted, reactive, ref, toRefs, getCurrentInstanc, getCurrentInstance} from 'vue'
|
|
|
|
|
import type { UnwrapRef } from 'vue'
|
|
|
|
|
|
|
|
|
|
import { message } from 'ant-design-vue';
|
|
|
|
|
// let {proxy}=getCurrentInstanc
|
|
|
|
|
import {
|
|
|
|
|
FieldTimeOutlined,
|
|
|
|
@ -12,10 +12,12 @@ import {
|
|
|
|
|
} from '@ant-design/icons-vue'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import { getUserProfileApi, updateUserProfileApi, uploadAvatarApi } from '@/api/base/profile'
|
|
|
|
|
import { getUserProfileApi, updateUserProfileApi, uploadAvatarApi, updateUserPwdApi } from '@/api/base/profile'
|
|
|
|
|
import { useRender } from '@/components/Table'
|
|
|
|
|
import { useUserStore } from '@/store/modules/user'
|
|
|
|
|
import { exportLoginLog, getLoginLogPage } from '@/api/system/loginLog'
|
|
|
|
|
import { deleteNotice, getNoticePage } from '@/api/system/notice'
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
|
|
|
|
|
/* let userInfo = reactive({
|
|
|
|
|
})
|
|
|
|
@ -25,10 +27,10 @@ onMounted( async () => {
|
|
|
|
|
}) */
|
|
|
|
|
|
|
|
|
|
// 单选
|
|
|
|
|
const sex = ref<string>('保密')//性别
|
|
|
|
|
const sex = ref<string>('1')//性别
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const message = ref<string>('全部信息')//系统信息选择
|
|
|
|
|
const message2 = ref<string>('全部信息')//系统信息选择
|
|
|
|
|
|
|
|
|
|
interface FormState {
|
|
|
|
|
name: string
|
|
|
|
@ -52,7 +54,26 @@ const confirmLoading = ref<boolean>(false)
|
|
|
|
|
function showModal() {
|
|
|
|
|
open.value = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const saveUser = async () => {
|
|
|
|
|
const result = await updateUserProfileApi(state.userInfo);
|
|
|
|
|
if(result){
|
|
|
|
|
message.success('修改成功');
|
|
|
|
|
}else{
|
|
|
|
|
message.error('修改失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const updatePassward = async () => {
|
|
|
|
|
if(state.userUpdatePasswordReqVO.newPassword != state.userUpdatePasswordReqVO.newPassword2){
|
|
|
|
|
message.error('新密码两次输入不一致');
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
const result = await updateUserPwdApi(state.userUpdatePasswordReqVO.oldPassword, state.userUpdatePasswordReqVO.newPassword);
|
|
|
|
|
if(result){
|
|
|
|
|
message.success('修改成功');
|
|
|
|
|
}else{
|
|
|
|
|
message.error('修改失败');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function handleOk() {
|
|
|
|
|
confirmLoading.value = true
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -63,12 +84,22 @@ function handleOk() {
|
|
|
|
|
const state = reactive({
|
|
|
|
|
checked1: true,
|
|
|
|
|
userInfo: {},
|
|
|
|
|
userUpdatePasswordReqVO: {
|
|
|
|
|
id: 100,
|
|
|
|
|
oldPassword: '',
|
|
|
|
|
newPassword: '',
|
|
|
|
|
newPassword2: '',
|
|
|
|
|
},
|
|
|
|
|
loginLog:[],
|
|
|
|
|
noticePage: [],
|
|
|
|
|
enterpriseList: [],
|
|
|
|
|
})
|
|
|
|
|
onMounted( async () => {
|
|
|
|
|
debugger
|
|
|
|
|
state.userInfo = await getUserProfileApi()
|
|
|
|
|
console.log(`55555555${ state.userInfo}`)
|
|
|
|
|
debugger
|
|
|
|
|
state.userUpdatePasswordReqVO.id = state.userInfo.id;
|
|
|
|
|
state.loginLog = await getLoginLogPage();
|
|
|
|
|
state.noticePage = await getNoticePage();
|
|
|
|
|
state.enterpriseList = userStore.getUserInfo.user.enterpriseList;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//分页器
|
|
|
|
@ -121,18 +152,33 @@ const tablecolumns = [
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '状态',
|
|
|
|
|
dataIndex: 'state',
|
|
|
|
|
key: 'state',
|
|
|
|
|
dataIndex: 'status',
|
|
|
|
|
key: 'status',
|
|
|
|
|
customRender: ({ record }) => {
|
|
|
|
|
if (record == '1')
|
|
|
|
|
return "关闭"
|
|
|
|
|
else
|
|
|
|
|
return "正常"
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '类型',
|
|
|
|
|
key: 'type',
|
|
|
|
|
dataIndex: 'type',
|
|
|
|
|
customRender: ({ record }) => {
|
|
|
|
|
if (record == '1')
|
|
|
|
|
return "通知"
|
|
|
|
|
else
|
|
|
|
|
return "公告"
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '发布时间',
|
|
|
|
|
key: 'time',
|
|
|
|
|
dataIndex: 'time',
|
|
|
|
|
key: 'createTime',
|
|
|
|
|
dataIndex: 'createTime',
|
|
|
|
|
customRender: ({ text }) => {
|
|
|
|
|
return useRender.renderDate(text)
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
@ -182,23 +228,23 @@ const tabledata = [
|
|
|
|
|
<div class="form">
|
|
|
|
|
<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
|
|
<a-form-item label="登录账号:">
|
|
|
|
|
<a-input v-model:value="state.userInfo.username" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.username" :disabled="true" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="姓名:">
|
|
|
|
|
<a-input v-model:value="state.userInfo.nickname" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.nickname" :disabled="true" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="所属部门:">
|
|
|
|
|
<a-input v-model:value="state.userInfo.dept.name" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.deptNames" :disabled="true" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="员工职务:">
|
|
|
|
|
<a-input v-model:value="state.userInfo.posts[0].name" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.postNames" :disabled="true" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="员工工号:">
|
|
|
|
|
<a-input v-model:value="state.userInfo.jobNumber" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.jobNumber" :disabled="true" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="手机号码:">
|
|
|
|
|
<div class="phonecss">
|
|
|
|
|
<a-input v-model:value="state.userInfo.mobile" placeholder="输入内容" :style="phoneStyle" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.mobile" :disabled="true" placeholder="输入内容" :style="phoneStyle" />
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<a-button :style="changeStyle" @click="showModal">
|
|
|
|
@ -228,26 +274,26 @@ const tabledata = [
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="微信账号:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.wechatAccount" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="邮箱地址:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-input v-model:value="state.userInfo.email" placeholder="输入内容" />
|
|
|
|
|
</a-form-item><!-- birthDatetime -->
|
|
|
|
|
<a-form-item name="DatePicker" label="出生日期" v-bind="config">
|
|
|
|
|
<a-date-picker v-model:value="formState['date-picker']" value-format="YYYY-MM-DD" />
|
|
|
|
|
<a-date-picker v-model:value="state.userInfo.birthDatetime" :format="dateFormat" valueFormat="x" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="性别:">
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<a-radio-group v-model:value="sex">
|
|
|
|
|
<a-radio-button :style="customButtonStyle" value="男性">
|
|
|
|
|
<a-radio-group v-model:value="state.userInfo.sex">
|
|
|
|
|
<a-radio-button :style="customButtonStyle" :value="1">
|
|
|
|
|
男性<ManOutlined />
|
|
|
|
|
</a-radio-button>
|
|
|
|
|
<a-radio-button :style="customButtonStyle" value="女性">
|
|
|
|
|
<a-radio-button :style="customButtonStyle" :value="2">
|
|
|
|
|
女性<WomanOutlined />
|
|
|
|
|
</a-radio-button>
|
|
|
|
|
<a-radio-button :style="customButtonStyle" value="保密">
|
|
|
|
|
<a-radio-button :style="customButtonStyle" :value="0">
|
|
|
|
|
保密
|
|
|
|
|
</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
@ -262,44 +308,44 @@ const tabledata = [
|
|
|
|
|
|
|
|
|
|
<a-form label-width="100px" :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
|
|
<a-form-item label="籍贯:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.nativePlace" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="学历" name="region">
|
|
|
|
|
<a-select v-model:value="formState.region" placeholder="选择学历">
|
|
|
|
|
<a-select-option value="初中">
|
|
|
|
|
<a-form-item label="学历" name="region"><!-- education -->
|
|
|
|
|
<a-select v-model:value="state.userInfo.education" placeholder="选择学历">
|
|
|
|
|
<a-select-option value="1">
|
|
|
|
|
初中
|
|
|
|
|
</a-select-option>
|
|
|
|
|
<a-select-option value="高中">
|
|
|
|
|
<a-select-option value="2">
|
|
|
|
|
高中
|
|
|
|
|
</a-select-option>
|
|
|
|
|
<a-select-option value="初中">
|
|
|
|
|
<a-select-option value="3">
|
|
|
|
|
大专
|
|
|
|
|
</a-select-option>
|
|
|
|
|
<a-select-option value="高中">
|
|
|
|
|
<a-select-option value="4">
|
|
|
|
|
本科
|
|
|
|
|
</a-select-option>
|
|
|
|
|
<a-select-option value="初中">
|
|
|
|
|
<a-select-option value="5">
|
|
|
|
|
研究生
|
|
|
|
|
</a-select-option>
|
|
|
|
|
<a-select-option value="高中">
|
|
|
|
|
<a-select-option value="6">
|
|
|
|
|
博士
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="专业:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入内容" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.speciality" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="毕业院校:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入内容" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item name="毕业时间:" label="DatePicker" v-bind="config">
|
|
|
|
|
<a-date-picker v-model:value="formState['date-picker']" value-format="YYYY-MM-DD" />
|
|
|
|
|
<a-input v-model:value="state.userInfo.graduationInstitution" placeholder="输入内容" />
|
|
|
|
|
</a-form-item><!-- institutionDatatime -->
|
|
|
|
|
<a-form-item name="DatePicker" label="毕业时间:" v-bind="config">
|
|
|
|
|
<a-date-picker v-model:value="state.userInfo.institutionDatatime" :format="dateFormat" valueFormat="x" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="个人简介:" placeholder="输入内容" name="desc">
|
|
|
|
|
<a-textarea v-model:value="formState.desc" />
|
|
|
|
|
<a-textarea v-model:value="state.userInfo.personalProfile" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="">
|
|
|
|
|
<button class="save">
|
|
|
|
|
<button class="save" @click="saveUser()">
|
|
|
|
|
保存
|
|
|
|
|
</button>
|
|
|
|
|
</a-form-item>
|
|
|
|
@ -308,7 +354,7 @@ const tabledata = [
|
|
|
|
|
</div>
|
|
|
|
|
<div class="usepic">
|
|
|
|
|
<div class="idpic">
|
|
|
|
|
<a-avatar :size="{ xs: 24, sm: 32, md: 40, lg: 64, xl: 80, xxl: 100 }">
|
|
|
|
|
<a-avatar :size="{ xs: 24, sm: 32, md: 40, lg: 64, xl: 80, xxl: 100 }" :src="state.userInfo.avatar">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<UserOutlined />
|
|
|
|
|
</template>
|
|
|
|
@ -346,24 +392,24 @@ const tabledata = [
|
|
|
|
|
<div class="datumbox">
|
|
|
|
|
<div class="form">
|
|
|
|
|
<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
|
|
|
|
|
<a-form-item label="验证码:">
|
|
|
|
|
<!-- <a-form-item label="验证码:">
|
|
|
|
|
<div class="phonecss">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入内容" :style="phoneStyle" />
|
|
|
|
|
<a-button :style="changeStyle">
|
|
|
|
|
获取验证码
|
|
|
|
|
</a-button>
|
|
|
|
|
</div>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-form-item> -->
|
|
|
|
|
<a-form-item label="原密码:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入原密码" />
|
|
|
|
|
<a-input v-model:value="state.userUpdatePasswordReqVO.oldPassword" placeholder="输入原密码" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="新密码:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入新密码" />
|
|
|
|
|
<a-input v-model:value="state.userUpdatePasswordReqVO.newPassword" placeholder="输入新密码" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<a-form-item label="新密码:">
|
|
|
|
|
<a-input v-model:value="value" placeholder="输入确认新密码" />
|
|
|
|
|
<a-input v-model:value="state.userUpdatePasswordReqVO.newPassword2" placeholder="输入确认新密码" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
<button class="save">
|
|
|
|
|
<button class="save" @click="updatePassward()">
|
|
|
|
|
保存
|
|
|
|
|
</button>
|
|
|
|
|
</a-form>
|
|
|
|
@ -382,14 +428,14 @@ const tabledata = [
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 日期 -->
|
|
|
|
|
<div
|
|
|
|
|
v-for="(item, index) in 5" :key="index"
|
|
|
|
|
>
|
|
|
|
|
<div class="date">
|
|
|
|
|
<!-- <div
|
|
|
|
|
v-for="(item, index) in state.loginLog" :key="index"
|
|
|
|
|
> -->
|
|
|
|
|
<!-- <div class="date">
|
|
|
|
|
{{ `2023-08-22` }}
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div
|
|
|
|
|
v-for="(item, index) in 5"
|
|
|
|
|
v-for="(item, index) in state.loginLog.list"
|
|
|
|
|
:key="index" class="recordbox"
|
|
|
|
|
>
|
|
|
|
|
<div class="recordleft">
|
|
|
|
@ -400,16 +446,16 @@ const tabledata = [
|
|
|
|
|
<div class="usersId">
|
|
|
|
|
{{ `kang-pc` }}
|
|
|
|
|
</div>
|
|
|
|
|
{{ `上海市长宁区 14.127.100.242` }}
|
|
|
|
|
{{ `上海市长宁区` + item.userIp}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="recordright">
|
|
|
|
|
<span><FieldTimeOutlined /></span>{{ `2023-08-22 12:00` }}
|
|
|
|
|
</div>
|
|
|
|
|
<span><FieldTimeOutlined /></span>{{new Date(item.createTime).toLocaleString()}}
|
|
|
|
|
</div>
|
|
|
|
|
<!-- </div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sorter">
|
|
|
|
|
<a-pagination v-model:current="current" :total="500" />
|
|
|
|
|
<a-pagination v-model:current="current" :total="state.loginLog.total" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</a-tab-pane>
|
|
|
|
@ -426,7 +472,7 @@ const tabledata = [
|
|
|
|
|
</div>
|
|
|
|
|
<div class="messagetitle">
|
|
|
|
|
<div class="messagetitleleft">
|
|
|
|
|
<a-radio-group v-model:value="message">
|
|
|
|
|
<a-radio-group v-model:value="message2">
|
|
|
|
|
<a-radio-button :style="messageStyle" value="全部信息">
|
|
|
|
|
全部信息
|
|
|
|
|
</a-radio-button>
|
|
|
|
@ -453,7 +499,7 @@ const tabledata = [
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="table">
|
|
|
|
|
<a-table :columns="tablecolumns" :data-source="tabledata" :total="500">
|
|
|
|
|
<a-table :columns="tablecolumns" :data-source="state.noticePage.list" :total="state.noticePage.total">
|
|
|
|
|
<template #headerCell="{ column }">
|
|
|
|
|
<template v-if="column.key === 'title'">
|
|
|
|
|
<span>
|
|
|
|
@ -462,8 +508,8 @@ const tabledata = [
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'name'">
|
|
|
|
|
<a href=""> {{ record.name }}</a>
|
|
|
|
|
<template v-if="column.key === 'title'">
|
|
|
|
|
<a href=""> {{ record.title }}</a>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-else-if="column.key === 'title'">
|
|
|
|
@ -543,16 +589,16 @@ const tabledata = [
|
|
|
|
|
|
|
|
|
|
<div class="listmainbox">
|
|
|
|
|
<div class="listmain">
|
|
|
|
|
<div v-for="(item, index) in 4" :key="index" class="list">
|
|
|
|
|
<div v-for="(item, index) in state.enterpriseList" :key="index" class="list">
|
|
|
|
|
<div class="firm">
|
|
|
|
|
<div class="firmtop">
|
|
|
|
|
<div class="firmtopleft">
|
|
|
|
|
<img src="https://files.axshare.com/gsc/F4557Q/03/bb/8b/03bb8b5afc694032b44452387757f019/images/%E5%85%AC%E5%8F%B8%E5%88%97%E8%A1%A8/u30.png?pageId=125c1eb4-7fa5-4390-86d9-40ffd2c7d87c" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="firmtopright">
|
|
|
|
|
<p>{{ `济钢城市矿产科技有限公司` }}</p>
|
|
|
|
|
<p>{{ item.name }}</p>
|
|
|
|
|
<p class="fontcss">
|
|
|
|
|
职务:{{ `产品经理` }}
|
|
|
|
|
职务:{{ item.position }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -579,7 +625,7 @@ const tabledata = [
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sorter">
|
|
|
|
|
<a-pagination v-model:current="current" :total="50" show-less-items />
|
|
|
|
|
<a-pagination v-model:current="current" :total="state.enterpriseList.length" show-less-items />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -909,6 +955,3 @@ justify-content: space-between;
|
|
|
|
|
border-inline-start: 1px solid #d9d9d9;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|