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.code?item.code:''}}{{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. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index],'hazardCheckCode',jcxSstkNum);
  534. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index],'hazardCheckName',e.detail.value[e.detail.value.length-1].text);
  535. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index],'hazardCheckPro',e.detail.value[e.detail.value.length-1].value);
  536. }else{
  537. uni.showToast({
  538. title: '暂无数据',
  539. icon:"none",
  540. mask:true,
  541. duration: 2000
  542. });
  543. }
  544. }
  545. this.countHazardNum(indexAll,index,e.detail.value[e.detail.value.length-1].value)
  546. },
  547. //此检查项在当前实验室累计出现次数
  548. async countHazardNum(indexAll,index,hazardCheckPro){
  549. const {data} = await countHazardNum({subId:this.form.subIds, hazardCheckPro:hazardCheckPro});
  550. if(data.code == 200){
  551. if(this.form.checkCategory==1){//综合检查
  552. this.$set(this.form.checkHazardDtoList[index],'hazardCheckCount',data.data);
  553. }else if(this.form.checkCategory==2){//专项检查
  554. this.$set(this.form.checkHazardInfoVoList[indexAll].checkHazardDtoList[index],'hazardCheckCount',data.data);
  555. }
  556. }
  557. },
  558. //根据id查找元素
  559. getTreeName(list,id){
  560. let _this=this
  561. for (let i = 0; i < list.length; i++) {
  562. let a=list[i]
  563. if(a.id===id){
  564. return a
  565. }else{
  566. if(a.children && a.children.length>0){
  567. let res=_this.getTreeName(a.children,id)
  568. if(res){
  569. return res
  570. }
  571. }
  572. }
  573. }
  574. },
  575. onnodeclick(node) {
  576. },
  577. // 图片上传
  578. selectImage(item) {
  579. let self = this;
  580. if(item.uploadDtoList.length>4){
  581. uni.showToast({
  582. title: '最多上传5张图片',
  583. icon:"none",
  584. mask:true,
  585. duration: 2000
  586. });
  587. return
  588. }
  589. wx.chooseImage({
  590. count: 1,
  591. sizeType: ["original", "compressed"],
  592. sourceType: ["album", "camera"],
  593. success: function(res) {
  594. let tempFilePaths = res.tempFilePaths[0];
  595. self.uploadImg(tempFilePaths,item);
  596. }
  597. });
  598. },
  599. async uploadImg(tempFilePaths,item){
  600. var self = this;
  601. uni.showLoading({
  602. title: '上传中',
  603. mask: true
  604. });
  605. uni.uploadFile({
  606. url: config.base_url+'/base/file/upload', //仅为示例,非真实的接口地址
  607. header:{'Authorization':uni.getStorageSync('token')},
  608. filePath: tempFilePaths,
  609. name: 'file',
  610. formData: {
  611. 'user': 'test'
  612. },
  613. success: (uploadFileRes) => {
  614. let res = JSON.parse(uploadFileRes.data);
  615. if(res.code == 200){
  616. item.uploadDtoList.push({'fileUrl':res.data.url,'fileName':res.data.name});
  617. }else{
  618. uni.showToast({
  619. title: res.msg,
  620. icon:"none",
  621. mask:true,
  622. duration: 2000
  623. });
  624. }
  625. },
  626. fail: err => {},
  627. complete: () => {
  628. uni.hideLoading()
  629. }
  630. });
  631. },
  632. //删除图片
  633. delImg(item,index,minIndex){
  634. if(this.form.checkCategory==1){//综合检查
  635. this.form.checkHazardDtoList[index].uploadDtoList.splice(minIndex,1);
  636. }else if(this.form.checkCategory==2){//专项检查
  637. item.uploadDtoList.splice(minIndex,1);
  638. }
  639. this.$forceUpdate();
  640. },
  641. //添加隐患
  642. addDanger(item){
  643. if(this.form.checkCategory==1){//综合检查
  644. if(this.form.checkHazardDtoList.length>19){
  645. uni.showToast({
  646. title: '最多添加20个隐患',
  647. icon:"none",
  648. mask:true,
  649. duration: 2000
  650. });
  651. return
  652. }
  653. let obj = {
  654. voiceRemark:[],//语音备忘存储
  655. hazardLevel:2,//隐患等级
  656. hazardCheckCode:'', //检查项目code序号
  657. hazardCheckName:'', //检查项目名称
  658. hazardCheckPro:'', //最后一级的id
  659. hazardCheckPoint:'',// 检查要点
  660. hazardDescribe:'', //隐患描述
  661. uploadDtoList:[],//隐患照片
  662. }
  663. this.form.checkHazardDtoList.push(obj);
  664. }else if(this.form.checkCategory==2){//专项检查
  665. let obj = {
  666. checkFlag:0,
  667. voiceRemark:[],//语音备忘存储
  668. hazardLevel:2,//隐患等级
  669. hazardCheckCode:'', //检查项目code序号
  670. hazardCheckName:'', //检查项目名称
  671. hazardCheckPro:'', //最后一级的id
  672. hazardDescribe:'', //隐患描述
  673. uploadDtoList:[],//隐患照片
  674. }
  675. item.checkHazardDtoList.push(obj);
  676. }
  677. this.getCheckOptionList();
  678. this.$forceUpdate();
  679. },
  680. //新增检查内容
  681. addDeviceDanger(){
  682. uni.navigateTo({
  683. url: '/pages/saoCode/scan?form='+encodeURIComponent(JSON.stringify(this.form))
  684. });
  685. },
  686. //删除隐患
  687. delDetailsList(index,index2,type){//type 1综合检查 2专项检查设备项 3专项检查检查项
  688. if(this.form.checkCategory==1){//综合检查
  689. this.hiddenDangerIdList.push(this.form.checkHazardDtoList[index].id)
  690. this.form.checkHazardDtoList.splice(index,1);
  691. }else if(this.form.checkCategory==2){//专项检查
  692. if(type==2){//检查设备
  693. this.form.checkHazardInfoVoList.splice(index,1);
  694. }else if(type==3){//检查项
  695. this.form.checkHazardInfoVoList[index2].checkHazardDtoList.splice(index,1);
  696. }
  697. }
  698. this.$forceUpdate();
  699. },
  700. //子页面切换
  701. goMinButton(index){
  702. let self = this;
  703. if(index == 0){
  704. if(this.form.checkCategory==1){//综合检查
  705. uni.redirectTo({
  706. url: '/pages_safetyExamine/examineManage/examineAdd?form='+encodeURIComponent(JSON.stringify(this.form))
  707. });
  708. }else if(this.form.checkCategory==2){//专项检查
  709. if(!this.form.isCustom){
  710. this.form.checkHazardInfoVoList=[];
  711. }
  712. uni.redirectTo({
  713. url: '/pages_safetyExamine/examineManage/examineAdd?form='+encodeURIComponent(JSON.stringify(this.form))
  714. });
  715. }
  716. }else if(index == 1 || index == 2){
  717. this.form.manageStatus=index;//1保存 2提交
  718. if(this.form.checkCategory==1){//综合检查
  719. console.log(self.form.checkHazardDtoList)
  720. if(self.form.checkHazardDtoList[0]){
  721. for(let i=0;i<self.form.checkHazardDtoList.length;i++){
  722. let num = i+1;
  723. if(!self.form.checkHazardDtoList[i].hazardCheckName){
  724. uni.showToast({
  725. title: '第'+num+'未选择隐患项',
  726. icon:"none",
  727. mask:true,
  728. duration: 2000
  729. });
  730. return
  731. }else if(!self.form.checkHazardDtoList[i].hazardDescribe && self.form.checkHazardDtoList[i].voiceRemark.length<=0){
  732. uni.showToast({
  733. title: '请输入第'+num+'项隐患描述!',
  734. icon:"none",
  735. mask:true,
  736. duration: 2000
  737. });
  738. return
  739. }else if(self.form.checkHazardDtoList[i].uploadDtoList.length<=0){
  740. uni.showToast({
  741. title: '请输入第'+num+'项隐患图片!',
  742. icon:"none",
  743. mask:true,
  744. duration: 2000
  745. });
  746. return
  747. }
  748. }
  749. }else{
  750. uni.showToast({
  751. title: '请添加隐患项',
  752. icon:"none",
  753. mask:true,
  754. duration: 2000
  755. });
  756. return
  757. }
  758. }else if(this.form.checkCategory==2){//专项检查
  759. for(let k=0;k<self.form.checkHazardInfoVoList.length;k++){
  760. for(let i=0;i<self.form.checkHazardInfoVoList[k].checkHazardDtoList.length;i++){
  761. let num = i+1;
  762. if(self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].checkFlag==1){//符合
  763. if(!self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].hazardCheckName){
  764. uni.showToast({
  765. title: '第'+num+'未选择隐患项',
  766. icon:"none",
  767. mask:true,
  768. duration: 2000
  769. });
  770. return
  771. }
  772. }else{
  773. if(!self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].hazardCheckName){
  774. uni.showToast({
  775. title: '第'+num+'未选择隐患项',
  776. icon:"none",
  777. mask:true,
  778. duration: 2000
  779. });
  780. return
  781. }else if(!self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].hazardDescribe && self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].voiceRemark.length<=0){
  782. uni.showToast({
  783. title: '请输入第'+num+'项隐患描述!',
  784. icon:"none",
  785. mask:true,
  786. duration: 2000
  787. });
  788. return
  789. }else if(self.form.checkHazardInfoVoList[k].checkHazardDtoList[i].uploadDtoList.length<=0){
  790. uni.showToast({
  791. title: '请输入第'+num+'项隐患图片!',
  792. icon:"none",
  793. mask:true,
  794. duration: 2000
  795. });
  796. return
  797. }
  798. }
  799. }
  800. }
  801. }
  802. this.submitForm();
  803. }
  804. },
  805. //提交
  806. async submitForm(){
  807. let self = this;
  808. let obj=JSON.parse(JSON.stringify(self.form));
  809. if(this.form.checkCategory==1){//综合检查
  810. //语音备注JSON对象转字符串
  811. for(let i=0;i<obj.checkHazardDtoList.length;i++){
  812. if(obj.checkHazardDtoList[i].voiceRemark){
  813. obj.checkHazardDtoList[i].voiceRemark=JSON.stringify(obj.checkHazardDtoList[i].voiceRemark)
  814. }
  815. }
  816. for(let i=0;i<obj.checkHazardDtoList.length;i++){
  817. obj.checkHazardDtoList[i].checkCategory=this.form.checkCategory;
  818. }
  819. }else if(this.form.checkCategory==2){//专项检查
  820. let list=[]
  821. let checkFlagList=[];
  822. let hazardIds=[];
  823. let joinHazardIds=[];
  824. for(let i=0;i<this.form.checkHazardInfoVoList.length;i++){
  825. hazardIds.push(this.form.checkHazardInfoVoList[i].hazardId)
  826. joinHazardIds.push(this.form.checkHazardInfoVoList[i].joinHazardId)
  827. for(let b=0;b<this.form.checkHazardInfoVoList[i].checkHazardDtoList.length;b++){
  828. checkFlagList.push(this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag)
  829. //语音备注JSON对象转字符串
  830. if(this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark){
  831. this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark=JSON.stringify(this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark)
  832. }
  833. let obj2={
  834. checkFlag:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].checkFlag,
  835. checkCategory:this.form.checkCategory,
  836. hazardCheckCode:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckCode,
  837. hazardCheckName:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckName,
  838. hazardCheckPro:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardCheckPro,
  839. hazardDescribe:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardDescribe,
  840. hazardLevel:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].hazardLevel,
  841. uploadDtoList:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].uploadDtoList,
  842. voiceRemark:this.form.checkHazardInfoVoList[i].checkHazardDtoList[b].voiceRemark,
  843. code:this.form.checkHazardInfoVoList[i].code,
  844. hazardId:this.form.checkHazardInfoVoList[i].hazardId,
  845. hazardName:this.form.checkHazardInfoVoList[i].hazardName,
  846. hazardTypeMode:this.form.checkHazardInfoVoList[i].hazardTypeMode,
  847. hazardTypeModeName:this.form.checkHazardInfoVoList[i].hazardTypeModeName,
  848. joinHazardId:this.form.checkHazardInfoVoList[i].joinHazardId,
  849. }
  850. list.push(obj2)
  851. }
  852. }
  853. if(hazardIds[0]){
  854. obj.hazardIds=hazardIds.join(',')
  855. obj.joinHazardIds=joinHazardIds.join(',')
  856. }
  857. if(checkFlagList.every(item=>{return item==1})){//符合
  858. obj.checkResult=1;
  859. }else{//不符合
  860. obj.checkResult=0;
  861. }
  862. obj.checkHazardDtoList=list;
  863. }
  864. if(self.form.id){
  865. const {data} = await checkManageUpdate(obj);
  866. if(data.code == 200){
  867. uni.showToast({
  868. title: '提交成功',
  869. icon:"none",
  870. mask:true,
  871. duration: 2000
  872. });
  873. uni.redirectTo({
  874. url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.form.checkType
  875. });
  876. }
  877. }else{
  878. const {data} = await checkManageAdd(obj);
  879. if(data.code == 200){
  880. uni.showToast({
  881. title: '提交成功',
  882. icon:"none",
  883. mask:true,
  884. duration: 2000
  885. });
  886. uni.redirectTo({
  887. url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.form.checkType
  888. });
  889. }
  890. }
  891. },
  892. }
  893. }
  894. </script>
  895. <style lang="stylus" scoped>
  896. #startChecking{
  897. height:100%;
  898. .info-max-box{
  899. flex: 1;
  900. overflow: scroll;
  901. padding: 20rpx 0rpx 128rpx;
  902. box-sizing: border-box;
  903. }
  904. .list{
  905. .title{
  906. width: 690rpx;
  907. height: 100rpx;
  908. background: #FFFFFF;
  909. border-radius: 20rpx;
  910. margin: 20rpx 30rpx;
  911. font-size: 30rpx;
  912. font-family: PingFang SC-Medium, PingFang SC;
  913. font-weight: 400;
  914. color: #333333;
  915. line-height: 100rpx;
  916. padding-left: 24rpx;
  917. box-sizing: border-box;
  918. }
  919. .check-for-big-box{
  920. width 690rpx;
  921. //padding-top:30rpx;
  922. margin:0 30rpx 20rpx;
  923. background #fff
  924. border-radius:20rpx;
  925. overflow hidden
  926. position relative;
  927. padding:30rpx;
  928. box-sizing border-box;
  929. /* 隐患等级 */
  930. .grade{
  931. display: flex;
  932. justify-content: flex-start;
  933. .grade_l{
  934. width: 158rpx;
  935. text-align: left;
  936. font-size: 30rpx;
  937. font-family: PingFang SC-Medium, PingFang SC;
  938. font-weight: 400;
  939. color: #333333;
  940. line-height: 80rpx;
  941. }
  942. .grade_r{
  943. width: 480rpx;
  944. height: 80rpx;
  945. border-radius: 10rpx;
  946. border: 1rpx solid #E0E0E0;
  947. display: flex;
  948. justify-content: flex-start;
  949. align-items: center;
  950. padding-left: 20rpx;
  951. box-sizing: border-box;
  952. >view{
  953. flex:1;
  954. line-height:80rpx;
  955. font-size: 30rpx;
  956. font-family: PingFang SC-Medium, PingFang SC;
  957. font-weight: 400;
  958. color: #333333;
  959. line-height: 80rpx;
  960. }
  961. >img{
  962. width: 14rpx;
  963. height: 8rpx;
  964. margin-right: 30rpx;
  965. }
  966. }
  967. }
  968. /* 检查项目 */
  969. .project{
  970. .project_l{
  971. width: 158rpx;
  972. text-align: left;
  973. font-size: 30rpx;
  974. font-family: PingFang SC-Medium, PingFang SC;
  975. font-weight: 400;
  976. color: #333333;
  977. line-height: 80rpx;
  978. margin-top: 24rpx;
  979. }
  980. .project_r{
  981. width: 630rpx;
  982. min-height: 80rpx;
  983. border-radius: 10rpx;
  984. border: 1rpx solid #E0E0E0;
  985. display: flex;
  986. justify-content: flex-start;
  987. align-items: center;
  988. padding-left: 20rpx;
  989. box-sizing: border-box;
  990. }
  991. }
  992. /* 检查要点 */
  993. .point{
  994. .point_l{
  995. width: 158rpx;
  996. text-align: left;
  997. font-size: 30rpx;
  998. font-family: PingFang SC-Medium, PingFang SC;
  999. font-weight: 400;
  1000. color: #333333;
  1001. line-height: 80rpx;
  1002. }
  1003. .point_r{
  1004. width: 630rpx;
  1005. height: 158rpx;
  1006. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1007. opacity: 1;
  1008. border: 1rpx solid #E0E0E0;
  1009. padding: 20rpx 14rpx;
  1010. box-sizing: border-box;
  1011. font-size: 30rpx;
  1012. font-family: PingFang SC-Medium, PingFang SC;
  1013. font-weight: 400;
  1014. color: #333333;
  1015. line-height: 34rpx;
  1016. }
  1017. }
  1018. /* 隐患描述 */
  1019. .check-for-input-max-box{
  1020. .left-title-p{
  1021. width:150rpx;
  1022. line-height:80rpx;
  1023. text-align right
  1024. font-size:30rpx;
  1025. }
  1026. textarea{
  1027. width: 630rpx;
  1028. height: 158rpx;
  1029. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1030. border: 1rpx solid #E0E0E0;
  1031. padding: 20rpx 14rpx;
  1032. box-sizing: border-box;
  1033. font-size: 30rpx;
  1034. font-family: PingFang SC-Medium, PingFang SC;
  1035. font-weight: 400;
  1036. color: #333333;
  1037. line-height: 34rpx;
  1038. }
  1039. }
  1040. /* 隐患照片 */
  1041. .check-for-img-max-box{
  1042. .left-title-p{
  1043. width: 100%;
  1044. text-align: left;
  1045. font-size: 30rpx;
  1046. font-family: PingFang SC-Medium, PingFang SC;
  1047. font-weight: 400;
  1048. color: #333333;
  1049. line-height: 80rpx;
  1050. }
  1051. .right-img-box{
  1052. .img-box{
  1053. display inline-block;
  1054. height:180rpx;
  1055. width:180rpx;
  1056. position relative
  1057. margin:0 14rpx 20rpx 0;
  1058. border-radius 10rpx;
  1059. overflow hidden;
  1060. .img-data{
  1061. height:180rpx;
  1062. width:180rpx;
  1063. }
  1064. .position-img{
  1065. position absolute
  1066. right:0;
  1067. top:0;
  1068. width:36rpx;
  1069. height:36rpx;
  1070. }
  1071. }
  1072. .img-box:nth-of-type(3n+3){
  1073. margin-right: 0rpx;
  1074. }
  1075. .add-button{
  1076. margin:0 20rpx 20rpx 0;
  1077. border-radius 10rpx;
  1078. overflow hidden;
  1079. display inline-block
  1080. height:180rpx;
  1081. width:180rpx;
  1082. }
  1083. }
  1084. }
  1085. /* 语音备注 */
  1086. .voice{
  1087. .voice_t{
  1088. height: 80rpx;
  1089. display: flex;
  1090. justify-content: space-between;
  1091. align-items: center;
  1092. .voice_t_l{
  1093. font-size: 30rpx;
  1094. font-family: PingFang SC-Medium, PingFang SC;
  1095. font-weight: 400;
  1096. color: #333333;
  1097. line-height: 80rpx;
  1098. }
  1099. .voice_t_r{
  1100. width: 170rpx;
  1101. height: 50rpx;
  1102. }
  1103. }
  1104. .voice_b{
  1105. display flex;
  1106. justify-content flex-start;
  1107. align-items center;
  1108. margin-bottom :30rpx;
  1109. .voice_b_l{
  1110. width: 400rpx;
  1111. height: 40rpx;
  1112. background:rgba(88,175,255,0.3);
  1113. border-radius: 10rpx;
  1114. display flex;
  1115. justify-content flex-start;
  1116. align-items center;
  1117. >img{
  1118. width: 18rpx;
  1119. height: 24rpx;
  1120. margin-left:16rpx;
  1121. margin-right :20rpx;
  1122. }
  1123. }
  1124. .voice_b_r{
  1125. width: 28rpx;
  1126. height: 28rpx;
  1127. margin-left:20rpx;
  1128. }
  1129. }
  1130. }
  1131. .check-for-button-max-box{
  1132. display flex
  1133. margin-top:30rpx;
  1134. margin-bottom:20rpx;
  1135. .left-title-p{
  1136. width:150rpx;
  1137. line-height:88rpx;
  1138. text-align right
  1139. font-size:30rpx;
  1140. }
  1141. .button-text-p{
  1142. border:1rpx solid #E0E0E0;
  1143. width:440rpx;
  1144. height:80rpx;
  1145. border-radius:10rpx;
  1146. line-height :80rpx;
  1147. color: #A2A2A2
  1148. padding:0 20rpx;
  1149. font-size:28rpx;
  1150. display:block;
  1151. overflow:hidden;
  1152. text-overflow:ellipsis;
  1153. white-space:nowrap;
  1154. }
  1155. }
  1156. .check-for-big-box-position-img-box{
  1157. position absolute
  1158. top:0;
  1159. right:0;
  1160. width:60rpx;
  1161. height:60rpx;
  1162. img{
  1163. width:36rpx;
  1164. height:36rpx;
  1165. margin:12rpx;
  1166. }
  1167. }
  1168. }
  1169. /* 添加隐患项 */
  1170. .add-for-item-p{
  1171. width:690rpx;
  1172. height:100rpx;
  1173. border:4rpx dashed #0183FA;
  1174. font-size: 30rpx;
  1175. font-family: PingFang SC-Medium, PingFang SC;
  1176. font-weight: 400;
  1177. color: #0183FA;
  1178. line-height: 100rpx;
  1179. text-align center;
  1180. border-radius:20rpx;
  1181. margin:40rpx auto 100rpx;
  1182. }
  1183. }
  1184. /* 专项检查 */
  1185. .inconformity_tow{
  1186. width: 690rpx;
  1187. height: 100rpx;
  1188. background: #FFFFFF;
  1189. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1190. margin: 20rpx 30rpx;
  1191. display: flex;
  1192. justify-content: space-between;
  1193. align-items: center;
  1194. padding: 0 30rpx;
  1195. box-sizing: border-box;
  1196. >text{
  1197. flex: 1;
  1198. font-size: 30rpx;
  1199. font-family: PingFang SC-Medium, PingFang SC;
  1200. font-weight: 400;
  1201. color: #333333;
  1202. line-height: 100rpx;
  1203. text-align: left;
  1204. }
  1205. .unfold{
  1206. >img{
  1207. width: 30rpx;
  1208. height: 26rpx;
  1209. margin-left: 20rpx;
  1210. }
  1211. }
  1212. >img{
  1213. width: 30rpx;
  1214. height: 26rpx;
  1215. margin-left: 20rpx;
  1216. }
  1217. }
  1218. .danger_border{
  1219. border-radius: 20rpx;
  1220. width: 690rpx;
  1221. background: #FFFFFF;
  1222. margin: 0rpx 30rpx 20rpx;
  1223. overflow: hidden;
  1224. }
  1225. .special_danger{
  1226. width:auto;
  1227. background: #FFFFFF;
  1228. padding: 0;
  1229. box-sizing: border-box;
  1230. border-radius: 0;
  1231. .grade_title{
  1232. height: 80rpx;
  1233. display: flex;
  1234. justify-content: space-between;
  1235. border-bottom: 1rpx solid #D8D8D8;
  1236. position: relative;
  1237. background: #F5F5F5;
  1238. border-radius: 20rpx 20rpx 0rpx 0rpx;
  1239. .sort{
  1240. width: 40rpx;
  1241. height: 40rpx;
  1242. background: #0183FA;
  1243. border-radius: 20rpx 0rpx 10rpx 0rpx;
  1244. font-size: 30rpx;
  1245. font-family: PingFang SC-Medium, PingFang SC;
  1246. font-weight: 400;
  1247. color: #FFFFFF;
  1248. line-height: 40rpx;
  1249. text-align: center;
  1250. position: absolute;
  1251. left: 0;
  1252. top: 0;
  1253. }
  1254. >text:nth-of-type(1){
  1255. font-size: 28rpx;
  1256. font-family: PingFang SC-Medium, PingFang SC;
  1257. font-weight: 400;
  1258. color: #666666;
  1259. line-height: 80rpx;
  1260. width: 140rpx;
  1261. margin-left: 66rpx;
  1262. }
  1263. .Flag{
  1264. flex: 1;
  1265. >img{
  1266. width: 120rpx;
  1267. height: 40rpx;
  1268. margin-top: 20rpx;
  1269. }
  1270. }
  1271. .isConform{
  1272. width: 100rpx;
  1273. height: 40rpx;
  1274. font-size: 24rpx;
  1275. font-family: PingFang SC-Medium, PingFang SC;
  1276. font-weight: 400;
  1277. color: #0183FA;
  1278. line-height: 36rpx;
  1279. background: #C4DEF6;
  1280. text-align: center;
  1281. border-radius:20rpx;
  1282. margin-left: 12rpx;
  1283. margin-top: 20rpx;
  1284. }
  1285. .itemDelete{
  1286. width: 30rpx;
  1287. height: 30rpx;
  1288. margin-right: 62rpx;
  1289. margin-top: 24rpx;
  1290. margin-left: 188rpx;
  1291. }
  1292. .noConform{
  1293. width: 100rpx;
  1294. height: 40rpx;
  1295. font-size: 24rpx;
  1296. font-family: PingFang SC-Medium, PingFang SC;
  1297. font-weight: 400;
  1298. color: #FF0000;
  1299. line-height: 36rpx;
  1300. background: #F7C4C4;
  1301. text-align: center;
  1302. border-radius:20rpx;
  1303. margin-left: 12rpx;
  1304. margin-top: 20rpx;
  1305. }
  1306. }
  1307. .special_project{
  1308. min-height: 158rpx;
  1309. font-size: 28rpx;
  1310. font-family: PingFang SC-Medium, PingFang SC;
  1311. font-weight: 400;
  1312. color: #333333;
  1313. line-height: 40rpx;
  1314. padding: 20rpx 14rpx;
  1315. box-sizing: border-box;
  1316. border-radius: 0rpx 0rpx 20rpx 20rpx;
  1317. opacity: 1;
  1318. border: 1rpx solid #E0E0E0;
  1319. border-top:none;
  1320. margin-bottom: 20rpx;
  1321. .special_project_n{
  1322. }
  1323. }
  1324. }
  1325. .ident{
  1326. font-size: 30rpx;
  1327. font-family: PingFang SC-Medium, PingFang SC;
  1328. font-weight: 400;
  1329. color: #666666;
  1330. line-height: 42rpx;
  1331. margin-bottom: 34rpx;
  1332. }
  1333. .add_content{
  1334. width:690rpx;
  1335. height:100rpx;
  1336. border:4rpx dashed #0183FA;
  1337. font-size: 30rpx;
  1338. font-family: PingFang SC-Medium, PingFang SC;
  1339. font-weight: 400;
  1340. color: #0183FA;
  1341. line-height: 100rpx;
  1342. text-align center;
  1343. border-radius:20rpx;
  1344. margin:40rpx auto 100rpx;
  1345. }
  1346. .bottom_btn{
  1347. width: 690rpx;
  1348. height: 90rpx;
  1349. background: #0183FA;
  1350. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1351. display: flex;
  1352. justify-content: flex-start;
  1353. position: fixed;
  1354. left: 30rpx;
  1355. bottom: 20rpx;
  1356. .bottom_btn_li{
  1357. flex: 1;
  1358. font-size: 30rpx;
  1359. font-family: PingFang SC-Medium, PingFang SC;
  1360. font-weight: 400;
  1361. color: #FFFFFF;
  1362. line-height: 90rpx;
  1363. text-align: center;
  1364. position: relative;
  1365. }
  1366. .bottom_btn_li::after{
  1367. content:'';
  1368. position: absolute;
  1369. top: 20rpx;
  1370. right:0rpx;
  1371. width: 1rpx;
  1372. height: 60rpx;
  1373. background: #D8D8D8;
  1374. }
  1375. .bottom_btn_li:nth-of-type(3)::after{
  1376. display: none;
  1377. }
  1378. }
  1379. .dangerCount{
  1380. font-size: 26rpx;
  1381. font-family: PingFang SC-Medium, PingFang SC;
  1382. font-weight: 400;
  1383. color: #333333;
  1384. line-height: 26rpx;
  1385. text-align: right;
  1386. margin-bottom: 20rpx;
  1387. >text{
  1388. color: #FF0000;
  1389. }
  1390. }
  1391. }
  1392. </style>