Merge remote-tracking branch 'origin/master'
| | |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">å
é</el-button> |
| | | </template> |
| | | |
| | | <!-- eventKey以åeventValueæ¾ç¤ºåºå --> |
| | |
| | | </el-button> |
| | | <el-button plain size="mini" type="primary">è°æ´ä¸ºä¸çº§æé®</el-button> |
| | | <el-button plain size="mini" type="primary">è°æ´ä¸ºä¸çº§æé®</el-button> |
| | | <el-button plain size="mini" type="primary">å¤å¶å°å
¶ä»ç»ä»¶</el-button> |
| | | <el-button plain size="mini" type="primary" @click="cloneClickBtnHandler">å¤å¶å°å
¶ä»ç»ä»¶</el-button> |
| | | </div> |
| | | </el-header> |
| | | <el-container> |
| | |
| | | </el-container> |
| | | </el-dialog> |
| | | <action-dialog ref="actionDialog" @updataAction="actionSaveHandler"></action-dialog> |
| | | <clone-dialog ref="cloneDialog"></clone-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | addPageDefination |
| | | } from "@/api/UI/uiDefine"; |
| | | import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action'; |
| | | import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog"; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | } |
| | | }, |
| | | components: { |
| | | actionDialog |
| | | actionDialog, |
| | | cloneDialog |
| | | }, |
| | | name: "index", |
| | | data() { |
| | |
| | | this.treeData = [{ |
| | | label: this.selectList[0].name, |
| | | oId: 'parentNode', |
| | | disabled: true, |
| | | children: data |
| | | }]; |
| | | this.treeLoading = false; |
| | |
| | | }); |
| | | }, |
| | | |
| | | cloneClickBtnHandler(){ |
| | | if (func.isEmptyObject(this.nodeTreeRow)) { |
| | | this.$message.error('è¯·éæ©èç¹è¿è¡å¤å¶'); |
| | | return; |
| | | } |
| | | if (this.nodeTreeRow.oId === "parentNode") { |
| | | this.$message.error('é¡¶å±èç¹ä¸å
许å¤å¶'); |
| | | return; |
| | | } |
| | | this.$refs.cloneDialog.openDialog(this.nodeTreeRow); |
| | | }, |
| | | // 鿩action |
| | | actionFoucus() { |
| | | this.$refs.actionDialog.btnActionVisible = true; |
| | |
| | | actionSaveHandler(val) { |
| | | this.$set(this.basicForm, 'actionName', val.plName); |
| | | this.$set(this.basicForm, 'actionOId', val.plOId); |
| | | } |
| | | }, |
| | | rowCloneHandler(row) { |
| | | this.$refs.cloneDialog.openDialog(row); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-dialogDrag |
| | | :title="dialog.title" |
| | | :visible.sync="dialog.showDialog" |
| | | width="1200px" |
| | | :append-to-body="true" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="cancelDialog"> |
| | | <el-container style="height: 580px"> |
| | | <el-aside style="width: 380px"> |
| | | <basic-container style="height: 530px"> |
| | | <h3 style="margin: 0 0 10px 0">ä¸å¡ç±»å</h3> |
| | | <div style="height: 435px"> |
| | | <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container style="height: 530px"> |
| | | <div style="height: 520px;"> |
| | | <avue-tree ref="uiTree" :data="uiTreeData" :option="uiTreeOption"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i :class="data.icon"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | <div class="dialog-footer avue-dialog__footer"> |
| | | <el-button type="primary" plain size="small" @click="submitDialog" >ä¿ å</el-button> |
| | | <el-button size="small" @click="cancelDialog">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getUIAuthor} from "@/api/authority/ui/uiAuthor"; |
| | | import {getBizTree} from "@/api/UI/uiDefine"; |
| | | |
| | | export default { |
| | | name: "cloneDialog", |
| | | data(){ |
| | | return { |
| | | dialog: { |
| | | showDialog: false, |
| | | title: "å
éç®æ ", |
| | | loading: false, |
| | | type: "clone", |
| | | }, |
| | | treeOption: { |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'text', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [], |
| | | defaultExpandKeys:[], |
| | | uiTreeOption: { |
| | | nodeKey:'oid', |
| | | checkOnClickNode:true, |
| | | defaultExpandedKeys:this.defaultExpandKeys, |
| | | multiple: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | filter:false, |
| | | props: { |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | uiTreeData: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | | openDialog( data) { |
| | | this.dialog.showDialog = true; |
| | | this.getTreeList() |
| | | this.uiTreeData=[]; |
| | | }, |
| | | cancelDialog() { |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | }, |
| | | submitDialog() { |
| | | linkSave({}).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("å
éæå"); |
| | | this.cancelDialog(); |
| | | this.$emit("refresh"); |
| | | } |
| | | }); |
| | | }, |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | getBizTree().then(res => { |
| | | this.treeData =res.data.obj.children; |
| | | loading.close(); |
| | | }).catch(error=>{ |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | // è§è²ç¹å» |
| | | nodeClick(row,node) { |
| | | this.nodeRow = row; |
| | | const loading = this.$loading({}); |
| | | const params = { |
| | | 'conditionMap[roleId]': this.nodeRow.oid, |
| | | 'conditionMap[type]': this.type, |
| | | 'conditionMap[context]': this.context |
| | | } |
| | | this.defaultExpandKeys=['root']; |
| | | getUIAuthor(params).then(res => { |
| | | this.processChildren(res.data.data[0]); // å¤çæ¯ä¸ªèç¹ |
| | | this.uiTreeOption.defaultExpandedKeys=this.defaultExpandKeys; |
| | | this.uiTreeData = [{ |
| | | attributes: {}, |
| | | checked: false, |
| | | expanded: true, |
| | | data: "root", |
| | | level: 0, |
| | | icon: 'el-icon-s-home', |
| | | oid: res.data.data[0].oid, |
| | | label: 'UIä¸ä¸æé项', |
| | | children: res.data.data[0].children |
| | | }]; |
| | | loading.close(); |
| | | }).catch(error => { |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | //å¤çæ |
| | | processChildren(item) { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children = item.children.map(child => { |
| | | if(child.level<4){ |
| | | this.defaultExpandKeys.push(child.oid) |
| | | } |
| | | if(child.level==1){ |
| | | child.icon='el-icon-s-promotion'; |
| | | child.label=child.data.label+'('+child.data.name+')' |
| | | }else if(child.level==2){ |
| | | child.icon='el-icon-s-order'; |
| | | child.label=child.text |
| | | }else if(child.level==3){ |
| | | child.icon='el-icon-office-building'; |
| | | child.label=child.text |
| | | }else if(child.level==4){ |
| | | child.icon='el-icon-document'; |
| | | child.label=child.text |
| | | }else if(child.level==5){ |
| | | child.icon='el-icon-s-tools'; |
| | | child.label=child.text |
| | | } |
| | | this.processChildren(child); // éå½å¤çæ¯ä¸ªåèç¹ |
| | | return child; // åªè¿ååèç¹ç attributes |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">å é¤</el-button>--> |
| | | </template> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">ç¼è¾ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">ç¼è¾</el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">å é¤</el-button> |
| | | <el-button icon="el-icon-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">å
é</el-button> |
| | | </template> |
| | | <template slot="plIsOpen" slot-scope="{row}"> |
| | | <el-tag v-if="row.plIsOpen === 1" type="success">å¯ç¨</el-tag> |
| | |
| | | <el-button type="primary" @click="saveHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <clone-dialog ref="cloneDialog"></clone-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | } from "@/api/UI/uiDefine"; |
| | | import func from "@/util/func"; |
| | | import bottomTable from "./bottomTable/index"; |
| | | import cloneDialog from "@/views/modelingMenu/ui/uiDefine/rightRegion/cloneDialog"; |
| | | |
| | | export default { |
| | | name: "plShow", |
| | |
| | | default: {} |
| | | }, |
| | | }, |
| | | components:{bottomTable}, |
| | | components:{bottomTable,cloneDialog}, |
| | | data() { |
| | | return { |
| | | uiDefineOid:'', |
| | |
| | | editBtn: false, |
| | | delBtn: false, |
| | | index:false, |
| | | menuWidth:160, |
| | | menuWidth:220, |
| | | align:'left', |
| | | column: [{ |
| | | label: 'åºå·', |
| | |
| | | } |
| | | }); |
| | | }, |
| | | rowCloneHandler(row) { |
| | | this.$refs.cloneDialog.openDialog(row); |
| | | }, |
| | | } |
| | | } |
| | | </script> |