gasImgIdentify.vue 159 KB

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