gasreport.vue 124 KB

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