index.vue 11 KB

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