siteArchive.vue 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <view class="site-wrapper">
  3. <view style="height: calc(100vh - 200rpx);overflow:scroll">
  4. <view class="cu-list menu-avatar">
  5. <view class="cu-item" :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item,index) in siteArchiveData"
  6. :key="index" :data-target="'move-box-' + index" @tap="goArchiveDetail(item.id)">
  7. <view class="cu-avatar round lg" style="background-image:url(../../../static/archiveIcon.png)"></view>
  8. <view class="content" >
  9. <view class="pro-title">
  10. <view class="cut">{{item.site_name}} (现场档案)</view>
  11. </view>
  12. </view>
  13. <view class="nav-right num">
  14. <view class="text-grey">
  15. <text class="icon iconfont margin-right-sm margin-left-lg">&#xe629;</text>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. <!-- 新增按钮start -->
  22. <view class="plus">
  23. <image src="../../static/plus.png" style="width:125rpx;height:125rpx" @tap="goAddPage()"></image>
  24. </view>
  25. <!-- 新增按钮end -->
  26. </view>
  27. </template>
  28. <script>
  29. export default {
  30. data() {
  31. return {
  32. modalName: null,
  33. siteArchiveData:[]
  34. };
  35. },
  36. onLoad:function(option){
  37. this.getDataList()
  38. },
  39. methods: {
  40. //数据请求
  41. async getDataList(params = {}) {
  42. const res = await this.$myRequest({
  43. url: 'Archives/getArchivesList',
  44. showLoading: true,
  45. data: params
  46. })
  47. console.log('res.data.data')
  48. console.log(res.data.data)
  49. this.siteArchiveData = res.data.data
  50. },
  51. // 页面跳转
  52. goArchiveDetail(id){
  53. uni.navigateTo({
  54. url: '/pages/siteArchive/archiveDetail/archiveDetail?id='+id,
  55. });
  56. },
  57. goAddPage(item) {
  58. uni.navigateTo({
  59. url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd',
  60. });
  61. },
  62. }
  63. }
  64. </script>
  65. <style lang="scss">
  66. .cu-item{
  67. height:160rpx!important
  68. }
  69. .cu-list.menu-avatar > .cu-item .content {
  70. left: 110rpx;
  71. }
  72. </style>