<el-form-item label="权限:" prop="defaultRole">
<el-select v-model="defaultRole" multiple placeholder="请选择权限" clearable @change="aaa">
<el-option label="没有权限" value="10" :disabled="defaultRole==1" />
<el-option label="最高权限" value="1" :disabled="defaultRole==10" />
<el-option label="派车单权限" value="2" :disabled="defaultRole==1||defaultRole==10" />
<el-option label="装车单权限" value="3" :disabled="defaultRole==1||defaultRole==10" />
<el-option label="卸车单权限" value="4" :disabled="defaultRole==1||defaultRole==10" />
<el-option label="查看发货历史权限" value="5" :disabled="defaultRole==1||defaultRole==10" />
<el-option label="改价权限" value="6" :disabled="defaultRole==1||defaultRole==10" />
</el-select>
</el-form-item>
aaa(v) {
if (v.indexOf("10") != -1) {
this.defaultRole = ["10"];
}
if (v.indexOf("1") != -1) {
this.defaultRole = ["1"];
}
console.log(this.defaultRole);
},
vue+element
最新推荐文章于 2024-07-02 22:39:45 发布