examineAddTow.vue 45 KB

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