提交 32ea147e 编写于 作者: qq_40137331's avatar qq_40137331

1. 商户系统 新增操作员,取消超级管理员选项, 抽屉更改为两列展示

上级 5d0b0bcd
...@@ -205,12 +205,14 @@ export default { ...@@ -205,12 +205,14 @@ export default {
that.$message.success('修改成功') that.$message.success('修改成功')
that.isShow = false that.isShow = false
that.callbackFunc() // 刷新列表 that.callbackFunc() // 刷新列表
that.resetIsShow = false // 取消展示 this.resetIsShow = false // 取消重置密码板块展示
that.sysPassword.resetPass = false this.sysPassword.resetPass = false // 是否使用默认密码不展示
this.sysPassword.defaultPass = true // 是否使用默认密码默认为true
}).catch(res => { }).catch(res => {
that.confirmLoading = false that.confirmLoading = false
that.resetIsShow = false // 取消展示 this.resetIsShow = false // 取消重置密码板块展示
that.sysPassword.resetPass = false this.sysPassword.resetPass = false // 是否使用默认密码不展示
this.sysPassword.defaultPass = true // 是否使用默认密码默认为true
}) })
} }
} }
...@@ -220,7 +222,8 @@ export default { ...@@ -220,7 +222,8 @@ export default {
onClose () { onClose () {
this.isShow = false this.isShow = false
this.resetIsShow = false // 取消重置密码板块展示 this.resetIsShow = false // 取消重置密码板块展示
this.sysPassword.resetPass = false this.sysPassword.resetPass = false // 是否使用默认密码不展示
this.sysPassword.defaultPass = true // 是否使用默认密码默认为true
}, },
// 使用默认密码重置是否为true // 使用默认密码重置是否为true
isResetPass () { isResetPass () {
......
...@@ -13,77 +13,94 @@ ...@@ -13,77 +13,94 @@
<a-form-model <a-form-model
ref="infoFormModel" ref="infoFormModel"
:model="saveObject" :model="saveObject"
:label-col="{span: 8}" :rules="rules"
:wrapper-col="{span: 12}" style="padding-bottom:50px"
:rules="rules"> layout="vertical"
>
<a-row justify="space-between" type="flex">
<a-col :span="10">
<a-form-model-item label="用户登录名:" prop="loginUsername">
<a-input v-model="saveObject.loginUsername" :disabled="!isAdd" />
</a-form-model-item>
</a-col>
<a-form-model-item label="用户登录名:" prop="loginUsername"> <a-col :span="10">
<a-input v-model="saveObject.loginUsername" :disabled="!isAdd" /> <a-form-model-item label="用户姓名:" prop="realname">
</a-form-model-item> <a-input v-model="saveObject.realname" />
</a-form-model-item>
</a-col>
<a-form-model-item label="用户姓名:" prop="realname"> <a-col :span="10">
<a-input v-model="saveObject.realname" /> <a-form-model-item label="手机号:" prop="telphone">
</a-form-model-item> <a-input v-model="saveObject.telphone" />
</a-form-model-item>
</a-col>
<a-form-model-item label="手机号:" prop="telphone"> <a-col :span="10">
<a-input v-model="saveObject.telphone" /> <a-form-model-item label="编号:" prop="userNo">
</a-form-model-item> <a-input v-model="saveObject.userNo" />
</a-form-model-item>
</a-col>
<a-form-model-item label="编号:" prop="userNo"> <a-col :span="10">
<a-input v-model="saveObject.userNo" /> <a-form-model-item label="请选择性别:" prop="sex">
</a-form-model-item> <a-radio-group v-model="saveObject.sex">
<a-radio :value="1"></a-radio>
<a-form-model-item label="请选择性别:" prop="sex"> <a-radio :value="2"></a-radio>
<a-radio-group v-model="saveObject.sex"> </a-radio-group>
<a-radio :value="1"></a-radio> </a-form-model-item>
<a-radio :value="2"></a-radio> </a-col>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="是否为超级管理员:" prop="isAdmin">
<a-radio-group v-model="saveObject.isAdmin">
<a-radio :value="1"></a-radio>
<a-radio :value="0"></a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="状态:" prop="state">
<a-radio-group v-model="saveObject.state">
<a-radio :value="1">启用</a-radio>
<a-radio :value="0">停用</a-radio>
</a-radio-group>
</a-form-model-item>
<a-col :span="10">
<a-form-model-item label="状态:" prop="state">
<a-radio-group v-model="saveObject.state">
<a-radio :value="1">启用</a-radio>
<a-radio :value="0">停用</a-radio>
</a-radio-group>
</a-form-model-item>
</a-col>
</a-row>
<a-divider orientation="left" v-if="resetIsShow"> <a-divider orientation="left" v-if="resetIsShow">
<a-tag color="#FF4B33"> <a-tag color="#FF4B33">
账户安全 账户安全
</a-tag> </a-tag>
</a-divider> </a-divider>
<a-form-model-item label="重置密码:" v-if="resetIsShow">
<a-checkbox v-model="sysPassword.resetPass"></a-checkbox>
</a-form-model-item>
<div v-if="sysPassword.resetPass" style="padding-bottom:50px"> <div style="display:flex;flex-direction:row;">
<a-form-model-item label="恢复默认密码:"> <a-row justify="space-between" type="flex" style="width:100%">
<a-checkbox v-model="sysPassword.defaultPass" @click="isResetPass"></a-checkbox> <a-col :span="10">
</a-form-model-item> <a-form-model-item label="" v-if="resetIsShow">
<div> 重置密码:<a-checkbox v-model="sysPassword.resetPass"></a-checkbox>
<!-- <div v-else> -->
<div v-show="!this.sysPassword.defaultPass">
<a-form-model-item label="新密码:" prop="newPwd">
<a-input-password
autocomplete="new-password"
v-model="sysPassword.newPwd"
:disabled="sysPassword.defaultPass" />
</a-form-model-item> </a-form-model-item>
</a-col>
<a-form-model-item label="确认新密码:" prop="confirmPwd"> <a-col :span="10">
<a-input-password <a-form-model-item label="" v-if="sysPassword.resetPass">
autocomplete="new-password" 恢复默认密码:<a-checkbox v-model="sysPassword.defaultPass" @click="isResetPass"></a-checkbox>
v-model="sysPassword.confirmPwd"
:disabled="sysPassword.defaultPass" />
</a-form-model-item> </a-form-model-item>
</div> </a-col>
</a-row>
</div>
<div v-if="sysPassword.resetPass">
<div v-show="!this.sysPassword.defaultPass">
<a-row justify="space-between" type="flex">
<a-col :span="10">
<a-form-model-item label="新密码:" prop="newPwd">
<a-input-password
autocomplete="new-password"
v-model="sysPassword.newPwd"
:disabled="sysPassword.defaultPass" />
</a-form-model-item>
</a-col>
<a-col :span="10">
<a-form-model-item label="确认新密码:" prop="confirmPwd">
<a-input-password
autocomplete="new-password"
v-model="sysPassword.confirmPwd"
:disabled="sysPassword.defaultPass" />
</a-form-model-item>
</a-col>
</a-row>
</div> </div>
</div> </div>
...@@ -93,7 +110,6 @@ ...@@ -93,7 +110,6 @@
</div> </div>
</a-form-model> </a-form-model>
</a-drawer> </a-drawer>
</template> </template>
...@@ -186,7 +202,6 @@ ...@@ -186,7 +202,6 @@
this.isAdd = !recordId this.isAdd = !recordId
// 数据恢复为默认数据 // 数据恢复为默认数据
this.saveObject = { this.saveObject = {
isAdmin: 1,
state: 1, state: 1,
sex: 1 sex: 1
} }
...@@ -238,10 +253,14 @@ ...@@ -238,10 +253,14 @@
that.callbackFunc() // 刷新列表 that.callbackFunc() // 刷新列表
that.resetIsShow = false // 取消展示 that.resetIsShow = false // 取消展示
that.sysPassword.resetPass = false that.sysPassword.resetPass = false
that.sysPassword.defaultPass = true // 是否使用默认密码默认为true
that.resetPassEmpty(that) // 清空密码
}).catch(res => { }).catch(res => {
that.confirmLoading = false that.confirmLoading = false
that.resetIsShow = false // 取消展示 that.resetIsShow = false // 取消展示
that.sysPassword.resetPass = false that.sysPassword.resetPass = false
that.sysPassword.defaultPass = true // 是否使用默认密码默认为true
that.resetPassEmpty(that) // 清空密码
}) })
} }
} }
...@@ -251,7 +270,9 @@ ...@@ -251,7 +270,9 @@
onClose () { onClose () {
this.isShow = false this.isShow = false
this.resetIsShow = false // 取消重置密码板块展示 this.resetIsShow = false // 取消重置密码板块展示
this.sysPassword.resetPass = false this.resetPassEmpty(this) // 清空密码
this.sysPassword.resetPass = false // 关闭密码输入
this.sysPassword.defaultPass = true // 是否使用默认密码默认为true
}, },
// 使用默认密码重置是否为true // 使用默认密码重置是否为true
isResetPass () { isResetPass () {
...@@ -259,6 +280,11 @@ ...@@ -259,6 +280,11 @@
this.sysPassword.newPwd = '' this.sysPassword.newPwd = ''
this.sysPassword.confirmPwd = '' this.sysPassword.confirmPwd = ''
} }
},
// 保存后清空密码
resetPassEmpty (that) {
that.sysPassword.newPwd = ''
that.sysPassword.confirmPwd = ''
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册