gasImgIdentify.vue 161 KB

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