gasImgIdentify.vue 127 KB

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