gasImgIdentify.vue 129 KB

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