5b0a92a6 by xiaomiao

基本信息

1 parent 692e8fc1
......@@ -78,12 +78,12 @@ export const api = {
crudPut: crud + '/rest/put', // crudPut
crudDel: crud + '/rest/delete', // crudDel
crudMetadata: crud + '/rest/metadata', //crudMetadata
crudBusiness : crud + '/rest/business', // crudBusiness
crudDatasources : crud + '/rest/datasources', // crudDatasources
crudBusiness: crud + '/rest/business', // crudBusiness
crudDatasources: crud + '/rest/datasources', // crudDatasources
}
// 根据code获取字典 params={isTree:true})
export function getDictItems(code, params = {}) {
export function getDictItems (code, params = {}) {
return request({
url: `${api.baseDataCategory}/${code}/base-datas`,
method: 'get',
......@@ -91,21 +91,21 @@ export function getDictItems(code, params = {}) {
})
}
// 获取一级字典值下级接口
export function getDictItemsChild(id) {
export function getDictItemsChild (id) {
return request({
url: `${api.baseData}/dict/${id}`,
method: 'get'
})
}
// 获取传入字段的所有级别字典值
export function getAllDictItems(name) {
export function getAllDictItems (name) {
return request({
url: `${api.baseDataCategory}/${name}/base-datas`,
method: 'get'
})
}
// get公共方法
export function getAction(url, params = {}) {
export function getAction (url, params = {}) {
return request({
url,
method: 'get',
......@@ -113,7 +113,7 @@ export function getAction(url, params = {}) {
})
}
// post公共方法
export function postAction(url, data = null) {
export function postAction (url, data = null) {
return request({
url,
method: 'post',
......@@ -121,7 +121,7 @@ export function postAction(url, data = null) {
})
}
// method= {post | put}
export function httpAction(url, data, method) {
export function httpAction (url, data, method) {
return request({
url,
method,
......@@ -129,7 +129,7 @@ export function httpAction(url, data, method) {
})
}
// put公共方法
export function putAction(url, data = null) {
export function putAction (url, data = null) {
return request({
url,
method: 'put',
......@@ -137,7 +137,7 @@ export function putAction(url, data = null) {
})
}
// delete
export function deleteAction(url, data = null) {
export function deleteAction (url, data = null) {
return request({
url,
method: 'delete',
......@@ -146,7 +146,7 @@ export function deleteAction(url, data = null) {
}
// 批量删除
export function deleteBranch(url, data) {
export function deleteBranch (url, data) {
return request({
url,
method: 'delete',
......
......@@ -121,3 +121,6 @@ export const getRoleAuthorityList = (
export const roleAuthority = (id, permissionDtos) => {
return putAction(`${api.rolePermissions}/${id}`, permissionDtos)
}
export const updateUserPassword = (data) => {
return putAction(`${api.users}/update-password`, data)
}
......
......@@ -6,8 +6,7 @@
label-width="100px"
:model="form"
class="form-wrapper"
:rules="rules"
>
:rules="rules">
<el-form-item label="用户名:" required>
<el-input v-model="form.loginName" clearable disabled />
</el-form-item>
......@@ -19,9 +18,7 @@
<el-radio
v-for="(item, index) in sexList"
:key="index"
:label="item.value"
>{{ item.name }}</el-radio
>
:label="item.value">{{ item.name }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="身份证号:" prop="idCard">
......@@ -30,7 +27,7 @@
<el-form-item label="手机号码:" prop="mobilePhone">
<el-input v-model="form.mobilePhone" clearable />
</el-form-item>
<el-form-item label="办公电话:" prop="telephone">
<el-form-item label="办公电话:">
<el-input v-model="form.telephone" clearable />
</el-form-item>
<el-form-item label="办公地址:">
......@@ -45,200 +42,117 @@
</template>
<script>
// import { api, getAction, putAction, getDictItems } from '@api/manageApi'
export default {
props: {
// userInfo: {
// type: Object,
// default: null
// }
},
data() {
return {
form: {
id: "3127e455-43ba-45ff-9326-0e02ef89485e",
name: "超级管理员",
sort: 1,
loginName: "admin",
email: null,
lastLoginTime: null,
mobilePhone: "18291003568",
isLocked: false,
status: "ACTIVE",
passwordChangeTime: "2021-12-10T08:01:01.569+0000",
idCard: "612725202111021521",
departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
departmentName: null,
organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
sex: "0",
isDuty: true,
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
},
sexList: [],
rules: {
mobilePhone: [
{
pattern:
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
message: "手机号码格式有误",
trigger: "blur",
},
],
idCard: [
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: "身份证号格式有误",
trigger: "blur",
},
],
telephone: [
{
pattern: /\d{3}-\d{8}|\d{4}-\d{7}/,
message: "办公电话格式有误",
trigger: "blur",
},
],
},
};
},
watch: {
// userInfo: {
// handler: function(val) {
// if (val) {
// this.getUserInfo(val.id)
// }
// }
// }
},
mounted() {
// getDictItems('XB').then((res) => {
// if (res.status === 1) {
this.sexList = [
{
id: "079c72b2-f3de-4a4f-b2a1-e5c8f085cc5f",
createdAt: "2021-06-11T02:42:02.000+0000",
updatedAt: "2021-09-03T09:21:46.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 2,
name: "男",
description: "",
code: "N362",
value: "0",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "男(N362)",
},
{
id: "4d6f845d-6f6a-4848-8fc2-a3760764c196",
createdAt: "2021-06-11T02:42:12.000+0000",
updatedAt: "2021-09-03T09:21:46.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 1,
name: "女",
description: "",
code: "N922",
value: "1",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "女(N922)",
},
{
id: "637c360b-d4e2-4afb-aa18-33624cf3abcb",
createdAt: "2021-06-11T02:42:29.000+0000",
updatedAt: "2021-09-03T09:21:43.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 0,
name: "保密",
description: "",
code: "BM816",
value: "2",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "保密(BM816)",
},
];
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
},
methods: {
// getUserInfo(id) {
// getAction(`${api.users}/${id}`).then((res) => {
// if (res.status === 1) {
import { api, getAction, putAction, getDictItems } from '@/api/manageApi'
export default {
props: {
userInfo: {
type: Object,
default: null
}
},
data () {
return {
form: {},
sexList: [],
rules: {
mobilePhone: [
{
pattern:
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
message: '手机号码格式有误',
trigger: 'blur'
}
],
idCard: [
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: '身份证号格式有误',
trigger: 'blur'
}
]
}
}
},
watch: {
userInfo: {
handler: function (val) {
if (val) {
this.getUserInfo(val.id)
}
}
}
},
mounted () {
this.sexList = [
{
"name": "男",
"value": "0",
},
{
"name": "女",
"value": "1",
},
{
"name": "保密",
"value": "2",
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// },
// 更新信息
updateInfo() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// putAction(`${api.users}/${this.form.id}`, this.form).then((res) => {
// if (res.status === 1) {
// this.$message.success({ message: res.message, showClose: true })
// this.getUserInfo(this.form.id)
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
}
]
},
},
};
methods: {
getUserInfo (id) {
getAction(`${api.users}/${id}`).then((res) => {
if (res.status === 1) {
this.form = res.content
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
},
updateInfo () {
this.$refs.form.validate((valid) => {
if (valid) {
putAction(`${api.users}/${this.form.id}`, this.form).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.getUserInfo(this.form.id)
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
}
})
}
}
}
</script>
<style scoped lang="scss">
.user-info {
margin: 0.1875rem 1.0417rem;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #6BC1FC;
.user-info {
margin: 0.1875rem 1.0417rem;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #6bc1fc;
}
}
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
}
</style>
......
......@@ -15,69 +15,74 @@
</div>
<div class="from-clues-content">
<div class="contentbox">
<base-set v-show="isshow" />
<password-edit v-show="!isshow" />
<base-set v-show="isshow" :user-info="userData" />
<password-edit v-show="!isshow" :user-info="userData" />
</div>
</div>
</div>
</template>
<script>
import "@/utils/flexible.js";
import BaseSet from "./base-set.vue";
import PasswordEdit from "./password-edit.vue";
export default {
components: {
BaseSet,
PasswordEdit,
},
data() {
return {
active: "baseSet",
isshow: true,
};
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
information() {
this.isshow = true;
import "@/utils/flexible.js";
import BaseSet from "./base-set.vue";
import PasswordEdit from "./password-edit.vue";
export default {
components: {
BaseSet,
PasswordEdit,
},
password() {
this.isshow = false;
data () {
return {
isshow: true,
userData: null
};
},
},
};
computed: {
departmentid () {
return this.$store.state.user.userInfo;
},
},
watch: {},
created () { },
mounted () {
if (this.departmentid) {
this.userData = this.departmentid
}
},
methods: {
information () {
this.isshow = true;
},
password () {
this.isshow = false;
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.information{
.btnColRight{
margin-top: 20px;
}
/deep/.content {
.el-input__inner{
background: none;
}
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.information {
.btnColRight {
margin-top: 20px;
}
/deep/.content {
.el-input__inner {
background: none;
}
.user-info {
background: none;
}
background: none;
}
}
/deep/.el-tabs {
.el-tabs__content {
height: 100%;
width: 100%;
}
}
.contentbox {
height: 3.0854rem;
}
/deep/.el-tabs {
.el-tabs__content {
height: 100%;
width: 100%;
}
}
.contentbox{
height: 3.0854rem;
}
}
</style>
......
......@@ -6,31 +6,27 @@
label-width="100px"
:model="form"
class="form-wrapper"
:rules="rules"
>
<el-form-item label="旧密码:" required prop="oldPassword">
:rules="rules">
<el-form-item label="旧密码:" prop="oldPassword">
<el-input
v-model="form.oldPassword"
clearable
type="password"
show-password
/>
show-password />
</el-form-item>
<el-form-item label="新密码:" required prop="newPassword">
<el-form-item label="新密码:" prop="newPassword">
<el-input
v-model="form.newPassword"
clearable
type="password"
show-password
/>
show-password />
</el-form-item>
<el-form-item label="确认密码:" required prop="confirmPassword">
<el-form-item label="确认密码:" prop="confirmPassword">
<el-input
v-model="form.confirmPassword"
clearable
type="password"
show-password
/>
show-password />
</el-form-item>
</el-form>
<div class="bottom-wrapper">
......@@ -41,96 +37,95 @@
</template>
<script>
// import { updateUserPassword } from '@api/organizationManage'
export default {
props: {
// userInfo: {
// type: Object,
// default: null
// }
},
data() {
return {
form: {},
sexList: [],
userId: '',
rules: {
oldPassword: [
{ required: true, message: '旧密码不能为空', trigger: 'blur' }
],
newPassword: [
{ required: true, message: '新密码不能为空', trigger: 'blur' }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ validator: this.validatorConfirmPassword, trigger: 'blur' }
]
import { updateUserPassword } from "@/api/quanxianmanagement";
export default {
props: {
userInfo: {
type: Object,
default: null
}
}
},
computed: {},
watch: {
// userInfo: {
// handler: function(val) {
// if (val) {
// this.userId = val.id
// }
// }
// }
},
mounted() {},
methods: {
validatorConfirmPassword(rule, value, callback) {
const { newPassword } = this.form
if (value !== newPassword) {
callback('两次输入密码不一致')
} else {
callback()
},
data () {
return {
form: {},
sexList: [],
userId: '',
rules: {
oldPassword: [
{ required: true, message: '旧密码不能为空', trigger: 'blur' }
],
newPassword: [
{ required: true, message: '新密码不能为空', trigger: 'blur' }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ validator: this.validatorConfirmPassword, trigger: 'blur' }
]
}
}
},
computed: {},
watch: {
userInfo: {
handler: function (val) {
if (val) {
this.userId = val.id
}
}
}
},
// 确认修改
updatePassword() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// const params = Object.assign({}, this.form, { id: this.userId })
// updateUserPassword(params).then((res) => {
// if (res.status === 1) {
// this.$message.success({ message: res.message, showClose: true })
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
mounted () { },
methods: {
validatorConfirmPassword (rule, value, callback) {
const { newPassword } = this.form
if (value !== newPassword) {
callback('两次输入密码不一致')
} else {
callback()
}
},
updatePassword () {
this.$refs.form.validate((valid) => {
if (valid) {
const params = Object.assign({}, this.form, { id: this.userId })
updateUserPassword(params).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
} else {
this.$message.error({ message: res.message, showClose: true })
}
})
}
})
}
}
}
}
</script>
<style scoped lang="scss">
.user-info {
margin: 36px 200px;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #6BC1FC;
.user-info {
margin: 36px 200px;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #6bc1fc;
}
}
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
}
</style>
......
<template>
<div class="content">
<div class="user-info">
<el-form
ref="form"
label-width="100px"
:model="form"
class="form-wrapper"
:rules="rules"
>
<el-form-item label="用户名:" required>
<el-input v-model="form.loginName" clearable disabled />
</el-form-item>
<el-form-item label="姓名:">
<el-input v-model="form.name" clearable />
</el-form-item>
<el-form-item label="性别:">
<el-radio-group v-model="form.sex">
<el-radio
v-for="(item, index) in sexList"
:key="index"
:label="item.value"
>{{ item.name }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="身份证号:" prop="idCard">
<el-input v-model="form.idCard" clearable />
</el-form-item>
<el-form-item label="手机号码:" prop="mobilePhone">
<el-input v-model="form.mobilePhone" clearable />
</el-form-item>
<el-form-item label="办公电话:" prop="telephone">
<el-input v-model="form.telephone" clearable />
</el-form-item>
<el-form-item label="办公地址:">
<el-input v-model="form.address" clearable />
</el-form-item>
</el-form>
<div class="bottom-wrapper">
<el-button type="primary" @click="updateInfo">更新信息</el-button>
</div>
</div>
</div>
</template>
<script>
// import { api, getAction, putAction, getDictItems } from '@api/manageApi'
export default {
props: {
// userInfo: {
// type: Object,
// default: null
// }
},
data() {
return {
form: {
id: "3127e455-43ba-45ff-9326-0e02ef89485e",
name: "超级管理员",
sort: 1,
loginName: "admin",
email: null,
lastLoginTime: null,
mobilePhone: "18291003568",
isLocked: false,
status: "ACTIVE",
passwordChangeTime: "2021-12-10T08:01:01.569+0000",
idCard: "612725202111021521",
departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
departmentName: null,
organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
sex: "0",
isDuty: true,
code: "123324",
jobLevel: null,
telephone: "028-87720898",
address: "办公地点修改测试",
},
sexList: [],
rules: {
mobilePhone: [
{
pattern:
/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
message: "手机号码格式有误",
trigger: "blur",
},
],
idCard: [
{
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
message: "身份证号格式有误",
trigger: "blur",
},
],
telephone: [
{
pattern: /\d{3}-\d{8}|\d{4}-\d{7}/,
message: "办公电话格式有误",
trigger: "blur",
},
],
},
};
},
watch: {
// userInfo: {
// handler: function(val) {
// if (val) {
// this.getUserInfo(val.id)
// }
// }
// }
},
mounted() {
// getDictItems('XB').then((res) => {
// if (res.status === 1) {
this.sexList = [
{
id: "079c72b2-f3de-4a4f-b2a1-e5c8f085cc5f",
createdAt: "2021-06-11T02:42:02.000+0000",
updatedAt: "2021-09-03T09:21:46.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 2,
name: "男",
description: "",
code: "N362",
value: "0",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "男(N362)",
},
{
id: "4d6f845d-6f6a-4848-8fc2-a3760764c196",
createdAt: "2021-06-11T02:42:12.000+0000",
updatedAt: "2021-09-03T09:21:46.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 1,
name: "女",
description: "",
code: "N922",
value: "1",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "女(N922)",
},
{
id: "637c360b-d4e2-4afb-aa18-33624cf3abcb",
createdAt: "2021-06-11T02:42:29.000+0000",
updatedAt: "2021-09-03T09:21:43.000+0000",
createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
sort: 0,
name: "保密",
description: "",
code: "BM816",
value: "2",
parentId: null,
baseDataCategoryId: "11441374-5e2a-4635-bfa5-d1a430222019",
version: 1,
valid: true,
standard: false,
standardName: null,
standardValue: null,
children: [],
commonName: "保密(BM816)",
},
];
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
},
methods: {
// getUserInfo(id) {
// getAction(`${api.users}/${id}`).then((res) => {
// if (res.status === 1) {
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// },
// 更新信息
updateInfo() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// putAction(`${api.users}/${this.form.id}`, this.form).then((res) => {
// if (res.status === 1) {
// this.$message.success({ message: res.message, showClose: true })
// this.getUserInfo(this.form.id)
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
},
},
};
</script>
<style scoped lang="scss">
.user-info {
margin: 0.1875rem 1.0417rem;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #6BC1FC;
}
}
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
}
</style>
<template>
<div class="information from-clues">
<div class="from-clues-header">
<el-form ref="ruleForm" label-width="100px">
<el-form-item>
<Breadcrumb />
</el-form-item>
<el-row class="mb-5">
<el-col :span="3" class="btnColRight">
<btn nativeType="cx" @click="information">基本信息</btn>
<btn nativeType="cx" @click="password">修改密码</btn>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<div class="contentbox">
<base-set v-show="isshow" />
<password-edit v-show="!isshow" />
</div>
</div>
</div>
</template>
<script>
import "@/utils/flexible.js";
import BaseSet from "./base-set.vue";
import PasswordEdit from "./password-edit.vue";
export default {
components: {
BaseSet,
PasswordEdit,
},
data() {
return {
active: "baseSet",
isshow: true,
};
},
computed: {},
watch: {},
created() {},
mounted() {},
methods: {
information() {
this.isshow = true;
},
password() {
this.isshow = false;
},
},
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/public.scss";
.information{
.btnColRight{
margin-top: 20px;
}
/deep/.content {
.el-input__inner{
background: none;
}
.user-info {
background: none;
}
}
/deep/.el-tabs {
.el-tabs__content {
height: 100%;
width: 100%;
}
}
.contentbox{
height: 3.0854rem;
}
}
</style>
<template>
<div class="content">
<div class="user-info">
<el-form
ref="form"
label-width="100px"
:model="form"
class="form-wrapper"
:rules="rules"
>
<el-form-item label="旧密码:" required prop="oldPassword">
<el-input
v-model="form.oldPassword"
clearable
type="password"
show-password
/>
</el-form-item>
<el-form-item label="新密码:" required prop="newPassword">
<el-input
v-model="form.newPassword"
clearable
type="password"
show-password
/>
</el-form-item>
<el-form-item label="确认密码:" required prop="confirmPassword">
<el-input
v-model="form.confirmPassword"
clearable
type="password"
show-password
/>
</el-form-item>
</el-form>
<div class="bottom-wrapper">
<el-button type="primary" @click="updatePassword">确认修改</el-button>
</div>
</div>
</div>
</template>
<script>
// import { updateUserPassword } from '@api/organizationManage'
export default {
props: {
// userInfo: {
// type: Object,
// default: null
// }
},
data() {
return {
form: {},
sexList: [],
userId: '',
rules: {
oldPassword: [
{ required: true, message: '旧密码不能为空', trigger: 'blur' }
],
newPassword: [
{ required: true, message: '新密码不能为空', trigger: 'blur' }
],
confirmPassword: [
{ required: true, message: '确认密码不能为空', trigger: 'blur' },
{ validator: this.validatorConfirmPassword, trigger: 'blur' }
]
}
}
},
computed: {},
watch: {
// userInfo: {
// handler: function(val) {
// if (val) {
// this.userId = val.id
// }
// }
// }
},
mounted() {},
methods: {
validatorConfirmPassword(rule, value, callback) {
const { newPassword } = this.form
if (value !== newPassword) {
callback('两次输入密码不一致')
} else {
callback()
}
},
// 确认修改
updatePassword() {
// this.$refs.form.validate((valid) => {
// if (valid) {
// const params = Object.assign({}, this.form, { id: this.userId })
// updateUserPassword(params).then((res) => {
// if (res.status === 1) {
// this.$message.success({ message: res.message, showClose: true })
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// }
// })
}
}
}
</script>
<style scoped lang="scss">
.user-info {
margin: 36px 200px;
background: #ffffff;
max-height: 90%;
overflow-y: auto;
.form-wrapper {
padding: 24px 120px 0px;
.el-form-item {
margin-bottom: 24px;
.el-form-item__label {
color: #747e8c;
}
::v-deep .el-input .el-input__inner {
padding: 0 8px;
height: 40px;
line-height: 40px;
border: 1px solid #6BC1FC;
}
}
}
.bottom-wrapper {
padding: 32px 120px 24px;
text-align: right;
}
}
</style>
......@@ -15,7 +15,7 @@
<el-tab-pane label="菜单配置" name="second"></el-tab-pane>
</el-tabs>
<lb-table
v-show="activeName == 'first'"
v-if="activeName == 'first'"
ref="multipleTable"
:pagination="false"
:column="usertableData.column"
......@@ -26,7 +26,7 @@
</lb-table>
<lb-table
:key="menukey"
v-show="activeName == 'second'"
v-if="activeName == 'second'"
ref="multipleTable1"
:pagination="false"
:column="menutableData.column"
......@@ -55,14 +55,8 @@
menutableData: {
column: [
{
label: "序号",
type: "index",
width: "50",
// index: this.indexMethod,
},
{
prop: "name",
width: 330,
width: 830,
label: "菜单名称",
}
].concat([
......
......@@ -15,9 +15,7 @@
v-for="(item, index) in sexList"
:key="index"
v-model="form.sex"
:label="item.value"
>{{ item.name }}</el-radio
>
:label="item.value">{{ item.name }}</el-radio>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -36,8 +34,7 @@
<el-input
v-model="form.loginName"
:disabled="showLoginName"
placeholder="用户名"
/>
placeholder="用户名" />
</el-form-item>
</el-col>
</el-row>
......@@ -51,12 +48,10 @@
<el-form-item
label="手机号码:"
prop="mobilePhone"
label-width="72px"
>
label-width="72px">
<el-input
v-model="form.mobilePhone"
placeholder="手机号码"
/>
placeholder="手机号码" />
</el-form-item>
</el-col>
</el-row>
......@@ -65,14 +60,12 @@
<el-form-item label="最高职务级别:" label-width="100px">
<el-select
v-model="form.jobLevel"
placeholder="最高职务级别"
>
placeholder="最高职务级别">
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
:value="item.value" />
</el-select>
</el-form-item>
</el-col>
......@@ -87,8 +80,7 @@
<el-form-item
label="办公地点:"
label-width="100px"
class="form-item-mb0"
>
class="form-item-mb0">
<el-input v-model="form.address" placeholder="办公地点" />
</el-form-item>
</el-col>
......@@ -103,87 +95,87 @@
</template>
<script>
import { api, httpAction } from '@/api/manageApi'
import Dialog from "@/components/Dialog/";
export default {
name: "",
components: { Dialog },
props: {},
data() {
return {
form: {
sex: "0",
},
rules: {
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
code: [{ required: true, message: "请输入工号", trigger: "blur" }],
mobilePhone: [{ validator: "sddd", trigger: "blur" }],
loginName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
},
title: "",
visible: false,
showLoginName: false,
sexList: [{lable:"0",value:"0",name:"男"},{lable:"1",value:"1",name:"女"}],
levelList: [{lable:"0",value:"0",name:"干事"},{lable:"1",value:"1",name:"经理"}],
dataUrl: api.users
};
},
computed: {
departmentid() {
return this.$store.state.user.userInfo;
},
},
watch: {},
created() {},
mounted() {},
methods: {
// initDictConfig() {
// getDictItems('XB').then((res) => {
// if (res.status === 1) {
// this.sexList = res.content
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// getDictItems('ZWJB').then((res) => {
// if (res.status === 1) {
// this.levelList = res.content
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// },
// 添加人员
add() {
this.visible = true;
// this.type = 0
this.showLoginName = false
import { api, httpAction } from '@/api/manageApi'
import Dialog from "@/components/Dialog/";
export default {
name: "",
components: { Dialog },
props: {},
data () {
return {
form: {
sex: "0",
},
rules: {
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
code: [{ required: true, message: "请输入工号", trigger: "blur" }],
mobilePhone: [{ validator: "sddd", trigger: "blur" }],
loginName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
},
title: "",
visible: false,
showLoginName: false,
sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }],
levelList: [{ lable: "0", value: "0", name: "干事" }, { lable: "1", value: "1", name: "经理" }],
dataUrl: api.users
};
},
// 编辑
edit(record) {
// this.initDictConfig()
this.showLoginName = true
// 若有id为编辑
if (record) {
this.$nextTick(() => {
this.form = Object.assign({}, record)
})
}
this.visible = true
},
handleChange(value) {
this.form.departmentId = value;
computed: {
departmentid () {
return this.$store.state.user.userInfo;
},
},
// 保存
submitForm(submitType) {
watch: {},
created () { },
mounted () { },
methods: {
// initDictConfig() {
// getDictItems('XB').then((res) => {
// if (res.status === 1) {
// this.sexList = res.content
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// getDictItems('ZWJB').then((res) => {
// if (res.status === 1) {
// this.levelList = res.content
// } else {
// this.$message.error({ message: res.message, showClose: true })
// }
// })
// },
// 添加人员
adds () {
this.visible = true;
// this.type = 0
this.showLoginName = false
},
// 编辑
edit (record) {
// this.initDictConfig()
this.showLoginName = true
// 若有id为编辑
if (record) {
this.$nextTick(() => {
this.form = Object.assign({}, record)
})
}
this.visible = true
},
handleChange (value) {
this.form.departmentId = value;
},
// 保存
submitForm (submitType) {
this.$refs.form.validate((valid) => {
if (valid) {
let method = ''
let url = ''
this.form.organizationId=this.departmentid.organizationId;
this.form.departmentId=this.departmentid.departmentId;
this.form.organizationId = this.departmentid.organizationId;
this.form.departmentId = this.departmentid.departmentId;
const formData = this.form
if (!formData.id) {
method = 'post'
......@@ -197,11 +189,11 @@ export default {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
this.resetForm()
this.resetForm()
this.close()
this.close()
this.$emit('ok')
this.$emit('ok')
} else {
this.$message.error({ message: res.message, showClose: true })
}
......@@ -212,30 +204,30 @@ export default {
}
})
},
resetForm() {
this.form = {
sex: '0'
resetForm () {
this.form = {
sex: '0'
}
this.$refs.form.resetFields()
},
close () {
this.resetForm()
this.visible = false
}
this.$refs.form.resetFields()
},
close() {
this.resetForm()
this.visible = false
}
},
};
};
</script>
<style scoped lang="scss">
/deep/.el-input__inner {
background: #07388B;
border-radius: 2px;
border: 1px solid #6BC1FC;
}
/deep/.el-textarea__inner{
background: #07388B;
color: #fff;
}
/deep/.el-form-item__label{
color:#fff;
}
/deep/.el-input__inner {
background: #07388b;
border-radius: 2px;
border: 1px solid #6bc1fc;
}
/deep/.el-textarea__inner {
background: #07388b;
color: #fff;
}
/deep/.el-form-item__label {
color: #fff;
}
</style>
......