examineAdd.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. <!-- 安全检查-开展检查 -->
  2. <template>
  3. <view class="examine">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="basics">
  6. <view class="basics_li">
  7. <view class="basics_li_l">实验室</view>
  8. <view class="basics_li_r lab_r">
  9. <input class="picker-text" @click="popupClick(1)" type="text" disabled v-model="form.subjectName" placeholder="请选择房间" placeholder-style="font-size: 30rpx;color:#333;">
  10. <view class="img-box" @click.stop="saoCode">
  11. <img src="@/pages_safetyExamine/images/icon_aqjc_sm.png">
  12. </view>
  13. </view>
  14. </view>
  15. <view class="basics_li">
  16. <view class="basics_li_l">学院</view>
  17. <picker @change="collegeChange" :value="collegeIndex" :range="collegeArray" class="scope_r">
  18. <view class="basics_li_r college_r">
  19. <view>{{form.collegeName?form.collegeName:'选择学院'}}</view>
  20. <img src="@/pages_safetyExamine/images/icon_06.png">
  21. </view>
  22. </picker>
  23. </view>
  24. <!-- <view class="basics_li">
  25. <view class="basics_li_l">楼栋</view>
  26. <view class="basics_li_r building_r">
  27. <input class="picker-text" type="text" disabled v-model="form.buildName" placeholder="选择实验室后自动匹配" placeholder-style="font-size: 30rpx;color:#333;">
  28. </view>
  29. </view> -->
  30. <view class="basics_li">
  31. <view class="basics_li_l">楼栋</view>
  32. <picker @change="buildingChange" :value="collegeIndex" :range="buildingArray" class="scope_r">
  33. <view class="basics_li_r college_r">
  34. <view>{{form.buildName?form.buildName:'选择楼栋'}}</view>
  35. <img src="@/pages_safetyExamine/images/icon_06.png">
  36. </view>
  37. </picker>
  38. </view>
  39. <view class="basics_li">
  40. <view class="basics_li_l">计划标题</view>
  41. <picker v-if="isCustom" @change="planChange" :value="planIndex" :range="planArray" class="scope_r">
  42. <view class="basics_li_r college_r">
  43. <view>{{form.title?form.title:'选择计划标题'}}</view>
  44. <img src="@/pages_safetyExamine/images/icon_06.png">
  45. </view>
  46. </picker>
  47. <view v-if="!isCustom" class="basics_li_r college_r">
  48. <input type="text" v-model="form.title" placeholder="输入计划标题">
  49. </view>
  50. </view>
  51. <view class="basics_li">
  52. <view class="basics_li_l">检查类型</view>
  53. <picker @change="categoryChange" :value="categoryIndex" disabled :range="categoryArray" class="scope_r">
  54. <view class="basics_li_r college_r">
  55. <view>{{form.checkType?(form.checkType==1?'校院巡查':'实验室自查'):'选择检查类型'}}</view>
  56. <img src="@/pages_safetyExamine/images/icon_06.png">
  57. </view>
  58. </picker>
  59. </view>
  60. <view class="period">
  61. <view class="period_l">检查周期</view>
  62. <view class="period_r">
  63. <picker mode="date" @change="startChange(form,$event)" :disabled="isCustom">
  64. <input class="picker-text" disabled type="text" v-model="form.cycleStartTime" placeholder="开始时间">
  65. </picker>
  66. <view>至</view>
  67. <picker mode="date" @change="endChange(form,$event)" :disabled="isCustom">
  68. <input class="picker-text2" disabled type="text" v-model="form.cycleEndTime" placeholder="结束时间">
  69. </picker>
  70. </view>
  71. </view>
  72. <view class="custom" @click="customFun">{{isCustom?'自定义输入':'选择计划'}}</view>
  73. </view>
  74. <view class="inspect">
  75. <view class="inspect_li">
  76. <view class="inspect_li_l">检查结果</view>
  77. <picker @change="resultChange" :value="resultIndex" :range="resultArray" class="scope_r">
  78. <view class="inspect_li_r college_r">
  79. <view>{{form.checkResult==1?'符合':'不符合'}}</view>
  80. <img src="@/pages_safetyExamine/images/icon_06.png">
  81. </view>
  82. </picker>
  83. </view>
  84. <view class="inspect_li" v-if="form.checkResult==0">
  85. <view class="inspect_li_l">整改日期</view>
  86. <picker mode="date" @change="rectifyDeadline(form,$event)" :start="currentDate">
  87. <view class="inspect_li_r date_r">
  88. <input disabled class="picker-text" type="text" v-model="form.rectifyDeadline" placeholder="请选择日期" placeholder-style="font-size: 30rpx;color:#333;">
  89. <img src="@/pages_safetyExamine/images/icon_rl.png">
  90. </view>
  91. </picker>
  92. </view>
  93. <view class="inspect_li" v-if="form.checkResult==0">
  94. <view class="inspect_li_l">整改通知</view>
  95. <view class="inform_r">
  96. <view v-for="(item,index) in informArray" :key="index" @click="tabClick(index)"><text :class="informIndex==index?'checked':'inform_r_l' "></text><text class="inform_r_r">{{item}}</text></view>
  97. </view>
  98. </view>
  99. </view>
  100. </scroll-view>
  101. <!-- 房间选择弹出层 -->
  102. <view class="popup-max-box" v-if="popupType">
  103. <view class="popup-null" @click="popupClick(2)"></view>
  104. <view class="popup-big-box">
  105. <view class="popup-input-box">
  106. <input type="text" maxlength="10" v-model="room" placeholder="请输入关键字">
  107. <view @click="buildBySub">搜索</view>
  108. </view>
  109. <view class="popup-for-max-box">
  110. <view class="popup-for-null" v-if="!roomList[0]">暂无数据</view>
  111. <view class="popup-for-box" v-for="(item,index) in roomList" :key="index">
  112. <view class="name-p">{{item.name}}</view>
  113. <view class="button-p" @click="popupClickItem(item)">确定</view>
  114. </view>
  115. </view>
  116. </view>
  117. </view>
  118. <!-- 检查名称弹窗 -->
  119. <uni-popup ref="popup" class="inspect_name" type="bottom">
  120. <view class="popup-content">
  121. <view class="inspect_name_t">
  122. <input type="text" v-model="customTitle" maxlength="20" placeholder="请输入计划标题"/>
  123. </view>
  124. <view class="inspect_name_b">
  125. <text @click="titleCancel()">取消</text>
  126. <text @click="titleConfirm()">确定</text>
  127. </view>
  128. </view>
  129. </uni-popup>
  130. <view class="bottom_btn" @click="handleClick('nextStep')" v-if="form.checkResult==0">下一步</view>
  131. <view class="bottom_btn" @click="submitForm()" v-if="form.checkResult==1">提交</view>
  132. </view>
  133. </template>
  134. <script>
  135. import { config } from '@/api/request/config.js'
  136. import { buildBySub,listDepartments,subjectList,getCheckPlanBySubId,checkManageUpdate,checkManageAdd,findCheckManage,getBuildingList} from '@/api/index.js'
  137. export default {
  138. name: "rectifyList",
  139. components: {
  140. },
  141. data() {
  142. return {
  143. id:'',
  144. pageType:0,
  145. //列表请求参数
  146. getData:{
  147. pageNum:1,
  148. pageSize:20,
  149. },
  150. customTitle:'',
  151. form:{
  152. id:'',
  153. checkPlanId:'',
  154. manageStatus:'',//保存1 提交2
  155. subIds:'',//实验室
  156. subjectName:'',
  157. title:'',//计划标题
  158. deptId:'',//学院
  159. collegeName:'',
  160. buildId:'',//楼栋
  161. buildName:'',
  162. roomNumber:'',//房间号
  163. checkType:'',// 检查类型(1校院巡查 2实验室自查)
  164. checkResult:1,// 检查结果 0不符合 1符合
  165. rectifyDeadline:'',//整改期限
  166. rectifyNotice:'1',//整改通知(1整改告知书 2整改通知书)
  167. cycleStartTime:'',
  168. cycleEndTime:'',
  169. checkHazardDtoList:[
  170. {
  171. voiceRemark:[],//语音备忘存储
  172. hazardLevel:2,//隐患等级
  173. hazardLevelName:'一般隐患',//隐患等级
  174. hazardCheckCode:'', //检查项目code序号
  175. hazardCheckName:'', //检查项目名称
  176. hazardCheckPro:'', //最后一级的id
  177. hazardCheckPoint:'',// 检查要点
  178. hazardDescribe:'', //隐患描述
  179. uploadDtoList:[],//隐患照片
  180. }
  181. ],
  182. },
  183. collegeIndex :0,
  184. collegeArray:[],
  185. categoryIndex :0,
  186. categoryArray:['校院巡查','实验室自查'],
  187. planIndex :0,
  188. planArray:[],
  189. planList:[],
  190. resultIndex :0,
  191. resultArray:['符合','不符合'],
  192. informIndex:0,
  193. informArray:['整改告知书','整改通知书'],
  194. //房间弹层 状态
  195. popupType:false,
  196. //房间搜索字段
  197. room:"",
  198. roomList:[],
  199. item:{},
  200. isCustom:true,
  201. buildingArray:[],
  202. buildingList:[],
  203. //扫一扫进入
  204. laboratoryList:[],
  205. currentDate:'',//当前日期
  206. }
  207. },
  208. onLoad(option) {
  209. //通过微信扫一扫进入
  210. if(option.q){
  211. let text = decodeURIComponent(option.q)
  212. console.log('text',text)
  213. let codeId = "";
  214. let newList = text.split("?")[1].split("&")
  215. let list = newList[0].split("=")[1].split("-")
  216. codeId = list[0];
  217. uni.showToast({
  218. title: codeId,
  219. icon:"none",
  220. mask:true,
  221. duration: 2000
  222. });
  223. this.form.subIds=codeId
  224. this.getCheckPlanBySubId(codeId)
  225. this.getByIdLaboratoryList();
  226. }
  227. if(option.id){
  228. this.id=option.id
  229. this.findCheckManage()
  230. }
  231. if(option.form){
  232. this.form=JSON.parse(decodeURIComponent(option.form));
  233. }
  234. //通过实验室id查询计划
  235. if(option.subId){
  236. this.form.subIds=option.subId
  237. this.getCheckPlanBySubId(option.subId)
  238. this.getByIdLaboratoryList();
  239. }
  240. },
  241. onShow() {
  242. },
  243. mounted(){
  244. //获取当前日期
  245. this.currentDate=this.getNowFormatDate()
  246. this.listDepartments();
  247. },
  248. methods: {
  249. //滚动事件
  250. scrollGet(){},
  251. handleClick(doType){
  252. let self=this;
  253. if(!this.form.rectifyDeadline){
  254. uni.showToast({
  255. title: '整改日期不能为空!',
  256. icon:"none",
  257. mask:true,
  258. duration: 2000
  259. });
  260. return
  261. }
  262. if( doType=='nextStep'){//下一步
  263. uni.redirectTo({
  264. url: '/pages_safetyExamine/examineManage/examineAddTow?form='+encodeURIComponent(JSON.stringify(this.form))
  265. });
  266. }
  267. },
  268. customFun(){
  269. let self=this;
  270. self.isCustom=!self.isCustom
  271. if(self.isCustom){//自定义
  272. self.form.title='';
  273. self.form.checkType='';
  274. self.form.cycleStartTime='';
  275. self.form.cycleEndTime='';
  276. }else{//选择计划
  277. self.form.title='';
  278. self.form.cycleStartTime='';
  279. self.form.cycleEndTime='';
  280. self.form.checkType=2;
  281. self.$refs.popup.open()
  282. }
  283. },
  284. titleCancel(){
  285. let self=this;
  286. self.$refs.popup.close()
  287. },
  288. titleConfirm(){
  289. let self=this;
  290. this.form.title=this.customTitle;
  291. self.$refs.popup.close()
  292. },
  293. //开始时间选中事件
  294. startChange(form,e){
  295. if(new Date(e.target.value).getTime()>new Date(form.cycleEndTime).getTime()){
  296. uni.showToast({
  297. title: '结束时间不能小于开始时间',
  298. icon:"none",
  299. mask:true,
  300. duration: 2000
  301. });
  302. }else{
  303. form.cycleStartTime=e.target.value
  304. }
  305. console.log(e.target.value)
  306. console.log(form.cycleStartTime)
  307. },
  308. //结束时间选中事件
  309. endChange(form,e){
  310. if(new Date(form.cycleStartTime).getTime()>new Date(e.target.value).getTime()){
  311. uni.showToast({
  312. title: '结束时间不能小于开始时间',
  313. icon:"none",
  314. mask:true,
  315. duration: 2000
  316. });
  317. }else{
  318. form.cycleEndTime=e.target.value
  319. }
  320. },
  321. //获取当前日期函数
  322. getNowFormatDate() {
  323. let date = new Date(),
  324. year = date.getFullYear(), //获取完整的年份(4位)
  325. month = date.getMonth() + 1, //获取当前月份(0-11,0代表1月)
  326. strDate = date.getDate() // 获取当前日(1-31)
  327. if (month < 10) month = `0${month}` // 如果月份是个位数,在前面补0
  328. if (strDate < 10) strDate = `0${strDate}` // 如果日是个位数,在前面补0
  329. return `${year}-${month}-${strDate}`
  330. },
  331. //详情
  332. async findCheckManage(){
  333. let _this = this;
  334. const {data} = await findCheckManage({id:this.id});
  335. if(data.code == 200){
  336. this.form.id=data.data.id;
  337. this.form.checkPlanId=data.data.checkPlanId;
  338. this.form.subIds=data.data.subId;
  339. this.form.subjectName=data.data.subjectName;
  340. this.form.title=data.data.title;
  341. this.form.deptId=data.data.deptId;
  342. this.form.collegeName=data.data.collegeName;
  343. this.form.buildId=data.data.buildId;
  344. this.form.buildName=data.data.buildName;
  345. this.form.checkType=data.data.checkType;
  346. this.form.roomNumber=data.data.roomNumber;
  347. this.form.checkResult=data.data.checkResult==null?'1':data.data.checkResult;
  348. this.form.rectifyDeadline=data.data.rectifyDeadline;
  349. this.form.rectifyNotice=data.data.rectifyNotice==null?'1':data.data.rectifyNotice;
  350. if(data.data.checkHazardDtoList.length>0){//隐患项
  351. this.form.checkHazardDtoList=data.data.checkHazardDtoList;
  352. //语音备注
  353. for(let i=0;i<this.form.checkHazardDtoList.length;i++){
  354. if(this.form.checkHazardDtoList[i].voiceRemark){
  355. this.form.checkHazardDtoList[i].voiceRemark=JSON.parse(this.form.checkHazardDtoList[i].voiceRemark)
  356. }else{
  357. this.form.checkHazardDtoList[i].voiceRemark=[];
  358. }
  359. }
  360. }else{
  361. this.form.checkHazardDtoList[0].voiceRemark=[];
  362. }
  363. //根据实验室id查询实验室计划
  364. if(data.data.subId){
  365. this.form.cycleStartTime=data.data.cycleStartTime;
  366. this.form.cycleEndTime=data.data.cycleEndTime;
  367. this.getCheckPlanBySubId(data.data.subId)
  368. }
  369. console.log(this.form)
  370. }
  371. },
  372. //查询学院列表
  373. async listDepartments(){
  374. let _this = this;
  375. const {data} = await listDepartments();
  376. if(data.code == 200){
  377. for(let i=0;i<data.data.length;i++){
  378. _this.collegeArray.push(data.data[i].deptName)
  379. }
  380. _this.collegeList=data.data;
  381. }
  382. },
  383. //根据实验室id查询该实验室有关计划
  384. async getCheckPlanBySubId(subId){
  385. let _this = this;
  386. _this.planArray=[];
  387. const {data} = await getCheckPlanBySubId({'subId':subId});
  388. if(data.code == 200){
  389. if(data.data.length>0){
  390. for(let i=0;i<data.data.length;i++){
  391. _this.planArray.push(data.data[i].title)
  392. }
  393. _this.planList=data.data;
  394. }else{
  395. _this.isCustom=false;
  396. _this.form.checkType=2;
  397. }
  398. }
  399. },
  400. //根据学院id查询楼栋
  401. async getBuildingList(deptId){
  402. let _this = this;
  403. const {data} = await getBuildingList(deptId);
  404. if(data.code == 200){
  405. console.log(_this.form.buildId)
  406. for(let i=0;i<data.data.length;i++){
  407. _this.buildingArray.push(data.data[i].deptName)
  408. if(_this.form.buildId==data.data[i].deptId){
  409. this.$set(this.form,"buildName",data.data[i].deptName)
  410. }
  411. }
  412. console.log(_this.form.buildName)
  413. _this.buildingList=data.data;
  414. }
  415. },
  416. //楼栋选中
  417. buildingChange(e){
  418. this.form.buildId=this.buildingList[e.target.value].deptId
  419. this.form.buildName=this.buildingList[e.target.value].deptName
  420. },
  421. //学院选中
  422. collegeChange(e){
  423. this.collegeIndex = e.target.value;
  424. this.form.deptId=this.collegeList[e.target.value].deptId
  425. this.form.collegeName=this.collegeList[e.target.value].deptName
  426. console.log()
  427. this.getBuildingList(this.form.deptId)
  428. },
  429. //检查类型
  430. categoryChange(e){
  431. this.categoryIndex = e.target.value;
  432. if(e.target.value==0){
  433. this.form.checkType=1
  434. }else if(e.target.value==1){
  435. this.form.checkType=2
  436. }
  437. },
  438. //计划
  439. planChange(e){
  440. this.planIndex = e.target.value;
  441. this.form.id=this.planList[e.target.value].id
  442. this.form.title=this.planList[e.target.value].title
  443. this.form.checkPlanId=this.planList[e.target.value].checkPlanId
  444. this.form.subIds=this.planList[e.target.value].subId;
  445. this.form.subjectName=this.planList[e.target.value].subjectName;
  446. this.form.deptId=this.planList[e.target.value].deptId;
  447. this.form.collegeName=this.planList[e.target.value].collegeName;
  448. this.form.buildId=this.planList[e.target.value].buildId;
  449. this.form.buildName=this.planList[e.target.value].buildName;
  450. this.form.checkType=this.planList[e.target.value].checkType;
  451. this.form.cycleStartTime=this.planList[e.target.value].cycleStartTime;
  452. this.form.cycleEndTime=this.planList[e.target.value].cycleEndTime;
  453. },
  454. resultChange(e){
  455. this.resultIndex = e.target.value;
  456. if(e.target.value==0){
  457. this.form.checkResult=1;
  458. }else if(e.target.value==1){
  459. this.form.checkResult=0;
  460. }
  461. },
  462. //开始时间选中事件
  463. rectifyDeadline(form,e){
  464. form.rectifyDeadline=e.target.value
  465. },
  466. //整改通知
  467. tabClick(index) {
  468. this.informIndex = index;
  469. if(index==0){
  470. this.rectifyNotice='1';
  471. }else if(index==1){
  472. this.rectifyNotice='2';
  473. }
  474. },
  475. //搜索房间弹层开关
  476. popupClick(type){
  477. if(type == 1){
  478. this.room = "";
  479. this.roomList = [];
  480. this.popupType = true;
  481. }else if(type == 2){
  482. this.popupType = false;
  483. }
  484. },
  485. //扫一扫进入通过id查询实验室列表
  486. async getByIdLaboratoryList(){
  487. let self = this;
  488. const {data} = await buildBySub({'name':this.room});
  489. if(data.code==200){
  490. if(data.data[0]){
  491. this.laboratoryList = data.data;
  492. data.data.forEach(function(item){
  493. if(self.form.subIds==item.id){
  494. self.form.subjectName=item.name;
  495. self.form.deptId=item.deptId;
  496. self.form.buildId=item.buildId;
  497. self.form.roomNumber=item.room;
  498. }
  499. })
  500. //获取学院名称
  501. for(let i=0;i<this.collegeList.length;i++){
  502. if(this.collegeList[i].deptId==self.form.deptId){
  503. this.$set(this.form,"collegeName",this.collegeList[i].deptName)
  504. }
  505. }
  506. //请求楼栋数据
  507. this.getBuildingList(self.form.deptId)
  508. }
  509. }
  510. },
  511. //搜索房间接口
  512. async buildBySub(){
  513. let self = this;
  514. if(!this.room){
  515. uni.showToast({
  516. title: '请输入要搜索房间号',
  517. icon:"none",
  518. mask:true,
  519. duration: 2000
  520. });
  521. return
  522. }
  523. const {data} = await buildBySub({'name':this.room});
  524. if(data.code==200){
  525. if(data.data[0]){
  526. this.roomList = data.data;
  527. }else{
  528. uni.showToast({
  529. title: '未找到相关房间',
  530. icon:"none",
  531. mask:true,
  532. duration: 2000
  533. });
  534. }
  535. }
  536. },
  537. //确认搜索房间
  538. popupClickItem(item){
  539. this.$set(this.form,"subIds",item.id)
  540. this.$set(this.form,"subjectName",item.name)
  541. this.$set(this.form,"deptId",item.deptId)
  542. this.$set(this.form,"buildId",item.buildId)
  543. this.$set(this.form,"roomNumber",item.room)
  544. //获取学院名称
  545. for(let i=0;i<this.collegeList.length;i++){
  546. if(this.collegeList[i].deptId==item.deptId){
  547. this.$set(this.form,"collegeName",this.collegeList[i].deptName)
  548. }
  549. }
  550. //请求楼栋数据
  551. this.getBuildingList(item.deptId)
  552. this.popupType = false;
  553. this.getCheckPlanBySubId(item.id)
  554. },
  555. //调用摄像头
  556. saoCode(){
  557. let self = this;
  558. uni.scanCode({
  559. onlyFromCamera: true,
  560. success: function (res) {
  561. if(res.result.indexOf("code") != -1 && res.result.indexOf("-") != -1 && res.result.indexOf("&") != -1){
  562. let codeRoom = "";
  563. let newList = res.result.split("?")[1].split("&")
  564. let list = newList[0].split("=")[1].split("-")
  565. codeRoom = list[1];
  566. if(codeRoom){
  567. self.roomList = [];
  568. self.room = codeRoom;
  569. self.buildBySub();
  570. self.popupType = true;
  571. }else{
  572. uni.showToast({
  573. title: '请扫描正确的二维码',
  574. icon:"none",
  575. mask:true,
  576. duration: 2000
  577. });
  578. }
  579. }else{
  580. uni.showToast({
  581. title: '请扫描正确的二维码',
  582. icon:"none",
  583. mask:true,
  584. duration: 2000
  585. });
  586. }
  587. }
  588. });
  589. },
  590. //提交
  591. async submitForm(){
  592. let self = this;
  593. this.form.manageStatus=2;
  594. let obj=self.form;
  595. //复合的情况下,删除隐患项
  596. obj.checkHazardDtoList=[];
  597. if(self.form.checkPlanId){
  598. const {data} = await checkManageUpdate(obj);
  599. if(data.code == 200){
  600. uni.showToast({
  601. title: '提交成功',
  602. icon:"none",
  603. mask:true,
  604. duration: 2000
  605. });
  606. uni.redirectTo({
  607. url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.form.checkType
  608. });
  609. }
  610. }else{
  611. const {data} = await checkManageAdd(obj);
  612. if(data.code == 200){
  613. uni.showToast({
  614. title: '提交成功',
  615. icon:"none",
  616. mask:true,
  617. duration: 2000
  618. });
  619. uni.redirectTo({
  620. url: '/pages_safetyExamine/examineManage/examineList?pageType='+this.form.checkType
  621. });
  622. }
  623. }
  624. },
  625. }
  626. }
  627. </script>
  628. <style lang="stylus" scoped>
  629. .examine{
  630. height:100%;
  631. display flex;
  632. box-sizing: border-box;
  633. .info-max-box{
  634. flex: 1;
  635. overflow: scroll;
  636. padding: 20rpx 0rpx 128rpx;
  637. box-sizing: border-box;
  638. }
  639. .basics{
  640. margin: 0 30rpx;
  641. width: 690rpx;
  642. height: 740rpx;
  643. background: #FFFFFF;
  644. border-radius: 20rpx;
  645. padding: 30rpx 28rpx 0;
  646. box-sizing: border-box;
  647. .basics_li{
  648. display: flex;
  649. justify-content: flex-start;
  650. margin-bottom: 24rpx;
  651. .basics_li_l{
  652. width: 146rpx;
  653. text-align: left;
  654. font-size: 30rpx;
  655. font-family: PingFang SC-Medium, PingFang SC;
  656. font-weight: 400;
  657. color: #333333;
  658. line-height: 80rpx;
  659. }
  660. .basics_li_r{
  661. width: 486rpx;
  662. height: 80rpx;
  663. border-radius: 10rpx;
  664. opacity: 1;
  665. border: 1rpx solid #E0E0E0;
  666. padding-left: 20rpx;
  667. box-sizing: border-box;
  668. }
  669. /* 学院 */
  670. .college_r{
  671. width: 486rpx;
  672. height: 80rpx;
  673. border-radius: 10rpx;
  674. border: 1rpx solid #E0E0E0;
  675. display: flex;
  676. justify-content: flex-start;
  677. align-items: center;
  678. >view{
  679. flex:1;
  680. line-height:80rpx;
  681. font-size: 30rpx;
  682. font-family: PingFang SC-Medium, PingFang SC;
  683. font-weight: 400;
  684. color: #333333;
  685. line-height: 80rpx;
  686. white-space: nowrap;
  687. overflow: hidden;
  688. text-overflow: ellipsis;
  689. }
  690. >img{
  691. width: 14rpx;
  692. height: 8rpx;
  693. margin-right: 30rpx;
  694. }
  695. }
  696. /* 实验室 */
  697. .lab_r{
  698. width: 486rpx;
  699. height: 80rpx;
  700. display: flex;
  701. justify-content: flex-start;
  702. .picker-text{
  703. width: 438rpx;
  704. height: 80rpx;
  705. }
  706. .img-box{
  707. width: 48rpx;
  708. >img{
  709. width:30rpx;
  710. height:28rpx;
  711. margin:26rpx 18rpx 0 0;
  712. }
  713. }
  714. }
  715. /* 楼栋 */
  716. .building_r{
  717. width: 486rpx;
  718. height: 80rpx;
  719. >input{
  720. height: 80rpx;
  721. font-size: 30rpx;
  722. font-family: PingFang SC-Medium, PingFang SC;
  723. font-weight: 400;
  724. color: #333333;
  725. line-height: 80rpx;
  726. }
  727. }
  728. }
  729. .period{
  730. display: flex;
  731. justify-content: flex-start;
  732. align-items: center;
  733. margin-bottom: 24rpx;
  734. .period_l{
  735. width: 146rpx;
  736. font-size: 30rpx;
  737. font-family: PingFang SC-Medium, PingFang SC;
  738. font-weight: 400;
  739. color: #333333;
  740. line-height: 42rpx;
  741. text-align: left;
  742. }
  743. .period_r{
  744. width: 490rpx;
  745. height: 80rpx;
  746. border-radius: 10rpx;
  747. border: 1rpx solid #E0E0E0;
  748. display: flex;
  749. justify-content: flex-start;
  750. align-items: center;
  751. .picker-text{
  752. font-size: 30rpx;
  753. font-family: PingFang SC-Medium, PingFang SC;
  754. font-weight: 400;
  755. color: #333;
  756. line-height: 80rpx;
  757. width: 230rpx;
  758. text-align: center;
  759. }
  760. .picker-text2{
  761. font-size: 30rpx;
  762. font-family: PingFang SC-Medium, PingFang SC;
  763. font-weight: 400;
  764. color: #333;
  765. line-height: 80rpx;
  766. width: 230rpx;
  767. text-align: center;
  768. }
  769. }
  770. }
  771. .custom{
  772. width: 150rpx;
  773. height: 60rpx;
  774. border-radius: 10rpx 10rpx 10rpx 10rpx;
  775. opacity: 1;
  776. border: 1rpx solid #0183FA;
  777. font-size: 26rpx;
  778. font-family: PingFang SC-Medium, PingFang SC;
  779. font-weight: 400;
  780. color: #0183FA;
  781. line-height: 60rpx;
  782. text-align: center;
  783. float: right;
  784. }
  785. }
  786. .attachment{
  787. width: 690rpx;
  788. background: #FFFFFF;
  789. border-radius: 20rpx;
  790. margin: 20rpx 30rpx 0;
  791. padding-bottom: 32rpx;
  792. box-sizing: border-box;
  793. .attachment_t{
  794. border-bottom: 1rpx solid #D8D8D8;
  795. >text:nth-of-type(1){
  796. font-size: 30rpx;
  797. font-family: PingFang SC-Medium, PingFang SC;
  798. font-weight: 400;
  799. color: #333333;
  800. line-height: 110rpx;
  801. margin-left: 28rpx;
  802. }
  803. >text:nth-of-type(2){
  804. font-size: 30rpx;
  805. font-family: PingFang SC-Medium, PingFang SC;
  806. font-weight: 400;
  807. color: #999999;
  808. line-height: 110rpx;
  809. margin-left: 24rpx;
  810. }
  811. }
  812. .attachment_li{
  813. height: 40rpx;
  814. display: flex;
  815. justify-content: flex-start;
  816. align-items: center;
  817. margin-top: 32rpx;
  818. >img{
  819. width: 30rpx;
  820. height: 26rpx;
  821. margin-right: 20rpx;
  822. margin-left: 50rpx;
  823. }
  824. >text{
  825. flex: 1;
  826. font-size: 28rpx;
  827. font-family: PingFang SC-Medium, PingFang SC;
  828. font-weight: 400;
  829. color: #0183FA;
  830. line-height: 40rpx;
  831. white-space: nowrap;
  832. overflow: hidden;
  833. text-overflow: ellipsis;
  834. }
  835. .attachment_li_del{
  836. width: 30rpx;
  837. height: 30rpx;
  838. }
  839. }
  840. }
  841. .inspect{
  842. margin: 20rpx 30rpx 0;
  843. width: 690rpx;
  844. height: auto;
  845. background: #FFFFFF;
  846. border-radius: 20rpx;
  847. padding: 40rpx 28rpx 20rpx;
  848. box-sizing: border-box;
  849. .inspect_li{
  850. display: flex;
  851. justify-content: flex-start;
  852. margin-bottom: 24rpx;
  853. .inspect_li_l{
  854. width: 146rpx;
  855. text-align: left;
  856. font-size: 30rpx;
  857. font-family: PingFang SC-Medium, PingFang SC;
  858. font-weight: 400;
  859. color: #333333;
  860. line-height: 80rpx;
  861. }
  862. .inspect_li_r{
  863. width: 486rpx;
  864. height: 80rpx;
  865. border-radius: 10rpx;
  866. opacity: 1;
  867. border: 1rpx solid #E0E0E0;
  868. padding-left: 20rpx;
  869. box-sizing: border-box;
  870. }
  871. .college_r{
  872. width: 486rpx;
  873. height: 80rpx;
  874. border-radius: 10rpx;
  875. border: 1rpx solid #E0E0E0;
  876. display: flex;
  877. justify-content: flex-start;
  878. align-items: center;
  879. >view{
  880. flex:1;
  881. line-height:80rpx;
  882. font-size: 30rpx;
  883. font-family: PingFang SC-Medium, PingFang SC;
  884. font-weight: 400;
  885. color: #333333;
  886. line-height: 80rpx;
  887. }
  888. >img{
  889. width: 14rpx;
  890. height: 8rpx;
  891. margin-right: 30rpx;
  892. }
  893. }
  894. /* 整改日期 */
  895. .date_r{
  896. width: 486rpx;
  897. height: 80rpx;
  898. display: flex;
  899. justify-content: flex-start;
  900. .picker-text{
  901. width: 438rpx;
  902. height: 80rpx;
  903. }
  904. >img{
  905. width:30rpx;
  906. height:28rpx;
  907. margin:16rpx 18rpx 0 0;
  908. }
  909. }
  910. /* 整改通知 */
  911. .inform_r{
  912. width: 486rpx;
  913. height: 80rpx;
  914. padding-left: 20rpx;
  915. box-sizing: border-box;
  916. display: flex;
  917. justify-content: flex-start;
  918. align-items: center;
  919. >view{
  920. display: flex;
  921. justify-content: flex-start;
  922. align-items: center;
  923. margin-right: 24rpx;
  924. .inform_r_l{
  925. display: inline-block;
  926. width: 30rpx;
  927. height: 30rpx;
  928. border-radius: 50%;
  929. border: 1rpx solid #E0E0E0;
  930. margin-right: 14rpx;
  931. }
  932. .inform_r_r{
  933. font-size: 30rpx;
  934. font-family: PingFang SC-Medium, PingFang SC;
  935. font-weight: 400;
  936. color: #333333;
  937. line-height: 80rpx;
  938. }
  939. .checked{
  940. display: inline-block;
  941. width: 30rpx;
  942. height: 30rpx;
  943. border-radius: 50%;
  944. border: 1rpx solid #0183FA;
  945. margin-right: 14rpx;
  946. position: relative;
  947. }
  948. .checked::after{
  949. content: '';
  950. position: absolute;
  951. top: 5rpx;
  952. left:5rpx;
  953. width: 20rpx;
  954. height: 20rpx;
  955. border-radius: 50%;
  956. background: #0183FA;
  957. }
  958. }
  959. }
  960. }
  961. }
  962. .popup-max-box{
  963. z-index:10;
  964. height:100%;
  965. width:100%;
  966. position fixed;
  967. background rgba(0,0,0,0.2)
  968. display flex;
  969. flex-direction column
  970. .popup-null{
  971. flex:1;
  972. }
  973. .popup-big-box{
  974. border-top-left-radius:20rpx;
  975. border-top-right-radius:20rpx;
  976. background #fff
  977. .popup-input-box{
  978. padding:30rpx 20rpx;
  979. display:flex;
  980. input{
  981. flex:1;
  982. height:70rpx;
  983. border:1rpx solid #e0e0e0;
  984. border-radius:10rpx;
  985. margin-right:20rpx;
  986. padding:0 20rpx;
  987. }
  988. view{
  989. background #0183FA
  990. color:#fff;
  991. border-radius:10rpx;
  992. width:140rpx;
  993. line-height:70rpx;
  994. text-align center;
  995. font-size:28rpx;
  996. }
  997. }
  998. .popup-for-max-box{
  999. margin:0 20rpx 30rpx;
  1000. height:600rpx;
  1001. overflow-y scroll;
  1002. .popup-for-null{
  1003. line-height:100rpx;
  1004. text-align center
  1005. color:#999;
  1006. }
  1007. .popup-for-box{
  1008. display:flex;
  1009. padding:10px 0;
  1010. .name-p{
  1011. flex:1;
  1012. line-height:60rpx;
  1013. }
  1014. .button-p{
  1015. background #0183FA
  1016. color:#fff;
  1017. text-align center
  1018. width:100rpx;
  1019. line-height:60rpx;
  1020. height:60rpx;
  1021. border-radius:10rpx;
  1022. }
  1023. }
  1024. }
  1025. }
  1026. }
  1027. /* 计划标题 */
  1028. .inspect_name{
  1029. .popup-content{
  1030. width: 750rpx;
  1031. height: 350rpx;
  1032. background: #FFFFFF;
  1033. border-radius: 10rpx 10rpx 0px 0px;
  1034. padding :0 50rpx;
  1035. box-sizing :border-box;
  1036. overflow :hidden;
  1037. .inspect_name_t{
  1038. margin-top:66rpx;
  1039. padding: 0 30rpx;
  1040. box-sizing: border-box;
  1041. >input{
  1042. width:100%;
  1043. height:80rpx;
  1044. border: 2rpx solid #E0E0E0;
  1045. color:#A2A2A2;
  1046. font-size:28rpx;
  1047. line-height 80rpx
  1048. border-radius:10rpx;
  1049. padding: 0 20rpx;
  1050. box-sizing: border-box;
  1051. }
  1052. }
  1053. .inspect_name_b{
  1054. margin-top :64rpx;
  1055. display: flex;
  1056. justify-content: center;
  1057. >text:nth-of-type(1){
  1058. width: 160rpx;
  1059. height: 60rpx;
  1060. border-radius: 40rpx;
  1061. font-size: 30rpx;
  1062. font-family: PingFang SC;
  1063. font-weight: 500;
  1064. color: #333333;
  1065. line-height: 60rpx;
  1066. text-align :center;
  1067. margin-right: 120rpx;
  1068. border: 2rpx solid #e0e0e0;
  1069. }
  1070. >text:nth-of-type(2){
  1071. width: 160rpx;
  1072. height: 60rpx;
  1073. background: linear-gradient(-35deg, #309CFF, #0183FA);
  1074. border-radius: 40rpx;
  1075. font-size: 30rpx;
  1076. font-family: PingFang SC;
  1077. font-weight: 500;
  1078. color: #FFFFFF;
  1079. line-height: 60rpx;
  1080. text-align :center;
  1081. }
  1082. }
  1083. }
  1084. }
  1085. .bottom_btn{
  1086. position: fixed;
  1087. bottom: 26rpx;
  1088. left: 30rpx;
  1089. font-size: 30rpx;
  1090. font-family: PingFang SC-Medium, PingFang SC;
  1091. font-weight: 400;
  1092. color: #FFFFFF;
  1093. line-height: 90rpx;
  1094. width: 690rpx;
  1095. height: 90rpx;
  1096. background: #0183FA;
  1097. border-radius: 20rpx;
  1098. text-align: center;
  1099. }
  1100. }
  1101. </style>