gasImgIdentify.vue 117 KB

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