xiejun
2023-08-28 cee3075e880a5fca55160000f0597019f974eb9e
Source/UBCS-WEB/src/views/docking/info.vue
@@ -2,31 +2,34 @@
  <el-container>
    <el-main>
      <basic-container>
        <avue-crud v-model="form" ref="crud" :option="option" :data="data" @on-load="onLoad" :page.sync="page"
        <avue-crud ref="crud" v-model="form" :data="data" :option="option" :page.sync="page" @on-load="onLoad"
                   @search-change="searchChange"
                   @search-reset="searchReset"
                   @selection-change="selectionChange"
                   @current-change="currentChange"
                   @size-change="sizeChange"
                   @refresh-change="refreshChange" @row-click="rowClick">
                   @refresh-change="refreshChange" @row-click="rowClick" :cell-style="cellStyle">
          <template slot="menu" slot-scope="{row,index}">
            <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)">编辑</el-button>
            <el-button icon="el-icon-edit" size="small" type="text" @click="updateSave(row,index)" :disabled="row.usedFlag === 'true' ? false :true">编辑</el-button>
            <el-button icon="el-icon-delete" size="small" type="text" @click="deleteSave(row,index)">删除</el-button>
            <el-button v-if="row.usedflag=='false'" icon="el-icon-position" size="small" type="text" @click="ENABLE(row,index)">启用</el-button>
            <el-button v-else icon="el-icon-finished" size="small" type="text" @click="DISABLE(row,index)">停用</el-button>
            <el-button v-if="row.usedflag=='false'" icon="el-icon-position" size="small" type="text"
                       @click="ENABLE(row,index)">启用
            </el-button>
            <el-button v-else icon="el-icon-finished" size="small" type="text" @click="DISABLE(row,index)">停用
            </el-button>
          </template>
          <template slot="menuLeft">
            <el-button size="small" type="primary" icon="el-icon-plus" @click="addSave">新&nbsp;&nbsp;增
            <el-button icon="el-icon-plus" size="small" type="primary" @click="addSave">新&nbsp;&nbsp;增
            </el-button>
            <el-button size="small" icon="el-icon-share" @click="PUSH">同  步
            <el-button icon="el-icon-share" size="small" @click="PUSH">同 步
            </el-button>
            <el-button size="small" icon="el-icon-search" @click="openAdvancedQuery">查  询
            <el-button icon="el-icon-search" size="small" @click="openAdvancedQuery">查 询
            </el-button>
          </template>
        </avue-crud>
      </basic-container>
    </el-main>
    <infoForm ref="infoForm" @refreshTable="refreshChange" :formData="editAttribute"></infoForm>
    <infoForm ref="infoForm" :formData="editAttribute" @refreshTable="refreshChange"></infoForm>
    <!-- 高级查询对话框 -->
    <advanced-query
      :ref="advancedQueryParam.ref"
@@ -108,28 +111,55 @@
        delBtn: false,
        columnBtn: false,
        column: [{
          label: '推送类型',
          prop: 'pushType',
          label: '是否启用',
          prop: 'usedFlag',
          width: 150,
          formatter: res => res.usedFlag === "true" ? "启用" : "停用"
        },{
          label: '集成系统',
          prop: 'sysBaseName',
          sortable: true,
          width: 150
        },{
          label: '编码类型',
          prop: 'isGroupCodeFlag',
          sortable: true,
          width: 150,
          formatter: res => res.isGroupCodeFlag ? '集团码' : '企业编码'
        },{
          label: '接口类型',
          prop:'dataFlowTypeText',
          align:'center',
          sortable: true,
          width:150,
        },{
          label: '推送类型',
          prop: 'pushTypeText',
          sortable: true,
          overHidden:true,
          align:'center',
          width: 150,
          //pushTypeList作用域
          formatter:(d)=>{
            return this.pushTypeList[d.pushType]
          }
          // formatter: (d) => {
          //   return this.pushTypeList[d.pushType]
          // }
        }, {
          label: '系统编号',
          prop: 'id',
          sortable: true,
          hide:true,
          width: 150
        }, {
          label: '系统名称',
          prop: 'name',
          hide:true,
          sortable: true,
          width: 150
        }, {
          label: '接口函数',
          prop: 'interfaceFunction',
          sortable: true,
          align:'center',
          width: 150
        }, {
          label: '命名空间',
@@ -137,13 +167,24 @@
          sortable: true,
          width: 150
        }, {
          label: 'soapAction',
          prop: 'soapAction',
          sortable: true,
          label: '分类选择',
          prop: 'classifyName',
          align:'center',
          // sortable: true,
          width: 150
        }, {
          label: '参数名称',
          prop: 'targName',
          label: '接口方式',
          prop: 'interfaceType',
          // sortable: true,
          width: 150
        },{
          label: '类路径',
          prop: 'classPath',
          // sortable: true,
          width: 150
        },{
          label: 'soapAction',
          prop: 'soapAction',
          sortable: true,
          width: 150
        }, {
@@ -152,8 +193,19 @@
          sortable: true,
          width: 150
        }, {
            label: '请求方式',
            prop: 'requestMethod',
            align:'center',
            // sortable: true,
            width: 150
          }, {
          label: '请求地址',
          prop: 'requestUrl',
          sortable: true,
          width: 150
        }, {
            label: '参数名称',
            prop: 'targName',
          sortable: true,
          width: 150
        }, {
@@ -200,6 +252,19 @@
    }
  },
  methods: {
    //单元格样式
    cellStyle(row,column,rowIndex,columnIndex){
      if(row.columnIndex==2) {
        console.log(row)
        if(row.row.usedFlag == 'false'){
          return {
            color: 'red',
            fontWeight: 'bold',
            fontSize: '20'
          }
        }
      }
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);
@@ -263,7 +328,7 @@
        showClose: true,
        type: "warning"
      }).then(() => {
        remove(row.oid).then(res => {
        del({oids:row.oid}).then(res => {
          this.$message.success("删除成功");
          this.refreshChange();
        });
@@ -325,9 +390,30 @@
    onLoad(page, params = {}) {
      this.loading = true;
      getList(this.page.currentPage, this.page.pageSize, Object.assign(params, this.query)).then(res => {
        console.log(res)
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        // const Props = {
        //   paramType: '',
        //   returnType: '',
        //   dataFlowType: '',
        //   pushType: '',
        //   classifyName: '',
        //   sourceSystemName: '',
        //   targetSystemName: '',
        //   classPath:'',
        //   requestMethod:'',
        //   requestUrl:'',
        //   interfaceFunction:'',
        //   nameSpace:'',
        //   soapAction:'',
        //   targName:'',
        //   cxfaxis:''
        // };
        // this.pushTypeList.forEach(item => {
        //   Object.assign(item, Props);
        // });
        this.loading = false;
      });
    },