examineAddTow.vue 45 KB

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