gasImgIdentify.vue 162 KB

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