1.角色做成单选

This commit is contained in:
邱贞招 2024-10-22 15:39:37 +08:00
parent f5443e1a80
commit 49b87991ec
4 changed files with 18 additions and 7 deletions

View File

@ -6,7 +6,6 @@
v-model="areaId"
placeholder="请选择运营区"
filterable
clearable
@change="handleAreaChange"
size="medium"
>

View File

@ -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');

View File

@ -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" />

View File

@ -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) {