gasImgIdentify.vue 164 KB

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