田源
2025-03-05 d6f94d02fd033c1c0a68fe2d4e987eb233d2afb1
Source/UBCS-WEB/src/views/docking/loge.vue
@@ -1,91 +1,121 @@
<template>
  <!--系统集成的系统日志页面-->
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
    <avue-crud ref="crud"
               :data="data || getList"
               :option="option"
               :page.sync="page"
               :permission="permissionList"
               ref="crud"
               :table-loading="loading"
               @cell-dblclick="cellDbClick"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @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"></vci-docking-search>
               @refresh-change="refreshChange">
      <template slot="menuLeft" slot-scope="scope">
        <vci-docking-search ref="dockingSearch" :SearchObject="SearchObject" :formInline="formInline" :page="page"
                            :status="status" @getList="dockingGetList"></vci-docking-search>
      </template>
      <template slot="paramString" slot-scope="scope">
        <avue-text-ellipsis :height="50" :text="scope.row.paramString">
          <small slot="more">...</small>
        </avue-text-ellipsis>
      </template>
      <template slot="returnString" slot-scope="scope">
        <avue-text-ellipsis :height="50" :text="scope.row.returnString">
          <small slot="more">...</small>
        </avue-text-ellipsis>
      </template>
      <template slot="menu" slot-scope="scope">
        <el-button icon="el-icon-view" size="mini" type="text" @click="rowView(scope.row)">查看</el-button>
      </template>
    </avue-crud>
  </basic-container>
</template>
<script>
import {getList} from "@/api/docking/loge";
import {getLogoList, gridLogeDetail} from "@/api/docking/loge";
import {validatenull} from "@/util/validate";
import {mapGetters} from "vuex";
export default {
  name: "loge",
  data(){
  data() {
    return {
      value:'',
      status:{
        type:'loge',
        typeFlag:false,
        dateFlag:false,
        stateFlag:false,
      value: '',
      //各个类型状态
      status: {
        type: 'loge',
        typeFlag: false,
        dateFlag: false,
        stateFlag: false,
      },
      formInline:{
        type:'',
        cut:'',
        text:'',
        Date:'',
        state:''
      //model绑定
      formInline: {
        type: '',
        cut: '',
        text: '',
        Date: '',
        state: ''
      },
      SearchObject:{
        searchData:[
      //集成类型死数据
      SearchObject: {
        searchData: [
          {
            label:'数据编码',
            label: '数据编码',
            prop: "id",
            value:0
            value: 0
          },
          {
            label:'分类代号',
            label: '分类代号',
            prop: 'classifyId',
            value:1
            value: 1
          },
          {
            label:'分类名称',
            label: '分类名称',
            prop: 'classifyName',
            value:2
            value: 2
          },
          {
            label:'集成系统编号',
            label: '集成系统编号',
            prop: 'systemCode',
            value:3
            value: 3
          },
          {
            label:'集成系统名称',
            label: '集成系统名称',
            prop: 'systemName',
            value:4
            value: 4
          },
          {
            label:'类型',
            label: '类型',
            prop: 'typeText',
            value:5
            value: 5
          },
          {
            label:'记录时间',
            value:6,
            label: '记录时间',
            value: 6,
            prop: 'createTime',
          },
          {
            label:'是否成功',
            label: '是否成功',
            prop: 'interfaceStatus',
            value:7
            value: 7
          },
          {
            label: '接口参数',
            prop: 'paramString',
            value: 11
          },
          {
            label: '返回参数',
            prop: 'returnString',
            value: 12
          },
          {
            label: '返回msg',
            prop: 'msg',
            value: 13
          },
        ],
      },
@@ -97,78 +127,108 @@
        currentPage: 1,
        total: 0
      },
      data:[],
      data: [],
      option: {
        height:'auto',
        calcHeight: 0,
        height: 'auto',
        calcHeight: 20,
        menuWidth: 120,
        tip: false,
        searchShow: false,
        // searchMenuSpan: 12,
        border: true,
        index: true,
        viewBtn: true,
        indexFixed: false,
        selection: false,
        dialogClickModal: false,
        menu:false,
        menuFixed: 'right',
        dialogType: 'drawer',
        viewBtn: false,
        stripe: true,
        addBtn: false,
        editBtn: false,
        delBtn: false,
        column: [
          {
            label: "数据编码",
            prop: "id",
            sortable:true,
            width:130
            sortable: true,
            width: 130
          },
          {
            label: "图号",
            prop: "uniqueCode",
            hide:true,
            sortable:true,
            width:150
            hide: true,
            sortable: true,
            width: 150
          },
          {
            label: '分类代号',
            prop: 'classifyId',
            sortable:true,
            overHidden:true,
            sortable: true,
            overHidden: true,
            width: 150
          },
          {
            label: '分类名称',
            prop: 'classifyName',
            sortable:true,
            sortable: true,
            overHidden: true,
            width: 140
          },
          // {
          //   label: '标准申请',
          //   prop: 'applyCodeForBZ',
          //   sortable:true,
          //   width: 130
          // },
          // {
          //   label: '部门申请',
          //   prop: 'syncDataForOrg',
          //   sortable:true,
          //   width: 130
          // },
          // {
          //   label: '人员申请',
          //   prop: 'syncDataForPerson',
          //   sortable:true,
          //   width: 130
          // },
          {
            label: '集成系统编号',
            prop: 'systemCode',
            sortable:true,
            labelWidth: 150,
            sortable: true,
            width: 130
          },
          {
            label: '集成系统名称',
            prop: 'systemName',
            sortable:true,
            sortable: true,
            labelWidth: 150,
            width: 150
          },
          {
            label: '类型',
            prop: 'typeText',
            sortable:true,
            sortable: true,
            width: 150
          },
          {
            label:'接口参数',
            prop:'paramString',
            overHidden:true,
            sortable:true,
            width: 150
            label: '接口参数',
            prop: 'paramString',
            sortable: true,
            minRows: 20,
            type: "textarea",
            slot: true,
            hide: true,
          },
          {
            label:'返回参数',
            prop:'returnString',
            overHidden:true,
            sortable:true,
            width: 150
            label: '返回参数',
            prop: 'returnString',
            sortable: true,
            minRows: 20,
            type: "textarea",
            slot: true,
            hide: true,
          },
          {
            label: '返回msg',
@@ -178,33 +238,33 @@
          {
            label: '记录时间',
            prop: 'createTime',
            sortable:true,
            width: 160
            sortable: true,
          },
          {
            label: '是否成功',
            prop: 'interfaceStatus',
            sortable:true,
            sortable: true,
            width: 120,
            html:true,
            align:'center',
            type:'select',
            searchLabelWidth:130,
            dicData: [{key:'true',value:'是'},{key:'false',value:'否'}],
            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>'
            formatter: function (row, column) {
              return row.interfaceStatus == 'true' || row.interfaceStatus == '' ? '<i class="el-icon-check" style="color: #32cd32;font-size: 20px;font-weight: 800"></i>' : '<i class="el-icon-close" style="color: #ff0000;font-size: 20px;font-weight: 800"></i>'
            }
          },
        ]
      }
    }
  },
  computed:{
    ...mapGetters([ "permission"]),
  computed: {
    ...mapGetters(["permission"]),
    permissionList() {
      return {
        addBtn: false,
@@ -214,7 +274,26 @@
      };
    }
  },
  created() {
    this.onLoad(this.page);
  },
  methods: {
    rowView(row) {
      this.loading = true;
      gridLogeDetail({oid: row.oid}).then(res => {
        console.log(res)
        if (res.data.data) {
          this.loading = false
          this.$refs.crud.rowView(res.data.data)
        }
      })
    },
    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) {
@@ -247,28 +326,37 @@
    },
    currentChange(currentPage) {
      this.page.currentPage = currentPage;
      this.$refs.dockingSearch.SaveSearchHandler();
    },
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
      this.$refs.dockingSearch.SaveSearchHandler();
    },
    refreshChange() {
      this.onLoad(this.page);
      const page = {
        pageSize: 20,
        currentPage: 1,
        total: 0
      };
      this.page = page;
      this.formInline = { type: '', cut: '', text: '',Date: '', state: ''}
      this.onLoad(page);
    },
    onLoad(page, params={}) {
    onLoad(page, params = {}) {
      this.loading = true;
      var query={}
      var queryCondition = {}
      if (this.query) {
        for (var key in this.query) {
          query['conditionMap["' + key + '"]'] = this.query[key];
          queryCondition['conditionMap["' + key + '"]'] = this.query[key];
        }
      }
      getList(page.currentPage, page.pageSize, Object.assign(params,this.params, query,this.query)).then(res => {
      getLogoList(page.currentPage, page.pageSize, 'createTime', 'desc', Object.assign(params, this.params, queryCondition, this.query),).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        this.loading = false;
        this.selectionClear();
      }).catch(error=>{
      }).catch(error => {
        this.$message.error(error);
        this.loading = false;
      });
@@ -278,6 +366,21 @@
}
</script>
<style scoped>
<style lang="scss" scoped>
// 滚动条样式修改
// 滚动条的宽度
/deep/ .el-table__body-wrapper::-webkit-scrollbar {
  height: 15px; // 纵向滚动条 必写
  background: white;
  border: white;
  width: 10px;
}
// 滚动条的滑块
/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
  background-color: #ececec;
  border-radius: 20px;
  border: #ececec;
}
</style>