gasreport.vue 124 KB

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