田源
2023-08-28 95cb1d699badedeb761e45015c6e5d824fc8502f
集成表格修改
已修改1个文件
262 ■■■■■ 文件已修改
Source/UBCS-WEB/src/views/docking/info.vue 262 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/docking/info.vue
@@ -2,7 +2,7 @@
  <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"
@@ -12,21 +12,24 @@
          <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-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"
@@ -39,16 +42,38 @@
<script>
import {
  getList,add,edit,del,push,updateStatus
  getList, add, edit, del, push, updateStatus
} from "@/api/docking/info";
import {getDictionary} from "@/api/omd/enum";
import infoForm from "./infoForm.vue";
export default {
  name: "info",
  components:{infoForm},
  components: {infoForm},
  data() {
    return {
      add: [
        {
          pushType: '1',
          name: '小明',
        },
        {
          pushType: '1',
          name: '小明1',
        },
        {
          pushType: '2',
          name: '小明12',
        },
        {
          pushType: '5',
          name: '小明123',
        },
        {
          pushType: '2',
          name: '小红123',
        }
      ],
      //接口类型下拉
      interfaceTypeList: [{
        label: 'webService', value: 'webService'
@@ -111,9 +136,10 @@
          label: '推送类型',
          prop: 'pushType',
          sortable: true,
          overHidden:true,
          width: 150,
          //pushTypeList作用域
          formatter:(d)=>{
          formatter: (d) => {
            return this.pushTypeList[d.pushType]
          }
        }, {
@@ -136,7 +162,27 @@
          prop: 'nameSpace',
          sortable: true,
          width: 150
        },{
          label: '分类选择',
          prop: 'classifyName',
          // sortable: true,
          width: 150
        }, {
          label: '集成系统',
          prop: 'targetSystemName',
          // sortable: true,
          width: 150
        },{
          label: '接口方式',
          prop: 'interfaceType',
          // sortable: true,
          width: 150
        },{
          label: '类路径',
          prop: 'classPath',
          // sortable: true,
          width: 150
        },{
          label: 'soapAction',
          prop: 'soapAction',
          sortable: true,
@@ -152,6 +198,11 @@
          sortable: true,
          width: 150
        }, {
            label: '请求方式',
            prop: 'requestMethod',
            // sortable: true,
            width: 150
          }, {
          label: '请求地址',
          prop: 'requestUrl',
          sortable: true,
@@ -161,7 +212,7 @@
          prop: 'paramType',
          sortable: true,
          width: 150,
          formatter: (d)=>{
          formatter: (d) => {
            return this.paramTypeList[d.paramType]
          }
        }, {
@@ -169,7 +220,7 @@
          prop: 'returnType',
          sortable: true,
          width: 150,
          formatter: (d)=>{
          formatter: (d) => {
            return this.returnTypeList[d.returnType]
          }
        }, {
@@ -212,11 +263,11 @@
    },
    selectionChange(list) {
      this.selectionList = list;
      if(this.selectionList.length <= 0){
      if (this.selectionList.length <= 0) {
        this.selectRow = null
      }
      if (this.selectionList.length > 0) {
        this.selectRow = this.selectionList[list.length-1].$index;
        this.selectRow = this.selectionList[list.length - 1].$index;
      }
    },
    selectionClear() {
@@ -235,27 +286,27 @@
    addSave() {
      this.$refs.infoForm.showSubmitDialog = true;
      this.$refs.infoForm.formData = {
        dataFlowType:'push',
        pushType:'1',
        sourceSystemName:'编码系统',
        sourceSystemOid:'code00000001',
        sourceSystemId:'CODE',
        targetSystemName:'',
        targetSystemOid:'',
        targetSystemId:'',
        sysIntParamVOs:[],
        sysIntHeaderVOs:[]
        dataFlowType: 'push',
        pushType: '1',
        sourceSystemName: '编码系统',
        sourceSystemOid: 'code00000001',
        sourceSystemId: 'CODE',
        targetSystemName: '',
        targetSystemOid: '',
        targetSystemId: '',
        sysIntParamVOs: [],
        sysIntHeaderVOs: []
      };
    },
    updateSave(row,index) {
    updateSave(row, index) {
      this.selectRow = row;
      this.editAttribute = row;
      this.editAttribute.sysIntParamVOs = row.sysIntParamVOs||[];
      this.editAttribute.sysIntHeaderVOs = row.sysIntHeaderVOs||[];
      this.editAttribute.sysIntParamVOs = row.sysIntParamVOs || [];
      this.editAttribute.sysIntHeaderVOs = row.sysIntHeaderVOs || [];
      this.$refs.infoForm.formData = this.editAttribute;
      this.$refs.infoForm.showSubmitDialog = true;
    },
    deleteSave(row,index) {
    deleteSave(row, index) {
      this.$confirm("删除数据将无法被恢复, 是否继续?", "提示", {
        iconClass: 'el-icon-question',
        confirmButtonText: "确定",
@@ -269,22 +320,22 @@
        });
      });
    },
    ENABLE(row,index){
    ENABLE(row, index) {
      //启用
      this.updateStatus(row,"enable");
      this.updateStatus(row, "enable");
    },
    DISABLE(row,index){
    DISABLE(row, index) {
      //停用
      this.updateStatus(row,"disable");
      this.updateStatus(row, "disable");
    },
    updateStatus(selectRow,able){
    updateStatus(selectRow, able) {
      var that = this;
      var paramTemp = {
        update:able,
        oid:selectRow.oid,
        ts:selectRow.ts
        update: able,
        oid: selectRow.oid,
        ts: selectRow.ts
      };
      this.$confirm("是否要"+(able == "enbale" ? "启用" : (able == "disable" ? "停用": "发布")) +"这条数据?", {
      this.$confirm("是否要" + (able == "enbale" ? "启用" : (able == "disable" ? "停用" : "发布")) + "这条数据?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
@@ -296,16 +347,16 @@
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message:(able == "enbale" ? "启用成功" : (able == "disable" ? "停用成功": "发布成功"))
            message: (able == "enbale" ? "启用成功" : (able == "disable" ? "停用成功" : "发布成功"))
          });
        });
    },
    PUSH(){
    PUSH() {
      if (this.selectionList.length != 1) {
        this.$message.warning('请选择数据')
        return false;
      }
      this.$confirm("是否要"+ (this.selectionList[0].pushType == "1" ? "推送数据" : "推送分类"), {
      this.$confirm("是否要" + (this.selectionList[0].pushType == "1" ? "推送数据" : "推送分类"), {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
@@ -325,9 +376,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;
      });
    },
@@ -337,64 +409,64 @@
      this.$refs.crud.toggleRowSelection(row); //选中当前行
    },
    /** 高级查询对话框组件,组件返回的值是condtionMap[field]形式的查询条件,保留了和之前一样的方式 */
    echoSeniorContionMap(conditionMaps){
      if(JSON.stringify(conditionMaps)!='{}'){
    echoSeniorContionMap(conditionMaps) {
      if (JSON.stringify(conditionMaps) != '{}') {
        this.query = conditionMaps;
        this.onLoad(this.page);
      }
    },
    openAdvancedQuery(){
        this.advancedQueryParam.options = [{
          data: this.pushTypeList,
          title: '推送类型',
          queryField: 'pushType',
          fieldType: 'combox',
          comboxKey: 'searchPushType'
        }, {
          title: '系统名称',
          queryField: 'sysBaseName',
          fieldType: 'text'
        }, {
          title: '系统编号',
          queryField: 'sysBaseId',
          fieldType: 'text'
        }, {
          title: '接口函数',
          queryField: 'interfaceFunction',
          fieldType: 'text'
        }, {
          title: '命名空间',
          queryField: 'nameSpace',
          fieldType: 'text'
        }, {
          title: 'soapAction',
          queryField: 'soapAction',
          fieldType: 'text'
        }, {
          title: '参数名称',
          queryField: 'targName',
          fieldType: 'text'
        }, {
          title: '调用方式',
          queryField: 'cxfaxis',
          fieldType: 'text'
        }, {
          title: '请求地址',
          queryField: 'requestUrl',
          fieldType: 'text'
        }, {
          title: '参数类型',
          queryField: 'paramType',
          fieldType: 'combox',
          comboxKey: 'searchparamType',
          data:this.paramTypeList
        }, {
          title: '返回值类型',
          queryField: 'returnType',
          fieldType: 'combox',
          comboxKey: 'searchreturnType',
          data:this.returnTypeList
        }]
    openAdvancedQuery() {
      this.advancedQueryParam.options = [{
        data: this.pushTypeList,
        title: '推送类型',
        queryField: 'pushType',
        fieldType: 'combox',
        comboxKey: 'searchPushType'
      }, {
        title: '系统名称',
        queryField: 'sysBaseName',
        fieldType: 'text'
      }, {
        title: '系统编号',
        queryField: 'sysBaseId',
        fieldType: 'text'
      }, {
        title: '接口函数',
        queryField: 'interfaceFunction',
        fieldType: 'text'
      }, {
        title: '命名空间',
        queryField: 'nameSpace',
        fieldType: 'text'
      }, {
        title: 'soapAction',
        queryField: 'soapAction',
        fieldType: 'text'
      }, {
        title: '参数名称',
        queryField: 'targName',
        fieldType: 'text'
      }, {
        title: '调用方式',
        queryField: 'cxfaxis',
        fieldType: 'text'
      }, {
        title: '请求地址',
        queryField: 'requestUrl',
        fieldType: 'text'
      }, {
        title: '参数类型',
        queryField: 'paramType',
        fieldType: 'combox',
        comboxKey: 'searchparamType',
        data: this.paramTypeList
      }, {
        title: '返回值类型',
        queryField: 'returnType',
        fieldType: 'combox',
        comboxKey: 'searchreturnType',
        data: this.returnTypeList
      }]
      this.advancedQueryParam.currentOpen = 'info';
      this.advancedQueryParam.advancedQuerySettingBox = true;
@@ -404,7 +476,7 @@
</script>
<style lang="scss">
.applyRangeTable>.el-card:nth-of-type(2)>.el-card__body>.avue-crud__menu {
.applyRangeTable > .el-card:nth-of-type(2) > .el-card__body > .avue-crud__menu {
  display: none !important;
}
</style>