gasFill.vue 122 KB

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