田源
2023-09-15 80ef464bf93212805d6b36f12b7791edda04e23e
Source/UBCS-WEB/src/views/docking/loge.vue
@@ -3,10 +3,11 @@
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :data="data || getList"
               :page.sync="page"
               :permission="permissionList"
               ref="crud"
               @cell-dblclick="cellDbClick"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
@@ -14,6 +15,9 @@
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot-scope="scope" slot="menuLeft">
        <vci-docking-search :SearchObject="SearchObject" :page="page" :formInline="formInline" :status="status" @getList="dockingGetList"></vci-docking-search>
      </template>
    </avue-crud>
  </basic-container>
</template>
@@ -27,6 +31,67 @@
  name: "loge",
  data(){
    return {
      value:'',
      //各个类型状态
      status:{
        type:'loge',
        typeFlag:false,
        dateFlag:false,
        stateFlag:false,
      },
      //model绑定
      formInline:{
        type:'',
        cut:'',
        text:'',
        Date:'',
        state:''
      },
      //集成类型死数据
      SearchObject:{
        searchData:[
          {
            label:'数据编码',
            prop: "id",
            value:0
          },
          {
            label:'分类代号',
            prop: 'classifyId',
            value:1
          },
          {
            label:'分类名称',
            prop: 'classifyName',
            value:2
          },
          {
            label:'集成系统编号',
            prop: 'systemCode',
            value:3
          },
          {
            label:'集成系统名称',
            prop: 'systemName',
            value:4
          },
          {
            label:'类型',
            prop: 'typeText',
            value:5
          },
          {
            label:'记录时间',
            value:6,
            prop: 'createTime',
          },
          {
            label:'是否成功',
            prop: 'interfaceStatus',
            value:7
          },
        ],
      },
      loading: false,
      query: {},
      selectionList: [],
@@ -37,10 +102,11 @@
      },
      data:[],
      option: {
        calcHeight: 30,
        height:'auto',
        calcHeight: 0,
        tip: false,
        searchShow: false,
        searchMenuSpan: 6,
        // searchMenuSpan: 12,
        border: true,
        index: true,
        viewBtn: true,
@@ -51,62 +117,61 @@
          {
            label: "数据编码",
            prop: "id",
            search: true,
            sortable:true,
            width:150
            width:130
          },
          {
            label: "图号",
            prop: "uniquecode",
            search: true,
            prop: "uniqueCode",
            hide:true,
            sortable:true,
            width:150
          },
          {
            label: '分类id',
            prop: 'classifyid',
            search: true,
            label: '分类代号',
            prop: 'classifyId',
            sortable:true,
            width: 250
            overHidden:true,
            width: 150
          },
          {
            label: '分类名称',
            prop: 'classifyname',
            search: true,
            prop: 'classifyName',
            sortable:true,
            overHidden: true
            overHidden: true,
            width: 140
          },
          {
            label: '系统编号',
            prop: 'systemcode',
            search: true,
            label: '集成系统编号',
            prop: 'systemCode',
            sortable:true,
            width: 130
          },
          {
            label: '集成系统名称',
            prop: 'systemName',
            sortable:true,
            width: 150
          },
          {
            label: '系统名称',
            prop: 'systemname',
            search: true,
            label: '类型',
            prop: 'typeText',
            sortable:true,
            width: 150
          },
          {
            label: '是否推送成功',
            prop: 'interfacestatus',
            search: true,
            label:'接口参数',
            prop:'paramString',
            overHidden:true,
            sortable:true,
            width: 120,
            html:true,
            align:'center',
            type:'select',
            dicData: [{key:'true',value:'是'},{key:'false',value:'否'}],
            props: {
              label: "value",
              value: "key"
            },
            formatter : function (row, column) {
              return row.interfacestatus == 'true' || row.interfacestatus == '1' ? '<i class="el-icon-check"></i>' : '<i class="el-icon-close"></i>'
            }
            width: 150
          },
          {
            label:'返回参数',
            prop:'returnString',
            overHidden:true,
            sortable:true,
            width: 150
          },
          {
            label: '返回msg',
@@ -118,7 +183,25 @@
            prop: 'createTime',
            sortable:true,
            width: 160
          }
          },
          {
            label: '是否成功',
            prop: 'interfaceStatus',
            sortable:true,
            width: 120,
            html:true,
            align:'center',
            type:'select',
            searchLabelWidth:130,
            dicData: [{key:'true',value:'是'},{key:'false',value:'否'}],
            props: {
              label: "value",
              value: "key"
            },
            formatter : function (row, column) {
              return row.interfaceStatus == 'true' || row.interfaceStatus == '' ? '<i class="el-icon-check" style="color: limegreen;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: red;font-size: 20px;font-weight: 800"></i>'
            }
          },
        ]
      }
    }
@@ -135,6 +218,25 @@
    }
  },
  methods: {
    dockingGetList(val){
      this.data=val.records;
      this.page.pageSize=val.size;
      this.page.currentPage=val.current;
      this.page.total=val.total;
    },
    async cellDbClick(row, column, cell, event) {
      for (const key in row) {
        if (key === column.property) {
          this.value = row[key];
        }
      }
      try {
        await this.$copyText(this.value);
        this.$message.success('复制成功');
      } catch (error) {
        this.$message.warning('复制失败');
      }
    },
    searchReset() {
      this.query = {};
      this.onLoad(this.page);