gasImgIdentify.vue 127 KB

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