wangting
2024-10-25 678439f1165f38d4b722e850385a92dca8d695eb
类型Action
已修改1个文件
已添加1个文件
72 ■■■■ 文件已修改
Source/plt-web/plt-web-ui/src/api/authority/ui/typeAction.js 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue 49 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/plt-web/plt-web-ui/src/api/authority/ui/typeAction.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
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
  });
}
Source/plt-web/plt-web-ui/src/views/authority/ui/typeAction/index.vue
@@ -26,6 +26,9 @@
          :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">
@@ -42,7 +45,8 @@
<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"
@@ -93,21 +97,18 @@
          {
            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: [{
@@ -121,11 +122,11 @@
          {
            label: '描述',
            prop: 'plDesc',
            search: true,
            overHidden: true,
          },
        ]
      },
      allData: [],
      data: [],
    }
  },
@@ -152,11 +153,11 @@
      }
    },
    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;
      })
@@ -179,7 +180,26 @@
        }
      );
    },
    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!='') {
@@ -190,7 +210,11 @@
    },
    // ä¿å­˜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);
@@ -203,14 +227,15 @@
        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();