| | |
| | | v-if="item.type === 'select'" |
| | | slot="prepend" |
| | | v-model="row[item.prop]" |
| | | @change="roleChange" |
| | | > |
| | | <el-option |
| | | v-for="optionItem in roleList" |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button class="el-icon-plus" type="success" @click="addClassifyAuth"></el-button> |
| | | <el-button class="el-icon-minus" type="warning" @click="subClassifyAuth"></el-button> |
| | | <el-button type="primary" @click="submit">提 交</el-button> |
| | | <el-button type="danger" @click="isShowDialog = false">关 闭</el-button> |
| | | <el-button type="info" plain @click="selectAllButton">按钮全选</el-button> |
| | | <el-button class="el-icon-plus" type="success" plain @click="addClassifyAuth"></el-button> |
| | | <el-button class="el-icon-minus" type="warning" plain @click="subClassifyAuth"></el-button> |
| | | <el-button type="primary" plain @click="submit">提 交</el-button> |
| | | <el-button type="danger" plain @click="isShowDialog = false">关 闭</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | // 对话框显示控制 |
| | | isShowDialog: this.visible, |
| | | isLoading: false, |
| | | tableHeight: '520px', |
| | | tableHeight: 'calc(100vh - 550px)', |
| | | classifyAuthData: [], |
| | | //列头 |
| | | classifyAuthHeader: [], |
| | |
| | | let item = { |
| | | oid: authData.oid, |
| | | roleData: authData.roleId, |
| | | classifyItem: this.classifyData.text, |
| | | classifyItem: this.classifyData.label, |
| | | uuid: uuidv4(),//生成唯一的id |
| | | } |
| | | //将按钮设置进去 |
| | |
| | | this.$emit('update:visible', false); |
| | | this.classifyAuthData = []; |
| | | }, |
| | | // 角色改变时 |
| | | roleChange(roleId){ |
| | | console.log(roleId); |
| | | |
| | | }, |
| | | // 增加行 |
| | | addClassifyAuth() { |
| | | if(this.roleList.length<=0){ |
| | | this.$message.warning("当前租户不存在角色信息!"); |
| | | return; |
| | | } |
| | | let item = { |
| | | roleData: this.roleList[0].id, |
| | | classifyItem: this.classifyData.text, |
| | | classifyItem: this.classifyData.label, |
| | | uuid: uuidv4(),//生成唯一的id |
| | | } |
| | | //将按钮设置进去 |
| | |
| | | window.console.log(error); |
| | | }) |
| | | }, |
| | | // 全选按钮 |
| | | selectAllButton(){ |
| | | if(this.selectList.length!==1){ |
| | | this.$message.warning("请只选择一行需要全选的按钮的数据行!"); |
| | | return; |
| | | } |
| | | this.classifyAuthButton.forEach(item => { |
| | | //console.log("item",item); |
| | | Vue.set(this.selectList[0], item.id, true); |
| | | }); |
| | | //console.log("this.selectList",this.selectList); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |