Commit 5f69487e by 前端

系统管理用户管理新增编辑用户手机号去掉必填

1 parent e071f6d5
......@@ -4,143 +4,109 @@
<div class="user-tree-top">
<span>组织架构</span>
</div>
<el-input
size="mini"
<el-input size="mini"
placeholder="输入内容搜索"
v-model="orgName"
@input="treeInput"
></el-input>
<el-tree
:data="treedata"
@input="treeInput"></el-input>
<el-tree :data="treedata"
accordion
node-key="id"
highlight-current
@node-click="handleNodeClick"
:render-content="renderContent"
>
:render-content="renderContent">
</el-tree>
</div>
<div class="user-container">
<search-form
class="searchTop border-shadow"
<search-form class="searchTop border-shadow"
:formModel="searchForm"
:formList="userFormList"
>
<span class="inline-b" slot="form-slot">
<el-button
type="primary"
:formList="userFormList">
<span class="inline-b"
slot="form-slot">
<el-button type="primary"
:size="btn_size"
icon="el-icon-search"
:id="tableParams.btnId"
>搜索</el-button
>
<el-button
type="primary"
:id="tableParams.btnId">搜索</el-button>
<el-button type="primary"
:size="btn_size"
icon="el-icon-refresh"
@click="refresh"
>重置</el-button
>
@click="refresh">重置</el-button>
</span>
</search-form>
<h3>
用户管理
<div class="pull-right">
<el-button
type="primary"
<el-button type="primary"
:size="btn_size"
icon="el-icon-plus"
@click="btnClick('create')"
>新增</el-button
>
@click="btnClick('create')">新增</el-button>
</div>
</h3>
<basic-table
ref="userTable"
<basic-table ref="userTable"
:tableParams="tableParams"
:searchForm="searchForm"
:getListApi="getListApi"
:hasNum="false"
>
<span slot="status" slot-scope="scope">
<span
class="dot"
:hasNum="false">
<span slot="status"
slot-scope="scope">
<span class="dot"
:class="
scope.scope.enableStatus
? USERSTATUS[scope.scope.enableStatus].split(',')[1]
: ''
"
></span>
"></span>
<span class="statusText">{{
scope.scope.enableStatus
? USERSTATUS[scope.scope.enableStatus].split(",")[0]
: "--"
}}</span>
</span>
<span slot="table-button" slot-scope="scope">
<el-button
v-for="(j, idx) in tableParams.tableOption.btnList"
<span slot="table-button"
slot-scope="scope">
<el-button v-for="(j, idx) in tableParams.tableOption.btnList"
:key="idx"
:type="j.type || 'text'"
:size="btn_size"
@click="btnClick(j.pType, scope.scope)"
>{{ j.name }}</el-button
>
@click="btnClick(j.pType, scope.scope)">{{ j.name }}</el-button>
<!-- <el-link @click="openDialog(scope.scope)">指定数据</el-link> -->
<auth-link
type="primary"
<auth-link type="primary"
size="mini"
class="auth_link"
name="指定数据"
@click.native="openDialog(scope.scope)"
>指定数据</auth-link
>
@click.native="openDialog(scope.scope)">指定数据</auth-link>
</span>
</basic-table>
<basic-dialog
:title="userDialogTitle"
<basic-dialog :title="userDialogTitle"
:isVisible="userVisible"
@confirmDialog="handleConfirm"
@closeDialog="handleClose"
:btnLoading="btnLoading"
>
:btnLoading="btnLoading">
<slot>
<rule-form
:ruleForm="userForm"
<rule-form :ruleForm="userForm"
:rules="userRules"
:ruleData="userData"
ref="userForm"
>
<div class="" slot="specialLogin">
<el-switch
v-model="userForm.specialLogin"
ref="userForm">
<div class=""
slot="specialLogin">
<el-switch v-model="userForm.specialLogin"
active-text="开"
inactive-text="关"
:active-value="1"
:inactive-value="0"
></el-switch>
<el-tooltip
class="item"
:inactive-value="0"></el-switch>
<el-tooltip class="item"
effect="dark"
content="“特殊登录”开关打开后,会限制用户只能在某一台电脑登录,并且无法登录“e盾+”小程序,请谨慎使用!"
placement="top-start"
>
placement="top-start">
<i class="el-icon-question form_tips"></i>
</el-tooltip>
<template v-if="userForm.id && userForm.resetFlag">
<el-button
type="primary"
<el-button type="primary"
size="mini"
class="rest_button"
@click="restLogin(userForm.id)"
>重置UID</el-button
>
<el-tooltip
class="item"
@click="restLogin(userForm.id)">重置UID</el-button>
<el-tooltip class="item"
effect="dark"
content="用户更换常用电脑后,无法正常登录新e盾系统,可使用“重置UID”功能重置认证状态,二次确定即生效。"
placement="top-start"
>
placement="top-start">
<i class="el-icon-question form_tips"></i>
</el-tooltip>
</template>
......@@ -148,61 +114,48 @@
</rule-form>
</slot>
</basic-dialog>
<basic-dialog
:title="filterDialogTitle"
<basic-dialog :title="filterDialogTitle"
:isVisible="filterVisible"
@confirmDialog="filterConfirm"
@closeDialog="closeFilter"
>
@closeDialog="closeFilter">
<slot>
<el-input
placeholder="输入关键字进行过滤"
<el-input placeholder="输入关键字进行过滤"
v-model="filterText"
size="small"
>
size="small">
</el-input>
<el-tree
class="filter-tree"
<el-tree class="filter-tree"
:data="filterTextData"
:filter-node-method="filterNode"
highlight-current
ref="tree"
node-key="id"
check-on-click-node
>
check-on-click-node>
</el-tree>
</slot>
</basic-dialog>
</div>
<!-- 指定数据弹框 开始 -->
<glsx-dialog
:show="showDialog"
<glsx-dialog :show="showDialog"
title="指定数据"
@close="closeDialog()"
width="900px"
>
width="900px">
<div>
<assign-info
ref="assignInfo"
<assign-info ref="assignInfo"
v-if="showDialog"
:id="currentUserId"
@showBtnFlags="showBtnFlags"
></assign-info>
@showBtnFlags="showBtnFlags"></assign-info>
</div>
<template slot="footer">
<el-button type="default" size="small" @click="closeDialog"
>取消</el-button
>
<el-button
type="primary"
<el-button type="default"
size="small"
@click="closeDialog">取消</el-button>
<el-button type="primary"
size="small"
:loading="loading"
@click="saveInfo"
v-show="showFlags"
>确定</el-button
>
v-show="showFlags">确定</el-button>
</template>
</glsx-dialog>
<!-- 指定数据弹框 end -->
......@@ -438,7 +391,7 @@ export default {
},
],
phoneNumber: [
{ required: true, message: "请输入手机号", trigger: "blur" },
// { required: true, message: "请输入手机号", trigger: "blur" },
{ validator: this.$Common.checkRegExpPhoneTel, trigger: "blur" },
],
enableStatus: [{ required: true }],
......@@ -525,9 +478,11 @@ export default {
delete params.tenant;
delete params.resetFlag;
this.emptyData(params);
console.log(params);
let api = addUser;
if (params.id) api = editUser;
if (!params.phoneNumber) {
params.phoneNumber = 13800138000
}
api(params).then((res) => {
this.btnLoading = false;
if (res.code == "200") {
......@@ -872,7 +827,7 @@ export default {
positionChange(e) {
if (e) this.disabledDict("position", "岗位");
},
selectChange(e) {},
selectChange(e) { },
// 指定数据
openDialog(row) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!