index.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  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=2')">
  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>
  142. </view>
  143. </view>
  144. </template>
  145. <script>
  146. export default {
  147. data() {
  148. return {
  149. list: [
  150. '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'
  151. ],
  152. project: {},
  153. option: {
  154. tip: '暂未加入项目'
  155. },
  156. reloadMecroll: false
  157. }
  158. },
  159. onShow() {
  160. this.project = this.$store.getters.project;
  161. if (!uni.getStorageSync('token')) {
  162. this.option = {
  163. tip: '暂未登录',
  164. btnText: '点击登录'
  165. }
  166. } else {
  167. this.option = {
  168. tip: '暂未加入项目'
  169. }
  170. }
  171. this.reloadMecroll = !this.reloadMecroll;
  172. },
  173. methods: {}
  174. }
  175. </script>
  176. <style lang="scss">
  177. .index-container {
  178. background: #fff;
  179. box-sizing: border-box;
  180. border-top: 2rpx solid $uni-border-1;
  181. min-height: 100vh;
  182. padding-bottom: 40rpx;
  183. .project {
  184. max-width: 100%;
  185. display: inline-block;
  186. padding: 30rpx;
  187. box-sizing: border-box;
  188. .project-box {
  189. box-sizing: border-box;
  190. padding: 0 30rpx;
  191. height: 80rpx;
  192. background-color: #ffffff;
  193. border-radius: 80rpx;
  194. box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
  195. display: flex;
  196. align-items: center;
  197. .name {
  198. margin: 0 12rpx;
  199. font-weight: 500;
  200. flex: 1;
  201. }
  202. }
  203. }
  204. .banner-box {
  205. padding: 0 30rpx;
  206. }
  207. .index-group {
  208. padding: 0 20rpx;
  209. .title {
  210. font-size: 32rpx;
  211. font-weight: 700;
  212. padding: 30rpx 10rpx 20rpx 10rpx;
  213. }
  214. .group-box {
  215. display: flex;
  216. flex-wrap: wrap;
  217. align-items: flex-start;
  218. }
  219. .group-item {
  220. width: 50%;
  221. height: 400rpx;
  222. padding: 10rpx;
  223. box-sizing: border-box;
  224. }
  225. .small-box {
  226. width: 50%;
  227. height: 400rpx;
  228. box-sizing: border-box;
  229. &.small-boxs {
  230. height: 200rpx;
  231. }
  232. .small {
  233. height: 200rpx;
  234. padding: 10rpx;
  235. box-sizing: border-box;
  236. }
  237. }
  238. .group-veiw {
  239. width: 100%;
  240. height: 100%;
  241. border-radius: 16rpx;
  242. position: relative;
  243. .label {
  244. color: #fff;
  245. font-weight: 500;
  246. position: absolute;
  247. top: 40rpx;
  248. left: 40rpx;
  249. }
  250. .group-icon {
  251. position: absolute;
  252. bottom: 40rpx;
  253. right: 40rpx;
  254. }
  255. }
  256. .bg1 {
  257. background-color: #88d498;
  258. }
  259. .bg2 {
  260. background-color: #7ad9ff;
  261. }
  262. .bg3 {
  263. background-color: #ffb997;
  264. }
  265. .bg4 {
  266. background-color: #f67e7d;
  267. }
  268. .bg5 {
  269. background-color: #ffaaaa;
  270. }
  271. .bg6 {
  272. background-color: #9ac0cd;
  273. }
  274. .bg7 {
  275. background-color: #d8d8ff;
  276. }
  277. .bg8 {
  278. background-color: #bfbfbf;
  279. }
  280. .bg9 {
  281. background-color: #40e0d0;
  282. }
  283. .bg10 {
  284. background-color: #f8d3da;
  285. }
  286. }
  287. }
  288. </style>