Blame view

src/views/systemPage/InfoList.vue 3.13 KB
9b7e125f   monkeyhouyi   属地页面
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  <template>
    <div class="infoList">
      <div class="item-box info-box">
        <div class="item-title">系统信息列表</div>
        <div class="item-body">
          <template>
            <el-table
              :data="infoDataList"
              style="width: 100%"
              stripe
              v-loading="loading"
            >
              <el-table-column
                type="index"
                width="50"
                label="序号"
              ></el-table-column>
              <el-table-column
                prop="CompanyName"
                label="主体企业"
                show-overflow-tooltip
              />
              <el-table-column
                prop="SystemName"
                label="系统名称"
                show-overflow-tooltip
              />
              <el-table-column
                prop="ContactUser"
                label="联系人"
                show-overflow-tooltip
              />
              <el-table-column
                prop="ContactPhone"
                label="联系电话"
                show-overflow-tooltip
              />
              <el-table-column label="操作">
                <template scope="scope">
                  <infoForm
                    style="display: inline-block; margin-right: 5px"
                    type="edit"
                    :systemId="scope.row.Id"
                  >
                    <el-button type="primary" size="small">修改</el-button>
                  </infoForm>
0e2463be   monkeyhouyi   系统修改记录
47
48
49
50
51
52
                  <InfoEditRecord
                    style="display: inline-block"
                    :systemId="scope.row.Id"
                  >
                    <el-button type="success" size="small">查看记录</el-button>
                  </InfoEditRecord>
9b7e125f   monkeyhouyi   属地页面
53
54
55
56
57
58
59
60
61
62
                </template>
              </el-table-column>
            </el-table>
          </template>
        </div>
      </div>
    </div>
  </template>
  
  <script>
0af91599   monkeyhouyi   弹框请求优化
63
  import { getInfoList } from "@/api/baseData/info";
9b7e125f   monkeyhouyi   属地页面
64
65
66
67
68
69
70
71
72
  export default {
    name: "InfoList",
    data() {
      return {
        loading: true,
        listquery: {
          keyword: this.$route.query.keyword,
          pageIndex: 1,
          pageSize: 10,
0af91599   monkeyhouyi   弹框请求优化
73
74
          sort: "desc",
          sidx: "",
9b7e125f   monkeyhouyi   属地页面
75
76
77
78
79
80
        },
        total: 0,
        infoDataList: [],
      };
    },
    created() {
0af91599   monkeyhouyi   弹框请求优化
81
      // this.initList();
9b7e125f   monkeyhouyi   属地页面
82
83
    },
    mounted() {
9b7e125f   monkeyhouyi   属地页面
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
    },
    watch: {
      $route: {
        handler: function (route) {
          this.listquery.keyword = route.query.keyword;
          this.initList();
        },
        immediate: true,
      },
    },
    methods: {
      initList() {
        getInfoList(this.listquery).then(({ data }) => {
          let list = [];
          data.list.forEach((v) => {
            let obj = {
              CompanyName: v.compayInfo.CompanyName,
              SystemName: v.SysytemInfo.SystemName,
              ContactUser: v.compayInfo.ContactUser,
              ContactPhone: v.compayInfo.ContactPhone,
              Id: v.SysytemInfo.Id,
            };
9b7e125f   monkeyhouyi   属地页面
106
107
108
109
110
111
112
            list.push(obj);
          });
          this.infoDataList = list;
          this.total = data.totalCount;
          this.loading = false;
        });
      },
9b7e125f   monkeyhouyi   属地页面
113
114
115
116
117
118
119
120
121
122
123
124
    },
  };
  </script>
  <style scoped lang="scss">
  .item-box.info-box {
    height: 70vh;
    :deep(.el-table__body-wrapper.is-scrolling-none) {
      height: calc(100% - 47px);
      overflow-y: scroll;
    }
  }
  </style>