examineAddTow.vue 46 KB

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