common.scss 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580
  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-block;
  287. width: 128rpx;
  288. margin:0 16rpx 16rpx;
  289. border-radius: 8rpx;
  290. }
  291. // 下拉按钮
  292. .picker {
  293. width: 240rpx;
  294. height: 60rpx;
  295. font-size: 24rpx;
  296. border: #DDDDDD 1rpx solid;
  297. border-radius: 8rpx;
  298. }
  299. .picker-wrapper {
  300. display: flex;
  301. align-items: center;
  302. justify-content: space-between;
  303. height: 60rpx;
  304. padding: 0 24rpx;
  305. color: #999999;
  306. line-height:1;
  307. }
  308. /**
  309. * ===================
  310. * 页面面板通用样式 用于 监控列表,可视监控,病虫害百科列表,病虫害详情,病虫害识别
  311. * ===================
  312. */
  313. .page-panel{
  314. padding: 24rpx;
  315. margin-top: 24rpx;
  316. margin-bottom: 100rpx;
  317. background-color: #fff;
  318. }
  319. /**
  320. * ===================
  321. * 设计监测列表项通用样式 用于 气象监测列表,虫情监测列表页面
  322. * ===================
  323. */
  324. .forecast-item {
  325. display: flex;
  326. justify-content: space-between;
  327. padding: 26rpx 24rpx 34rpx;
  328. .title {
  329. position: relative;
  330. color: $color-title;
  331. line-height: 44rpx;
  332. &::before {
  333. content: ' ';
  334. display: inline-block;
  335. width: 18rpx;
  336. height: 18rpx;
  337. margin-right: 18rpx;
  338. border-radius: 100%;
  339. }
  340. }
  341. .title.on::before {
  342. background: linear-gradient(135deg, #57B1FE 0%, $color-primary 100%);
  343. }
  344. .title.off::before {
  345. background: $color-error;
  346. }
  347. .text {
  348. font-size: 28rpx;
  349. color: $color-subtitle;
  350. line-height: 40rpx;
  351. margin-top: 10rpx;
  352. }
  353. }
  354. /**
  355. * ===================
  356. * 设备监测详情卡片样式 气象监测详情,虫情监测详情页面
  357. * ===================
  358. */
  359. .forecast-card{
  360. position: relative;
  361. display: flex;
  362. justify-content: space-between;
  363. overflow: hidden;
  364. padding: 28rpx 26rpx;
  365. margin-bottom: 48rpx;
  366. color: #fff;
  367. background: linear-gradient(135deg, #57B1FE 0%, #317AFD 100%);
  368. &::before,
  369. &::after {
  370. content: ' ';
  371. position: absolute;
  372. display: block;
  373. background: rgba(255, 255, 255, 0.3);
  374. border-radius: 100%;
  375. }
  376. &::before {
  377. top: 12rpx;
  378. right: 96rpx;
  379. width: 92rpx;
  380. height: 92rpx;
  381. }
  382. &::after {
  383. right: -96rpx;
  384. bottom: -108rpx;
  385. width: 276rpx;
  386. height: 276rpx;
  387. }
  388. .title {
  389. position: relative;
  390. line-height: 44rpx;
  391. &::before {
  392. content: ' ';
  393. display: inline-block;
  394. width: 18rpx;
  395. height: 18rpx;
  396. margin-right: 18rpx;
  397. background-color: #fff;
  398. border-radius: 100%;
  399. }
  400. }
  401. .text {
  402. margin-top: 14rpx;
  403. font: 28rpx/40rpx PingFang SC-中等, PingFang SC;
  404. line-height: 40rpx;
  405. }
  406. .state {
  407. padding-top: 6rpx;
  408. text-align: right;
  409. width: 120rpx;
  410. }
  411. }
  412. /**
  413. * ===================
  414. * 实时数据列表样式;使用模块:气象监测,虫情监测
  415. * ===================
  416. */
  417. .latest-list{
  418. display: flex;
  419. flex-wrap: wrap;
  420. }
  421. .latest-item{
  422. display: flex;
  423. width: calc(50% - 34rpx);
  424. padding: 26rpx 24rpx;
  425. margin-top: 0;
  426. margin-right: 0;
  427. &:nth-child(2n){
  428. margin-left: 18rpx;
  429. margin-right: 24rpx;
  430. }
  431. .icon{
  432. display: flex;
  433. align-items: center;
  434. justify-content: center;
  435. width: 88rpx;
  436. height: 88rpx;
  437. margin-right: 24rpx;
  438. background:$color-primary;
  439. border-radius: 100%;
  440. image{
  441. display: block;
  442. width: 60rpx;
  443. height: 60rpx;
  444. }
  445. }
  446. .text{
  447. line-height: 34rpx;
  448. }
  449. }
  450. /**
  451. * ===================
  452. * 表格数据列表样式
  453. * ===================
  454. */
  455. .table-style {
  456. margin-bottom: 42rpx;
  457. .uni-table-th,
  458. .uni-table-td {
  459. color: #333333 !important;
  460. font-weight: normal !important;
  461. font-size: 24rpx !important;
  462. line-height: 34rpx !important;;
  463. text-align: center !important;
  464. }
  465. .uni-table-th {
  466. background-color: #F9F9F9 !important;
  467. padding: 16rpx 20rpx !important;
  468. }
  469. .uni-table-td {
  470. padding: 12rpx 20rpx;
  471. }
  472. }