examineAddTow.vue 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621
  1. <!-- 开始检查 -->
  2. <template>
  3. <view id="startChecking">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <!-- 综合检查 -->
  6. <viwe class="list" v-if="form.checkCategory==1">
  7. <view class="title">不符合项</view>
  8. <view class="check-for-big-box" v-for="(item,index) in form.checkHazardDtoList" :key="index">
  9. <view class="grade">
  10. <view class="grade_l">隐患等级:</view>
  11. <picker @change="gradeChange(item,$event)" :value="gradeIndex" :range="gradeArray"
  12. class="scope_r">
  13. <view class="grade_r">
  14. <view>
  15. {{item.hazardLevel==2?'一般隐患':(item.hazardLevel==1?'重大隐患':(item.hazardLevel==3?'管理问题':''))}}
  16. </view>
  17. <img src="@/pages_safetyExamine/images/icon_06.png">
  18. </view>
  19. </picker>
  20. </view>
  21. <view class="project" v-if="checkOptionList.length>0">
  22. <view class="project_l">检查项目:</view>
  23. <uni-data-picker :ellipsis="false" :localdata="checkOptionList[0]"
  24. :map="{text:'name',value:'id'}" popup-title="请选择所属目录" @change="(e)=>onchange('',e,index)"
  25. @nodeclick="onnodeclick()" ref="uniDataPicker" :addType="true" :addIndex="index">
  26. <view class="project_r">{{item.hazardCheckName?item.hazardCheckName:'请选择检查项'}}</view>
  27. </uni-data-picker>
  28. </view>
  29. <view class="dangerCount" v-if="item.hazardCheckCount>0" style="margin-top: 20rpx;">
  30. 此检查项在当前实验室累计出现<text>{{item.hazardCheckCount}}</text>次隐患</view>
  31. <view class="point">
  32. <view class="point_l">检查要点:</view>
  33. <textarea class="point_r" type="text" maxlength="999" v-model="item.hazardCheckPoint"
  34. placeholder="未查到此项检查要点,可在此输入添加" placeholder-style="font-size:28rpx;color:#999;"></textarea>
  35. </view>
  36. <view class="check-for-input-max-box">
  37. <view class="left-title-p">隐患描述:</view>
  38. <textarea type="text" v-model="item.hazardDescribe" maxlength="50" placeholder="请输入隐患描述"
  39. placeholder-style="font-size:28rpx;color:#999;"></textarea>
  40. </view>
  41. <view class="check-for-img-max-box">
  42. <view class="left-title-p">隐患照片(最多上传5张):</view>
  43. <view class="right-img-box">
  44. <view class="img-box" v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
  45. <img class="img-data" :src="configURL+imgItem.fileUrl">
  46. <img class="position-img" src="@/pages_safetyExamine/images/icon_ssp_closure.png"
  47. @click="delImg('',index,imgIndex)">
  48. </view>
  49. <img class="add-button" src="@/pages_safetyExamine/images/icon_07.png"
  50. @click="selectImage(item)" v-if="item.uploadDtoList.length<5">
  51. </view>
  52. </view>
  53. <view class="voice">
  54. <view class="voice_t">
  55. <view class="voice_t_l">语音备注:</view>
  56. <img class="voice_t_r" src="@/pages_safetyExamine/images/icon_ksjc_yysr.png"
  57. @longpress.stop="recordButton(item,$event)" @touchmove.stop="cancelButton"
  58. @touchend.stop="sendButton(item,$event)">
  59. </view>
  60. <view class="voice_b" v-for="(voiceItem,voiceIndex) in item.voiceRemark" :key="voiceIndex">
  61. <view class="voice_b_l" @tap="voicePlay(voiceItem.url)"><img class="add-button"
  62. src="@/pages_safetyExamine/images/icon_yyt.png" />{{voiceItem.times}}″</view>
  63. <img class="voice_b_r" src="@/pages_safetyExamine/images/icon_fjgk_sc.png"
  64. @tap="voiceDele('',index,voiceIndex)" />
  65. </view>
  66. </view>
  67. <view class="check-for-big-box-position-img-box" v-if="form.checkHazardDtoList.length>1"
  68. @click="delDetailsList(index,'',1)">
  69. <img src="@/pages_safetyExamine/images/icon_ssp_closure.png">
  70. </view>
  71. </view>
  72. <view class="add-for-item-p" @click="addDanger('')">+ 新增隐患项</view>
  73. </viwe>
  74. <!-- 专项检查 -->
  75. <viwe class="list" v-if="form.checkCategory==2" v-for="(itemAll,indexAll) in form.checkHazardInfoVoList"
  76. :key="indexAll">
  77. <view class="inconformity_tow">
  78. <text>{{itemAll.hazardName}}</text>
  79. <img v-if="!form.isCustom" class="itemDelete" @click="delDetailsList(indexAll,'',2)"
  80. src="@/pages_safetyExamine/images/icon_fjgk_sc.png">
  81. <view class="unfold" @click="inconformityFun2(itemAll)">
  82. <img v-if="itemAll.switch" src="@/pages_safetyExamine/images/icon_bfhx_xq.png" />
  83. <img v-if="!itemAll.switch" src="@/pages_safetyExamine/images/icon_bfhx_sq.png" />
  84. </view>
  85. </view>
  86. <view class="check-for-big-box danger_border" v-if="itemAll.switch">
  87. <view class="ident">检查项目:</view>
  88. <view class="special_danger" v-for="(item,index) in itemAll.checkHazardDtoList" :key="index">
  89. <view class="grade_title"
  90. :style="item.switch?'border-bottom: 1rpx solid #D8D8D8;':'border:none;'">
  91. <view class="sort">{{index+1}}</view>
  92. <text>第{{index+1}}项隐患</text>
  93. <view class="Flag" @click="switchChange(item)">
  94. <img class="checkFlag" v-if="item.checkFlag==0"
  95. src="@/pages_safetyExamine/images/icon_kzjc_bfh.png">
  96. <img class="checkFlag" v-if="item.checkFlag==1"
  97. src="@/pages_safetyExamine/images/icon_kzjc_fh.png">
  98. </view>
  99. <img v-if="!form.isCustom" class="itemDelete" @click="delDetailsList(index,indexAll,3)"
  100. src="@/pages_safetyExamine/images/icon_fjgk_sc.png">
  101. </view>
  102. <view class="special_project" v-if="checkOptionList.length>0">
  103. <uni-data-picker :ellipsis="false" :localdata="checkOptionList[0]"
  104. :map="{text:'name',value:'id'}" popup-title="请选择所属目录"
  105. @change="(e)=>onchange(indexAll,e,index)" @nodeclick="onnodeclick()" ref="uniDataPicker"
  106. :addType="true" :addIndex="index">
  107. <view class="special_project_n">
  108. {{item.hazardCheckCode?item.hazardCheckCode:''}}{{item.hazardCheckName?item.hazardCheckName:'请选择检查项'}}
  109. </view>
  110. </uni-data-picker>
  111. </view>
  112. <view class="dangerCount" v-if="item.hazardCheckCount>0 && item.checkFlag==0">
  113. 此检查项在当前实验室累计出现<text>{{item.hazardCheckCount}}</text>次隐患</view>
  114. <view class="grade" v-if="item.checkFlag==0">
  115. <view class="grade_l">隐患等级:</view>
  116. <picker @change="gradeChange(item,$event)" :value="gradeIndex" :range="gradeArray"
  117. class="scope_r">
  118. <view class="grade_r">
  119. <view>
  120. {{item.hazardLevel==2?'一般隐患':(item.hazardLevel==1?'重大隐患':(item.hazardLevel==3?'管理问题':''))}}
  121. </view>
  122. <img src="@/pages_safetyExamine/images/icon_06.png">
  123. </view>
  124. </picker>
  125. </view>
  126. <view class="check-for-input-max-box" v-if="item.checkFlag==0">
  127. <view class="left-title-p">隐患描述:</view>
  128. <textarea type="text" v-model="item.hazardDescribe" maxlength="50" placeholder="请输入隐患描述"
  129. placeholder-style="font-size:28rpx;color:#999;"></textarea>
  130. </view>
  131. <view class="check-for-img-max-box" v-if="item.checkFlag==0">
  132. <view class="left-title-p">隐患照片(最多上传5张):</view>
  133. <view class="right-img-box">
  134. <view class="img-box" v-for="(imgItem,imgIndex) in item.uploadDtoList" :key="imgIndex">
  135. <img class="img-data" :src="configURL+imgItem.fileUrl">
  136. <img class="position-img" src="@/pages_safetyExamine/images/icon_ssp_closure.png"
  137. @click="delImg(item,index,imgIndex)">
  138. </view>
  139. <img class="add-button" src="@/pages_safetyExamine/images/icon_07.png"
  140. @click="selectImage(item)" v-if="item.uploadDtoList.length<5">
  141. </view>
  142. </view>
  143. <view class="voice" v-if="item.checkFlag==0">
  144. <view class="voice_t">
  145. <view class="voice_t_l">语音备注:</view>
  146. <img class="voice_t_r" src="@/pages_safetyExamine/images/icon_ksjc_yysr.png"
  147. @longpress.stop="recordButton(item,$event)" @touchmove.stop="cancelButton"
  148. @touchend.stop="sendButton(item,$event)">
  149. </view>
  150. <view class="voice_b" v-for="(voiceItem,voiceIndex) in item.voiceRemark" :key="voiceIndex">
  151. <view class="voice_b_l" @tap="voicePlay(voiceItem.url)"><img class="add-button"
  152. src="@/pages_safetyExamine/images/icon_yyt.png" />{{voiceItem.times}}″</view>
  153. <img class="voice_b_r" src="@/pages_safetyExamine/images/icon_fjgk_sc.png"
  154. @tap="voiceDele(item,index,voiceIndex)" />
  155. </view>
  156. </view>
  157. <!-- <view class="check-for-big-box-position-img-box" v-if="form.checkHazardDtoList.length>1" @click="delDetailsList(index,'')">
  158. <img src="@/pages_manage/images/icon_ssp_closure.png">
  159. </view> -->
  160. </view>
  161. <view v-if="!form.isCustom" style="width: 630rpx;" class="add-for-item-p"
  162. @click="addDanger(itemAll)">+ 新增隐患项</view>
  163. </view>
  164. </viwe>
  165. <view v-if="!form.isCustom && form.checkCategory==2" class="add_content" @click="addDeviceDanger()">+ 新增检查内容
  166. </view>
  167. </scroll-view>
  168. <view class="bottom_btn">
  169. <view class="bottom_btn_li" @click="goMinButton(index)" v-for="(item,index) in bottomBtnList" :key="index">
  170. {{item}}
  171. </view>
  172. </view>
  173. </view>
  174. </template>
  175. <script>
  176. const myaudio = uni.createInnerAudioContext();
  177. import {
  178. config
  179. } from '@/api/request/config.js'
  180. import {
  181. checkOptionListNew,
  182. checkManageUpdate,
  183. checkManageAdd,
  184. getHazardInfoByJoinIds,
  185. countHazardNum
  186. } from '@/pages_safetyExamine/api/index.js'
  187. export default {
  188. name: "startChecking",
  189. data() {
  190. return {
  191. configURL: config.base_url,
  192. id: "",
  193. //页面子状态
  194. minPageType: 1,
  195. //临时存储隐患信息ID
  196. hiddenDangerIdList: [],
  197. //数据
  198. form: {
  199. id: '',
  200. checkPlanId: '',
  201. manageStatus: '', //保存1 提交2
  202. subIds: '', //实验室
  203. subjectName: '',
  204. title: '', //计划标题
  205. deptId: '', //学院
  206. collegeName: '',
  207. buildId: '', //楼栋
  208. buildName: '',
  209. checkType: '', // 检查组织(1校院巡查 2实验室自查)
  210. checkResult: '1', // 检查结果 0不符合 1符合
  211. rectifyDeadline: '', //整改期限
  212. rectifyNotice: '1', //整改通知(1整改告知书 2整改通知书)
  213. roomNumber: '', //房间号
  214. checkCategory: '2', //检查类别 1综合检查 2专项检查
  215. checkHazardDtoList: [{
  216. voiceRemark: [], //语音备忘存储
  217. hazardLevel: 2, //隐患等级
  218. hazardCheckCode: '', //检查项目code序号
  219. hazardCheckName: '', //检查项目名称
  220. hazardCheckPro: '', //最后一级的id
  221. hazardCheckPoint: '', // 检查要点
  222. hazardDescribe: '', //隐患描述
  223. uploadDtoList: [], //隐患照片
  224. }],
  225. checkHazardInfoVoList: [
  226. ]
  227. },
  228. inspectionUnit: "",
  229. inspectionUnitArray: [],
  230. inspectionUnitArrayData: [],
  231. //搜索回调列表
  232. searchList: [],
  233. searchNullType: true,
  234. //检查项
  235. checkOptionList: [],
  236. //新增检查项
  237. openIndex: "",
  238. open: false,
  239. jcxSstkMs: [],
  240. jcxSstkNum: '',
  241. //临时数据组
  242. temporaryIdList: [],
  243. //添加项 目录
  244. uniPicker: "请选择所属目录",
  245. //滑动记录
  246. startPoint: {},
  247. liveType: false,
  248. sendLock: true, //发送锁,当为true时上锁,false时解锁发送
  249. recorderManager: wx.getRecorderManager(),
  250. temporaryData: [],
  251. gradeIndex: 0,
  252. gradeArray: ['一般隐患', '重大隐患', '管理问题'],
  253. bottomBtnList: ['上一步', '保存', '提交'],
  254. currentDate: '', //当前时间
  255. inconformityStatus2: false,
  256. }
  257. },
  258. onLoad(option) {
  259. //获取当前日期
  260. this.currentDate = this.getNowFormatDate()
  261. if (option.form) {
  262. this.form = JSON.parse(decodeURIComponent(option.form));
  263. if(this.form.checkHazardDtoList.length==0){
  264. this.form.checkHazardDtoList=[
  265. {
  266. voiceRemark: [], //语音备忘存储
  267. hazardLevel: 2, //隐患等级
  268. hazardCheckCode: '', //检查项目code序号
  269. hazardCheckName: '', //检查项目名称
  270. hazardCheckPro: '', //最后一级的id
  271. hazardCheckPoint: '', // 检查要点
  272. hazardDescribe: '', //隐患描述
  273. uploadDtoList: [], //隐患照片
  274. }
  275. ]
  276. }
  277. }
  278. if (option.joinHazardIds) {
  279. this.getHazardInfoByJoinIds(this.form.subIds, option.joinHazardIds)
  280. this.form.joinHazardIds = option.joinHazardIds
  281. }
  282. },
  283. onShow() {
  284. this.getCheckOptionList();
  285. },
  286. mounted() {
  287. },
  288. methods: {
  289. //根据设备id生成检查项
  290. async getHazardInfoByJoinIds(id, joinHazardIds) {
  291. let _this = this;
  292. const {
  293. data
  294. } = await getHazardInfoByJoinIds({
  295. joinHazardIds: joinHazardIds
  296. });
  297. if (data.code == 200) {
  298. if (data.data[0]) {
  299. let dataList = JSON.parse(JSON.stringify(data.data))
  300. for (let i = 0; i < dataList.length; i++) {
  301. dataList[i].switch = true;
  302. for (let b = 0; b < dataList[i].checkHazardDtoList.length; b++) {
  303. //把最外层的code填充到内层
  304. //dataList[i].checkHazardDtoList[b].hazardCheckCode=dataList[i].code
  305. //语音备注类型转换
  306. if (dataList[i].checkHazardDtoList[b].voiceRemark) {
  307. dataList[i].checkHazardDtoList[b].voiceRemark = JSON.parse(dataList[i]
  308. .checkHazardDtoList[b].voiceRemark)
  309. } else {
  310. dataList[i].checkHazardDtoList[b].voiceRemark = [];
  311. }
  312. }
  313. //判断新旧数据是否相等,如果相等旧数据填充新数据
  314. for (let k = 0; k < _this.form.checkHazardInfoVoList.length; k++) {
  315. if (dataList[i].joinHazardId == _this.form.checkHazardInfoVoList[k].joinHazardId) {
  316. dataList[i] = _this.form.checkHazardInfoVoList[k]
  317. }
  318. }
  319. }
  320. this.form.checkHazardInfoVoList = dataList
  321. }
  322. }
  323. },
  324. switchChange(item) {
  325. if (item.checkFlag == 0) {
  326. item.checkFlag = 1
  327. } else {
  328. item.checkFlag = 0
  329. }
  330. },
  331. //专项隐患项收起展开
  332. inconformityFun2(itemAll) {
  333. itemAll.switch = !itemAll.switch;
  334. },
  335. //获取当前日期函数
  336. getNowFormatDate() {
  337. let date = new Date(),
  338. year = date.getFullYear(), //获取完整的年份(4位)
  339. month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
  340. strDate = date.getDate() // 获取当前日(1-31)
  341. if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
  342. if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
  343. return `${year}-${month}-${strDate}`
  344. },
  345. //隐患等级
  346. gradeChange(item, e) {
  347. if (e.target.value == 0) {
  348. item.hazardLevel = 2
  349. } else if (e.target.value == 1) {
  350. item.hazardLevel = 1
  351. } else if (e.target.value == 2) {
  352. item.hazardLevel = 3
  353. }
  354. },
  355. //语音备忘播放
  356. async voicePlay(item) {
  357. myaudio.src = config.base_url + item;
  358. myaudio.play();
  359. },
  360. //语音备忘删除
  361. async voiceDele(item, index, voiceIndex) {
  362. let self = this;
  363. uni.showModal({
  364. title: '',
  365. cancelColor: '#999999',
  366. confirmColor: '#FF6E6E',
  367. content: '确定删除此语音吗?',
  368. success(res) {
  369. if (res.confirm) {
  370. console.log('用户点击确定')
  371. if (self.form.checkCategory == 1) { //综合检查
  372. self.form.checkHazardDtoList[index].voiceRemark.splice(voiceIndex, 1);
  373. } else if (self.form.checkCategory == 2) { //专项检查
  374. item.voiceRemark.splice(voiceIndex, 1);
  375. }
  376. self.$forceUpdate();
  377. } else if (res.cancel) {
  378. console.log('用户点击取消')
  379. }
  380. }
  381. })
  382. },
  383. //录制
  384. recordButton(item, e) {
  385. console.log("按下")
  386. let self = this;
  387. if (item.voiceRemark.length >= 5) {
  388. uni.showToast({
  389. title: '语音备忘最多只能上传5条',
  390. icon: "none",
  391. mask: true,
  392. duration: 2000
  393. });
  394. return
  395. }
  396. this.liveType = true;
  397. console.log('录制', e)
  398. this.startPoint = e.touches[0]; //记录长按时开始点信息,后面用于计算上划取消时手指滑动的距离。
  399. const options = {
  400. duration: 60000,
  401. sampleRate: 16000,
  402. numberOfChannels: 1,
  403. encodeBitRate: 48000,
  404. format: 'mp3',
  405. frameSize: 50
  406. }
  407. this.recorderManager.start(options); //开始录音
  408. this.recorderManager.onStart(() => {
  409. console.log('recorder start')
  410. })
  411. this.recorderManager.onError((res) => {
  412. console.log(res);
  413. })
  414. wx.showToast({
  415. title: "正在录音,上划取消发送",
  416. icon: "none",
  417. duration: 60000 //先定义个60秒,后面可以手动调用wx.hideToast()隐藏
  418. });
  419. this.sendLock = false; //长按时是不上锁的。
  420. },
  421. //取消
  422. cancelButton(e) {
  423. console.log("移动")
  424. let self = this;
  425. this.liveType = false;
  426. console.log('取消', e)
  427. let moveLenght = e.touches[e.touches.length - 1].clientY - this.startPoint.clientY; //移动距离
  428. if (Math.abs(moveLenght) > 50) {
  429. wx.showToast({
  430. title: "松开手指,取消发送",
  431. icon: "none",
  432. duration: 60000
  433. });
  434. this.sendLock = true; //触发了上滑取消发送,上锁
  435. } else {
  436. wx.showToast({
  437. title: "正在录音,上划取消发送",
  438. icon: "none",
  439. duration: 60000
  440. });
  441. this.sendLock = false; //上划距离不足,依然可以发送,不上锁
  442. }
  443. },
  444. //发送
  445. sendButton(item, e) {
  446. console.log("松开")
  447. let self = this;
  448. this.liveType = false;
  449. console.log('发送', e)
  450. wx.hideToast(); //结束录音、隐藏Toast提示框
  451. this.recorderManager.stop(); //结束录音
  452. this.recorderManager.onStop((res) => {
  453. if (!this.sendLock) {
  454. this.uploadVoice(item, res.duration, res.tempFilePath);
  455. }
  456. console.log('停止录音', res.tempFilePath)
  457. console.log("sendLock", this.sendLock);
  458. })
  459. },
  460. //上传MP3
  461. async uploadVoice(item, times, tempFilePaths) {
  462. console.log(item)
  463. console.log(times)
  464. console.log(tempFilePaths)
  465. var self = this;
  466. uni.uploadFile({
  467. url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
  468. header: {
  469. 'Authorization': uni.getStorageSync('token')
  470. },
  471. filePath: tempFilePaths,
  472. name: 'file',
  473. formData: {
  474. 'user': 'test'
  475. },
  476. success: (uploadFileRes) => {
  477. let res = JSON.parse(uploadFileRes.data);
  478. if (res.code == 200) {
  479. console.log("上传成功", res)
  480. console.log(item)
  481. let seconds = Math.round((parseInt(times) % (1000 * 60)) / 1000);
  482. item.voiceRemark.push({
  483. 'times': seconds,
  484. 'url': res.data.url
  485. })
  486. console.log(JSON.stringify(self.voice))
  487. //self.textParseUrlIps(res.data.url);
  488. // self.newData.imgList.push(res.data.url);
  489. } else {
  490. uni.showToast({
  491. title: res.msg,
  492. icon: "none",
  493. mask: true,
  494. duration: 2000
  495. });
  496. }
  497. },
  498. fail: err => {
  499. uni.hideLoading()
  500. },
  501. complete: () => {}
  502. });
  503. },
  504. /**************************检查项***************************/
  505. //获取检查项
  506. async getCheckOptionList() {
  507. const {
  508. data
  509. } = await checkOptionListNew();
  510. if (data.code == 200) {
  511. let list = this.getTreeData(data.data);
  512. console.log(list)
  513. this.checkOptionList.push(JSON.parse(JSON.stringify(list)));
  514. }
  515. },
  516. getTreeData(data) {
  517. for (var i = 0; i < data.length > 0; i++) {
  518. if (data[i].children == null || data[i].children.length <= 0) {
  519. // children若为空数组,则将children设为undefined
  520. data[i].children = undefined;
  521. } else {
  522. if (this.form.checkCategory == 1 && data[i].level == 3) {
  523. if (data[i].children[0]) {
  524. let mainPoint = []
  525. for (let b = 0; b < data[i].children.length; b++) {
  526. mainPoint.push(data[i].children[b].name)
  527. data[i].mainPoint = mainPoint.join(',')
  528. }
  529. } else {
  530. data[i].mainPoint = '';
  531. }
  532. data[i].children = [];
  533. }
  534. // children若不为空数组,则继续 递归调用 本方法
  535. this.getTreeData(data[i].children);
  536. }
  537. }
  538. return data;
  539. },
  540. /**************************搜索项***************************/
  541. //搜索特定检查项
  542. async searchClick(text, index) {
  543. console.log("搜索text", text);
  544. console.log("搜索index", index);
  545. const {
  546. data
  547. } = await checkOptionListNew({
  548. 'searchValue': text
  549. });
  550. if (data.code == 200) {
  551. if (data.data[0]) {
  552. // let list = JSON.parse(JSON.stringify(this.checkOptionList));
  553. // list[index] = this.getTreeData(data.data);
  554. // this.$set(this,'checkOptionList',JSON.parse(JSON.stringify(list)))
  555. let list = [];
  556. list[0] = this.getTreeData(data.data)
  557. this.$set(this, 'checkOptionList', JSON.parse(JSON.stringify(list)))
  558. console.log(this.checkOptionList)
  559. this.$refs.uniDataPicker[index].show();
  560. } else {
  561. uni.showToast({
  562. title: '未找到相关检查项',
  563. icon: "none",
  564. mask: true,
  565. duration: 2000
  566. });
  567. }
  568. }
  569. },
  570. //重置检查项
  571. async resetClick(index) {
  572. console.log("重置index", index);
  573. const {
  574. data
  575. } = await checkOptionListNew();
  576. if (data.code == 200) {
  577. let list = [];
  578. list[0] = this.getTreeData(data.data);
  579. this.$set(this, 'checkOptionList', JSON.parse(JSON.stringify(list)))
  580. this.$refs.uniDataPicker[index].show();
  581. }
  582. },
  583. //选中固有检查项(新)
  584. onchange(indexAll, e, index) {
  585. let self = this;
  586. //hazardCheckCode:'', //检查项目code序号
  587. //hazardCheckName:'', //检查项目名称
  588. //hazardCheckPro:'', //最后一级的id
  589. if (this.form.checkCategory == 1) { //综合检查
  590. if (this.getTreeName(this.checkOptionList[0], e.detail.value[e.detail.value.length - 1].value).level ==
  591. 3) {
  592. let jcxSstkNum = this.getTreeName(this.checkOptionList[0], e.detail.value[e.detail.value.length -
  593. 1].value).code
  594. this.$set(this.form.checkHazardDtoList[index], 'hazardCheckPro', e.detail.value[e.detail.value
  595. .length - 1].value);
  596. this.$set(this.form.checkHazardDtoList[index], 'hazardCheckCode', jcxSstkNum);
  597. this.$set(this.form.checkHazardDtoList[index], 'hazardCheckName', e.detail.value[e.detail.value
  598. .length - 1].text);
  599. this.$set(this.form.checkHazardDtoList[index], 'hazardCheckPoint', this.getTreeName(this
  600. .checkOptionList[0], e.detail.value[e.detail.value.length - 1].value).mainPoint);
  601. } else {
  602. uni.showToast({
  603. title: '暂无数据',
  604. icon: "none",
  605. mask: true,
  606. duration: 2000
  607. });
  608. }
  609. } else if (this.form.checkCategory == 2) { //专项检查
  610. if (this.getTreeName(this.checkOptionList[0], e.detail.value[e.detail.value.length - 1].value).level ==
  611. 4) {
  612. let jcxSstkNum = this.getTreeName(this.checkOptionList[0], e.detail.value[e.detail.value.length -
  613. 1].value).code
  614. console.log(jcxSstkNum)
  615. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index], 'hazardCheckCode',
  616. jcxSstkNum);
  617. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index], 'hazardCheckName', e
  618. .detail.value[e.detail.value.length - 1].text);
  619. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index], 'hazardCheckPro', e
  620. .detail.value[e.detail.value.length - 1].value);
  621. } else {
  622. uni.showToast({
  623. title: '暂无数据',
  624. icon: "none",
  625. mask: true,
  626. duration: 2000
  627. });
  628. }
  629. }
  630. this.countHazardNum(indexAll, index, e.detail.value[e.detail.value.length - 1].value)
  631. },
  632. //此检查项在当前实验室累计出现次数
  633. async countHazardNum(indexAll, index, hazardCheckPro) {
  634. const {
  635. data
  636. } = await countHazardNum({
  637. subId: this.form.subIds,
  638. hazardCheckPro: hazardCheckPro
  639. });
  640. if (data.code == 200) {
  641. if (this.form.checkCategory == 1) { //综合检查
  642. this.$set(this.form.checkHazardDtoList[index], 'hazardCheckCount', data.data);
  643. } else if (this.form.checkCategory == 2) { //专项检查
  644. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index],
  645. 'hazardCheckCount', data.data);
  646. }
  647. }
  648. },
  649. //根据id查找元素
  650. getTreeName(list, id) {
  651. let _this = this
  652. for (let i = 0; i < list.length; i++) {
  653. let a = list[i]
  654. if (a.id === id) {
  655. return a
  656. } else {
  657. if (a.children && a.children.length > 0) {
  658. let res = _this.getTreeName(a.children, id)
  659. if (res) {
  660. return res
  661. }
  662. }
  663. }
  664. }
  665. },
  666. onnodeclick(node) {
  667. },
  668. // 图片上传
  669. selectImage(item) {
  670. let self = this;
  671. if (item.uploadDtoList.length > 4) {
  672. uni.showToast({
  673. title: '最多上传5张图片',
  674. icon: "none",
  675. mask: true,
  676. duration: 2000
  677. });
  678. return
  679. }
  680. wx.chooseImage({
  681. count: 1,
  682. sizeType: ["original", "compressed"],
  683. sourceType: ["album", "camera"],
  684. success: function(res) {
  685. let tempFilePaths = res.tempFilePaths[0];
  686. self.uploadImg(tempFilePaths, item);
  687. }
  688. });
  689. },
  690. async uploadImg(tempFilePaths, item) {
  691. var self = this;
  692. uni.showLoading({
  693. title: '上传中',
  694. mask: true
  695. });
  696. uni.uploadFile({
  697. url: config.base_url + '/system/file/upload', //仅为示例,非真实的接口地址
  698. header: {
  699. 'Authorization': uni.getStorageSync('token')
  700. },
  701. filePath: tempFilePaths,
  702. name: 'file',
  703. formData: {
  704. 'user': 'test'
  705. },
  706. success: (uploadFileRes) => {
  707. let res = JSON.parse(uploadFileRes.data);
  708. if (res.code == 200) {
  709. item.uploadDtoList.push({
  710. 'fileUrl': res.data.url,
  711. 'fileName': res.data.name
  712. });
  713. } else {
  714. uni.showToast({
  715. title: res.msg,
  716. icon: "none",
  717. mask: true,
  718. duration: 2000
  719. });
  720. }
  721. },
  722. fail: err => {},
  723. complete: () => {
  724. uni.hideLoading()
  725. }
  726. });
  727. },
  728. //删除图片
  729. delImg(item, index, minIndex) {
  730. if (this.form.checkCategory == 1) { //综合检查
  731. this.form.checkHazardDtoList[index].uploadDtoList.splice(minIndex, 1);
  732. } else if (this.form.checkCategory == 2) { //专项检查
  733. item.uploadDtoList.splice(minIndex, 1);
  734. }
  735. this.$forceUpdate();
  736. },
  737. //添加隐患
  738. addDanger(item) {
  739. if (this.form.checkCategory == 1) { //综合检查
  740. if (this.form.checkHazardDtoList.length > 19) {
  741. uni.showToast({
  742. title: '最多添加20个隐患',
  743. icon: "none",
  744. mask: true,
  745. duration: 2000
  746. });
  747. return
  748. }
  749. let obj = {
  750. voiceRemark: [], //语音备忘存储
  751. hazardLevel: 2, //隐患等级
  752. hazardCheckCode: '', //检查项目code序号
  753. hazardCheckName: '', //检查项目名称
  754. hazardCheckPro: '', //最后一级的id
  755. hazardCheckPoint: '', // 检查要点
  756. hazardDescribe: '', //隐患描述
  757. uploadDtoList: [], //隐患照片
  758. }
  759. this.form.checkHazardDtoList.push(obj);
  760. } else if (this.form.checkCategory == 2) { //专项检查
  761. let obj = {
  762. checkFlag: 0,
  763. voiceRemark: [], //语音备忘存储
  764. hazardLevel: 2, //隐患等级
  765. hazardCheckCode: '', //检查项目code序号
  766. hazardCheckName: '', //检查项目名称
  767. hazardCheckPro: '', //最后一级的id
  768. hazardDescribe: '', //隐患描述
  769. uploadDtoList: [], //隐患照片
  770. }
  771. item.checkHazardDtoList.push(obj);
  772. }
  773. this.getCheckOptionList();
  774. this.$forceUpdate();
  775. },
  776. //新增检查内容
  777. addDeviceDanger() {
  778. uni.navigateTo({
  779. url: '/pages_safetyExamine/views/examineManage/examineAddContent?form=' + encodeURIComponent(
  780. JSON.stringify(this.form))
  781. });
  782. },
  783. //删除隐患
  784. delDetailsList(index, index2, type) { //type 1综合检查 2专项检查设备项 3专项检查检查项
  785. if (this.form.checkCategory == 1) { //综合检查
  786. this.hiddenDangerIdList.push(this.form.checkHazardDtoList[index].id)
  787. this.form.checkHazardDtoList.splice(index, 1);
  788. } else if (this.form.checkCategory == 2) { //专项检查
  789. if (type == 2) { //检查设备
  790. this.form.checkHazardInfoVoList.splice(index, 1);
  791. } else if (type == 3) { //检查项
  792. this.form.checkHazardInfoVoList[index2].checkHazardDtoList.splice(index, 1);
  793. }
  794. }
  795. this.$forceUpdate();
  796. },
  797. //子页面切换
  798. goMinButton(index) {
  799. let self = this;
  800. if (index == 0) {
  801. if (this.form.checkCategory == 1) { //综合检查
  802. uni.redirectTo({
  803. url: '/pages_safetyExamine/examineManage/examineAdd?form=' + encodeURIComponent(JSON
  804. .stringify(this.form))
  805. });
  806. } else if (this.form.checkCategory == 2) { //专项检查
  807. if (!this.form.isCustom) {
  808. this.form.checkHazardInfoVoList = [];
  809. }
  810. uni.redirectTo({
  811. url: '/pages_safetyExamine/examineManage/examineAdd?form=' + encodeURIComponent(JSON
  812. .stringify(this.form))
  813. });
  814. }
  815. } else if (index == 1 || index == 2) {
  816. this.form.manageStatus = index; //1保存 2提交
  817. if (this.form.checkCategory == 1) { //综合检查
  818. console.log(self.form.checkHazardDtoList)
  819. if (self.form.checkHazardDtoList[0]) {
  820. for (let i = 0; i < self.form.checkHazardDtoList.length; i++) {
  821. let num = i + 1;
  822. if (!self.form.checkHazardDtoList[i].hazardCheckName) {
  823. uni.showToast({
  824. title: '第' + num + '未选择隐患项',
  825. icon: "none",
  826. mask: true,
  827. duration: 2000
  828. });
  829. return
  830. } else if (!self.form.checkHazardDtoList[i].hazardDescribe && self.form.checkHazardDtoList[
  831. i].voiceRemark.length <= 0) {
  832. uni.showToast({
  833. title: '请输入第' + num + '项隐患描述!',
  834. icon: "none",
  835. mask: true,
  836. duration: 2000
  837. });
  838. return
  839. } else if (self.form.checkHazardDtoList[i].uploadDtoList.length <= 0) {
  840. uni.showToast({
  841. title: '请输入第' + num + '项隐患图片!',
  842. icon: "none",
  843. mask: true,
  844. duration: 2000
  845. });
  846. return
  847. }
  848. }
  849. } else {
  850. uni.showToast({
  851. title: '请添加隐患项',
  852. icon: "none",
  853. mask: true,
  854. duration: 2000
  855. });
  856. return
  857. }
  858. } else if (this.form.checkCategory == 2) { //专项检查
  859. for (let k = 0; k < self.form.checkHazardInfoVoList.length; k++) {
  860. for (let i = 0; i < self.form.checkHazardInfoVoList[k].checkHazardDtoList.length; i++) {
  861. let num = i + 1;
  862. if (self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].checkFlag == 1) { //符合
  863. if (!self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].hazardCheckName) {
  864. uni.showToast({
  865. title: '第' + num + '未选择隐患项',
  866. icon: "none",
  867. mask: true,
  868. duration: 2000
  869. });
  870. return
  871. }
  872. } else {
  873. if (!self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].hazardCheckName) {
  874. uni.showToast({
  875. title: '第' + num + '未选择隐患项',
  876. icon: "none",
  877. mask: true,
  878. duration: 2000
  879. });
  880. return
  881. } else if (!self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].hazardDescribe &&
  882. self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].voiceRemark.length <= 0) {
  883. uni.showToast({
  884. title: '请输入第' + num + '项隐患描述!',
  885. icon: "none",
  886. mask: true,
  887. duration: 2000
  888. });
  889. return
  890. } else if (self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].uploadDtoList
  891. .length <= 0) {
  892. uni.showToast({
  893. title: '请输入第' + num + '项隐患图片!',
  894. icon: "none",
  895. mask: true,
  896. duration: 2000
  897. });
  898. return
  899. }
  900. }
  901. }
  902. }
  903. }
  904. this.submitForm();
  905. }
  906. },
  907. //提交
  908. async submitForm() {
  909. let self = this;
  910. let obj = JSON.parse(JSON.stringify(self.form));
  911. if (this.form.checkCategory == 1) { //综合检查
  912. //语音备注JSON对象转字符串
  913. for (let i = 0; i < obj.checkHazardDtoList.length; i++) {
  914. if (obj.checkHazardDtoList[i].voiceRemark) {
  915. obj.checkHazardDtoList[i].voiceRemark = JSON.stringify(obj.checkHazardDtoList[i]
  916. .voiceRemark)
  917. }
  918. }
  919. for (let i = 0; i < obj.checkHazardDtoList.length; i++) {
  920. obj.checkHazardDtoList[i].checkCategory = this.form.checkCategory;
  921. }
  922. } else if (this.form.checkCategory == 2) { //专项检查
  923. let list = []
  924. let checkFlagList = [];
  925. let hazardIds = [];
  926. let joinHazardIds = [];
  927. for (let i = 0; i < this.form.checkHazardInfoVoList.length; i++) {
  928. hazardIds.push(this.form.checkHazardInfoVoList[i].hazardId)
  929. joinHazardIds.push(this.form.checkHazardInfoVoList[i].joinHazardId)
  930. for (let b = 0; b < this.form.checkHazardInfoVoList[i].checkHazardDtoList.length; b++) {
  931. checkFlagList.push(this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
  932. //语音备注JSON对象转字符串
  933. if (this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark) {
  934. this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark = JSON.stringify(
  935. this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark)
  936. }
  937. let obj2 = {
  938. checkFlag: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
  939. checkCategory: this.form.checkCategory,
  940. hazardCheckCode: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b]
  941. .hazardCheckCode,
  942. hazardCheckName: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b]
  943. .hazardCheckName,
  944. hazardCheckPro: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b]
  945. .hazardCheckPro,
  946. hazardDescribe: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b]
  947. .hazardDescribe,
  948. hazardLevel: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
  949. uploadDtoList: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b]
  950. .uploadDtoList,
  951. voiceRemark: this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark,
  952. code: this.form.checkHazardInfoVoList[i].code,
  953. hazardId: this.form.checkHazardInfoVoList[i].hazardId,
  954. hazardName: this.form.checkHazardInfoVoList[i].hazardName,
  955. hazardTypeMode: this.form.checkHazardInfoVoList[i].hazardTypeMode,
  956. hazardTypeModeName: this.form.checkHazardInfoVoList[i].hazardTypeModeName,
  957. joinHazardId: this.form.checkHazardInfoVoList[i].joinHazardId,
  958. }
  959. list.push(obj2)
  960. }
  961. }
  962. if (hazardIds[0]) {
  963. obj.hazardIds = hazardIds.join(',')
  964. obj.joinHazardIds = joinHazardIds.join(',')
  965. }
  966. if (checkFlagList.every(item => {
  967. return item == 1
  968. })) { //符合
  969. obj.checkResult = 1;
  970. } else { //不符合
  971. obj.checkResult = 0;
  972. }
  973. obj.checkHazardDtoList = list;
  974. }
  975. if (self.form.id) {
  976. const {
  977. data
  978. } = await checkManageUpdate(obj);
  979. if (data.code == 200) {
  980. uni.showToast({
  981. title: '提交成功',
  982. icon: "none",
  983. mask: true,
  984. duration: 2000
  985. });
  986. uni.redirectTo({
  987. url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
  988. .checkType
  989. });
  990. }
  991. } else {
  992. const {
  993. data
  994. } = await checkManageAdd(obj);
  995. if (data.code == 200) {
  996. uni.showToast({
  997. title: '提交成功',
  998. icon: "none",
  999. mask: true,
  1000. duration: 2000
  1001. });
  1002. uni.redirectTo({
  1003. url: '/pages_safetyExamine/views/examineManage/examineList?pageType=' + this.form
  1004. .checkType
  1005. });
  1006. }
  1007. }
  1008. },
  1009. }
  1010. }
  1011. </script>
  1012. <style lang="stylus" scoped>
  1013. #startChecking {
  1014. height: 100%;
  1015. .info-max-box {
  1016. flex: 1;
  1017. overflow: scroll;
  1018. padding: 20rpx 0rpx 128rpx;
  1019. box-sizing: border-box;
  1020. }
  1021. .list {
  1022. .title {
  1023. width: 690rpx;
  1024. height: 100rpx;
  1025. background: #FFFFFF;
  1026. border-radius: 20rpx;
  1027. margin: 20rpx 30rpx;
  1028. font-size: 30rpx;
  1029. font-family: PingFang SC-Medium, PingFang SC;
  1030. font-weight: 400;
  1031. color: #333333;
  1032. line-height: 100rpx;
  1033. padding-left: 24rpx;
  1034. box-sizing: border-box;
  1035. }
  1036. .check-for-big-box {
  1037. width 690rpx;
  1038. //padding-top:30rpx;
  1039. margin: 0 30rpx 20rpx;
  1040. background #fff;
  1041. border-radius: 20rpx;
  1042. overflow hidden;
  1043. position relative;
  1044. padding: 30rpx;
  1045. box-sizing border-box;
  1046. /* 隐患等级 */
  1047. .grade {
  1048. display: flex;
  1049. justify-content: flex-start;
  1050. .grade_l {
  1051. width: 158rpx;
  1052. text-align: left;
  1053. font-size: 30rpx;
  1054. font-family: PingFang SC-Medium, PingFang SC;
  1055. font-weight: 400;
  1056. color: #333333;
  1057. line-height: 80rpx;
  1058. }
  1059. .grade_r {
  1060. width: 480rpx;
  1061. height: 80rpx;
  1062. border-radius: 10rpx;
  1063. border: 1rpx solid #E0E0E0;
  1064. display: flex;
  1065. justify-content: flex-start;
  1066. align-items: center;
  1067. padding-left: 20rpx;
  1068. box-sizing: border-box;
  1069. >view {
  1070. flex: 1;
  1071. line-height: 80rpx;
  1072. font-size: 30rpx;
  1073. font-family: PingFang SC-Medium, PingFang SC;
  1074. font-weight: 400;
  1075. color: #333333;
  1076. line-height: 80rpx;
  1077. }
  1078. >img {
  1079. width: 14rpx;
  1080. height: 8rpx;
  1081. margin-right: 30rpx;
  1082. }
  1083. }
  1084. }
  1085. /* 检查项目 */
  1086. .project {
  1087. .project_l {
  1088. width: 158rpx;
  1089. text-align: left;
  1090. font-size: 30rpx;
  1091. font-family: PingFang SC-Medium, PingFang SC;
  1092. font-weight: 400;
  1093. color: #333333;
  1094. line-height: 80rpx;
  1095. margin-top: 24rpx;
  1096. }
  1097. .project_r {
  1098. width: 630rpx;
  1099. min-height: 80rpx;
  1100. border-radius: 10rpx;
  1101. border: 1rpx solid #E0E0E0;
  1102. display: flex;
  1103. justify-content: flex-start;
  1104. align-items: center;
  1105. padding-left: 20rpx;
  1106. box-sizing: border-box;
  1107. }
  1108. }
  1109. /* 检查要点 */
  1110. .point {
  1111. .point_l {
  1112. width: 158rpx;
  1113. text-align: left;
  1114. font-size: 30rpx;
  1115. font-family: PingFang SC-Medium, PingFang SC;
  1116. font-weight: 400;
  1117. color: #333333;
  1118. line-height: 80rpx;
  1119. }
  1120. .point_r {
  1121. width: 630rpx;
  1122. height: 158rpx;
  1123. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1124. opacity: 1;
  1125. border: 1rpx solid #E0E0E0;
  1126. padding: 20rpx 14rpx;
  1127. box-sizing: border-box;
  1128. font-size: 30rpx;
  1129. font-family: PingFang SC-Medium, PingFang SC;
  1130. font-weight: 400;
  1131. color: #333333;
  1132. line-height: 34rpx;
  1133. }
  1134. }
  1135. /* 隐患描述 */
  1136. .check-for-input-max-box {
  1137. .left-title-p {
  1138. width: 150rpx;
  1139. line-height: 80rpx;
  1140. text-align right;
  1141. font-size: 30rpx;
  1142. }
  1143. textarea {
  1144. width: 630rpx;
  1145. height: 158rpx;
  1146. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1147. border: 1rpx solid #E0E0E0;
  1148. padding: 20rpx 14rpx;
  1149. box-sizing: border-box;
  1150. font-size: 30rpx;
  1151. font-family: PingFang SC-Medium, PingFang SC;
  1152. font-weight: 400;
  1153. color: #333333;
  1154. line-height: 34rpx;
  1155. }
  1156. }
  1157. /* 隐患照片 */
  1158. .check-for-img-max-box {
  1159. .left-title-p {
  1160. width: 100%;
  1161. text-align: left;
  1162. font-size: 30rpx;
  1163. font-family: PingFang SC-Medium, PingFang SC;
  1164. font-weight: 400;
  1165. color: #333333;
  1166. line-height: 80rpx;
  1167. }
  1168. .right-img-box {
  1169. .img-box {
  1170. display inline-block;
  1171. height: 180rpx;
  1172. width: 180rpx;
  1173. position relative;
  1174. margin: 0 14rpx 20rpx 0;
  1175. border-radius 10rpx;
  1176. overflow hidden;
  1177. .img-data {
  1178. height: 180rpx;
  1179. width: 180rpx;
  1180. }
  1181. .position-img {
  1182. position absolute;
  1183. right: 0;
  1184. top: 0;
  1185. width: 36rpx;
  1186. height: 36rpx;
  1187. }
  1188. }
  1189. .img-box:nth-of-type(3n+3) {
  1190. margin-right: 0rpx;
  1191. }
  1192. .add-button {
  1193. margin: 0 20rpx 20rpx 0;
  1194. border-radius 10rpx;
  1195. overflow hidden;
  1196. display inline-block;
  1197. height: 180rpx;
  1198. width: 180rpx;
  1199. }
  1200. }
  1201. }
  1202. /* 语音备注 */
  1203. .voice {
  1204. .voice_t {
  1205. height: 80rpx;
  1206. display: flex;
  1207. justify-content: space-between;
  1208. align-items: center;
  1209. .voice_t_l {
  1210. font-size: 30rpx;
  1211. font-family: PingFang SC-Medium, PingFang SC;
  1212. font-weight: 400;
  1213. color: #333333;
  1214. line-height: 80rpx;
  1215. }
  1216. .voice_t_r {
  1217. width: 170rpx;
  1218. height: 50rpx;
  1219. }
  1220. }
  1221. .voice_b {
  1222. display flex;
  1223. justify-content flex-start;
  1224. align-items center;
  1225. margin-bottom: 30rpx;
  1226. .voice_b_l {
  1227. width: 400rpx;
  1228. height: 40rpx;
  1229. background: rgba(88, 175, 255, 0.3);
  1230. border-radius: 10rpx;
  1231. display flex;
  1232. justify-content flex-start;
  1233. align-items center;
  1234. >img {
  1235. width: 18rpx;
  1236. height: 24rpx;
  1237. margin-left: 16rpx;
  1238. margin-right: 20rpx;
  1239. }
  1240. }
  1241. .voice_b_r {
  1242. width: 28rpx;
  1243. height: 28rpx;
  1244. margin-left: 20rpx;
  1245. }
  1246. }
  1247. }
  1248. .check-for-button-max-box {
  1249. display flex;
  1250. margin-top: 30rpx;
  1251. margin-bottom: 20rpx;
  1252. .left-title-p {
  1253. width: 150rpx;
  1254. line-height: 88rpx;
  1255. text-align right;
  1256. font-size: 30rpx;
  1257. }
  1258. .button-text-p {
  1259. border: 1rpx solid #E0E0E0;
  1260. width: 440rpx;
  1261. height: 80rpx;
  1262. border-radius: 10rpx;
  1263. line-height: 80rpx;
  1264. color: #A2A2A2;
  1265. padding: 0 20rpx;
  1266. font-size: 28rpx;
  1267. display: block;
  1268. overflow: hidden;
  1269. text-overflow: ellipsis;
  1270. white-space: nowrap;
  1271. }
  1272. }
  1273. .check-for-big-box-position-img-box {
  1274. position absolute;
  1275. top: 0;
  1276. right: 0;
  1277. width: 60rpx;
  1278. height: 60rpx;
  1279. img {
  1280. width: 36rpx;
  1281. height: 36rpx;
  1282. margin: 12rpx;
  1283. }
  1284. }
  1285. }
  1286. /* 添加隐患项 */
  1287. .add-for-item-p {
  1288. width: 690rpx;
  1289. height: 100rpx;
  1290. border: 4rpx dashed #0183FA;
  1291. font-size: 30rpx;
  1292. font-family: PingFang SC-Medium, PingFang SC;
  1293. font-weight: 400;
  1294. color: #0183FA;
  1295. line-height: 100rpx;
  1296. text-align center;
  1297. border-radius: 20rpx;
  1298. margin: 40rpx auto 100rpx;
  1299. }
  1300. }
  1301. /* 专项检查 */
  1302. .inconformity_tow {
  1303. width: 690rpx;
  1304. height: 100rpx;
  1305. background: #FFFFFF;
  1306. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1307. margin: 20rpx 30rpx;
  1308. display: flex;
  1309. justify-content: space-between;
  1310. align-items: center;
  1311. padding: 0 30rpx;
  1312. box-sizing: border-box;
  1313. >text {
  1314. flex: 1;
  1315. font-size: 30rpx;
  1316. font-family: PingFang SC-Medium, PingFang SC;
  1317. font-weight: 400;
  1318. color: #333333;
  1319. line-height: 100rpx;
  1320. text-align: left;
  1321. }
  1322. .unfold {
  1323. >img {
  1324. width: 30rpx;
  1325. height: 26rpx;
  1326. margin-left: 20rpx;
  1327. }
  1328. }
  1329. >img {
  1330. width: 30rpx;
  1331. height: 26rpx;
  1332. margin-left: 20rpx;
  1333. }
  1334. }
  1335. .danger_border {
  1336. border-radius: 20rpx;
  1337. width: 690rpx;
  1338. background: #FFFFFF;
  1339. margin: 0rpx 30rpx 20rpx;
  1340. overflow: hidden;
  1341. }
  1342. .special_danger {
  1343. width: auto;
  1344. background: #FFFFFF;
  1345. padding: 0;
  1346. box-sizing: border-box;
  1347. border-radius: 0;
  1348. .grade_title {
  1349. height: 80rpx;
  1350. display: flex;
  1351. justify-content: space-between;
  1352. border-bottom: 1rpx solid #D8D8D8;
  1353. position: relative;
  1354. background: #F5F5F5;
  1355. border-radius: 20rpx 20rpx 0rpx 0rpx;
  1356. .sort {
  1357. width: 40rpx;
  1358. height: 40rpx;
  1359. background: #0183FA;
  1360. border-radius: 20rpx 0rpx 10rpx 0rpx;
  1361. font-size: 30rpx;
  1362. font-family: PingFang SC-Medium, PingFang SC;
  1363. font-weight: 400;
  1364. color: #FFFFFF;
  1365. line-height: 40rpx;
  1366. text-align: center;
  1367. position: absolute;
  1368. left: 0;
  1369. top: 0;
  1370. }
  1371. >text:nth-of-type(1) {
  1372. font-size: 28rpx;
  1373. font-family: PingFang SC-Medium, PingFang SC;
  1374. font-weight: 400;
  1375. color: #666666;
  1376. line-height: 80rpx;
  1377. width: 140rpx;
  1378. margin-left: 66rpx;
  1379. }
  1380. .Flag {
  1381. flex: 1;
  1382. >img {
  1383. width: 120rpx;
  1384. height: 40rpx;
  1385. margin-top: 20rpx;
  1386. }
  1387. }
  1388. .isConform {
  1389. width: 100rpx;
  1390. height: 40rpx;
  1391. font-size: 24rpx;
  1392. font-family: PingFang SC-Medium, PingFang SC;
  1393. font-weight: 400;
  1394. color: #0183FA;
  1395. line-height: 36rpx;
  1396. background: #C4DEF6;
  1397. text-align: center;
  1398. border-radius: 20rpx;
  1399. margin-left: 12rpx;
  1400. margin-top: 20rpx;
  1401. }
  1402. .itemDelete {
  1403. width: 30rpx;
  1404. height: 30rpx;
  1405. margin-right: 62rpx;
  1406. margin-top: 24rpx;
  1407. margin-left: 188rpx;
  1408. }
  1409. .noConform {
  1410. width: 100rpx;
  1411. height: 40rpx;
  1412. font-size: 24rpx;
  1413. font-family: PingFang SC-Medium, PingFang SC;
  1414. font-weight: 400;
  1415. color: #FF0000;
  1416. line-height: 36rpx;
  1417. background: #F7C4C4;
  1418. text-align: center;
  1419. border-radius: 20rpx;
  1420. margin-left: 12rpx;
  1421. margin-top: 20rpx;
  1422. }
  1423. }
  1424. .special_project {
  1425. min-height: 158rpx;
  1426. font-size: 28rpx;
  1427. font-family: PingFang SC-Medium, PingFang SC;
  1428. font-weight: 400;
  1429. color: #333333;
  1430. line-height: 40rpx;
  1431. padding: 20rpx 14rpx;
  1432. box-sizing: border-box;
  1433. border-radius: 0rpx 0rpx 20rpx 20rpx;
  1434. opacity: 1;
  1435. border: 1rpx solid #E0E0E0;
  1436. border-top: none;
  1437. margin-bottom: 20rpx;
  1438. .special_project_n {}
  1439. }
  1440. }
  1441. .ident {
  1442. font-size: 30rpx;
  1443. font-family: PingFang SC-Medium, PingFang SC;
  1444. font-weight: 400;
  1445. color: #666666;
  1446. line-height: 42rpx;
  1447. margin-bottom: 34rpx;
  1448. }
  1449. .add_content {
  1450. width: 690rpx;
  1451. height: 100rpx;
  1452. border: 4rpx dashed #0183FA;
  1453. font-size: 30rpx;
  1454. font-family: PingFang SC-Medium, PingFang SC;
  1455. font-weight: 400;
  1456. color: #0183FA;
  1457. line-height: 100rpx;
  1458. text-align center;
  1459. border-radius: 20rpx;
  1460. margin: 40rpx auto 100rpx;
  1461. }
  1462. .bottom_btn {
  1463. width: 690rpx;
  1464. height: 90rpx;
  1465. background: #0183FA;
  1466. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1467. display: flex;
  1468. justify-content: flex-start;
  1469. position: fixed;
  1470. left: 30rpx;
  1471. bottom: 20rpx;
  1472. .bottom_btn_li {
  1473. flex: 1;
  1474. font-size: 30rpx;
  1475. font-family: PingFang SC-Medium, PingFang SC;
  1476. font-weight: 400;
  1477. color: #FFFFFF;
  1478. line-height: 90rpx;
  1479. text-align: center;
  1480. position: relative;
  1481. }
  1482. .bottom_btn_li::after {
  1483. content: '';
  1484. position: absolute;
  1485. top: 20rpx;
  1486. right: 0rpx;
  1487. width: 1rpx;
  1488. height: 60rpx;
  1489. background: #D8D8D8;
  1490. }
  1491. .bottom_btn_li:nth-of-type(3)::after {
  1492. display: none;
  1493. }
  1494. }
  1495. .dangerCount {
  1496. font-size: 26rpx;
  1497. font-family: PingFang SC-Medium, PingFang SC;
  1498. font-weight: 400;
  1499. color: #333333;
  1500. line-height: 26rpx;
  1501. text-align: right;
  1502. margin-bottom: 20rpx;
  1503. >text {
  1504. color: #FF0000;
  1505. }
  1506. }
  1507. }
  1508. </style>