gasFill.vue 127 KB

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