qualityInspection.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <template>
  2. <scroll-view scroll-y class="nav hc-qualityInspection-view" @scrolltolower="getList" style="height: 100vh;">
  3. <cu-custom bgColor="bg-blue1" :isBack="true">
  4. <block slot="backText"></block>
  5. <block slot="content">质量巡检</block>
  6. </cu-custom>
  7. <view class="page-bg-bar"/>
  8. <view class="cu-bar hc-search-bar">
  9. <view class="action">
  10. <uni-data-select class="action-data-select" :clear="false" v-model="searchForm.engineeringType" :localdata="typeData"/>
  11. </view>
  12. <view class="action">
  13. <uni-datetime-picker class="action-date-picker" v-model="pickerRange" type="daterange" @change="searchDateChange"/>
  14. </view>
  15. <view class="action">
  16. <button class="cu-btn bg-white" @click="searchClick">搜索</button>
  17. </view>
  18. </view>
  19. <!--列表-->
  20. <view class="hc-content-zindex">
  21. <template v-for="item in taskList">
  22. <view class="hc-data-card" @click="itemInfoTap(item)">
  23. <view class="title-box">
  24. <view class="title">工程名称</view>
  25. <view class="date">{{item.createTime}}</view>
  26. </view>
  27. <view class="name-bar">{{item.unitName}}</view>
  28. <view class="content-box">
  29. <view class="title">分部工程类别:</view>
  30. <view class="name">{{item.segmentName}}</view>
  31. <view class="right-icons">
  32. <uni-icons type="right" size="22" color="#858585"/>
  33. </view>
  34. <view class="tag-text">
  35. <view class="text-bar">
  36. <text class="type">病害类型:</text>
  37. <text class="text">{{getDiseaseType(item)}}</text>
  38. </view>
  39. <view class="text-bar">
  40. <text class="type">严重程度:</text>
  41. <text class="text" v-if="item.severity == 1">严重</text>
  42. <text class="text" v-else-if="item.severity == 2">轻微</text>
  43. <text class="text" v-else>一般</text>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="action">
  48. <button class="cu-btn bg-blue1" @click.stop="revocationTap(item)" v-if="item.status==1">撤回</button>
  49. <button class="cu-btn bg-grey" v-if="item.status==4">已撤</button>
  50. </view>
  51. </view>
  52. </template>
  53. </view>
  54. <!--底部按钮-->
  55. <view style="height: 174rpx;"/>
  56. <view class="fixed-bottom" style="z-index: 9;">
  57. <button type="primary" @click="newRecordTap">新增记录</button>
  58. </view>
  59. </scroll-view>
  60. </template>
  61. <script>
  62. export default {
  63. data() {
  64. return {
  65. title: "质量巡检",
  66. typeData: [
  67. {value: 1, text: '隧道工程'},
  68. {value: 2, text: '桥梁工程'}
  69. ],
  70. diseaseTypeData: [
  71. {value: 1, text: '蜂窝麻面', data: '面积小于该面总面积0.5%,深度小于10mm'},
  72. {value: 2, text: '错台', data: '加宽带端头错台'},
  73. {value: 3, text: '洞门端墙、挡土墙表面裂缝', data: '洞门挡土墙存在裂缝,裂缝宽度大于0.2mm'},
  74. {value: 4, text: '裂缝', data: '砼表面裂缝,环向/纵向'},
  75. {value: 5, text: '渗漏水', data: '洞内存在渗漏点'},
  76. ],
  77. diseaseTypeData1: [
  78. {value: 1, text: '蜂窝麻面', data: '面积为 m2,蜂窝总面积为所在面面积的 %。'},
  79. {value: 2, text: '裂缝', data: '裂缝长度L= m,最大宽度δ= mm,裂缝方向为 向。'},
  80. {value: 3, text: '模板接缝高差', data: '模板接缝处高差为 mm。'},
  81. {value: 4, text: '漏浆', data: '混凝土表面有 处漏浆现象。'},
  82. {value: 5, text: '空洞', data: '面积为 m2,深度为 mm。'},
  83. {value: 6, text: '钢筋外露', data: '面积为 m2。'},
  84. {value: 7, text: '建筑垃圾', data: '有 处未清除处理。'},
  85. {value: 8, text: '预埋件', data: '有 处未清除处理。'},
  86. {value: 9, text: '预制构件安装', data: '不平整度为 mm。'},
  87. {value: 10, text: '梁段间接缝', data: '高差为 mm。'},
  88. {value: 11, text: '梁段间色泽', data: ' 处存在差异。'},
  89. {value: 12, text: '梁段间错台', data: '长度为 m,高差为 mm。'},
  90. {value: 13, text: '主体钢结构外露涂装', data: '破损面积为 m2。'},
  91. {value: 14, text: '钢缆防蚀层', data: '破损面积为 m2。'},
  92. {value: 15, text: '湿接缝渗漏水', data: '长度为 m。'},
  93. {value: 16, text: '疏松', data: '面积为 m2,占所在面面积的 %,深度为 mm。'},
  94. {value: 17, text: '夹渣', data: '面积为 mm2。'},
  95. {value: 18, text: '掉皮、起砂', data: '面积为 mm2,占所在面面积的 %。'},
  96. {value: 19, text: '锥坡沉陷', data: '长度为 m,深度为 mm。'},
  97. {value: 20, text: '护坡沉陷', data: '长度为 m,深度为 mm。'},
  98. {value: 21, text: '内外轮廓线', data: '处不顺滑清晰。'},
  99. {value: 22, text: '栏杆、护栏', data: '处不牢固, 处不直顺。'},
  100. {value: 23, text: '沥青混凝土表面', data: '不平整密实,面积为 m2。'},
  101. {value: 24, text: '沥青混凝土泛油', data: '面积为 m2,占受检面面积的 %。'},
  102. {value: 25, text: '沥青混凝土松散', data: '面积为 m2,占受检面面积的 %。'},
  103. {value: 26, text: '沥青混凝土裂缝', data: '长度为 m,占受检面面积的 %。'},
  104. {value: 27, text: '沥青混凝土离析', data: '面积为 m2,占受检面面积的 %。'},
  105. {value: 28, text: '伸缩缝堵塞', data: '有 处堵塞。'},
  106. {value: 29, text: '伸缩缝变形', data: '有 处,长度为 m。'},
  107. {value: 30, text: '伸缩缝开裂', data: '有 处,长度为 m。'},
  108. {value: 31, text: '桥头跳车', data: '桥面与伸缩缝高差为 mm。'},
  109. {value: 32, text: '桥面排水不良', data: '有 处,面积为 m2。'},
  110. {value: 33, text: '支座安装偏歪', data: '横桥向左侧距梁中心 mm,横桥向右侧距梁中心 mm。'},
  111. {value: 34, text: '支座不均匀受力', data: '侧存在不均匀受力。'},
  112. {value: 35, text: '支座脱空', data: '面积为 / ,高度为 mm。'},
  113. {value: 36, text: '支座非正常变形', data: '存在 处非正常变形。'},
  114. {value: 37, text: '支座未按图纸布置', data: '存在 处支座未按图纸布置'},
  115. ],
  116. searchForm: {
  117. engineeringType: 1,
  118. startDate: '',
  119. endDate: '',
  120. diseaseType: '',
  121. severity: '',
  122. defectType: '',
  123. type: '',
  124. status: '',
  125. cs:1,
  126. pageSize:15,
  127. },
  128. page: 0,
  129. totalPage: 999,
  130. userid: null,
  131. project: null,
  132. taskList: [],
  133. pickerRange: [],
  134. }
  135. },
  136. onLoad() {
  137. const {id} = uni.getStorageSync("userInfo")
  138. this.project = uni.getStorageSync(`porject_${id}`);
  139. this.userid = id;
  140. },
  141. onShow() {
  142. this.searchClick();
  143. },
  144. methods: {
  145. searchDateChange(val) {
  146. if (val.length > 1) {
  147. this.searchForm.startDate = val[0];
  148. this.searchForm.endDate = val[1];
  149. } else {
  150. this.searchForm.startDate = '';
  151. this.searchForm.endDate = '';
  152. }
  153. },
  154. resetPage(){
  155. this.page = 0;
  156. this.totalPage = 999;
  157. this.taskList = [];
  158. },
  159. searchClick() {
  160. this.resetPage();
  161. this.getList();
  162. },
  163. getList() {
  164. if(this.page >= this.totalPage){
  165. return;
  166. }
  167. this.page++;
  168. let form = this.searchForm
  169. this.http.request("/app/qualityModifyInfo/page",{
  170. ...form,
  171. page: this.page,
  172. projectId:this.project.id,
  173. contractId:this.project.contractId,
  174. }).then((json)=>{
  175. if(json.result == 1){
  176. this.taskList = this.taskList.concat(json.datas);
  177. this.totalPage = json.totalPage;
  178. }
  179. })
  180. },
  181. //获取病害类型
  182. getDiseaseType({diseaseType}) {
  183. const {engineeringType} = this.searchForm
  184. let typeData = [], index = diseaseType ? diseaseType - 1 : 0;
  185. if (engineeringType == 1) {
  186. typeData = this.diseaseTypeData
  187. } else if (engineeringType == 2) {
  188. typeData = this.diseaseTypeData1
  189. }
  190. //获取数据
  191. if (typeData.length > 0) {
  192. return typeData[index].text
  193. } else {
  194. return ''
  195. }
  196. },
  197. //查看详情
  198. itemInfoTap({id}) {
  199. uni.navigateTo({
  200. url: '/pages/qualityInspection_fj/qualityInfo?id=' + id
  201. })
  202. },
  203. //撤回
  204. revocationTap({id}) {
  205. this.http.request("/app/qualityModifyInfo/updateStatus",{
  206. id: id,
  207. opCode: 4
  208. }).then((json)=>{
  209. if(json.result == 1){
  210. uni.showToast({
  211. title: '操作成功',
  212. mask: true
  213. });
  214. this.searchClick()
  215. } else {
  216. uni.showToast({
  217. title: `操作失败:${json.msg}`,
  218. duration: 1500,
  219. icon: 'none'
  220. });
  221. }
  222. })
  223. },
  224. //新增记录
  225. newRecordTap() {
  226. uni.navigateTo({
  227. url: '/pages/qualityInspection_fj/addInspection'
  228. })
  229. },
  230. },
  231. }
  232. </script>
  233. <style lang="scss">
  234. page {
  235. background-color: #EFEFEF;
  236. }
  237. .hc-qualityInspection-view {
  238. .page-bg-bar {
  239. position: fixed;
  240. left: 0;
  241. top: 0;
  242. width: 100%;
  243. height: 340rpx;
  244. border-radius: 0 0 160rpx 160rpx;
  245. background-color: rgba(47, 165, 255, 1);
  246. z-index: 1;
  247. }
  248. .hc-search-bar {
  249. position: sticky;
  250. top: 0;
  251. border: 2rpx solid rgba(255, 255, 255, .20);
  252. border-left: 0;
  253. border-right: 0;
  254. z-index: 222;
  255. .action {
  256. .action-data-select {
  257. width: 182rpx;
  258. flex: 182rpx;
  259. }
  260. .cu-btn {
  261. height: 54rpx;
  262. padding: 0 22rpx;
  263. font-size: 24rpx;
  264. border-radius: 6rpx;
  265. }
  266. }
  267. }
  268. .hc-content-zindex {
  269. position: relative;
  270. padding: 26rpx;
  271. z-index: 2;
  272. }
  273. .hc-data-card {
  274. .title-box {
  275. position: relative;
  276. padding: 10px;
  277. display: flex;
  278. align-items: center;
  279. justify-content: space-between;
  280. .title {
  281. font-weight: bold;
  282. }
  283. }
  284. .name-bar {
  285. padding: 0 10px 10px;
  286. position: relative;
  287. border-bottom: 1px solid #eee;
  288. }
  289. .content-box {
  290. position: relative;
  291. padding: 10px;
  292. .title {
  293. color: #858585;
  294. }
  295. .name {
  296. position: relative;
  297. padding: 12px 24px 12px 0;
  298. }
  299. .right-icons {
  300. position: absolute;
  301. right: 10px;
  302. bottom: 48%;
  303. }
  304. .tag-text {
  305. position: relative;
  306. display: flex;
  307. align-items: center;
  308. font-size: 14px;
  309. margin-top: 16px;
  310. .text-bar .type {
  311. color: #858585;
  312. }
  313. .text-bar + .text-bar {
  314. margin-left: 14px;
  315. }
  316. }
  317. }
  318. .action {
  319. position: absolute;
  320. right: 5px;
  321. bottom: 5px;
  322. .cu-btn {
  323. width: 40px;
  324. height: 40px;
  325. border-radius: 50%;
  326. font-size: 14px;
  327. }
  328. }
  329. }
  330. .fixed-bottom {
  331. position: fixed;
  332. bottom: 0;
  333. width: 100%;
  334. background-color: #fff;
  335. padding: 34rpx 34rpx calc(var(--window-bottom) + 38rpx);
  336. box-shadow: 0 -12rpx 10rpx -12rpx rgba(215, 224, 253, 100);
  337. }
  338. }
  339. </style>