gasreport.vue 123 KB

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