InfoList.vue
3.13 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<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>
<InfoEditRecord
style="display: inline-block"
:systemId="scope.row.Id"
>
<el-button type="success" size="small">查看记录</el-button>
</InfoEditRecord>
</template>
</el-table-column>
</el-table>
</template>
</div>
</div>
</div>
</template>
<script>
import { getInfoList } from "@/api/baseData/info";
export default {
name: "InfoList",
data() {
return {
loading: true,
listquery: {
keyword: this.$route.query.keyword,
pageIndex: 1,
pageSize: 10,
sort: "desc",
sidx: "",
},
total: 0,
infoDataList: [],
};
},
created() {
// this.initList();
},
mounted() {
},
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,
};
list.push(obj);
});
this.infoDataList = list;
this.total = data.totalCount;
this.loading = false;
});
},
},
};
</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>