check_implement.vue 42 KB

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