From ea7a304c9c7c88f77c9a7df0343bf57072c36907 Mon Sep 17 00:00:00 2001
From: red-deng-deng <1924913374@qq.com>
Date: Mon, 15 Nov 2021 13:48:17 +0800
Subject: [PATCH] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86=E9=A1=B5?=
=?UTF-8?q?=E9=9D=A2=E9=80=BB=E8=BE=91=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.css | 9 +-
src/components/form-item/main.js | 15 +--
src/components/form-item/main.less | 6 ++
src/components/gird/main.css | 3 +-
src/pages/exchangecode/list/list.js | 6 +-
src/pages/overview/main/main.css | 9 +-
src/pages/overview/main/main.js | 3 +
src/pages/system/account/add/add.less | 2 +-
.../account/add/adduserinfo/adduserinfo.js | 46 +++++-----
.../account/add/adduserinfo/adduserinfo.less | 1 -
src/pages/system/account/list/list.js | 91 ++++++++++++++++---
src/pages/system/account/list/modifypwd.js | 16 ++--
src/pages/system/role/add/add.js | 24 ++++-
src/pages/system/role/list/list.js | 17 +++-
14 files changed, 184 insertions(+), 64 deletions(-)
diff --git a/src/App.css b/src/App.css
index fde6666b..2d109915 100644
--- a/src/App.css
+++ b/src/App.css
@@ -125,10 +125,17 @@
margin-right: 0px!important;
}
+
.zent-card-body[data-zv="9.11.0"]{
- max-height: 700px!important;
+ max-height: 440px!important;
overflow-y: scroll;
}
+@media screen and (min-width: 1700px) {
+ .zent-card-body[data-zv="9.11.0"]{
+ max-height: 650px!important;
+ overflow-y: scroll;
+ }
+}
.zent-form-error[data-zv="9.11.0"]{
color: #ed3b3b!important;
}
diff --git a/src/components/form-item/main.js b/src/components/form-item/main.js
index 4486923f..381ddc58 100644
--- a/src/components/form-item/main.js
+++ b/src/components/form-item/main.js
@@ -6,18 +6,21 @@ import React from 'react'
import Menu from "../menu/main.js"
export default class filterSelect extends React.Component {
- constructor(props) {
+ static defaultProps = {
+ required:'*'
+}
+ constructor(props) {
super(props);
- this.state = {
-
- }
+
}
render() {
- const {labelname,prop,labelwidth,myClassName,id} = this.props
+ const {labelname,prop,labelwidth,myClassName,id,required} = this.props
return (
- {labelname}
+
+ {labelname}
+ {required?*:null}
{this.props.children}
diff --git a/src/components/form-item/main.less b/src/components/form-item/main.less
index e69de29b..0041c96a 100644
--- a/src/components/form-item/main.less
+++ b/src/components/form-item/main.less
@@ -0,0 +1,6 @@
+.mustwrite{
+ color: #ed3b3b;
+ margin-left: 2px;
+ font-weight: bold;
+ font-size: 16px;
+}
\ No newline at end of file
diff --git a/src/components/gird/main.css b/src/components/gird/main.css
index 745a348a..acc44d70 100644
--- a/src/components/gird/main.css
+++ b/src/components/gird/main.css
@@ -71,7 +71,8 @@
}
.tfoot.hide {
- visibility: hidden;
+ /* visibility: hidden; */
+ display: none;
}
diff --git a/src/pages/exchangecode/list/list.js b/src/pages/exchangecode/list/list.js
index ca090a07..b8f28e5f 100644
--- a/src/pages/exchangecode/list/list.js
+++ b/src/pages/exchangecode/list/list.js
@@ -296,7 +296,7 @@ export default class acclist extends React.Component{
}
{/* 进行 */}
{
- this.state.activepage==0?
+
+
);
}
}
diff --git a/src/pages/system/account/add/add.less b/src/pages/system/account/add/add.less
index 259d779a..69799081 100644
--- a/src/pages/system/account/add/add.less
+++ b/src/pages/system/account/add/add.less
@@ -11,7 +11,7 @@
width: 100px;
}
.zent-form-actions{
- margin-top: 150px!important;
+ margin-top: 50px!important;
}
#accadd .zent-form-horizontal[data-zv="9.11.0"] .zent-form-label{
justify-content: flex-start;
diff --git a/src/pages/system/account/add/adduserinfo/adduserinfo.js b/src/pages/system/account/add/adduserinfo/adduserinfo.js
index caa454ea..1d0eded0 100644
--- a/src/pages/system/account/add/adduserinfo/adduserinfo.js
+++ b/src/pages/system/account/add/adduserinfo/adduserinfo.js
@@ -5,7 +5,7 @@ import Ipt from "../../../../../components/input/main"
import Form from "../../../../../components/form/main"
import FormItem from "../../../../../components/form-item/main"
import "../../../../../assets/comm.css"
-import {Select,Button,ImageUpload ,onUpload} from "zent"
+import {Select,Button,ImageUpload ,onUpload,Sweetalert} from "zent"
import Bus from "../../../../../assets/eventBus.js"
export default class adduserinfo extends React.Component{
constructor(props){
@@ -21,7 +21,7 @@ export default class adduserinfo extends React.Component{
post:"",
station:"",
},
- }
+ }
}
componentDidMount(e){
@@ -66,18 +66,19 @@ export default class adduserinfo extends React.Component{
}
cancel(){
- let model2 = { //数据模型不可少
- account:"",
- phone:"",
- pwd:"",
- name:"",
- company:"",
- deparment:"",
- post:"",
- station:"",
- }
- this.setState({model:model2});
- this.refs.form1.cancel();
+ //取消二次弹出框
+ Sweetalert.confirm({
+ type:'warning',
+ closeBtn:true,
+ title:'确认操作',
+ content:
是否取消本次新增?
,
+ onConfirm:()=>{
+ window.history.back()
+ },
+ onCancel: this.onCancel,
+ className:'questModal',
+ parentComponent: this
+ });
}
render(){
const options = [
@@ -111,10 +112,11 @@ export default class adduserinfo extends React.Component{
],
pwd:[
{ type: "required", message: "请输入密码"},
- { type: "regExp", message: "格式不对",reg:"^[1][3,5,7,8][0-9]\\d{8}$"}
+ { type: "regExp", message: "6-16位字符,数字+字母组成(字母区分大小写)",reg:"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$"}
],
name: [
- { type: "required", message: "请输入真实姓名"},
+ { type: "required", message: "请输入真实姓名"},
+ {type:'regExp',message:'2-16字汉字组成',reg:"[\u4e00-\u9fa5]{2,7}"}
],
company:[
{ type: "required", message: "请选择公司"},
@@ -136,7 +138,7 @@ export default class adduserinfo extends React.Component{
return(
diff --git a/src/pages/system/role/list/list.js b/src/pages/system/role/list/list.js
index bf783c8e..7838d951 100644
--- a/src/pages/system/role/list/list.js
+++ b/src/pages/system/role/list/list.js
@@ -36,10 +36,21 @@ export default class acclist extends React.Component{
constructor(props){
super(props)
this.state={
- rolelist:[{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}],
- tabList:[{title:"角色列表"}]
+ rolelist:[{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},
+ {role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}
+ ,{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}
+ ,{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}],
+ tabList:[{title:"角色列表"},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},
+ {role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}
+ ,{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}
+ ,{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'},{role:'管理员',time:'2021-11-05 15:25:23'}],
+ tabList:[{title:"角色列表"}],
+ tableHeight:600,
}
}
+ componentWillMount(){
+ this.setState({tableHeight:window.innerHeight-390});
+ }
clickFn(){
this.props.history.push('/system/role-add');
sessionStorage.setItem('pathname2','/system/role-add')
@@ -65,7 +76,6 @@ export default class acclist extends React.Component{
- {/* */}
{
this.pageChange(e)
}}