qualityInfo.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <template>
  2. <scroll-view scroll-y class="nav hc-quality-info-view" style="height: 100vh;">
  3. <cu-custom bgColor="bg-blue1" :isBack="true">
  4. <block slot="backText"></block>
  5. <block slot="content">记录详情</block>
  6. <block slot="right">
  7. <view class="custom-picker-view" v-if="info.status == 2">
  8. <picker @change="bindRecheckChange" :value="recheckIndex" :range="recheckData">
  9. <view class="uni-input">复核</view>
  10. </picker>
  11. </view>
  12. </block>
  13. </cu-custom>
  14. <view class="page-bg-bar"/>
  15. <view class="hc-content-zindex quality-info">
  16. <view class="cu-bar solid-bottom">
  17. <view class="action">
  18. <text class="cuIcon-titles text-blue"/> 基础信息
  19. </view>
  20. </view>
  21. <view class="hc-info-list-item">
  22. <view class="title">◆ 检查日期:</view>
  23. <view class="content">{{info.startDate}}</view>
  24. </view>
  25. <view class="hc-info-list-item">
  26. <view class="title">◆ 工程名称:</view>
  27. <view class="content">{{info.unitName}}</view>
  28. </view>
  29. <view class="hc-info-list-item">
  30. <view class="title">◆ 左/右幅(洞):</view>
  31. <view class="content" v-if="info.aroundPicture == 1">左</view>
  32. <view class="content" v-if="info.aroundPicture == 2">右</view>
  33. <view class="content" v-if="info.aroundPicture == 3">全部</view>
  34. </view>
  35. <view class="hc-info-list-item">
  36. <view class="title">◆ 分部工程类别:</view>
  37. <view class="content">{{info.segmentName}}</view>
  38. </view>
  39. <template v-if="info.engineeringType == 2">
  40. <view class="hc-info-list-item">
  41. <view class="title">◆ 分项工程名称:</view>
  42. <view class="content">{{info.subitemName}}</view>
  43. </view>
  44. <view class="hc-info-list-item">
  45. <view class="title">◆ 缺陷所处位置:</view>
  46. <view class="content">{{info.startStopStake}}</view>
  47. </view>
  48. <view class="hc-info-list-item">
  49. <view class="title">◆ 构件编号:</view>
  50. <view class="content">{{info.build_number}}</view>
  51. </view>
  52. </template>
  53. <template v-if="info.engineeringType == 1">
  54. <view class="hc-info-list-item">
  55. <view class="title">◆ 分项工程桩号:</view>
  56. <view class="content">{{info.subitemStake}}</view>
  57. </view>
  58. <view class="hc-info-list-item">
  59. <view class="title">◆ 缺陷起点桩号:</view>
  60. <view class="content">{{info.startStopStake}}</view>
  61. </view>
  62. <view class="hc-info-list-item">
  63. <view class="title">◆ 横坐标:</view>
  64. <view class="content">{{info.abscissa_1}}</view>
  65. </view>
  66. <view class="hc-info-list-item">
  67. <view class="title">◆ 缺陷止点桩号:</view>
  68. <view class="content">{{info.stop_stake}}</view>
  69. </view>
  70. <view class="hc-info-list-item">
  71. <view class="title">◆ 横坐标:</view>
  72. <view class="content">{{info.abscissa_2}}</view>
  73. </view>
  74. <view class="hc-info-list-item">
  75. <view class="title">◆ 长(m):</view>
  76. <view class="content">{{info.data_length}}</view>
  77. </view>
  78. <view class="hc-info-list-item">
  79. <view class="title">◆ 宽(m):</view>
  80. <view class="content">{{info.data_width}}</view>
  81. </view>
  82. <view class="hc-info-list-item">
  83. <view class="title">◆ 面积:</view>
  84. <view class="content">{{info.data_area}}</view>
  85. </view>
  86. </template>
  87. <view class="hc-info-list-item">
  88. <view class="title">◆ 病害类型:</view>
  89. <view class="content">{{getDiseaseType()}}</view>
  90. </view>
  91. <view class="hc-info-list-item">
  92. <view class="title">◆ 照片编号:</view>
  93. <view class="content">{{info.photoNo}}</view>
  94. </view>
  95. <view class="hc-info-list-item">
  96. <view class="title">◆ 是否限制性缺陷:</view>
  97. <view class="content" v-if="info.defectType==1">限制性缺陷</view>
  98. <view class="content" v-if="info.defectType==2">非限制性缺陷</view>
  99. </view>
  100. <view class="hc-info-list-item">
  101. <view class="title">◆ 严重程度:</view>
  102. <view class="content" v-if="info.severity==1">严重</view>
  103. <view class="content" v-if="info.severity==2">轻微</view>
  104. <view class="content" v-if="info.severity==0">一般</view>
  105. </view>
  106. <view class="hc-info-list-item">
  107. <view class="title">◆ 病害描述:</view>
  108. <view class="content">{{info.hiddenDanger}}</view>
  109. </view>
  110. <view class="hc-info-list-item">
  111. <view class="title">◆ 施工方检查人:</view>
  112. <view class="content">{{info.checkName}}</view>
  113. </view>
  114. <view class="hc-info-list-item">
  115. <view class="title">◆ 监理方检查人:</view>
  116. <view class="content">{{info.superCheckName}}</view>
  117. </view>
  118. <view class="hc-info-list-item">
  119. <view class="title">◆ 整改人:</view>
  120. <view class="content">{{info.userName}}</view>
  121. </view>
  122. <view class="hc-info-list-item">
  123. <view class="title">◆ 工程部位:</view>
  124. <view class="content">{{info.relation}}</view>
  125. </view>
  126. <view class="hc-info-list-item">
  127. <view class="title">◆ 备注:</view>
  128. <view class="content">{{info.remark}}</view>
  129. </view>
  130. <view class="cu-bar solid-bottom margin-tb">
  131. <view class="action">
  132. <text class="cuIcon-titles text-blue"/> 照片
  133. </view>
  134. </view>
  135. <view class="hc-form-img-box">
  136. <swiper v-if="info.images.length > 0" class="screen-swiper square-dot" indicator-dots circular :autoplay="false">
  137. <swiper-item v-for="(item, index) in info.images" :key="index" @click="previewPicture(index)">
  138. <image :src="item" mode="aspectFill"/>
  139. </swiper-item>
  140. </swiper>
  141. <view v-else>暂无数据</view>
  142. </view>
  143. <view class="cu-bar solid-bottom margin-tb">
  144. <view class="action">
  145. <text class="cuIcon-titles text-blue"/> 附件
  146. </view>
  147. </view>
  148. <view class="hc-file-list-box" v-if="info.fileList.length > 0">
  149. <view class="file-item" v-for="(item, index) in info.fileList" :key="index" @click="previewFile(item)">{{item.name}}</view>
  150. </view>
  151. <view class="hc-file-list-box" v-else>暂无数据</view>
  152. </view>
  153. </scroll-view>
  154. </template>
  155. <script>
  156. export default {
  157. data() {
  158. return {
  159. dataId: '',
  160. info: {
  161. images: [],
  162. fileList: []
  163. },
  164. recheckIndex: 0,
  165. recheckData: ['确认已整改', '未整改'],
  166. typeData: [
  167. {value: 1, text: '隧道工程'},
  168. {value: 2, text: '桥梁工程'}
  169. ],
  170. diseaseTypeData: [
  171. {value: 1, text: '蜂窝麻面', data: '面积小于该面总面积0.5%,深度小于10mm'},
  172. {value: 2, text: '错台', data: '加宽带端头错台'},
  173. {value: 3, text: '洞门端墙、挡土墙表面裂缝', data: '洞门挡土墙存在裂缝,裂缝宽度大于0.2mm'},
  174. {value: 4, text: '裂缝', data: '砼表面裂缝,环向/纵向'},
  175. {value: 5, text: '渗漏水', data: '洞内存在渗漏点'},
  176. ],
  177. diseaseTypeData1: [
  178. {value: 1, text: '蜂窝麻面', data: '面积为 m2,蜂窝总面积为所在面面积的 %。'},
  179. {value: 2, text: '裂缝', data: '裂缝长度L= m,最大宽度δ= mm,裂缝方向为 向。'},
  180. {value: 3, text: '模板接缝高差', data: '模板接缝处高差为 mm。'},
  181. {value: 4, text: '漏浆', data: '混凝土表面有 处漏浆现象。'},
  182. {value: 5, text: '空洞', data: '面积为 m2,深度为 mm。'},
  183. {value: 6, text: '钢筋外露', data: '面积为 m2。'},
  184. {value: 7, text: '建筑垃圾', data: '有 处未清除处理。'},
  185. {value: 8, text: '预埋件', data: '有 处未清除处理。'},
  186. {value: 9, text: '预制构件安装', data: '不平整度为 mm。'},
  187. {value: 10, text: '梁段间接缝', data: '高差为 mm。'},
  188. {value: 11, text: '梁段间色泽', data: ' 处存在差异。'},
  189. {value: 12, text: '梁段间错台', data: '长度为 m,高差为 mm。'},
  190. {value: 13, text: '主体钢结构外露涂装', data: '破损面积为 m2。'},
  191. {value: 14, text: '钢缆防蚀层', data: '破损面积为 m2。'},
  192. {value: 15, text: '湿接缝渗漏水', data: '长度为 m。'},
  193. {value: 16, text: '疏松', data: '面积为 m2,占所在面面积的 %,深度为 mm。'},
  194. {value: 17, text: '夹渣', data: '面积为 mm2。'},
  195. {value: 18, text: '掉皮、起砂', data: '面积为 mm2,占所在面面积的 %。'},
  196. {value: 19, text: '锥坡沉陷', data: '长度为 m,深度为 mm。'},
  197. {value: 20, text: '护坡沉陷', data: '长度为 m,深度为 mm。'},
  198. {value: 21, text: '内外轮廓线', data: '处不顺滑清晰。'},
  199. {value: 22, text: '栏杆、护栏', data: '处不牢固, 处不直顺。'},
  200. {value: 23, text: '沥青混凝土表面', data: '不平整密实,面积为 m2。'},
  201. {value: 24, text: '沥青混凝土泛油', data: '面积为 m2,占受检面面积的 %。'},
  202. {value: 25, text: '沥青混凝土松散', data: '面积为 m2,占受检面面积的 %。'},
  203. {value: 26, text: '沥青混凝土裂缝', data: '长度为 m,占受检面面积的 %。'},
  204. {value: 27, text: '沥青混凝土离析', data: '面积为 m2,占受检面面积的 %。'},
  205. {value: 28, text: '伸缩缝堵塞', data: '有 处堵塞。'},
  206. {value: 29, text: '伸缩缝变形', data: '有 处,长度为 m。'},
  207. {value: 30, text: '伸缩缝开裂', data: '有 处,长度为 m。'},
  208. {value: 31, text: '桥头跳车', data: '桥面与伸缩缝高差为 mm。'},
  209. {value: 32, text: '桥面排水不良', data: '有 处,面积为 m2。'},
  210. {value: 33, text: '支座安装偏歪', data: '横桥向左侧距梁中心 mm,横桥向右侧距梁中心 mm。'},
  211. {value: 34, text: '支座不均匀受力', data: '侧存在不均匀受力。'},
  212. {value: 35, text: '支座脱空', data: '面积为 / ,高度为 mm。'},
  213. {value: 36, text: '支座非正常变形', data: '存在 处非正常变形。'},
  214. {value: 37, text: '支座未按图纸布置', data: '存在 处支座未按图纸布置'},
  215. ],
  216. }
  217. },
  218. onLoad(options) {
  219. // 状态,1 整改中 2 复核中 3已办结 4已撤回(取消整改) 5已被拒 6复核完成 7记录留痕
  220. this.dataId = options.id ?? ''
  221. this.getDataInfo()
  222. },
  223. methods: {
  224. getDataInfo() {
  225. this.http.request("/app/qualityModifyInfo/edit",{
  226. id: this.dataId,
  227. }).then((json)=>{
  228. if(json.result == 1){
  229. this.setDataInfo(json)
  230. }
  231. })
  232. },
  233. setDataInfo({data, otherParam}) {
  234. const files = otherParam ?? []
  235. const dataInfo = data ?? {}
  236. let imgs = [], fileList = [], photoNo = '';
  237. for (let i = 0; i < files.length; i++) {
  238. const item = files[i]
  239. //照片
  240. if (item.type !== 0) {
  241. imgs.push(item.url)
  242. photoNo = photoNo? photoNo + ',' + item.photoNo : item.photoNo
  243. }
  244. //附件
  245. if (item.type === 0) {
  246. fileList.push(item)
  247. }
  248. }
  249. //处理数据
  250. dataInfo.photoNo = photoNo
  251. dataInfo.images = imgs
  252. dataInfo.fileList = fileList
  253. this.info = dataInfo
  254. },
  255. //获取病害类型
  256. getDiseaseType() {
  257. const {engineeringType, diseaseType} = this.info
  258. let typeData = [], index = diseaseType ? diseaseType - 1 : 0;
  259. if (engineeringType === 1) {
  260. typeData = this.diseaseTypeData
  261. } else if (engineeringType === 2) {
  262. typeData = this.diseaseTypeData1
  263. }
  264. //获取数据
  265. if (typeData.length > 0) {
  266. return typeData[index].text
  267. } else {
  268. return ''
  269. }
  270. },
  271. //照片预览
  272. previewPicture(index) {
  273. const { images } = this.info
  274. uni.previewImage({
  275. current: index,
  276. urls: images
  277. });
  278. },
  279. //预览文件
  280. previewFile({name, url}) {
  281. const urls = encodeURIComponent(url)
  282. const word = ['doc', 'docx', 'pdf', 'xls', 'xlsx']
  283. const img = ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp']
  284. const suffix = this.getFileSuffix(name)
  285. if(word.indexOf(suffix) !== -1) {
  286. if(suffix === 'pdf') {
  287. uni.navigateTo({
  288. url: "/pages/view/preview/preview?previews=" + urls
  289. })
  290. } else {
  291. this.openDocFile(urls, suffix)
  292. }
  293. } else if(img.indexOf(suffix) !== -1) {
  294. uni.previewImage({
  295. current: 1,
  296. urls: [urls]
  297. });
  298. } else {
  299. uni.showToast({
  300. title: `当前${suffix}文件格式暂不支持预览`,
  301. duration: 1500,
  302. icon: 'none'
  303. });
  304. }
  305. },
  306. //系统级预览文件
  307. openDocFile(url, fileType) {
  308. uni.showLoading({title: '加载中...', mask: true})
  309. uni.downloadFile({
  310. url: url,
  311. success: function (res) {
  312. uni.openDocument({
  313. filePath: res.tempFilePath,
  314. fileType: fileType,
  315. showMenu: true,
  316. })
  317. },
  318. complete: function () {
  319. uni.hideLoading()
  320. }
  321. });
  322. },
  323. //获取后缀名
  324. getFileSuffix(name) {
  325. if (name) {
  326. return name?.substring(name?.lastIndexOf(".") + 1)
  327. } else {
  328. return ''
  329. }
  330. },
  331. //更改状态
  332. bindRecheckChange(e) {
  333. const { id } = this.info
  334. const index = e.detail.value
  335. // 状态,整改状态 1 整改中 2 复核中 3已办结 4已撤回(取消整改) 5已被拒 6复核完成 7记录留痕
  336. this.http.request("/app/qualityModifyInfo/updateStatus",{
  337. id: id,
  338. opCode: [3, 5][index]
  339. }).then((json)=>{
  340. if(json.result == 1){
  341. uni.showToast({
  342. title: '操作成功',
  343. mask: true
  344. });
  345. this.getDataInfo()
  346. } else {
  347. uni.showToast({
  348. title: `操作失败:${json.msg}`,
  349. duration: 1500,
  350. icon: 'none'
  351. });
  352. }
  353. })
  354. }
  355. }
  356. }
  357. </script>
  358. <style lang="scss">
  359. .hc-quality-info-view {
  360. background: white;
  361. .custom-picker-view {
  362. position: relative;
  363. }
  364. .page-bg-bar {
  365. position: fixed;
  366. left: 0;
  367. top: 0;
  368. width: 100%;
  369. height: 340rpx;
  370. border-radius: 0 0 160rpx 160rpx;
  371. background-color: rgba(47, 165, 255, 1);
  372. z-index: 1;
  373. }
  374. .hc-content-zindex.quality-info {
  375. position: relative;
  376. padding: 4rpx;
  377. z-index: 2;
  378. background: white;
  379. border-radius: 10rpx;
  380. margin: 19rpx 45rpx 45rpx;
  381. .cu-bar {
  382. height: 64rpx;
  383. .action {
  384. font-size: 30rpx;
  385. [class*="cuIcon-"] {
  386. font-size: 30rpx;
  387. }
  388. }
  389. }
  390. .hc-info-list-item {
  391. position: relative;
  392. padding: 20rpx;
  393. min-height: 66rpx;
  394. overflow: hidden;
  395. &::after {
  396. position: absolute;
  397. content: '';
  398. background: #f9f9f9;
  399. height: 2rpx;
  400. left: 22rpx;
  401. bottom: 0;
  402. right: 22rpx;
  403. }
  404. .title {
  405. position: absolute;
  406. width: 255rpx;
  407. color: #818181;
  408. }
  409. .content {
  410. position: relative;
  411. padding-left: 255rpx;
  412. text-align: right;
  413. white-space: break-spaces;
  414. hyphens: auto;
  415. word-wrap: break-word;
  416. }
  417. }
  418. .hc-form-img-box {
  419. position: relative;
  420. margin-bottom: 20rpx;
  421. padding: 0 14rpx;
  422. }
  423. .hc-file-list-box {
  424. position: relative;
  425. margin-bottom: 80rpx;
  426. padding: 0 24rpx;
  427. .file-item {
  428. position: relative;
  429. padding: 20rpx 0;
  430. border-bottom: 2rpx solid #f9f9f9;
  431. font-size: 26rpx;
  432. }
  433. }
  434. }
  435. }
  436. </style>