¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | export function getTypeActionByType(params) { |
| | | return request({ |
| | | url: "/api/typeActionController/getTypeActionByType", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | export const savePLTypeAction = (params) => { |
| | | return request({ |
| | | url: '/api/typeActionController/savePLTypeAction', |
| | | method: 'post', |
| | | data: params |
| | | }) |
| | | } |
| | | export function delPLTypeActions(params) { |
| | | return request({ |
| | | url: "/api/typeActionController/delPLTypeActions", |
| | | method: "delete", |
| | | params: params |
| | | }); |
| | | } |
| | |
| | | :data="data" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @refresh-change="handleRefresh" |
| | | @search-change="handleSearch" |
| | | @search-reset="handleReset" |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft"> |
| | |
| | | |
| | | <script> |
| | | import basicOption from "@/util/basic-option"; |
| | | import { delUIContextData, getBizTree, gridUIContextData} from "@/api/UI/uiDefine"; |
| | | import { getBizTree} from "@/api/UI/uiDefine"; |
| | | import {getTypeActionByType,savePLTypeAction,delPLTypeActions} from "@/api/authority/ui/typeAction" |
| | | import func from "@/util/func"; |
| | | import actionDialog from "@/views/modelingMenu/ui/Aciton/components/dialog" |
| | | |
| | |
| | | { |
| | | label: 'C/S类路å¾', |
| | | prop: 'plCSClass', |
| | | search: true, |
| | | searchLabelWidth:120, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: 'B/S龿¥å°å', |
| | | prop: 'plBSUrl', |
| | | search: true, |
| | | searchLabelWidth:120, |
| | | overHidden: true, |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'plTypeType', |
| | | search: true, |
| | | type: 'select', |
| | | width:100, |
| | | dicData: [{ |
| | |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'plDesc', |
| | | search: true, |
| | | overHidden: true, |
| | | }, |
| | | ] |
| | | }, |
| | | allData: [], |
| | | data: [], |
| | | } |
| | | }, |
| | |
| | | } |
| | | }, |
| | | getTableList() { |
| | | const params = Object.assign(this.searchParams, { |
| | | 'conditionMap[btmName]': this.nodeRow.attributes.name, |
| | | }) |
| | | gridUIContextData(1, 50, params).then(res => { |
| | | getTypeActionByType({ |
| | | 'typeName': this.nodeRow.attributes.name, |
| | | }).then(res => { |
| | | this.data = res.data.data; |
| | | this.allData = res.data.data; |
| | | this.$refs.crud.clearSelection(); |
| | | this.tableLoading = false; |
| | | }) |
| | |
| | | } |
| | | ); |
| | | }, |
| | | handleRefresh() { |
| | | this.getTableList(); |
| | | }, |
| | | // æç´¢æ¥è¯¢ |
| | | handleSearch(params, done) { |
| | | const data=this.allData.filter(item=>{ |
| | | if(item.plCode.includes(params.plCode ||'') && item.plName.includes(params.plName || '')){ |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | }) |
| | | this.data=data; |
| | | done(); |
| | | }, |
| | | |
| | | // éç½®æç´¢æ¡ä»¶ |
| | | handleReset() { |
| | | this.data=this.allData; |
| | | }, |
| | | //å建 |
| | | addHandler() { |
| | | if (this.nodeRow && this.nodeRow.oid && this.nodeRow.oid!='') { |
| | |
| | | }, |
| | | // ä¿åaction |
| | | actionSaveHandler(val) { |
| | | addAction(val).then(res => { |
| | | const params = { |
| | | plTypeName: this.nodeRow.attributes.name, |
| | | actions:val |
| | | } |
| | | savePLTypeAction(params).then(res => { |
| | | if(res.data.code == 200){ |
| | | this.$message.success(res.data.obj); |
| | | |
| | |
| | | return; |
| | | } |
| | | const params = { |
| | | oids: this.selectList.map(item => item.plOId).join(',') |
| | | typeName: this.nodeRow.attributes.name, |
| | | typeActionOIds: this.selectList.map(item => item.plOId).join(',') |
| | | } |
| | | this.$confirm('æ¯å¦ç§»é¤éä¸çActionï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delUIContextData(params).then(res => { |
| | | delPLTypeActions(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTableList(); |