gasImgIdentify.vue 100 KB

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