¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // åè½æ¨¡åæ¥è¯¢ |
| | | export function getUIAuthor(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getUIAuthor", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | //ææ |
| | | export const authorizedUI = (params) => { |
| | | return request({ |
| | | url: '/api/uiManagerController/authorizedUI', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog v-dialogDrag |
| | | :title="dialog.title" |
| | | :visible.sync="dialog.showDialog" |
| | | width="1000px" |
| | | :append-to-body="true" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="cancelDialog"> |
| | | <el-aside> |
| | | <basic-container> |
| | | <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"> |
| | | <i class="el-icon-user-solid"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <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="el-icon-user-solid"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </basic-container> |
| | | </el-main> |
| | | <div class="dialog-footer avue-dialog__footer"> |
| | | <el-button type="primary" plain size="small" @click="submitDialog" >ææ</el-button> |
| | | <el-button type="primary" plain size="small" @click="clearValue" >éç½®</el-button> |
| | | <el-button size="small" @click="cancelDialog">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridRoles} from '@/api/system/role/api' |
| | | import {getUIAuthor,authorizedUI} from "@/api/authority/ui/uiAuthor"; |
| | | |
| | | export default { |
| | | name: "UIDialog", |
| | | data() { |
| | | return { |
| | | dialog: { |
| | | showDialog: false, |
| | | title: "UIææ", |
| | | loading: false, |
| | | type: "add", |
| | | }, |
| | | type:'',//ä¸å¡ç±»å |
| | | context:'',//UIä¸ä¸æcode |
| | | treeOption: { |
| | | height: '500px', |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'name', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [], |
| | | uiTreeOption: { |
| | | height: '500px', |
| | | menu: false, |
| | | addBtn: false, |
| | | filter:false, |
| | | props: { |
| | | label: 'name', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | uiTreeData: [], |
| | | } |
| | | }, |
| | | methods:{ |
| | | openDialog(type,context) { |
| | | this.type=type; |
| | | this.context=context; |
| | | this.dialog.showDialog = true; |
| | | this.getTreeList() |
| | | |
| | | }, |
| | | cancelDialog() { |
| | | this.dialog.loading = false; |
| | | this.dialog.showDialog = false; |
| | | }, |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | gridRoles().then(res => { |
| | | this.treeData = res.data.data; |
| | | loading.close(); |
| | | }).catch(error=>{ |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | // è§è²ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | |
| | | const loading = this.$loading({}); |
| | | getUIAuthor().then(res => { |
| | | this.uiTreeData = res.data.data; |
| | | loading.close(); |
| | | }).catch(error=>{ |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | submitDialog() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | const formData={} |
| | | authorizedUI(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.cancelDialog(); |
| | | } |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | clearValue(){ |
| | | this.$refs.uiTree.setCheckedNodes([]) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <div style="height: calc(100vh - 200px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-user-solid"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridRoles} from "@/api/system/role/api"; |
| | | import {getUIAuthor,authorizedUI} from "@/api/authority/ui/uiAuthor"; |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | type:'',//ä¸å¡ç±»å |
| | | treeOption: { |
| | | height: '500px', |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'name', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [], |
| | | uiTreeOption: { |
| | | height: '500px', |
| | | menu: false, |
| | | addBtn: false, |
| | | filter:false, |
| | | props: { |
| | | label: 'name', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | uiTreeData: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList() |
| | | }, |
| | | methods:{ |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | gridRoles().then(res => { |
| | | this.treeData = res.data.data; |
| | | loading.close(); |
| | | }).catch(error=>{ |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | // è§è²ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | const loading = this.$loading({}); |
| | | getUIAuthor().then(res => { |
| | | this.uiTreeData = res.data.data; |
| | | loading.close(); |
| | | }).catch(error=>{ |
| | | loading.close(); |
| | | }) |
| | | }, |
| | | saveHandler() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | const formData={} |
| | | authorizedUI(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("ä¿åæå"); |
| | | this.cancelDialog(); |
| | | } |
| | | }); |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | clearValue(){ |
| | | this.$refs.uiTree.setCheckedNodes([]) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | |
| | | dialog: { |
| | | showDialog: false, |
| | | title: "å建", |
| | | submitTxt: "ä¿å", |
| | | submitIcon: "el-icon-check", |
| | | loading: false, |
| | | type: "add", |
| | | }, |
| | | crudDialog: { |
| | | showDialog: false, |
| | | submitTxt: "ä¿å", |
| | | submitIcon: "el-icon-check", |
| | | }, |
| | | formItems:[{ |
| | | label: 'æ¥è¯¢æ¨¡æ¿åç§°', |
| | |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delHandler">å é¤</el-button>--> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">导åº</el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导å
¥</el-button> |
| | | <el-button icon="el-icon-place" plain size="small" type="primary" @click="">ææ</el-button> |
| | | <el-button icon="el-icon-place" plain size="small" type="primary" @click="uiAuthorHandler">ææ</el-button> |
| | | </template> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="rowEditBtnClick(scope.row)">ç¼è¾ |
| | |
| | | <!-- 导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" :fileData="fileData" title="导å
¥" |
| | | @updata="getTableList" @upfaildata="upFail"></upload-file> |
| | | <!--页ç¾çªå£--> |
| | | <el-dialog v-dialogDrag |
| | | :title="dialog.title" |
| | | :visible.sync="dialog.showDialog" |
| | |
| | | @close="dialog.showDialog=false"> |
| | | <pl-show :uiDefineData="dialog.uiDefineData"></pl-show> |
| | | </el-dialog> |
| | | <!--uiææ--> |
| | | <ui-author ref="uiAuthor"></ui-author> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | |
| | | import basicOption from "@/util/basic-option"; |
| | | import func from "@/util/func"; |
| | | import plShow from "@/views/modelingMenu/ui/uiDefine/rightRegion/plShow"; |
| | | import uiAuthor from "@/views/authority/ui/uiAuthorization/UIDialog" |
| | | export default { |
| | | name: "index", |
| | | components:{plShow}, |
| | | components:{plShow,uiAuthor}, |
| | | data() { |
| | | return { |
| | | dialog: { |
| | |
| | | upFail(response){ |
| | | |
| | | }, |
| | | //uiææ |
| | | uiAuthorHandler(){ |
| | | if (this.selectList.length!=1) { |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.$refs.uiAuthor.openDialog(this.nodeRow.attributes.name,this.selectList[0].plCode); |
| | | }, |
| | | // ç¼è¾æé® |
| | | rowEditBtnClick(row) { |
| | | this.form={ |