index.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. <template>
  2. <view class="index-box">
  3. <mescroll-empty :option="option" v-if="!project.id" @emptyclick="$navigateTo('/pages/login/login')"
  4. :key="reloadMecroll">
  5. </mescroll-empty>
  6. <view class="index-container" v-else>
  7. <view class="project">
  8. <view class="project-box" @click="$navigateTo('/pages/projectList/projectList')">
  9. <uni-icons custom-prefix="iconfont" type="icon-wodegongsi-gaoliang" class="inherit-icons"
  10. color="#08979c">
  11. </uni-icons>
  12. <text class="name hui-ellipsis">{{project.name}}</text>
  13. <uni-icons class="inherit-icons" type="forward" size="18" color="#c1c0c8"></uni-icons>
  14. </view>
  15. </view>
  16. <view class="banner-box">
  17. <uv-swiper :list="list" indicator indicatorMode="line" circular bgColor="transparent" height="200">
  18. </uv-swiper>
  19. </view>
  20. <view class="index-group">
  21. <view class="title">合同管理</view>
  22. <view class="group-box">
  23. <view class="group-item">
  24. <view class="group-veiw bg1" @click="$navigateTo('/pages/contract/contract?type=1')">
  25. <text class="label">合同列表</text>
  26. <view class="group-icon">
  27. <uni-icons custom-prefix="iconfont" type="icon-hetongguanli" color="#fff" size="30">
  28. </uni-icons>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="small-box">
  33. <view class="small">
  34. <view class="group-veiw bg2" @click="$navigateTo('/pages/contract/contract?type=2')">
  35. <text class="label">公司合同</text>
  36. <view class="group-icon">
  37. <uni-icons custom-prefix="iconfont" type="icon-anli" color="#fff" size="30">
  38. </uni-icons>
  39. </view>
  40. </view>
  41. </view>
  42. <view class="small">
  43. <view class="group-veiw bg3" @click="$navigateTo('/pages/contract/contract?type=3')">
  44. <text class="label">个人合同</text>
  45. <view class="group-icon">
  46. <uni-icons custom-prefix="iconfont" type="icon-gerenhetongchaxun" color="#fff"
  47. size="30">
  48. </uni-icons>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="title">账单管理</view>
  55. <view class="group-box">
  56. <view class="small-box small-boxs">
  57. <view class="small">
  58. <view class="group-veiw bg7" @click="$navigateTo('/pages/bill/bill?type=1')">
  59. <text class="label">合同账单</text>
  60. <view class="group-icon">
  61. <uni-icons custom-prefix="iconfont" type="icon-jiesuanguanli" color="#fff"
  62. size="30">
  63. </uni-icons>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="small-box small-boxs">
  69. <view class="small">
  70. <view class="group-veiw bg8" @click="$navigateTo('/pages/bill/bill?type=2')">
  71. <text class="label">常规账单</text>
  72. <view class="group-icon">
  73. <uni-icons custom-prefix="iconfont" type="icon-yuemingxi" color="#fff" size="30">
  74. </uni-icons>
  75. </view>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="title">发票管理</view>
  81. <view class="group-box">
  82. <view class="small-box small-boxs">
  83. <view class="small">
  84. <view class="group-veiw bg9" @click="$navigateTo('/pages/invoice/invoice?type=1')">
  85. <text class="label">合同发票</text>
  86. <view class="group-icon">
  87. <uni-icons custom-prefix="iconfont" type="icon-app-hetongguanli-hetongfapiao"
  88. color="#fff" size="30">
  89. </uni-icons>
  90. </view>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="small-box small-boxs">
  95. <view class="small">
  96. <view class="group-veiw bg10" @click="$navigateTo('/pages/invoice/invoice?type=2')">
  97. <text class="label">付款发票</text>
  98. <view class="group-icon">
  99. <uni-icons custom-prefix="iconfont" type="icon-integralrecord" color="#fff"
  100. size="30">
  101. </uni-icons>
  102. </view>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. <view class="title">工单管理</view>
  108. <view class="group-box">
  109. <view class="small-box">
  110. <view class="small">
  111. <view class="group-veiw bg5" @click="$navigateTo('/pages/order/order?type=1')">
  112. <text class="label">维修工单</text>
  113. <view class="group-icon">
  114. <uni-icons custom-prefix="iconfont" type="icon-weixiugongdan" color="#fff"
  115. size="30">
  116. </uni-icons>
  117. </view>
  118. </view>
  119. </view>
  120. <view class="small">
  121. <view class="group-veiw bg6" @click="$navigateTo('/pages/order/order?type=2')">
  122. <text class="label">保洁工单</text>
  123. <view class="group-icon">
  124. <uni-icons custom-prefix="iconfont" type="icon-jinribaojie" color="#fff" size="30">
  125. </uni-icons>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="group-item">
  131. <view class="group-veiw bg4" @click="$navigateTo('/pages/order/order?type=3')">
  132. <text class="label">运维工单</text>
  133. <view class="group-icon">
  134. <uni-icons custom-prefix="iconfont" type="icon-yunwei-jiancebaogao" color="#fff"
  135. size="30">
  136. </uni-icons>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. <view class="title">物联管理</view>
  142. <view class="group-box">
  143. <view class="small-box small-boxs">
  144. <view class="small">
  145. <view class="group-veiw bg1" @click="$navigateTo('/pages/deviceList/deviceList')">
  146. <text class="label">物联设备</text>
  147. <view class="group-icon">
  148. <uni-icons custom-prefix="iconfont" type="icon-weixiugongdan" color="#fff"
  149. size="30">
  150. </uni-icons>
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="small-box small-boxs">
  156. <view class="small">
  157. <view class="group-veiw bg7" @click="$navigateTo('/pages/monitorList/monitorList')">
  158. <text class="label">视频监控</text>
  159. <view class="group-icon">
  160. <uni-icons custom-prefix="iconfont" type="icon-weixiugongdan" color="#fff"
  161. size="30">
  162. </uni-icons>
  163. </view>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </template>
  172. <script>
  173. export default {
  174. data() {
  175. return {
  176. list: [
  177. 'https://images.unsplash.com/photo-1592229505726-ca121723b8ef?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wyMDUzMDJ8MHwxfHNlYXJjaHw0Mnx8aG90ZWx8ZW58MXx8fHwxNjg3NzA1MjkwfDA&ixlib=rb-4.0.3&q=80&w=1080'
  178. ],
  179. project: {},
  180. option: {
  181. tip: '暂未加入项目'
  182. },
  183. reloadMecroll: false
  184. }
  185. },
  186. onShow() {
  187. this.project = this.$store.getters.project;
  188. if (!uni.getStorageSync('token')) {
  189. this.option = {
  190. tip: '暂未登录',
  191. btnText: '点击登录'
  192. }
  193. } else {
  194. this.option = {
  195. tip: '暂未加入项目'
  196. }
  197. }
  198. this.reloadMecroll = !this.reloadMecroll;
  199. },
  200. methods: {}
  201. }
  202. </script>
  203. <style lang="scss">
  204. .index-container {
  205. background: #fff;
  206. box-sizing: border-box;
  207. border-top: 2rpx solid $uni-border-1;
  208. min-height: 100vh;
  209. padding-bottom: 40rpx;
  210. .project {
  211. max-width: 100%;
  212. display: inline-block;
  213. padding: 30rpx;
  214. box-sizing: border-box;
  215. .project-box {
  216. box-sizing: border-box;
  217. padding: 0 30rpx;
  218. height: 80rpx;
  219. background-color: #ffffff;
  220. border-radius: 80rpx;
  221. box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
  222. display: flex;
  223. align-items: center;
  224. .name {
  225. margin: 0 12rpx;
  226. font-weight: 500;
  227. flex: 1;
  228. }
  229. }
  230. }
  231. .banner-box {
  232. padding: 0 30rpx;
  233. }
  234. .index-group {
  235. padding: 0 20rpx;
  236. .title {
  237. font-size: 32rpx;
  238. font-weight: 700;
  239. padding: 30rpx 10rpx 20rpx 10rpx;
  240. }
  241. .group-box {
  242. display: flex;
  243. flex-wrap: wrap;
  244. align-items: flex-start;
  245. }
  246. .group-item {
  247. width: 50%;
  248. height: 400rpx;
  249. padding: 10rpx;
  250. box-sizing: border-box;
  251. }
  252. .small-box {
  253. width: 50%;
  254. height: 400rpx;
  255. box-sizing: border-box;
  256. &.small-boxs {
  257. height: 200rpx;
  258. }
  259. .small {
  260. height: 200rpx;
  261. padding: 10rpx;
  262. box-sizing: border-box;
  263. }
  264. }
  265. .group-veiw {
  266. width: 100%;
  267. height: 100%;
  268. border-radius: 16rpx;
  269. position: relative;
  270. .label {
  271. color: #fff;
  272. font-weight: 500;
  273. position: absolute;
  274. top: 40rpx;
  275. left: 40rpx;
  276. }
  277. .group-icon {
  278. position: absolute;
  279. bottom: 40rpx;
  280. right: 40rpx;
  281. }
  282. }
  283. .bg1 {
  284. background-color: #88d498;
  285. }
  286. .bg2 {
  287. background-color: #7ad9ff;
  288. }
  289. .bg3 {
  290. background-color: #ffb997;
  291. }
  292. .bg4 {
  293. background-color: #f67e7d;
  294. }
  295. .bg5 {
  296. background-color: #ffaaaa;
  297. }
  298. .bg6 {
  299. background-color: #9ac0cd;
  300. }
  301. .bg7 {
  302. background-color: #d8d8ff;
  303. }
  304. .bg8 {
  305. background-color: #bfbfbf;
  306. }
  307. .bg9 {
  308. background-color: #40e0d0;
  309. }
  310. .bg10 {
  311. background-color: #f8d3da;
  312. }
  313. }
  314. }
  315. </style>