bannerTwo.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <template>
  2. <div class="banner-wrap banner-two">
  3. <div class="title-wrap">
  4. <div class="title">遥感环境评估</div>
  5. <div class="score">
  6. <span>有味指数</span>
  7. <up-rate :count="5" size="13" readonly :allowHalf="true" active-color="#FF8400" gutter="1" v-model="envScore"></up-rate>
  8. <!-- <rate v-model="envScore" readonly allow-half :size="12" color="#FF8400" /> -->
  9. </div>
  10. </div>
  11. <div class="chart-wrap">
  12. <view class="chart-bg">
  13. </view>
  14. <!-- <radar-chart class="radar-wrap" :pieData="boxList"></radar-chart> -->
  15. <view class="charts-box">
  16. <qiun-data-charts type="radar" :opts="opts" :chartData="chartData" />
  17. </view>
  18. <div class="radar-list">
  19. <div class="radar-item" :class="{ active: active === index }" :style="item.style"
  20. v-for="(item, index) in boxList" :key="index" @click="handleActive(index)">
  21. <span>{{ item.name }}</span>
  22. <up-rate :count="5" readonly size="12" :allowHalf="true" :active-color="active === index ? '#000' : '#fff'"
  23. v-model="item.score"></up-rate>
  24. <!-- <rate
  25. v-model="item.score"
  26. readonly
  27. allow-half
  28. :size="12"
  29. :color="active === index ? '#000' : '#fff'"
  30. /> -->
  31. </div>
  32. </div>
  33. <div class="legend">
  34. <div class="legend-item">
  35. <div class="line"></div>
  36. <span>当前果园</span>
  37. </div>
  38. <div class="legend-item">
  39. <div class="line white"></div>
  40. <span>平均值</span>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="box-wrap" v-if="boxList.length">
  45. <div class="box-header">
  46. <div class="name">
  47. <div>天选生态好果</div>
  48. <span>{{ boxList[active].title }}</span>
  49. </div>
  50. <!-- <el-divider class="divider" direction="vertical" /> -->
  51. <div class="rate">
  52. <up-rate :count="5" readonly size="12" :allowHalf="true" active-color="#FFCF66"
  53. v-model="boxList[active].score"></up-rate>
  54. <!-- <rate v-model="boxList[active].score" readonly allow-half :size="18" color="#FFCF66" /> -->
  55. </div>
  56. </div>
  57. <div class="text">
  58. {{ boxList[active].text }}
  59. </div>
  60. <div class="btn" @click="handleShow">查看评分方法</div>
  61. </div>
  62. </div>
  63. </template>
  64. <script setup>
  65. import {
  66. ref,
  67. watch
  68. } from "vue";
  69. const envScore = ref(4.5)
  70. const boxList = ref([{
  71. "name": "生境",
  72. "score": 4.6,
  73. "scoreAvg": 4.1,
  74. "text": "果园周边林地覆盖率超过65%,依托从化优越的生态屏障,森林环抱,山水相依。林地能调温、锁湿、防风,附近还有水田水塘维持空气湿润,适宜益虫繁衍,减少农药用量,果实干净饱满。靠近流溪河与森林公园,微气候温和,挂果稳定,果味清甜中带有山林的自然清香。",
  75. "title": "生态优美,糖高质佳",
  76. "style": {
  77. "top": "-2px",
  78. "left": "calc(50% - 112px / 2)"
  79. }
  80. },
  81. {
  82. "name": "地理区位",
  83. "score": 5,
  84. "scoreAvg": 4,
  85. "text": "果园位于丘陵地带,地形南北通透,北靠天堂顶山脉可挡寒风,南向开阔利于湿润气流进入,东高西低,自然排湿。气流顺畅、湿度适中,病虫害更少,果树少受极端天气干扰,果子风味纯净、口感更清透,是“天生好地”。",
  86. "title": "风水优良,病少质高",
  87. "style": {
  88. "top": "50px",
  89. "right": "8px"
  90. }
  91. },
  92. {
  93. "name": "光照",
  94. "score": 4.4,
  95. "scoreAvg": 3.7,
  96. "text": "从化地处亚热带,日照时间充足,果园位于缓坡地带,朝向合理、采光均匀,年有效日照达1760小时以上。果树晒得足,糖分积累稳定,不仅甜度更均衡,还能让果形饱满、果皮颜色亮丽,卖相和口感都更上一层",
  97. "title": "光足糖稳,果甜爽脆",
  98. "style": {
  99. "top": "172px",
  100. "right": "30px"
  101. }
  102. },
  103. {
  104. "name": "土壤",
  105. "score": 5,
  106. "scoreAvg": 4.2,
  107. "text": "果园以砖红壤为主,富含铁铝、结构稳定,保水保肥能力强。结合从化常年湿润的气候与有机肥培育,形成良好的微生物环境。土壤既能养根,也能稳稳供应果树一季所需,确保关键生长期营养不断,果实香气浓、甜度深,有层次。",
  108. "title": "壤厚养足,香甜有底",
  109. "style": {
  110. "top": "172px",
  111. "left": "30px"
  112. }
  113. },
  114. {
  115. "name": "水源",
  116. "score": 4,
  117. "scoreAvg": 3.9,
  118. "text": "果园临近天然水系如流溪河及温泉支流,水质清澈、重金属与氨氮含量低,生态系统稳定。这样的好水养土更养树,根系发达、吸收均匀,果树更强健,果实清甜回甘,吃得安心又放心。",
  119. "title": "水源纯净,甜润鲜明低",
  120. "style": {
  121. "top": "50px",
  122. "left": "8px"
  123. }
  124. }
  125. ]);
  126. const active = ref(0);
  127. const handleActive = (index) => {
  128. active.value = index;
  129. };
  130. const radarList = ref([{
  131. name: "生境",
  132. style: {
  133. top: "-2px",
  134. left: "calc(50% - 112px / 2)",
  135. },
  136. },
  137. {
  138. name: "光照",
  139. style: {
  140. top: "50px",
  141. right: "8px",
  142. },
  143. },
  144. {
  145. name: "水源",
  146. style: {
  147. top: "172px",
  148. right: "30px",
  149. },
  150. },
  151. {
  152. name: "土壤",
  153. style: {
  154. top: "172px",
  155. left: "30px",
  156. },
  157. },
  158. {
  159. name: "风水",
  160. style: {
  161. top: "50px",
  162. left: "8px",
  163. },
  164. },
  165. ]);
  166. const handleShow = () => {};
  167. const chartData = {
  168. categories: ["维度1", "维度2", "维度3", "维度4", "维度5"],
  169. series: [{
  170. name: "成交量1",
  171. data: [4, 5,4.4, 5, 4.6]
  172. },
  173. {
  174. name: "成交量2",
  175. data: [3.9, 4.2, 3.7, 4, 4.1]
  176. }
  177. ]
  178. }
  179. const opts = {
  180. color: ["#FFCF66", "#FFFFFF"],
  181. padding: [0, 5, 5, 5],
  182. dataLabel: false,
  183. enableScroll: false,
  184. legend: {
  185. show: false,
  186. },
  187. extra: {
  188. radar: {
  189. gridType: "radar",
  190. gridColor: "#afbdc6",
  191. gridCount: 3,
  192. opacity: 0.2,
  193. max: 5,
  194. labelShow: false,
  195. border: true
  196. }
  197. }
  198. }
  199. </script>
  200. <style lang="scss" scoped>
  201. .banner-wrap {
  202. width: 100%;
  203. height: 100%;
  204. background-size: 100% 100%;
  205. background-repeat: no-repeat;
  206. background-position: center center;
  207. .title {
  208. font-size: 36px;
  209. letter-spacing: 4px;
  210. font-family: "jiangxizhuokai";
  211. }
  212. .charts-box {
  213. width: 327px;
  214. height: 228px;
  215. position: relative;
  216. z-index: 3;
  217. }
  218. &.banner-two {
  219. background-image: url("https://birdseye-img.sysuimars.com/youwei-uniapp/home/report-banner-2.png");
  220. padding: 60px 14px;
  221. box-sizing: border-box;
  222. .score {
  223. color: #ff8400;
  224. font-size: 15px;
  225. font-family: "jiangxizhuokai";
  226. background: rgba(255, 255, 255, 0.4);
  227. border: 1px solid rgba(255, 255, 255, 0.55);
  228. border-radius: 5px;
  229. padding: 8px 16px;
  230. width: fit-content;
  231. box-sizing: border-box;
  232. margin: 12px 0 32px 0;
  233. display: flex;
  234. align-items: center;
  235. span {
  236. margin-right: 6px;
  237. }
  238. }
  239. .chart-wrap {
  240. width: 100%;
  241. position: relative;
  242. ::v-deep {
  243. .van-rate__icon {
  244. color: inherit;
  245. }
  246. }
  247. .chart-bg {
  248. position: absolute;
  249. z-index: 2;
  250. top: 10px;
  251. left: 50%;
  252. transform: translateX(-50%);
  253. background: rgba(0, 0, 0, 0.2);
  254. width: 208px;
  255. height: 208px;
  256. border-radius: 50%;
  257. }
  258. .radar-wrap {
  259. width: 100%;
  260. height: 220px;
  261. }
  262. .radar-list {
  263. .radar-item {
  264. position: absolute;
  265. z-index: 3;
  266. top: 0;
  267. padding: 5px 8px;
  268. background: rgba(0, 0, 0, 0.3);
  269. border-radius: 20px;
  270. font-size: 13px;
  271. font-family: "jiangxizhuokai";
  272. display: flex;
  273. align-items: center;
  274. border: 1px solid transparent;
  275. &.active {
  276. background: #ffcf66;
  277. border: 1px solid #fff;
  278. color: #000;
  279. &::before {
  280. content: "";
  281. position: absolute;
  282. left: -15px;
  283. background: url("https://birdseye-img.sysuimars.com/youwei-uniapp/home/arrow.png") no-repeat center center / 100% 100%;
  284. width: 13px;
  285. height: 16px;
  286. transform: rotate(180deg);
  287. }
  288. &::after {
  289. content: "";
  290. position: absolute;
  291. right: -15px;
  292. background: url("https://birdseye-img.sysuimars.com/youwei-uniapp/home/arrow.png") no-repeat center center / 100% 100%;
  293. width: 13px;
  294. height: 16px;
  295. }
  296. }
  297. span {
  298. margin-right: 4px;
  299. }
  300. }
  301. }
  302. .legend {
  303. position: absolute;
  304. right: 12px;
  305. top: -5px;
  306. background: rgba(0, 0, 0, 0.4);
  307. border-radius: 6px;
  308. padding: 4px 6px;
  309. .legend-item {
  310. display: flex;
  311. align-items: center;
  312. font-size: 10px;
  313. .line {
  314. background: #ffc33f;
  315. border-radius: 2px;
  316. width: 7px;
  317. height: 3px;
  318. margin-right: 4px;
  319. }
  320. .white {
  321. background: #fff;
  322. }
  323. }
  324. }
  325. }
  326. .box-wrap {
  327. margin-top: 14px;
  328. background: rgba(0, 0, 0, 0.3);
  329. padding: 10px 12px;
  330. border-radius: 8px;
  331. border: 1px solid #ffcf66;
  332. backdrop-filter: blur(2px);
  333. // min-height: 154px;
  334. // box-sizing: border-box;
  335. .box-header {
  336. display: flex;
  337. align-items: center;
  338. justify-content: center;
  339. font-family: "jiangxizhuokai";
  340. .name {
  341. div {
  342. font-family: "jiangxizhuokai";
  343. color: #ffcf66;
  344. letter-spacing: 5px;
  345. }
  346. span {
  347. font-size: 11px;
  348. }
  349. }
  350. .divider {
  351. height: 26px;
  352. }
  353. }
  354. .text {
  355. font-size: 12px;
  356. margin: 10px 0 5px 0;
  357. }
  358. .btn {
  359. font-size: 11px;
  360. padding: 7px 12px;
  361. border-radius: 20px;
  362. background: rgba(255, 255, 255, 0.3);
  363. text-align: center;
  364. width: 90px;
  365. box-sizing: border-box;
  366. margin: auto;
  367. }
  368. }
  369. }
  370. }
  371. </style>