gasreport.vue 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756
  1. <template>
  2. <view class="gas-report" name="gasreport">
  3. <u-navbar title="瓦斯上报" :safeAreaInsetTop="true" leftIcon=""> </u-navbar>
  4. <view class="gas-content">
  5. <!-- 瓦斯上报列表 -->
  6. <view v-if="!isShowAdd && !isShowEdit">
  7. <view class="top-gas-list">
  8. <view class="search-box" @click="getChangeTimeTb">
  9. <text class="dialog-label">填报时间:</text>
  10. <u--input v-model="tbTime" placeholder="请选择填报时间" inputAlign="center"
  11. suffixIcon="arrow-right"></u--input>
  12. <u-datetime-picker :show="showCalendarTb" v-model="timeRan" mode="date" closeOnClickOverlay
  13. @confirm="confirmTb" @cancel="showCalendarTb = false" @change="changeTb"
  14. @close="showCalendarTb = false"></u-datetime-picker>
  15. </view>
  16. <u-button type="primary" size="small" style="margin: 2px 0px;" @click="getAdd">新增</u-button>
  17. </view>
  18. <view class="bot-gas-list">
  19. <view class="top-title">
  20. <view style="font-weight: bold;">瓦斯填报列表</view>
  21. </view>
  22. <view class="top-content" v-for="(item, index) in gasList" :key="index">
  23. <view class="content-title-gas">
  24. <text>
  25. {{ item.strInstallPos || '--' }}
  26. </text>
  27. <!-- <u-icon class="icon-gas-edit" name="edit-pen-fill" color="#0eb4fc" size="16"
  28. @click="getEdit(item)"></u-icon>
  29. <u-icon class="icon-gas-del" name="trash" color="#0eb4fc" size="16"
  30. @click="getDel(item)"></u-icon> -->
  31. </view>
  32. <view class="content-item-box">
  33. <view class="content-item">
  34. <view class="item-l">
  35. <view class="item-value">{{ item.timeEarly1 || '--' }}</view>
  36. <view class="item-label">早班测量时间一</view>
  37. </view>
  38. <view class="item-c"></view>
  39. <view class="item-r">
  40. <view class="item-value">{{ item.timeEarly2 || '--' }}</view>
  41. <view class="item-label">早班测量时间二</view>
  42. </view>
  43. </view>
  44. <view class="content-item">
  45. <view class="item-l">
  46. <view class="item-value">{{ item.timeNoon1 || '--' }}</view>
  47. <view class="item-label">午班测量时间一</view>
  48. </view>
  49. <view class="item-c"></view>
  50. <view class="item-r">
  51. <view class="item-value">{{ item.timeNoon2 || '--' }}</view>
  52. <view class="item-label">午班测量时间二</view>
  53. </view>
  54. </view>
  55. <view class="content-item">
  56. <view class="item-l">
  57. <view class="item-value">{{ item.timeNight1 || '--' }}</view>
  58. <view class="item-label">晚班测量时间一</view>
  59. </view>
  60. <view class="item-c"></view>
  61. <view class="item-r">
  62. <view class="item-value">{{ item.timeNight2 || '--' }}</view>
  63. <view class="item-label">晚班测量时间二</view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. </view>
  70. <!-- 新增弹窗 -->
  71. <view v-if="isShowAdd">
  72. <view class="top-dialog-area">
  73. <view class="dialog-item">
  74. <text class="dialog-label">班次:</text>
  75. <uni-data-select placeholder="请选择班次" align="center" :clear="true" v-model="formState.bc"
  76. :localdata="rangeBc" @change="changeBc"></uni-data-select>
  77. </view>
  78. <view class="dialog-item">
  79. <text class="dialog-label">煤层工作面:</text>
  80. <uni-data-select placeholder="请选择煤层工作面" align="center" :clear="true" v-model="formState.mcgzm"
  81. :localdata="rangeMcgzm" @change="changeMc"></uni-data-select>
  82. </view>
  83. <view class="dialog-item">
  84. <text class="dialog-label">检测地点:</text>
  85. <uni-data-select placeholder="请选择检测地点" align="center" :clear="true" v-model="formState.jcdd"
  86. :localdata="rangeJcdd" @change="changeJc"></uni-data-select>
  87. </view>
  88. <view class="dialog-item">
  89. <text class="dialog-label">检测次数:</text>
  90. <uni-data-select placeholder="请选择检测次数" align="center" :clear="true" v-model="formState.count"
  91. :localdata="rangeCount" @change="changeCount"></uni-data-select>
  92. </view>
  93. <view class="dialog-item" @click="getChangeTime">
  94. <text class="dialog-label">检测时间:</text>
  95. <u--input v-model="formState.time" placeholder="请选择检测时间" inputAlign="center"
  96. suffixIcon="arrow-right"></u--input>
  97. <u-datetime-picker :show="showCalendar" v-model="timeRan" mode="datetime" closeOnClickOverlay
  98. @confirm="showCalendar = false" @cancel="showCalendar = false" @change="change"
  99. @close="showCalendar = false"></u-datetime-picker>
  100. </view>
  101. <view class="dialog-item">
  102. <text class="dialog-label">填报日期:</text>
  103. <u--input inputAlign="center" v-model="formState.tbrq" placeholder="请选择填报日期"></u--input>
  104. </view>
  105. <view class="dialog-item">
  106. <text class="dialog-label">瓦斯检查工:</text>
  107. <u--input inputAlign="center" disabled v-model="formState.jcy" placeholder="请输入"></u--input>
  108. </view>
  109. </view>
  110. <view>
  111. <view class="center-dialog-area">
  112. <div class="dialog-title">气体监测数据</div>
  113. <view class="dialog-item">
  114. <text class="dialog-label">CH₄:</text>
  115. <u--input inputAlign="center" v-model="formState.ch4" placeholder="请输入"></u--input>
  116. </view>
  117. <view class="dialog-item">
  118. <text class="dialog-label">CO₂:</text>
  119. <u--input inputAlign="center" v-model="formState.co2"
  120. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurCO2"
  121. :placeholderStyle="isRule ? 'color:#c0c4cc' : 'color:#ff0000'"></u--input>
  122. </view>
  123. <view class="dialog-item">
  124. <text class="dialog-label">CO:</text>
  125. <u--input inputAlign="center" v-model="formState.co"
  126. :placeholder="isRule14 ? '请输入' : '最大可输入值为24'"
  127. :placeholderStyle="isRule14 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  128. @blur="getBlurCO"></u--input>
  129. </view>
  130. <view class="dialog-item">
  131. <text class="dialog-label">O₂:</text>
  132. <u--input inputAlign="center" v-model="formState.o2" placeholder="请输入"></u--input>
  133. </view>
  134. <view class="dialog-item">
  135. <text class="dialog-label">温度:</text>
  136. <u--input inputAlign="center" v-model="formState.temp" placeholder="请输入"></u--input>
  137. </view>
  138. </view>
  139. <view class="bottom-dialog-area">
  140. <div class="dialog-title">三对照数据</div>
  141. <view class="dialog-item">
  142. <text class="dialog-label">甲烷传感器:</text>
  143. <u--input inputAlign="center" v-model="formState.jw" placeholder="请输入"></u--input>
  144. </view>
  145. <view class="dialog-item">
  146. <text class="dialog-label">光瓦测量数据:</text>
  147. <u--input inputAlign="center" v-model="formState.gw"
  148. :placeholder="isRule1 ? '请输入' : '请输入偶数'" type="number" @blur="getBlur"
  149. :placeholderStyle="isRule1 ? 'color:#c0c4cc' : 'color:#ff0000'"></u--input>
  150. </view>
  151. <view class="dialog-item">
  152. <text class="dialog-label">便携仪测量数据:</text>
  153. <u--input inputAlign="center" v-model="formState.bxy" placeholder="请输入"></u--input>
  154. </view>
  155. </view>
  156. </view>
  157. <view class="dialog-btn">
  158. <u-button type="success" size="small" @click="getConfirm">保存</u-button>
  159. <u-button type="primary" size="small" @click="getCancel">取消</u-button>
  160. </view>
  161. </view>
  162. <!-- 预览弹窗 -->
  163. <view v-if="isShowEdit">
  164. <view class="center-dialog-area">
  165. <div class="dialog-title">早班第一次检测数据</div>
  166. <view class="dialog-item" @click="getChangeZb1">
  167. <text class="dialog-label">检测时间:</text>
  168. <u--input v-model="formStateEdit.timeEarly1" :disabled="formStateEdit.timeEarly1 == ''"
  169. placeholder="请选择检测时间" inputAlign="center" suffixIcon="arrow-right"></u--input>
  170. </view>
  171. <view class="dialog-item">
  172. <text class="dialog-label">瓦斯检查工:</text>
  173. <u--input inputAlign="center" :disabled="formStateEdit.checkPersonEarly == ''"
  174. v-model="formStateEdit.checkPersonEarly" placeholder="请输入"></u--input>
  175. <u-datetime-picker :show="showZb1" v-model="timeRan" mode="datetime" closeOnClickOverlay
  176. @confirm="showZb1 = false" @cancel="showZb1 = false" @change="changeZb1"
  177. @close="showZb1 = false"></u-datetime-picker>
  178. </view>
  179. <view class="dialog-item">
  180. <text class="dialog-label">CH₄:</text>
  181. <u--input inputAlign="center" v-model="formStateEdit.ch4Early1" placeholder="请输入"
  182. :disabled="formStateEdit.ch4Early1 == ''"></u--input>
  183. </view>
  184. <view class="dialog-item">
  185. <text class="dialog-label">CO₂:</text>
  186. <u--input inputAlign="center" v-model="formStateEdit.co2Early1"
  187. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurFCo2"
  188. :placeholderStyle="isRule2 ? 'color:#c0c4cc' : 'color:#ff0000'"
  189. :disabled="formStateEdit.co2Early1 == ''"></u--input>
  190. </view>
  191. <view class="dialog-item">
  192. <text class="dialog-label">CO:</text>
  193. <u--input inputAlign="center" v-model="formStateEdit.coEarly1"
  194. :placeholder="isRule15 ? '请输入' : '最大可输入值为24'"
  195. :placeholderStyle="isRule15 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  196. :disabled="formStateEdit.coEarly1 == ''" @blur="getBlurCO1"></u--input>
  197. </view>
  198. <view class="dialog-item">
  199. <text class="dialog-label">O₂:</text>
  200. <u--input inputAlign="center" v-model="formStateEdit.o2Early1" placeholder="请输入"
  201. :disabled="formStateEdit.o2Early1 == ''"></u--input>
  202. </view>
  203. <view class="dialog-item">
  204. <text class="dialog-label">温度:</text>
  205. <u--input inputAlign="center" v-model="formStateEdit.tEarly1" placeholder="请输入"
  206. :disabled="formStateEdit.tEarly1 == ''"></u--input>
  207. </view>
  208. <view class="dialog-item">
  209. <text class="dialog-label">甲烷传感器:</text>
  210. <u--input inputAlign="center" v-model="formStateEdit.jwSdzEarly1" placeholder="请输入"
  211. :disabled="formStateEdit.jwSdzEarly1 == ''"></u--input>
  212. </view>
  213. <view class="dialog-item">
  214. <text class="dialog-label">光瓦测量数据:</text>
  215. <u--input inputAlign="center" v-model="formStateEdit.gwSdzEarly1"
  216. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurF"
  217. :placeholderStyle="isRule3 ? 'color:#c0c4cc' : 'color:#ff0000'"
  218. :disabled="formStateEdit.gwSdzEarly1 == ''"></u--input>
  219. </view>
  220. <view class="dialog-item">
  221. <text class="dialog-label">便携仪测量数据:</text>
  222. <u--input inputAlign="center" v-model="formStateEdit.bxySdzEarly1" placeholder="请输入"
  223. :disabled="formStateEdit.bxySdzEarly1 == ''"></u--input>
  224. </view>
  225. </view>
  226. <view class="center-dialog-area">
  227. <div class="dialog-title">早班第二次检测数据</div>
  228. <view class="dialog-item" @click="getChangeZb2">
  229. <text class="dialog-label">检测时间:</text>
  230. <u--input v-model="formStateEdit.timeEarly2" placeholder="请选择检测时间" inputAlign="center"
  231. suffixIcon="arrow-right" :disabled="formStateEdit.timeEarly2 == ''"></u--input>
  232. <u-datetime-picker :show="showZb2" v-model="timeRan" mode="datetime" closeOnClickOverlay
  233. @confirm="showZb2 = false" @cancel="showZb2 = false" @change="changeZb2"
  234. @close="showZb2 = false"></u-datetime-picker>
  235. </view>
  236. <view class="dialog-item">
  237. <text class="dialog-label">瓦斯检查工:</text>
  238. <u--input inputAlign="center" :disabled="formStateEdit.checkPersonEarly == ''"
  239. v-model="formStateEdit.checkPersonEarly" placeholder="请输入"></u--input>
  240. </view>
  241. <view class="dialog-item">
  242. <text class="dialog-label">CH₄:</text>
  243. <u--input inputAlign="center" v-model="formStateEdit.ch4Early2" placeholder="请输入"
  244. :disabled="formStateEdit.ch4Early2 == ''"></u--input>
  245. </view>
  246. <view class="dialog-item">
  247. <text class="dialog-label">CO₂:</text>
  248. <u--input inputAlign="center" v-model="formStateEdit.co2Early2"
  249. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurSCo2"
  250. :placeholderStyle="isRule4 ? 'color:#c0c4cc' : 'color:#ff0000'"
  251. :disabled="formStateEdit.co2Early2 == ''"></u--input>
  252. </view>
  253. <view class="dialog-item">
  254. <text class="dialog-label">CO:</text>
  255. <u--input inputAlign="center" v-model="formStateEdit.coEarly2"
  256. :placeholder="isRule16 ? '请输入' : '最大可输入值为24'"
  257. :placeholderStyle="isRule16 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  258. @blur="getBlurC2" :disabled="formStateEdit.coEarly2 == ''"></u--input>
  259. </view>
  260. <view class="dialog-item">
  261. <text class="dialog-label">O₂:</text>
  262. <u--input inputAlign="center" v-model="formStateEdit.o2Early2" placeholder="请输入"
  263. :disabled="formStateEdit.o2Early2 == ''"></u--input>
  264. </view>
  265. <view class="dialog-item">
  266. <text class="dialog-label">温度:</text>
  267. <u--input inputAlign="center" v-model="formStateEdit.tEarly2" placeholder="请输入"
  268. :disabled="formStateEdit.tEarly2 == ''"></u--input>
  269. </view>
  270. <view class="dialog-item">
  271. <text class="dialog-label">甲烷传感器:</text>
  272. <u--input inputAlign="center" v-model="formStateEdit.jwSdzEarly2" placeholder="请输入"
  273. :disabled="formStateEdit.jwSdzEarly2 == ''"></u--input>
  274. </view>
  275. <view class="dialog-item">
  276. <text class="dialog-label">光瓦测量数据:</text>
  277. <u--input inputAlign="center" v-model="formStateEdit.gwSdzEarly2"
  278. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurS"
  279. :placeholderStyle="isRule5 ? 'color:#c0c4cc' : 'color:#ff0000'"
  280. :disabled="formStateEdit.gwSdzEarly2 == ''"></u--input>
  281. </view>
  282. <view class="dialog-item">
  283. <text class="dialog-label">便携仪测量数据:</text>
  284. <u--input inputAlign="center" v-model="formStateEdit.bxySdzEarly2" placeholder="请输入"
  285. :disabled="formStateEdit.bxySdzEarly2 == ''"></u--input>
  286. </view>
  287. </view>
  288. <view class="center-dialog-area">
  289. <div class="dialog-title">午班第一次检测数据</div>
  290. <view class="dialog-item" @click="getChangeWb1">
  291. <text class="dialog-label">检测时间:</text>
  292. <u--input v-model="formStateEdit.timeNoon1" placeholder="请选择检测时间" inputAlign="center"
  293. suffixIcon="arrow-right" :disabled="formStateEdit.timeNoon1 == ''"></u--input>
  294. <u-datetime-picker :show="showWb1" v-model="timeRan" mode="datetime" closeOnClickOverlay
  295. @confirm="showWb1 = false" @cancel="showWb1 = false" @change="changeWb1"
  296. @close="showWb1 = false"></u-datetime-picker>
  297. </view>
  298. <view class="dialog-item">
  299. <text class="dialog-label">瓦斯检查工:</text>
  300. <u--input inputAlign="center" :disabled="formStateEdit.checkPersonNoon == ''"
  301. v-model="formStateEdit.checkPersonNoon" placeholder="请输入"></u--input>
  302. </view>
  303. <view class="dialog-item">
  304. <text class="dialog-label">CH₄:</text>
  305. <u--input inputAlign="center" v-model="formStateEdit.ch4Noon1" placeholder="请输入"
  306. :disabled="formStateEdit.ch4Noon1 == ''"></u--input>
  307. </view>
  308. <view class="dialog-item">
  309. <text class="dialog-label">CO₂:</text>
  310. <u--input inputAlign="center" v-model="formStateEdit.co2Noon1"
  311. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurF1"
  312. :placeholderStyle="isRule6 ? 'color:#c0c4cc' : 'color:#ff0000'"
  313. :disabled="formStateEdit.co2Noon1 == ''"></u--input>
  314. </view>
  315. <view class="dialog-item">
  316. <text class="dialog-label">CO:</text>
  317. <u--input inputAlign="center" v-model="formStateEdit.coNoon1"
  318. :placeholder="isRule17 ? '请输入' : '最大可输入值为24'"
  319. :placeholderStyle="isRule17 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  320. @blur="getBlurCO3" :disabled="formStateEdit.coNoon1 == ''"></u--input>
  321. </view>
  322. <view class="dialog-item">
  323. <text class="dialog-label">O₂:</text>
  324. <u--input inputAlign="center" v-model="formStateEdit.o2Noon1" placeholder="请输入"
  325. :disabled="formStateEdit.o2Noon1 == ''"></u--input>
  326. </view>
  327. <view class="dialog-item">
  328. <text class="dialog-label">温度:</text>
  329. <u--input inputAlign="center" v-model="formStateEdit.tNoon1" placeholder="请输入"
  330. :disabled="formStateEdit.tNoon1 == ''"></u--input>
  331. </view>
  332. <view class="dialog-item">
  333. <text class="dialog-label">甲烷传感器:</text>
  334. <u--input inputAlign="center" v-model="formStateEdit.jwSdzNoon1" placeholder="请输入"
  335. :disabled="formStateEdit.jwSdzNoon1 == ''"></u--input>
  336. </view>
  337. <view class="dialog-item">
  338. <text class="dialog-label">光瓦测量数据:</text>
  339. <u--input inputAlign="center" v-model="formStateEdit.gwSdzNoon1"
  340. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurG1"
  341. :placeholderStyle="isRule7 ? 'color:#c0c4cc' : 'color:#ff0000'"
  342. :disabled="formStateEdit.gwSdzNoon1 == ''"></u--input>
  343. </view>
  344. <view class="dialog-item">
  345. <text class="dialog-label">便携仪测量数据:</text>
  346. <u--input inputAlign="center" v-model="formStateEdit.bxySdzNoon1" placeholder="请输入"
  347. :disabled="formStateEdit.bxySdzNoon1 == ''"></u--input>
  348. </view>
  349. </view>
  350. <view class="center-dialog-area">
  351. <div class="dialog-title">午班第二次检测数据</div>
  352. <view class="dialog-item" @click="getChangeWb2">
  353. <text class="dialog-label">检测时间:</text>
  354. <u--input v-model="formStateEdit.timeNoon2" placeholder="请选择检测时间" inputAlign="center"
  355. suffixIcon="arrow-right" :disabled="formStateEdit.timeNoon2 == ''"></u--input>
  356. <u-datetime-picker :show="showWb2" v-model="timeRan" mode="datetime" closeOnClickOverlay
  357. @confirm="showWb2 = false" @cancel="showWb2 = false" @change="changeWb2"
  358. @close="showWb2 = false"></u-datetime-picker>
  359. </view>
  360. <view class="dialog-item">
  361. <text class="dialog-label">瓦斯检查工:</text>
  362. <u--input inputAlign="center" :disabled="formStateEdit.checkPersonNoon == ''"
  363. v-model="formStateEdit.checkPersonNoon" placeholder="请输入"></u--input>
  364. </view>
  365. <view class="dialog-item">
  366. <text class="dialog-label">CH₄:</text>
  367. <u--input inputAlign="center" v-model="formStateEdit.ch4Noon2" placeholder="请输入"
  368. :disabled="formStateEdit.ch4Noon2 == ''"></u--input>
  369. </view>
  370. <view class="dialog-item">
  371. <text class="dialog-label">CO₂:</text>
  372. <u--input inputAlign="center" v-model="formStateEdit.co2Noon2"
  373. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurF2"
  374. :placeholderStyle="isRule8 ? 'color:#c0c4cc' : 'color:#ff0000'"
  375. :disabled="formStateEdit.co2Noon2 == ''"></u--input>
  376. </view>
  377. <view class="dialog-item">
  378. <text class="dialog-label">CO:</text>
  379. <u--input inputAlign="center" v-model="formStateEdit.coNoon2"
  380. :placeholder="isRule18 ? '请输入' : '最大可输入值为24'"
  381. :placeholderStyle="isRule18 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  382. @blur="getBlurCO4" :disabled="formStateEdit.coNoon2 == ''"></u--input>
  383. </view>
  384. <view class="dialog-item">
  385. <text class="dialog-label">O₂:</text>
  386. <u--input inputAlign="center" v-model="formStateEdit.o2Noon2" placeholder="请输入"
  387. :disabled="formStateEdit.o2Noon2 == ''"></u--input>
  388. </view>
  389. <view class="dialog-item">
  390. <text class="dialog-label">温度:</text>
  391. <u--input inputAlign="center" v-model="formStateEdit.tNoon2" placeholder="请输入"
  392. :disabled="formStateEdit.tNoon2 == ''"></u--input>
  393. </view>
  394. <view class="dialog-item">
  395. <text class="dialog-label">甲烷传感器:</text>
  396. <u--input inputAlign="center" v-model="formStateEdit.jwSdzNoon2" placeholder="请输入"
  397. :disabled="formStateEdit.jwSdzNoon2 == ''"></u--input>
  398. </view>
  399. <view class="dialog-item">
  400. <text class="dialog-label">光瓦测量数据:</text>
  401. <u--input inputAlign="center" v-model="formStateEdit.gwSdzNoon2"
  402. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurG2"
  403. :placeholderStyle="isRule9 ? 'color:#c0c4cc' : 'color:#ff0000'"
  404. :disabled="formStateEdit.gwSdzNoon2 == ''"></u--input>
  405. </view>
  406. <view class="dialog-item">
  407. <text class="dialog-label">便携仪测量数据:</text>
  408. <u--input inputAlign="center" v-model="formStateEdit.bxySdzNoon2" placeholder="请输入"
  409. :disabled="formStateEdit.bxySdzNoon2 == ''"></u--input>
  410. </view>
  411. </view>
  412. <view class="center-dialog-area">
  413. <div class="dialog-title">晚班第一次检测数据</div>
  414. <view class="dialog-item" @click="getChangeNb1">
  415. <text class="dialog-label">检测时间:</text>
  416. <u--input v-model="formStateEdit.timeNight1" placeholder="请选择检测时间" inputAlign="center"
  417. suffixIcon="arrow-right" :disabled="formStateEdit.timeNight1 == ''"></u--input>
  418. <u-datetime-picker :show="showNb1" v-model="timeRan" mode="datetime" closeOnClickOverlay
  419. @confirm="showNb1 = false" @cancel="showNb1 = false" @change="changeNb1"
  420. @close="showNb1 = false"></u-datetime-picker>
  421. </view>
  422. <view class="dialog-item">
  423. <text class="dialog-label">瓦斯检查工:</text>
  424. <u--input inputAlign="center" :disabled="formStateEdit.checkPersonNight == ''"
  425. v-model="formStateEdit.checkPersonNight" placeholder="请输入"></u--input>
  426. </view>
  427. <view class="dialog-item">
  428. <text class="dialog-label">CH₄:</text>
  429. <u--input inputAlign="center" v-model="formStateEdit.ch4Night1" placeholder="请输入"
  430. :disabled="formStateEdit.ch4Night1 == ''"></u--input>
  431. </view>
  432. <view class="dialog-item">
  433. <text class="dialog-label">CO₂:</text>
  434. <u--input inputAlign="center" v-model="formStateEdit.co2Night1"
  435. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurN1"
  436. :placeholderStyle="isRule10 ? 'color:#c0c4cc' : 'color:#ff0000'"
  437. :disabled="formStateEdit.co2Night1 == ''"></u--input>
  438. </view>
  439. <view class="dialog-item">
  440. <text class="dialog-label">CO:</text>
  441. <u--input inputAlign="center" v-model="formStateEdit.coNight1"
  442. :placeholder="isRule19 ? '请输入' : '最大可输入值为24'"
  443. :placeholderStyle="isRule19 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  444. @blur="getBlurCO5" :disabled="formStateEdit.coNight1 == ''"></u--input>
  445. </view>
  446. <view class="dialog-item">
  447. <text class="dialog-label">O₂:</text>
  448. <u--input inputAlign="center" v-model="formStateEdit.o2Night1" placeholder="请输入"
  449. :disabled="formStateEdit.o2Night1 == ''"></u--input>
  450. </view>
  451. <view class="dialog-item">
  452. <text class="dialog-label">温度:</text>
  453. <u--input inputAlign="center" v-model="formStateEdit.tNight1" placeholder="请输入"
  454. :disabled="formStateEdit.tNight1 == ''"></u--input>
  455. </view>
  456. <view class="dialog-item">
  457. <text class="dialog-label">甲烷传感器:</text>
  458. <u--input inputAlign="center" v-model="formStateEdit.jwSdzNight1" placeholder="请输入"
  459. :disabled="formStateEdit.jwSdzNight1 == ''"></u--input>
  460. </view>
  461. <view class="dialog-item">
  462. <text class="dialog-label">光瓦测量数据:</text>
  463. <u--input inputAlign="center" v-model="formStateEdit.gwSdzNight1"
  464. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurNG1"
  465. :placeholderStyle="isRule11 ? 'color:#c0c4cc' : 'color:#ff0000'"
  466. :disabled="formStateEdit.gwSdzNight1 == ''"></u--input>
  467. </view>
  468. <view class="dialog-item">
  469. <text class="dialog-label">便携仪测量数据:</text>
  470. <u--input inputAlign="center" v-model="formStateEdit.bxySdzNight1" placeholder="请输入"
  471. :disabled="formStateEdit.bxySdzNight1 == ''"></u--input>
  472. </view>
  473. </view>
  474. <view class="center-dialog-area">
  475. <div class="dialog-title">晚班第二次检测数据</div>
  476. <view class="dialog-item" @click="getChangeNb2">
  477. <text class="dialog-label">检测时间:</text>
  478. <u--input v-model="formStateEdit.timeNight2" placeholder="请选择检测时间" inputAlign="center"
  479. suffixIcon="arrow-right" :disabled="formStateEdit.timeNight2 == ''"></u--input>
  480. <u-datetime-picker :show="showNb2" v-model="timeRan" mode="datetime" closeOnClickOverlay
  481. @confirm="showNb2 = false" @cancel="showNb2 = false" @change="changeNb2"
  482. @close="showNb2 = false"></u-datetime-picker>
  483. </view>
  484. <view class="dialog-item">
  485. <text class="dialog-label">瓦斯检查工:</text>
  486. <u--input inputAlign="center" :disabled="formStateEdit.checkPersonNight == ''"
  487. v-model="formStateEdit.checkPersonNight" placeholder="请输入"></u--input>
  488. </view>
  489. <view class="dialog-item">
  490. <text class="dialog-label">CH₄:</text>
  491. <u--input inputAlign="center" v-model="formStateEdit.ch4Night2" placeholder="请输入"
  492. :disabled="formStateEdit.ch4Night2 == ''"></u--input>
  493. </view>
  494. <view class="dialog-item">
  495. <text class="dialog-label">CO₂:</text>
  496. <u--input inputAlign="center" v-model="formStateEdit.co2Night2"
  497. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurN2"
  498. :placeholderStyle="isRule12 ? 'color:#c0c4cc' : 'color:#ff0000'"
  499. :disabled="formStateEdit.co2Night2 == ''"></u--input>
  500. </view>
  501. <view class="dialog-item">
  502. <text class="dialog-label">CO:</text>
  503. <u--input inputAlign="center" v-model="formStateEdit.coNight2"
  504. :placeholder="isRule20 ? '请输入' : '最大可输入值为24'"
  505. :placeholderStyle="isRule20 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  506. @blur="getBlurCO6" :disabled="formStateEdit.coNight2 == ''"></u--input>
  507. </view>
  508. <view class="dialog-item">
  509. <text class="dialog-label">O₂:</text>
  510. <u--input inputAlign="center" v-model="formStateEdit.o2Night2" placeholder="请输入"
  511. :disabled="formStateEdit.o2Night2 == ''"></u--input>
  512. </view>
  513. <view class="dialog-item">
  514. <text class="dialog-label">温度:</text>
  515. <u--input inputAlign="center" v-model="formStateEdit.tNight2" placeholder="请输入"
  516. :disabled="formStateEdit.tNight2 == ''"></u--input>
  517. </view>
  518. <view class="dialog-item">
  519. <text class="dialog-label">甲烷传感器:</text>
  520. <u--input inputAlign="center" v-model="formStateEdit.jwSdzNight2" placeholder="请输入"
  521. :disabled="formStateEdit.jwSdzNight2 == ''"></u--input>
  522. </view>
  523. <view class="dialog-item">
  524. <text class="dialog-label">光瓦测量数据:</text>
  525. <u--input inputAlign="center" v-model="formStateEdit.gwSdzNight2"
  526. :placeholder="isRule ? '请输入' : '请输入偶数'" type="number" @blur="getBlurNG2"
  527. :placeholderStyle="isRule13 ? 'color:#c0c4cc' : 'color:#ff0000'"
  528. :disabled="formStateEdit.gwSdzNight2 == ''"></u--input>
  529. </view>
  530. <view class="dialog-item">
  531. <text class="dialog-label">便携仪测量数据:</text>
  532. <u--input inputAlign="center" v-model="formStateEdit.bxySdzNight2" placeholder="请输入"
  533. :disabled="formStateEdit.bxySdzNight2 == ''"></u--input>
  534. </view>
  535. </view>
  536. <view class="dialog-btn">
  537. <u-button type="success" size="small" v-if="isSaveEdit.length != 0 ? true : false"
  538. @click="confirmEdit">保存</u-button>
  539. <u-button type="primary" size="small" @click="cancelEdit">取消</u-button>
  540. </view>
  541. </view>
  542. </view>
  543. </view>
  544. </template>
  545. <script>
  546. import api from "@/api/api";
  547. import moment from 'moment'
  548. import { mapGetters } from "vuex";
  549. export default {
  550. name: 'gasreport',
  551. props: {},
  552. watch: {},
  553. data() {
  554. return {
  555. deviceId: '',
  556. rangeBc: [
  557. { value: '夜班', text: "夜班" },
  558. { value: '早班', text: "早班" },
  559. { value: '中班', text: "中班" },
  560. ],
  561. rangeMcgzm: [],
  562. rangeJcdd: [],
  563. rangeCount: [
  564. { value: '第一次', text: '第一次' },
  565. { value: '第二次', text: '第二次' },
  566. ],
  567. isRule: true,
  568. isRule1: true,
  569. isRule2: true,
  570. isRule3: true,
  571. isRule4: true,
  572. isRule5: true,
  573. isRule6: true,
  574. isRule7: true,
  575. isRule8: true,
  576. isRule9: true,
  577. isRule10: true,
  578. isRule11: true,
  579. isRule12: true,
  580. isRule13: true,
  581. isRule14: true,
  582. isRule15: true,
  583. isRule16: true,
  584. isRule17: true,
  585. isRule18: true,
  586. isRule19: true,
  587. isRule20: true,
  588. //新增参数信息
  589. isShowAdd: false,//是否显示新增弹窗
  590. isShowEdit: false,
  591. dialogAction: [],//下拉选项列表
  592. showCalendar: false,//控制日期选型下拉开启
  593. showCalendar1: false,
  594. timeRan: Number(new Date()),
  595. gasList: [],//瓦斯填报列表数据
  596. tbTime: null,//查询条件-填报时间
  597. showCalendarTb: false,//控制填报时间组件弹出
  598. saveShow: '',
  599. saveShowList: {},
  600. formState: {
  601. id: '',
  602. bc: '',
  603. count: '',
  604. jcdd: '',
  605. jcy: '',
  606. time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  607. ch4: '',
  608. co2: '',
  609. co: '',
  610. o2: '',
  611. jw: '',
  612. gw: '',
  613. bxy: '',
  614. tbrq: moment(new Date()).format('YYYY-MM-DD'),
  615. temp: '',
  616. mcgzm: '',
  617. },
  618. formStateEdit: {
  619. id: '',
  620. bxySdzEarly1: '',
  621. ch4Early1: '',
  622. checkPersonEarly: '',
  623. co2Early1: '',
  624. coEarly1: '',
  625. gwSdzEarly1: '',
  626. jwSdzEarly1: '',
  627. o2Early1: '',
  628. timeEarly1: '',
  629. tEarly1: '',
  630. bxySdzEarly2: '',
  631. ch4Early2: '',
  632. co2Early2: '',
  633. coEarly2: '',
  634. gwSdzEarly2: '',
  635. jwSdzEarly2: '',
  636. o2Early2: '',
  637. timeEarly2: '',
  638. tEarly2: '',
  639. bxySdzNoon1: '',
  640. ch4Noon1: '',
  641. checkPersonNoon: '',
  642. co2Noon1: '',
  643. coNoon1: '',
  644. gwSdzNoon1: '',
  645. jwSdzNoon1: '',
  646. o2Noon1: '',
  647. timeNoon1: '',
  648. tNoon1: '',
  649. bxySdzNoon2: '',
  650. ch4Noon2: '',
  651. co2Noon2: '',
  652. coNoon2: '',
  653. gwSdzNoon2: '',
  654. jwSdzNoon2: '',
  655. o2Noon2: '',
  656. timeNoon2: '',
  657. tNoon2: '',
  658. bxySdzNight1: '',
  659. ch4Night1: '',
  660. checkPersonNight: '',
  661. co2Night1: '',
  662. coNight1: '',
  663. gwSdzNight1: '',
  664. jwSdzNight1: '',
  665. o2Night1: '',
  666. timeNight1: '',
  667. tNight1: '',
  668. bxySdzNight2: '',
  669. ch4Night2: '',
  670. co2Night2: '',
  671. coNight2: '',
  672. gwSdzNight2: '',
  673. jwSdzNight2: '',
  674. o2Night2: '',
  675. timeNight2: '',
  676. tNight2: '',
  677. },
  678. showZb1: false,
  679. showZb2: false,
  680. showWb1: false,
  681. showWb2: false,
  682. showNb1: false,
  683. showNb2: false,
  684. isSaveEdit: []
  685. };
  686. },
  687. computed: {
  688. username: function () {
  689. return uni.getStorageSync('login_user_info')['realname']
  690. }
  691. },
  692. mounted() {
  693. console.log(uni.getStorageSync('login_user_info'), 'ceshi00-----------')
  694. this.getGasList()
  695. this.getMcList()
  696. },
  697. methods: {
  698. //班次下拉选项切换
  699. changeBc(e) {
  700. console.log(e, '班次----------')
  701. this.formState.bc = e
  702. },
  703. //监测次数选项切换
  704. changeCount(e) {
  705. this.formState.count = e
  706. },
  707. //检测地点拉选项切换
  708. changeJc(e) {
  709. let that = this
  710. that.formState.jcdd = e
  711. that.deviceId = that.rangeJcdd.filter(v => v.text == e)[0].deviceId
  712. new Promise((resolve, reject) => {
  713. api
  714. .getGas({ reportTime: that.formState.tbrq, deviceId: that.deviceId })
  715. .then((response) => {
  716. if (response.data.code == 200) {
  717. let data = response.data.result.records
  718. if (data.length != 0) {
  719. that.isShowEdit = true
  720. that.isShowAdd = false
  721. that.formState.jcy = that.username
  722. that.saveShowList = data[0]
  723. that.formStateEdit = {
  724. id: that.formStateEdit.id || '',
  725. bxySdzEarly1: that.formStateEdit.bxySdzEarly1 || '',
  726. ch4Early1: that.formStateEdit.ch4Early1 || '',
  727. checkPersonEarly: that.formState.jcy,
  728. co2Early1: that.formStateEdit.co2Early1 || '',
  729. coEarly1: that.formStateEdit.coEarly1 || '',
  730. gwSdzEarly1: that.formStateEdit.gwSdzEarly1 || '',
  731. jwSdzEarly1: that.formStateEdit.jwSdzEarly1 || '',
  732. o2Early1: that.formStateEdit.o2Early1 || '',
  733. timeEarly1: that.formStateEdit.timeEarly1 || '',
  734. tEarly1: that.formStateEdit.tEarly1 || '',
  735. bxySdzEarly2: that.formStateEdit.bxySdzEarly2 || '',
  736. ch4Early2: that.formStateEdit.ch4Early2 || '',
  737. co2Early2: that.formStateEdit.co2Early2 || '',
  738. coEarly2: that.formStateEdit.coEarly2 || '',
  739. gwSdzEarly2: that.formStateEdit.gwSdzEarly2 || '',
  740. jwSdzEarly2: that.formStateEdit.jwSdzEarly2 || '',
  741. o2Early2: that.formStateEdit.o2Early2 || '',
  742. timeEarly2: that.formStateEdit.timeEarly2 || '',
  743. tEarly2: that.formStateEdit.tEarly2 || '',
  744. bxySdzNoon1: that.formStateEdit.bxySdzNoon1 || '',
  745. ch4Noon1: that.formStateEdit.ch4Noon1 || '',
  746. checkPersonNoon: that.formState.jcy,
  747. co2Noon1: that.formStateEdit.co2Noon1 || '',
  748. coNoon1: that.formStateEdit.coNoon1 || '',
  749. gwSdzNoon1: that.formStateEdit.gwSdzNoon1 || '',
  750. jwSdzNoon1: that.formStateEdit.jwSdzNoon1 || '',
  751. o2Noon1: that.formStateEdit.o2Noon1 || '',
  752. timeNoon1: that.formStateEdit.timeNoon1 || '',
  753. tNoon1: that.formStateEdit.tNoon1 || '',
  754. bxySdzNoon2: that.formStateEdit.bxySdzNoon2 || '',
  755. ch4Noon2: that.formStateEdit.ch4Noon2 || '',
  756. co2Noon2: that.formStateEdit.co2Noon2 || '',
  757. coNoon2: that.formStateEdit.coNoon2 || '',
  758. gwSdzNoon2: that.formStateEdit.gwSdzNoon2 || '',
  759. jwSdzNoon2: that.formStateEdit.jwSdzNoon2 || '',
  760. o2Noon2: that.formStateEdit.o2Noon2 || '',
  761. timeNoon2: that.formStateEdit.timeNoon2 || '',
  762. tNoon2: that.formStateEdit.tNoon2 || '',
  763. bxySdzNight1: that.formStateEdit.bxySdzNight1 || '',
  764. ch4Night1: that.formStateEdit.ch4Night1 || '',
  765. checkPersonNight: that.formState.jcy,
  766. co2Night1: that.formStateEdit.co2Night1 || '',
  767. coNight1: that.formStateEdit.coNight1 || '',
  768. gwSdzNight1: that.formStateEdit.gwSdzNight1 || '',
  769. jwSdzNight1: that.formStateEdit.jwSdzNight1 || '',
  770. o2Night1: that.formStateEdit.o2Night1 || '',
  771. timeNight1: that.formStateEdit.timeNight1 || '',
  772. tNight1: that.formStateEdit.tNight1 || '',
  773. bxySdzNight2: that.formStateEdit.bxySdzNight2 || '',
  774. ch4Night2: that.formStateEdit.ch4Night2 || '',
  775. co2Night2: that.formStateEdit.co2Night2 || '',
  776. coNight2: that.formStateEdit.coNight2 || '',
  777. gwSdzNight2: that.formStateEdit.gwSdzNight2 || '',
  778. jwSdzNight2: that.formStateEdit.jwSdzNight2 || '',
  779. o2Night2: that.formStateEdit.o2Night2 || '',
  780. timeNight2: that.formStateEdit.timeNight2 || '',
  781. tNight2: that.formStateEdit.tNight2 || '',
  782. }
  783. that.isSaveEdit = Object.keys(that.formStateEdit).filter(v => that.formStateEdit[v] == '')
  784. } else {
  785. that.isShowEdit = true
  786. that.isShowAdd = false
  787. that.isSaveEdit=[]
  788. that.formState = {
  789. id: '',
  790. bc: that.formState.bc || '',
  791. count: that.formState.count || '',
  792. jcdd: that.formState.jcdd || '',
  793. mcgzm: that.formState.mcgzm || '',
  794. jcy: that.username,
  795. time: that.formState.time,
  796. tbrq: that.formState.tbrq,
  797. ch4: '',
  798. co2: '',
  799. co: '',
  800. o2: '',
  801. jw: '',
  802. gw: '',
  803. bxy: '',
  804. temp: '',
  805. }
  806. }
  807. } else {
  808. reject(response);
  809. }
  810. })
  811. .catch((error) => {
  812. console.log("catch===>response", response);
  813. reject(error);
  814. });
  815. });
  816. },
  817. //工作面煤层选项切换
  818. changeMc(e) {
  819. this.formState.mcgzm = e
  820. this.getSelectList()
  821. },
  822. //检测时间下拉选项切换
  823. change(e) {
  824. let that = this
  825. that.formState.time = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  826. that.formState.tbrq = moment(e.value).format('YYYY-MM-DD')
  827. new Promise((resolve, reject) => {
  828. api
  829. .getGas({ reportTime: that.formState.tbrq, deviceId: that.deviceId })
  830. .then((response) => {
  831. if (response.data.code == 200) {
  832. let data = response.data.result.records
  833. if (data.length != 0) {
  834. that.isShowEdit = true
  835. that.isShowAdd = false
  836. that.formState.jcy = that.username
  837. that.saveShowList = data[0]
  838. that.formStateEdit = {
  839. id: that.formStateEdit.id || '',
  840. bxySdzEarly1: that.formStateEdit.bxySdzEarly1 || '',
  841. ch4Early1: that.formStateEdit.ch4Early1 || '',
  842. checkPersonEarly: that.formState.jcy,
  843. co2Early1: that.formStateEdit.co2Early1 || '',
  844. coEarly1: that.formStateEdit.coEarly1 || '',
  845. gwSdzEarly1: that.formStateEdit.gwSdzEarly1 || '',
  846. jwSdzEarly1: that.formStateEdit.jwSdzEarly1 || '',
  847. o2Early1: that.formStateEdit.o2Early1 || '',
  848. timeEarly1: that.formStateEdit.timeEarly1 || '',
  849. tEarly1: that.formStateEdit.tEarly1 || '',
  850. bxySdzEarly2: that.formStateEdit.bxySdzEarly2 || '',
  851. ch4Early2: that.formStateEdit.ch4Early2 || '',
  852. co2Early2: that.formStateEdit.co2Early2 || '',
  853. coEarly2: that.formStateEdit.coEarly2 || '',
  854. gwSdzEarly2: that.formStateEdit.gwSdzEarly2 || '',
  855. jwSdzEarly2: that.formStateEdit.jwSdzEarly2 || '',
  856. o2Early2: that.formStateEdit.o2Early2 || '',
  857. timeEarly2: that.formStateEdit.timeEarly2 || '',
  858. tEarly2: that.formStateEdit.tEarly2 || '',
  859. bxySdzNoon1: that.formStateEdit.bxySdzNoon1 || '',
  860. ch4Noon1: that.formStateEdit.ch4Noon1 || '',
  861. checkPersonNoon: that.formState.jcy,
  862. co2Noon1: that.formStateEdit.co2Noon1 || '',
  863. coNoon1: that.formStateEdit.coNoon1 || '',
  864. gwSdzNoon1: that.formStateEdit.gwSdzNoon1 || '',
  865. jwSdzNoon1: that.formStateEdit.jwSdzNoon1 || '',
  866. o2Noon1: that.formStateEdit.o2Noon1 || '',
  867. timeNoon1: that.formStateEdit.timeNoon1 || '',
  868. tNoon1: that.formStateEdit.tNoon1 || '',
  869. bxySdzNoon2: that.formStateEdit.bxySdzNoon2 || '',
  870. ch4Noon2: that.formStateEdit.ch4Noon2 || '',
  871. co2Noon2: that.formStateEdit.co2Noon2 || '',
  872. coNoon2: that.formStateEdit.coNoon2 || '',
  873. gwSdzNoon2: that.formStateEdit.gwSdzNoon2 || '',
  874. jwSdzNoon2: that.formStateEdit.jwSdzNoon2 || '',
  875. o2Noon2: that.formStateEdit.o2Noon2 || '',
  876. timeNoon2: that.formStateEdit.timeNoon2 || '',
  877. tNoon2: that.formStateEdit.tNoon2 || '',
  878. bxySdzNight1: that.formStateEdit.bxySdzNight1 || '',
  879. ch4Night1: that.formStateEdit.ch4Night1 || '',
  880. checkPersonNight: that.formState.jcy,
  881. co2Night1: that.formStateEdit.co2Night1 || '',
  882. coNight1: that.formStateEdit.coNight1 || '',
  883. gwSdzNight1: that.formStateEdit.gwSdzNight1 || '',
  884. jwSdzNight1: that.formStateEdit.jwSdzNight1 || '',
  885. o2Night1: that.formStateEdit.o2Night1 || '',
  886. timeNight1: that.formStateEdit.timeNight1 || '',
  887. tNight1: that.formStateEdit.tNight1 || '',
  888. bxySdzNight2: that.formStateEdit.bxySdzNight2 || '',
  889. ch4Night2: that.formStateEdit.ch4Night2 || '',
  890. co2Night2: that.formStateEdit.co2Night2 || '',
  891. coNight2: that.formStateEdit.coNight2 || '',
  892. gwSdzNight2: that.formStateEdit.gwSdzNight2 || '',
  893. jwSdzNight2: that.formStateEdit.jwSdzNight2 || '',
  894. o2Night2: that.formStateEdit.o2Night2 || '',
  895. timeNight2: that.formStateEdit.timeNight2 || '',
  896. tNight2: that.formStateEdit.tNight2 || '',
  897. }
  898. that.isSaveEdit = Object.keys(that.formStateEdit).filter(v => that.formStateEdit[v] == '')
  899. } else {
  900. that.isShowEdit = false
  901. that.isShowAdd = true
  902. that.isSaveEdit=[]
  903. that.formState = {
  904. id: '',
  905. bc: that.formState.bc || '',
  906. count: that.formState.count || '',
  907. jcdd: that.formState.jcdd || '',
  908. mcgzm: that.formState.mcgzm || '',
  909. jcy: that.username,
  910. time: that.formState.time,
  911. tbrq: that.formState.tbrq,
  912. ch4: '',
  913. co2: '',
  914. co: '',
  915. o2: '',
  916. jw: '',
  917. gw: '',
  918. bxy: '',
  919. temp: '',
  920. }
  921. }
  922. } else {
  923. reject(response);
  924. }
  925. })
  926. .catch((error) => {
  927. console.log("catch===>response", response);
  928. reject(error);
  929. });
  930. });
  931. },
  932. //编辑-早班第一次编辑选项切换
  933. getChangeZb1() {
  934. this.showZb1 = true
  935. },
  936. //编辑-早班第一次编辑选项切换
  937. changeZb1(e) {
  938. this.formStateEdit.timeEarly1 = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  939. },
  940. //编辑-早班第二次编辑选项切换
  941. getChangeZb2() {
  942. this.showZb2 = true
  943. },
  944. //编辑-早班第二次编辑选项切换
  945. changeZb2(e) {
  946. this.formStateEdit.timeEarly2 = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  947. },
  948. //编辑-午班第一次编辑选项切换
  949. getChangeWb1() {
  950. this.showWb1 = true
  951. },
  952. //编辑-午班第一次编辑选项切换
  953. changeWb1(e) {
  954. this.formStateEdit.timeNoon1 = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  955. },
  956. //编辑-午班第二次编辑选项切换
  957. getChangeWb2() {
  958. this.showWb2 = true
  959. },
  960. //编辑-午班第二次编辑选项切换
  961. changeWb2(e) {
  962. this.formStateEdit.timeNoon2 = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  963. },
  964. //编辑-晚班第一次编辑选项切换
  965. getChangeNb1() {
  966. this.showNb1 = true
  967. },
  968. //编辑-晚班第一次编辑选项切换
  969. changeNb1(e) {
  970. this.formStateEdit.timeNight1 = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  971. },
  972. //编辑-晚班第二次编辑选型切换
  973. getChangeNb2() {
  974. this.showNb2 = true
  975. },
  976. //编辑-晚班第二次编辑选项切换
  977. changeNb2(e) {
  978. this.formStateEdit.timeNight2 = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  979. },
  980. changeTb(e) {
  981. this.tbTime = moment(e.value).format('YYYY-MM-DD')
  982. },
  983. //点击弹出日期下拉选项
  984. getChangeTime() {
  985. this.showCalendar = true
  986. },
  987. getChangeTimeTb() {
  988. this.showCalendarTb = true
  989. },
  990. confirmTb() {
  991. this.showCalendarTb = false
  992. this.getGasList()
  993. },
  994. //新增光瓦失去焦点时参数校验
  995. getBlur(val) {
  996. if (val.slice(-1) === '0' || val.slice(-1) === '2' || val.slice(-1) === '4' || val.slice(-1) === '6' || val.slice(-1) === '8') {
  997. this.formState.gw = val
  998. this.isRule1 = true
  999. } else {
  1000. this.formState.gw = ''
  1001. this.isRule1 = false
  1002. }
  1003. },
  1004. //新增CO2失去焦点时参数校验
  1005. getBlurCO2(val) {
  1006. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1007. this.formState.co2 = val
  1008. this.isRule = true
  1009. } else {
  1010. this.formState.co2 = ''
  1011. this.isRule = false
  1012. }
  1013. },
  1014. getBlurCO(val) {
  1015. if (parseFloat(val) <= 24) {
  1016. this.formState.co = val
  1017. this.isRule14 = true
  1018. } else {
  1019. this.formState.co = ''
  1020. this.isRule14 = false
  1021. }
  1022. },
  1023. //编辑第一次CO2失去焦点时参数校验
  1024. getBlurFCo2(val) {
  1025. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1026. this.formStateEdit.co2Early1 = val
  1027. this.isRule2 = true
  1028. } else {
  1029. this.formStateEdit.co2Early1 = ''
  1030. this.isRule2 = false
  1031. }
  1032. },
  1033. getBlurCO1(val) {
  1034. if (parseFloat(val) <= 24) {
  1035. this.formStateEdit.coEarly1 = val
  1036. this.isRule15 = true
  1037. } else {
  1038. this.formStateEdit.coEarly1 = ''
  1039. this.isRule15 = false
  1040. }
  1041. },
  1042. //编辑第一次光瓦失去焦点时参数校验
  1043. getBlurF(val) {
  1044. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1045. this.formStateEdit.gwSdzEarly1 = val
  1046. this.isRule3 = true
  1047. } else {
  1048. this.formStateEdit.gwSdzEarly1 = ''
  1049. this.isRule3 = false
  1050. }
  1051. },
  1052. //编辑第二次CO2失去焦点时参数校验
  1053. getBlurSCo2(val) {
  1054. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1055. this.formStateEdit.co2Early2 = val
  1056. this.isRule4 = true
  1057. } else {
  1058. this.formStateEdit.co2Early2 = ''
  1059. this.isRule4 = false
  1060. }
  1061. },
  1062. getBlurC2(val) {
  1063. if (parseFloat(val) <= 24) {
  1064. this.formStateEdit.coEarly2 = val
  1065. this.isRule16 = true
  1066. } else {
  1067. this.formStateEdit.coEarly2 = ''
  1068. this.isRule16 = false
  1069. }
  1070. },
  1071. //编辑第二次光瓦失去焦点时参数校验
  1072. getBlurS(val) {
  1073. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1074. this.formStateEdit.gwSdzEarly2 = val
  1075. this.isRule5 = true
  1076. } else {
  1077. this.formStateEdit.gwSdzEarly2 = ''
  1078. this.isRule5 = false
  1079. }
  1080. },
  1081. getBlurF1(val) {
  1082. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1083. this.formStateEdit.co2Noon1 = val
  1084. this.isRule6 = true
  1085. } else {
  1086. this.formStateEdit.co2Noon1 = ''
  1087. this.isRule6 = false
  1088. }
  1089. },
  1090. getBlurCO3(val) {
  1091. if (parseFloat(val) <= 24) {
  1092. this.formStateEdit.coNoon1 = val
  1093. this.isRule17 = true
  1094. } else {
  1095. this.formStateEdit.coNoon1 = ''
  1096. this.isRule17 = false
  1097. }
  1098. },
  1099. getBlurG1(val) {
  1100. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1101. this.formStateEdit.gwSdzNoon1 = val
  1102. this.isRule7 = true
  1103. } else {
  1104. this.formStateEdit.gwSdzNoon1 = ''
  1105. this.isRule7 = false
  1106. }
  1107. },
  1108. getBlurF2(val) {
  1109. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1110. this.formStateEdit.co2Noon2 = val
  1111. this.isRule8 = true
  1112. } else {
  1113. this.formStateEdit.co2Noon2 = ''
  1114. this.isRule8 = false
  1115. }
  1116. },
  1117. getBlurCO4(val) {
  1118. if (parseFloat(val) <= 24) {
  1119. this.formStateEdit.coNoon2 = val
  1120. this.isRule18 = true
  1121. } else {
  1122. this.formStateEdit.coNoon2 = ''
  1123. this.isRule18 = false
  1124. }
  1125. },
  1126. getBlurG2(val) {
  1127. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1128. this.formStateEdit.gwSdzNoon2 = val
  1129. this.isRule9 = true
  1130. } else {
  1131. this.formStateEdit.gwSdzNoon2 = ''
  1132. this.isRule9 = false
  1133. }
  1134. },
  1135. getBlurN1(val) {
  1136. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1137. this.formStateEdit.co2Night1 = val
  1138. this.isRule10 = true
  1139. } else {
  1140. this.formStateEdit.co2Night1 = ''
  1141. this.isRule10 = false
  1142. }
  1143. },
  1144. getBlurCO5(val) {
  1145. if (parseFloat(val) <= 24) {
  1146. this.formStateEdit.coNight1 = val
  1147. this.isRule19 = true
  1148. } else {
  1149. this.formStateEdit.coNight1 = ''
  1150. this.isRule19 = false
  1151. }
  1152. },
  1153. getBlurNG1(val) {
  1154. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1155. this.formStateEdit.gwSdzNoon2 = val
  1156. this.isRule11 = true
  1157. } else {
  1158. this.formStateEdit.gwSdzNoon2 = ''
  1159. this.isRule11 = false
  1160. }
  1161. },
  1162. getBlurN2(val) {
  1163. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1164. this.formStateEdit.co2Night2 = val
  1165. this.isRule12 = true
  1166. } else {
  1167. this.formStateEdit.co2Night2 = ''
  1168. this.isRule12 = false
  1169. }
  1170. },
  1171. getBlurCO6(val) {
  1172. if (parseFloat(val) <= 24) {
  1173. this.formStateEdit.coNight2 = val
  1174. this.isRule20 = true
  1175. } else {
  1176. this.formStateEdit.coNight2 = ''
  1177. this.isRule20 = false
  1178. }
  1179. },
  1180. getBlurNG2(val) {
  1181. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1182. this.formStateEdit.gwSdzNight2 = val
  1183. this.isRule13 = true
  1184. } else {
  1185. this.formStateEdit.gwSdzNight2 = ''
  1186. this.isRule13 = false
  1187. }
  1188. },
  1189. //瓦斯新增
  1190. getAdd() {
  1191. let that = this
  1192. that.isShowAdd = true
  1193. that.isShowEdit = false
  1194. that.formState.jcy = this.username
  1195. },
  1196. getAddSave() {
  1197. let that = this
  1198. let param = {}
  1199. if (that.formState.bc == '早班' && that.formState.count == '第一次') {
  1200. param = {
  1201. id: that.formState.id,
  1202. bxySdzEarly1: that.formState.bxy,
  1203. ch4Early1: that.formState.ch4,
  1204. checkPersonEarly: that.formState.jcy,
  1205. co2Early1: that.formState.co2,
  1206. coEarly1: that.formState.co,
  1207. gwSdzEarly1: that.formState.gw,
  1208. jwSdzEarly1: that.formState.jw,
  1209. o2Early1: that.formState.o2,
  1210. strInstallPos: that.formState.jcdd,
  1211. timeEarly1: that.formState.time,
  1212. reportTime: that.formState.tbrq,
  1213. tEarly1: that.formState.temp
  1214. }
  1215. } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
  1216. param = {
  1217. id: that.formState.id,
  1218. bxySdzEarly2: that.formState.bxy,
  1219. ch4Early2: that.formState.ch4,
  1220. checkPersonEarly: that.formState.jcy,
  1221. co2Early2: that.formState.co2,
  1222. coEarly2: that.formState.co,
  1223. gwSdzEarly2: that.formState.gw,
  1224. jwSdzEarly2: that.formState.jw,
  1225. o2Early2: that.formState.o2,
  1226. strInstallPos: that.formState.jcdd,
  1227. timeEarly2: that.formState.time,
  1228. reportTime: that.formState.tbrq,
  1229. tEarly2: that.formState.temp
  1230. }
  1231. } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
  1232. param = {
  1233. id: that.formState.id,
  1234. bxySdzNoon1: that.formState.bxy,
  1235. ch4Noon1: that.formState.ch4,
  1236. checkPersonNoon: that.formState.jcy,
  1237. co2Noon1: that.formState.co2,
  1238. coNoon1: that.formState.co,
  1239. gwSdzNoon1: that.formState.gw,
  1240. jwSdzNoon1: that.formState.jw,
  1241. o2Noon1: that.formState.o2,
  1242. strInstallPos: that.formState.jcdd,
  1243. timeNoon1: that.formState.time,
  1244. reportTime: that.formState.tbrq,
  1245. tNoon1: that.formState.temp
  1246. }
  1247. } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
  1248. param = {
  1249. id: that.formState.id,
  1250. bxySdzNoon2: that.formState.bxy,
  1251. ch4Noon2: that.formState.ch4,
  1252. checkPersonNoon: that.formState.jcy,
  1253. co2Noon2: that.formState.co2,
  1254. coNoon2: that.formState.co,
  1255. gwSdzNoon2: that.formState.gw,
  1256. jwSdzNoon2: that.formState.jw,
  1257. o2Noon2: that.formState.o2,
  1258. strInstallPos: that.formState.jcdd,
  1259. timeNoon2: that.formState.time,
  1260. reportTime: that.formState.tbrq,
  1261. tNoon2: that.formState.temp
  1262. }
  1263. } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
  1264. param = {
  1265. id: that.formState.id,
  1266. bxySdzNight1: that.formState.bxy,
  1267. ch4Night1: that.formState.ch4,
  1268. checkPersonNight: that.formState.jcy,
  1269. co2Night1: that.formState.co2,
  1270. coNight1: that.formState.co,
  1271. gwSdzNight1: that.formState.gw,
  1272. jwSdzNight1: that.formState.jw,
  1273. o2Night1: that.formState.o2,
  1274. strInstallPos: that.formState.jcdd,
  1275. timeNight1: that.formState.time,
  1276. reportTime: that.formState.tbrq,
  1277. tNight1: that.formState.temp
  1278. }
  1279. } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
  1280. param = {
  1281. id: that.formState.id,
  1282. bxySdzNight2: that.formState.bxy,
  1283. ch4Night2: that.formState.ch4,
  1284. checkPersonNoon: that.formState.jcy,
  1285. co2Night2: that.formState.co2,
  1286. coNight2: that.formState.co,
  1287. gwSdzNight2: that.formState.gw,
  1288. jwSdzNight2: that.formState.jw,
  1289. o2Night2: that.formState.o2,
  1290. strInstallPos: that.formState.jcdd,
  1291. timeNight2: that.formState.time,
  1292. reportTime: that.formState.tbrq,
  1293. tNight2: that.formState.temp
  1294. }
  1295. }
  1296. new Promise((resolve, reject) => {
  1297. api
  1298. .getAdd({ ...param })
  1299. .then((response) => {
  1300. if (response.data.code == 200) {
  1301. that.getGasList()
  1302. that.isShowAdd = false
  1303. that.isShowEdit = false
  1304. that.clearData()
  1305. } else {
  1306. reject(response);
  1307. }
  1308. })
  1309. .catch((error) => {
  1310. console.log("catch===>response", response);
  1311. reject(error);
  1312. });
  1313. });
  1314. },
  1315. //新增保存
  1316. getConfirm() {
  1317. let that = this
  1318. that.getAddSave()
  1319. },
  1320. clearData() {
  1321. this.formState = {
  1322. id: '',
  1323. bc: '',
  1324. count: '',
  1325. jcdd: '',
  1326. mcgzm: '',
  1327. jcy: this.username,
  1328. time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  1329. ch4: '',
  1330. co2: '',
  1331. co: '',
  1332. o2: '',
  1333. jw: '',
  1334. gw: '',
  1335. bxy: '',
  1336. tbrq: moment(new Date()).format('YYYY-MM-DD'),
  1337. temp: '',
  1338. }
  1339. this.isRule = true
  1340. this.isRule1 = true
  1341. this.isRule2 = true
  1342. this.isRule3 = true
  1343. this.isRule4 = true
  1344. this.isRule5 = true
  1345. this.isRule6 = true
  1346. this.isRule7 = true
  1347. this.isRule8 = true
  1348. this.isRule9 = true
  1349. this.isRule10 = true
  1350. this.isRule11 = true
  1351. this.isRule12 = true
  1352. this.isRule13 = true
  1353. this.isRule14 = true
  1354. this.isRule15 = true
  1355. this.isRule16 = true
  1356. this.isRule17 = true
  1357. this.isRule18 = true
  1358. this.isRule19 = true
  1359. this.isRule20 = true
  1360. },
  1361. //新增取消
  1362. getCancel() {
  1363. this.isShowAdd = false
  1364. this.isShowEdit = false
  1365. this.clearData()
  1366. },
  1367. //编辑保存
  1368. confirmEdit() {
  1369. let that = this
  1370. new Promise((resolve, reject) => {
  1371. api
  1372. .getEdit({ ...that.formStateEdit })
  1373. .then((response) => {
  1374. if (response.data.code == 200) {
  1375. that.getGasList()
  1376. that.isShowAdd = false
  1377. that.isShowEdit = false
  1378. that.isSaveEdit=[]
  1379. that.clearData()
  1380. } else {
  1381. reject(response);
  1382. }
  1383. })
  1384. .catch((error) => {
  1385. console.log("catch===>response", response);
  1386. reject(error);
  1387. });
  1388. });
  1389. },
  1390. // 编辑关闭
  1391. cancelEdit() {
  1392. this.isShowAdd = false
  1393. this.isShowEdit = false
  1394. this.clearData()
  1395. },
  1396. convertToTimestamp(datetime) {
  1397. const datetimeArr = datetime.split(' '); // 根据空格将字符串分割为日期和时间部分
  1398. const dateArr = datetimeArr[0].split('-'); // 分割日期部分
  1399. const timeArr = datetimeArr[1].split(':'); // 分割时间部分
  1400. const year = parseInt(dateArr[0]);
  1401. const month = parseInt(dateArr[1]) - 1; // 月份从0开始
  1402. const day = parseInt(dateArr[2]);
  1403. const hour = parseInt(timeArr[0]);
  1404. const minute = parseInt(timeArr[1]);
  1405. const second = parseInt(timeArr[2]);
  1406. const timestamp = new Date(year, month, day, hour, minute, second).getTime();
  1407. return timestamp;
  1408. },
  1409. filterToday(timestamps) {
  1410. const today = new Date();
  1411. today.setHours(0, 0, 0, 0); // 设置到今天的凌晨
  1412. const todayTimestamp = today.getTime(); // 获取今天的时间戳
  1413. return timestamps.filter(timestamp => {
  1414. const date = new Date(timestamp);
  1415. return date.getTime() >= todayTimestamp && date.getTime() < todayTimestamp + 24 * 60 * 60 * 1000;
  1416. });
  1417. },
  1418. //获取瓦斯上报列表数据
  1419. getGasList() {
  1420. let that = this
  1421. new Promise((resolve, reject) => {
  1422. api
  1423. .getGas({ reportTime: that.tbTime, })
  1424. .then((response) => {
  1425. if (response.data.code == 200) {
  1426. let data = response.data.result.records
  1427. let tableList = []
  1428. data.forEach(el => {
  1429. tableList.push(that.convertToTimestamp(el.createTime))
  1430. })
  1431. let todayData = that.filterToday(tableList)
  1432. that.gasList = []
  1433. todayData.forEach(v => {
  1434. let itemData = data.filter(m => that.convertToTimestamp(m.createTime) == v)[0]
  1435. that.gasList.push(itemData)
  1436. })
  1437. } else {
  1438. reject(response);
  1439. }
  1440. })
  1441. .catch((error) => {
  1442. console.log("catch===>response", response);
  1443. reject(error);
  1444. });
  1445. });
  1446. },
  1447. //获取煤层工作面列表数据
  1448. getMcList() {
  1449. new Promise((resolve, reject) => {
  1450. api
  1451. .getDictItems({ dictCode: 'coalseam' })
  1452. .then((response) => {
  1453. let data = response.data
  1454. this.rangeMcgzm = data.map(el => {
  1455. return {
  1456. text: el.label,
  1457. value: el.value,
  1458. }
  1459. })
  1460. })
  1461. .catch((error) => {
  1462. console.log("catch===>response", response);
  1463. reject(error);
  1464. });
  1465. });
  1466. },
  1467. //获取安装位置下拉选项
  1468. getSelectList() {
  1469. let param = this.rangeMcgzm.filter(v => this.formState.mcgzm == v.value)[0].value
  1470. new Promise((resolve, reject) => {
  1471. api
  1472. .getSelect({ coalseam: param, devicekind: 'gasDayReport' })
  1473. .then((response) => {
  1474. if (response.data.code == 200) {
  1475. let data = response.data.result
  1476. this.rangeJcdd = data.map(v => {
  1477. return {
  1478. text: v.strinstallpos,
  1479. value: v.strinstallpos,
  1480. deviceId: v.id,
  1481. }
  1482. })
  1483. } else {
  1484. reject(response);
  1485. }
  1486. })
  1487. .catch((error) => {
  1488. console.log("catch===>response", response);
  1489. reject(error);
  1490. });
  1491. });
  1492. },
  1493. },
  1494. };
  1495. </script>
  1496. <style lang="scss" scoped>
  1497. .gas-report {
  1498. position: relative;
  1499. box-sizing: border-box;
  1500. .gas-content {
  1501. height: 708px;
  1502. margin-top: 85px;
  1503. box-sizing: border-box;
  1504. overflow-y: auto;
  1505. .top-title {
  1506. height: 28px;
  1507. margin-bottom: 5px;
  1508. display: flex;
  1509. justify-content: space-between;
  1510. align-items: center;
  1511. }
  1512. .top-content {
  1513. .content-title {
  1514. height: 26px;
  1515. line-height: 26px;
  1516. padding: 0px 20px;
  1517. font-size: 12px;
  1518. background: url('/static/warndata/title.png') no-repeat;
  1519. background-size: 100% 100%;
  1520. }
  1521. .content-item-box {
  1522. padding: 10px 0px;
  1523. .content-item {
  1524. height: 50px;
  1525. display: flex;
  1526. justify-content: space-between;
  1527. align-items: center;
  1528. background: linear-gradient(to right, rgba(55, 135, 254, 0.08), rgba(4, 184, 255, 0.08), rgba(60, 161, 237, 0.08));
  1529. border-radius: 10px;
  1530. margin-bottom: 5px;
  1531. .item-l {
  1532. width: calc(50% - 2px);
  1533. height: 100%;
  1534. display: flex;
  1535. flex-direction: column;
  1536. justify-content: center;
  1537. align-items: center;
  1538. }
  1539. .item-c {
  1540. width: 4px;
  1541. height: 70%;
  1542. border-left: 2px solid;
  1543. border-image: linear-gradient(to bottom, transparent, rgba(140, 203, 254, 1), transparent) 1 1 1;
  1544. }
  1545. .item-r {
  1546. width: calc(50% - 2px);
  1547. height: 100%;
  1548. display: flex;
  1549. flex-direction: column;
  1550. justify-content: center;
  1551. align-items: center;
  1552. }
  1553. }
  1554. }
  1555. }
  1556. .item-value {
  1557. height: 20px;
  1558. line-height: 20px;
  1559. color: #0eb4fc;
  1560. font-weight: bold;
  1561. }
  1562. .item-label {
  1563. font-size: 12px;
  1564. }
  1565. .top-dialog-area,
  1566. .center-dialog-area,
  1567. .bottom-dialog-area {
  1568. width: 100%;
  1569. padding: 10px;
  1570. box-sizing: border-box;
  1571. background-color: #FFF;
  1572. margin-bottom: 2px;
  1573. }
  1574. .top-gas-list {
  1575. display: flex;
  1576. flex-direction: column;
  1577. align-items: center;
  1578. width: 100%;
  1579. padding: 10px 20px;
  1580. box-sizing: border-box;
  1581. background-color: #FFF;
  1582. margin-bottom: 2px;
  1583. }
  1584. .bot-gas-list {
  1585. width: 100%;
  1586. height: calc(100% - 94px);
  1587. padding: 10px;
  1588. box-sizing: border-box;
  1589. background-color: #FFF;
  1590. margin-bottom: 2px;
  1591. overflow-y: auto;
  1592. }
  1593. .dialog-btn {
  1594. display: flex;
  1595. width: 100%;
  1596. padding: 8px 10px;
  1597. box-sizing: border-box;
  1598. background-color: #FFF;
  1599. // margin-bottom: 2px;
  1600. .u-button {
  1601. margin: 0px 10px;
  1602. }
  1603. }
  1604. .dialog-title {
  1605. height: 26px;
  1606. line-height: 26px;
  1607. padding: 0px 20px;
  1608. margin-bottom: 10px;
  1609. font-size: 12px;
  1610. background: url('/static/warndata/title.png') no-repeat;
  1611. background-size: 100% 100%;
  1612. }
  1613. .dialog-item {
  1614. display: flex;
  1615. align-items: center;
  1616. justify-content: center;
  1617. margin-bottom: 10px;
  1618. .dialog-label {
  1619. width: 120px;
  1620. text-align: right;
  1621. }
  1622. }
  1623. .search-box {
  1624. display: flex;
  1625. align-items: center;
  1626. justify-content: center;
  1627. margin-bottom: 10px;
  1628. .dialog-label {
  1629. width: 80px;
  1630. text-align: right;
  1631. }
  1632. }
  1633. .content-title-gas {
  1634. position: relative;
  1635. height: 26px;
  1636. line-height: 26px;
  1637. padding-left: 20px;
  1638. font-size: 12px;
  1639. background: url('/static/warndata/title.png') no-repeat;
  1640. background-size: 100% 100%;
  1641. }
  1642. .icon-gas-edit {
  1643. position: absolute;
  1644. right: 35px;
  1645. top: 0;
  1646. cursor: pointer;
  1647. }
  1648. .icon-gas-del {
  1649. position: absolute;
  1650. right: 10px;
  1651. top: 0;
  1652. cursor: pointer;
  1653. }
  1654. }
  1655. }
  1656. ::v-deep .u-input {
  1657. padding: 2px 6px !important;
  1658. }
  1659. ::v-deep .u-popup {
  1660. flex: 0;
  1661. }
  1662. ::v-deep .uni-select {
  1663. height: 30px;
  1664. border: 1px solid #dadbde;
  1665. }
  1666. ::v-deep .uni-select__input-box {
  1667. height: 30px;
  1668. }
  1669. ::v-deep .uni-select__input-placeholder {
  1670. font-size: 14px;
  1671. text-align: center;
  1672. color: rgb(192, 196, 204);
  1673. }
  1674. </style>