gasFill.vue 126 KB

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