inspectList.vue 34 KB

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