common.scss 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. page {
  2. font-family: Source Han Sans CN Normal, PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif;
  3. background-color: $bg-color-grey;
  4. font-weight: normal;
  5. }
  6. /* #ifdef H5 */
  7. uni-page-head {
  8. display: none;
  9. }
  10. body {
  11. max-width: 1500rpx;
  12. margin: auto;
  13. }
  14. /* #endif */
  15. view {
  16. box-sizing: border-box;
  17. line-height: 1.41176471;
  18. word-break: break-all;
  19. }
  20. image {
  21. width: 100%;
  22. height: 100%;
  23. }
  24. .bold {
  25. font-weight: bold;
  26. }
  27. .textarea-placeholder,
  28. .input-placeholder {
  29. color: #d2d2d2;
  30. }
  31. /* 宽高 */
  32. .w-100 {
  33. width: 100%;
  34. }
  35. .w-50 {
  36. width: 50%;
  37. }
  38. /*文字大小*/
  39. .font-10 {
  40. font-size: 20rpx !important;
  41. }
  42. .font-12 {
  43. font-size: 24rpx !important;
  44. }
  45. .font-14 {
  46. font-size: 28rpx !important;
  47. }
  48. .font-16 {
  49. font-size: 32rpx !important;
  50. }
  51. .font-24 {
  52. font-size: 48rpx !important;
  53. }
  54. /*行高*/
  55. .line-h0 {
  56. line-height: 0 !important;
  57. }
  58. .line-h {
  59. line-height: 1 !important;
  60. }
  61. .line-h-sm {
  62. line-height: 1.2 !important;
  63. }
  64. .line-h-md {
  65. line-height: 1.5 !important;
  66. }
  67. .line-h-lg {
  68. line-height: 2 !important;
  69. }
  70. .line-h-big {
  71. line-height: 3 !important;
  72. }
  73. .text-center {
  74. text-align: center;
  75. }
  76. .text-left {
  77. text-align: left;
  78. }
  79. .text-right {
  80. text-align: right;
  81. }
  82. /*标题颜色*/
  83. .text-primary {
  84. color: #317Afd !important;
  85. }
  86. .text-secondary {
  87. color: #00b368 !important;
  88. }
  89. .text-danger {
  90. color: #dc3545 !important;
  91. }
  92. .text-warning {
  93. color: #ffc107 !important;
  94. }
  95. .text-title {
  96. color: #333;
  97. }
  98. .text-info {
  99. color: #666;
  100. }
  101. .text-grey {
  102. color: #999;
  103. }
  104. .text-sub {
  105. color: #cccccc;
  106. }
  107. .text-disable {
  108. color: #c0c0c0;
  109. }
  110. .text-white {
  111. color: #fff !important;
  112. }
  113. /*布局*/
  114. .nowrap {
  115. white-space: nowrap;
  116. }
  117. .flex-1 {
  118. flex: 1;
  119. }
  120. .flex-2 {
  121. flex: 2;
  122. }
  123. .wrap {
  124. flex-wrap: wrap;
  125. }
  126. .d-flex {
  127. display: flex;
  128. }
  129. .d-block {
  130. display: block;
  131. }
  132. .d-inline-block {
  133. display: inline-block;
  134. }
  135. .row {
  136. display: flex;
  137. align-items: center;
  138. }
  139. .row-center {
  140. display: flex;
  141. align-items: center;
  142. justify-content: center;
  143. }
  144. .row-end {
  145. display: flex;
  146. align-items: center;
  147. justify-content: flex-end;
  148. }
  149. .row-between {
  150. display: flex;
  151. align-items: center;
  152. justify-content: space-between;
  153. }
  154. .between {
  155. display: flex;
  156. justify-content: space-between;
  157. }
  158. .row-around {
  159. display: flex;
  160. align-items: center;
  161. justify-content: space-around;
  162. }
  163. .column {
  164. display: flex;
  165. flex-direction: column;
  166. justify-content: center;
  167. }
  168. .column-center {
  169. display: flex;
  170. flex-direction: column;
  171. align-items: center;
  172. justify-content: center;
  173. }
  174. .column-around {
  175. display: flex;
  176. flex-direction: column;
  177. justify-content: space-around;
  178. }
  179. .column-end {
  180. display: flex;
  181. flex-direction: column;
  182. justify-content: flex-end;
  183. }
  184. .column-between {
  185. display: flex;
  186. flex-direction: column;
  187. justify-content: space-between;
  188. }
  189. .relative {
  190. position: relative;
  191. }
  192. /* 超出隐藏 */
  193. .text-ellipsis {
  194. word-break: break-all;
  195. display: -webkit-box;
  196. -webkit-line-clamp: 1;
  197. -webkit-box-orient: vertical;
  198. text-overflow: ellipsis;
  199. overflow: hidden;
  200. }
  201. .text-ellipsis2 {
  202. word-break: break-all;
  203. display: -webkit-box;
  204. -webkit-line-clamp: 2;
  205. -webkit-box-orient: vertical;
  206. overflow: hidden;
  207. }
  208. // 边框间距
  209. .mt-12{
  210. margin-top: 24rpx !important;
  211. }
  212. .mr {
  213. margin-right: 18rpx !important;
  214. }
  215. .mb {
  216. margin-bottom: 24rpx !important;
  217. }
  218. .m-12 {
  219. margin: 24rpx;
  220. }
  221. .p-10 {
  222. padding: 20rpx;
  223. }
  224. .p-12 {
  225. padding: 24rpx;
  226. }
  227. .px-12 {
  228. padding: 26rpx 24rpx;
  229. }
  230. .px-13 {
  231. padding: 24rpx 26rpx;
  232. }
  233. /*按钮*/
  234. .btn,
  235. .btn-plain {
  236. display: flex;
  237. align-items: center;
  238. justify-content: center;
  239. height: 96rpx;
  240. font-size: 32rpx;
  241. line-height: 1;
  242. border-radius: 12rpx;
  243. &::after{
  244. display: none;
  245. }
  246. }
  247. .btn {
  248. color: #fff;
  249. background-image: linear-gradient(45deg, #57b1fe, #317afd);
  250. }
  251. // 镂空按钮
  252. .btn-plain {
  253. color: #317afd;
  254. border: 1rpx #317afd solid;
  255. }
  256. .scroll-h {
  257. white-space: nowrap;
  258. width: 100%;
  259. }
  260. // 卡片
  261. .ui-card {
  262. margin: 24rpx;
  263. background-color: #fff;
  264. border-radius: 12rpx;
  265. }
  266. // 上传图片样式
  267. .ui-upload {
  268. display: flex;
  269. flex-wrap: wrap;
  270. align-items: flex-start;
  271. }
  272. .ui-upload_text {
  273. color: #999999;
  274. font-size: 20rpx;
  275. margin-top: 10rpx;
  276. }
  277. .ui-upload_img {
  278. display:block;
  279. width: 128rpx;
  280. height: 128rpx;
  281. border-radius: 8rpx;
  282. }
  283. .ui-upload_file,
  284. .ui-upload_input {
  285. position: relative;
  286. display: inline-flex;
  287. align-items: center;
  288. justify-content: center;
  289. width: 128rpx;
  290. height: 128rpx;
  291. margin:0 16rpx 16rpx;
  292. background-color: #f3f4f5;
  293. border-radius: 8rpx;
  294. }
  295. .ui-upload_input image{
  296. width: 60rpx;
  297. height: 60rpx;
  298. }
  299. .ui-upload_file .close{
  300. position: absolute;
  301. top: -30rpx;
  302. right: -20rpx;
  303. z-index: 2;
  304. display: block;
  305. }
  306. .ui-upload_file video{
  307. width: 128rpx;
  308. height: 128rpx;
  309. }
  310. // 下拉按钮
  311. .picker {
  312. width: 240rpx;
  313. height: 60rpx;
  314. font-size: 24rpx;
  315. border: #DDDDDD 1rpx solid;
  316. border-radius: 8rpx;
  317. }
  318. .picker-wrapper {
  319. display: flex;
  320. align-items: center;
  321. justify-content: space-between;
  322. height: 60rpx;
  323. padding: 0 24rpx;
  324. color: #999999;
  325. line-height:1;
  326. }
  327. /**
  328. * ===================
  329. * 页面面板通用样式 用于 监控列表,可视监控,病虫害百科列表,病虫害详情,病虫害识别
  330. * ===================
  331. */
  332. .page-panel{
  333. padding: 24rpx;
  334. margin-top: 24rpx;
  335. margin-bottom: 100rpx;
  336. background-color: #fff;
  337. }
  338. /**
  339. * ===================
  340. * 设计监测列表项通用样式 用于 气象监测列表,虫情监测列表页面
  341. * ===================
  342. */
  343. .forecast-item {
  344. display: flex;
  345. justify-content: space-between;
  346. padding: 26rpx 24rpx 34rpx;
  347. .title {
  348. position: relative;
  349. color: $color-title;
  350. line-height: 44rpx;
  351. &::before {
  352. content: ' ';
  353. display: inline-block;
  354. width: 18rpx;
  355. height: 18rpx;
  356. margin-right: 18rpx;
  357. border-radius: 100%;
  358. }
  359. }
  360. .title.on::before {
  361. background: linear-gradient(135deg, #57B1FE 0%, $color-primary 100%);
  362. }
  363. .title.off::before {
  364. background: $color-error;
  365. }
  366. .text {
  367. font-size: 28rpx;
  368. color: $color-subtitle;
  369. line-height: 40rpx;
  370. margin-top: 10rpx;
  371. }
  372. }
  373. /**
  374. * ===================
  375. * 设备监测详情卡片样式 气象监测详情,虫情监测详情页面
  376. * ===================
  377. */
  378. .forecast-card{
  379. position: relative;
  380. display: flex;
  381. justify-content: space-between;
  382. overflow: hidden;
  383. padding: 28rpx 26rpx;
  384. margin-bottom: 48rpx;
  385. color: #fff;
  386. background: linear-gradient(135deg, #57B1FE 0%, #317AFD 100%);
  387. &::before,
  388. &::after {
  389. content: ' ';
  390. position: absolute;
  391. display: block;
  392. background: rgba(255, 255, 255, 0.3);
  393. border-radius: 100%;
  394. }
  395. &::before {
  396. top: 12rpx;
  397. right: 96rpx;
  398. width: 92rpx;
  399. height: 92rpx;
  400. }
  401. &::after {
  402. right: -96rpx;
  403. bottom: -108rpx;
  404. width: 276rpx;
  405. height: 276rpx;
  406. }
  407. .title {
  408. position: relative;
  409. line-height: 44rpx;
  410. &::before {
  411. content: ' ';
  412. display: inline-block;
  413. width: 18rpx;
  414. height: 18rpx;
  415. margin-right: 18rpx;
  416. background-color: #fff;
  417. border-radius: 100%;
  418. }
  419. }
  420. .text {
  421. margin-top: 14rpx;
  422. font: 28rpx/40rpx PingFang SC-中等, PingFang SC;
  423. line-height: 40rpx;
  424. }
  425. .state {
  426. padding-top: 6rpx;
  427. text-align: right;
  428. width: 120rpx;
  429. }
  430. }
  431. /**
  432. * ===================
  433. * 实时数据列表样式;使用模块:气象监测,虫情监测
  434. * ===================
  435. */
  436. .latest-list{
  437. display: flex;
  438. flex-wrap: wrap;
  439. }
  440. .latest-item{
  441. display: flex;
  442. width: calc(50% - 34rpx);
  443. padding: 26rpx 24rpx;
  444. margin-top: 0;
  445. margin-right: 0;
  446. &:nth-child(2n){
  447. margin-left: 18rpx;
  448. margin-right: 24rpx;
  449. }
  450. .icon{
  451. display: flex;
  452. align-items: center;
  453. justify-content: center;
  454. width: 88rpx;
  455. height: 88rpx;
  456. margin-right: 24rpx;
  457. background:$color-primary;
  458. border-radius: 100%;
  459. image{
  460. display: block;
  461. width: 60rpx;
  462. height: 60rpx;
  463. }
  464. }
  465. .text{
  466. line-height: 34rpx;
  467. }
  468. }
  469. /**
  470. * ===================
  471. * 表格数据列表样式
  472. * ===================
  473. */
  474. .table-style {
  475. margin-bottom: 42rpx;
  476. .uni-table-th,
  477. .uni-table-td {
  478. color: #333333 !important;
  479. font-weight: normal !important;
  480. font-size: 24rpx !important;
  481. line-height: 34rpx !important;;
  482. text-align: center !important;
  483. }
  484. .uni-table-th {
  485. background-color: #F9F9F9 !important;
  486. padding: 16rpx 20rpx !important;
  487. }
  488. .uni-table-td {
  489. padding: 12rpx 20rpx;
  490. }
  491. }