gasImgIdentify.vue 127 KB

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