| | |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" icon="el-icon-plus" plain size="small" type="primary" |
| | | @click="addClickHandler">增加 |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDesignBtn" icon="el-icon-edit-outline" plain size="small" type="primary" |
| | | @click="btnDesignClickHandler">按钮设计 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDesignBtn" icon="el-icon-edit-outline" size="small" type="text" |
| | | @click="btnDesignClickHandler(scope.row)">按钮设计 |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">编辑 |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除 |
| | |
| | | calcHeight: -30, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth:300, |
| | | column: [ |
| | | { |
| | | label: '名称', |
| | | prop: 'name', |
| | | width: 220, |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | |
| | | { |
| | | label: '编号', |
| | | prop: 'seq', |
| | | width:100, |
| | | labelWidth: 110, |
| | | hide: false, |
| | | rules: [ |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: '', |
| | | label: 'UI解析类型', |
| | | prop: 'uiParser', |
| | | hide: true, |
| | | labelWidth: 110, |
| | | }, |
| | | { |
| | | label: '', |
| | | label: '扩展属性', |
| | | prop: 'extAttr', |
| | | hide: true, |
| | | labelWidth: 110, |
| | |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | this.selectList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | |
| | | }; |
| | | }); |
| | | } |
| | | console.log('row',row); |
| | | this.searchTargerChangeFlag = false; |
| | | this.$refs.crud.rowEdit(row); |
| | | }, |
| | |
| | | |
| | | // 对话框表格添加 |
| | | formDataAddClickHandler() { |
| | | // if (!this.form.eventKey) { |
| | | // this.$message.error('请选择EventKey'); |
| | | // return; |
| | | // } |
| | | // |
| | | // if (!this.form.eventValue) { |
| | | // this.$message.error('请输入EventValue'); |
| | | // return; |
| | | // } |
| | | // |
| | | // if (this.eventData.length >= 1) { |
| | | // const eventValueStatus = this.eventData.some(item => item.eventValue === this.form.eventValue); |
| | | // |
| | | // if (eventValueStatus) { |
| | | // this.$message.error('已存在相同的 EventValue,不能重复添加'); |
| | | // return; |
| | | // } |
| | | // } |
| | | const obj = { |
| | | index: this.eventData.length, |
| | | eventKey: this.form.eventKey || 'SelectionEvent', |
| | |
| | | }, |
| | | |
| | | // 按钮设计 |
| | | btnDesignClickHandler() { |
| | | if (this.selectList.length != 1) { |
| | | btnDesignClickHandler(row) { |
| | | /*if (this.selectList.length != 1) { |
| | | this.$message.error('请选择一条数据'); |
| | | return; |
| | | } |
| | | }*/ |
| | | this.btnDesignVisible = true; |
| | | this.formBtnOid = this.selectList[0].id; |
| | | this.getTabBtnTree(); |
| | | this.formBtnOid = row.id; |
| | | this.getTabBtnTree(row); |
| | | }, |
| | | |
| | | // 左侧树请求 |
| | | getTabBtnTree() { |
| | | getTabBtnTree(row) { |
| | | const params = { |
| | | pageDefinationOid: this.selectList[0].id |
| | | pageDefinationOid: row && row.id ? row.id : this.selectList[0].id |
| | | } |
| | | this.treeLoading = true; |
| | | getTabButtons(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | const data = res.data.data; |
| | | this.treeData = [{ |
| | | label: this.selectList[0].name, |
| | | label: row && row.id ? row.name : this.selectList[0].name, |
| | | oId: 'parentNode', |
| | | disabled: true, |
| | | children: data |
| | | }]; |
| | | this.treeLoading = false; |
| | | } else { |
| | | this.$message.error('请检查控制台错误'); |
| | | this.$message.error(res.data.msg); |
| | | } |
| | | }) |
| | | }, |