gasImgIdentify.vue 126 KB

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