gasImgIdentify.vue 114 KB

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