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
| <template>
| <div class="form-container">
| <el-scrollbar class="left-title" style="height: 100%">
| <h4>数据列表</h4>
| <ul>
| <li
| @click="loadById(item)"
| v-for="(item, index) in leftTitles"
| :key="index"
| :class="{ active: item.formId == formId }"
| >
| {{ item.title }}
| </li>
| </ul>
| </el-scrollbar>
|
| <div class="f-table">
| <FormCollectionObject ref="table"></FormCollectionObject>
| </div>
| </div>
| </template>
|
| <script>
| import FormCollectionObject from "../system/form/FormCollectionObject.vue";
| export default {
| components: {
| FormCollectionObject,
| },
| data() {
| return {
| formId: "",
| leftTitles: [],
| };
| },
| methods: {
| loadById(item) {
| this.formId = item.formId;
| this.$refs.table.$refs.grid.loadById(item);
| },
| },
| created() {
| this.http
| .get("api/formDesignOptions/getList", {}, true)
| .then((x) => {
| this.leftTitles = x;
| if (x.length) {
| this.$nextTick(() => {
| this.loadById(x[0]);
| });
| }
| });
| },
| };
| </script>
|
| <style lang="less" scoped>
| .form-container {
| padding: 8px;
| background: #eee;
| position: absolute;
| top: 0;
| bottom: 0;
| left: 0;
| right: 0;
| display: flex;
| .left-title {
| background: #ffff;
| width: 220px;
| border-right: 9px solid #eeee;
| h4 {
| padding: 9px 10px;
| border-bottom: 1px solid #eee;
| }
| ul{
| padding: 0;
| margin: 0;
| }
| li {
| font-size: 14px;
| cursor: pointer;
| list-style: none;
| padding: 10px 12px;
| border-bottom: 1px solid #f3f3f3;
| }
| li:hover,
| .active {
| background: #ecf5ff;
| }
| }
| > .f-table {
| width: 0;
| flex: 1;
| }
| }
| </style>
|
|