Merge remote-tracking branch 'origin/master'
| | |
| | | </div> |
| | | </div> |
| | | <div class="avue-home__footer"> |
| | | <a href="https://bladex.vip" target="_blank"> |
| | | https://bladex.vip </a> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | .avue-crud__pagination{ |
| | | padding: 15px 0 10px; |
| | | } |
| | | .el-form .el-col{ |
| | | margin-bottom: 0; |
| | | } |
| | | .UITabs > .el-tabs__content{ |
| | | height:calc(100% - 56px); |
| | | } |
| | |
| | | margin-bottom: 15px; |
| | | } |
| | | .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{ |
| | | margin-bottom: 10px; |
| | | margin-bottom: 15px; |
| | | } |
| | | |
| | | .tree-buttons .el-button{ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // ä¸å¡ç±»åæ æ¥è¯¢ |
| | | export function getBizTree(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getBizTree", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | // å表æ¥è¯¢ |
| | | export function gridUIContextData(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/gridUIContextData", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | export const saveUIContextData = (row) => { |
| | | return request({ |
| | | url: '/api/uiManagerController/saveUIContextData', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const updateUIContextData = (row) => { |
| | | return request({ |
| | | url: '/api/uiManagerController/updateUIContextData', |
| | | method: 'put', |
| | | data: row |
| | | }) |
| | | } |
| | | // éè¿oidå é¤ |
| | | export function delUIContextData(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/delUIContextData", |
| | | method: "delete", |
| | | params |
| | | }) |
| | | } |
| | | //å
é |
| | | export const cloneUIContextData = (params) => { |
| | | return request({ |
| | | url: '/api/uiManagerController/cloneUIContextData', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | // 导åºéæ©å表 |
| | | //忰 expDatas:鿩oid |
| | | export function getExpContextTree(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getExpContextTree", |
| | | method: "get", |
| | | params: params |
| | | }); |
| | | } |
| | | // å¯¼åº |
| | | export function expUIContextData (params) { |
| | | return request({ |
| | | url: '/api/uiManagerController/expUIContextData', |
| | | method: 'post', |
| | | responseType: 'blob', |
| | | data:{ |
| | | params |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //ä¸ä¸æååºååè¡¨æ°æ® |
| | | export function getTabByContextIdAndType(params){ |
| | | return request({ |
| | | url: "/api/uiManagerController/getTabByContextIdAndType", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | export const addTabData = (row) => { |
| | | return request({ |
| | | url: '/api/uiManagerController/addTabData', |
| | | method: 'post', |
| | | data: row |
| | | }) |
| | | } |
| | | |
| | | export const updateTabData = (row) => { |
| | | return request({ |
| | | url: '/api/uiManagerController/updateTabData', |
| | | method: 'put', |
| | | data: row |
| | | }) |
| | | } |
| | | // éè¿oidå é¤ |
| | | export function deleteTabData(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/deleteTabData", |
| | | method: "delete", |
| | | params |
| | | }) |
| | | } |
| | | //䏿¹è¡¨æ ¼æ°æ® |
| | | export function getPLPageDefinations(params){ |
| | | return request({ |
| | | url: "/api/uiManagerController/getPLPageDefinations", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // ä¸å¡ç±»å䏿æ¥è¯¢ |
| | | export function getBtmDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getBtmDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // éæ©æ¨¡æ¿ä¸ææ¥è¯¢ |
| | | export function getPortalVIDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getPortalVIDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢æ¨¡æ¿ä¸ææ¥è¯¢ |
| | | export function getQTInfoDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getQTInfoDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // æé®è®¾è®¡å¯¹è¯æ¡å·¦ä¾§æ æ¥è¯¢ |
| | | export function getTabButtons(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getTabButtons", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // æé®è®¾è®¡å¯¹è¯æ¡æ·»å |
| | | export function addTapButton(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/addTapButton", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // æé®è®¾è®¡å¯¹è¯æ¡æ·»å |
| | | export function updateTapButton(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/updateTapButton", |
| | | method: "put", |
| | | data:params |
| | | }); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // ä¸å¡ç±»å䏿æ¥è¯¢ |
| | | export function getBtmDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getBtmDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // éæ©æ¨¡æ¿ä¸ææ¥è¯¢ |
| | | export function getPortalVIDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getPortalVIDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢æ¨¡æ¿ä¸ææ¥è¯¢ |
| | | export function getQTInfoDatasByPage(page, limit, params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getQTInfoDatasByPage", |
| | | method: "get", |
| | | params: { |
| | | page, |
| | | limit, |
| | | ...params |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // æé®è®¾è®¡å¯¹è¯æ¡å·¦ä¾§æ æ¥è¯¢ |
| | | export function getTabButtons(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/getTabButtons", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // æé®è®¾è®¡å¯¹è¯æ¡æ·»å |
| | | export function addTapButton(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/addTapButton", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // æé®è®¾è®¡å¯¹è¯æ¡æ·»å |
| | | export function updateTapButton(params) { |
| | | return request({ |
| | | url: "/api/uiManagerController/updateTapButton", |
| | | method: "put", |
| | | data:params |
| | | }); |
| | | } |
| | |
| | | }, |
| | | // 请æ±å°å æºå¸¦åæ° |
| | | fileData: { |
| | | type: Array, |
| | | default: () => [] |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | // 导å
¥æç¤ºæå tipList:["导å
¥æ¨¡æ¿ä¸æ æçº¢è²åä½ç为å¿
è¾é¡¹","é¨é¨åä¸ä¸çº§å
³ç³»å¿
é¡»æç
§åææ éå¼(/)"] |
| | | tipList:{ |
| | |
| | | return true; |
| | | }, |
| | | // æä»¶ä¸ä¼ æå |
| | | onSuccess(resbonse) { |
| | | if (resbonse.code === 200) { |
| | | onSuccess(response) { |
| | | if (response.code === 200) { |
| | | this.$message.success("导å
¥æåï¼"); |
| | | this.visible = false; |
| | | this.$emit('updata',resbonse); |
| | | this.$emit('updata',response); |
| | | } else { |
| | | this.$message.error(resbonse.msg); |
| | | this.$emit('upfaildata',response); |
| | | this.$message.error(response.msg); |
| | | } |
| | | }, |
| | | //æä»¶ä¸ä¼ 失败 |
| | |
| | | }, |
| | | //æä»¶ç¶ææ¹å |
| | | uploadChange(file) { |
| | | console.log( this.pageLoading); |
| | | if (file.status === "success" || file.status === "error") { |
| | | this.pageLoading.close(); |
| | | } |
| | |
| | | }, |
| | | { |
| | | path: '/UIContentViewer', |
| | | name: 'å¨æè¡¨æ ¼é¡µé¢', |
| | | name: 'UIä¸ä¸æå±ç¤º', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/dynamic-form' æ¶å è½½ Layout ç»ä»¶ |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/UIContentViewer' æ¶å è½½ Layout ç»ä»¶ |
| | | component: () => import('@/views/base/UIContentViewer'), |
| | | props: true |
| | | } |
| | |
| | | }, |
| | | { |
| | | path: '/referIndex', |
| | | name: 'å¨æè¡¨æ ¼é¡µé¢', |
| | | name: 'åç
§ç¤ºä¾', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/dynamic-form' æ¶å è½½ Layout ç»ä»¶ |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/referIndex' æ¶å è½½ Layout ç»ä»¶ |
| | | component: () => import('@/views/test/referDemo/index'), |
| | | props: true |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/UIDefineShow/:uiDefineOid', |
| | | name: 'UIå®ä¹è¯¦æ
', |
| | | component: Layout, |
| | | children: [ |
| | | { |
| | | path: '', // 空路å¾è¡¨ç¤ºè®¿é® '/referIndex' æ¶å è½½ Layout ç»ä»¶ |
| | | component: () => import('@/views/modelingMenu/ui/uiDefine/rightRegion/plShow'), |
| | | props: true |
| | | } |
| | | ], |
| | | meta:{ |
| | | keepAlive: true, |
| | | isTab: true, |
| | | isAuth: true |
| | | } |
| | | } |
| | | ] |
| | |
| | | headerAlign: 'center', |
| | | align: 'center', |
| | | emptyText: 'ææ å
容', |
| | | tip:false, |
| | | // selection æ¯å¦æéæ©æ¡ |
| | | // indexFixed:true/left/right, åºå®å |
| | | // menu:false, æ¯å¦ææä½æ |
| | |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="rowSaveHandlerClick">å建</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="allDelHandler">å é¤</el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary" @click="chekView">æ¥ç使ç¨èå´</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downloadTemplateHandler">ä¸è½½å¯¼å
¥æ¨¡æ¿</el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadHandler">导å
¥</el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="downLoadHandler">导åº</el-button> |
| | | </template> |
| | |
| | | <template slot="label"> |
| | | åç§° |
| | | </template> |
| | | {{ lastItem.id }} |
| | | <div style="width: 330px"> |
| | | {{ lastItem.id }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æ ç¾ |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.name }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æè¿° |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.description }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | <template slot="label"> |
| | | å
许为空 |
| | | </template> |
| | | <div style="width: 330px"> |
| | | <el-tag :type="lastItem.nullableFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.nullableFlag ? 'æ¯' : 'å¦' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="accuracy"> |
| | | <template slot="label"> |
| | |
| | | <template slot="label"> |
| | | é¿åº¦ |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.attrLength }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | é»è®¤å¼ |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.defaultValue }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | |
| | | <template slot="label"> |
| | | å½åç±»å |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version ? '龿¥ç±»å' : 'ä¸å¡ç±»å' }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | å½åç±»åå¼ |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version ? lastItem.linkTypeName : lastItem.btmTypeId }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item v-if="lastItem.version"> |
| | | <template slot="label"> |
| | | å½åçæ¬æ¬¡ |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.version }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | ä½¿ç¨æä¸¾ |
| | | </template> |
| | | <div style="width: 345px"> |
| | | <el-tag :type="lastItem.enumId ? 'success' : 'danger'"> |
| | | {{ lastItem.enumId ? 'æ¯' : 'å¦' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | å½åæä¸¾ç±»å |
| | | </template> |
| | | <div style="width: 345px"> |
| | | {{ lastItem.enumId }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | |
| | | <template slot="label"> |
| | | ä½¿ç¨æä¸¾ |
| | | </template> |
| | | <div style="width: 330px"> |
| | | <el-tag :type="lastItem.enumFlag ? 'success' : 'danger'"> |
| | | {{ lastItem.enumFlag ? 'æ¯' : 'å¦' }} |
| | | </el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | æä¸¾ç±»å |
| | | </template> |
| | | <div style="width: 330px"> |
| | | {{ lastItem.enumFlag }} |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item> |
| | | <template slot="label"> |
| | | åå¼èå´ |
| | | </template> |
| | | <div style="width: 330px; height: 80px;overflow: auto"> |
| | | <div style="width: 345px; height: 80px;overflow: auto"> |
| | | <el-tag v-for="item in rangeList" plain style="margin: 5px">{{ item }}</el-tag> |
| | | </div> |
| | | </el-descriptions-item> |
| | |
| | | <el-row> |
| | | <div class="addDialog"> |
| | | <div> |
| | | |
| | | <h3>屿§é¡¹</h3> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç§°ï¼" prop="id"> |
| | | <el-input v-model="form.id"></el-input> |
| | |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth:160, |
| | | column |
| | | }, |
| | | tableLoading: false, |
| | |
| | | label: 'ç±»å', |
| | | prop: 'attributeDataTypeText', |
| | | sortable: true, |
| | | width:100 |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | sortable: true, |
| | | width: 120 |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | |
| | | <el-container v-loading="createViewLoading"> |
| | | <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="deleteClickHandler">å é¤ |
| | | </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="miniBtn" icon="el-icon-circle-plus-outline" plain size="small" |
| | | type="primary" @click="createViewClickHandler">å建è§å¾ |
| | | </el-button> |
| | | <el-button class="miniBtn" icon="el-icon-circle-plus-outline" plain size="small" |
| | | type="primary" @click="indexClickHandler">åå»ºç´¢å¼ |
| | | </el-button> |
| | | <el-button icon="el-icon-menu" plain size="small" style="width: 82px;text-align: center;padding-left: 1px" |
| | | type="primary" @click="checkClickHandler">ä¸è´æ§æ£æ¥ |
| | | </el-button> |
| | | <el-button class="miniBtn" icon="el-icon-delete" plain size="small" |
| | | type="danger" @click="checkClickHandler">å 餿°æ® |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" |
| | | type="danger" @click="checkClickHandler">å é¤å
¨é¨ç±»å |
| | | </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 - 330px);"> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <avue-tree ref="tree" v-loading="treeLoading" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <div style="display: flex;justify-content: center; height: 230px"> |
| | | <div> |
| | | <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="deleteClickHandler">å é¤</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-circle-plus-outline" plain size="small" type="primary" @click="createViewClickHandler">å建è§å¾</el-button> |
| | | <el-button icon="el-icon-circle-plus-outline" plain size="small" type="primary" @click="indexClickHandler">å建索å¼</el-button> |
| | | <el-button icon="el-icon-menu" plain size="small" type="primary" @click="checkClickHandler">ä¸è´æ§æ£æ¥</el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="checkClickHandler">å 餿°æ®</el-button> |
| | | <el-button plain size="small" type="danger" @click="checkClickHandler">å é¤å
¨é¨ç±»å</el-button> |
| | | <el-button plain size="small" type="primary" @click="checkViewClickHandler">æ¥ç使ç¨èå´</el-button> |
| | | </div> |
| | | <div style="display: flex;justify-content: center; height: 230px;margin-top: 10px;"> |
| | | <div class="descBox" style="max-height: 100px"> |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="屿§ä¿¡æ¯"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | |
| | | |
| | | .headerCon > .el-button:nth-child(10) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .miniBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 7px; |
| | | } |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | .descBox { |
| | |
| | | <el-container v-loading="createViewLoading"> |
| | | <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="deleteClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary">æ¥ç |
| | | </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" icon="el-icon-circle-plus-outline" plain size="small" |
| | | style="padding-left: 7px !important;" |
| | | type="primary" @click="createViewClickHandler">å建è§å¾ |
| | | </el-button> |
| | | <el-button class="smallBtn" icon="el-icon-menu" plain size="small" style="padding-left: 1px" |
| | | type="primary" @click="checkClickHandler">ä¸è´æ§æ£æ¥ |
| | | </el-button> |
| | | </div> |
| | | <div ref="TreeBox" style="height: calc(100vh - 154px);!important;"> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 300px);"> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <div style="height: 380px"> |
| | | <div> |
| | | <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="deleteClickHandler">å é¤</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-circle-plus-outline" plain size="small" type="primary" @click="createViewClickHandler">å建è§å¾</el-button> |
| | | <el-button icon="el-icon-menu" plain size="small" type="primary" @click="checkClickHandler">ä¸è´æ§æ£æ¥</el-button> |
| | | </div> |
| | | <div style="height: 380px;margin-top: 10px"> |
| | | <el-descriptions :column="2" border class="margin-top" size="medium"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | |
| | | <el-button icon="el-icon-delete" plain size="small" type="text" @click="delRowClickHandler(row)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | |
| | | |
| | | </avue-crud> |
| | | |
| | | <!-- æ°å¢ ä¿®æ¹ --> |
| | |
| | | <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 style="height: calc(100vh - 260px);"> |
| | | <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> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="屿§ä¿¡æ¯"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.id"></i> |
| | | åç§° |
| | | </template> |
| | | <el-tag v-if="nodeRow.id">{{ nodeRow.id }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | æ ç¾ |
| | | </template> |
| | | <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.jump"></i> |
| | | è·³è·å符 |
| | | </template> |
| | | <el-tag v-if="nodeRow.jumpCharacter">{{ nodeRow.jumpCharacter }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.init"></i> |
| | | åå§å¼ |
| | | </template> |
| | | <el-tag v-if="nodeRow.initialValue">{{ nodeRow.initialValue }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.length"></i> |
| | | æ¥é¿ |
| | | </template> |
| | | <el-tag v-if="nodeRow.stepLength">{{ nodeRow.stepLength }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.left"></i> |
| | | åç¼ |
| | | </template> |
| | | <el-tag v-if="nodeRow.prefixion">{{ nodeRow.prefixion }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.right"></i> |
| | | åç¼ |
| | | </template> |
| | | <el-tag v-if="nodeRow.suffix">{{ nodeRow.suffix }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="crud" |
| | | :data="data" |
| | | :option="option" |
| | | :table-loading="loading" |
| | | @refresh-change="getTableList" |
| | | @selection-change="selectChange" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建</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-view" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </template> |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button icon="el-icon-edit" size="small" type="text" @click="editClickHandler(scope.row)">ç¼è¾ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" size="small" type="text" @click="delClickHandler(scope.row)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- æ°å¢ ä¿®æ¹ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | |
| | | |
| | | <!-- 导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="getTreeList"></upload-file> |
| | | @updata="getTableList"></upload-file> |
| | | |
| | | <!-- æ¥ç使ç¨èå´ --> |
| | | <el-dialog |
| | |
| | | > |
| | | </avue-crud> |
| | | </el-dialog> |
| | | </el-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | data: [], |
| | | option: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | calcHeight: -30, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'id', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æ ç¾', |
| | | prop: 'name', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'è·³è·å符', |
| | | prop: 'jumpCharacter', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'åå§å¼', |
| | | prop: 'initialValue', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æ¥é¿', |
| | | prop: 'stepLength', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'åç¼', |
| | | prop: 'prefixion', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'åç¼', |
| | | prop: 'suffix', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | sortable: true, |
| | | }, |
| | | ] |
| | | }, |
| | | checkViewVisible: false, |
| | | checkViewData: [], |
| | | checkViewDataSearch: [], |
| | |
| | | right: 'el-icon-caret-right', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | selectList: [], |
| | | lastIndex: null, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | this.getTableList(); |
| | | }, |
| | | methods: { |
| | | // å·¦ä¾§æ æ¥è¯¢ |
| | | getTreeList() { |
| | | getTableList() { |
| | | this.loading = true; |
| | | getVersionRuleAllList().then(res => { |
| | | const data = res.data.data; |
| | | this.treeData = data; |
| | | this.data = data; |
| | | this.loading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | }); |
| | | }, |
| | | |
| | | // 左侧æ è¡ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | }, |
| | | |
| | | // å建æé® |
| | |
| | | }, |
| | | |
| | | // ä¿®æ¹æé® |
| | | editClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | editClickHandler(row) { |
| | | this.form = {...row}; |
| | | this.visible = true; |
| | | this.dialogTitle = 'edit'; |
| | | this.form = this.nodeRow; |
| | | }, |
| | | |
| | | // æ°å¢ä¿®æ¹å¯¹è¯æ¡å
³é |
| | |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.getTableList(); |
| | | this.visible = false; |
| | | } else { |
| | | this.$message.error(res.data.obj); |
| | |
| | | }, |
| | | |
| | | // å é¤æé® |
| | | delClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | delClickHandler(row) { |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const list = [this.nodeRow]; |
| | | const list = [row]; |
| | | deleteVersionRule(list).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.nodeRow = {}; |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | |
| | | |
| | | // å¯¼åº |
| | | exportClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | |
| | | exportVersionRule({vrNames: this.nodeRow.id}).then(res => { |
| | | if (this.selectList.length > 1) { |
| | | this.$message.error('åªè½éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | |
| | | exportVersionRule({vrNames: this.selectList[0].id}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | }).catch(err => { |
| | |
| | | |
| | | // æ¥ç使ç¨èå´ |
| | | checkViewClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | getUsedVersionRuleList({vrName: this.nodeRow.id}).then(res => { |
| | | |
| | | if (this.selectList.length > 1) { |
| | | this.$message.error('åªè½éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | getUsedVersionRuleList({vrName: this.selectList[0].id}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.checkViewVisible = true; |
| | | const data = res.data.data; |
| | |
| | | checkHandleReset() { |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | }, |
| | | |
| | | // éæ©æ¡ |
| | | selectChange(row) { |
| | | this.selectList = row; |
| | | }, |
| | | |
| | | // ç¹å»è¡ |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | //è·åæ¥è¯¢æ¨¡æ¿å®ä¹ä¸æ |
| | | getTemp(btmName,linkFlag) { |
| | | if (btmName) { |
| | | queryTemplateListByAttr({btmName: btmName, linkFlag: linkFlag,direction:this.form.direction}).then(res => { |
| | | queryTemplateListByAttr({btmName: btmName, linkFlag: linkFlag,direction:linkFlag?null:this.form.direction}).then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.label = item.name + '-' + (item.linkTypeName || item.btmName); |
| | | item.value = item.name; |
| | |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | selectHandler(selection, row){debugger; |
| | | selectHandler(selection, row){ |
| | | this.dialogSelectionRow=selection |
| | | }, |
| | | changeTemp(data) { |
| | |
| | | }); |
| | | this.treeData = data; |
| | | this.treeLoading = false; |
| | | }).catch(error => { |
| | | loading.close(); |
| | | }); |
| | | }, |
| | | |
| | |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | console.log(this.selectList); |
| | | const params = { |
| | | ids: this.selectList.map(item => item.id).join(',') |
| | | } |
| | | deleteByIds(params).then(res => { |
| | | console.log(res); |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getRightPortalVIDatas(); |
| | |
| | | }) |
| | | |
| | | }, |
| | | |
| | | rowDeleteHandler(row){ |
| | | deleteByIds({ids:row.id}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getRightPortalVIDatas(); |
| | | } |
| | | }) |
| | | }, |
| | | // å¤é |
| | | selectChangeHandler(row) { |
| | | this.selectList = row; |
| | |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 190px);"> |
| | | <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-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | |
| | | <avue-crud |
| | | ref="crud" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="tableLoading" |
| | | @size-change="sizeChange" |
| | | @current-change="currentChange" |
| | | @selection-change="selectChangeHandler" |
| | | @search-change="handleSearch" |
| | | @search-reset="handleReset" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">å建</el-button> |
| | | <!--<el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">ä¿®æ¹</el-button> |
| | | <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> |
| | | </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-document-copy" size="small" type="text" @click="rowCloneHandler(scope.row)">å
é</el-button> |
| | | </template> |
| | | <template slot="plName" slot-scope="{row}"> |
| | | <el-link type="primary" @click="linkClickHandler(row)">{{ row.plName }}</el-link> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- å建ç¼è¾èªå®ä¹å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-loading="dialogLoading" |
| | | :title="dialogType === 'add' ? ' å建 ä¸ä¸æ' : 'ç¼è¾ ä¸ä¸æ'" |
| | | :visible.sync="dialogVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | :close-on-click-modal="false" |
| | | width="500px" |
| | | @close="dialogClose" |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="95px" size="small"> |
| | | <el-form-item label="åç§°ï¼" prop="plName"> |
| | | <el-input v-model="form.plName"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="UIä¸ä¸æï¼" prop="plCode"> |
| | | <el-input v-model="form.plCode"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¾ç¤ºï¼" prop="plIsShow"> |
| | | <el-checkbox-group v-model="form.plIsShow"> |
| | | <el-checkbox label="导èªåº"></el-checkbox> |
| | | <el-checkbox label="æ§å¶åº"></el-checkbox> |
| | | <el-checkbox label="æä½åº"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°ï¼" prop="plDesc"> |
| | | <el-input type="textarea" :rows="5" v-model="form.plDesc"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å
é --> |
| | | <el-dialog |
| | | key="cloneDialog" |
| | | v-dialogDrag |
| | | title="å
é" |
| | | :visible.sync="cloneDialogVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="500px" |
| | | @close="cloneDialogClose" |
| | | > |
| | | <avue-form ref="cloneForm" :option="cloneOption" v-model="cloneForm"></avue-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="cloneDialogClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="cloneSaveHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- å¯¼åº --> |
| | | <el-dialog |
| | | key="cloneDialog" |
| | | v-dialogDrag |
| | | title="导åº" |
| | | :visible.sync="expDialogVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="500px" |
| | | @close="expDialogVisible=false" |
| | | > |
| | | <div style="height: 70%;min-height: 300px"> |
| | | <avue-tree ref="expTree" :data="expTreeData" :option="expOption"></avue-tree> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="expDialogVisible=false">å æ¶</el-button> |
| | | <el-button type="primary" @click="exportData">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </basic-container> |
| | | <!-- 导å
¥ --> |
| | | <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" |
| | | :fullscreen="true" |
| | | :append-to-body="true" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="dialog.showDialog=false"> |
| | | <pl-show :uiDefineData="dialog.uiDefineData"></pl-show> |
| | | </el-dialog> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getBizTypes} from "@/api/modeling/businessType/api"; |
| | | import {getBizTree,gridUIContextData,saveUIContextData,updateUIContextData,delUIContextData, cloneUIContextData ,getExpContextTree,expUIContextData} from "@/api/UI/uiDefine"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import func from "@/util/func"; |
| | | import plShow from "@/views/modelingMenu/ui/uiDefine/rightRegion/plShow"; |
| | | export default { |
| | | name: "index", |
| | | components:{plShow}, |
| | | data() { |
| | | return { |
| | | dialog: { |
| | | showDialog: false, |
| | | title: "ä¸ä¸æè¯¦æ
", |
| | | loading: false, |
| | | uiDefineData:null |
| | | }, |
| | | tipList: [], |
| | | upFileType: ['xls'], |
| | | fileUrl: 'api/uiManagerController/impUIContextData', |
| | | fileData:{}, |
| | | lastIndex: null, |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandedKeys: ['topNode'], |
| | | defaultExpandAll: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'label', |
| | | label: 'text', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | nodeRow: {}, |
| | | treeData: [{ |
| | | label: 'ä¸å¡ç±»åæ ', |
| | | oid: 'topNode', |
| | | children: [] |
| | | }], |
| | | treeData: [], |
| | | searchParams: { |
| | | 'conditionMap[txtName]': '', |
| | | 'conditionMap[txtCode]': '', |
| | | }, |
| | | tableLoading: false, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 50, |
| | | total: 0, |
| | | pageSizes: [10, 30, 50, 100], |
| | | }, |
| | | selectList: [], |
| | | option: { |
| | | ...basicOption, |
| | | calcHeight: -40, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | tip: false, |
| | | searchMenuSpan: 6, |
| | | align:'left', |
| | | column: [{ |
| | | label: 'åç§°', |
| | | prop: 'plName', |
| | | search: true |
| | | }, { |
| | | label: 'UIä¸ä¸æ', |
| | | prop: 'plCode', |
| | | search: true, |
| | | sortable: true, |
| | | }, { |
| | | label: '导èªåº', |
| | | prop: 'plIsShowNavigator', |
| | | width: 130, |
| | | align:'center', |
| | | formatter: function (row, value) { |
| | | if (row.plIsShowNavigator == 0) { |
| | | return '䏿¾ç¤º' |
| | | } else { |
| | | return 'æ¾ç¤º' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'æ§å¶åº', |
| | | prop: 'plIsShowForm', |
| | | width: 130, |
| | | align:'center', |
| | | formatter: function (row, value) { |
| | | if (row.plIsShowForm == 0) { |
| | | return '䏿¾ç¤º' |
| | | } else { |
| | | return 'æ¾ç¤º' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'æä½åº', |
| | | prop: 'plIsShowTab', |
| | | width: 130, |
| | | align:'center', |
| | | formatter: function (row, value) { |
| | | if (row.plIsShowTab == 0) { |
| | | return '䏿¾ç¤º' |
| | | } else { |
| | | return 'æ¾ç¤º' |
| | | } |
| | | } |
| | | }] |
| | | }, |
| | | data: [], |
| | | dialogLoading: false, |
| | | dialogVisible: false, |
| | | dialogType: '', |
| | | form: { |
| | | plName: '', |
| | | plCode: '', |
| | | plIsShow: [], |
| | | }, |
| | | rules: { |
| | | plName: [{ |
| | | required: true, |
| | | message: '请è¾å
¥åç§°', |
| | | trigger: 'blur' |
| | | }], |
| | | plCode: [{ |
| | | required: true, |
| | | message: '请è¾å
¥UIä¸ä¸æ', |
| | | trigger: 'blur' |
| | | }], |
| | | plIsShow: [{ |
| | | required: true, |
| | | message: 'è¯·éæ©æ¾ç¤ºåºå', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | cloneDialogVisible:false, |
| | | cloneOption: { |
| | | submitBtn:false, |
| | | emptyBtn:false, |
| | | column: [{ |
| | | label: 'å
éç®æ ', |
| | | prop: 'cloneTargetName', |
| | | span:24, |
| | | type: 'tree', |
| | | clearable: true, |
| | | dicData: [], |
| | | defaultExpandAll:true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©å
éç®æ ', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, { |
| | | label: 'UIåç§°', |
| | | prop: 'cloneName', |
| | | span:24, |
| | | type: 'input', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥UIåç§°', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, { |
| | | label: 'UIä¸ä¸æ', |
| | | prop: 'cloneContextCode', |
| | | span:24, |
| | | type: 'input', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥UIä¸ä¸æ', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }] |
| | | }, |
| | | cloneForm:{ |
| | | //å
éçæºå¯¹è±¡çä¿¡æ¯ |
| | | sourcePLUILayout:null, |
| | | cloneTargetName:'n', |
| | | cloneName:'', |
| | | cloneContextCode:'' |
| | | }, |
| | | expDialogVisible:false, |
| | | expTreeData:[], |
| | | expOption:{ |
| | | height: 'auto', |
| | | filter:false, |
| | | multiple:true, |
| | | defaultExpandAll: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'text', |
| | | value: 'oid', |
| | | children: 'children' |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | //æ 表æ¥è¯¢ |
| | | getTreeList() { |
| | | const loading = this.$loading({}); |
| | | getBizTypes().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | item.attributes.label = item.attributes.id; |
| | | return item.attributes; |
| | | getBizTree().then(res => { |
| | | this.treeData=[res.data.obj]; |
| | | const dicData = res.data.obj.children.map(item => { |
| | | item.label=item.attributes.name; |
| | | item.value=item.attributes.name; |
| | | return item; |
| | | }); |
| | | this.treeData[0].children = data; |
| | | this.cloneOption.column[0].dicData=[{ |
| | | label:'ä¸å¡ç±»åæ ', |
| | | value:'ä¸å¡ç±»åæ ', |
| | | disabled: true, |
| | | children:dicData |
| | | }]; |
| | | loading.close(); |
| | | }).catch(error => { |
| | | loading.close(); |
| | |
| | | }, |
| | | // æ ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | if (row.oid) { |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTableList(); |
| | | } |
| | | }, |
| | | getTableList(){ |
| | | const params = Object.assign(this.searchParams,{ |
| | | 'conditionMap[btmName]': this.nodeRow.attributes.name, |
| | | }) |
| | | gridUIContextData(this.page.currentPage, this.page.pageSize, params).then(res => { |
| | | this.data = res.data.data; |
| | | this.page.total = res.data.total; |
| | | this.$refs.crud.clearSelection(); |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | linkClickHandler(row){ |
| | | this.dialog.title='ã'+row.plName+' - '+row.plCode+'ã详æ
' |
| | | this.dialog.uiDefineData=row; |
| | | this.dialog.showDialog=true; |
| | | return false; |
| | | this.$router.push({ |
| | | path: '/UIDefineShow/:'+row.plOId, |
| | | name: row.plName+'详æ
' |
| | | }); |
| | | }, |
| | | sizeChange(val) { |
| | | this.page.pageSize = val; |
| | | }, |
| | | // 页ç |
| | | currentChange(val) { |
| | | this.page.currentPage = val; |
| | | }, |
| | | // å¤é |
| | | selectChangeHandler(row) { |
| | | this.selectList = row; |
| | | }, |
| | | // æç´¢ |
| | | handleSearch(params, done) { |
| | | this.searchParams = { |
| | | 'conditionMap[txtName]': params.plName, |
| | | 'conditionMap[txtCode]': params.plCode, |
| | | }; |
| | | this.getTableList() |
| | | done(); |
| | | }, |
| | | |
| | | // éç½®æç´¢æ¡ä»¶ |
| | | handleReset() { |
| | | this.searchParams = {}; |
| | | this.getTableList(); |
| | | }, |
| | | // è¡ç¹å» |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | //å建 |
| | | addHandler(){ |
| | | if(this.nodeRow && this.nodeRow.oid){ |
| | | this.form.plIsShow=[]; |
| | | this.form.plRelatedType=this.nodeRow.attributes.name; |
| | | this.dialogType = 'add'; |
| | | this.dialogVisible = true; |
| | | }else { |
| | | this.$message.error('è¯·éæ©ä¸å¡ç±»å'); |
| | | } |
| | | |
| | | }, |
| | | editHandler(){ |
| | | if(this.selectList.length!=0){ |
| | | this.rowEditBtnClick(this.selectList[0]); |
| | | }else { |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ°æ®è¿è¡ç¼è¾'); |
| | | } |
| | | }, |
| | | delHandler(){ |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | const params = { |
| | | oids: this.selectList.map(item => item.plOId).join(',') |
| | | } |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delUIContextData(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // å
³éå¯¹è¯æ¡ |
| | | dialogClose() { |
| | | this.dialogVisible = false; |
| | | this.$refs.form.clearValidate(); |
| | | this.form = { |
| | | plName: '', |
| | | plCode: '', |
| | | plDesc:'', |
| | | plIsShow: [], |
| | | } |
| | | }, |
| | | // ä¿åUIä¸ä¸æ |
| | | saveHandler() { |
| | | this.$refs.form.validate((valid,done) => { |
| | | if (valid) { |
| | | let params = { |
| | | ...this.form |
| | | } |
| | | if(this.form.plIsShow.includes('导èªåº')){ |
| | | params.plIsShowNavigator=1 |
| | | }else { |
| | | params.plIsShowNavigator=0 |
| | | } |
| | | if(this.form.plIsShow.includes('æ§å¶åº')){ |
| | | params.plIsShowForm=1; |
| | | }else { |
| | | params.plIsShowForm=0; |
| | | } |
| | | if(this.form.plIsShow.includes('æä½åº')){ |
| | | params.plIsShowTab=1; |
| | | }else { |
| | | params.plIsShowTab=0; |
| | | } |
| | | delete params.plIsShow; |
| | | if (this.dialogType === 'add') { |
| | | saveUIContextData(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('æ·»å æå'); |
| | | this.dialogClose(); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | } else if (this.dialogType === 'edit') { |
| | | updateUIContextData(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('ä¿®æ¹æå'); |
| | | this.dialogClose() |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | // å¯¼åº |
| | | exportClickHandler() { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('è¯·éæ©æ°æ®'); |
| | | return; |
| | | } |
| | | const params = { |
| | | expDatas: this.selectList.map(item => item.plOId).join(',') |
| | | } |
| | | getExpContextTree(params).then(res => { |
| | | this.expTreeData=[res.data.obj]; |
| | | }) |
| | | this.expDialogVisible=true; |
| | | }, |
| | | exportData(){ |
| | | const params = {} |
| | | const checkedDatas=this.$refs.expTree.getCheckedNodes(); |
| | | if (checkedDatas.length <= 0) { |
| | | this.$message.error('è¯·éæ©æ°æ®'); |
| | | return; |
| | | } |
| | | this.selectList.forEach(item=>{ |
| | | params[item.plOId]=checkedDatas.filter(checkitem => checkitem.parentId==item.plOId).map(checkitem => checkitem.oid).join(',') |
| | | }) |
| | | expUIContextData(params).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | this.expDialogVisible=false; |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }); |
| | | }, |
| | | |
| | | // 导å
¥ |
| | | upLoadClickHandler() { |
| | | this.fileData={ |
| | | isCovered:false, |
| | | selectBtm:this.nodeRow.attributes.name |
| | | } |
| | | this.$refs.upload.visible = true; |
| | | }, |
| | | //导å
¥å¤±è´¥ |
| | | upFail(response){ |
| | | |
| | | }, |
| | | // ç¼è¾æé® |
| | | rowEditBtnClick(row) { |
| | | this.form={ |
| | | ...row, |
| | | plIsShow: [], |
| | | }; |
| | | if(row.plIsShowNavigator){ |
| | | this.form.plIsShow.push('导èªåº') |
| | | } |
| | | if(row.plIsShowForm){ |
| | | this.form.plIsShow.push('æ§å¶åº') |
| | | } |
| | | if(row.plIsShowTab){ |
| | | this.form.plIsShow.push('æä½åº') |
| | | } |
| | | this.dialogType = 'edit'; |
| | | this.dialogVisible = true; |
| | | }, |
| | | // å é¤æé® |
| | | rowDeleteHandler(row) { |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delUIContextData({oids: row.plOId}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | //å
é |
| | | rowCloneHandler(row){ |
| | | this.cloneForm={ |
| | | sourcePLUILayout:row, |
| | | cloneTargetName:'', |
| | | cloneName:row.plName+'_copy(0)', |
| | | cloneContextCode:row.plCode+'_copy(0)', |
| | | } |
| | | this.cloneDialogVisible=true; |
| | | }, |
| | | cloneSaveHandler(){ |
| | | this.$refs.cloneForm.validate((valid,done) => { |
| | | if (valid) { |
| | | cloneUIContextData(this.cloneForm).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å
éæå'); |
| | | this.cloneDialogClose(); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | cloneDialogClose(){ |
| | | this.cloneDialogVisible=false; |
| | | this.cloneForm= { |
| | | //å
éçæºå¯¹è±¡çä¿¡æ¯ |
| | | sourcePLUILayout: null, |
| | | cloneTargetName: '', |
| | | cloneName: '', |
| | | cloneContextCode: '' |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="btnActionVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="鿩Action" |
| | | width="70%" |
| | | @close="dialogClose"> |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <!-- 左侧æ --> |
| | | <div> |
| | | <avue-tree |
| | | ref="tree" |
| | | v-model="treeForm" |
| | | :data="treeData" |
| | | :option="treeOption" |
| | | node-key="value" |
| | | @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> |
| | | </avue-tree> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <div> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="form" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | :table-loading="tableLoading" |
| | | @search-change="handleSearch" |
| | | @search-reset="handleReset" |
| | | @refresh-change="handleRefresh" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="plTypeType" slot-scope="{row}"> |
| | | <el-tag :type="row.plTypeType === 'business' ? '' : 'success'"> |
| | | {{ row.plTypeType === 'business' ? 'ä¸å¡ç±»å' : '龿¥ç±»å' }} |
| | | </el-tag> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | </div> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | |
| | | </el-container> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="btnActionVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="actionSaveHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getActionTree, |
| | | getActionTableData, |
| | | } from '@/api/UI/Action/api' |
| | | import func from "@/util/func"; |
| | | import basicOption from "@/util/basic-option"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | btnActionVisible: false, |
| | | currenRow: {}, // actionå½åè¡ä¿¡æ¯ |
| | | topMethodsObj: { |
| | | select: true, |
| | | all: true, |
| | | page: false |
| | | }, |
| | | transferTitle: ['æªéæ©', '已鿩'], |
| | | leftRoleData: [], |
| | | rightRoleData: [], |
| | | form: {}, |
| | | bottomTableLoading: false, |
| | | bottomData: [], |
| | | bottomOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | calcHeight: -30, |
| | | selection: false, |
| | | refreshBtn: false, |
| | | // height:'auto', |
| | | column: [ |
| | | { |
| | | label: 'åæ°åç§°', |
| | | prop: 'name', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥åæ°åç§°', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | }, |
| | | { |
| | | label: 'æç¤ºä¿¡æ¯', |
| | | prop: 'description', |
| | | span: 24, |
| | | type: 'textarea', |
| | | rows: 4 |
| | | }, |
| | | ], |
| | | }, |
| | | tableLoading: false, |
| | | lastIndex: null, |
| | | selectList: [], |
| | | data: [], |
| | | option: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | height: 500, |
| | | highlightCurrentRow: true, |
| | | menu:false, |
| | | column: [ |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'plCode', |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥ç¼å·', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'plName', |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥åç§°', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: '类路å¾', |
| | | prop: 'plCSClass', |
| | | search: true, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: 'åç±»', |
| | | prop: 'plActionCls', |
| | | type: 'tree', |
| | | hide: true, |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childs' |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©åç±»', |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | dicData: [] |
| | | }, |
| | | { |
| | | label: '龿¥å°å', |
| | | prop: 'plBSUrl', |
| | | search: true, |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'plTypeType', |
| | | search: true, |
| | | type: 'select', |
| | | dicData: [{ |
| | | label: 'ä¸å¡ç±»å', |
| | | value: 'business' |
| | | }, { |
| | | label: '龿¥ç±»å', |
| | | value: 'link' |
| | | }], |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: 'è¯·éæ©ç±»å', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'plDesc', |
| | | search: true, |
| | | overHidden: true, |
| | | }, |
| | | ] |
| | | }, |
| | | treeNodeRow: {}, |
| | | treeForm: {}, |
| | | treeOption: { |
| | | addBtn: false, |
| | | defaultExpandedKeys: ['root'], |
| | | props: { |
| | | label: 'name', |
| | | value: 'id', |
| | | children: 'childs' |
| | | }, |
| | | formOption: { |
| | | column: [ |
| | | { |
| | | label: 'åç±»åç§°', |
| | | prop: 'name', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥åç±»åç§°', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'åç±»åºå·', |
| | | prop: 'serialno', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥åç±»åºå·', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'å建è
', |
| | | prop: 'creator', |
| | | readonly: true, |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | readonly: true, |
| | | }, |
| | | { |
| | | label: 'ç¶ä¸»ç±»', |
| | | prop: 'pidName', |
| | | readonly: true, |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'description' |
| | | }, |
| | | ], |
| | | } |
| | | }, |
| | | treeData: [], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | methods: { |
| | | // 左侧æ è¯·æ± |
| | | getTreeList(status) { |
| | | const params = { |
| | | isExp: status ? true : false |
| | | } |
| | | getActionTree(params).then(res => { |
| | | const data = res.data.obj; |
| | | this.treeData = [data]; |
| | | const selectTreeData = this.option.column.find(item => item.prop === 'plActionCls'); // æ¾å°actionæ·»å åç±»æ |
| | | selectTreeData.dicData = [data]; |
| | | }) |
| | | }, |
| | | |
| | | // 左侧æ è¡ç¹å» |
| | | nodeClick(row) { |
| | | this.treeNodeRow = row; |
| | | this.getRightTableList(row); |
| | | this.bottomData = []; |
| | | }, |
| | | |
| | | // 头é¨å·æ°æé® |
| | | handleRefresh() { |
| | | if (func.isEmptyObject(this.treeNodeRow)) { |
| | | return; |
| | | } |
| | | this.getRightTableList(this.treeNodeRow); |
| | | }, |
| | | |
| | | // å³ä¾§è¡¨æ ¼ä¿¡æ¯ |
| | | getRightTableList(row) { |
| | | this.tableLoading = true; |
| | | const params = { |
| | | plactioncls: row.id |
| | | } |
| | | getActionTableData(params).then(res => { |
| | | const data = res.data.data; |
| | | this.data = data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | |
| | | // è¡¨æ ¼å¤é |
| | | selectChangeHandler(row) { |
| | | this.selectList = row; |
| | | }, |
| | | |
| | | // è¡ç¹å» |
| | | rowClickHandler(row) { |
| | | this.currenRow = row; |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // æç´¢ |
| | | handleSearch(params, done) { |
| | | if (func.isEmptyObject(this.treeNodeRow)) { |
| | | this.$message.error('请å
å¨å·¦ä¾§éæ©èç¹åæä½'); |
| | | return done(); |
| | | } |
| | | this.tableLoading = true; |
| | | const apiParams = { |
| | | plactioncls: this.treeNodeRow.id === 'root' ? '' : this.treeNodeRow.id, |
| | | ...params |
| | | } |
| | | |
| | | getActionTableData(apiParams).then(res => { |
| | | const data = res.data.data; |
| | | this.data = data; |
| | | this.tableLoading = false; |
| | | }) |
| | | done(); |
| | | }, |
| | | |
| | | // éç½®æç´¢æ¡ä»¶ |
| | | handleReset() { |
| | | if (func.isEmptyObject(this.treeNodeRow)) { |
| | | this.$message.error('请å
å¨å·¦ä¾§éæ©èç¹åæä½'); |
| | | return; |
| | | } |
| | | this.getRightTableList(this.treeNodeRow); |
| | | }, |
| | | |
| | | // ä¿åaction |
| | | actionSaveHandler() { |
| | | if (this.selectList.length != 1) { |
| | | this.$message.error('åªè½éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.$emit('updataAction', this.selectList[0]); |
| | | this.dialogClose(); |
| | | }, |
| | | |
| | | dialogClose(){ |
| | | this.btnActionVisible = false; |
| | | this.data = []; |
| | | this.$refs.tree.setCurrentKey(null); |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | .headerCon { |
| | | .el-button { |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="form" |
| | | :data="data" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @row-del="rowDelHandler" |
| | | @row-save="rowSaveHandler" |
| | | @row-update="rowUpdateHandler" |
| | | @refresh-change="handleRefresh" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" |
| | | @click="addClickHandler">å¢å |
| | | </el-button> |
| | | <el-button icon="el-icon-edit-outline" plain size="small" type="primary" |
| | | @click="btnDesignClickHandler">æé®è®¾è®¡ |
| | | </el-button> |
| | | </template> |
| | | |
| | | <!-- eventKey以åeventValueæ¾ç¤ºåºå --> |
| | | <template slot="bottomValueForm" slot-scope="scope"> |
| | | <avue-crud |
| | | :data="eventData" |
| | | :option="eventOption" |
| | | @row-click="formDataRowClick"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button plain size="mini" type="primary" @click="formDataAddClickHandler">å建</el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button plain size="mini" type="danger" @click="formDataDelClickHandler(scope.row)">å é¤</el-button> |
| | | <el-button plain size="mini" type="primary" @click="moveUp(scope.row)">ä¸ç§»</el-button> |
| | | <el-button plain size="mini" type="primary" @click="moveDown(scope.row)">ä¸ç§»</el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </template> |
| | | |
| | | |
| | | <!-- 忢æç´¢ç±»å æºå¯¹è±¡ ç®æ 对象æ¾ç¤ºlabel忢 --> |
| | | <template slot="showTypeLabel" slot-scope="{}"> |
| | | <span v-if="form.templateType === '3'">顶级èç¹</span> |
| | | <span v-else-if="form.templateType === '5'">ä¸å¡ç±»å</span> |
| | | <span v-else-if="form.templateType === '6'">对象类å</span> |
| | | <span v-else-if="form.searchTarger === '1'">æºå¯¹è±¡</span> |
| | | <span v-else-if="form.searchTarger === '2'">ç®æ 对象</span> |
| | | </template> |
| | | </avue-crud> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="btnDesignVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="é
ç½®æé®" |
| | | width="75%" |
| | | @close="dialogClose"> |
| | | <el-container v-loading="dialogLoading"> |
| | | <el-header style="height: 40px !important;"> |
| | | <div style="display: flex"> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">æ·»å |
| | | </el-button> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">å é¤ |
| | | </el-button> |
| | | <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="saveClickBtnHandler">ä¿å |
| | | </el-button> |
| | | <el-button :disabled="disabledBtn" plain size="mini" type="primary" @click="escClickBtnHandler">åæ¶ |
| | | </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> |
| | | </div> |
| | | </el-header> |
| | | <el-container> |
| | | <el-aside width="20%"> |
| | | <basic-container> |
| | | <div style="height:650px;"> |
| | | <avue-tree |
| | | ref="Tree" |
| | | :data="treeData" |
| | | :loading="treeLoading" |
| | | :option="treeOption" |
| | | node-key="value" |
| | | @node-click="nodeTreeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 14px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <el-divider content-position="left">åºç¡ä¿¡æ¯</el-divider> |
| | | <el-form ref="form" :model="basicForm" :rules="rules" label-width="90px" size="small" |
| | | style="margin-top: 20px"> |
| | | <el-row> |
| | | <el-form-item :inline-message='true' label="ç¼å·ï¼" prop="seq"> |
| | | <el-input-number v-model="basicForm.seq" :disabled="disabledBtn" :max="9999" :min="1" |
| | | controls-position="right"></el-input-number> |
| | | </el-form-item> |
| | | |
| | | <el-form-item :inline-message='true' label="åç§°ï¼" prop="label"> |
| | | <el-col :span="14"> |
| | | <el-input v-model="basicForm.label" :readonly="disabledBtn"></el-input> |
| | | </el-col> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="Actionï¼" prop="Action"> |
| | | <el-col :span="14"> |
| | | <div style="display: flex"> |
| | | <el-input v-model="basicForm.actionName" :readonly="disabledBtn"></el-input> |
| | | <el-button :disabled="disabledBtn" size="mini" style="margin-left: 10px" type="success" |
| | | @click="actionFoucus">éæ© |
| | | </el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-form-item> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¯å¦ææï¼" prop="resource"> |
| | | <el-radio v-model="basicForm.authorization" :disabled="disabledBtn" label="0">æ¯</el-radio> |
| | | <el-radio v-model="basicForm.authorization" :disabled="disabledBtn" label="1">å¦</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¯å¦æ¾ç¤ºï¼" prop="show"> |
| | | <el-radio v-model="basicForm.show" :disabled="disabledBtn" label="0">æ¯</el-radio> |
| | | <el-radio v-model="basicForm.show" :disabled="disabledBtn" label="1">å¦</el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :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-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="æç¤ºä¿¡æ¯ï¼" prop="desc"> |
| | | <el-input v-model="basicForm.desc" :readonly="disabledBtn" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | </el-form> |
| | | |
| | | <el-divider content-position="left">åæ°ä¿¡æ¯</el-divider> |
| | | <avue-crud |
| | | ref="paramsCrud" |
| | | v-model="paramsForm" |
| | | :data="paramsData" |
| | | :option="paramsOption" |
| | | style="margin-top: 20px" |
| | | @row-save="paramsRowSave" |
| | | @row-update="paramsRowUpdate"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button :disabled="disabledBtn" icon="el-icon-plus" plain size="small" type="primary" |
| | | @click="paramsRowAddClickHandler">å建 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button :disabled="disabledBtn" icon="el-icon-edit" size="small" type="text" |
| | | @click="paramsRowEditHandler(scope.row)">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button :disabled="disabledBtn" icon="el-icon-delete" size="small" type="text" |
| | | @click="paramsRowDeleteHandler(scope.row)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | </el-container> |
| | | </el-dialog> |
| | | <action-dialog ref="actionDialog" @updataAction="actionSaveHandler"></action-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import basicOption from "@/util/basic-option"; |
| | | import func from "@/util/func"; |
| | | import { |
| | | getPLPageDefinations, |
| | | getBtmDatasByPage, |
| | | getPortalVIDatasByPage, |
| | | getQTInfoDatasByPage, |
| | | getTabButtons, |
| | | addTapButton, |
| | | updateTapButton, getTabByContextIdAndType |
| | | } from "@/api/UI/uiDefine"; |
| | | import actionDialog from '@/views/modelingMenu/ui/uiDefine/rightRegion/bottomTable/components/action'; |
| | | |
| | | export default { |
| | | props: { |
| | | sourceData: { |
| | | type: Object, |
| | | default: () => { |
| | | } |
| | | }, |
| | | height: { |
| | | type: String, |
| | | default: () => "auto" |
| | | } |
| | | }, |
| | | components: { |
| | | actionDialog |
| | | }, |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | paramsForm:{}, |
| | | eventOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | highlightCurrentRow: true, |
| | | height: 200, |
| | | column: [ |
| | | { |
| | | label: 'EventKey', |
| | | prop: 'eventKey', |
| | | type: 'select', |
| | | value: 'SelectionEvent', |
| | | dicData: [ |
| | | { |
| | | label: 'SelectionEvent', |
| | | value: 'SelectionEvent' |
| | | }, |
| | | { |
| | | label: 'DBClickEvent', |
| | | value: 'DBClickEvent' |
| | | }, |
| | | { |
| | | label: 'ClickEvent', |
| | | value: 'ClickEvent' |
| | | } |
| | | ], |
| | | cell: true |
| | | }, |
| | | { |
| | | label: 'EventValue', |
| | | prop: 'eventValue', |
| | | cell: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥eventValue', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | eventData: [], |
| | | btnActionVisible: false, |
| | | dialogLoading: false, |
| | | saveType: '', |
| | | disabledBtn: true, |
| | | paramsData: [], |
| | | nodeTreeRow: {}, |
| | | paramsOption: { |
| | | ...basicOption, |
| | | height: 260, |
| | | addBtn: false, |
| | | tip: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥åç§°', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'å¼', |
| | | prop: 'value', |
| | | span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥å¼', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }, |
| | | rules: { |
| | | seq: [ |
| | | {required: true, message: '请è¾å
¥ç¼å·', type: 'number', trigger: 'blur'}, |
| | | ], |
| | | label: [ |
| | | {required: true, message: '请è¾å
¥åç§°', trigger: 'blur'}, |
| | | ], |
| | | }, |
| | | // æé®è®¾è®¡ åºç¡ä¿¡æ¯ |
| | | basicForm: { |
| | | seq: 1 |
| | | }, |
| | | treeData: [], |
| | | treeOption: { |
| | | menu: false, |
| | | addBtn: false, |
| | | defaultExpandedKeys: ['parentNode'], |
| | | props: { |
| | | label: 'label', |
| | | value: 'oId', |
| | | children: 'children', |
| | | }, |
| | | }, |
| | | treeLoading: false, |
| | | btnDesignVisible: false, |
| | | FormData: [], |
| | | form: {}, |
| | | data: [], |
| | | option: { |
| | | ...basicOption, |
| | | height: this.height, |
| | | addBtn: false, |
| | | index: true, |
| | | calcHeight: -30, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥åç§°', |
| | | trigger: 'blur' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'seq', |
| | | hide: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: '请è¾å
¥ç¼å·', |
| | | trigger: 'blur' |
| | | } |
| | | ], |
| | | }, |
| | | { |
| | | label: 'UIè§£æç±»å', |
| | | prop: 'uiParser', |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: 'æ©å±å±æ§', |
| | | prop: 'extAttr', |
| | | hide: true, |
| | | }, |
| | | { |
| | | label: '模æ¿ç±»å', |
| | | prop: 'templateType', |
| | | type: 'radio', |
| | | span: 24, |
| | | value: '1', |
| | | dicData: [ |
| | | { |
| | | label: 'Table(è¡¨æ ¼)', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'Customï¼èªå®ä¹æ¨¡æ¿ï¼', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: 'TreeTable(æ 表)', |
| | | value: '3', |
| | | }, |
| | | { |
| | | label: 'Form(表å)', |
| | | value: '4', |
| | | }, |
| | | { |
| | | label: 'Tree(æ )', |
| | | value: '5', |
| | | }, |
| | | { |
| | | label: 'UILayout(UIå®ä¹)', |
| | | value: '6', |
| | | } |
| | | ], |
| | | formatter: (row) => { |
| | | const val = this.templateTypeValueHandler(row.templateType); |
| | | return val; |
| | | }, |
| | | change: (val) => { |
| | | console.log(val); |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = true; // 忢é»è®¤å±ç¤ºæç´¢ç±»å |
| | | // 模æ¿ç±»åä¸ºè¡¨æ ¼ |
| | | this.templateTypeTable(val.value === '1'); |
| | | // 模æ¿ç±»å为èªå®ä¹æ¨¡æ¿ |
| | | this.templateTypeCustom(val.value === '2'); |
| | | // 模æ¿ç±»å为æ 表 |
| | | this.templateTypeTreeTable(val.value === '3'); |
| | | // 模æ¿ç±»å为表å |
| | | this.templateTypeForm(val.value === '4'); |
| | | // 模æ¿ç±»å为æ |
| | | this.templateTypeTree(val.value === '5'); |
| | | // 模æ¿ç±»å为UIå®ä¹ |
| | | this.templateTypeUI(val.value === '6'); |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºç±»å', |
| | | prop: 'navigatorType', |
| | | type: 'radio', |
| | | span: 24, |
| | | value: '1', |
| | | hide: true, |
| | | dicData: [ |
| | | { |
| | | label: '䏿¾ç¤º', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºè§è²', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: 'æ¾ç¤ºFolder', |
| | | value: '3', |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | label: 'æç´¢ç±»å', |
| | | prop: 'searchTarger', |
| | | display: true, |
| | | type: 'radio', |
| | | value: '1', |
| | | span: 24, |
| | | dicData: [ |
| | | { |
| | | label: 'æ¬å¯¹è±¡å±æ§', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'å
³èå¯¹è±¡å±æ§', |
| | | value: '2' |
| | | }, |
| | | ], |
| | | formatter: (row) => { |
| | | return row.searchTarger === '1' ? 'æ¬å¯¹è±¡å±æ§' : 'å
³èå¯¹è±¡å±æ§'; |
| | | }, |
| | | change: (val) => { |
| | | // å¦ææ¨¡æ¿ç±»åæ¯è¡¨æ ¼ã æ 表 ã 表å åæ¢å¯¹è±¡å±æ§çæ¶åï¼å¦ææ¯æ¬å¯¹è±¡å±æ§ä¸å±ç¤ºé¾æ¥ç±»åï¼å¦åå±ç¤ºé¾æ¥ç±»å |
| | | if (['1', '3', '4'].includes(this.form.templateType)) { |
| | | const obj = this.option.group[0].column.find(item => item.prop === 'linkType'); |
| | | obj.display = val.value !== '1'; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | display: false |
| | | }, |
| | | ], |
| | | group: [ |
| | | { |
| | | label: '', |
| | | arrow: false, |
| | | prop: 'group1', |
| | | column: [ |
| | | { |
| | | label: 'æºå¯¹è±¡', |
| | | prop: 'showType', |
| | | type: 'table', |
| | | display: false, |
| | | placeholder: "请è¾å
¥å
容", |
| | | props: { |
| | | label: 'name', |
| | | value: 'name' |
| | | }, |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'name' |
| | | }, { |
| | | label: 'æ ç¾', |
| | | prop: 'label' |
| | | }], |
| | | }, |
| | | onLoad: ({page, value, data}, callback) => { |
| | | //pageå页 |
| | | // ä¸ç®¡æ¯æç´¢ è¿æ¯é¦æ¬¡å è½½é½ä¼è§¦åpage æä»¥åªéè¦æ¿pageåå¨ä¸å¦è¿è¡è¯·æ±å°±å¯ä»¥ 妿åå»å¤ædataæç´¢ æè
value忬¡å 载就ä¼éå¤è¯·æ± |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[filterInputValue]": value ? value.name : '' |
| | | }; |
| | | getBtmDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: '龿¥ç±»å', |
| | | prop: 'linkType', |
| | | type: 'table', |
| | | display: false, |
| | | props: { |
| | | label: 'viName', |
| | | value: 'viName' |
| | | }, |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'viName' |
| | | }, { |
| | | label: 'ç±»å', |
| | | prop: 'viType' |
| | | }], |
| | | }, |
| | | 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 => { |
| | | console.log(res); |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: 'éæ©æ¨¡æ¿', |
| | | prop: 'showTypea', |
| | | display: false, |
| | | type: 'table', |
| | | props: { |
| | | label: 'viName', |
| | | value: 'viName' |
| | | }, |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'viName' |
| | | }, { |
| | | label: 'ç±»å', |
| | | prop: 'viType' |
| | | }], |
| | | }, |
| | | 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 => { |
| | | console.log(res); |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: 'UIå®ä¹', |
| | | prop: 'UI', |
| | | type: 'table', |
| | | display: false, |
| | | props: { |
| | | label: 'qtName', |
| | | value: 'qtName' |
| | | }, |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'qtName' |
| | | }, { |
| | | label: 'ç±»å', |
| | | prop: 'btmName' |
| | | }], |
| | | }, |
| | | onLoad: ({page, value, data}, callback) => { |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[selectBtmType]": this.form.showType, |
| | | "conditionMap[filterInputValue]": data ? data.qtName : '', |
| | | }; |
| | | getQTInfoDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: 'æ¥è¯¢ç±»å', |
| | | prop: 'searchType', |
| | | display: false, |
| | | type: 'radio', |
| | | span: 24, |
| | | dicData: [ |
| | | { |
| | | label: 'ä¸å¡ç±»å', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: '龿¥ç±»å', |
| | | value: '2' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | label: 'æ¥è¯¢å¯¹è±¡ç±»å', |
| | | prop: 'searchObjType', |
| | | type: 'table', |
| | | display: false, |
| | | labelWidth: 100, |
| | | props: { |
| | | label: 'qtName', |
| | | value: 'qtName' |
| | | }, |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'qtName' |
| | | }, { |
| | | label: 'ç±»å', |
| | | prop: 'btmName' |
| | | }], |
| | | }, |
| | | onLoad: ({page, value, data}, callback) => { |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[selectBtmType]": this.form.showType, |
| | | "conditionMap[filterInputValue]": data ? data.qtName : '', |
| | | }; |
| | | getQTInfoDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: 'æ¥è¯¢æ¨¡æ¿', |
| | | prop: 'showTypes', |
| | | type: 'table', |
| | | display: false, |
| | | props: { |
| | | label: 'qtName', |
| | | value: 'qtName' |
| | | }, |
| | | children: { |
| | | border: true, |
| | | column: [{ |
| | | label: 'åç§°', |
| | | search: true, |
| | | searchSpan: 24, |
| | | prop: 'qtName' |
| | | }, { |
| | | label: 'ç±»å', |
| | | prop: 'btmName' |
| | | }], |
| | | }, |
| | | onLoad: ({page, value, data}, callback) => { |
| | | if (page) { |
| | | const params = { |
| | | "conditionMap[selectBtmType]": this.form.showType, |
| | | "conditionMap[filterInputValue]": data ? data.qtName : '', |
| | | }; |
| | | getQTInfoDatasByPage(page.currentPage, page.pageSize, params).then(res => { |
| | | callback({ |
| | | total: res.data.total, |
| | | data: res.data.data |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: 'æ§å¶è·¯å¾', |
| | | prop: 'kzlj', |
| | | display: false, |
| | | type: 'textarea', |
| | | rows: 3 |
| | | }, |
| | | { |
| | | label: 'æ ¹èç¹æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'genjiedian', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 24 |
| | | }, |
| | | { |
| | | label: 'æ èç¹æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'shujiedian', |
| | | display: false, |
| | | labelWidth: 135, |
| | | span: 24 |
| | | }, |
| | | { |
| | | label: 'åç
§æ 设置', |
| | | prop: 'canzhaoshu', |
| | | display: false, |
| | | }, |
| | | { |
| | | label: 'åé符', |
| | | prop: 'fgf', |
| | | display: false, |
| | | }, |
| | | { |
| | | label: 'å±å¼æ¹å¼', |
| | | prop: 'zkfs', |
| | | display: false, |
| | | type: 'radio', |
| | | dicData: [ |
| | | { |
| | | label: 'é级å±å¼', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'å
¨é¨å±å¼', |
| | | value: '2' |
| | | } |
| | | ] |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | label: '', |
| | | arrow: false, |
| | | prop: 'group2', |
| | | column: [ |
| | | { |
| | | label: '', |
| | | prop: 'bottomValue', |
| | | span: 24, |
| | | labelWidth: 10 |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | }, |
| | | tableLoading: false, |
| | | lastIndex: null, |
| | | selectList: [], |
| | | formDataRow: {}, |
| | | } |
| | | }, |
| | | watch: { |
| | | sourceData: { |
| | | handler(val) { |
| | | if (val && val.plOId) { |
| | | this.getTableList() |
| | | } else { |
| | | this.data = []; |
| | | } |
| | | }, |
| | | immediate: true, |
| | | deep: true |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | //è·ååè¡¨æ°æ® |
| | | getTableList() { |
| | | const params = { |
| | | pageContextOId: this.sourceData.plOId |
| | | } |
| | | getPLPageDefinations(params).then(res => { |
| | | this.data = res.data.data; |
| | | this.selectList = []; |
| | | this.$refs.crud.clearSelection(); |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | // æ ¹æ®ä¸åå¼åºåç±»å |
| | | templateTypeValueHandler(val) { |
| | | const componentMap = { |
| | | '1': 'è¡¨æ ¼', |
| | | '2': 'èªå®ä¹æ¨¡æ¿', |
| | | '3': 'æ 表', |
| | | '4': '表å', |
| | | '5': 'æ ', |
| | | '6': 'UIå®ä¹', |
| | | }; |
| | | |
| | | return componentMap[val] || ""; // å¦æä¸ºç©º è¿å空 |
| | | }, |
| | | |
| | | // è¡¨æ ¼å¤é |
| | | selectChangeHandler(row) { |
| | | this.selectList = row; |
| | | }, |
| | | |
| | | // è¡ç¹å» |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // å¢å |
| | | addClickHandler() { |
| | | console.log(this.sourceData); |
| | | if (!this.sourceData || !this.sourceData.plOId) { |
| | | this.$message.error('请å¨ä¸æ¹éæ©ä¸æ¡æ°æ®åè¿è¡æ·»å '); |
| | | return; |
| | | } |
| | | this.$refs.crud.rowAdd(); |
| | | }, |
| | | |
| | | // å¯¹è¯æ¡è¡¨æ ¼è¡ç¹å» |
| | | formDataRowClick(row) { |
| | | this.formDataRow = 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', |
| | | eventValue: this.form.eventValue, |
| | | $cellEdit: true |
| | | } |
| | | |
| | | this.eventData.push(obj); |
| | | }, |
| | | |
| | | // å¯¹è¯æ¡è¡¨æ ¼å é¤ |
| | | formDataDelClickHandler(row) { |
| | | this.eventData = this.eventData.filter(item => item.index !== row.index); |
| | | }, |
| | | |
| | | // 模æ¿ç±»åæ¾ç¤ºéèæ¹æ³ |
| | | updateDisplay(val, showTpeMap) { |
| | | const groupList = this.option.group[0].column; // è·å第ä¸å±groupæææ°æ® |
| | | groupList.forEach(item => { |
| | | item.display = showTpeMap.includes(item.prop) ? val : !val; // æ´æ°display |
| | | }); |
| | | }, |
| | | |
| | | // 模æ¿ç±»åä¸ºè¡¨æ ¼ |
| | | templateTypeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'showTypea', 'showTypes']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为èªå®ä¹æ¨¡æ¿ |
| | | templateTypeCustom(val) { |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['kzlj']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为æ 表 |
| | | templateTypeTreeTable(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'showTypea', 'showTypes', 'zkl', 'zkfs']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为表å |
| | | templateTypeForm(val) { |
| | | if (!val) return; |
| | | this.updateDisplay(val, ['showType', 'showTypea', 'showTypes']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为æ |
| | | templateTypeTree(val) { |
| | | 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']); |
| | | }, |
| | | |
| | | // 模æ¿ç±»å为UIå®ä¹ |
| | | templateTypeUI(val) { |
| | | if (!val) return; |
| | | const searchTarger = this.option.column.find(item => item.prop === 'searchTarger'); // è·åæç´¢ç±»åé
置项 |
| | | searchTarger.display = false; // ä¸å±ç¤ºæç´¢ç±»å |
| | | this.updateDisplay(val, ['showType', 'UI', 'searchType', 'searchObjType', 'showTypes']); |
| | | }, |
| | | |
| | | // æ¥æ¾æ°ç»ä¸å¯¹è±¡ç´¢å¼ |
| | | findIndexByEventValue(array, eventValue) { |
| | | return array.findIndex(item => item.eventValue === eventValue); |
| | | }, |
| | | |
| | | // ä¸ç§» |
| | | moveUp(row) { |
| | | const index = this.findIndexByEventValue(this.eventData, row.eventValue); |
| | | if (index > 0) { |
| | | // ä½¿ç¨ splice æ¥æ¨¡æäº¤æ¢ |
| | | const temp = this.eventData.splice(index - 1, 1, this.eventData[index])[0]; // ç§»é¤ index-1 çå
ç´ å¹¶å¨ç¸åä½ç½®æå
¥ index çå
ç´ è¿å被移é¤çå
ç´ |
| | | this.eventData.splice(index, 1, temp); // å¨ index ä½ç½®æå
¥ä¹å被移é¤çå
ç´ |
| | | } |
| | | }, |
| | | |
| | | // ä¸ç§» |
| | | moveDown(row) { |
| | | const index = this.findIndexByEventValue(this.eventData, row.eventValue); |
| | | const length = this.eventData.length; |
| | | if (index < length - 1) { |
| | | const temp = this.eventData[index]; |
| | | this.eventData.splice(index, 1, this.eventData.splice(index + 1, 1, temp)[0]); |
| | | } |
| | | }, |
| | | |
| | | // æé®è®¾è®¡å
³éå¯¹è¯æ¡ |
| | | dialogClose() { |
| | | |
| | | }, |
| | | |
| | | // æé®è®¾è®¡ |
| | | btnDesignClickHandler() { |
| | | if (this.selectList.length != 1) { |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.btnDesignVisible = true; |
| | | this.getTabBtnTree(); |
| | | }, |
| | | |
| | | // 左侧æ è¯·æ± |
| | | getTabBtnTree() { |
| | | const params = { |
| | | pageDefinationOid: 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, |
| | | oId: 'parentNode', |
| | | children: data |
| | | }]; |
| | | this.treeLoading = false; |
| | | } else { |
| | | this.$message.error('è¯·æ£æ¥æ§å¶å°é误'); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æé®è®¾è®¡è¡ç¹å» |
| | | nodeTreeClick(row) { |
| | | this.nodeTreeRow = row; |
| | | this.basicForm = {...row}; |
| | | this.paramsData = row.buttonParams ? Object.entries(row.buttonParams).map(([key, value]) => ({ |
| | | name: key, |
| | | value: value |
| | | })) : []; |
| | | this.disabledBtn = true; |
| | | }, |
| | | |
| | | // æé®è®¾è®¡åæ°ä¿¡æ¯å é¤ |
| | | paramsRowDeleteHandler(row) { |
| | | this.paramsData.splice(row.$index, 1) |
| | | }, |
| | | |
| | | // æé®è®¾è®¡ä¿¡æ¯åæ°ä¿¡æ¯ä¿®æ¹ |
| | | paramsRowEditHandler(row) { |
| | | this.$refs.paramsCrud.rowEdit(row); |
| | | }, |
| | | |
| | | // æé®è®¾è®¡åæ°ä¿¡æ¯æ·»å æé® |
| | | paramsRowAddClickHandler() { |
| | | this.$refs.paramsCrud.rowAdd(); |
| | | }, |
| | | |
| | | // æé®è®¾è®¡åæ°ä¿¡æ¯ä¿®æ¹ä¿å |
| | | paramsRowUpdate(row, index, done, loading) { |
| | | this.paramsData.splice(index, 1, row); |
| | | done(); |
| | | }, |
| | | |
| | | // æé®è®¾è®¡åæ°ä¿¡æ¯ä¿å |
| | | paramsRowSave(row, done, loading) { |
| | | if (!row.name) { |
| | | this.$message.error('åç§°ä¸è½ä¸ºç©º'); |
| | | return loading(); |
| | | } |
| | | |
| | | if (!row.value) { |
| | | this.$message.error('å¼ä¸è½ä¸ºç©º'); |
| | | return loading(); |
| | | } |
| | | |
| | | this.paramsData.push(row); |
| | | done(); |
| | | }, |
| | | |
| | | // æé®è®¾è®¡æ·»å |
| | | addClickBtnHandler() { |
| | | if (func.isEmptyObject(this.nodeTreeRow)) { |
| | | this.$message.error('è¯·éæ©èç¹è¿è¡æ·»å '); |
| | | return; |
| | | } |
| | | this.disabledBtn = false; |
| | | this.basicForm = {}; |
| | | this.paramsData = []; |
| | | this.saveType = 'add'; |
| | | }, |
| | | |
| | | // æé®è®¾è®¡ä¿®æ¹ |
| | | editClickBtnHandler() { |
| | | if (func.isEmptyObject(this.nodeTreeRow)) { |
| | | this.$message.error('è¯·éæ©èç¹è¿è¡ä¿®æ¹'); |
| | | return; |
| | | } |
| | | |
| | | if (this.nodeTreeRow.oId === "parentNode") { |
| | | this.$message.error('é¡¶å±èç¹ä¸å
许修æ¹'); |
| | | return; |
| | | } |
| | | |
| | | this.disabledBtn = false; |
| | | this.saveType = 'edit'; |
| | | }, |
| | | |
| | | // æé®è®¾è®¡åæ¶ |
| | | escClickBtnHandler() { |
| | | this.disabledBtn = true; |
| | | if (this.saveType === 'add') { |
| | | this.$refs.Tree.setCurrentKey(null); |
| | | } |
| | | }, |
| | | |
| | | // æé®è®¾è®¡ä¿å |
| | | saveClickBtnHandler() { |
| | | this.dialogLoading = true; |
| | | const saveFunction = this.saveType === 'add' ? addTapButton : updateTapButton; |
| | | const bottomParams = {}; |
| | | if (this.paramsData.length > 0) { |
| | | this.paramsData.forEach(item => { |
| | | bottomParams[item.name] = item.value |
| | | }) |
| | | } |
| | | ; |
| | | |
| | | const params = this.saveType === 'add' ? { |
| | | ...this.basicForm, |
| | | parentId: this.nodeTreeRow.oId === 'parentNode' ? '' : this.nodeTreeRow.parentId, |
| | | buttonParams: bottomParams |
| | | } : { |
| | | ...this.basicForm, |
| | | buttonParams: bottomParams |
| | | } |
| | | |
| | | saveFunction(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.disabledBtn = true; |
| | | this.getTabBtnTree(); |
| | | this.basicForm = {}; |
| | | this.paramsData = []; |
| | | this.dialogLoading = false; |
| | | } |
| | | }).catch(err => { |
| | | this.dialogLoading = false; |
| | | }) |
| | | }, |
| | | |
| | | // æé®è®¾è®¡å é¤ |
| | | delClickBtnHandler() { |
| | | if (func.isEmptyObject(this.nodeTreeRow)) { |
| | | this.$message.error('è¯·éæ©èç¹è¿è¡å é¤'); |
| | | return; |
| | | } |
| | | |
| | | if (this.nodeTreeRow.oId === "parentNode") { |
| | | this.$message.error('é¡¶å±èç¹ä¸å
许å é¤'); |
| | | return; |
| | | } |
| | | |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // 鿩action |
| | | actionFoucus() { |
| | | this.$refs.actionDialog.btnActionVisible = true; |
| | | }, |
| | | |
| | | // ä¿åaction |
| | | actionSaveHandler(val) { |
| | | this.$set(this.basicForm, 'actionName', val.plName); |
| | | this.$set(this.basicForm, 'actionOId', val.plOId); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .el-divider__text, .el-link { |
| | | font-size: 16px !important; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-tabs v-model="areaType" type="card" @tab-click="handleClick"> |
| | | <el-tab-pane v-if="uiDefineData.plIsShowNavigator" label="导èªåº" name="1"></el-tab-pane> |
| | | <el-tab-pane v-if="uiDefineData.plIsShowForm" label="æ§å¶åº" name="2"></el-tab-pane> |
| | | <el-tab-pane v-if="uiDefineData.plIsShowTab" label="æä½åº" name="3"></el-tab-pane> |
| | | </el-tabs> |
| | | <avue-crud |
| | | ref="crud" |
| | | :data="data" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addHandler">å建</el-button> |
| | | <!--<el-button icon="el-icon-edit" plain size="small" type="primary" @click="editHandler">ä¿®æ¹</el-button> |
| | | <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> |
| | | </template> |
| | | <template slot="plIsOpen" slot-scope="{row}"> |
| | | <el-tag v-if="row.plIsOpen === 1" type="success">å¯ç¨</el-tag> |
| | | <el-tag v-else type="danger">æªå¯ç¨</el-tag> |
| | | </template> |
| | | </avue-crud> |
| | | <bottom-table :sourceData="selectList[0]" :height="'280px'" style="margin-top: 15px;"></bottom-table> |
| | | <!-- å建ç¼è¾èªå®ä¹å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-loading="dialogLoading" |
| | | :title="dialogType === 'add' ? ' å建 页ç¾' : 'ç¼è¾ 页ç¾'" |
| | | :visible.sync="dialogVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | :close-on-click-modal="false" |
| | | width="800px" |
| | | @close="dialogClose" |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px" size="small"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="页é¢ç¼ç ï¼" prop="plCode"> |
| | | <el-input v-model="form.plCode"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç§°ï¼" prop="plName"> |
| | | <el-input v-model="form.plName"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºå·ï¼" prop="plSeq"> |
| | | <el-input v-model="form.plSeq"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¯å¦å¯ç¨" prop="plIsOpen"> |
| | | <el-switch v-model="form.plIsOpen" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949"></el-switch> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="æ¾ç¤ºè¡¨è¾¾å¼ï¼" prop="plOpenExpression"> |
| | | <el-input type="textarea" :rows="3" v-model="form.plOpenExpression"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å½é
åæ åï¼" prop="plLabel"> |
| | | <el-input type="textarea" :rows="1" v-model="form.plLabel"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°ï¼" prop="plDesc"> |
| | | <el-input type="textarea" :rows="1" v-model="form.plDesc"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="UIè§£æç±»ï¼" prop="plUIParser"> |
| | | <el-input type="textarea" :rows="2" v-model="form.plUIParser"></el-input> |
| | | </el-form-item> |
| | | <div class="tip"> |
| | | <div style="color: #D40000">示ä¾ï¼java_cs:xxx;java_bs:xxx;net_cs:xxx;net_bs:xxx;mobile_cs:xxx;mobile_bs:xxx;</div> |
| | | <div>1ãç¨è±æåè§åå·;åéåç»å¼ã</div> |
| | | <div>2ãæ¯ç»ç¨è±æåè§åå·:åéå䏿å±å±æ§åç§°å屿§å¼ã</div> |
| | | <div>3ãå
¶ä¸çxxxæ¯åç§è§£æç±»ç宿´ç±»ååç§°ï¼å®å
¨éå®åï¼ã</div> |
| | | <div>4ãè¾å
¥æ¶ï¼ä¸è¦æ²å车æ¢è¡ã</div> |
| | | </div> |
| | | <el-form-item label="æå±å±æ§ï¼" prop="plExtAttr"> |
| | | <el-input type="textarea" :rows="2" v-model="form.plExtAttr"></el-input> |
| | | </el-form-item> |
| | | <div class="tip"> |
| | | <div style="color: #D40000">示ä¾ï¼ext1:xx;ext2:xx;ext3:xxx;ext4:xxx;extn:xxx</div> |
| | | <div>1ãç¨è±æåè§åå·;åéåç»å¼ã</div> |
| | | <div>2ãæ¯ç»ç¨è±æåè§åå·:åéå䏿å±å±æ§åç§°å屿§å¼ã</div> |
| | | <div>3ãå¯ä»¥å®ä¹ä»»æç»ï¼ä½æ»å符é¿åº¦ä¸å¾è¶
è¿4000ã</div> |
| | | <div>4ãè¾å
¥æ¶ï¼ä¸è¦æ²å车æ¢è¡ã</div> |
| | | </div> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import basicOption from "@/util/basic-option"; |
| | | import { |
| | | getTabByContextIdAndType, |
| | | addTabData, |
| | | updateTabData, |
| | | deleteTabData, |
| | | } from "@/api/UI/uiDefine"; |
| | | import func from "@/util/func"; |
| | | import bottomTable from "./bottomTable/index"; |
| | | |
| | | export default { |
| | | name: "plShow", |
| | | props: { |
| | | uiDefineData: { |
| | | type: Object, |
| | | default: {} |
| | | }, |
| | | }, |
| | | components:{bottomTable}, |
| | | data() { |
| | | return { |
| | | uiDefineOid:'', |
| | | areaType: '', |
| | | tableLoading: false, |
| | | selectList: [], |
| | | option: { |
| | | ...basicOption, |
| | | height:'300px', |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | index:false, |
| | | menuWidth:160, |
| | | align:'left', |
| | | column: [{ |
| | | label: 'åºå·', |
| | | prop: 'plSeq', |
| | | width:50 |
| | | }, { |
| | | label: 'ç¼ç ', |
| | | prop: 'plCode', |
| | | width:180 |
| | | }, { |
| | | label: 'åç§°', |
| | | prop: 'plName', |
| | | width:200 |
| | | }, { |
| | | label: 'æ¯å¦å¯ç¨', |
| | | prop: 'plIsOpen', |
| | | align:'center', |
| | | width: 90 |
| | | }, { |
| | | label: 'æ¾ç¤ºè¡¨è¾¾å¼', |
| | | prop: 'plOpenExpression', |
| | | overHidden:true, |
| | | width:300 |
| | | }, { |
| | | label: 'UIè§£æç±»', |
| | | prop: 'plUIParser' |
| | | }, { |
| | | label: 'æå±å±æ§', |
| | | prop: 'plExtAttr' |
| | | }, { |
| | | label: 'æè¿°', |
| | | prop: 'plDesc' |
| | | }] |
| | | }, |
| | | data: [], |
| | | dialogLoading: false, |
| | | dialogVisible: false, |
| | | dialogType: '', |
| | | form: { |
| | | plSeq: '', |
| | | plCode: '', |
| | | plName: '', |
| | | plIsOpen:0, |
| | | plOpenExpression:'', |
| | | plLabel:'', |
| | | plUIParser:'', |
| | | plExtAttr:'', |
| | | plDesc:'' |
| | | }, |
| | | rules: { |
| | | plName: [{ |
| | | required: true, |
| | | message: '请è¾å
¥åç§°', |
| | | trigger: 'blur' |
| | | }], |
| | | plCode: [{ |
| | | required: true, |
| | | message: '请è¾å
¥ç¼ç ', |
| | | trigger: 'blur' |
| | | }], |
| | | plSeq: [{ |
| | | required: true, |
| | | message: '请è¾å
¥åºå·', |
| | | trigger: 'blur' |
| | | }] |
| | | }, |
| | | } |
| | | }, |
| | | watch: { |
| | | uiDefineData:{ |
| | | handler(val) { |
| | | if(val && val.plOId) { |
| | | if (val.plIsShowNavigator) { |
| | | this.areaType = '1'; |
| | | }else if(val.plIsShowForm){ |
| | | this.areaType = '2' |
| | | }else{ |
| | | this.areaType = '3' |
| | | } |
| | | this.getTableList() |
| | | } |
| | | }, |
| | | immediate: true, |
| | | deep:true |
| | | } |
| | | }, |
| | | created() { |
| | | this.uiDefineOid=this.$route.params.uiDefineOid; |
| | | }, |
| | | methods: { |
| | | handleClick(tab, event) { |
| | | this.getTableList() |
| | | }, |
| | | getTableList(){ |
| | | const params = { |
| | | contextId:this.uiDefineData.plOId, |
| | | areaType:this.areaType |
| | | } |
| | | getTabByContextIdAndType( params).then(res => { |
| | | this.data = res.data.data; |
| | | this.selectList=[]; |
| | | this.$refs.crud.clearSelection(); |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | selectChangeHandler(row) { |
| | | this.selectList = row; |
| | | }, |
| | | // è¡ç¹å» |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | //å建 |
| | | addHandler(){ |
| | | this.form={ |
| | | plSeq: '', |
| | | plCode: '', |
| | | plName: '', |
| | | plIsOpen:0, |
| | | plOpenExpression:'', |
| | | plLabel:'', |
| | | plUIParser:'', |
| | | plExtAttr:'', |
| | | plDesc:'' |
| | | }; |
| | | this.dialogType = 'add'; |
| | | this.dialogVisible = true; |
| | | }, |
| | | editHandler(){ |
| | | if(this.selectList.length!=0){ |
| | | this.rowEditBtnClick(this.selectList[0]); |
| | | }else { |
| | | this.$message.error('è¯·éæ©ä¸æ¡æ°æ®è¿è¡ç¼è¾'); |
| | | } |
| | | }, |
| | | delHandler(){ |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | const params = { |
| | | oids: this.selectList.map(item => item.plOId).join(',') |
| | | } |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTabData(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // ç¼è¾æé® |
| | | rowEditBtnClick(row) { |
| | | this.form=row; |
| | | this.dialogType = 'edit'; |
| | | this.dialogVisible = true; |
| | | }, |
| | | // å é¤æé® |
| | | rowDeleteHandler(row) { |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteTabData({oids: row.plOId}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // å
³éå¯¹è¯æ¡ |
| | | dialogClose() { |
| | | this.dialogVisible = false; |
| | | this.$refs.form.clearValidate(); |
| | | this.form = { |
| | | plName: '', |
| | | plCode: '', |
| | | plDesc:'', |
| | | plIsShow: [], |
| | | } |
| | | }, |
| | | // ä¿åé¡µç¾ |
| | | saveHandler() { |
| | | this.$refs.form.validate((valid,done) => { |
| | | if (valid) { |
| | | const params = { |
| | | plAreaType:parseInt(this.areaType), |
| | | plContextOId:this.uiDefineData.plOId, |
| | | ...this.form |
| | | } |
| | | if (this.dialogType === 'add') { |
| | | addTabData(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('æ·»å æå'); |
| | | this.dialogClose(); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | } else if (this.dialogType === 'edit') { |
| | | updateTabData(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('ä¿®æ¹æå'); |
| | | this.dialogClose() |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .tip{ |
| | | font-size: 12px; |
| | | color: #909399; |
| | | margin: -13px 0 10px 100px; |
| | | } |
| | | </style> |