Merge remote-tracking branch 'origin/master'
| | |
| | | }); |
| | | } |
| | | |
| | | // 龿¥ç±»å䏿æ¥è¯¢ |
| | | export function getLinkDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getLinkDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢æ¨¡æ¿ä¸ææ¥è¯¢ |
| | | export function getQTInfoDatasByPage(page, limit, params) { |
| | | return request({ |
| | |
| | | }); |
| | | } |
| | | |
| | | // ä¿åæ¥å£ |
| | | export function addPageDefination(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/addPageDefination", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | 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-container style="height: 550px"> |
| | | <el-aside> |
| | | <basic-container style="height: 500px"> |
| | | <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 style="height: 500px"> |
| | | <h3 style="margin: 0">模åæéé
ç½®</h3> |
| | | <div style="height: 445px;"> |
| | | <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 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: { |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'name', |
| | | 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(type,context) { |
| | | this.type=type; |
| | | this.context=context; |
| | | this.dialog.showDialog = true; |
| | | this.getTreeList() |
| | | this.uiTreeData=[]; |
| | | }, |
| | | 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,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: res.data.data[0].text, |
| | | 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 |
| | | }); |
| | | } |
| | | }, |
| | | submitDialog() { |
| | | const selectTreeList = this.$refs.uiTree.getCheckedNodes(); |
| | | if (selectTreeList.length == 0) { |
| | | this.$message.error("è¯·éæ©åè½æ¨¡å"); |
| | | return; |
| | | } |
| | | const formData = { |
| | | roleId: this.nodeRow.oid, |
| | | type: this.type, |
| | | context: this.context, |
| | | selectTreeList: selectTreeList |
| | | } |
| | | authorizedUI(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("æææå"); |
| | | this.cancelDialog(); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | 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 - 195px);"> |
| | | <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> |
| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <h3 style="margin: 0 0 10px 0">UIæéé
ç½®</h3> |
| | | <div> |
| | | <el-button icon="el-icon-place" plain size="small" type="primary" @click="saveHandler">ææ</el-button> |
| | | <el-button icon="el-icon-close" plain size="small" type="primary" @click="clearValue" style="margin-right: 40px;">éç½®</el-button> |
| | | ä¸å¡ç±»åï¼<el-select v-model="type" placeholder="è¯·éæ©" size="small" :clearable="true" @change="typeChange" style="width: 300px;margin-right: 20px;"> |
| | | <el-option |
| | | v-for="item in typeData" |
| | | :key="item.oid" |
| | | :label="item.text" |
| | | :value="item.attributes.name"> |
| | | </el-option> |
| | | </el-select> |
| | | UIä¸ä¸æï¼<el-select v-model="context" placeholder="è¯·éæ©" size="small" :clearable="true" @change="contextChange" style="width: 350px;"> |
| | | <el-option |
| | | v-for="item in contextData" |
| | | :key="item.oid" |
| | | :label="item.plCode+' '+item.plName" |
| | | :value="item.plCode"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div style="height: calc(100vh - 232px);margin-top: 10px;"> |
| | | <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> |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridRoles} from "@/api/system/role/api"; |
| | | import {getUIAuthor,authorizedUI} from "@/api/authority/ui/uiAuthor"; |
| | | import {getBizTree, gridUIContextData} from "@/api/UI/uiDefine"; |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | type:'',//ä¸å¡ç±»å |
| | | context:'',//UIä¸ä¸æcode |
| | | treeOption: { |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'name', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [], |
| | | defaultExpandKeys:[], |
| | | uiTreeOption: { |
| | | defaultExpandedKeys:this.defaultExpandKeys, |
| | | multiple: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | filter:false, |
| | | props: { |
| | | label: 'label', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | uiTreeData: [], |
| | | typeData:[], |
| | | contextData:[] |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | this.getTypeList() |
| | | }, |
| | | 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; |
| | | this.getUITree(); |
| | | }, |
| | | getUITree() { |
| | | if (this.nodeRow && this.nodeRow.oid) { |
| | | 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: res.data.data[0].text, |
| | | 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 |
| | | }); |
| | | } |
| | | }, |
| | | getTypeList() { |
| | | getBizTree().then(res => { |
| | | this.typeData=res.data.obj.children; |
| | | }) |
| | | }, |
| | | typeChange(data){ |
| | | this.contextData=[]; |
| | | this.type=data; |
| | | if(data){ |
| | | const params = { |
| | | 'conditionMap[btmName]': data, |
| | | } |
| | | gridUIContextData(1, 500, params).then(res => { |
| | | this.contextData = res.data.data; |
| | | }) |
| | | }else { |
| | | this.contextData = []; |
| | | } |
| | | this.getUITree(); |
| | | }, |
| | | contextChange(data){ |
| | | this.context=data; |
| | | this.getUITree(); |
| | | }, |
| | | saveHandler() { |
| | | const selectTreeList = this.$refs.uiTree.getCheckedNodes(); |
| | | if (selectTreeList.length == 0) { |
| | | this.$message.error("è¯·éæ©åè½æ¨¡å"); |
| | | return; |
| | | } |
| | | const formData = { |
| | | roleId: this.nodeRow.oid, |
| | | type: this.type, |
| | | context: this.context, |
| | | selectTreeList: selectTreeList |
| | | } |
| | | authorizedUI(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("æææå"); |
| | | this.cancelDialog(); |
| | | } |
| | | }); |
| | | }, |
| | | 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={ |
| | |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="editBtnClick(scope.row)">ç¼è¾ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="rowDeleteHandler(scope.row)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | |
| | | <!-- eventKey以åeventValueæ¾ç¤ºåºå --> |
| | | <template slot="bottomValueForm" slot-scope="scope"> |
| | | <avue-crud |
| | |
| | | getQTInfoDatasByPage, |
| | | getTabButtons, |
| | | addTapButton, |
| | | updateTapButton, getTabByContextIdAndType |
| | | updateTapButton, |
| | | getLinkDatasByPage, |
| | | addPageDefination |
| | | } from "@/api/UI/uiDefine"; |
| | | import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action'; |
| | | |
| | |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | paramsForm:{}, |
| | | paramsForm: {}, |
| | | eventOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | |
| | | addBtn: false, |
| | | index: true, |
| | | calcHeight: -30, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | |
| | | return val; |
| | | }, |
| | | change: (val) => { |
| | | console.log(val); |
| | | const list = ['showType' ,'linkType' ,'templateId', 'SubUILayout' , 'searchObjType' ,'queryTemplateName', 'controlPath' ,'expandCols', 'rootContent', 'showAbs' ,'showLinkAbs' ,'separator'] |
| | | list.forEach(item => { |
| | | this.form[item] = ""; |
| | | }) |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = true; // 忢é»è®¤å±ç¤ºæç´¢ç±»å |
| | | // 模æ¿ç±»åä¸ºè¡¨æ ¼ |
| | |
| | | dicData: [ |
| | | { |
| | | label: '䏿¾ç¤º', |
| | | value: '1' |
| | | value: '3' |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºè§è²', |
| | |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºFolder', |
| | | value: '3', |
| | | value: '1', |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | const obj = this.option.group[0].column.find(item => item.prop === 'linkType'); |
| | | obj.display = val.value !== '1'; |
| | | } |
| | | // 忢æ¸
空模æ¿ç±»å |
| | | const list = ['showType', 'linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType']; |
| | | list.forEach(item => { |
| | | this.form[item] = ''; |
| | | }) |
| | | } |
| | | }, |
| | | { |
| | |
| | | label: 'name', |
| | | value: 'name' |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å
容', |
| | | trigger: 'change' |
| | | } |
| | | ], |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | |
| | | prop: 'label' |
| | | }], |
| | | }, |
| | | change: (val) => { |
| | | const list = ['linkType', 'templateId', 'SubUILayout', 'queryTemplateName', 'searchObjType']; |
| | | list.forEach(item => { |
| | | this.form[item] = ''; |
| | | }) |
| | | }, |
| | | onLoad: ({page, value, data}, callback) => { |
| | | //pageå页 |
| | | // ä¸ç®¡æ¯æç´¢ è¿æ¯é¦æ¬¡å è½½é½ä¼è§¦åpage æä»¥åªéè¦æ¿pageåå¨ä¸å¦è¿è¡è¯·æ±å°±å¯ä»¥ 妿åå»å¤ædataæç´¢ æè
value忬¡å 载就ä¼éå¤è¯·æ± |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[filterInputValue]": value ? value.name : '' |
| | | "conditionMap[filterInputValue]": data ? data.name : '' |
| | | }; |
| | | getBtmDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | callback({ |
| | |
| | | type: 'table', |
| | | display: false, |
| | | props: { |
| | | label: 'viName', |
| | | value: 'viName' |
| | | label: 'name', |
| | | value: 'name' |
| | | }, |
| | | children: { |
| | | border: true, |
| | |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'viName' |
| | | prop: 'name' |
| | | }, { |
| | | label: 'ç±»å', |
| | | prop: 'viType' |
| | | label: 'æ ç¾', |
| | | prop: 'tag' |
| | | }], |
| | | }, |
| | | onLoad: ({page, value, data}, callback) => { |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[selectBtmType]": this.form.showType, |
| | | "conditionMap[filterInputValue]": data ? data.viName : '', |
| | | }; |
| | | getPortalVIDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | getLinkDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | console.log(res); |
| | | callback({ |
| | | total: res.data.total, |
| | |
| | | }, |
| | | { |
| | | label: 'éæ©æ¨¡æ¿', |
| | | prop: 'showTypea', |
| | | prop: 'templateId', |
| | | display: false, |
| | | type: 'table', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©æ¨¡æ¿', |
| | | trigger: 'submit' |
| | | } |
| | | ], |
| | | props: { |
| | | label: 'viName', |
| | | value: 'viName' |
| | |
| | | }, |
| | | { |
| | | label: 'UIå®ä¹', |
| | | prop: 'UI', |
| | | prop: 'SubUILayout', |
| | | type: 'table', |
| | | display: false, |
| | | props: { |
| | |
| | | label: 'æ¥è¯¢ç±»å', |
| | | prop: 'searchType', |
| | | display: false, |
| | | value: '1', |
| | | type: 'radio', |
| | | span: 24, |
| | | dicData: [ |
| | |
| | | onLoad: ({page, value, data}, callback) => { |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[selectBtmType]": this.form.showType, |
| | | "conditionMap[filterInputValue]": data ? data.qtName : '', |
| | | "conditionMap[selectBtmType]": null, // cs端æé®é¢ ææ¶ä¸å±ç¤ºå
容 |
| | | }; |
| | | getQTInfoDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | getLinkDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | console.log(res); |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | |
| | | }, |
| | | { |
| | | label: 'æ¥è¯¢æ¨¡æ¿', |
| | | prop: 'showTypes', |
| | | prop: 'queryTemplateName', |
| | | type: 'table', |
| | | display: false, |
| | | props: { |
| | |
| | | }, |
| | | { |
| | | label: 'æ§å¶è·¯å¾', |
| | | prop: 'kzlj', |
| | | prop: 'controlPath', |
| | | display: false, |
| | | type: 'textarea', |
| | | span: 24, |
| | | rows: 3 |
| | | }, |
| | | { |
| | | label: 'æ ¹èç¹æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'genjiedian', |
| | | label: 'æ ç»æå±å¼å', |
| | | prop: 'expandCols', |
| | | labelWidth: 110, |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 24 |
| | | }, |
| | | { |
| | | label: 'æ èç¹æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'shujiedian', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 24 |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: 'åç
§æ 设置', |
| | | prop: 'canzhaoshu', |
| | | prop: 'showLinkAbs', |
| | | display: false, |
| | | }, |
| | | { |
| | | label: 'åé符', |
| | | prop: 'fgf', |
| | | prop: 'separator', |
| | | display: false, |
| | | }, |
| | | { |
| | | label: 'å±å¼æ¹å¼', |
| | | prop: 'zkfs', |
| | | prop: 'expandMode', |
| | | display: false, |
| | | type: 'radio', |
| | | value:'1', |
| | | dicData: [ |
| | | { |
| | | label: 'é级å±å¼', |
| | |
| | | }, |
| | | { |
| | | label: 'å
¨é¨å±å¼', |
| | | value: '2' |
| | | value: '0' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'æ ¹èç¹æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'rootContent', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 12 |
| | | }, |
| | | { |
| | | label: 'æ èç¹æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'showAbs', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 12 |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | this.$refs.crud.rowAdd(); |
| | | }, |
| | | |
| | | // ä¿®æ¹ |
| | | editBtnClick(row) { |
| | | console.log(row); |
| | | this.eventData = []; |
| | | if (row.eventKey && row.eventValue) { |
| | | let keys = row.eventKey.split(','); |
| | | let values = row.eventValue.split(','); |
| | | |
| | | this.eventData = keys.map((key, index) => { |
| | | return { |
| | | index: this.eventData.length, |
| | | eventKey: key.trim(), |
| | | eventValue: values[index], |
| | | $cellEdit: true |
| | | }; |
| | | }); |
| | | } |
| | | this.$refs.crud.rowEdit(row); |
| | | }, |
| | | |
| | | // ä¿å |
| | | rowSaveHandler(row,done,loading){ |
| | | if(row.templateType === '6'){ |
| | | row.SubUIObjType = row.showType; |
| | | row.showType = ""; |
| | | } |
| | | console.log(this.sourceData); |
| | | const params = { |
| | | ...row, |
| | | tabPageOId:this.sourceData.plOId |
| | | } |
| | | addPageDefination(params).then(res => { |
| | | console.log(res); |
| | | if(res.data.code === 200){ |
| | | this.$message.success(res.data.obj); |
| | | done() |
| | | } |
| | | }).catch(err=> { |
| | | loading(); |
| | | }) |
| | | }, |
| | | |
| | | // å¯¹è¯æ¡è¡¨æ ¼è¡ç¹å» |
| | | formDataRowClick(row) { |
| | | this.formDataRow = row; |
| | |
| | | // 模æ¿ç±»åä¸ºè¡¨æ ¼ |
| | | templateTypeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'showTypea', 'showTypes']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为èªå®ä¹æ¨¡æ¿ |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['kzlj']); |
| | | this.updateDisplay(val, ['controlPath']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为æ 表 |
| | | templateTypeTreeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'showTypea', 'showTypes', 'zkl', 'zkfs']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName', 'expandCols', 'zkfs']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为表å |
| | | templateTypeForm(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'showTypea', 'showTypes']); |
| | | this.updateDisplay(val, ['showType', 'templateId', 'queryTemplateName']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为æ |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['showType', 'showTypes', 'genjiedian', 'shujiedian', 'canzhaoshu', 'fgf', 'zkfs', 'linkType']); |
| | | this.updateDisplay(val, ['showType', 'queryTemplateName', 'rootContent', 'showAbs', 'showLinkAbs', 'separator', 'expandMode', 'linkType']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为UIå®ä¹ |
| | |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['showType', 'UI', 'searchType', 'searchObjType', 'showTypes']); |
| | | this.updateDisplay(val, ['showType', 'SubUILayout', 'searchType', 'searchObjType', 'queryTemplateName']); |
| | | }, |
| | | |
| | | // æ¥æ¾æ°ç»ä¸å¯¹è±¡ç´¢å¼ |