gasreport.vue 122 KB

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