From bf83dce33b684ba07774d74a9460c2768f848b44 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期五, 30 九月 2022 16:29:46 +0800
Subject: [PATCH] 案件池违规、违建注册接口调试,审核页面构建
---
src/views/systemSetting/baseSetting/department/updateUser/index.vue | 119 ++++++++++++++++++++++++++++++++++-------------------------
1 files changed, 68 insertions(+), 51 deletions(-)
diff --git a/src/views/systemSetting/baseSetting/department/updateUser/index.vue b/src/views/systemSetting/baseSetting/department/updateUser/index.vue
index 4570f4f..e2cfc39 100644
--- a/src/views/systemSetting/baseSetting/department/updateUser/index.vue
+++ b/src/views/systemSetting/baseSetting/department/updateUser/index.vue
@@ -1,14 +1,14 @@
<template>
<div class="updateUser">
- <header>
- <div class="headerTitle">{{updateFlag ? '淇敼鐢ㄦ埛閮ㄩ棬淇℃伅' :'鏌ョ湅鐢ㄦ埛淇℃伅'}}</div>
- </header>
+ <!-- <header>
+ <div class="headerTitle">{{updateFlag ? '淇敼鐢ㄦ埛閮ㄩ棬淇℃伅' :'鏌ョ湅鐢ㄦ埛淇℃伅'}}</div>
+ </header> -->
<main>
<div class="mainContent">
<el-form ref="user" label-width="140px" autoComplete="on" :model="user" :rules="createUserRules"
label-position="right">
<!-- 閮ㄩ棬id -->
- <el-form-item class="optionItem" label="閮ㄩ棬鍚嶇О:" prop="id">
+ <el-form-item class="optionItem" label="閮ㄩ棬id:" prop="id">
<el-input v-model="user.id" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" :disabled="!updateFlag"></el-input>
</el-form-item>
<!-- 閮ㄩ棬鍚嶇О -->
@@ -18,7 +18,8 @@
<!-- 涓婄骇閮ㄩ棬 -->
<el-form-item class="optionItems" label="涓婄骇閮ㄩ棬:" prop="parentId">
<el-select v-model="user.parentId" placeholder="璇烽�夋嫨涓婄骇閮ㄩ棬" :disabled="!updateFlag">
- <el-option v-for="item in typeList" :key="item.name" :label="item.name" :value="item.value">
+ <el-option v-for="item in typeList" :key="item.departName" :label="item.departName"
+ :value="item.id">
</el-option>
</el-select>
</el-form-item>
@@ -51,31 +52,37 @@
const validateNickname = (rule, value, callback) => {
if (!value) {
callback(new Error("璇峰~鍐欓儴闂ㄥ悕绉�"));
+ } else {
+ callback();
}
};
const validateId = (rule, value, callback) => {
if (!value) {
callback(new Error("璇峰~鍐欓儴闂╥d"));
+ } else {
+ callback();
}
}
const validatePass = (rule, value, callback) => {
if (!value) {
- callback(new Error("璇峰~鍐欑櫥褰曞瘑鐮�"));
+ callback();
} else {
- const rep = /^\w+$/;
- if (!rep.test(value)) {
- callback(new Error("瀵嗙爜鍙兘鏄互鏁板瓧銆�26涓嫳鏂囧瓧姣嶆垨鑰呬笅鍒掔嚎缁勬垚鐨勫瓧绗︿覆"));
- }
+ callback();
+ // const rep = /^\w+$/;
+ // if (!rep.test(value)) {
+ // callback(new Error("瀵嗙爜鍙兘鏄互鏁板瓧銆�26涓嫳鏂囧瓧姣嶆垨鑰呬笅鍒掔嚎缁勬垚鐨勫瓧绗︿覆"));
+ // }
}
};
const validatePhone = (rule, value, callback) => {
if (!value) {
- callback(new Error("璇峰~鍐欐墜鏈哄彿鐮�"));
+ callback();
} else {
- const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
- if (!rep.test(value)) {
- callback("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜");
- }
+ callback();
+ // const rep = /(^1[3|4|5|7|8|9]\d{9}$)|(^09\d{8}$)/
+ // if (!rep.test(value)) {
+ // callback("璇疯緭鍏ユ纭殑鎵嬫満鍙风爜");
+ // }
}
};
return {
@@ -125,16 +132,26 @@
},
methods: {
handleUser() {
- const { user } = this;
- const that = this;
- this.$axios.post('sccg/depart/update', {
- id: user.id,
- departName: user.departName,
- parentId: user.parentId,
- departDes: user.departDes
- }).then(res => {
- this.$emit('changeDialog',{dialogUpdate:false});
- this.getUserList();
+ this.$refs['user'].validate((valid) => {
+ if (valid) {
+ const { user } = this;
+ this.$axios.post('sccg/depart/update', {
+ id: user.id,
+ departName: user.departName,
+ parentId: user.parentId,
+ departDes: user.departDes
+ }).then(res => {
+ console.log(res);
+ this.$message({
+ message:res.message,
+ type:res.code === 200 ? 'success' : 'warning',
+ })
+ this.$emit('changeDialog', { dialogUpdate: false });
+ this.getUserList();
+ })
+ } else {
+ return false;
+ }
})
}
},
@@ -146,46 +163,46 @@
border-radius: 1px;
background-color: #09152f;
- header {
- display: flex;
- justify-content: center;
- height: 60px;
- line-height: 60px;
- padding: 0 20px;
- border: 1px solid #fff;
+ // header {
+ // display: flex;
+ // justify-content: center;
+ // height: 60px;
+ // line-height: 60px;
+ // padding: 0 20px;
+ // border: 1px solid #fff;
- .headerTitle {
- color: #4b9bb7;
- font-weight: 600;
- }
+ // .headerTitle {
+ // color: #4b9bb7;
+ // font-weight: 600;
+ // }
- .headerTip span {
- color: #ff3b6c;
- }
+ // .headerTip span {
+ // color: #ff3b6c;
+ // }
- .headerTip label {
- color: #4b9bb7;
- }
- }
+ // .headerTip label {
+ // color: #4b9bb7;
+ // }
+ // }
main {
- border: 1px solid #fff;
+ // border: 1px solid #fff;
text-align: left;
padding: 0 55px;
background-color: #09152f;
padding-bottom: 50px;
- .mainTitle {
- color: #4b9bb7;
- font-weight: 600;
- line-height: 100px;
- font-size: 14px;
- }
+ // .mainTitle {
+ // color: #4b9bb7;
+ // font-weight: 600;
+ // line-height: 100px;
+ // font-size: 14px;
+ // }
.mainContent {
display: flex;
justify-content: center;
- margin-top: 50px;
+ padding-top: 50px;
.el-form-item__content {
width: 400px;
--
Gitblit v1.8.0