1
Surpriseplus
2022-09-16 8d1a91c23df335b090e38b2edd15203aa3b03da9
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
<template>
  <div class="sunshine">
    <div class="title">
      <span>阳关三农</span>
      <img src="../../../assets/img/zonlan (9).png" alt="" />
    </div>
    <div class="content">
      <div class="top">
        <ul>
          <li v-for="item in listData">
            <p class="title">{{ item.name }}</p>
            <p class="msg">
              本年度:{{ item.total }}&emsp;累计:{{ item.thisyear }}
            </p>
          </li>
        </ul>
      </div>
      <div class="bottom">
        <ul>
          <li v-for="item in listbottom">
            <p class="title">{{ item.name }}</p>
            <p class="msg">
              本年度:{{ item.total }}&emsp;&emsp;累计:{{ item.thisyear }}
            </p>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      listData: [],
      listbottom: [],
    };
  },
  //方法集合
  created() {},
  mounted() {
    this.drawline();
  },
  methods: {
    async drawline() {
      var value1 = [];
      var value2 = [];
      const { data: dt } = await this.$http.get(
        "/jeecg-boot/agriculture/agriculture/queryall"
      );
      var valueData = dt.result;
      for (var i in valueData) {
        if (
          valueData[i].name == "补贴项目" ||
          valueData[i].name == "发放人次" ||
          valueData[i].name == "发放金额"
        ) {
          value1.push(valueData[i]);
        } else {
          value2.push(valueData[i]);
        }
      }
      this.listData = value1;
      this.listbottom = value2;
    },
  },
};
</script>
<style lang="less" scoped>
//@import url(); 引入公共css类
.sunshine {
  //   height: 30%;
  overflow: hidden;
  padding: 50px;
  margin-top: 30px;
  box-sizing: border-box;
  background: rgba(8, 32, 58, 0.7);
  .title {
    width: 100%;
    position: relative;
    img {
      width: 100%;
    }
    span {
      font-size: 78px;
      font-weight: 400;
      color: #ffe86b;
      background: linear-gradient(0deg, #bce7ff 0%, #69efff 98.6572265625%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      position: absolute;
      left: 50%;
      top: 0;
      transform: translateX(-50%);
    }
  }
  .content {
    padding-top: 100px;
    .top {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      li {
        float: left;
        list-style: none;
        margin-right: 10px;
        min-width: 400px;
        min-height: 139px;
        background: rgba(0, 186, 255, 0.26);
        text-align: center;
        padding: 18px 0;
        .title {
          font-size: 42px;
          font-weight: bold;
          color: #ffffff;
          text-align: center;
          padding-bottom: 26px;
        }
        .msg {
          font-size: 20px;
          font-weight: 400;
          color: #ffffff;
          text-align: center;
        }
      }
      .list {
        width: 561px;
        height: 139px;
        background: rgba(0, 186, 255, 0.26);
        padding: 18px 0;
        .title {
          font-size: 30px;
          font-weight: bold;
          color: #ffffff;
          text-align: center;
          padding-bottom: 26px;
        }
        .msg {
          font-size: 15px;
          font-weight: 400;
          color: #ffffff;
          text-align: center;
        }
      }
      // .list:nth-child(3) {
      //   width: 989px;
      // }
    }
    .bottom {
      padding-top: 55px;
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      li {
        float: left;
        list-style: none;
        margin-right: 10px;
        min-width: 450px;
        min-height: 139px;
        text-align: center;
        background: rgba(255, 124, 0, 0.26);
        padding: 18px 0;
        .title {
          font-size: 42px;
          font-weight: bold;
          color: #ffffff;
          text-align: center;
          padding-bottom: 26px;
        }
        .msg {
          font-size: 20px;
          font-weight: 400;
          color: #ffffff;
          text-align: center;
        }
      }
      .list {
        width: 520px;
        height: 139px;
        background: rgba(255, 124, 0, 0.26);
        padding: 18px 0;
        .title {
          font-size: 42px;
          font-weight: bold;
          color: #ffffff;
          text-align: center;
          padding-bottom: 26px;
        }
        .msg {
          font-size: 20px;
          font-weight: 400;
          color: #ffffff;
          text-align: center;
        }
      }
    }
  }
}
@media only screen and (max-width: 2560px) {
  .sunshine {
    height: auto;
    overflow: visible;
    background: transparent;
    .content {
      .top {
        li {
          float: left;
          list-style: none;
        }
        // .list {
        //   width: calc(561px * 2);
        //   height: calc(139px * 3);
 
        //   .title {
        //     padding-bottom: calc(26px * 2);
        //   }
        // }
        // .list:nth-child(3) {
        //   width: calc(989px * 2);
        // }
      }
      .bottom {
        .list {
          width: calc(520px * 2);
          height: calc(139px * 3);
 
          .title {
            padding-bottom: calc(26px * 2);
          }
        }
      }
    }
  }
}
</style>