archiveDetail.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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:70%">{{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>
  70. </view>
  71. <view class="form-item remark">
  72. <view class="title">备注:</view>
  73. <textarea name="" id="" disabled="true" v-model="detailInfo.remarks"></textarea>
  74. </view>
  75. </block>
  76. <view v-if="this.control&&Object.keys(this.detailInfo).length!=0"
  77. class="btn-area submitBottomBtn padding-lr-sm " style="position:static">
  78. <button class="bg-blue round margin-top" @click="goArchiveEdit()">编 辑 </button>
  79. </view>
  80. <br>
  81. </form>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. data() {
  87. return {
  88. detailInfo: {},
  89. control: '',
  90. id: '',
  91. problem_one: [],
  92. problem_two: [],
  93. }
  94. },
  95. onLoad: function(option) {
  96. if (option.siteId) {
  97. this.getDataList({
  98. "site_id": option.siteId
  99. })
  100. } else {
  101. this.getDataList({
  102. "id": option.id
  103. })
  104. }
  105. this.control = option.mark;
  106. this.id = option.id;
  107. },
  108. methods: {
  109. previewImage(item) {
  110. // alert(1)
  111. uni.previewImage({
  112. urls: [item.picture ? item.picture : "/static/cameraIcon2.png"]
  113. });
  114. },
  115. goArchiveEdit() {
  116. uni.navigateTo({
  117. url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd?id=' + this.id,
  118. });
  119. },
  120. //数据请求
  121. async getDataList(params = {}) {
  122. const res = await this.$myRequest({
  123. url: 'Archives/getArchivesList1',
  124. showLoading: true,
  125. data: params
  126. })
  127. this.detailInfo = res.data.data[0];
  128. this.problem_one = this.detailInfo.problem_one;
  129. this.problem_two = this.detailInfo.problem_two
  130. if (!this.detailInfo.account_number) {
  131. uni.showToast({
  132. title: "暂无档案信息!",
  133. icon: "none"
  134. });
  135. }
  136. },
  137. }
  138. }
  139. </script>
  140. <style lang="scss">
  141. .form-item .title {
  142. width: 242rpx
  143. }
  144. </style>