管道基础大数据平台系统开发-【前端】-新系統界面
wulitaotao
2023-02-27 f6769a1af13e187541eed4326e69916f9a7dee01
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
<template>
  <div class="data-storage">
    <div class="data-storage__header">
      <div class="text">
        <img class="img" src="@/assets/img/Screen/cunchu.png" alt="" srcset="" />
        <div class="title">共存储文件数量</div>
      </div>
      <div class="num">
        <dv-digital-flop :config="config1" style="width: 70px; height: 20px" />
        <!-- <div class="value">5</div> -->
      </div>
    </div>
    <div class="data-storage__content">
      <ul class="contentTitle">
        <li class="title">编号</li>
        <li class="name">名称</li>
        <li class="num">文件数</li>
      </ul>
      <div class="scroolData">
        <vue-seamless-scroll :data="tableData" class="ClassScroll" :class-option="defaultOption">
 
<ul class="item">
  <li v-for="(item, index) in tableData" :key="index">
    <span class="title">
      <div>{{ item.index }}</div></span>
    <span class="name"  :title="item.name">{{ item.name.substring(0, 15) }}</span>
    <span class="num">{{ item.num }}</span>
  </li>
</ul>
</vue-seamless-scroll>
      </div>
      
    </div>
  </div>
 
  <!-- <dv-scroll-board :config="config" style="width: 330px; height: 220px" /> -->
  <!-- <el-scrollbar class="scrollbar">
        <el-table
          :data="tableData"
          :row-style="{ background: 'rgba(135,180,248,0.10)' }"
          :cell-style="{ background: 'rgba(135,180,248,0.10)' }"
          :header-row-style="{
            background: 'rgba(57,128,236,0.29)',
            color: '#fff',
          }"
          :header-cell-style="{
            background: 'rgba(57,128,236,0.29)',
            color: '#fff',
          }"
        >
          <el-table-column prop="index" label="编号" width="50">
            <template slot-scope="scope">
              <div
                style="
                  background: rgba(180, 188, 235, 0.25);
                  text-align: center;
                "
              >
                {{ scope.row.index }}
              </div>
            </template>
          </el-table-column>
          <el-table-column align="center" prop="name" label="名称">
            <template slot-scope="scope">
              <div
                style="
                  overflow: hidden;
                  text-overflow: ellipsis;
                  white-space: nowrap;
                "
                :title="scope.row.name"
              >
                {{ scope.row.name }}
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="num" label="文件数" width="70">
          </el-table-column>
        </el-table>
      </el-scrollbar> -->
</template>
 
<script>
import vueSeamlessScroll from 'vue-seamless-scroll'
import { countDataStorage } from "@/api/screen.js"
export default {
  components: {
    vueSeamlessScroll
  },
  data() {
    return {
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 号",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
      config: {
        header: ["编号", "名称", "文件数"],
        data: [
          ["行1列1", "行1列2", "行1列3"],
          ["行2列1", "行2列2", "行2列3"],
          ["行3列1", "行3列2", "行3列3"],
          ["行4列1", "行4列2", "行4列3"],
          ["行5列1", "行5列2", "行5列3"],
          ["行6列1", "行6列2", "行6列3"],
          ["行7列1", "行7列2", "行7列3"],
          ["行8列1", "行8列2", "行8列3"],
          ["行9列1", "行9列2", "行9列3"],
          ["行10列1", "行10列2", "行10列3"],
        ],
        columnWidth: [40, 300, 50],
        align: ["center"],
        carousel: "page",
      },
      config1: {
        number: [0],
        content: "{nt}个",
        style: {
          fontSize: 12,
          fill: "#00baff",
        },
      },
    }
  },
  computed: {
    defaultOption() {
      return {
        step: 0.2, // 数值越大速度滚动越快
        limitMoveNum: this.tableData.length, // 开始无缝滚动的数据量 this.dataList.length
        hoverStop: true, // 是否开启鼠标悬停stop
        direction: 1, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        singleWidth: 0, // 单步运动停止的宽度(默认值0是无缝不停止的滚动) direction => 2/3
        waitTime: 1000, // 单步运动停止的时间(默认值1000ms)
      };
    },
  },
 
 
  created() {
    this.initTable()
  },
  methods: {
    async initTable() {
      const res = await countDataStorage()
      if (res.code == 200) {
        let count = 0
        this.tableData = res.result.map((item, i) => {
          count += item.文件数
          return {
            index: i + 1,
            name: item.名称,
            num: item.文件数,
          }
        })
        this.config1.number = [count]
        this.config1 = {
          ...this.config1,
        }
      }
    },
  },
}
</script>
 
<style lang="scss" scoped>
.data-storage {
 
  height: calc(100% - 30px);
  width: 100%;
}
 
.data-storage__header {
  height: 40px;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
 
  .text {
    display: flex;
    align-items: center;
  }
 
  .title {
    font-family: Source Han Sans CN, Source Han Sans CN-Regular;
    color: #ffffff;
  }
 
  .img {
    margin-right: 4px;
    width: 16px;
    height: 16px;
  }
 
  .num {
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
}
 
.data-storage__content {
  height: calc(100% - 40px);
  width: 100%;
 
  .contentTitle {
    height: 40px;
    width: 100%;
    display: flex;
    background-color: rgba(52,78,147,.5);
    flex-direction: row;
   
 
    li {
 
      align-items: center;
      justify-content: space-around;
      color: #FFFFFF;
    }
 
    .title {
      width: 15%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
 
    .name {
      width: 60%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
 
    .num {
      width: 25%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
    }
 
 
  }
 
 
}
 
.scroolData{
  height: calc(100% - 40px);
  width: 100%;
  overflow: hidden;
}
.ClassScroll {
  height:100%;
  width: 100%;
 
 
 
  .item {
    width: 100%;
    height: 100%;
    color: #ffffff;
 
    li {
      height: 40px;
      width: 100%;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-around;
 
      .title {
        width: 15%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
 
        div {
          height: 20px;
          width: 20px;
          background-color: #495477;
          display: flex;
          align-items: center;
          justify-content: center;
        }
      }
 
      .name {
        width: 60%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
      }
 
      .num {
        width: 25%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
      }
 
    }
 
  }
 
}
 
// .data-storage {
//   margin: 10px;
//   width: 377px;
 
//   &__header {
//     margin-bottom: 10px;
//     display: flex;
//     align-items: center;
//     justify-content: space-between;
//     height: 20px;
//     width: 340px;
//     box-sizing: border-box;
 
//     .text {
//       display: flex;
//       align-items: center;
//     }
 
//     .title {
//       font-family: Source Han Sans CN, Source Han Sans CN-Regular;
//       color: #ffffff;
//     }
 
//     .img {
//       margin-right: 4px;
 
//       width: 16px;
//       height: 16px;
//     }
 
//     .value {
//       text-align: center;
//       color: #ffffff;
//       width: 16px;
//       height: 20px;
//       background: url("~@/assets/img/Screen/numBg.png");
//       background-size: 100% 100%;
//     }
//   }
 
//   &__content {
//     width: 95%;
//     height: 220px;
//   }
// }
// </style>
 
<style lang="scss">
// .data-storage {
//   .index-wrap {
//     margin: 0 auto;
//     width: 14px;
//     height: 14px;
//     background: rgba(180, 188, 235, 0.25);
//   }
 
//   .scrollbar {
//     width: 100%;
//     overflow-x: hidden;
//     height: 200px;
 
//     .el-scrollbar__wrap {
//       overflow-x: hidden;
//     }
 
//     .el-table {
//       height: 100%;
//       width: 100%;
//       background-color: transparent;
//       color: #fff;
//     }
 
//     .el-table th.el-table__cell.is-leaf,
//     .el-table td.el-table__cell {
//       border: none;
//     }
 
//     .el-table--group::after,
//     .el-table--border::after,
//     .el-table::before {
//       border: none;
//     }
 
//     .el-table::before {
//       height: 0;
//     }
//   }
// }</style>