1.角色做成单选
This commit is contained in:
parent
f5443e1a80
commit
49b87991ec
|
@ -6,17 +6,16 @@
|
|||
v-model="areaId"
|
||||
placeholder="请选择运营区"
|
||||
filterable
|
||||
clearable
|
||||
@change="handleAreaChange"
|
||||
size="medium"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in areaOptions"
|
||||
:key="item.areaId"
|
||||
:label="item.areaName + ' - ' + item.deptName"
|
||||
:label="item.areaName + ' - ' + item.deptName"
|
||||
:value="item.areaId"
|
||||
>
|
||||
<div class="option-content" style=" display: flex;justify-content: space-between;">
|
||||
<div class="option-content" style=" display: flex;justify-content: space-between;">
|
||||
<span class="area-name">{{ item.areaName }}</span>
|
||||
<span class="dept-name">{{ item.deptName }}</span>
|
||||
</div>
|
||||
|
|
|
@ -628,7 +628,7 @@ export default {
|
|||
return;
|
||||
}
|
||||
// this.form.rule.push(this.more)
|
||||
// console.log(this.form,'mmmmmmmmmmmmm');
|
||||
console.log(this.form,'mmmmmmmmmmmmm');
|
||||
let data = { ...this.form }; // 使用对象扩展运算符确保复制一个新对象,避免直接修改 this.form
|
||||
|
||||
|
||||
|
@ -650,6 +650,10 @@ export default {
|
|||
if(this.form.chargingCycle==1){
|
||||
data.chargingCycleValue=this.time1
|
||||
}else if(this.form.chargingCycle==2){
|
||||
if(!this.time2){
|
||||
this.$modal.msgError('自定义时刻不能为空');
|
||||
return;
|
||||
}
|
||||
data.chargingCycleValue=this.time2
|
||||
}
|
||||
// console.log(data, 'mmmmmmmmmmmmm');
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="refundList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="refundList" show-summary="total" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="时间" align="center" prop="day" />
|
||||
<el-table-column label="代理商" align="center" prop="deptName" />
|
||||
|
|
|
@ -248,7 +248,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||
<el-select v-model="form.roleIds" placeholder="请选择角色">
|
||||
<el-option
|
||||
v-for="item in roleOptions"
|
||||
:key="item.roleId"
|
||||
|
@ -579,6 +579,10 @@ export default {
|
|||
}else if(roleKey == "partner"){
|
||||
role = '4';
|
||||
}
|
||||
}else{
|
||||
this.$modal.msgError("系统用户未绑定角色");
|
||||
this.open2 = false;
|
||||
return
|
||||
}
|
||||
console.log("role",role)
|
||||
bandSystemUser({userId:this.appUserId,sysUserId:this.form.userId,role:role}).then(response => {
|
||||
|
@ -725,8 +729,10 @@ export default {
|
|||
this.form = response.data;
|
||||
this.postOptions = response.posts;
|
||||
this.roleOptions = response.roles;
|
||||
// 假设从接口返回的数据为 response
|
||||
this.$set(this.form, "postIds", response.postIds);
|
||||
this.$set(this.form, "roleIds", response.roleIds);
|
||||
// this.$set(this.form, "roleIds", response.roleIds);
|
||||
this.form.roleIds = response.roleIds[0]; // 取出第一个角色 ID
|
||||
this.open = true;
|
||||
this.title = "修改用户";
|
||||
this.form.password = "";
|
||||
|
@ -760,6 +766,8 @@ export default {
|
|||
submitForm: function() {
|
||||
this.form.userName = this.form.phonenumber;
|
||||
this.form.userType = '00';
|
||||
this.form.roleIds = [this.form.roleIds];
|
||||
console.log("roleIds"+this.form.roleIds)
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.userId != undefined) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user