gasFill.vue 127 KB

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