gasImgIdentify.vue 124 KB

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