gasreport.vue 118 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335
  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.timeNight1 || '--' }}</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.timeNight2 || '--' }}</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.timeEarly1 || '--' }}</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.timeEarly2 || '--' }}</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.timeNoon1 || '--' }}</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.timeNoon2 || '--' }}</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="isRule2 ? '请输入' : '数据有误'" type="number" @blur="getBlurCH4"
  113. :placeholderStyle="isRule2 ? 'color:#c0c4cc' : 'color:#ff0000'"></u--input>
  114. </view>
  115. <view class="dialog-item">
  116. <text class="dialog-label">CO₂:</text>
  117. <u--input inputAlign="center" :disabled="isDisabled" v-model="formState.co2"
  118. :placeholder="isRule ? '请输入' : '数据有误'" type="number" @blur="getBlurCO2"
  119. :placeholderStyle="isRule ? 'color:#c0c4cc' : 'color:#ff0000'"></u--input>
  120. </view>
  121. <view class="dialog-item">
  122. <text class="dialog-label">CO:</text>
  123. <u--input inputAlign="center" :disabled="isDisabled" v-model="formState.co"
  124. :placeholder="isRule14 ? '请输入' : '数据有误'"
  125. :placeholderStyle="isRule14 ? 'color:#c0c4cc' : 'color:#ff0000'" type="number"
  126. @blur="getBlurCO"></u--input>
  127. </view>
  128. <view class="dialog-item">
  129. <text class="dialog-label">O₂:</text>
  130. <u--input inputAlign="center" :disabled="isDisabled" type="number" v-model="formState.o2"
  131. placeholder="请输入"></u--input>
  132. </view>
  133. <view class="dialog-item">
  134. <text class="dialog-label">温度:</text>
  135. <u--input inputAlign="center" :disabled="isDisabled" type="number" v-model="formState.temp"
  136. 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" :disabled="isDisabled" type="number" v-model="formState.jw"
  144. placeholder="请输入"></u--input> -->
  145. <u--input inputAlign="center" :disabled="isDisabled" type="number" v-model="formState.ch4"
  146. placeholder="请输入"></u--input>
  147. </view>
  148. <view class="dialog-item">
  149. <text class="dialog-label">光瓦测量数据:</text>
  150. <u--input inputAlign="center" :disabled="isDisabled" v-model="formState.gw"
  151. :placeholder="isRule1 ? '请输入' : '数据有误'" type="number" @blur="getBlur"
  152. :placeholderStyle="isRule1 ? 'color:#c0c4cc' : 'color:#ff0000'"></u--input>
  153. </view>
  154. <view class="dialog-item">
  155. <text class="dialog-label">便携仪测量数据:</text>
  156. <u--input inputAlign="center" :disabled="isDisabled" type="number" v-model="formState.bxy"
  157. placeholder="请输入"></u--input>
  158. </view>
  159. </view>
  160. </view>
  161. <view class="dialog-btn">
  162. <u-button type="success" size="small" v-if="!isDisabled" @click="getConfirm">保存</u-button>
  163. <u-button type="primary" size="small" @click="getCancel">取消</u-button>
  164. </view>
  165. </view>
  166. </view>
  167. </view>
  168. </template>
  169. <script>
  170. import api from "@/api/api";
  171. import moment from 'moment'
  172. import { mapGetters } from "vuex";
  173. export default {
  174. name: 'gasreport',
  175. props: {},
  176. watch: {},
  177. data() {
  178. return {
  179. isDisabled: false,
  180. isStatus: '',
  181. deviceId: '',
  182. rangeBc: [
  183. { value: '夜班', text: "夜班" },
  184. { value: '早班', text: "早班" },
  185. { value: '中班', text: "中班" },
  186. ],
  187. rangeMcgzm: [],
  188. rangeJcdd: [],
  189. rangeCount: [
  190. { value: '第一次', text: '第一次' },
  191. { value: '第二次', text: '第二次' },
  192. ],
  193. isRule: true,
  194. isRule1: true,
  195. isRule14: true,
  196. isRule2: true,
  197. //新增参数信息
  198. isShowAdd: false,//是否显示新增弹窗
  199. showCalendar: false,//控制日期选型下拉开启
  200. timeRan: Number(new Date()),
  201. gasList: [],//瓦斯填报列表数据
  202. tbTime: moment(new Date()).format('YYYY-MM-DD'),//查询条件-填报时间
  203. showCalendarTb: false,//控制填报时间组件弹出
  204. saveShowList: {},
  205. formState: {
  206. id: '',
  207. bc: '',
  208. count: '',
  209. jcdd: '',
  210. jcy: '',
  211. time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  212. ch4: '',
  213. co2: '',
  214. co: '',
  215. o2: '',
  216. jw: '',
  217. gw: '',
  218. bxy: '',
  219. tbrq: moment(new Date()).format('YYYY-MM-DD'),
  220. temp: '',
  221. mcgzm: '',
  222. },
  223. };
  224. },
  225. computed: {
  226. username: function () {
  227. return uni.getStorageSync('login_user_info')['realname']
  228. }
  229. },
  230. mounted() {
  231. console.log(uni.getStorageSync('login_user_info'), 'ceshi00-----------')
  232. this.getGasList()
  233. this.getMcList()
  234. },
  235. methods: {
  236. //班次下拉选项切换
  237. changeBc(e) {
  238. let that = this
  239. console.log(e, '班次----------')
  240. this.formState.bc = 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.ch4Night1 || '',
  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.ch4Night2 || '',
  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. changeCount(e) {
  497. let that = this
  498. that.formState.count = e
  499. if (that.formState.bc == '早班' && that.formState.count == '第一次') {
  500. 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) {
  501. that.formState = {
  502. id: that.saveShowList.id || '',
  503. bc: that.formState.bc,
  504. count: that.formState.count,
  505. jcdd: that.formState.jcdd,
  506. jcy: that.formState.jcy,
  507. time: that.formState.time,
  508. ch4: that.saveShowList.ch4Early1 || '',
  509. co2: that.saveShowList.co2Early1 || '',
  510. co: that.saveShowList.coEarly1 || '',
  511. o2: that.saveShowList.o2Early1 || '',
  512. jw: that.saveShowList.jwSdzEarly1 || '',
  513. gw: that.saveShowList.gwSdzEarly1 || '',
  514. bxy: that.saveShowList.bxySdzEarly1 || '',
  515. tbrq: that.formState.tbrq,
  516. temp: that.saveShowList.tearly1 || '',
  517. mcgzm: that.formState.mcgzm,
  518. }
  519. that.isDisabled = true
  520. } else {
  521. that.formState = {
  522. id: that.formState.id,
  523. bc: that.formState.bc,
  524. count: that.formState.count,
  525. jcdd: that.formState.jcdd,
  526. jcy: that.formState.jcy,
  527. time: that.formState.time,
  528. ch4: '',
  529. co2: '',
  530. co: '',
  531. o2: '',
  532. jw: '',
  533. gw: '',
  534. bxy: '',
  535. tbrq: that.formState.tbrq,
  536. temp: '',
  537. mcgzm: that.formState.mcgzm,
  538. }
  539. that.isDisabled = false
  540. }
  541. } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
  542. 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) {
  543. that.formState = {
  544. id: that.saveShowList.id || '',
  545. bc: that.formState.bc,
  546. count: that.formState.count,
  547. jcdd: that.formState.jcdd,
  548. jcy: that.formState.jcy,
  549. time: that.formState.time,
  550. ch4: that.saveShowList.ch4Early2 || '',
  551. co2: that.saveShowList.co2Early2 || '',
  552. co: that.saveShowList.coEarly2 || '',
  553. o2: that.saveShowList.o2Early2 || '',
  554. jw: that.saveShowList.jwSdzEarly2 || '',
  555. gw: that.saveShowList.gwSdzEarly2 || '',
  556. bxy: that.saveShowList.bxySdzEarly2 || '',
  557. tbrq: that.formState.tbrq,
  558. temp: that.saveShowList.tearly2 || '',
  559. mcgzm: that.formState.mcgzm,
  560. }
  561. that.isDisabled = true
  562. } else {
  563. that.formState = {
  564. id: that.formState.id,
  565. bc: that.formState.bc,
  566. count: that.formState.count,
  567. jcdd: that.formState.jcdd,
  568. jcy: that.formState.jcy,
  569. time: that.formState.time,
  570. ch4: '',
  571. co2: '',
  572. co: '',
  573. o2: '',
  574. jw: '',
  575. gw: '',
  576. bxy: '',
  577. tbrq: that.formState.tbrq,
  578. temp: '',
  579. mcgzm: that.formState.mcgzm,
  580. }
  581. that.isDisabled = false
  582. }
  583. } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
  584. 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) {
  585. that.formState = {
  586. id: that.saveShowList.id || '',
  587. bc: that.formState.bc,
  588. count: that.formState.count,
  589. jcdd: that.formState.jcdd,
  590. jcy: that.formState.jcy,
  591. time: that.formState.time,
  592. ch4: that.saveShowList.bxySdzNoon1 || '',
  593. co2: that.saveShowList.co2Noon1 || '',
  594. co: that.saveShowList.coNoon1 || '',
  595. o2: that.saveShowList.o2Noon1 || '',
  596. jw: that.saveShowList.jwSdzNoon1 || '',
  597. gw: that.saveShowList.gwSdzNoon1 || '',
  598. bxy: that.saveShowList.bxySdzNoon1 || '',
  599. tbrq: that.formState.tbrq,
  600. temp: that.saveShowList.tnoon1 || '',
  601. mcgzm: that.formState.mcgzm,
  602. }
  603. that.isDisabled = true
  604. } else {
  605. that.formState = {
  606. id: that.formState.id,
  607. bc: that.formState.bc,
  608. count: that.formState.count,
  609. jcdd: that.formState.jcdd,
  610. jcy: that.formState.jcy,
  611. time: that.formState.time,
  612. ch4: '',
  613. co2: '',
  614. co: '',
  615. o2: '',
  616. jw: '',
  617. gw: '',
  618. bxy: '',
  619. tbrq: that.formState.tbrq,
  620. temp: '',
  621. mcgzm: that.formState.mcgzm,
  622. }
  623. that.isDisabled = false
  624. }
  625. } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
  626. 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) {
  627. that.formState = {
  628. id: that.saveShowList.id || '',
  629. bc: that.formState.bc,
  630. count: that.formState.count,
  631. jcdd: that.formState.jcdd,
  632. jcy: that.formState.jcy,
  633. time: that.formState.time,
  634. ch4: that.saveShowList.bxySdzNoon2 || '',
  635. co2: that.saveShowList.co2Noon2 || '',
  636. co: that.saveShowList.coNoon2 || '',
  637. o2: that.saveShowList.o2Noon2 || '',
  638. jw: that.saveShowList.jwSdzNoon2 || '',
  639. gw: that.saveShowList.gwSdzNoon2 || '',
  640. bxy: that.saveShowList.bxySdzNoon2 || '',
  641. tbrq: that.formState.tbrq,
  642. temp: that.saveShowList.tnoon2 || '',
  643. mcgzm: that.formState.mcgzm,
  644. }
  645. that.isDisabled = true
  646. } else {
  647. that.formState = {
  648. id: that.formState.id,
  649. bc: that.formState.bc,
  650. count: that.formState.count,
  651. jcdd: that.formState.jcdd,
  652. jcy: that.formState.jcy,
  653. time: that.formState.time,
  654. ch4: '',
  655. co2: '',
  656. co: '',
  657. o2: '',
  658. jw: '',
  659. gw: '',
  660. bxy: '',
  661. tbrq: that.formState.tbrq,
  662. temp: '',
  663. mcgzm: that.formState.mcgzm,
  664. }
  665. that.isDisabled = false
  666. }
  667. } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
  668. 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) {
  669. that.formState = {
  670. id: that.saveShowList.id || '',
  671. bc: that.formState.bc,
  672. count: that.formState.count,
  673. jcdd: that.formState.jcdd,
  674. jcy: that.formState.jcy,
  675. time: that.formState.time,
  676. ch4: that.saveShowList.ch4Night1 || '',
  677. co2: that.saveShowList.co2Night1 || '',
  678. co: that.saveShowList.coNight1 || '',
  679. o2: that.saveShowList.o2Night1 || '',
  680. jw: that.saveShowList.jwSdzNight1 || '',
  681. gw: that.saveShowList.gwSdzNight1 || '',
  682. bxy: that.saveShowList.bxySdzNight1 || '',
  683. tbrq: that.formState.tbrq,
  684. temp: that.saveShowList.tnight1 || '',
  685. mcgzm: that.formState.mcgzm,
  686. }
  687. that.isDisabled = true
  688. } else {
  689. that.formState = {
  690. id: that.formState.id,
  691. bc: that.formState.bc,
  692. count: that.formState.count,
  693. jcdd: that.formState.jcdd,
  694. jcy: that.formState.jcy,
  695. time: that.formState.time,
  696. ch4: '',
  697. co2: '',
  698. co: '',
  699. o2: '',
  700. jw: '',
  701. gw: '',
  702. bxy: '',
  703. tbrq: that.formState.tbrq,
  704. temp: '',
  705. mcgzm: that.formState.mcgzm,
  706. }
  707. that.isDisabled = false
  708. }
  709. } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
  710. 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) {
  711. that.formState = {
  712. id: that.saveShowList.id || '',
  713. bc: that.formState.bc,
  714. count: that.formState.count,
  715. jcdd: that.formState.jcdd,
  716. jcy: that.formState.jcy,
  717. time: that.formState.time,
  718. ch4: that.saveShowList.ch4Night2 || '',
  719. co2: that.saveShowList.co2Night2 || '',
  720. co: that.saveShowList.coNight2 || '',
  721. o2: that.saveShowList.o2Night2 || '',
  722. jw: that.saveShowList.jwSdzNight2 || '',
  723. gw: that.saveShowList.gwSdzNight2 || '',
  724. bxy: that.saveShowList.bxySdzNight2 || '',
  725. tbrq: that.formState.tbrq,
  726. temp: that.saveShowList.tnight2 || '',
  727. mcgzm: that.formState.mcgzm,
  728. }
  729. that.isDisabled = true
  730. } else {
  731. that.formState = {
  732. id: that.formState.id,
  733. bc: that.formState.bc,
  734. count: that.formState.count,
  735. jcdd: that.formState.jcdd,
  736. jcy: that.formState.jcy,
  737. time: that.formState.time,
  738. ch4: '',
  739. co2: '',
  740. co: '',
  741. o2: '',
  742. jw: '',
  743. gw: '',
  744. bxy: '',
  745. tbrq: that.formState.tbrq,
  746. temp: '',
  747. mcgzm: that.formState.mcgzm,
  748. }
  749. that.isDisabled = false
  750. }
  751. }
  752. },
  753. //检测地点拉选项切换
  754. changeJc(e) {
  755. let that = this
  756. that.formState.jcdd = e
  757. that.deviceId = that.rangeJcdd.filter(v => v.text == e)[0].deviceId
  758. new Promise((resolve, reject) => {
  759. api
  760. .getGas({ reportTime: that.formState.tbrq, deviceId: that.deviceId })
  761. .then((response) => {
  762. if (response.data.code == 200) {
  763. let data = response.data.result.records
  764. if (data.length != 0) {
  765. that.saveShowList = data[0]
  766. if (that.formState.bc == '早班' && that.formState.count == '第一次') {
  767. 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) {
  768. that.formState = {
  769. id: that.saveShowList.id || '',
  770. bc: that.formState.bc,
  771. count: that.formState.count,
  772. jcdd: that.formState.jcdd,
  773. jcy: that.formState.jcy,
  774. time: that.formState.time,
  775. ch4: that.saveShowList.ch4Early1 || '',
  776. co2: that.saveShowList.co2Early1 || '',
  777. co: that.saveShowList.coEarly1 || '',
  778. o2: that.saveShowList.o2Early1 || '',
  779. jw: that.saveShowList.jwSdzEarly1 || '',
  780. gw: that.saveShowList.gwSdzEarly1 || '',
  781. bxy: that.saveShowList.bxySdzEarly1 || '',
  782. tbrq: that.formState.tbrq,
  783. temp: that.saveShowList.tearly1 || '',
  784. mcgzm: that.formState.mcgzm,
  785. }
  786. that.isDisabled = true
  787. } else {
  788. that.formState = {
  789. id: that.formState.id,
  790. bc: that.formState.bc,
  791. count: that.formState.count,
  792. jcdd: that.formState.jcdd,
  793. jcy: that.formState.jcy,
  794. time: that.formState.time,
  795. ch4: '',
  796. co2: '',
  797. co: '',
  798. o2: '',
  799. jw: '',
  800. gw: '',
  801. bxy: '',
  802. tbrq: that.formState.tbrq,
  803. temp: '',
  804. mcgzm: that.formState.mcgzm,
  805. }
  806. that.isDisabled = false
  807. }
  808. } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
  809. 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) {
  810. that.formState = {
  811. id: that.saveShowList.id || '',
  812. bc: that.formState.bc,
  813. count: that.formState.count,
  814. jcdd: that.formState.jcdd,
  815. jcy: that.formState.jcy,
  816. time: that.formState.time,
  817. ch4: that.saveShowList.ch4Early2 || '',
  818. co2: that.saveShowList.co2Early2 || '',
  819. co: that.saveShowList.coEarly2 || '',
  820. o2: that.saveShowList.o2Early2 || '',
  821. jw: that.saveShowList.jwSdzEarly2 || '',
  822. gw: that.saveShowList.gwSdzEarly2 || '',
  823. bxy: that.saveShowList.bxySdzEarly2 || '',
  824. tbrq: that.formState.tbrq,
  825. temp: that.saveShowList.tearly2 || '',
  826. mcgzm: that.formState.mcgzm,
  827. }
  828. that.isDisabled = true
  829. } else {
  830. that.formState = {
  831. id: that.formState.id,
  832. bc: that.formState.bc,
  833. count: that.formState.count,
  834. jcdd: that.formState.jcdd,
  835. jcy: that.formState.jcy,
  836. time: that.formState.time,
  837. ch4: '',
  838. co2: '',
  839. co: '',
  840. o2: '',
  841. jw: '',
  842. gw: '',
  843. bxy: '',
  844. tbrq: that.formState.tbrq,
  845. temp: '',
  846. mcgzm: that.formState.mcgzm,
  847. }
  848. that.isDisabled = false
  849. }
  850. } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
  851. 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) {
  852. that.formState = {
  853. id: that.saveShowList.id || '',
  854. bc: that.formState.bc,
  855. count: that.formState.count,
  856. jcdd: that.formState.jcdd,
  857. jcy: that.formState.jcy,
  858. time: that.formState.time,
  859. ch4: that.saveShowList.bxySdzNoon1 || '',
  860. co2: that.saveShowList.co2Noon1 || '',
  861. co: that.saveShowList.coNoon1 || '',
  862. o2: that.saveShowList.o2Noon1 || '',
  863. jw: that.saveShowList.jwSdzNoon1 || '',
  864. gw: that.saveShowList.gwSdzNoon1 || '',
  865. bxy: that.saveShowList.bxySdzNoon1 || '',
  866. tbrq: that.formState.tbrq,
  867. temp: that.saveShowList.tnoon1 || '',
  868. mcgzm: that.formState.mcgzm,
  869. }
  870. that.isDisabled = true
  871. } else {
  872. that.formState = {
  873. id: that.formState.id,
  874. bc: that.formState.bc,
  875. count: that.formState.count,
  876. jcdd: that.formState.jcdd,
  877. jcy: that.formState.jcy,
  878. time: that.formState.time,
  879. ch4: '',
  880. co2: '',
  881. co: '',
  882. o2: '',
  883. jw: '',
  884. gw: '',
  885. bxy: '',
  886. tbrq: that.formState.tbrq,
  887. temp: '',
  888. mcgzm: that.formState.mcgzm,
  889. }
  890. that.isDisabled = false
  891. }
  892. } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
  893. 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) {
  894. that.formState = {
  895. id: that.saveShowList.id || '',
  896. bc: that.formState.bc,
  897. count: that.formState.count,
  898. jcdd: that.formState.jcdd,
  899. jcy: that.formState.jcy,
  900. time: that.formState.time,
  901. ch4: that.saveShowList.bxySdzNoon2 || '',
  902. co2: that.saveShowList.co2Noon2 || '',
  903. co: that.saveShowList.coNoon2 || '',
  904. o2: that.saveShowList.o2Noon2 || '',
  905. jw: that.saveShowList.jwSdzNoon2 || '',
  906. gw: that.saveShowList.gwSdzNoon2 || '',
  907. bxy: that.saveShowList.bxySdzNoon2 || '',
  908. tbrq: that.formState.tbrq,
  909. temp: that.saveShowList.tnoon2 || '',
  910. mcgzm: that.formState.mcgzm,
  911. }
  912. that.isDisabled = true
  913. } else {
  914. that.formState = {
  915. id: that.formState.id,
  916. bc: that.formState.bc,
  917. count: that.formState.count,
  918. jcdd: that.formState.jcdd,
  919. jcy: that.formState.jcy,
  920. time: that.formState.time,
  921. ch4: '',
  922. co2: '',
  923. co: '',
  924. o2: '',
  925. jw: '',
  926. gw: '',
  927. bxy: '',
  928. tbrq: that.formState.tbrq,
  929. temp: '',
  930. mcgzm: that.formState.mcgzm,
  931. }
  932. that.isDisabled = false
  933. }
  934. } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
  935. 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) {
  936. that.formState = {
  937. id: that.saveShowList.id || '',
  938. bc: that.formState.bc,
  939. count: that.formState.count,
  940. jcdd: that.formState.jcdd,
  941. jcy: that.formState.jcy,
  942. time: that.formState.time,
  943. ch4: that.saveShowList.ch4Night1 || '',
  944. co2: that.saveShowList.co2Night1 || '',
  945. co: that.saveShowList.coNight1 || '',
  946. o2: that.saveShowList.o2Night1 || '',
  947. jw: that.saveShowList.jwSdzNight1 || '',
  948. gw: that.saveShowList.gwSdzNight1 || '',
  949. bxy: that.saveShowList.bxySdzNight1 || '',
  950. tbrq: that.formState.tbrq,
  951. temp: that.saveShowList.tnight1 || '',
  952. mcgzm: that.formState.mcgzm,
  953. }
  954. that.isDisabled = true
  955. } else {
  956. that.formState = {
  957. id: that.formState.id,
  958. bc: that.formState.bc,
  959. count: that.formState.count,
  960. jcdd: that.formState.jcdd,
  961. jcy: that.formState.jcy,
  962. time: that.formState.time,
  963. ch4: '',
  964. co2: '',
  965. co: '',
  966. o2: '',
  967. jw: '',
  968. gw: '',
  969. bxy: '',
  970. tbrq: that.formState.tbrq,
  971. temp: '',
  972. mcgzm: that.formState.mcgzm,
  973. }
  974. that.isDisabled = false
  975. }
  976. } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
  977. 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) {
  978. that.formState = {
  979. id: that.saveShowList.id || '',
  980. bc: that.formState.bc,
  981. count: that.formState.count,
  982. jcdd: that.formState.jcdd,
  983. jcy: that.formState.jcy,
  984. time: that.formState.time,
  985. ch4: that.saveShowList.ch4Night2 || '',
  986. co2: that.saveShowList.co2Night2 || '',
  987. co: that.saveShowList.coNight2 || '',
  988. o2: that.saveShowList.o2Night2 || '',
  989. jw: that.saveShowList.jwSdzNight2 || '',
  990. gw: that.saveShowList.gwSdzNight2 || '',
  991. bxy: that.saveShowList.bxySdzNight2 || '',
  992. tbrq: that.formState.tbrq,
  993. temp: that.saveShowList.tnight2 || '',
  994. mcgzm: that.formState.mcgzm,
  995. }
  996. that.isDisabled = true
  997. } else {
  998. that.formState = {
  999. id: that.formState.id,
  1000. bc: that.formState.bc,
  1001. count: that.formState.count,
  1002. jcdd: that.formState.jcdd,
  1003. jcy: that.formState.jcy,
  1004. time: that.formState.time,
  1005. ch4: '',
  1006. co2: '',
  1007. co: '',
  1008. o2: '',
  1009. jw: '',
  1010. gw: '',
  1011. bxy: '',
  1012. tbrq: that.formState.tbrq,
  1013. temp: '',
  1014. mcgzm: that.formState.mcgzm,
  1015. }
  1016. that.isDisabled = false
  1017. }
  1018. }
  1019. } else {
  1020. that.isDisabled = false
  1021. that.saveShowList = {}
  1022. that.formState = {
  1023. id: '',
  1024. bc: that.formState.bc || '',
  1025. count: that.formState.count || '',
  1026. jcdd: that.formState.jcdd || '',
  1027. mcgzm: that.formState.mcgzm || '',
  1028. jcy: that.formState.jcy || '',
  1029. time: that.formState.time,
  1030. tbrq: that.formState.tbrq,
  1031. ch4: '',
  1032. co2: '',
  1033. co: '',
  1034. o2: '',
  1035. jw: '',
  1036. gw: '',
  1037. bxy: '',
  1038. temp: '',
  1039. }
  1040. }
  1041. } else {
  1042. reject(response);
  1043. }
  1044. })
  1045. .catch((error) => {
  1046. console.log("catch===>response", response);
  1047. reject(error);
  1048. });
  1049. });
  1050. },
  1051. //工作面煤层选项切换
  1052. changeMc(e) {
  1053. this.formState.mcgzm = e
  1054. this.getSelectList()
  1055. },
  1056. //检测时间下拉选项切换
  1057. change(e) {
  1058. let that = this
  1059. that.formState.time = moment(e.value).format('YYYY-MM-DD HH:mm:ss')
  1060. that.formState.tbrq = moment(e.value).format('YYYY-MM-DD')
  1061. new Promise((resolve, reject) => {
  1062. api
  1063. .getGas({ reportTime: that.formState.tbrq, deviceId: that.deviceId })
  1064. .then((response) => {
  1065. if (response.data.code == 200) {
  1066. let data = response.data.result.records
  1067. if (data.length != 0) {
  1068. that.saveShowList = data[0]
  1069. if (that.formState.bc == '早班' && that.formState.count == '第一次') {
  1070. 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) {
  1071. that.formState = {
  1072. id: that.saveShowList.id || '',
  1073. bc: that.formState.bc,
  1074. count: that.formState.count,
  1075. jcdd: that.formState.jcdd,
  1076. jcy: that.formState.jcy,
  1077. time: that.formState.time,
  1078. ch4: that.saveShowList.ch4Early1 || '',
  1079. co2: that.saveShowList.co2Early1 || '',
  1080. co: that.saveShowList.coEarly1 || '',
  1081. o2: that.saveShowList.o2Early1 || '',
  1082. jw: that.saveShowList.jwSdzEarly1 || '',
  1083. gw: that.saveShowList.gwSdzEarly1 || '',
  1084. bxy: that.saveShowList.bxySdzEarly1 || '',
  1085. tbrq: that.formState.tbrq,
  1086. temp: that.saveShowList.tearly1 || '',
  1087. mcgzm: that.formState.mcgzm,
  1088. }
  1089. that.isDisabled = true
  1090. } else {
  1091. that.formState = {
  1092. id: that.formState.id,
  1093. bc: that.formState.bc,
  1094. count: that.formState.count,
  1095. jcdd: that.formState.jcdd,
  1096. jcy: that.formState.jcy,
  1097. time: that.formState.time,
  1098. ch4: '',
  1099. co2: '',
  1100. co: '',
  1101. o2: '',
  1102. jw: '',
  1103. gw: '',
  1104. bxy: '',
  1105. tbrq: that.formState.tbrq,
  1106. temp: '',
  1107. mcgzm: that.formState.mcgzm,
  1108. }
  1109. that.isDisabled = false
  1110. }
  1111. } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
  1112. 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) {
  1113. that.formState = {
  1114. id: that.saveShowList.id || '',
  1115. bc: that.formState.bc,
  1116. count: that.formState.count,
  1117. jcdd: that.formState.jcdd,
  1118. jcy: that.formState.jcy,
  1119. time: that.formState.time,
  1120. ch4: that.saveShowList.ch4Early2 || '',
  1121. co2: that.saveShowList.co2Early2 || '',
  1122. co: that.saveShowList.coEarly2 || '',
  1123. o2: that.saveShowList.o2Early2 || '',
  1124. jw: that.saveShowList.jwSdzEarly2 || '',
  1125. gw: that.saveShowList.gwSdzEarly2 || '',
  1126. bxy: that.saveShowList.bxySdzEarly2 || '',
  1127. tbrq: that.formState.tbrq,
  1128. temp: that.saveShowList.tearly2 || '',
  1129. mcgzm: that.formState.mcgzm,
  1130. }
  1131. that.isDisabled = true
  1132. } else {
  1133. that.formState = {
  1134. id: that.formState.id,
  1135. bc: that.formState.bc,
  1136. count: that.formState.count,
  1137. jcdd: that.formState.jcdd,
  1138. jcy: that.formState.jcy,
  1139. time: that.formState.time,
  1140. ch4: '',
  1141. co2: '',
  1142. co: '',
  1143. o2: '',
  1144. jw: '',
  1145. gw: '',
  1146. bxy: '',
  1147. tbrq: that.formState.tbrq,
  1148. temp: '',
  1149. mcgzm: that.formState.mcgzm,
  1150. }
  1151. that.isDisabled = false
  1152. }
  1153. } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
  1154. 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) {
  1155. that.formState = {
  1156. id: that.saveShowList.id || '',
  1157. bc: that.formState.bc,
  1158. count: that.formState.count,
  1159. jcdd: that.formState.jcdd,
  1160. jcy: that.formState.jcy,
  1161. time: that.formState.time,
  1162. ch4: that.saveShowList.bxySdzNoon1 || '',
  1163. co2: that.saveShowList.co2Noon1 || '',
  1164. co: that.saveShowList.coNoon1 || '',
  1165. o2: that.saveShowList.o2Noon1 || '',
  1166. jw: that.saveShowList.jwSdzNoon1 || '',
  1167. gw: that.saveShowList.gwSdzNoon1 || '',
  1168. bxy: that.saveShowList.bxySdzNoon1 || '',
  1169. tbrq: that.formState.tbrq,
  1170. temp: that.saveShowList.tnoon1 || '',
  1171. mcgzm: that.formState.mcgzm,
  1172. }
  1173. that.isDisabled = true
  1174. } else {
  1175. that.formState = {
  1176. id: that.formState.id,
  1177. bc: that.formState.bc,
  1178. count: that.formState.count,
  1179. jcdd: that.formState.jcdd,
  1180. jcy: that.formState.jcy,
  1181. time: that.formState.time,
  1182. ch4: '',
  1183. co2: '',
  1184. co: '',
  1185. o2: '',
  1186. jw: '',
  1187. gw: '',
  1188. bxy: '',
  1189. tbrq: that.formState.tbrq,
  1190. temp: '',
  1191. mcgzm: that.formState.mcgzm,
  1192. }
  1193. that.isDisabled = false
  1194. }
  1195. } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
  1196. 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) {
  1197. that.formState = {
  1198. id: that.saveShowList.id || '',
  1199. bc: that.formState.bc,
  1200. count: that.formState.count,
  1201. jcdd: that.formState.jcdd,
  1202. jcy: that.formState.jcy,
  1203. time: that.formState.time,
  1204. ch4: that.saveShowList.bxySdzNoon2 || '',
  1205. co2: that.saveShowList.co2Noon2 || '',
  1206. co: that.saveShowList.coNoon2 || '',
  1207. o2: that.saveShowList.o2Noon2 || '',
  1208. jw: that.saveShowList.jwSdzNoon2 || '',
  1209. gw: that.saveShowList.gwSdzNoon2 || '',
  1210. bxy: that.saveShowList.bxySdzNoon2 || '',
  1211. tbrq: that.formState.tbrq,
  1212. temp: that.saveShowList.tnoon2 || '',
  1213. mcgzm: that.formState.mcgzm,
  1214. }
  1215. that.isDisabled = true
  1216. } else {
  1217. that.formState = {
  1218. id: that.formState.id,
  1219. bc: that.formState.bc,
  1220. count: that.formState.count,
  1221. jcdd: that.formState.jcdd,
  1222. jcy: that.formState.jcy,
  1223. time: that.formState.time,
  1224. ch4: '',
  1225. co2: '',
  1226. co: '',
  1227. o2: '',
  1228. jw: '',
  1229. gw: '',
  1230. bxy: '',
  1231. tbrq: that.formState.tbrq,
  1232. temp: '',
  1233. mcgzm: that.formState.mcgzm,
  1234. }
  1235. that.isDisabled = false
  1236. }
  1237. } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
  1238. 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) {
  1239. that.formState = {
  1240. id: that.saveShowList.id || '',
  1241. bc: that.formState.bc,
  1242. count: that.formState.count,
  1243. jcdd: that.formState.jcdd,
  1244. jcy: that.formState.jcy,
  1245. time: that.formState.time,
  1246. ch4: that.saveShowList.ch4Night1 || '',
  1247. co2: that.saveShowList.co2Night1 || '',
  1248. co: that.saveShowList.coNight1 || '',
  1249. o2: that.saveShowList.o2Night1 || '',
  1250. jw: that.saveShowList.jwSdzNight1 || '',
  1251. gw: that.saveShowList.gwSdzNight1 || '',
  1252. bxy: that.saveShowList.bxySdzNight1 || '',
  1253. tbrq: that.formState.tbrq,
  1254. temp: that.saveShowList.tnight1 || '',
  1255. mcgzm: that.formState.mcgzm,
  1256. }
  1257. that.isDisabled = true
  1258. } else {
  1259. that.formState = {
  1260. id: that.formState.id,
  1261. bc: that.formState.bc,
  1262. count: that.formState.count,
  1263. jcdd: that.formState.jcdd,
  1264. jcy: that.formState.jcy,
  1265. time: that.formState.time,
  1266. ch4: '',
  1267. co2: '',
  1268. co: '',
  1269. o2: '',
  1270. jw: '',
  1271. gw: '',
  1272. bxy: '',
  1273. tbrq: that.formState.tbrq,
  1274. temp: '',
  1275. mcgzm: that.formState.mcgzm,
  1276. }
  1277. that.isDisabled = false
  1278. }
  1279. } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
  1280. 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) {
  1281. that.formState = {
  1282. id: that.saveShowList.id || '',
  1283. bc: that.formState.bc,
  1284. count: that.formState.count,
  1285. jcdd: that.formState.jcdd,
  1286. jcy: that.formState.jcy,
  1287. time: that.formState.time,
  1288. ch4: that.saveShowList.ch4Night2 || '',
  1289. co2: that.saveShowList.co2Night2 || '',
  1290. co: that.saveShowList.coNight2 || '',
  1291. o2: that.saveShowList.o2Night2 || '',
  1292. jw: that.saveShowList.jwSdzNight2 || '',
  1293. gw: that.saveShowList.gwSdzNight2 || '',
  1294. bxy: that.saveShowList.bxySdzNight2 || '',
  1295. tbrq: that.formState.tbrq,
  1296. temp: that.saveShowList.tnight2 || '',
  1297. mcgzm: that.formState.mcgzm,
  1298. }
  1299. that.isDisabled = true
  1300. } else {
  1301. that.formState = {
  1302. id: that.formState.id,
  1303. bc: that.formState.bc,
  1304. count: that.formState.count,
  1305. jcdd: that.formState.jcdd,
  1306. jcy: that.formState.jcy,
  1307. time: that.formState.time,
  1308. ch4: '',
  1309. co2: '',
  1310. co: '',
  1311. o2: '',
  1312. jw: '',
  1313. gw: '',
  1314. bxy: '',
  1315. tbrq: that.formState.tbrq,
  1316. temp: '',
  1317. mcgzm: that.formState.mcgzm,
  1318. }
  1319. that.isDisabled = false
  1320. }
  1321. }
  1322. } else {
  1323. that.isDisabled = false
  1324. that.saveShowList = {}
  1325. that.formState = {
  1326. id: '',
  1327. bc: that.formState.bc || '',
  1328. count: that.formState.count || '',
  1329. jcdd: that.formState.jcdd || '',
  1330. mcgzm: that.formState.mcgzm || '',
  1331. jcy: that.formState.jcy || '',
  1332. time: that.formState.time,
  1333. tbrq: that.formState.tbrq,
  1334. ch4: '',
  1335. co2: '',
  1336. co: '',
  1337. o2: '',
  1338. jw: '',
  1339. gw: '',
  1340. bxy: '',
  1341. temp: '',
  1342. }
  1343. }
  1344. } else {
  1345. reject(response);
  1346. }
  1347. })
  1348. .catch((error) => {
  1349. console.log("catch===>response", response);
  1350. reject(error);
  1351. });
  1352. });
  1353. },
  1354. changeTb(e) {
  1355. this.tbTime = moment(e.value).format('YYYY-MM-DD')
  1356. },
  1357. //点击弹出日期下拉选项
  1358. getChangeTime() {
  1359. this.showCalendar = true
  1360. },
  1361. getChangeTimeTb() {
  1362. this.showCalendarTb = true
  1363. },
  1364. confirmTb() {
  1365. this.showCalendarTb = false
  1366. this.getGasList()
  1367. },
  1368. //新增光瓦失去焦点时参数校验
  1369. getBlur(val) {
  1370. if (val.slice(-1) === '0' || val.slice(-1) === '2' || val.slice(-1) === '4' || val.slice(-1) === '6' || val.slice(-1) === '8') {
  1371. this.formState.gw = val
  1372. this.isRule1 = true
  1373. } else {
  1374. this.formState.gw = ''
  1375. this.isRule1 = false
  1376. }
  1377. },
  1378. //新增CO2失去焦点时参数校验
  1379. getBlurCO2(val) {
  1380. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1381. this.formState.co2 = val
  1382. this.isRule = true
  1383. } else {
  1384. this.formState.co2 = ''
  1385. this.isRule = false
  1386. }
  1387. },
  1388. //新增CH4失去焦点时参数校验
  1389. getBlurCH4(val) {
  1390. if (val.slice(-1) == '0' || val.slice(-1) == '2' || val.slice(-1) == '4' || val.slice(-1) == '6' || val.slice(-1) == '8') {
  1391. this.formState.ch4 = val
  1392. this.isRule2 = true
  1393. } else {
  1394. this.formState.ch4 = ''
  1395. this.isRule2 = false
  1396. }
  1397. },
  1398. getBlurCO(val) {
  1399. if (parseFloat(val) <= 24) {
  1400. this.formState.co = val
  1401. this.isRule14 = true
  1402. } else {
  1403. this.formState.co = ''
  1404. this.isRule14 = false
  1405. }
  1406. },
  1407. //瓦斯新增
  1408. getAdd() {
  1409. let that = this
  1410. that.isShowAdd = true
  1411. that.isStatus = 'add'
  1412. that.formState.jcy = this.username
  1413. },
  1414. getAddSave() {
  1415. let that = this
  1416. let param = {}
  1417. if (that.formState.bc == '早班' && that.formState.count == '第一次') {
  1418. param = {
  1419. id: that.formState.id,
  1420. deviceId: that.deviceId,
  1421. bxySdzEarly1: that.formState.bxy,
  1422. ch4Early1: that.formState.ch4,
  1423. checkPersonEarly: that.formState.jcy,
  1424. co2Early1: that.formState.co2,
  1425. coEarly1: that.formState.co,
  1426. gwSdzEarly1: that.formState.gw,
  1427. jwSdzEarly1:that.formState.ch4,
  1428. o2Early1: that.formState.o2,
  1429. strInstallPos: that.formState.jcdd,
  1430. timeEarly1: that.formState.time,
  1431. reportTime: that.formState.tbrq,
  1432. tearly1: that.formState.temp
  1433. }
  1434. } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
  1435. param = {
  1436. deviceId: that.deviceId,
  1437. id: that.formState.id,
  1438. bxySdzEarly2: that.formState.bxy,
  1439. ch4Early2: that.formState.ch4,
  1440. checkPersonEarly: that.formState.jcy,
  1441. co2Early2: that.formState.co2,
  1442. coEarly2: that.formState.co,
  1443. gwSdzEarly2: that.formState.gw,
  1444. jwSdzEarly2: that.formState.ch4,
  1445. o2Early2: that.formState.o2,
  1446. strInstallPos: that.formState.jcdd,
  1447. timeEarly2: that.formState.time,
  1448. reportTime: that.formState.tbrq,
  1449. tearly2: that.formState.temp
  1450. }
  1451. } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
  1452. param = {
  1453. deviceId: that.deviceId,
  1454. id: that.formState.id,
  1455. bxySdzNoon1: that.formState.bxy,
  1456. ch4Noon1: that.formState.ch4,
  1457. checkPersonNoon: that.formState.jcy,
  1458. co2Noon1: that.formState.co2,
  1459. coNoon1: that.formState.co,
  1460. gwSdzNoon1: that.formState.gw,
  1461. jwSdzNoon1: that.formState.ch4,
  1462. o2Noon1: that.formState.o2,
  1463. strInstallPos: that.formState.jcdd,
  1464. timeNoon1: that.formState.time,
  1465. reportTime: that.formState.tbrq,
  1466. tnoon1: that.formState.temp
  1467. }
  1468. } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
  1469. param = {
  1470. deviceId: that.deviceId,
  1471. id: that.formState.id,
  1472. bxySdzNoon2: that.formState.bxy,
  1473. ch4Noon2: that.formState.ch4,
  1474. checkPersonNoon: that.formState.jcy,
  1475. co2Noon2: that.formState.co2,
  1476. coNoon2: that.formState.co,
  1477. gwSdzNoon2: that.formState.gw,
  1478. jwSdzNoon2: that.formState.ch4,
  1479. o2Noon2: that.formState.o2,
  1480. strInstallPos: that.formState.jcdd,
  1481. timeNoon2: that.formState.time,
  1482. reportTime: that.formState.tbrq,
  1483. tnoon2: that.formState.temp
  1484. }
  1485. } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
  1486. param = {
  1487. deviceId: that.deviceId,
  1488. id: that.formState.id,
  1489. bxySdzNight1: that.formState.bxy,
  1490. ch4Night1: that.formState.ch4,
  1491. checkPersonNight: that.formState.jcy,
  1492. co2Night1: that.formState.co2,
  1493. coNight1: that.formState.co,
  1494. gwSdzNight1: that.formState.gw,
  1495. jwSdzNight1: that.formState.ch4,
  1496. o2Night1: that.formState.o2,
  1497. strInstallPos: that.formState.jcdd,
  1498. timeNight1: that.formState.time,
  1499. reportTime: that.formState.tbrq,
  1500. tnight1: that.formState.temp
  1501. }
  1502. } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
  1503. param = {
  1504. deviceId: that.deviceId,
  1505. id: that.formState.id,
  1506. bxySdzNight2: that.formState.bxy,
  1507. ch4Night2: that.formState.ch4,
  1508. checkPersonNoon: that.formState.jcy,
  1509. co2Night2: that.formState.co2,
  1510. coNight2: that.formState.co,
  1511. gwSdzNight2: that.formState.gw,
  1512. jwSdzNight2: that.formState.ch4,
  1513. o2Night2: that.formState.o2,
  1514. strInstallPos: that.formState.jcdd,
  1515. timeNight2: that.formState.time,
  1516. reportTime: that.formState.tbrq,
  1517. tnight2: that.formState.temp
  1518. }
  1519. }
  1520. new Promise((resolve, reject) => {
  1521. api
  1522. .getAdd({ ...param })
  1523. .then((response) => {
  1524. if (response.data.code == 200) {
  1525. that.getGasList()
  1526. that.isShowAdd = false
  1527. that.isDisabled = false
  1528. that.saveShowList = {}
  1529. that.clearData()
  1530. } else {
  1531. reject(response);
  1532. }
  1533. })
  1534. .catch((error) => {
  1535. console.log("catch===>response", response);
  1536. reject(error);
  1537. });
  1538. });
  1539. },
  1540. getEditSave() {
  1541. let that = this
  1542. let param = {}
  1543. if (that.formState.bc == '早班' && that.formState.count == '第一次') {
  1544. param = {
  1545. id: that.saveShowList.id,
  1546. bxySdzEarly1: that.formState.bxy,
  1547. ch4Early1: that.formState.ch4,
  1548. checkPersonEarly: that.formState.jcy,
  1549. co2Early1: that.formState.co2,
  1550. coEarly1: that.formState.co,
  1551. gwSdzEarly1: that.formState.gw,
  1552. jwSdzEarly1: that.formState.ch4,
  1553. o2Early1: that.formState.o2,
  1554. strInstallPos: that.formState.jcdd,
  1555. timeEarly1: that.formState.time,
  1556. tearly1: that.formState.temp,
  1557. bxySdzEarly2: that.saveShowList.bxySdzEarly2,
  1558. ch4Early2: that.saveShowList.ch4Early2,
  1559. co2Early2: that.saveShowList.co2Early2,
  1560. coEarly2: that.saveShowList.coEarly2,
  1561. gwSdzEarly2: that.saveShowList.gwSdzEarly2,
  1562. jwSdzEarly2: that.saveShowList.jwSdzEarly2,
  1563. o2Early2: that.saveShowList.o2Early2,
  1564. timeEarly2: that.saveShowList.timeEarly2,
  1565. tearly2: that.saveShowList.tearly2,
  1566. bxySdzNoon1: that.saveShowList.bxySdzNoon1,
  1567. ch4Noon1: that.saveShowList.ch4Noon1,
  1568. checkPersonNoon: that.formState.jcy,
  1569. co2Noon1: that.saveShowList.co2Noon1,
  1570. coNoon1: that.saveShowList.coNoon1,
  1571. gwSdzNoon1: that.saveShowList.gwSdzNoon1,
  1572. jwSdzNoon1: that.saveShowList.jwSdzNoon1,
  1573. o2Noon1: that.saveShowList.o2Noon1,
  1574. strInstallPos: that.saveShowList.strInstallPos,
  1575. timeNoon1: that.saveShowList.timeNoon1,
  1576. tnoon1: that.saveShowList.tnoon1,
  1577. bxySdzNoon2: that.saveShowList.bxySdzNoon2,
  1578. ch4Noon2: that.saveShowList.ch4Noon2,
  1579. co2Noon2: that.saveShowList.co2Noon2,
  1580. coNoon2: that.saveShowList.coNoon2,
  1581. gwSdzNoon2: that.saveShowList.gwSdzNoon2,
  1582. jwSdzNoon2: that.saveShowList.jwSdzNoon2,
  1583. o2Noon2: that.saveShowList.o2Noon2,
  1584. timeNoon2: that.saveShowList.timeNoon2,
  1585. tnoon2: that.saveShowList.tnoon2,
  1586. bxySdzNight1: that.saveShowList.bxySdzNight1,
  1587. ch4Night1: that.saveShowList.ch4Night1,
  1588. checkPersonNight: that.formState.jcy,
  1589. co2Night1: that.saveShowList.co2Night1,
  1590. coNight1: that.saveShowList.coNight1,
  1591. gwSdzNight1: that.saveShowList.gwSdzNight1,
  1592. jwSdzNight1: that.saveShowList.jwSdzNight1,
  1593. o2Night1: that.saveShowList.o2Night1,
  1594. strInstallPos: that.saveShowList.strInstallPos,
  1595. timeNight1: that.saveShowList.timeNight1,
  1596. tnight1: that.saveShowList.tnight1,
  1597. bxySdzNight2: that.saveShowList.bxySdzNight2,
  1598. ch4Night2: that.saveShowList.ch4Night2,
  1599. co2Night2: that.saveShowList.co2Night2,
  1600. coNight2: that.saveShowList.coNight2,
  1601. gwSdzNight2: that.saveShowList.gwSdzNight2,
  1602. jwSdzNight2: that.saveShowList.jwSdzNight2,
  1603. o2Night2: that.saveShowList.o2Night2,
  1604. timeNight2: that.saveShowList.timeNight2,
  1605. tnight2: that.saveShowList.tnight2,
  1606. }
  1607. } else if (that.formState.bc == '早班' && that.formState.count == '第二次') {
  1608. param = {
  1609. id: that.saveShowList.id,
  1610. bxySdzEarly1: that.saveShowList.bxySdzEarly1,
  1611. ch4Early1: that.saveShowList.ch4Early1,
  1612. co2Early1: that.saveShowList.co2Early1,
  1613. coEarly1: that.saveShowList.coEarly1,
  1614. gwSdzEarly1: that.saveShowList.gwSdzEarly1,
  1615. jwSdzEarly1: that.saveShowList.jwSdzEarly1,
  1616. o2Early1: that.saveShowList.o2Early1,
  1617. timeEarly1: that.saveShowList.timeEarly1,
  1618. tearly1: that.saveShowList.tearly1,
  1619. bxySdzEarly2: that.formState.bxy,
  1620. ch4Early2: that.formState.ch4,
  1621. checkPersonEarly: that.formState.jcy,
  1622. co2Early2: that.formState.co2,
  1623. coEarly2: that.formState.co,
  1624. gwSdzEarly2: that.formState.gw,
  1625. jwSdzEarly2: that.formState.ch4,
  1626. o2Early2: that.formState.o2,
  1627. strInstallPos: that.formState.jcdd,
  1628. timeEarly2: that.formState.time,
  1629. tearly2: that.formState.temp,
  1630. bxySdzNoon1: that.saveShowList.bxySdzNoon1,
  1631. ch4Noon1: that.saveShowList.ch4Noon1,
  1632. checkPersonNoon: that.formState.jcy,
  1633. co2Noon1: that.saveShowList.co2Noon1,
  1634. coNoon1: that.saveShowList.coNoon1,
  1635. gwSdzNoon1: that.saveShowList.gwSdzNoon1,
  1636. jwSdzNoon1: that.saveShowList.jwSdzNoon1,
  1637. o2Noon1: that.saveShowList.o2Noon1,
  1638. strInstallPos: that.saveShowList.strInstallPos,
  1639. timeNoon1: that.saveShowList.timeNoon1,
  1640. tnoon1: that.saveShowList.tnoon1,
  1641. bxySdzNoon2: that.saveShowList.bxySdzNoon2,
  1642. ch4Noon2: that.saveShowList.ch4Noon2,
  1643. co2Noon2: that.saveShowList.co2Noon2,
  1644. coNoon2: that.saveShowList.coNoon2,
  1645. gwSdzNoon2: that.saveShowList.gwSdzNoon2,
  1646. jwSdzNoon2: that.saveShowList.jwSdzNoon2,
  1647. o2Noon2: that.saveShowList.o2Noon2,
  1648. timeNoon2: that.saveShowList.timeNoon2,
  1649. tnoon2: that.saveShowList.tnoon2,
  1650. bxySdzNight1: that.saveShowList.bxySdzNight1,
  1651. ch4Night1: that.saveShowList.ch4Night1,
  1652. checkPersonNight: that.formState.jcy,
  1653. co2Night1: that.saveShowList.co2Night1,
  1654. coNight1: that.saveShowList.coNight1,
  1655. gwSdzNight1: that.saveShowList.gwSdzNight1,
  1656. jwSdzNight1: that.saveShowList.jwSdzNight1,
  1657. o2Night1: that.saveShowList.o2Night1,
  1658. strInstallPos: that.saveShowList.strInstallPos,
  1659. timeNight1: that.saveShowList.timeNight1,
  1660. tnight1: that.saveShowList.tnight1,
  1661. bxySdzNight2: that.saveShowList.bxySdzNight2,
  1662. ch4Night2: that.saveShowList.ch4Night2,
  1663. co2Night2: that.saveShowList.co2Night2,
  1664. coNight2: that.saveShowList.coNight2,
  1665. gwSdzNight2: that.saveShowList.gwSdzNight2,
  1666. jwSdzNight2: that.saveShowList.jwSdzNight2,
  1667. o2Night2: that.saveShowList.o2Night2,
  1668. timeNight2: that.saveShowList.timeNight2,
  1669. tnight2: that.saveShowList.tnight2,
  1670. }
  1671. } else if (that.formState.bc == '中班' && that.formState.count == '第一次') {
  1672. param = {
  1673. id: that.saveShowList.id,
  1674. bxySdzEarly1: that.saveShowList.bxySdzEarly1,
  1675. ch4Early1: that.saveShowList.ch4Early1,
  1676. co2Early1: that.saveShowList.co2Early1,
  1677. coEarly1: that.saveShowList.coEarly1,
  1678. gwSdzEarly1: that.saveShowList.gwSdzEarly1,
  1679. jwSdzEarly1: that.saveShowList.jwSdzEarly1,
  1680. o2Early1: that.saveShowList.o2Early1,
  1681. timeEarly1: that.saveShowList.timeEarly1,
  1682. checkPersonEarly: that.formState.jcy,
  1683. strInstallPos: that.saveShowList.strInstallPos,
  1684. tearly1: that.saveShowList.tearly1,
  1685. bxySdzEarly2: that.saveShowList.bxySdzEarly2,
  1686. ch4Early2: that.saveShowList.ch4Early2,
  1687. co2Early2: that.saveShowList.co2Early2,
  1688. coEarly2: that.saveShowList.coEarly2,
  1689. gwSdzEarly2: that.saveShowList.gwSdzEarly2,
  1690. jwSdzEarly2: that.saveShowList.jwSdzEarly2,
  1691. o2Early2: that.saveShowList.o2Early2,
  1692. timeEarly2: that.saveShowList.timeEarly2,
  1693. tearly2: that.saveShowList.tearly2,
  1694. bxySdzNoon1: that.formState.bxy,
  1695. ch4Noon1: that.formState.ch4,
  1696. checkPersonNoon: that.formState.jcy,
  1697. co2Noon1: that.formState.co2,
  1698. coNoon1: that.formState.co,
  1699. gwSdzNoon1: that.formState.gw,
  1700. jwSdzNoon1: that.formState.ch4,
  1701. o2Noon1: that.formState.o2,
  1702. strInstallPos: that.formState.jcdd,
  1703. timeNoon1: that.formState.time,
  1704. tnoon1: that.formState.temp,
  1705. bxySdzNoon2: that.saveShowList.bxySdzNoon2,
  1706. ch4Noon2: that.saveShowList.ch4Noon2,
  1707. co2Noon2: that.saveShowList.co2Noon2,
  1708. coNoon2: that.saveShowList.coNoon2,
  1709. gwSdzNoon2: that.saveShowList.gwSdzNoon2,
  1710. jwSdzNoon2: that.saveShowList.jwSdzNoon2,
  1711. o2Noon2: that.saveShowList.o2Noon2,
  1712. timeNoon2: that.saveShowList.timeNoon2,
  1713. tnoon2: that.saveShowList.tnoon2,
  1714. bxySdzNight1: that.saveShowList.bxySdzNight1,
  1715. ch4Night1: that.saveShowList.ch4Night1,
  1716. checkPersonNight: that.formState.jcy,
  1717. co2Night1: that.saveShowList.co2Night1,
  1718. coNight1: that.saveShowList.coNight1,
  1719. gwSdzNight1: that.saveShowList.gwSdzNight1,
  1720. jwSdzNight1: that.saveShowList.jwSdzNight1,
  1721. o2Night1: that.saveShowList.o2Night1,
  1722. strInstallPos: that.saveShowList.strInstallPos,
  1723. timeNight1: that.saveShowList.timeNight1,
  1724. tnight1: that.saveShowList.tnight1,
  1725. bxySdzNight2: that.saveShowList.bxySdzNight2,
  1726. ch4Night2: that.saveShowList.ch4Night2,
  1727. co2Night2: that.saveShowList.co2Night2,
  1728. coNight2: that.saveShowList.coNight2,
  1729. gwSdzNight2: that.saveShowList.gwSdzNight2,
  1730. jwSdzNight2: that.saveShowList.jwSdzNight2,
  1731. o2Night2: that.saveShowList.o2Night2,
  1732. timeNight2: that.saveShowList.timeNight2,
  1733. tnight2: that.saveShowList.tnight2,
  1734. }
  1735. } else if (that.formState.bc == '中班' && that.formState.count == '第二次') {
  1736. param = {
  1737. id: that.saveShowList.id,
  1738. bxySdzEarly1: that.saveShowList.bxySdzEarly1,
  1739. ch4Early1: that.saveShowList.ch4Early1,
  1740. co2Early1: that.saveShowList.co2Early1,
  1741. coEarly1: that.saveShowList.coEarly1,
  1742. gwSdzEarly1: that.saveShowList.gwSdzEarly1,
  1743. jwSdzEarly1: that.saveShowList.jwSdzEarly1,
  1744. o2Early1: that.saveShowList.o2Early1,
  1745. timeEarly1: that.saveShowList.timeEarly1,
  1746. checkPersonEarly: that.formState.jcy,
  1747. strInstallPos: that.saveShowList.strInstallPos,
  1748. tearly1: that.saveShowList.tearly1,
  1749. bxySdzEarly2: that.saveShowList.bxySdzEarly2,
  1750. ch4Early2: that.saveShowList.ch4Early2,
  1751. co2Early2: that.saveShowList.co2Early2,
  1752. coEarly2: that.saveShowList.coEarly2,
  1753. gwSdzEarly2: that.saveShowList.gwSdzEarly2,
  1754. jwSdzEarly2: that.saveShowList.jwSdzEarly2,
  1755. o2Early2: that.saveShowList.o2Early2,
  1756. timeEarly2: that.saveShowList.timeEarly2,
  1757. tearly2: that.saveShowList.tearly2,
  1758. bxySdzNoon1: that.saveShowList.bxySdzNoon1,
  1759. ch4Noon1: that.saveShowList.ch4Noon1,
  1760. co2Noon1: that.saveShowList.co2Noon1,
  1761. coNoon1: that.saveShowList.coNoon1,
  1762. gwSdzNoon1: that.saveShowList.gwSdzNoon1,
  1763. jwSdzNoon1: that.saveShowList.jwSdzNoon1,
  1764. o2Noon1: that.saveShowList.o2Noon1,
  1765. timeNoon1: that.saveShowList.timeNoon1,
  1766. tnoon1: that.saveShowList.tnoon1,
  1767. bxySdzNoon2: that.formState.bxy,
  1768. ch4Noon2: that.formState.ch4,
  1769. checkPersonNoon: that.formState.jcy,
  1770. co2Noon2: that.formState.co2,
  1771. coNoon2: that.formState.co,
  1772. gwSdzNoon2: that.formState.gw,
  1773. jwSdzNoon2:that.formState.ch4,
  1774. o2Noon2: that.formState.o2,
  1775. strInstallPos: that.formState.jcdd,
  1776. timeNoon2: that.formState.time,
  1777. tnoon2: that.formState.temp,
  1778. bxySdzNight1: that.saveShowList.bxySdzNight1,
  1779. ch4Night1: that.saveShowList.ch4Night1,
  1780. checkPersonNight: that.formState.jcy,
  1781. co2Night1: that.saveShowList.co2Night1,
  1782. coNight1: that.saveShowList.coNight1,
  1783. gwSdzNight1: that.saveShowList.gwSdzNight1,
  1784. jwSdzNight1: that.saveShowList.jwSdzNight1,
  1785. o2Night1: that.saveShowList.o2Night1,
  1786. strInstallPos: that.saveShowList.strInstallPos,
  1787. timeNight1: that.saveShowList.timeNight1,
  1788. tnight1: that.saveShowList.tnight1,
  1789. bxySdzNight2: that.saveShowList.bxySdzNight2,
  1790. ch4Night2: that.saveShowList.ch4Night2,
  1791. co2Night2: that.saveShowList.co2Night2,
  1792. coNight2: that.saveShowList.coNight2,
  1793. gwSdzNight2: that.saveShowList.gwSdzNight2,
  1794. jwSdzNight2: that.saveShowList.jwSdzNight2,
  1795. o2Night2: that.saveShowList.o2Night2,
  1796. timeNight2: that.saveShowList.timeNight2,
  1797. tnight2: that.saveShowList.tnight2,
  1798. }
  1799. } else if (that.formState.bc == '夜班' && that.formState.count == '第一次') {
  1800. param = {
  1801. id: that.saveShowList.id,
  1802. bxySdzEarly1: that.saveShowList.bxySdzEarly1,
  1803. ch4Early1: that.saveShowList.ch4Early1,
  1804. co2Early1: that.saveShowList.co2Early1,
  1805. coEarly1: that.saveShowList.coEarly1,
  1806. gwSdzEarly1: that.saveShowList.gwSdzEarly1,
  1807. jwSdzEarly1: that.saveShowList.jwSdzEarly1,
  1808. o2Early1: that.saveShowList.o2Early1,
  1809. timeEarly1: that.saveShowList.timeEarly1,
  1810. checkPersonEarly: that.formState.jcy,
  1811. strInstallPos: that.saveShowList.strInstallPos,
  1812. tearly1: that.saveShowList.tearly1,
  1813. bxySdzEarly2: that.saveShowList.bxySdzEarly2,
  1814. ch4Early2: that.saveShowList.ch4Early2,
  1815. co2Early2: that.saveShowList.co2Early2,
  1816. coEarly2: that.saveShowList.coEarly2,
  1817. gwSdzEarly2: that.saveShowList.gwSdzEarly2,
  1818. jwSdzEarly2: that.saveShowList.jwSdzEarly2,
  1819. o2Early2: that.saveShowList.o2Early2,
  1820. timeEarly2: that.saveShowList.timeEarly2,
  1821. tearly2: that.saveShowList.tearly2,
  1822. bxySdzNoon1: that.saveShowList.bxySdzNoon1,
  1823. ch4Noon1: that.saveShowList.ch4Noon1,
  1824. co2Noon1: that.saveShowList.co2Noon1,
  1825. coNoon1: that.saveShowList.coNoon1,
  1826. gwSdzNoon1: that.saveShowList.gwSdzNoon1,
  1827. jwSdzNoon1: that.saveShowList.jwSdzNoon1,
  1828. o2Noon1: that.saveShowList.o2Noon1,
  1829. timeNoon1: that.saveShowList.timeNoon1,
  1830. tnoon1: that.saveShowList.tnoon1,
  1831. bxySdzNoon2: that.saveShowList.bxySdzNoon2,
  1832. ch4Noon2: that.saveShowList.ch4Noon2,
  1833. checkPersonNoon: that.formState.jcy,
  1834. co2Noon2: that.saveShowList.co2Noon2,
  1835. coNoon2: that.saveShowList.coNoon2,
  1836. gwSdzNoon2: that.saveShowList.gwSdzNoon2,
  1837. jwSdzNoon2: that.saveShowList.jwSdzNoon2,
  1838. o2Noon2: that.saveShowList.o2Noon2,
  1839. strInstallPos: that.saveShowList.strInstallPos,
  1840. timeNoon2: that.saveShowList.timeNoon2,
  1841. tnoon2: that.saveShowList.tnoon2,
  1842. bxySdzNight1: that.formState.bxy,
  1843. ch4Night1: that.formState.ch4,
  1844. checkPersonNight: that.formState.jcy,
  1845. co2Night1: that.formState.co2,
  1846. coNight1: that.formState.co,
  1847. gwSdzNight1: that.formState.gw,
  1848. jwSdzNight1: that.formState.ch4,
  1849. o2Night1: that.formState.o2,
  1850. strInstallPos: that.formState.jcdd,
  1851. timeNight1: that.formState.time,
  1852. tnight1: that.formState.temp,
  1853. bxySdzNight2: that.saveShowList.bxySdzNight2,
  1854. ch4Night2: that.saveShowList.ch4Night2,
  1855. co2Night2: that.saveShowList.co2Night2,
  1856. coNight2: that.saveShowList.coNight2,
  1857. gwSdzNight2: that.saveShowList.gwSdzNight2,
  1858. jwSdzNight2: that.saveShowList.jwSdzNight2,
  1859. o2Night2: that.saveShowList.o2Night2,
  1860. timeNight2: that.saveShowList.timeNight2,
  1861. tnight2: that.saveShowList.tnight2,
  1862. }
  1863. } else if (that.formState.bc == '夜班' && that.formState.count == '第二次') {
  1864. param = {
  1865. id: that.saveShowList.id,
  1866. bxySdzEarly1: that.saveShowList.bxySdzEarly1,
  1867. ch4Early1: that.saveShowList.ch4Early1,
  1868. co2Early1: that.saveShowList.co2Early1,
  1869. coEarly1: that.saveShowList.coEarly1,
  1870. gwSdzEarly1: that.saveShowList.gwSdzEarly1,
  1871. jwSdzEarly1: that.saveShowList.jwSdzEarly1,
  1872. o2Early1: that.saveShowList.o2Early1,
  1873. timeEarly1: that.saveShowList.timeEarly1,
  1874. checkPersonEarly: that.formState.jcy,
  1875. strInstallPos: that.saveShowList.strInstallPos,
  1876. tearly1: that.saveShowList.tearly1,
  1877. bxySdzEarly2: that.saveShowList.bxySdzEarly2,
  1878. ch4Early2: that.saveShowList.ch4Early2,
  1879. co2Early2: that.saveShowList.co2Early2,
  1880. coEarly2: that.saveShowList.coEarly2,
  1881. gwSdzEarly2: that.saveShowList.gwSdzEarly2,
  1882. jwSdzEarly2: that.saveShowList.jwSdzEarly2,
  1883. o2Early2: that.saveShowList.o2Early2,
  1884. timeEarly2: that.saveShowList.timeEarly2,
  1885. tearly2: that.saveShowList.tearly2,
  1886. bxySdzNoon1: that.saveShowList.bxySdzNoon1,
  1887. ch4Noon1: that.saveShowList.ch4Noon1,
  1888. co2Noon1: that.saveShowList.co2Noon1,
  1889. coNoon1: that.saveShowList.coNoon1,
  1890. gwSdzNoon1: that.saveShowList.gwSdzNoon1,
  1891. jwSdzNoon1: that.saveShowList.jwSdzNoon1,
  1892. o2Noon1: that.saveShowList.o2Noon1,
  1893. timeNoon1: that.saveShowList.timeNoon1,
  1894. tnoon1: that.saveShowList.tnoon1,
  1895. bxySdzNoon2: that.saveShowList.bxySdzNoon2,
  1896. ch4Noon2: that.saveShowList.ch4Noon2,
  1897. checkPersonNoon: that.formState.jcy,
  1898. co2Noon2: that.saveShowList.co2Noon2,
  1899. coNoon2: that.saveShowList.coNoon2,
  1900. gwSdzNoon2: that.saveShowList.gwSdzNoon2,
  1901. jwSdzNoon2: that.saveShowList.jwSdzNoon2,
  1902. o2Noon2: that.saveShowList.o2Noon2,
  1903. strInstallPos: that.saveShowList.strInstallPos,
  1904. timeNoon2: that.saveShowList.timeNoon2,
  1905. tnoon2: that.saveShowList.tnoon2,
  1906. bxySdzNight1: that.saveShowList.bxySdzNight1,
  1907. ch4Night1: that.saveShowList.ch4Night1,
  1908. co2Night1: that.saveShowList.co2Night1,
  1909. coNight1: that.saveShowList.coNight1,
  1910. gwSdzNight1: that.saveShowList.gwSdzNight1,
  1911. jwSdzNight1: that.saveShowList.jwSdzNight1,
  1912. o2Night1: that.saveShowList.o2Night1,
  1913. timeNight1: that.saveShowList.timeNight1,
  1914. tnight1: that.saveShowList.tnight1,
  1915. bxySdzNight2: that.formState.bxy,
  1916. ch4Night2: that.formState.ch4,
  1917. checkPersonNight: that.formState.jcy,
  1918. co2Night2: that.formState.co2,
  1919. coNight2: that.formState.co,
  1920. gwSdzNight2: that.formState.gw,
  1921. jwSdzNight2: that.formState.ch4,
  1922. o2Night2: that.formState.o2,
  1923. strInstallPos: that.formState.jcdd,
  1924. timeNight2: that.formState.time,
  1925. tnight2: that.formState.temp,
  1926. }
  1927. }
  1928. new Promise((resolve, reject) => {
  1929. api
  1930. .getEdit({ ...param })
  1931. .then((response) => {
  1932. if (response.data.code == 200) {
  1933. that.getGasList()
  1934. that.isShowAdd = false
  1935. that.isDisabled = false
  1936. that.saveShowList = {}
  1937. that.clearData()
  1938. } else {
  1939. reject(response);
  1940. }
  1941. })
  1942. .catch((error) => {
  1943. console.log("catch===>response", response);
  1944. reject(error);
  1945. });
  1946. });
  1947. },
  1948. //新增保存
  1949. getConfirm() {
  1950. let that = this
  1951. console.log(that.saveShowList, '999999999999999999999999999999999')
  1952. that.isStatus = JSON.stringify(that.saveShowList) != '{}' ? 'edit' : 'add'
  1953. if (that.isStatus == 'add') {
  1954. that.getAddSave()
  1955. } else {
  1956. that.getEditSave()
  1957. }
  1958. },
  1959. clearData() {
  1960. this.formState = {
  1961. id: '',
  1962. bc: '',
  1963. count: '',
  1964. jcdd: '',
  1965. mcgzm: '',
  1966. jcy: this.username,
  1967. time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  1968. ch4: '',
  1969. co2: '',
  1970. co: '',
  1971. o2: '',
  1972. jw: '',
  1973. gw: '',
  1974. bxy: '',
  1975. tbrq: moment(new Date()).format('YYYY-MM-DD'),
  1976. temp: '',
  1977. }
  1978. this.isRule = true
  1979. this.isRule2 = true
  1980. this.isRule1 = true
  1981. this.isRule14 = true
  1982. },
  1983. //新增取消
  1984. getCancel() {
  1985. this.isShowAdd = false
  1986. this.isDisabled = false
  1987. this.saveShowList = {}
  1988. this.clearData()
  1989. },
  1990. //获取瓦斯上报列表数据
  1991. getGasList() {
  1992. let that = this
  1993. new Promise((resolve, reject) => {
  1994. api
  1995. .getGas({ reportTime: that.tbTime, })
  1996. .then((response) => {
  1997. if (response.data.code == 200) {
  1998. let data = response.data.result.records
  1999. that.gasList = data
  2000. } else {
  2001. reject(response);
  2002. }
  2003. })
  2004. .catch((error) => {
  2005. console.log("catch===>response", response);
  2006. reject(error);
  2007. });
  2008. });
  2009. },
  2010. //获取煤层工作面列表数据
  2011. getMcList() {
  2012. new Promise((resolve, reject) => {
  2013. api
  2014. .getDictItems({ dictCode: 'coalseam' })
  2015. .then((response) => {
  2016. let data = response.data
  2017. this.rangeMcgzm = data.map(el => {
  2018. return {
  2019. text: el.label,
  2020. value: el.value,
  2021. }
  2022. })
  2023. })
  2024. .catch((error) => {
  2025. console.log("catch===>response", response);
  2026. reject(error);
  2027. });
  2028. });
  2029. },
  2030. //获取安装位置下拉选项
  2031. getSelectList() {
  2032. let param = this.rangeMcgzm.filter(v => this.formState.mcgzm == v.value)[0].value
  2033. new Promise((resolve, reject) => {
  2034. api
  2035. .getSelect({ coalseam: param, devicekind: 'gasDayReport' })
  2036. .then((response) => {
  2037. if (response.data.code == 200) {
  2038. let data = response.data.result
  2039. this.rangeJcdd = data.map(v => {
  2040. return {
  2041. text: v.strinstallpos,
  2042. value: v.strinstallpos,
  2043. deviceId: v.id,
  2044. }
  2045. })
  2046. } else {
  2047. reject(response);
  2048. }
  2049. })
  2050. .catch((error) => {
  2051. console.log("catch===>response", response);
  2052. reject(error);
  2053. });
  2054. });
  2055. },
  2056. },
  2057. };
  2058. </script>
  2059. <style lang="scss" scoped>
  2060. .gas-report {
  2061. position: relative;
  2062. box-sizing: border-box;
  2063. .gas-content {
  2064. height: 708px;
  2065. margin-top: 85px;
  2066. box-sizing: border-box;
  2067. overflow-y: auto;
  2068. .top-title {
  2069. height: 28px;
  2070. margin-bottom: 5px;
  2071. display: flex;
  2072. justify-content: space-between;
  2073. align-items: center;
  2074. }
  2075. .top-content {
  2076. .content-title {
  2077. height: 26px;
  2078. line-height: 26px;
  2079. padding: 0px 20px;
  2080. font-size: 12px;
  2081. background: url('/static/warndata/title.png') no-repeat;
  2082. background-size: 100% 100%;
  2083. }
  2084. .content-item-box {
  2085. padding: 10px 0px;
  2086. .content-item {
  2087. height: 50px;
  2088. display: flex;
  2089. justify-content: space-between;
  2090. align-items: center;
  2091. background: linear-gradient(to right, rgba(55, 135, 254, 0.08), rgba(4, 184, 255, 0.08), rgba(60, 161, 237, 0.08));
  2092. border-radius: 10px;
  2093. margin-bottom: 5px;
  2094. .item-l {
  2095. width: calc(50% - 2px);
  2096. height: 100%;
  2097. display: flex;
  2098. flex-direction: column;
  2099. justify-content: center;
  2100. align-items: center;
  2101. }
  2102. .item-c {
  2103. width: 4px;
  2104. height: 70%;
  2105. border-left: 2px solid;
  2106. border-image: linear-gradient(to bottom, transparent, rgba(140, 203, 254, 1), transparent) 1 1 1;
  2107. }
  2108. .item-r {
  2109. width: calc(50% - 2px);
  2110. height: 100%;
  2111. display: flex;
  2112. flex-direction: column;
  2113. justify-content: center;
  2114. align-items: center;
  2115. }
  2116. }
  2117. }
  2118. }
  2119. .item-value {
  2120. height: 20px;
  2121. line-height: 20px;
  2122. color: #0eb4fc;
  2123. font-weight: bold;
  2124. }
  2125. .item-label {
  2126. font-size: 12px;
  2127. }
  2128. .top-dialog-area,
  2129. .center-dialog-area,
  2130. .bottom-dialog-area {
  2131. width: 100%;
  2132. padding: 10px;
  2133. box-sizing: border-box;
  2134. background-color: #FFF;
  2135. margin-bottom: 2px;
  2136. }
  2137. .top-gas-list {
  2138. display: flex;
  2139. flex-direction: column;
  2140. align-items: center;
  2141. width: 100%;
  2142. padding: 10px 20px;
  2143. box-sizing: border-box;
  2144. background-color: #FFF;
  2145. margin-bottom: 2px;
  2146. }
  2147. .bot-gas-list {
  2148. width: 100%;
  2149. height: calc(100% - 94px);
  2150. padding: 10px;
  2151. box-sizing: border-box;
  2152. background-color: #FFF;
  2153. margin-bottom: 2px;
  2154. overflow-y: auto;
  2155. }
  2156. .dialog-btn {
  2157. display: flex;
  2158. width: 100%;
  2159. padding: 8px 10px;
  2160. box-sizing: border-box;
  2161. background-color: #FFF;
  2162. // margin-bottom: 2px;
  2163. .u-button {
  2164. margin: 0px 10px;
  2165. }
  2166. }
  2167. .dialog-title {
  2168. height: 26px;
  2169. line-height: 26px;
  2170. padding: 0px 20px;
  2171. margin-bottom: 10px;
  2172. font-size: 12px;
  2173. background: url('/static/warndata/title.png') no-repeat;
  2174. background-size: 100% 100%;
  2175. }
  2176. .dialog-item {
  2177. display: flex;
  2178. align-items: center;
  2179. justify-content: center;
  2180. margin-bottom: 10px;
  2181. .dialog-label {
  2182. width: 120px;
  2183. text-align: right;
  2184. }
  2185. }
  2186. .search-box {
  2187. display: flex;
  2188. align-items: center;
  2189. justify-content: center;
  2190. margin-bottom: 10px;
  2191. .dialog-label {
  2192. width: 80px;
  2193. text-align: right;
  2194. }
  2195. }
  2196. .content-title-gas {
  2197. position: relative;
  2198. height: 26px;
  2199. line-height: 26px;
  2200. padding-left: 20px;
  2201. font-size: 12px;
  2202. background: url('/static/warndata/title.png') no-repeat;
  2203. background-size: 100% 100%;
  2204. }
  2205. .icon-gas-edit {
  2206. position: absolute;
  2207. right: 35px;
  2208. top: 0;
  2209. cursor: pointer;
  2210. }
  2211. .icon-gas-del {
  2212. position: absolute;
  2213. right: 10px;
  2214. top: 0;
  2215. cursor: pointer;
  2216. }
  2217. }
  2218. }
  2219. ::v-deep .u-input {
  2220. padding: 2px 6px !important;
  2221. }
  2222. ::v-deep .u-popup {
  2223. flex: 0;
  2224. }
  2225. ::v-deep .uni-select {
  2226. height: 30px;
  2227. border: 1px solid #dadbde;
  2228. }
  2229. ::v-deep .uni-select__input-box {
  2230. height: 30px;
  2231. }
  2232. ::v-deep .uni-select__input-placeholder {
  2233. font-size: 14px;
  2234. text-align: center;
  2235. color: rgb(192, 196, 204);
  2236. }
  2237. </style>