gasreport.vue 105 KB

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