check_implement.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326
  1. <template>
  2. <view>
  3. <view>
  4. <!-- 数据类型为消防设备 --比如一个灭火器 -->
  5. <u-list height="87vh" @scrolltolower="scrolltolower" v-if="!getqrcode">
  6. <u-list-item @click="goDetail" v-for="(item, index) in tableData" :key="index">
  7. <view>
  8. <view class="titles">{{item.inspName}}:{{item.inspContent}}</view>
  9. <!-- 消防设备 -->
  10. <view v-if="item.inspType=='fpd'">
  11. <view style="display: flex;flex-direction: column;margin-left: 40rpx;">
  12. <image :src="scan" class="tupian" @click="erWeiMa(item.id,index)"
  13. style="margin-left: 25rpx;"></image>
  14. <view style="margin-top: 20rpx;">扫二维码</view>
  15. <!-- <view>扫码结果 :{{qrcodeResault}}</view> -->
  16. </view>
  17. <!-- #ifdef H5 -->
  18. <view class="qrcode" v-if="item.qrcodeShow">
  19. <qrcode-stream @decode="onDecode" />
  20. </view>
  21. <!-- #endif -->
  22. </view>
  23. <!-- 数据类型不为消防设备 -->
  24. <uni-grid :column="3" :showBorder="false" v-else>
  25. <!-- <view v-if="item.inspType!='fpd'"> -->
  26. <uni-grid-item v-for="(items,indexs) in item.inspectResultList" :key="indexs">
  27. <!-- 不是消防设施 -->
  28. <view class="grid-item-box">
  29. <image :src="items.subValue==1?zhengchang:moren" class="tupian"
  30. @click="normal(items,indexs,index,item)">
  31. </image>
  32. <text class="text">{{items.subLable}}</text>
  33. </view>
  34. <!-- 是消防设施,点击事件只是弹框 -->
  35. <!-- <view class="grid-item-box" v-else>
  36. <image :src="items.subValue==1?zhengchang:hidden" class="tupian" @click="noNormal">
  37. </image>
  38. <text class="text">{{items.subLable}}</text>
  39. </view> -->
  40. </uni-grid-item>
  41. <!-- </view> -->
  42. <uni-grid-item>
  43. <view class="grid-item-box" @click="photoUpload(item,index)">
  44. <image :src="photograph" class="tupian"></image>
  45. <!-- -->
  46. <uni-load-more v-if="item.loading" status="loading" :content-text="contentText" />
  47. <text v-else class="text">拍照上传</text>
  48. </view>
  49. </uni-grid-item>
  50. </uni-grid>
  51. <!-- 线 -->
  52. <!-- <view style="width: 80%;height: 2rpx;background-color: #f8f8f8;margin-left: 10%;"></view> -->
  53. <!-- v-if="item.attUrl!=[] -->
  54. <view class="uni-grid-wrap" v-if="item.attUrl.length!=0">
  55. <view style="color: #8C8C8C;">设备图片</view>
  56. <view style="position: relative;width: 180rpx;float: left;margin: 40rpx;"
  57. v-for="(items,indexs) in item.attUrl" :key="indexs"
  58. >
  59. <image :src=" items" style="width: 160rpx;height: 160rpx;border-radius: 30rpx;float: left;">
  60. </image>
  61. <u-icon name="close" color="#4CB2B6" size="19" @click="closeImage(item,indexs,index)">
  62. </u-icon>
  63. </view>
  64. </view>
  65. </view>
  66. <view class="slot-contents" v-if="item.showDescription&&item.inspType!='fpd'"
  67. @click="descript(index)">
  68. <textarea v-model="item.description" placeholder="请选择或隐患描述内容"
  69. @click="clickChoiceDanger(index)"></textarea>
  70. <!-- ----隐患 -->
  71. <u-popup :show="item.showDanger" :round="10" @close="item.showDanger=false">
  72. <view style="width: 90vw;overflow-y: auto;margin-bottom: 80rpx;padding:10px">
  73. <text class="text-xl">选择隐患类型:</text>
  74. <view class="" class="person-forward">
  75. <u-checkbox-group v-for="(items, indexs) in item.choiceDanger" :key="indexs"
  76. placement="column" v-model="items.checkedListDanger"
  77. @change="checkboxChange2(items.name,$event)" activeColor="#4CB2B6"
  78. iconSize="red">
  79. <u-checkbox :customStyle="{marginBottom: '60rpx'}" :label="items.name"
  80. :name="items.name">
  81. </u-checkbox>
  82. </u-checkbox-group>
  83. </view>
  84. <view class="flex flex-direction-row "
  85. style="position: fixed;bottom: 10px;left: 50%;transform: translate(-50%);height: 100rpx;width: 80%">
  86. <u-button shape="circle" type="primary" color="#4CB2B6" text="确定"
  87. @click="checkboxConfirm2(index)" customStyle="margin-right:20px;padding:0 30px">
  88. </u-button>
  89. <u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle"
  90. @click="checkboxCancel2(index)" customStyle="padding:0 30px">
  91. </u-button>
  92. </view>
  93. </view>
  94. </u-popup>
  95. <!-- ----隐患 -->
  96. </view>
  97. <!-- <u-modal :show="show2" title="隐患描述" @confirm="descript(index)" @cancel="show2 = false">
  98. <view class="slot-content">
  99. <textarea v-model="description" placeholder="请输入描述内容" />
  100. </view>
  101. </u-modal> -->
  102. <!-- 扫码点击确定后每个设备的信息push到了新的数组里,显示在扫一扫下方的数据-->
  103. <view v-for="(items, indexs) in item.hisFpdCreateReqVOList" :key="indexs" class="child"
  104. style="background-color: aliceblue;">
  105. <view>
  106. <view class="child-new">
  107. <view class="child-new-item">
  108. <u-avatar shape="square" size="80" :src="items.attUrl[0]"
  109. customStyle="margin: -3px 5px -3px 20rpx"></u-avatar>
  110. </view>
  111. <view style="flex:1">
  112. <view>
  113. <view style="margin:40rpx 0 0 40rpx;">设备序列号:{{items.fpdCode}}
  114. </view>
  115. </view>
  116. <view class="child-result">
  117. <uni-grid :column="3" :showBorder="false">
  118. <uni-grid-item v-for="(items2,indexs2) in items.inspectResultList"
  119. :key="indexs2">
  120. <!-- 是消防设施,点击事件只是弹框 -->
  121. <view class="grid-item-box">
  122. <image :src="items2.subValue==1?zhengchang:hidden" class="tupian2"
  123. @click="noNormal">
  124. </image>
  125. <text class="text2">{{items2.subLable}}</text>
  126. </view>
  127. </uni-grid-item>
  128. </uni-grid>
  129. </view>
  130. </view>
  131. </view>
  132. <!-- popup拍照的数据 -->
  133. <!-- <view class="uni-grid-wraps" style="padding-bottom: 20rpx;">
  134. <view style="position: relative;width: 180rpx;float: left;"
  135. v-for="(items3,indexs3) in items.attUrl" :key="indexs3">
  136. <image :src="items3"
  137. style="width: 120rpx;height: 120rpx;border-radius: 30rpx;float: left;margin:0 20rpx 20rpx 0;">
  138. <u-icon name="close" color="#4CB2B6" size="19" @click="closeImage(indexs,index)">
  139. </u-icon>
  140. </view>
  141. </view> -->
  142. <!---->
  143. </view>
  144. </view>
  145. </u-list-item>
  146. </u-list>
  147. </view>
  148. <view
  149. style="width: 60%;position: fixed;bottom:10rpx;z-index: 9999;left: 50%;transform: translate(-50%);height: 6vh;"
  150. v-if="!getqrcode">
  151. <div class="btnList" v-if="tableData.length!=0">
  152. <u-button shape="circle" type="primary" color="#4CB2B6" text="暂存" customStyle="margin-right:20%"
  153. @click="checkImplementConfirm">
  154. <!-- 立即处理改为暂存了 -->
  155. </u-button>
  156. <u-button shape="circle" type="primary" color="#4CB2B6" text="完成任务" @click="checkImplementRelease">
  157. </u-button>
  158. </div>
  159. </view>
  160. <!-- <view style="text-align: center;" v-if="tableData.length==0&&!getqrcode">
  161. <view class="text-gray" style="padding-top: 20px;font-size: 40rpx;"> 暂无任务 </view>
  162. </view> -->
  163. <!-- //"show巡查未完成判断--可能需要打开 -->
  164. <u-modal :show="show" :title="title" :content='content' @confirm="show = false"></u-modal>
  165. <u-modal :show="show3" :title="title" content='未完成有问题检查项拍照' @confirm="show3= false"></u-modal>
  166. <u-modal :show="show4" :title="title" content='未对消防设备进行扫码检查' @confirm="show4= false"></u-modal>
  167. <!-- 弹出层 -->
  168. <u-popup :show="maShow" :round="10">
  169. <view v-if="insTypeData!=''">
  170. <view class="springFarm" v-for="(item,index) in insTypeData" :key="index">
  171. <view class="show-title">设备名称:{{item.fpdName}}</view>
  172. <view class="show-title">设备序列号:{{item.fpdCode}}</view>
  173. <view>
  174. <view class="show-title">设备检查项:</view>
  175. </view>
  176. <view class="" v-if="item.inspectResultList!=''">
  177. <uni-grid :column="3" :showBorder="false">
  178. <uni-grid-item v-for="(items,indexs) in item.inspectResultList" :key="indexs">
  179. <view class="grid-item-box">
  180. <image :src="items.subValue==1?zhengchang:moren" class="tupian"
  181. @click="normalPopup(items,indexs,index)">
  182. </image>
  183. <text class="text">{{items.subLable}}</text>
  184. </view>
  185. </uni-grid-item>
  186. </uni-grid>
  187. </view>
  188. <!-- ----扫码选择隐患 -->
  189. <view class="slot-contents" v-if="show5">
  190. <textarea v-model="description2" placeholder="请输入描述内容" @click="popupChoiceDangerFpd"></textarea>
  191. <u-popup :show="showPopupDanger" :round="10" @close="showPopupDanger=false">
  192. <view style="width: 90vw;overflow-y: auto;margin-bottom: 80rpx;padding:10px">
  193. <text class="text-xl">选择隐患类型:</text>
  194. <view class="" class="person-forward">
  195. <u-checkbox-group v-for="(items, indexs) in choiceDanger" :key="indexs"
  196. placement="column" v-model="items.checkedListDanger"
  197. @change="checkboxChange3(items.name,$event)" activeColor="#4CB2B6"
  198. iconSize="red">
  199. <u-checkbox :customStyle="{marginBottom: '60rpx'}" :label="items.name"
  200. :name="items.name">
  201. </u-checkbox>
  202. </u-checkbox-group>
  203. </view>
  204. <view class="flex flex-direction-row "
  205. style="position: fixed;bottom: 10px;left: 50%;transform: translate(-50%);height: 100rpx;width: 80%">
  206. <u-button shape="circle" type="primary" color="#4CB2B6" text="确定"
  207. @click="checkboxConfirm3()" customStyle="margin-right:20px;padding:0 30px">
  208. </u-button>
  209. <u-button type="primary" plain color="#4CB2B6" text="取消" shape="circle"
  210. @click="checkboxCancel3()" customStyle="padding:0 30px">
  211. </u-button>
  212. </view>
  213. </view>
  214. </u-popup>
  215. </view>
  216. <!-- ----扫码选择隐患 -->
  217. <view class="show-title">
  218. <view class="">巡检拍照:<text style="color:#822e2e;"></text></view>
  219. <view class="">
  220. <image :src="photograph" @click="photoUpload(item,index)" class="tiantupian"></image>
  221. <!-- 加载中 -->
  222. <!-- <isLodingModel></isLodingModel> -->
  223. </view>
  224. <uni-load-more v-show="item.loading" status="loading" :content-text="contentText" />
  225. </view>
  226. <view class="uni-grid-wraps">
  227. <view style="position: relative;width: 180rpx;float: left;margin: 10rpx 15rpx 0 0rpx;"
  228. v-for="(items,indexs) in item.attUrl" :key="indexs"
  229. >
  230. <image :src="items" style="width: 160rpx;height: 160rpx;border-radius: 30rpx;float: left;">
  231. <u-icon name="close" color="#4CB2B6" size="19" @click="closeImage(item,indexs,index)">
  232. </u-icon>
  233. </view>
  234. </view>
  235. <view style="width: 60%;position: fixed;left:150rpx;;bottom:60rpx;z-index: 9999;">
  236. <div class="btnList" v-if="tableData.length!=0">
  237. <u-button shape="circle" type="primary" color="#4CB2B6" text="保存"
  238. customStyle="margin-right:20%" @click="checkPopupConfirm(item.id)">
  239. </u-button>
  240. <u-button shape="circle" type="primary" color="#4CB2B6" text="取消" @click="checkPopupCancel">
  241. </u-button>
  242. </div>
  243. </view>
  244. </view>
  245. </view>
  246. <view v-else>
  247. <view class="" style="text-align: center;margin-top: 30px;">
  248. 暂无数据
  249. </view>
  250. <view style="width: 60%;position: absolute;left:150rpx;;bottom:60rpx;z-index: 9999;">
  251. <div class="btnList" v-if="tableData.length!=0">
  252. <u-button shape="circle" type="primary" color="#4CB2B6" text="保存" customStyle="margin-right:20%"
  253. @click="checkPopupConfirm(item.id)">
  254. </u-button>
  255. <u-button shape="circle" type="primary" color="#4CB2B6" text="取消" @click="checkPopupCancel">
  256. </u-button>
  257. </div>
  258. </view>
  259. </view>
  260. </u-popup>
  261. <!-- <u-modal :show="show5" title="隐患描述" @confirm="descriptFpd" @cancel="show5 = false">
  262. <view class="slot-content shebeidesrip">
  263. <textarea v-model="description2" placeholder="请输入描述内容" />
  264. </view>
  265. </u-modal> -->
  266. <!-- 多选closeable closeOnClickOverlay--点击遮罩层不可关闭所属部门的弹出内容选中 ,选择部门-->
  267. </view>
  268. </template>
  269. <script>
  270. let that = null
  271. // #ifdef H5
  272. import {
  273. QrcodeStream
  274. } from 'vue-qrcode-reader'
  275. // #endif
  276. import {
  277. CheckActiveImplement, //每日巡查扫码界面
  278. saveCheckImplement, //保存检查项
  279. checkSubmitRelease, //提交发布检查下
  280. inspTypeList //二维码的弹框数据
  281. } from "@/api/check_active";
  282. import {
  283. getAccessToken
  284. } from '@/utils/auth'
  285. import {
  286. viewImgBig
  287. } from '@/utils/common.js';
  288. import config from '@/config'
  289. import store from "@/store"
  290. import loadImage from 'blueimp-load-image';
  291. const baseUrl = config.baseUrl
  292. const baseUrlImg = config.baseUrlImg
  293. //隐患弹框--
  294. import {
  295. DICT_TYPE,
  296. getDictDatas
  297. } from '@/utils/dict';
  298. //隐患弹框--
  299. export default {
  300. components: {
  301. // #ifdef H5
  302. QrcodeStream
  303. // #endif
  304. },
  305. data() {
  306. return {
  307. contentText: {
  308. contentrefresh: '上传照片中',
  309. },
  310. // ----隐患
  311. choiceDanger: getDictDatas(DICT_TYPE.DANGER_TYPE),
  312. checkedDanger: [],
  313. checkedListDanger: [], //选择的隐患数据
  314. DangerIndex: "", //隐患描述的位置下标
  315. // ----隐患
  316. // ----扫码选择隐患
  317. showPopupDanger: false,
  318. checkedPopupDanger: [], //
  319. // ----扫码选择隐患
  320. insType: 1, //1代表检查类型为消防设施,显示扫一扫按钮,其他则显示拍照
  321. // danger: danger, //有隐患图片
  322. moren: `${baseUrlImg}/checkActive/moren.png`, //默认图片
  323. zhengchang: `${baseUrlImg}/checkActive/zhengchang.png`,
  324. hidden: `${baseUrlImg}/checkActive/hidden.png`,
  325. photograph: `${baseUrlImg}/checkActive/photograph.png`,
  326. scan: `${baseUrlImg}/checkActive/scan.png`,
  327. tableData: [],
  328. maShow: false, //扫码后弹框是否展示
  329. // 每页数据量
  330. // 当前页
  331. // 数据总量
  332. total: 0,
  333. getqrcode: false,
  334. loading: false,
  335. formData: {
  336. id: 0,
  337. pageNo: 1,
  338. pageSize: 10,
  339. status: 0,
  340. taskStatus: 1,
  341. broadId: 0,
  342. },
  343. saveImplement: {
  344. inspectList: [],
  345. inspectTime: "", //传的当前事件
  346. orgId: 0,
  347. taskId: 0, //待完成列表所点击的id
  348. broadId: 0,
  349. description: ''
  350. },
  351. isZhengChang: false, //是否正常
  352. isYinHuan: false, //是否隐患
  353. show: false, //未巡查提示框
  354. show2: false, //隐患描述提示框
  355. show3: false, //未拍照提示框
  356. show4: false, //未巡查扫码提示框
  357. show5: false, //检查设备隐患描述提示框
  358. title: '注意',
  359. content: '巡查未完成',
  360. contents: '',
  361. description: '', //隐患描述内容
  362. description2: '', //检查设备的描述内容
  363. newtableDatas: [], //缓存的数据,防止覆盖
  364. id: '',
  365. FinalTime: '',
  366. Insdengers: '', //每个列的检查项是否勾选
  367. nnorNormalValue: '',
  368. erWeiMaShu: '', //二维码内容对象
  369. insTypeData: '', //扫二维码后出现的消防列表数据内容
  370. newInsTypeData: [], //点击扫码后的设备内容
  371. confirminsTypeData: [], //点击确定新建一个新的数组
  372. checkTableDataId: 0, //扫码所点击的当前检查设施的id
  373. descriptIndex: '', //描述所在id
  374. yilou: false, //如果显示了有遗漏的检查项就不提示还未拍照
  375. type: '',
  376. selectedIndex: '',
  377. qrcodeShow: false,
  378. qrcodeResault: '等待扫码...',
  379. onDecodeIndex: '',
  380. submitButton: '完成任务',
  381. }
  382. },
  383. watch: {
  384. loading: {
  385. handler(newLength, oldLength) {
  386. this.$modal.isLoadingModel(this.loading)
  387. },
  388. immediate: true
  389. }
  390. },
  391. // 在 vue页面,向起始页通过事件传递数据
  392. onLoad: function(option) {
  393. this.choiceDanger.map(i => {
  394. i.name = i.label;
  395. i.id = i.value;
  396. });
  397. this.type = option.type ? option.type : ''
  398. that = this;
  399. const eventChannel = this.getOpenerEventChannel();
  400. eventChannel.on('acceptDataFromOpenerPage', function(val) {
  401. // that.formData = val
  402. that.options = val.taskInfo ? val.taskInfo : val
  403. that.formData.id = parseInt(that.options.id)
  404. that.contents = that.options.taskContent
  405. that.formData.broadId = parseInt(option.broadId)
  406. that.saveImplement.broadId = parseInt(option.broadId)
  407. that.saveImplement.orgId = parseInt(that.options.orgId)
  408. that.newtableDatas.push(uni.getStorageSync('tableData'))
  409. if (that.newtableDatas && that.newtableDatas[0][option.broadId]) { //获取本地缓存的数据
  410. that.tableData = that.newtableDatas[0][option.broadId]
  411. that.tableData.map(i => i.choiceDanger = that.choiceDanger)
  412. that.insTypeData = uni.getStorageSync('insTypeData')
  413. } else {
  414. that.tableData = []
  415. that.getData(that.formData.pageNo)
  416. }
  417. })
  418. },
  419. onShow() {},
  420. methods: {
  421. viewImageBig(i, imgList) {
  422. viewImgBig(i, imgList)
  423. },
  424. // ----隐患
  425. checkboxConfirm2(index) {
  426. this.choiceDanger.map(i => {
  427. if (i.name == this.checkedListDanger[this.checkedListDanger.length - 1]) {
  428. this.tableData[index].dengerType = i.value
  429. }
  430. });
  431. this.tableData[index].description = this.checkedListDanger.toString()
  432. if (this.tableData[index].description.startsWith(',')) {
  433. this.tableData[index].description = this.tableData[index].description.slice(1);
  434. }
  435. this.tableData[index].showDanger = false
  436. this.$forceUpdate()
  437. },
  438. checkboxCancel2(index) {
  439. this.tableData[index].showDanger = false
  440. this.checkedListDanger = []
  441. this.$forceUpdate()
  442. },
  443. clickChoiceDanger(index) { //描述框点击事件
  444. this.checkedListDanger = this.tableData[index].description.split(',')
  445. if (this.checkedListDanger.includes('其他')) {
  446. this.tableData[index].showDanger = false
  447. } else {
  448. this.tableData[index].showDanger = true
  449. this.DangerIndex = index
  450. this.$forceUpdate()
  451. }
  452. this.tableData[index].choiceDanger.map((i, indexs) => { //选中的回显
  453. i.checkedListDanger = []
  454. this.checkedListDanger.map(v => {
  455. if (i.name == v) {
  456. this.tableData[index].choiceDanger[indexs].checkedListDanger.push(v)
  457. }
  458. })
  459. })
  460. },
  461. checkboxChange2(i, n) { //勾选的事件
  462. if (i && n.length != 0) {
  463. this.checkedListDanger.push(i)
  464. } else if (i && n.length == 0) {
  465. this.checkedListDanger = this.checkedListDanger.filter(item => item != i)
  466. }
  467. },
  468. // ----隐患
  469. // ----扫码选择隐患
  470. popupChoiceDangerFpd() {
  471. this.checkedPopupDanger = this.description2.split(',')
  472. if (this.checkedPopupDanger.includes('其他')) {
  473. this.showPopupDanger = false
  474. } else {
  475. this.showPopupDanger = true
  476. this.$forceUpdate()
  477. }
  478. this.choiceDanger.map((i, indexs) => { //选中的回显
  479. i.checkedListDanger = []
  480. this.checkedPopupDanger.map(v => {
  481. if (i.name == v) {
  482. this.choiceDanger[indexs].checkedListDanger.push(v)
  483. }
  484. })
  485. })
  486. },
  487. checkboxConfirm3(index) {
  488. this.choiceDanger.map(i => {
  489. if (i.name == this.checkedPopupDanger[this.checkedPopupDanger.length - 1]) {
  490. this.insTypeData[0].dengerType = i.value
  491. }
  492. });
  493. this.description2 = this.checkedPopupDanger.toString()
  494. if (this.description2.startsWith(',')) {
  495. this.description2 = this.description2.slice(1);
  496. }
  497. this.showPopupDanger = false
  498. this.$forceUpdate()
  499. },
  500. checkboxCancel3(index) {
  501. this.showPopupDanger = false
  502. this.checkedPopupDanger = []
  503. this.$forceUpdate()
  504. },
  505. checkboxChange3(i, n) { //勾选的事件
  506. if (i && n.length != 0) {
  507. this.checkedPopupDanger.push(i)
  508. } else if (i && n.length == 0) {
  509. this.checkedPopupDanger = this.checkedPopupDanger.filter(item => item != i)
  510. }
  511. },
  512. // ----扫码选择隐患
  513. //扫码
  514. erWeiMa(checkTableDataIds, index) {
  515. // #ifdef H5
  516. this.tableData[index].qrcodeShow = true
  517. this.$forceUpdate()
  518. this.onDecodeIndex = index
  519. this.checkTableDataId = checkTableDataIds
  520. // #endif
  521. // #ifdef MP-WEIXIN
  522. var that = this
  523. this.description = ''
  524. // 只允许从相机扫码
  525. uni.scanCode({
  526. onlyFromCamera: true, //只允许从相机扫码
  527. success: function(res) {
  528. if (res.errMsg == "scanCode:ok") {
  529. let result = JSON.parse(res.result)
  530. if (that.tableData[index].hisFpdCreateReqVOList.length > 0) {
  531. var temp = that.tableData[index].hisFpdCreateReqVOList
  532. // console.log(temp);
  533. temp = temp.filter(i => i.id == result.id)
  534. if (temp.length > 0) {
  535. this.tableData[this.onDecodeIndex].qrcodeShow = false
  536. return that.$modal.alert('该设备已检查')
  537. }
  538. }
  539. //调接口,会传过来id标识,失败显示错误信息,比如该设备不存在,成功的花弹出扫码成功
  540. inspTypeList(JSON.parse(res.result)).then(reponse => {
  541. if (reponse.code == 0) {
  542. that.maShow = true
  543. that.insTypeData = reponse.data.records
  544. that.insTypeData.map(i => {})
  545. }
  546. })
  547. setTimeout(() => {
  548. that.$modal.msgSuccess('扫码成功')
  549. }, 200)
  550. that.checkTableDataId = checkTableDataIds
  551. }
  552. },
  553. fail: (err) => {
  554. that.$modal.msgError('未识别到二维码,请重新尝试!')
  555. }
  556. })
  557. // #endif
  558. },
  559. // #ifdef H5
  560. // H5相机相关函数
  561. onDecode(qrcodeVal) {
  562. try {
  563. let result = JSON.parse(qrcodeVal);
  564. } catch (error) {
  565. return this.$modal.alert('无法解析二维码内容');
  566. }
  567. this.qrcodeResault = qrcodeVal
  568. let result = JSON.parse(qrcodeVal)
  569. this.tableData[this.onDecodeIndex].qrcodeShow = false
  570. var that = this
  571. if (that.tableData[this.onDecodeIndex].hisFpdCreateReqVOList.length > 0) {
  572. var temp = that.tableData[this.onDecodeIndex].hisFpdCreateReqVOList
  573. temp = temp.filter(i => i.id == result.id)
  574. if (temp.length > 0) return that.$modal.alert('该设备已检查')
  575. }
  576. //调接口,会传过来id标识,失败显示错误信息,比如该设备不存在,成功的花弹出扫码成功
  577. inspTypeList(JSON.parse(qrcodeVal)).then(reponse => {
  578. if (reponse.code == 0) {
  579. that.maShow = true
  580. that.insTypeData = reponse.data.records
  581. that.insTypeData.map(i => i.attUrl = [])
  582. }
  583. })
  584. },
  585. onInit(promise) { //未使用
  586. promise
  587. .then(console.log)
  588. .catch(console.error)
  589. },
  590. // #endif
  591. descript(index) { //隐患描述点击确认
  592. // this.show2 = false
  593. // this.tableData[index].description = this.description
  594. },
  595. descriptFpd() { //隐患描述点击确认
  596. this.show5 = false
  597. },
  598. closeImage(item, val, k) { //删除图片
  599. if (item.inspType == 'fpd') {
  600. this.insTypeData[k].attUrl.splice(val, 1)
  601. } else {
  602. this.tableData[k].attUrl.splice(val, 1)
  603. }
  604. that.$forceUpdate();
  605. },
  606. goDetail() { //去详情
  607. uni.navigateTo({
  608. url: '/pagesA/fire/check_active/check_implement_detail/check_implement_detail',
  609. })
  610. },
  611. checkImplementConfirm() { //确认保存检查项
  612. this.shuJu()
  613. var total = uni.getStorageSync('tableData') ? uni.getStorageSync('tableData') : {} //避免掉覆盖
  614. total[this.saveImplement.broadId] = this.tableData
  615. uni.setStorageSync('tableData', total)
  616. this.$modal.msg('暂存成功')
  617. // this.tableData.map(i => {
  618. // if (i.isdenger == undefined) {
  619. // this.show = true
  620. // }
  621. // }) //判断是否完成巡查
  622. //批量保存
  623. // console.log(this.show,'Confirmthis.show');
  624. // if (!this.show) {
  625. // saveCheckImplement(JSON.stringify(this.saveImplement)).then(response => { 调接口了
  626. // if (response.data) {
  627. // uni.showToast({
  628. // title: '保存成功',
  629. // icon: 'none',
  630. // duration: 2000
  631. // })
  632. // uni.navigateBack()
  633. // } else {
  634. // this.$modal.msgError('保存失败')
  635. // }
  636. // });
  637. // }
  638. },
  639. checkImplementRelease() { //提交发布
  640. this.shuJu()
  641. this.saveImplement.inspectList.map((i) => { //提交数据组装
  642. if (i.inspType == 'fpd') {
  643. i.hisFpdCreateReqVOList.map(k => {
  644. k.status = 0
  645. k.fpdId = k.id
  646. if (k.dangerDescribe != undefined) {
  647. let strs = ""
  648. strs += `${k.dangerDescribe},`
  649. i.description = strs.slice(0, strs.length - 1)
  650. }
  651. k.imgUrl1 = k.attUrl[0]
  652. k.imgUrl2 = k.attUrl[1]
  653. k.imgUrl3 = k.attUrl[2]
  654. k.fpdResultCreateReqVOList = []
  655. k.fpdResultCreateReqVOList = k.inspectResultList
  656. k.fpdResultCreateReqVOList.map(z => {
  657. z.broadId = this.formData.broadId
  658. z.fpdId = z.id
  659. z.resLable = z.subLable
  660. z.resValue = z.subValue
  661. z.status = 0
  662. if (z.subValue == 0 && z.isNormal ==
  663. 1) { //必传参数,只有该检查项正常为0,那么isdenger==1
  664. k.isdanger = 1
  665. i.isdanger = 1
  666. }
  667. })
  668. })
  669. } else {
  670. i.hisResultCreateReqVOList = i.inspectResultList
  671. i.hisResultCreateReqVOList.map(k => {
  672. k.status = 0
  673. k.broadId = this.formData.broadId
  674. k.fpdId = k.id
  675. k.resLable = k.subLable
  676. k.resValue = k.subValue
  677. k.status = 0
  678. if (k.subValue == 0 && k.isNormal == 1) {
  679. i.isdanger = 1
  680. }
  681. })
  682. }
  683. });
  684. //检查拍照是否有遗漏没有勾选拍照的----------
  685. let arrs = new Array()
  686. this.saveImplement.inspectList.map((i, index) => {
  687. if (i.inspType != 'fpd') {
  688. arrs[index] = new Array()
  689. i.inspectResultList.map((k, indexs) => {
  690. arrs[index][indexs] = new Array(i.inspectResultList.length)
  691. arrs[index][indexs] = k.subValue
  692. })
  693. }
  694. })
  695. arrs.map(i => {
  696. if (!i.includes(1)) {
  697. // this.yilou = true
  698. this.show = true
  699. return;
  700. }
  701. })
  702. // console.log(this.saveImplement, '消防设备和消防设施'); 屏蔽未检查校验2
  703. this.saveImplement.inspectList.map((i, index) => {
  704. if (i.inspType != 'fpd') { //有不正常的必须拍照
  705. i.inspectResultList.map((k, indexs) => {
  706. if (i.attUrl.length == 0) {
  707. if (k.isNormal == 1 && k.subValue == 0 && !this.yilou) return this.show3 =
  708. true
  709. }
  710. })
  711. } else if (i.inspType == 'fpd' && i.hisFpdCreateReqVOList.length == 0) {
  712. return this.show4 = true
  713. }
  714. })
  715. // console.log(this.saveImplement, '消防设备和消防设施'); 屏蔽未检查校验2
  716. //检查拍照是否有遗漏没有勾选的-----------
  717. if (!this.show && !this.show3 && !this.show4) { //屏蔽未检查校验2
  718. if (!this.show) {
  719. // 巡查未完成判断
  720. checkSubmitRelease(JSON.stringify(this.saveImplement)).then(response => {
  721. if (response.data) {
  722. uni.showToast({
  723. title: '提交成功',
  724. icon: 'none',
  725. duration: 2000
  726. })
  727. const table = uni.getStorageSync('tableData')
  728. delete table[this.saveImplement.broadId] //保存时删除掉保存的那一项再保存
  729. uni.setStorageSync('tableData', table)
  730. setTimeout(() => {
  731. uni.redirectTo({
  732. url: `/pagesA/fire/check_active/index?current=1&type=${this.type}`
  733. });
  734. }, 1000)
  735. } else {
  736. this.$modal.msgError('提交失败')
  737. }
  738. })
  739. }
  740. }
  741. },
  742. shuJu() {
  743. this.saveImplement.inspectList = this.tableData
  744. this.saveImplement.taskId = this.formData.id
  745. },
  746. // 获取数据
  747. getData(pageNo, value = '') {
  748. this.loading = true
  749. this.formData.pageNo = pageNo
  750. CheckActiveImplement(JSON.stringify(this.formData)).then(response => {
  751. if (response.data) {
  752. this.total = response.data.total
  753. this.loading = false;
  754. this.tableData = response.data.records
  755. this.tableData.map(i => {
  756. i.inspId = i.id
  757. i.loading = false
  758. // i.inspName = i.insp_name
  759. // i.inspCode = i.insp_code
  760. i.isreport = 0
  761. i.status = 0
  762. i.attUrl = []
  763. i.description = ''
  764. i.isdanger = i.isdanger
  765. i.hisFpdCreateReqVOList = []
  766. i.hisResultCreateReqVOList = []
  767. i.qrcodeShow = false
  768. // ----隐患
  769. i.choiceDanger = this.choiceDanger //隐患描述下拉的数据
  770. // ----隐患
  771. })
  772. }
  773. });
  774. // this.newInsTypeData.map(i => {
  775. // i.attUrl = []
  776. // })
  777. },
  778. // 触底的事件
  779. scrolltolower() {
  780. // 判断是否还有下一页数据
  781. if (this.formData.pageNo * this.formData.pageSize >= this.total) return uni.showToast({
  782. title: `数据加载完毕`
  783. })
  784. // 判断是否正在请求其它数据,如果是,则不发起额外的请求
  785. if (this.loading) return
  786. this.formData.pageNo += 1
  787. },
  788. noNormal() {
  789. this.$modal.alert('此检查项为消防设备,请对设备进行扫码')
  790. },
  791. normal(items, indexs, index, item) {
  792. this.tableData[index].description = this.description
  793. // 根据norNormal == 1判断哪一个是单独与其他互斥的
  794. this.id = items.id
  795. this.descriptIndex = index //给提交发布的描述用的
  796. this.tableData[index].inspectResultList.map(k => {
  797. if (k.isNormal == 1) this.nnorNormalValue = k.id
  798. //给提交发布的描述用的
  799. if (this.tableData[index].inspectResultList[indexs].isNormal != 1 && this.tableData[index]
  800. .inspectResultList[indexs].subValue != 1) {
  801. this.show2 = true
  802. }
  803. })
  804. // tableItem当前点击的复选框值
  805. let tableItem = this.tableData[index].inspectResultList[indexs]
  806. let ALLinspectResultList = this.tableData[index].inspectResultList
  807. let YesinspectResultList = [] //独一个
  808. let NorinspectResultList = [] //其他的互斥的
  809. var Y = ALLinspectResultList.filter(i => i.id == this.nnorNormalValue)
  810. var N = ALLinspectResultList.filter(i => i.id != this.nnorNormalValue)
  811. N.map(n => {
  812. NorinspectResultList.push(n.subValue)
  813. })
  814. Y.map(y => {
  815. YesinspectResultList.push(y.subValue)
  816. })
  817. // items.isdenger = 0 ? 1 : 0
  818. if (NorinspectResultList.includes(1)) { //如果互斥的数组存在true normal!=1的数组
  819. if (tableItem.id == this.nnorNormalValue) { //当点击的是value == this.nnorNormalValue是
  820. this.tableData[index].inspectResultList.map((i, kindex) => {
  821. if (i.id != this.nnorNormalValue) {
  822. i.subValue = 0
  823. this.show2 = false
  824. } else {
  825. i.subValue = 1
  826. }
  827. })
  828. } else {
  829. // tableItem.subValue = !tableItem.subValue //不为独一份时,执行改语句
  830. items.subValue = items.subValue == 0 ? 1 : 0
  831. this.show2 = false
  832. }
  833. } else { //如果互斥的数组不存在true,全是false normal!=1的数组
  834. if (tableItem.id == this.nnorNormalValue) { //如果点击的是独一份
  835. // tableItem.subValue = !tableItem.subValue //允许执行
  836. items.subValue = items.subValue == 0 ? 1 : 0
  837. } else { //如果点击的是互斥的
  838. // if (YesinspectResultList.includes(true)) { //是否存在第一份
  839. this.tableData[index].inspectResultList.map((i, kindex) => {
  840. if (i.id == this.nnorNormalValue) {
  841. i.subValue = 0
  842. }
  843. })
  844. // }
  845. // tableItem.subValue = !tableItem.subValue
  846. items.subValue = items.subValue == 0 ? 1 : 0
  847. }
  848. }
  849. if (items.isNormal == 0 && items.subValue == 1) {
  850. item.showDescription = true; // 显示描述框
  851. // ----隐患
  852. this.tableData[this.descriptIndex].choiceDanger.map(i => i.checkedListDanger = [])
  853. // ----隐患
  854. } else {
  855. item.showDescription = false; // 显示描述框
  856. }
  857. },
  858. // 消防设备扫码
  859. normalPopup(items, indexs, index) {
  860. // this.insTypeData.map(k => {
  861. // k.attUrl = []
  862. // })
  863. this.insTypeData[index].inspectResultList.map(k => {
  864. if (k.isNormal == 1) this.nnorNormalValue = k.id
  865. if (this.insTypeData[index].inspectResultList[indexs].isNormal != 1 && this.insTypeData[index]
  866. .inspectResultList[indexs].subValue != 1) {
  867. this.show5 = true
  868. }
  869. })
  870. let tableItem = this.insTypeData[index].inspectResultList[indexs]
  871. let ALLinspectResultList = this.insTypeData[index].inspectResultList
  872. let YesinspectResultList = []
  873. let NorinspectResultList = []
  874. var Y = ALLinspectResultList.filter(i => i.id == this.nnorNormalValue)
  875. var N = ALLinspectResultList.filter(i => i.id != this.nnorNormalValue)
  876. N.map(n => {
  877. NorinspectResultList.push(n.subValue)
  878. })
  879. Y.map(y => {
  880. YesinspectResultList.push(y.subValue)
  881. })
  882. // items.isdenger = 0 ? 1 : 0
  883. if (NorinspectResultList.includes(1)) { //如果互斥的数组存在true normal!=1的数组
  884. if (tableItem.id == this.nnorNormalValue) {
  885. this.insTypeData[index].inspectResultList.map((i, kindex) => {
  886. if (i.id != this.nnorNormalValue) {
  887. i.subValue = 0
  888. } else {
  889. i.subValue = 1
  890. }
  891. })
  892. } else {
  893. items.subValue = items.subValue == 0 ? 1 : 0
  894. }
  895. } else {
  896. if (tableItem.id == this.nnorNormalValue) {
  897. items.subValue = items.subValue == 0 ? 1 : 0
  898. } else {
  899. // if (YesinspectResultList.includes(true)) { //是否存在第一份
  900. this.insTypeData[index].inspectResultList.map((i, kindex) => {
  901. if (i.id == this.nnorNormalValue) {
  902. i.subValue = 0
  903. }
  904. })
  905. // }
  906. items.subValue = items.subValue == 0 ? 1 : 0
  907. }
  908. }
  909. // ----扫码选择隐患
  910. if (items.isNormal == 0 && items.subValue == 1) {
  911. this.show5 = true; // 显示描述框
  912. // this.insTypeData.choiceDanger.map(i => i.checkedListDanger = [])
  913. } else {
  914. this.show5 = false; // 显示描述框
  915. }
  916. // ----扫码选择隐患
  917. },
  918. checkPopupConfirm(fpdId) { //弹出得到的那一条数据insTypeData的id 弹出保存
  919. //this.insTypeData[0]扫二维码后点击出现的一条消防列表数据内容 this.newInsTypeData的多条数据列表
  920. let arr = []
  921. let normalArr = 0
  922. this.insTypeData[0].inspectResultList.map((i, index) => {
  923. arr.push(i.subValue)
  924. if (i.isNormal == 1) {
  925. normalArr = index //找到正常的所在的index
  926. }
  927. })
  928. if (arr.includes(1)) { //包含了证明勾选了
  929. arr.map((i, index) => {
  930. if (i == 1) { //如果i是1表示点击了隐患,判断点击的隐患是否是isnormal=1的,如不是并且图片长度为0,就提示拍照
  931. // if (index != normalArr && this.insTypeData[0].attUrl.length == 0) {
  932. // that.$modal.alert('请对有问题设备进行拍照')
  933. // } else {
  934. // this.newInsTypeData = [...this.newInsTypeData, ...this.insTypeData]
  935. // uni.setStorageSync('newInsTypeDatas', this.newInsTypeData)
  936. // this.newInsTypeData = uni.getStorageSync('newInsTypeDatas')
  937. this.tableData.map(i => {
  938. if (i.id == this.checkTableDataId) {
  939. i.dengerType = this.insTypeData[0].dengerType
  940. i.hisFpdCreateReqVOList = [...i.hisFpdCreateReqVOList, ...this
  941. .insTypeData
  942. ]
  943. i.hisFpdCreateReqVOList.map(k => {
  944. k['broadId'] = that.formData.broadId
  945. if (k.id == fpdId) {
  946. k['dangerDescribe'] = this.description2
  947. this.description2 = ''
  948. }
  949. })
  950. }
  951. })
  952. this.insTypeData = []
  953. this.insTypeData.map(k => {
  954. k.attUrl = [],
  955. k.loading = false,
  956. k.dengerType = ''
  957. })
  958. this.maShow = false
  959. // }
  960. }
  961. })
  962. } else {
  963. that.$modal.msg('请勾选检查结果')
  964. }
  965. // ----扫码选择隐患
  966. this.description2 = ''
  967. this.show5 = false
  968. // this.tableData.map((i) => { //这一段不用放开,以前是用于消防设备扫多个码统计数据展示的
  969. // if (i.id = fpdId) {
  970. // let isNormalZero=new Array(i.inspectResultList.length) //新建数组用来放isNormal为1和不为1处理后的分别的数组
  971. // this.newInsTypeData.map(k => {
  972. // k.inspectResultList.map((j,index) => {
  973. // isNormalZero[index]=[]
  974. // isNormalZero[index].push(j.subValue)
  975. // })
  976. // })
  977. // i.inspectResultList.map((g,index)=>{
  978. // if(isNormalZero[index].includes(1)){
  979. // g.subValue=1
  980. // if(g.isNormal==1){
  981. // g.subValue=0
  982. // }
  983. // }
  984. // })
  985. // }
  986. // })
  987. // this.$forceUpdate()
  988. },
  989. checkPopupCancel() {
  990. this.tableData[this.onDecodeIndex].qrcodeShow = false
  991. this.maShow = false
  992. },
  993. //拍照上传
  994. photoUpload(val, index) {
  995. let pictures = [];
  996. var that = this;
  997. if (val.inspType != 'fpd') {
  998. that.tableData[index].loading = true
  999. } else {
  1000. that.insTypeData[index].loading = true
  1001. }
  1002. this.$forceUpdate()
  1003. uni.chooseImage({
  1004. sourceType: ['camera'], //实现拍照
  1005. count: 3,
  1006. sizeType: ['original', 'compressed'],
  1007. // sourceType: ['album','camera'], //打开系统相册
  1008. success(res) {
  1009. if (Array.isArray(res.tempFilePaths)) { //从相册选择有三张的情况
  1010. res.tempFilePaths.forEach(item => {
  1011. loadImage(
  1012. item,
  1013. function(canvas) {
  1014. canvas.toBlob(function(blob) {
  1015. // 压缩后的 Blob 对象
  1016. const compressedFile = blob;
  1017. // 将压缩后的文件 `compressedFile` 转换为临时URL
  1018. const fileUrl = URL.createObjectURL(
  1019. compressedFile);
  1020. uni.uploadFile({
  1021. url: baseUrl +
  1022. '/admin-api/infra/file/upload', //后端用于处理图片并返回图片地址的接口
  1023. filePath: item,
  1024. name: 'file',
  1025. header: {
  1026. "Authorization": 'Bearer ' +
  1027. getAccessToken(),
  1028. }, //请求token
  1029. success: (res) => {
  1030. // that.loading = false
  1031. if (that.tableData[index]
  1032. .loading) {
  1033. that.tableData[index]
  1034. .loading = false
  1035. } else if (that.insTypeData[
  1036. index]
  1037. .loading) {
  1038. that.insTypeData[index]
  1039. .loading = false
  1040. }
  1041. let imgUrl = JSON.parse(res
  1042. .data)
  1043. // that.imageList.push(imgUrl.data)
  1044. if (val.inspType != 'fpd') {
  1045. that.tableData.map((i,
  1046. index) => {
  1047. if (val.id == i
  1048. .id) {
  1049. i.attUrl
  1050. .push(
  1051. imgUrl
  1052. .data
  1053. )
  1054. }
  1055. })
  1056. } else { //消防设备外(扫一扫下方)展示的图片
  1057. //弹出层的消防设备展示的图片
  1058. that.insTypeData.map((i,
  1059. index) => {
  1060. if (val.id == i
  1061. .id) {
  1062. i.attUrl
  1063. .push(
  1064. imgUrl
  1065. .data
  1066. )
  1067. }
  1068. })
  1069. }
  1070. that.$forceUpdate();
  1071. // // 返回的url
  1072. },
  1073. fail: (err) => {
  1074. // that.loading = false
  1075. if (that.tableData[index]
  1076. .loading) {
  1077. that.tableData[index]
  1078. .loading = false
  1079. } else if (that.insTypeData[
  1080. index]
  1081. .loading) {
  1082. that.insTypeData[index]
  1083. .loading = false
  1084. }
  1085. this.$modal.msg(err.msg)
  1086. }
  1087. })
  1088. URL.revokeObjectURL(fileUrl);
  1089. }, 'image/jpeg', 0.6); // 设置压缩后的图片格式为 JPEG,压缩质量为 0.6
  1090. }, {
  1091. canvas: true,
  1092. maxWidth: 800
  1093. } // 设置最大宽度为 800px
  1094. );
  1095. })
  1096. }
  1097. }
  1098. })
  1099. },
  1100. // // 将拍的照片的base64转成文件格式然后再转成FormData,就可以使用上传图片的接口了
  1101. // base64ToFile(base64){
  1102. // const dataArr = base64.split(',');
  1103. // const byteString = atob(dataArr[1]);
  1104. // const options = {
  1105. // type:'image/jpeg',
  1106. // endings:'native'
  1107. // };
  1108. // const u8Arr = new Uint8Array(byteString.length)
  1109. // for(let i=0;i<byteString.length;i++){
  1110. // u8Arr[i]=byteString.charCodeAt(i);
  1111. // }
  1112. // return new File([u8Arr],'phone.png',options)
  1113. // },
  1114. //methode结束
  1115. }
  1116. }
  1117. </script>
  1118. <style lang="scss" scoped>
  1119. page {
  1120. background-color: rgb(245, 247, 249) !important;
  1121. }
  1122. .container {
  1123. // height: 100vh;
  1124. position: relative;
  1125. background-color: rgb(245, 247, 249);
  1126. }
  1127. /deep/.uni-card {
  1128. box-shadow: 0px 0px 3px 0px rgba(86, 165, 168, 0.63) !important;
  1129. border-radius: 20rpx;
  1130. }
  1131. .tupian {
  1132. width: 48rpx;
  1133. height: 48rpx;
  1134. }
  1135. .tupian2 {
  1136. width: 30rpx;
  1137. height: 30rpx;
  1138. }
  1139. .text {
  1140. text-align: center;
  1141. color: #000;
  1142. font-size: 26rpx;
  1143. margin-top: 20rpx;
  1144. }
  1145. .text2 {
  1146. text-align: center;
  1147. color: #000;
  1148. font-size: 22rpx;
  1149. margin-top: 10rpx;
  1150. }
  1151. .child {
  1152. margin: 20rpx 0 0 20rpx;
  1153. border-radius: 10rpx;
  1154. .child-new {
  1155. display: flex;
  1156. .child-new-item {
  1157. width: 30%;
  1158. margin-top: 25%;
  1159. transform: translateY(-50px);
  1160. }
  1161. .child-result {
  1162. /deep/.data-v-525ecd67 {
  1163. // width: 130rpx;
  1164. height: 100rpx;
  1165. }
  1166. }
  1167. }
  1168. }
  1169. .titles {
  1170. padding: 20rpx 0;
  1171. color: #383838;
  1172. }
  1173. .grid-item-box {
  1174. flex: 1;
  1175. display: flex;
  1176. flex-direction: column;
  1177. align-items: center;
  1178. justify-content: center;
  1179. padding: 15px 0;
  1180. }
  1181. /deep/ .uni-grid-item {
  1182. height: 140rpx !important;
  1183. }
  1184. /deep/.uni-textarea-textarea {
  1185. // border: 1px solid #4CB2B6;
  1186. border-radius: 16rpx;
  1187. }
  1188. .shebeidesrip {
  1189. /deep/.uni-textarea-textarea {
  1190. border: none;
  1191. border-radius: 16rpx;
  1192. }
  1193. }
  1194. .btnList {
  1195. display: flex
  1196. }
  1197. // /deep/.u-icon--right[data-v-172979f2],
  1198. // /deep/.u-icon--right.data-v-172979f2,
  1199. // /deep/.u-icon--right {
  1200. // background-color: #f8f8f8;
  1201. // border-radius: 5rpx;
  1202. // position: absolute;
  1203. // top: -14rpx;
  1204. // right: 20rpx;
  1205. // }
  1206. .uni-grid-wraps {
  1207. margin-left: 60rpx;
  1208. // margin-bottom: 40rpx;
  1209. margin-bottom: 480rpx !important;
  1210. }
  1211. /deep/.u-slide-up-enter-active[data-v-39e33bf2],
  1212. /deep/.u-slide-up-enter-active.data-v-39e33bf2,
  1213. /deep/.u-slide-up-enter-active {
  1214. height: 90% !important;
  1215. }
  1216. .springFarm {
  1217. margin-left: 40rpx;
  1218. }
  1219. .show-title {
  1220. font-size: 32rpx;
  1221. color: #383838;
  1222. margin: 40rpx 0;
  1223. }
  1224. .tiantupian {
  1225. margin: 40rpx;
  1226. width: 100rpx;
  1227. height: 100rpx
  1228. }
  1229. /deep/.u-modal {
  1230. border: 1px solid #4CB2B6 !important;
  1231. }
  1232. .slot-contents {
  1233. margin-left: 40rpx;
  1234. }
  1235. /deep/ .slot-contents .uni-textarea-textarea {
  1236. border: 1px solid #4CB2B6;
  1237. // background-color: #F0F2F3;
  1238. }
  1239. /deep/ .uni-textarea-placeholder {
  1240. color: #274647;
  1241. margin-top: 20rpx;
  1242. margin-left: 30rpx;
  1243. }
  1244. /deep/.canvasBox {
  1245. .box {
  1246. width: 600rpx;
  1247. /* 设置扫码容器宽度 */
  1248. height: 600rpx;
  1249. /* 设置扫码容器高度 */
  1250. }
  1251. }
  1252. //隐患弹框
  1253. /deep/.u-popup__content {
  1254. overflow-y: auto;
  1255. }
  1256. .text-xl {
  1257. font-size: 18px;
  1258. font-weight: 600;
  1259. }
  1260. .person-forward {
  1261. padding-top: 40rpx;
  1262. display: flex;
  1263. flex-direction: column;
  1264. flex-wrap: wrap;
  1265. overflow-y: auto;
  1266. margin-bottom: 100rpx;
  1267. }
  1268. </style>