Commit 5f69487e by 前端

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

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