common.scss 7.8 KB

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