gasFill.vue 125 KB

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