archiveDetail.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <template>
  2. <view class="appWrapper archiveDetail">
  3. <form action="">
  4. <view class="form-item">
  5. <view class="title">
  6. 户号:
  7. </view>
  8. <view class="sub">{{detailInfo.account_number}}</view>
  9. </view>
  10. <view class="form-item">
  11. <view class="title">流变变比:</view>
  12. <view class="sub">{{detailInfo.rheological_change}}</view>
  13. </view>
  14. <view class="form-item">
  15. <view class="title" style="width:240rpx">单路电源容量:</view>
  16. <view class="sub">{{detailInfo.power_capacity}}</view>
  17. </view>
  18. <view class="form-item">
  19. <view class="title">线路:</view>
  20. <view class="sub">{{detailInfo.route_name}}</view>
  21. </view>
  22. <view class="form-item">
  23. <view class="title">站点名称:</view>
  24. <view class="sub">{{detailInfo.site_name}}</view>
  25. </view>
  26. <view class="form-item">
  27. <view class="title">监察:</view>
  28. <view class="sub">{{detailInfo.supervision_name}}</view>
  29. </view>
  30. <view class="form-item">
  31. <view class="title">电试报告时间:</view>
  32. <view class="sub">{{detailInfo.electric_test_overdue}}</view>
  33. </view>
  34. <view class="eleTime">
  35. <image src="/static/noteIcon.png"></image>
  36. <view>距离电试超期还有 <span>{{detailInfo.electric_test_overdue_bz}}</span> 天</view>
  37. </view>
  38. <view class="info-tit margin-left-xs">
  39. <text class="cuIcon-titles margin-right-xs"></text>
  40. 现场问题
  41. </view>
  42. <block v-for="(item,index) in problem_one">
  43. <view class="form-item flex justify-between">
  44. <view class="title" style="width:70%">{{item.name}}:</view>
  45. <view class="margin-right flex align-center">
  46. <label class="margin-right-xl">
  47. <radio disabled="true" value="是" checked /><text>是</text>
  48. </label>
  49. <view @click="previewImage(item)">
  50. <image :src="item.picture?item.picture:'/static/cameraIcon2.png'" mode="aspectFit"></image>
  51. </view>
  52. </view>
  53. </view>
  54. </block>
  55. <block v-if="!this.control">
  56. <view class="info-tit margin-left-xs">
  57. <text class="cuIcon-titles margin-right-xs"></text>
  58. 其他
  59. </view>
  60. <view class="form-item flex justify-between" v-for="(item,index) in problem_two">
  61. <view class="title" style="width:60%">{{item.name}}:</view>
  62. <view class="margin-right flex align-center">
  63. <label class="" v-if="item.where==0">
  64. <radio disabled="true" value="否" checked /><text>否</text>
  65. </label>
  66. <label class="" v-if="item.where==2">
  67. <radio disabled="true" value="其他" checked /><text>其他</text>
  68. </label>
  69. <view v-if="item.where==2&&item.describe" style="width:90rpx;margin-left:10rpx;color:#8d8080;font-size:28rpx;line-height:32rpx">
  70. {{ item.describe}}
  71. </view>
  72. </view>
  73. </view>
  74. <view class="form-item remark">
  75. <view class="title">备注:</view>
  76. <view>{{detailInfo.remarks}}</view>
  77. <!-- <textarea name="" id="" disabled="true" v-model="detailInfo.remarks"></textarea> -->
  78. </view>
  79. </block>
  80. <view v-if="this.control&&this.detailInfo.account_number"
  81. class="btn-area submitBottomBtn padding-lr-sm " style="position:static">
  82. <button class="bg-blue round margin-top" @click="goArchiveEdit()">编 辑 </button>
  83. </view>
  84. <br>
  85. </form>
  86. </view>
  87. </template>
  88. <script>
  89. export default {
  90. data() {
  91. return {
  92. detailInfo: {},
  93. control: '',
  94. site_id: '',
  95. problem_one: [],
  96. problem_two: [],
  97. }
  98. },
  99. onLoad: function(option) {
  100. if (option.siteId) {
  101. this.getDataList({
  102. "site_id": option.siteId
  103. })
  104. } else {
  105. this.getDataList({
  106. "id": option.id
  107. })
  108. }
  109. this.control = option.mark;
  110. this.site_id=option.siteId;
  111. // this.id = option.id;
  112. },
  113. methods: {
  114. previewImage(item) {
  115. // alert(1)
  116. uni.previewImage({
  117. urls: [item.picture ? item.picture : "/static/cameraIcon2.png"]
  118. });
  119. },
  120. goArchiveEdit() {
  121. uni.navigateTo({
  122. url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd?id=' + this.id+'&mark=control',
  123. });
  124. },
  125. //数据请求
  126. async getDataList(params = {}) {
  127. const res = await this.$myRequest({
  128. url: 'Archives/getArchivesList1',
  129. showLoading: true,
  130. data: params
  131. })
  132. this.detailInfo = res.data.data[0];
  133. this.problem_one = this.detailInfo.problem_one;
  134. this.problem_two = this.detailInfo.problem_two;
  135. this.id=res.data.data[0].id;
  136. if (!this.detailInfo.account_number) {
  137. uni.showToast({
  138. title: "暂无档案信息!",
  139. icon: "none"
  140. });
  141. }
  142. },
  143. }
  144. }
  145. </script>
  146. <style lang="scss">
  147. .form-item .title {
  148. width: 242rpx
  149. }
  150. </style>