inspectList.vue 33 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294
  1. <!-- 检查和自查列表 -->
  2. <template>
  3. <view class="snapshotList">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="title" @click="planClick()">
  6. <view class="title-l">
  7. <view class="title-l-t">{{optionData.planTitle}}</view>
  8. <view class="title-l-b">
  9. <view v-if="optionData.checkCategory">
  10. {{optionData.checkCategory==1?'校院巡查':(optionData.checkCategory==2?'学院自查':'')}}
  11. </view>
  12. <view v-if="optionData.checkTypeName">{{optionData.checkTypeName}}</view>
  13. <view v-if="optionData.crossCheck==1">交叉互检</view>
  14. </view>
  15. </view>
  16. <img class="title-r" :src="imagesUrl('commonality/icon_wd_gd@1x.png')">
  17. </view>
  18. <view class="tabTitleTow">
  19. <view :class="tabIndexTow==index?'tab-C':'tab-D'" v-for="(item,index) in tabListTow"
  20. @click="tabClickTow(index)">{{item}}</view>
  21. </view>
  22. <view>
  23. <view class="dept-max-bix-box">
  24. <div class="dept-check-box">
  25. <picker class="dept-picker" @change="deptChange" :value="deptData.index" :range="deptData.list" range-key="deptName">
  26. <view>
  27. <view class="dept-check-min-box" :class="deptData.name?'check-dept':'no-check-dept'">
  28. {{deptData.name?deptData.name:'选择二级单位'}}
  29. </view>
  30. </view>
  31. </picker>
  32. <view class="triangle"></view>
  33. </div>
  34. <view class="level-r" v-if="tabIndexTow == 0">
  35. <view :class="manageStatus == 0 ?'level-r-B':'level-r-A'" @click="checkFlagChange(0)">未检查</view>
  36. <view :class="manageStatus == 1 ?'level-r-B':'level-r-A'" @click="checkFlagChange(1)">检查中</view>
  37. <view :class="manageStatus == 2 ?'level-r-B':'level-r-A'" @click="checkFlagChange(2)">已检查</view>
  38. </view>
  39. </view>
  40. <view class="level" v-if="tabIndexTow != 1">
  41. <view class="level-li"
  42. :style="levelId==item.levelId?'border:1rpx solid '+item.levelColor+';background:'+item.levelColorTow+';':'levelColor-B'"
  43. @click="levelClick(item.levelId)" v-for="(item,index) in levelList">{{item.levelName}}</view>
  44. </view>
  45. <view class="uni-data-picker-box" v-if="tabIndexTow == 1">
  46. <uni-data-picker
  47. placeholder="请选择楼栋/楼层" v-model="classes"
  48. @change="bindPickerChange" :localdata="dataListTow" ref='picker'>
  49. </uni-data-picker>
  50. </view>
  51. <!-- 搜索 -->
  52. <view class="header">
  53. <view class="search">
  54. <view class="search-r">
  55. <img :src="imagesUrl('commonality/icon_aqjc_ss.png')" @click="searchBtn">
  56. <input type="text" v-model="searchValue" placeholder="实验室名称或房间号" name="search"
  57. @confirm='searchBtn' confirm-type='search' maxlength="50"
  58. placeholder-style="color: #333333;font-size:24rpx;">
  59. <!-- <view v-if="searchValue" class="left-icons" @click="delSearchValue()">
  60. <uni-icons color="#0183FA" type="clear" size="20"></uni-icons>
  61. </view> -->
  62. </view>
  63. <view class="cancel" @click="cancelBtn()">重置</view>
  64. </view>
  65. </view>
  66. <!-- <view class="srearch">
  67. <view class="srearch-n" @click="srearchClick()">
  68. <view class="srearch-l">
  69. <img :src="imagesUrl('commonality/icon_aqjc_ss.png')">
  70. </view>
  71. <input class="srearch-c" type="text" v-model="searchValue" placeholder="实验室名称或房间号"/>
  72. </view>
  73. </view> -->
  74. </view>
  75. <view class="list">
  76. <view class="list-li" @click="listClick(item)" v-for="(item,index) in dataList">
  77. <view class="list-li-t">
  78. <img class="list-li-t-l" :src="imagesUrl('commonality/icon_aqjc_shiyanshi.png')">
  79. <view class="list-li-t-c">{{item.subName}}</view>
  80. <view class="list-li-t-r"
  81. :style="'border:1rpx solid '+item.classLevelColor+';background:'+item.classLevelColorTow+';'">
  82. <text
  83. :style="'border-right:1rpx solid '+item.classLevelColor+';color:'+item.classLevelColor+';'">{{item.classLevelName?item.classLevelName:''}}</text>
  84. <text
  85. :style="'color:'+item.classLevelColor+';'">{{item.classTypeNames?item.classTypeNames:''}}</text>
  86. </view>
  87. </view>
  88. <view class="list-li-b">
  89. <view class="list-li-b-t">
  90. <img :src="imagesUrl('commonality/icon_sy_zc@1x.png')">
  91. {{tabIndexTow==0?(item.roomNum?item.roomNum:'-'):(item.subRoom?item.subRoom:'-')}}房间&{{item.buildName?item.buildName:''}}
  92. </view>
  93. <view class="list-li-b-b">
  94. <view class="list-li-b-b-l">
  95. <img :src="imagesUrl('commonality/icon_sy_zc@1x.png')">
  96. {{item.deptName}}
  97. </view>
  98. <view :class="item.manageStatus==0?'notFinished':(item.manageStatus==1?'finished-b':(item.manageStatus==2?'finished':''))" v-if="tabIndexTow==0">
  99. {{item.manageStatus==0?'未检查':(item.manageStatus==1?'检查中':(item.manageStatus==2?'已检查':''))}}
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
  105. </view>
  106. <img v-if="tabIndexTow==0" class="saoCode" @click="saoCode()"
  107. :src="imagesUrl('safetyCheck/icon_aqjc_saoma.png')">
  108. </scroll-view>
  109. <scanCodeCheck v-if="securityCheck" :subjectData="subjectData"></scanCodeCheck>
  110. </view>
  111. </template>
  112. <script>
  113. import {
  114. config
  115. } from '@/api/request/config.js'
  116. import {
  117. systemDeptDropList,
  118. } from '@/pages/api/index.js'
  119. import {
  120. laboratorySubRelInfoGetRelList,
  121. laboratoryLevelConfigGetWebLevelTitleList,
  122. securityAppCheckManageList,
  123. securityAppCheckDangerGetCheckDangerSubList,
  124. securityAppCheckDangerReviewSubList,
  125. securityAppCheckSetOptionList,
  126. } from '@/pages_safetyCheck/api/index.js'
  127. import {
  128. scanCodeCheck
  129. } from '@/pages_safetyCheck/views/scanCodeCheck.vue'
  130. export default {
  131. name: "snapshotList",
  132. components: {
  133. scanCodeCheck,
  134. },
  135. data() {
  136. return {
  137. baseUrl: config.base_url,
  138. pageType: 0,
  139. userType: 1,
  140. tabListTow: ['检查任务', '复查验证', '隐患整改'],
  141. tabIndexTow: 0,
  142. //学院选择
  143. deptData: {
  144. index: null,
  145. list: [],
  146. id: null,
  147. name: null
  148. },
  149. deptIndex: null,
  150. deptList: [],
  151. //弹层实验室数据
  152. popupType: false,
  153. roomList: [],
  154. //级别
  155. levelList: [],
  156. levelId: null,
  157. optionData: null,
  158. //实验室/房间号
  159. searchValue: '',
  160. subId: '',
  161. planSetId: null,
  162. // 查询参数
  163. queryParams: {
  164. page: 1,
  165. pageSize: 20,
  166. },
  167. dataList: [],
  168. total: 0,
  169. getDataType: false,
  170. manageStatus: null,
  171. securityCheck:false,
  172. subjectData: {},
  173. //楼栋楼层数据
  174. dataListTow: [],
  175. //楼栋楼层绑定数据
  176. classes:[],
  177. //楼栋楼层ID
  178. buildingId:'',
  179. floorId:'',
  180. }
  181. },
  182. onLoad(option) {
  183. let optionData = JSON.parse(decodeURIComponent(option.infoData))
  184. uni.setNavigationBarTitle({
  185. title: optionData.checkPlanSetVoList.checkName
  186. })
  187. this.$set(this, 'tabListTow',
  188. optionData.checkCategory == 1 ? ['检查任务', '复查验证', '隐患整改'] :
  189. (optionData.checkCategory == 2 ? ['自查任务', '复查验证', '隐患整改'] : [])
  190. )
  191. this.$set(this, 'optionData', optionData);
  192. this.$set(this, 'planSetId', optionData.checkPlanSetVoList.planSetId);
  193. },
  194. created() {
  195. this.systemDeptDropList();
  196. this.laboratoryLevelConfigGetWebLevelTitleList();
  197. },
  198. mounted() {
  199. let self = this;
  200. setTimeout(() => {
  201. self.getList();
  202. }, 100);
  203. },
  204. methods: {
  205. //楼栋楼层选择
  206. bindPickerChange: function(e) {
  207. console.log('e',e.detail.value)
  208. let self = this;
  209. if(!e.detail.value[0]){
  210. //清除
  211. this.$set(this,'buildingId','');
  212. this.$set(this,'floorId','');
  213. }else{
  214. //选中
  215. this.$set(this,'buildingId',e.detail.value[0].value);
  216. this.$set(this,'floorId',e.detail.value[1].value);
  217. }
  218. this.$set(this.queryParams, 'page', 1);
  219. this.getList();
  220. },
  221. //实验室搜索
  222. searchBtn() {
  223. this.$set(this.queryParams, 'page', 1);
  224. this.$set(this, 'dataList', []);
  225. this.$set(this, 'total', 0);
  226. this.$nextTick(() => {
  227. this.getList();
  228. })
  229. },
  230. //滚动事件
  231. scrollGet() {
  232. let self = this;
  233. if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
  234. this.$set(this, 'getDataType', true);
  235. } else {
  236. this.queryParams.page += 1;
  237. this.$nextTick(() => {
  238. this.getList();
  239. })
  240. }
  241. },
  242. //级别切换
  243. levelClick(id) {
  244. if (this.levelId == id) {
  245. this.$set(this, 'levelId', null);
  246. } else {
  247. this.$set(this, 'levelId', id);
  248. }
  249. this.$set(this, 'getDataType', false);
  250. this.$set(this.queryParams, 'page', 1);
  251. this.getList();
  252. },
  253. //符合/不符合
  254. checkFlagChange(type) {
  255. if (this.manageStatus == type) {
  256. this.$set(this, 'manageStatus', null);
  257. } else {
  258. this.$set(this, 'manageStatus', type);
  259. }
  260. this.$set(this.queryParams, 'page', 1);
  261. this.getList()
  262. },
  263. //查询类型切换
  264. tabClickTow(index) {
  265. this.$set(this.queryParams, 'page', 1);
  266. this.$set(this, 'deptData', {
  267. index: null,
  268. list: this.deptData.list,
  269. id: null,
  270. name: null
  271. });
  272. this.$set(this, 'searchValue', '');
  273. this.$set(this, 'levelId', null);
  274. this.$set(this, 'getDataType', false);
  275. this.$set(this, 'dataList', []);
  276. this.$set(this, 'total', 0);
  277. this.$set(this, 'classes', []);
  278. this.$set(this, 'buildingId', '');
  279. this.$set(this, 'floorId', '');
  280. this.$set(this, 'tabIndexTow', index);
  281. this.$nextTick(() => {
  282. this.getList();
  283. })
  284. },
  285. //重置按钮
  286. cancelBtn(){
  287. this.$set(this.queryParams, 'page', 1);
  288. this.$set(this, 'deptData', {
  289. index: null,
  290. list: this.deptData.list,
  291. id: null,
  292. name: null
  293. });
  294. this.$set(this, 'searchValue', '');
  295. this.$set(this, 'levelId', null);
  296. this.$set(this, 'getDataType', false);
  297. this.$set(this, 'dataList', []);
  298. this.$set(this, 'total', 0);
  299. this.$set(this, 'classes', []);
  300. this.$set(this, 'buildingId', '');
  301. this.$set(this, 'floorId', '');
  302. this.$nextTick(() => {
  303. this.getList();
  304. })
  305. },
  306. //实验室搜索框跳转
  307. srearchClick() {
  308. let infoData = this.optionData;
  309. infoData.pageType = this.tabIndexTow;
  310. infoData.laboratoryStatus = this.tabIndexTow;
  311. infoData.tabIndexTow = this.tabIndexTow;
  312. uni.navigateTo({
  313. url: '/pages_safetyCheck/views/snapshotManage/laboratorySearch?form=' + encodeURIComponent(
  314. JSON.stringify(infoData))
  315. });
  316. },
  317. //计划详情
  318. planClick() {
  319. let infoData = {
  320. planId: this.optionData.planId
  321. };
  322. uni.navigateTo({
  323. url: '/pages_safetyCheck/views/planDetail?infoData=' + encodeURIComponent(JSON.stringify(
  324. infoData))
  325. });
  326. },
  327. //实验室列表数据选择
  328. listClick(row) {
  329. let infoData = row;
  330. infoData.pageType = this.tabIndexTow;
  331. infoData.planTitle = this.optionData.planTitle;
  332. infoData.checkCategory = this.optionData.checkCategory;
  333. infoData.checkTypeName = this.optionData.checkTypeName;
  334. infoData.crossCheck = this.optionData.crossCheck;
  335. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  336. uni.navigateTo({
  337. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' + encodeURIComponent(
  338. JSON.stringify(infoData))
  339. });
  340. },
  341. //搜索房间接口
  342. async buildBySub() {
  343. let self = this;
  344. const {
  345. data
  346. } = await laboratorySubRelInfoGetRelList({
  347. 'searchValue': this.form.searchValue,
  348. });
  349. if (data.code == 200) {
  350. if (data.data[0]) {
  351. this.roomList = data.data;
  352. } else {
  353. uni.showToast({
  354. title: '未找到相关实验室',
  355. icon: "none",
  356. mask: true,
  357. duration: 2000
  358. });
  359. }
  360. }
  361. },
  362. //查询检查项
  363. async securityAppCheckSetOptionList(item) {
  364. let self = this;
  365. let upData = item;
  366. let obj = {
  367. page: 1,
  368. pageSize: 20,
  369. checkStatus: '0',
  370. manageId: upData.manageId,
  371. }
  372. const {
  373. data
  374. } = await securityAppCheckSetOptionList(obj);
  375. if (data.code == 200) {
  376. if (data.data.records[0]) {
  377. let infoData = self.optionData;
  378. infoData.pageType = self.tabIndexTow;;
  379. infoData.itemsStatus = 0;
  380. infoData.subName = upData.subName;
  381. infoData.roomNum = upData.roomNum;
  382. infoData.subId = data.data.records[0].subId;
  383. infoData.manageId = data.data.records[0].manageId;
  384. infoData.setOptionId = data.data.records[0].setOptionId;
  385. infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
  386. uni.navigateTo({
  387. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  388. encodeURIComponent(
  389. JSON
  390. .stringify(infoData))
  391. });
  392. } else {
  393. self.dialogStatus = 0;
  394. self.dialogVisible = false;
  395. uni.showToast({
  396. title: '该实验室暂无检查项!',
  397. icon: "none",
  398. mask: true,
  399. duration: 2000
  400. });
  401. return
  402. }
  403. }
  404. },
  405. /******调用摄像头******/
  406. /******调用摄像头******/
  407. saoCode() {
  408. let self = this;
  409. uni.scanCode({
  410. onlyFromCamera: true,
  411. success: function(res) {
  412. let list = res.result.split("?")[1].split("&");
  413. let codeData = {};
  414. list.forEach((item) => {
  415. codeData[item.split("=")[0]] = item.split("=")[1];
  416. })
  417. if (codeData.code) {
  418. self.$set(self.subjectData, 'subId', codeData.subId);
  419. self.$set(self.subjectData, 'planSetId', self.planSetId);
  420. self.$set(self, "securityCheck", true)
  421. } else {
  422. uni.showToast({
  423. title: '请扫描正确的二维码',
  424. icon: "none",
  425. mask: true,
  426. duration: 2000
  427. });
  428. }
  429. }
  430. });
  431. },
  432. //扫一扫查询数据
  433. async saoList(subId) {
  434. let obj = {
  435. planSetId: this.planSetId,
  436. subId: subId,
  437. }
  438. if (this.tabIndexTow == 0) {
  439. //检查计划
  440. const {
  441. data
  442. } = await securityAppCheckManageList(obj);
  443. if (data.code == 200) {
  444. if (data.data.records[0]) {
  445. this.securityAppCheckSetOptionListTow(data.data.records[0], 0)
  446. //跳转检查项列表页面
  447. /* let infoData = data.data.records[0];
  448. infoData.pageType = this.tabIndexTow;
  449. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  450. uni.navigateTo({
  451. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  452. encodeURIComponent(
  453. JSON.stringify(infoData))
  454. }); */
  455. } else {
  456. //未找到数据提示
  457. uni.showToast({
  458. title: '未找到该实验室与本计划批次关联的数据',
  459. icon: "none",
  460. mask: true,
  461. duration: 2000
  462. });
  463. }
  464. }
  465. } else if (this.tabIndexTow == 1) {
  466. //复查计划
  467. obj.planId = this.optionData.planId;
  468. const {
  469. data
  470. } = await securityAppCheckDangerReviewSubList(obj);
  471. if (data.code == 200) {
  472. if (data.data[0] && data.data[0].stayExamineCheckNum != 0) {
  473. //跳转检查项列表页面
  474. let infoData = data.data[0];
  475. infoData.pageType = this.tabIndexTow;
  476. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  477. uni.navigateTo({
  478. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  479. encodeURIComponent(
  480. JSON.stringify(infoData))
  481. });
  482. } else {
  483. //未找到数据提示
  484. uni.showToast({
  485. title: '未找到该实验室与本计划批次关联的数据',
  486. icon: "none",
  487. mask: true,
  488. duration: 2000
  489. });
  490. }
  491. }
  492. } else if (this.tabIndexTow == 2) {
  493. //整改计划
  494. obj.planId = this.optionData.planId;
  495. obj.userId = uni.getStorageSync('userId');
  496. const {
  497. data
  498. } = await securityAppCheckDangerGetCheckDangerSubList(obj);
  499. if (data.code == 200) {
  500. if (data.data[0]) {
  501. //跳转检查项列表页面
  502. let infoData = data.data[0];
  503. infoData.pageType = this.tabIndexTow;
  504. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  505. uni.navigateTo({
  506. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  507. encodeURIComponent(
  508. JSON.stringify(infoData))
  509. });
  510. } else {
  511. //未找到数据提示
  512. uni.showToast({
  513. title: '未找到该实验室与本计划批次关联的数据',
  514. icon: "none",
  515. mask: true,
  516. duration: 2000
  517. });
  518. }
  519. }
  520. }
  521. },
  522. async securityAppCheckSetOptionListTow(item, checkStatus) {
  523. let self = this;
  524. let upData = item;
  525. let obj = {
  526. page: 1,
  527. pageSize: 20,
  528. checkStatus: checkStatus,
  529. manageId: upData.manageId,
  530. }
  531. this.inspectRemporaryList = [];
  532. const {
  533. data
  534. } = await securityAppCheckSetOptionList(obj);
  535. if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
  536. if (data.data.records[0]) {
  537. let infoData = self.optionData;
  538. infoData.pageType = 0;
  539. infoData.subName = upData.subName;
  540. infoData.roomNum = upData.roomNum;
  541. infoData.subId = data.data.records[0].subId;
  542. infoData.manageId = data.data.records[0].manageId;
  543. infoData.setOptionId = data.data.records[0].setOptionId;
  544. infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
  545. infoData.checkCategory = data.data.records[0].checkCategory;
  546. uni.navigateTo({
  547. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  548. encodeURIComponent(
  549. JSON
  550. .stringify(infoData))
  551. });
  552. } else {
  553. uni.showToast({
  554. title: '该实验室暂无检查工作!',
  555. icon: "none",
  556. mask: true,
  557. duration: 2000
  558. });
  559. }
  560. }
  561. },
  562. //学院选择
  563. deptChange(e) {
  564. let self = this;
  565. self.deptData.list.forEach(function(item, index) {
  566. if (index == e.detail.value) {
  567. if (!item.deptId) {
  568. self.$set(self.deptData, 'id', null)
  569. self.$set(self.deptData, 'name', null)
  570. } else {
  571. self.$set(self.deptData, 'id', item.deptId)
  572. self.$set(self.deptData, 'name', item.deptName)
  573. }
  574. }
  575. })
  576. this.$set(this, 'getDataType', false);
  577. this.$set(this.queryParams, 'page', 1);
  578. this.getList();
  579. },
  580. //获取院系
  581. async systemDeptDropList() {
  582. const {
  583. data
  584. } = await systemDeptDropList({
  585. deptName: '',
  586. level: 2,
  587. deptType: 1
  588. });
  589. if (data.code == 200) {
  590. data.data.unshift({
  591. deptid: null,
  592. deptName: '全部'
  593. })
  594. this.$set(this.deptData, 'list', data.data);
  595. }
  596. },
  597. //获取分级
  598. async laboratoryLevelConfigGetWebLevelTitleList() {
  599. let self = this;
  600. const {
  601. data
  602. } = await laboratoryLevelConfigGetWebLevelTitleList({});
  603. if (data.code == 200) {
  604. data.data.forEach(function(item) {
  605. item.levelName = item.levelName.split('/')[0]
  606. if (item.levelColor) {
  607. item.levelColorTow = self.hexToRgb(item.levelColor, 0.2)
  608. }
  609. })
  610. this.$set(this, 'levelList', data.data);
  611. }
  612. },
  613. //回车触发
  614. carriageReturnRequest() {
  615. this.$set(this, 'getDataType', false);
  616. this.$set(this.queryParams, 'page', 1);
  617. this.getList();
  618. },
  619. //清除输入框内容
  620. delSearchValue() {
  621. if (this.searchValue) {
  622. this.$set(this, 'searchValue', '');
  623. this.$set(this, 'dataList', []);
  624. this.$nextTick(() => {
  625. this.getList();
  626. })
  627. }
  628. },
  629. //检查任务
  630. async getList() {
  631. let self = this;
  632. let obj = JSON.parse(JSON.stringify(this.queryParams));
  633. obj.planSetId = this.planSetId;
  634. obj.deptId = this.deptData.id ? this.deptData.id : '';
  635. obj.searchValue = this.searchValue ? this.searchValue : '';
  636. obj.levelId = this.levelId ? this.levelId : '';
  637. if (this.manageStatus == 0 || this.manageStatus == 1 || this.manageStatus == 2) {
  638. obj.manageStatus = this.manageStatus;
  639. } else {
  640. obj.manageStatus = '';
  641. }
  642. if (this.tabIndexTow == 0) {
  643. //检查计划
  644. const {
  645. data
  646. } = await securityAppCheckManageList(obj);
  647. if (data.code == 200) {
  648. data.data.records.forEach(function(item) {
  649. if (item.classLevelColor) {
  650. item.classLevelColorTow = self.hexToRgb(item.classLevelColor, 0.2)
  651. }
  652. })
  653. if (self.queryParams.page == 1) {
  654. this.dataList = data.data.records;
  655. this.total = data.data.total;
  656. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  657. this.$set(this, 'getDataType', true);
  658. }
  659. } else {
  660. this.dataList = [...this.dataList, ...data.data.records]
  661. this.total = data.data.total;
  662. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  663. this.$set(this, 'getDataType', true);
  664. }
  665. }
  666. }
  667. } else if (this.tabIndexTow == 1) {
  668. //复查计划
  669. obj.planId = this.optionData.planId;
  670. obj.buildingId = this.buildingId;
  671. obj.floorId = this.floorId;
  672. const {
  673. data
  674. } = await securityAppCheckDangerReviewSubList(obj);
  675. if (data.code == 200) {
  676. this.dataList = data.data;
  677. this.$set(this, 'getDataType', true);
  678. // 后台接口暂时不支持分页
  679. // if (self.queryParams.page == 1) {
  680. // this.dataList = data.data.records;
  681. // this.total = data.data.total;
  682. // if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  683. // this.$set(this, 'getDataType', true);
  684. // }
  685. // } else {
  686. // this.dataList = [...this.dataList, ...data.data.records]
  687. // this.total = data.data.total;
  688. // if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  689. // this.$set(this, 'getDataType', true);
  690. // }
  691. // }
  692. }
  693. } else if (this.tabIndexTow == 2) {
  694. //整改计划
  695. obj.planId = this.optionData.planId;
  696. obj.userId = uni.getStorageSync('userId');
  697. const {
  698. data
  699. } = await securityAppCheckDangerGetCheckDangerSubList(obj);
  700. if (data.code == 200) {
  701. this.dataList = data.data;
  702. this.$set(this, 'getDataType', true);
  703. // 后台接口暂时不支持分页
  704. // if (self.queryParams.page == 1) {
  705. // this.dataList = data.data.records;
  706. // this.total = data.data.total;
  707. // if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  708. // this.$set(this, 'getDataType', true);
  709. // }
  710. // } else {
  711. // this.dataList = [...this.dataList, ...data.data.records]
  712. // this.total = data.data.total;
  713. // if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  714. // this.$set(this, 'getDataType', true);
  715. // }
  716. // }
  717. }
  718. }
  719. },
  720. //十六进制颜色值和RGB格式转换
  721. hexToRgb(hex, opacity = 1) {
  722. // 去除#号
  723. var color = hex.replace("#", "");
  724. // 分割成红、绿、蓝三部分的16进制字符串
  725. var red = parseInt(color.substring(0, 2), 16);
  726. var green = parseInt(color.substring(2, 4), 16);
  727. var blue = parseInt(color.substring(4, 6), 16);
  728. return `RGB(${red}, ${green}, ${blue},${opacity})`;
  729. },
  730. }
  731. }
  732. </script>
  733. <style lang="stylus" scoped>
  734. .snapshotList {
  735. height: 100%;
  736. display flex;
  737. overflow: hidden;
  738. .info-max-box {
  739. padding-top: 20rpx;
  740. }
  741. .title {
  742. width: 690rpx;
  743. margin: 0 30rpx 20rpx;
  744. height: 150rpx;
  745. background: #FFFFFF;
  746. border-radius: 20rpx 20rpx 20rpx 20rpx;
  747. display: flex;
  748. justify-content: space-between;
  749. align-items: center;
  750. padding: 0 30rpx;
  751. box-sizing: border-box;
  752. .title-l {
  753. width: 594rpx;
  754. .title-l-t {
  755. font-size: 30rpx;
  756. color: #333333;
  757. line-height: 42rpx;
  758. text-align: left;
  759. overflow: hidden;
  760. text-overflow: ellipsis;
  761. white-space: nowrap;
  762. }
  763. .title-l-b {
  764. display: flex;
  765. justify-content: flex-start;
  766. margin-top: 16rpx;
  767. >view {
  768. width: 130rpx;
  769. height: 50rpx;
  770. background: rgba(1, 131, 250, 0.2);
  771. border-radius: 6rpx 6rpx 6rpx 6rpx;
  772. font-size: 24rpx;
  773. color: #0183FA;
  774. line-height: 50rpx;
  775. text-align: center;
  776. margin-right: 14rpx;
  777. }
  778. }
  779. }
  780. .title-r {
  781. width: 24rpx;
  782. height: 24rpx;
  783. }
  784. }
  785. .tabTitleTow {
  786. width: 690rpx;
  787. height: 80rpx;
  788. display: flex;
  789. justify-content: center;
  790. margin: 20rpx 0 0 30rpx;
  791. >view:nth-of-type(1) {
  792. width: 230rpx;
  793. height: 80rpx;
  794. border-radius: 50rpx 0rpx 0rpx 50rpx;
  795. }
  796. >view:nth-of-type(2) {
  797. width: 230rpx;
  798. height: 80rpx;
  799. border-radius: 0rpx 0rpx 0rpx 0rpx;
  800. }
  801. >view:nth-of-type(3) {
  802. width: 230rpx;
  803. height: 80rpx;
  804. border-radius: 0rpx 50rpx 50rpx 0rpx;
  805. }
  806. .tab-C {
  807. font-size: 30rpx;
  808. color: #FFFFFF;
  809. line-height: 80rpx;
  810. text-align: center;
  811. background: #0183FA;
  812. }
  813. .tab-D {
  814. font-size: 30rpx;
  815. color: #333333;
  816. line-height: 80rpx;
  817. text-align: center;
  818. background: #FFFFFF;
  819. }
  820. }
  821. .header {
  822. width: 100%;
  823. z-index: 100;
  824. background: #fff;
  825. .search {
  826. width: 750rpx;
  827. height: 100rpx;
  828. background: #FFFFFF;
  829. border-radius: 0rpx 0rpx 0rpx 0rpx;
  830. display: flex;
  831. align-items: center;
  832. .search-r {
  833. margin-left:30rpx;
  834. width: 560rpx;
  835. height: 60rpx;
  836. background: #FFFFFF;
  837. border-radius: 50rpx 50rpx 50rpx 50rpx;
  838. border: 1rpx solid #E0E0E0;
  839. font-size: 24rpx;
  840. color: #999999;
  841. line-height: 60rpx;
  842. text-align: left;
  843. display: flex;
  844. justify-content: flex-start;
  845. align-items: center;
  846. padding: 0 20rpx;
  847. box-sizing: border-box;
  848. >img {
  849. width: 30rpx;
  850. height: 30rpx;
  851. margin-right: 20rpx;
  852. }
  853. >input {
  854. width: 500rpx;
  855. }
  856. }
  857. }
  858. .cancel {
  859. width:110rpx;
  860. height:60rpx;
  861. line-height:60rpx;
  862. font-size: 28rpx;
  863. color: #0183FA;
  864. text-align: center;
  865. margin-left: 18rpx;
  866. }
  867. }
  868. // .srearch {
  869. // width: 750rpx;
  870. // height: 100rpx;
  871. // background: #FFFFFF;
  872. // border-radius: 0rpx 0rpx 0rpx 0rpx;
  873. // overflow: hidden;
  874. // display: flex;
  875. // display: flex;
  876. // justify-content: space-between;
  877. // align-items: center;
  878. // padding: 0 30rpx;
  879. // box-sizing: border-box;
  880. // .college {
  881. // width: 200rpx;
  882. // height: 60rpx;
  883. // border-radius: 50rpx 50rpx 50rpx 50rpx;
  884. // border: 2rpx solid #E0E0E0;
  885. // font-size: 24rpx;
  886. // color: #333333;
  887. // line-height: 60rpx;
  888. // text-align: left;
  889. // display: flex;
  890. // justify-content: space-between;
  891. // align-items: center;
  892. // padding: 0 26rpx;
  893. // box-sizing: border-box;
  894. // overflow: hidden;
  895. // text-overflow: ellipsis;
  896. // white-space: nowrap;
  897. // >view {
  898. // width: 124rpx;
  899. // display: block;
  900. // overflow: hidden;
  901. // text-overflow: ellipsis;
  902. // white-space: nowrap;
  903. // }
  904. // >img {
  905. // display: block;
  906. // width: 24rpx;
  907. // height: 12rpx;
  908. // }
  909. // }
  910. // .srearch-n {
  911. // width: 690rpx;
  912. // height: 60rpx;
  913. // border-radius: 50rpx 50rpx 50rpx 50rpx;
  914. // border: 2rpx solid #E0E0E0;
  915. // display: flex;
  916. // justify-content: flex-start;
  917. // align-items: center;
  918. // .srearch-l {
  919. // width: 60rpx;
  920. // height: 60rpx;
  921. // >img {
  922. // width: 20rpx;
  923. // height: 20rpx;
  924. // margin: 20rpx 0 0 26rpx;
  925. // }
  926. // }
  927. // .srearch-c {
  928. // flex: 1;
  929. // height: 58rpx;
  930. // font-size: 24rpx;
  931. // color: #999999;
  932. // line-height: 30rpx;
  933. // text-align: left;
  934. // }
  935. // .srearch-r {
  936. // width: 90rpx;
  937. // height: 60rpx;
  938. // >img {
  939. // width: 30rpx;
  940. // height: 30rpx;
  941. // margin: 14rpx 22rpx 0 30rpx;
  942. // }
  943. // }
  944. // }
  945. // }
  946. .dept-max-bix-box{
  947. margin-top: 20rpx;
  948. width: 750rpx;
  949. height: 90rpx;
  950. background: #FFFFFF;
  951. display: flex;
  952. .dept-check-box{
  953. flex:1;
  954. line-height:60rpx;
  955. height:60rpx;
  956. margin:20rpx 20rpx 0 30rpx;
  957. border:1rpx solid #E0E0E0;
  958. border-radius: 50rpx;
  959. display: flex;
  960. .dept-picker{
  961. flex:1;
  962. .dept-check-min-box{
  963. font-size:24rpx;
  964. padding:0 30rpx;
  965. overflow: hidden;
  966. }
  967. .check-dept{
  968. color:#333;
  969. }
  970. .no-check-dept{
  971. color:#999;
  972. }
  973. }
  974. .triangle {
  975. margin:25rpx 20rpx 0 20rpx;
  976. width: 0;
  977. height: 0;
  978. border-left: 10rpx solid transparent;
  979. border-right: 10rpx solid transparent;
  980. border-top: 15rpx solid #999; /* 可以根据需要调整颜色 */
  981. }
  982. }
  983. .level-r {
  984. display: flex;
  985. justify-content: flex-start;
  986. align-items: center;
  987. margin: 18rpx 20rpx 0 0;
  988. .level-r-A {
  989. border-radius: 50rpx 50rpx 50rpx 50rpx;
  990. border: 1rpx solid #E0E0E0;
  991. width: 100rpx;
  992. height: 60rpx;
  993. background: #E0E0E0;
  994. font-weight: normal;
  995. font-size: 24rpx;
  996. color: #333333;
  997. line-height: 60rpx;
  998. text-align: center;
  999. margin-right: 10rpx;
  1000. }
  1001. .level-r-B {
  1002. border-radius: 50rpx 50rpx 50rpx 50rpx;
  1003. border: 1rpx solid #0183FA;
  1004. width: 100rpx;
  1005. height: 60rpx;
  1006. background: #0183FA;
  1007. font-weight: normal;
  1008. font-size: 24rpx;
  1009. color: #FFFFFF;
  1010. line-height: 60rpx;
  1011. text-align: center;
  1012. margin-right: 10rpx;
  1013. }
  1014. }
  1015. #levelColor-A {
  1016. background: rgba(255, 0, 0, 0.2);
  1017. color: #FF0000;
  1018. border: 1rpx solid #FF0000;
  1019. }
  1020. #levelColor-B {
  1021. background: #F5F5F5;
  1022. color: #333333;
  1023. border: 2rpx solid #E0E0E0;
  1024. }
  1025. }
  1026. .level {
  1027. width: 750rpx;
  1028. height: 70rpx;
  1029. background: #FFFFFF;
  1030. display: flex;
  1031. justify-content: flex-start;
  1032. padding: 15rpx 30rpx 0;
  1033. box-sizing: border-box;
  1034. .level-li {
  1035. width: 100rpx;
  1036. height: 50rpx;
  1037. background: #F5F5F5;
  1038. border-radius: 50rpx 50rpx 50rpx 50rpx;
  1039. border: 2rpx solid #E0E0E0;
  1040. margin-right: 10rpx;
  1041. font-size: 24rpx;
  1042. color: #333333;
  1043. line-height: 50rpx;
  1044. text-align: center;
  1045. }
  1046. }
  1047. .uni-data-picker-box{
  1048. background-color: #fff;
  1049. padding:10rpx 20rpx 0 30rpx;
  1050. /deep/.input-value-border{
  1051. border-radius:50rpx!important;
  1052. padding-right:12rpx!important;
  1053. }
  1054. /deep/.input-value{
  1055. font-size:24rpx!important;
  1056. line-height:60rpx!important;
  1057. }
  1058. /deep/.selected-area{
  1059. padding-left:18rpx!important;
  1060. }
  1061. /deep/.placeholder{
  1062. color:#999!important;
  1063. }
  1064. /deep/.icon-clear{
  1065. line-height:40rpx;
  1066. }
  1067. /deep/.uni-icons{
  1068. font-size:34rpx!important;
  1069. color:#999!important;
  1070. }
  1071. }
  1072. .list {
  1073. width: 750rpx;
  1074. padding: 0 30rpx;
  1075. box-sizing: border-box;
  1076. .list-li {
  1077. width: 690rpx;
  1078. min-height: 240rpx;
  1079. background: #FFFFFF;
  1080. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1081. padding: 0 30rpx;
  1082. box-sizing: border-box;
  1083. margin-top: 20rpx;
  1084. .list-li-t {
  1085. display: flex;
  1086. justify-content: flex-start;
  1087. align-items: center;
  1088. height: 90rpx;
  1089. border-bottom: 2rpx dashed #D8D8D8;
  1090. .list-li-t-l {
  1091. width: 40rpx;
  1092. height: 40rpx;
  1093. margin-right: 16rpx;
  1094. }
  1095. .list-li-t-c {
  1096. width: 264rpx;
  1097. font-size: 30rpx;
  1098. color: #333333;
  1099. line-height: 30rpx;
  1100. text-align: left;
  1101. overflow: hidden;
  1102. text-overflow: ellipsis;
  1103. white-space: nowrap;
  1104. margin-right: 24rpx;
  1105. }
  1106. .list-li-t-r {
  1107. display: flex;
  1108. justify-content: flex-start;
  1109. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1110. width: 200rpx;
  1111. height: 40rpx;
  1112. margin-left: 10rpx;
  1113. >text {
  1114. display: inline-block;
  1115. flex: 1;
  1116. text-align: center;
  1117. font-size: 24rpx;
  1118. line-height: 40rpx;
  1119. text-align: center;
  1120. overflow: hidden;
  1121. text-overflow: ellipsis;
  1122. white-space: nowrap;
  1123. }
  1124. }
  1125. }
  1126. .list-li-b {
  1127. overflow: hidden;
  1128. .list-li-b-t {
  1129. display: flex;
  1130. justify-content: flex-start;
  1131. align-items: center;
  1132. >img {
  1133. width: 28rpx;
  1134. height: 26rpx;
  1135. margin-right: 16rpx;
  1136. }
  1137. font-size: 28rpx;
  1138. color: #666666;
  1139. line-height: 30rpx;
  1140. text-align: left;
  1141. margin-top: 32rpx;
  1142. overflow: hidden;
  1143. text-overflow: ellipsis;
  1144. white-space: nowrap;
  1145. }
  1146. .list-li-b-b {
  1147. display: flex;
  1148. justify-content: space-between;
  1149. align-items: center;
  1150. margin-top: 20rpx;
  1151. .list-li-b-b-l {
  1152. display: flex;
  1153. justify-content: flex-start;
  1154. align-items: center;
  1155. >img {
  1156. width: 28rpx;
  1157. height: 26rpx;
  1158. margin-right: 16rpx;
  1159. }
  1160. font-size: 28rpx;
  1161. color: #666666;
  1162. line-height: 30rpx;
  1163. text-align: left;
  1164. overflow: hidden;
  1165. text-overflow: ellipsis;
  1166. white-space: nowrap;
  1167. }
  1168. .finished {
  1169. width: 110rpx;
  1170. height: 40rpx;
  1171. background: rgba(1, 131, 250, 0.2);
  1172. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1173. font-size: 24rpx;
  1174. color: #0183FA;
  1175. line-height: 40rpx;
  1176. text-align: center;
  1177. }
  1178. .finished-b {
  1179. width: 110rpx;
  1180. height: 40rpx;
  1181. background: rgba(255, 182, 0, 0.2);
  1182. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1183. font-size: 24rpx;
  1184. color: #ffb600;
  1185. line-height: 40rpx;
  1186. text-align: center;
  1187. }
  1188. .notFinished {
  1189. width: 110rpx;
  1190. height: 40rpx;
  1191. background: #E0E0E0;
  1192. border-radius: 20rpx 20rpx 20rpx 20rpx;
  1193. font-size: 24rpx;
  1194. color: #666666;
  1195. line-height: 40rpx;
  1196. text-align: center;
  1197. }
  1198. }
  1199. }
  1200. }
  1201. }
  1202. .get-data-null-p {
  1203. height: 100rpx;
  1204. line-height: 100rpx;
  1205. text-align: center;
  1206. }
  1207. #color-A {
  1208. color: #0183FA;
  1209. }
  1210. #color-B {
  1211. color: #FF8C00;
  1212. }
  1213. #color-C {
  1214. color: #16B531;
  1215. }
  1216. .saoCode {
  1217. position: fixed;
  1218. left: 288rpx;
  1219. bottom: 20rpx;
  1220. width: 160rpx;
  1221. height: 160rpx;
  1222. }
  1223. }
  1224. </style>