index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  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 class="title">模型管理</view>
  169. <view class="group-box">
  170. <view class="small-box small-boxs">
  171. <view class="small">
  172. <view class="group-veiw bg2" @click="$navigateTo('/pages/bim/bim')">
  173. <text class="label">模型列表</text>
  174. <view class="group-icon">
  175. <uni-icons custom-prefix="iconfont" type="icon-weixiugongdan" color="#fff"
  176. size="30">
  177. </uni-icons>
  178. </view>
  179. </view>
  180. </view>
  181. </view>
  182. <view class="small-box small-boxs">
  183. <view class="small">
  184. <view class="group-veiw bg8"
  185. @click="$navigateTo('/pages/bimShow/bimShow?title=楼层分布&fileId=10000890570651&type=model&showType=2')">
  186. <text class="label">楼层分布</text>
  187. <view class="group-icon">
  188. <uni-icons custom-prefix="iconfont" type="icon-weixiugongdan" color="#fff"
  189. size="30">
  190. </uni-icons>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. <view class="project-admin" v-if="project.id" @click="$navigateTo('/pages/projectAdmin/projectAdmin')">
  199. <uni-icons type="home-filled" size="30" color="#fff"></uni-icons>
  200. </view>
  201. </view>
  202. </template>
  203. <script>
  204. import {
  205. getProjectDetailById
  206. } from '@/request/api/project.js'
  207. export default {
  208. data() {
  209. return {
  210. list: [],
  211. project: {},
  212. option: {
  213. tip: '暂未加入项目'
  214. },
  215. reloadMecroll: false
  216. }
  217. },
  218. onShow() {
  219. this.project = this.$store.getters.project;
  220. if (!uni.getStorageSync('token')) {
  221. this.option = {
  222. tip: '暂未登录',
  223. btnText: '点击登录'
  224. }
  225. } else {
  226. this.option = {
  227. tip: '暂未加入项目'
  228. }
  229. }
  230. this.reloadMecroll = !this.reloadMecroll;
  231. if (this.project.id && this.project.picture) {
  232. this.list = JSON.parse(this.project.picture);
  233. this.init();
  234. }
  235. },
  236. methods: {
  237. init() {
  238. getProjectDetailById(this.project.id).then(res => {
  239. if (res.code === 200) {
  240. this.$store.dispatch('app/changeProject', res.data);
  241. this.project = res.data;
  242. this.list = JSON.parse(this.project.picture);
  243. }
  244. })
  245. }
  246. }
  247. }
  248. </script>
  249. <style lang="scss">
  250. .index-box {
  251. .project-admin {
  252. position: fixed;
  253. bottom: 30rpx;
  254. right: 30rpx;
  255. background: $uni-primary;
  256. width: 100rpx;
  257. height: 100rpx;
  258. border-radius: 100rpx;
  259. display: flex;
  260. align-items: center;
  261. justify-content: center;
  262. }
  263. }
  264. .index-container {
  265. background: #fff;
  266. box-sizing: border-box;
  267. border-top: 2rpx solid $uni-border-1;
  268. min-height: 100vh;
  269. padding-bottom: 40rpx;
  270. .project {
  271. max-width: 100%;
  272. display: inline-block;
  273. padding: 30rpx;
  274. box-sizing: border-box;
  275. .project-box {
  276. box-sizing: border-box;
  277. padding: 0 30rpx;
  278. height: 80rpx;
  279. background-color: #ffffff;
  280. border-radius: 80rpx;
  281. box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.12);
  282. display: flex;
  283. align-items: center;
  284. .name {
  285. margin: 0 12rpx;
  286. font-weight: 500;
  287. flex: 1;
  288. }
  289. }
  290. }
  291. .banner-box {
  292. padding: 0 30rpx;
  293. }
  294. .index-group {
  295. padding: 0 20rpx;
  296. .title {
  297. font-size: 32rpx;
  298. font-weight: 700;
  299. padding: 30rpx 10rpx 20rpx 10rpx;
  300. }
  301. .group-box {
  302. display: flex;
  303. flex-wrap: wrap;
  304. align-items: flex-start;
  305. }
  306. .group-item {
  307. width: 50%;
  308. height: 400rpx;
  309. padding: 10rpx;
  310. box-sizing: border-box;
  311. }
  312. .small-box {
  313. width: 50%;
  314. height: 400rpx;
  315. box-sizing: border-box;
  316. &.small-boxs {
  317. height: 200rpx;
  318. }
  319. .small {
  320. height: 200rpx;
  321. padding: 10rpx;
  322. box-sizing: border-box;
  323. }
  324. }
  325. .group-veiw {
  326. width: 100%;
  327. height: 100%;
  328. border-radius: 16rpx;
  329. position: relative;
  330. .label {
  331. color: #fff;
  332. font-weight: 500;
  333. position: absolute;
  334. top: 40rpx;
  335. left: 40rpx;
  336. }
  337. .group-icon {
  338. position: absolute;
  339. bottom: 40rpx;
  340. right: 40rpx;
  341. }
  342. }
  343. .bg1 {
  344. background-color: #88d498;
  345. }
  346. .bg2 {
  347. background-color: #7ad9ff;
  348. }
  349. .bg3 {
  350. background-color: #ffb997;
  351. }
  352. .bg4 {
  353. background-color: #f67e7d;
  354. }
  355. .bg5 {
  356. background-color: #ffaaaa;
  357. }
  358. .bg6 {
  359. background-color: #9ac0cd;
  360. }
  361. .bg7 {
  362. background-color: #d8d8ff;
  363. }
  364. .bg8 {
  365. background-color: #bfbfbf;
  366. }
  367. .bg9 {
  368. background-color: #40e0d0;
  369. }
  370. .bg10 {
  371. background-color: #f8d3da;
  372. }
  373. }
  374. }
  375. </style>