gasImgIdentify.vue 128 KB

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