| | |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <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 v-if="permissionChildrenList.UiPageLayoutAddBtn" class="button-custom-icon" plain size="small" |
| | | type="primary" |
| | | @click="addClickHandler"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutAddBtn.source"></icon-show> |
| | | 增加 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">编辑 |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDesignBtn" size="small" type="text" |
| | | @click="btnDesignClickHandler(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutDesignBtn.source"></icon-show> |
| | | 按钮设计 |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">删除 |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" size="small" type="text" |
| | | @click="editBtnClick(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutEditBtn.source"></icon-show> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">克隆 |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" size="small" type="text" |
| | | @click="rowDeleteHandler(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutDelBtn.source"></icon-show> |
| | | 删除 |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" size="small" type="text" |
| | | @click="rowCloneHandler(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutCloneBtn.source"></icon-show> |
| | | 克隆 |
| | | </el-button> |
| | | </template> |
| | | |
| | |
| | | <el-container v-loading="dialogLoading"> |
| | | <el-header style="height: 40px !important;padding-left: 5px;"> |
| | | <div style="display: flex"> |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">添加 |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" |
| | | @click="addClickBtnHandler">添加 |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">修改 |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" |
| | | @click="editClickBtnHandler">修改 |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">删除 |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" |
| | | @click="delClickBtnHandler">删除 |
| | | </el-button> |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-check" type="success" @click="saveClickBtnHandler">保存 |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-check" plain size="mini" |
| | | type="success" @click="saveClickBtnHandler">保存 |
| | | </el-button> |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-close" type="danger" @click="escClickBtnHandler">取消 |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-close" plain size="mini" |
| | | type="danger" @click="escClickBtnHandler">取消 |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">调整为下级按钮</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">调整为上级按钮</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">复制到其他组件</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">调整为下级按钮 |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">调整为上级按钮 |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">复制到其他组件 |
| | | </el-button> |
| | | </div> |
| | | </el-header> |
| | | <el-container> |
| | |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="display: flex"> |
| | | <i v-if="data.oId=='parentNode'" class="iconShow el-icon-s-home"></i> |
| | | <icon-show v-else :name="data.iconPath"></icon-show> |
| | | <icon-show v-if="data.oId!='parentNode' && data.iconPath && data.iconPath!='undefined'" :name="data.iconPath"></icon-show> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item :inline-message='true' label="名称:" prop="label"> |
| | | <el-form-item label="名称:" prop="label"> |
| | | <el-input v-model="basicForm.label" :disabled="disabledBtn"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="Action:" prop="actionName"> |
| | | <el-input v-model="basicForm.actionName" :disabled="disabledBtn" :clearable="true" @focus="actionFoucus" @clear="clearActionValue"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="actionFoucus"></i> |
| | | <el-input v-model="basicForm.actionName" :clearable="true" :disabled="disabledBtn" |
| | | @clear="clearActionValue" @focus="actionFoucus"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" |
| | | @click="actionFoucus"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12" v-show="basicForm.show=='0'"> |
| | | <el-col v-show="basicForm.show=='0'" :span="12"> |
| | | <el-form-item label="显示方式:" prop="showType"> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="text">文字</el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="image">图标</el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">文字和图标</el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">文字和图标 |
| | | </el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-show="basicForm.show=='0' && (basicForm.displayMode=='image'||basicForm.displayMode=='textandimage')"> |
| | | <el-form-item label="图标:" prop="iconPath"> |
| | | <el-form-item :class="basicForm.displayMode==='image'?'is-required':''" label="图标:" prop="iconPath"> |
| | | <input-icon v-model="basicForm.iconPath" :disabled="disabledBtn"></input-icon> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-container> |
| | | </el-container> |
| | | </el-dialog> |
| | | <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" @updataAction="actionSaveHandler"></action-dialog> |
| | | <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" |
| | | @updataAction="actionSaveHandler"></action-dialog> |
| | | <clone-dialog ref="cloneDialog" :fromOid="fromOid" :sourceOId="sourceOId" paramsType="tab" |
| | | type="pageDef"></clone-dialog> |
| | | <clone-dialog ref="cloneBtnDialog" :fromOid="formBtnOid" :sourceOId="sourceBtnOid" paramsType="pageDef" |
| | |
| | | editBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | dialogWidth:'600', |
| | | menuWidth:'150', |
| | | dialogWidth: '600', |
| | | menuWidth: '140', |
| | | column: [ |
| | | { |
| | | label: '名称', |
| | | prop: 'name', |
| | | width:180, |
| | | width: 180, |
| | | span: 24, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | { |
| | | label: '值', |
| | | prop: 'value', |
| | | type:'textarea', |
| | | type: 'textarea', |
| | | span: 24, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | {required: true, message: '请输入名称', trigger: 'blur'}, |
| | | ], |
| | | actionName: [ |
| | | {required: true, message: '请选择Action', trigger: 'blur'}, |
| | | {required: true, message: '请选择Action', trigger: 'change'}, |
| | | ], |
| | | }, |
| | | // 按钮设计 基础信息 |
| | | basicForm: { |
| | | seq: 1 |
| | | }, |
| | | basicForm: {}, |
| | | treeData: [], |
| | | treeOption: { |
| | | menu: false, |
| | |
| | | data: [], |
| | | option: { |
| | | ...basicOption, |
| | | size:'mini', |
| | | size: 'mini', |
| | | height: this.height, |
| | | addBtn: false, |
| | | index: true, |
| | | calcHeight: -30, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth: 300, |
| | | column: [ |
| | | { |
| | | label: '名称', |
| | | prop: 'name', |
| | | width: 220, |
| | | labelWidth: 110, |
| | | rules: [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | { |
| | | label: '编号', |
| | | label: '序号', |
| | | prop: 'seq', |
| | | width: 100, |
| | | type:'number', |
| | | labelWidth: 110, |
| | | hide: false, |
| | | rules: [ |
| | |
| | | ], |
| | | }, |
| | | { |
| | | label: '', |
| | | label: 'UI解析类型', |
| | | prop: 'uiParser', |
| | | hide: true, |
| | | labelWidth: 110, |
| | | }, |
| | | { |
| | | label: '', |
| | | label: '扩展属性', |
| | | prop: 'extAttr', |
| | | hide: true, |
| | | labelWidth: 110, |
| | |
| | | ], |
| | | group: [ |
| | | { |
| | | icon:'el-icon-info', |
| | | label:'', |
| | | icon: 'el-icon-info', |
| | | label: '', |
| | | arrow: true, |
| | | prop: 'group1', |
| | | column: [ |
| | |
| | | lastIndex: null, |
| | | selectList: [], |
| | | formDataRow: {}, |
| | | defaultForm: {}, |
| | | } |
| | | }, |
| | | computed:{ |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionChildrenList() { |
| | | return { |
| | | UiPageLayoutAddBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutAdd, false), |
| | | UiPageLayoutEditBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutEdit, false), |
| | | UiPageLayoutDelBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutDel, false), |
| | | UiPageLayoutCloneBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutClone, false), |
| | | UiPageLayoutDesignBtn: this.vaildData(this.permission[this.$route.query.id].UiPageLayoutDesign, false), |
| | | UiPageLayoutAddBtn: this.vaildData(this.permission[this.$route.query.id].CLSRIGHT, false), |
| | | UiPageLayoutEditBtn: this.vaildData(this.permission[this.$route.query.id].DATARIGHT, false), |
| | | UiPageLayoutDelBtn: this.vaildData(this.permission[this.$route.query.id].ATTRRIGHT, false), |
| | | UiPageLayoutCloneBtn: this.vaildData(this.permission[this.$route.query.id].CLONE, false), |
| | | UiPageLayoutDesignBtn: this.vaildData(this.permission[this.$route.query.id].UPLOAD, false), |
| | | } |
| | | } |
| | | }, |
| | |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | this.selectList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | |
| | | }; |
| | | }); |
| | | } |
| | | console.log('row',row); |
| | | this.searchTargerChangeFlag = false; |
| | | this.$refs.crud.rowEdit(row); |
| | | }, |
| | |
| | | if (row.templateType === '6') { |
| | | row.SubUIObjType = row.showType; |
| | | row.showType = ""; |
| | | } |
| | | if (row.templateType === '5' && this.form.linkType && !this.form.showLinkAbs) { |
| | | this.$message.error('请选择参照树设置'); |
| | | return loading(); |
| | | } |
| | | const params = { |
| | | ...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); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | // 按钮设计行点击 |
| | | nodeTreeClick(row) { |
| | | this.nodeTreeRow = row; |
| | | this.defaultForm = {...row}; |
| | | this.basicForm = {...row}; |
| | | this.paramsData = row.buttonParams ? Object.entries(row.buttonParams).map(([key, value]) => ({ |
| | | name: key, |
| | | value: value |
| | | })) : []; |
| | | this.disabledBtn = true; |
| | | this.$refs.form.clearValidate() |
| | | this.$refs.form.clearValidate(); |
| | | }, |
| | | |
| | | // 按钮设计参数信息删除 |
| | |
| | | this.disabledBtn = true; |
| | | if (this.saveType === 'add') { |
| | | this.$refs.Tree.setCurrentKey(null); |
| | | this.$refs.form.resetFields(); |
| | | } else { |
| | | this.basicForm = {...this.defaultForm}; |
| | | } |
| | | }, |
| | | |
| | | // 按钮设计保存 |
| | | saveClickBtnHandler() { |
| | | if (this.basicForm.show == '0' && (this.basicForm.displayMode == 'image' || this.basicForm.displayMode == 'textandimage') && this.basicForm.iconPath == '') { |
| | | if (this.basicForm.show == '0' && this.basicForm.displayMode == 'image' && this.basicForm.iconPath == '') { |
| | | this.$message.error('请选择图标'); |
| | | return; |
| | | } |
| | |
| | | this.$message.success(res.data.obj); |
| | | this.disabledBtn = true; |
| | | this.getTabBtnTree(); |
| | | this.basicForm = {}; |
| | | this.paramsData = []; |
| | | this.dialogLoading = false; |
| | | this.$refs.form.resetFields(); |
| | | } |
| | | }).catch(err => { |
| | | this.dialogLoading = false; |
| | |
| | | } else { |
| | | return false; |
| | | } |
| | | done(); |
| | | }); |
| | | }, |
| | | |
| | |
| | | actionSaveHandler(val) { |
| | | this.$set(this.basicForm, 'actionName', val.plName); |
| | | this.$set(this.basicForm, 'actionOId', val.plOId); |
| | | this.$set(this.basicForm, 'iconPath', val.plImage);//图标 |
| | | this.$refs.form.clearValidate('Action') |
| | | }, |
| | | // action选择弹窗直接关闭 |
| | | actionCancelHandler() { |
| | | if(this.basicForm.actionOId){ |
| | | if (this.basicForm.actionOId) { |
| | | this.$refs.form.clearValidate('Action') |
| | | } |
| | | }, |
| | | |
| | | //清除action |
| | | clearActionValue(){ |
| | | clearActionValue() { |
| | | this.$set(this.basicForm, 'actionName', ''); |
| | | this.$set(this.basicForm, 'actionOId', ''); |
| | | }, |