gasFill.vue 125 KB

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