archiveDetail.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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" :key="index">
  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" :key="index">
  61. <block v-if="item.name!=='灭火器超期'">
  62. <view class="title" style="width:60%">{{item.name}}:</view>
  63. <view class="margin-right flex align-center">
  64. <label class="" v-if="item.where==0">
  65. <radio disabled="true" value="否" checked /><text>否</text>
  66. </label>
  67. <label class="" v-if="item.where==2">
  68. <radio disabled="true" value="其他" checked /><text>其他</text>
  69. </label>
  70. <view v-if="item.where==2&&item.describe" style="max-width:90rpx;margin-left:10rpx;color:#8d8080;font-size:28rpx;line-height:32rpx">
  71. {{ item.describe}}
  72. </view>
  73. <view @click="previewImage(item)" v-if="item.picture" style="margin-left:10rpx">
  74. <image :src="item.picture" mode="aspectFit"></image>
  75. </view>
  76. </view>
  77. </block>
  78. </view>
  79. <view class="form-item remark">
  80. <view class="title">备注:</view>
  81. <view>{{detailInfo.remarks}}</view>
  82. <!-- <textarea name="" id="" disabled="true" v-model="detailInfo.remarks"></textarea> -->
  83. </view>
  84. </block>
  85. <view v-if="this.control&&this.detailInfo.account_number"
  86. class="btn-area submitBottomBtn padding-lr-sm " style="position:static">
  87. <button class="bg-blue round margin-top" @click="goArchiveEdit()">编 辑 </button>
  88. </view>
  89. <br>
  90. </form>
  91. </view>
  92. </template>
  93. <script>
  94. export default {
  95. data() {
  96. return {
  97. detailInfo: {},
  98. control: '',
  99. site_id: '',
  100. problem_one: [],
  101. problem_two: [],
  102. }
  103. },
  104. onLoad: function(option) {
  105. if (option.siteId) {
  106. this.getDataList({
  107. "site_id": option.siteId
  108. })
  109. } else {
  110. this.getDataList({
  111. "id": option.id
  112. })
  113. }
  114. this.control = option.mark;
  115. this.site_id=option.siteId;
  116. // this.id = option.id;
  117. },
  118. methods: {
  119. previewImage(item) {
  120. // alert(1)
  121. uni.previewImage({
  122. urls: [item.picture ? item.picture : "/static/cameraIcon2.png"]
  123. });
  124. },
  125. goArchiveEdit() {
  126. uni.navigateTo({
  127. url: '/pages/siteArchive/siteArchiveAdd/siteArchiveAdd?id=' + this.id+'&mark=control',
  128. });
  129. },
  130. //数据请求
  131. async getDataList(params = {}) {
  132. const res = await this.$myRequest({
  133. url: 'Archives/getArchivesList1',
  134. showLoading: true,
  135. data: params
  136. })
  137. this.detailInfo = res.data.data[0];
  138. this.problem_one = this.detailInfo.problem_one;
  139. this.problem_two = this.detailInfo.problem_two;
  140. this.id=res.data.data[0].id;
  141. if (!this.detailInfo.account_number) {
  142. uni.showToast({
  143. title: "暂无档案信息!",
  144. icon: "none"
  145. });
  146. }
  147. },
  148. }
  149. }
  150. </script>
  151. <style lang="scss">
  152. .form-item .title {
  153. width: 242rpx
  154. }
  155. </style>