hiddenDangerItems.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  1. <!-- 隐患项 -->
  2. <template>
  3. <view class="hiddenDangerItems">
  4. <view class="header">
  5. <view class="lotName" :class="pageType != 0?'lotNameOne':''" v-if="lotName">{{lotName}}</view>
  6. <view class="line"></view>
  7. <view class="tabTitle_tow" :style="pageType==0?'width:320rpx;':'width:520rpx;'">
  8. <view class="tabTitle_tow_li" @tap="tabClickTow(item.value)" :key="index"
  9. v-for="(item,index) in tabTextTow">
  10. <view :class="{on:curTabTow==item.value}" class="tabTitle_tow_text">{{item.label}}</view>
  11. <view :class="{on:curTabTow==item.value}" class="tabTitle_tow_across"></view>
  12. </view>
  13. </view>
  14. <view class="line"></view>
  15. <view class="search">
  16. <view class="search-r search-r-margin" @click="checkItemModuleButton('open')">
  17. <img src="@/pages_safetyCheck/images/icon_aqjc_ss.png">
  18. 搜索检查项
  19. </view>
  20. </view>
  21. <view class="line"></view>
  22. </view>
  23. <scroll-view scroll-y style="overflow-y: scroll;flex:1;" @scrolltolower="scrollGet" class="info-max-box">
  24. <view class="list">
  25. <view class="total"
  26. :class="curTabTow == 0?'total-color-1':(curTabTow == 2?'total-color-3':(curTabTow == 1?'total-color-2':''))"
  27. v-if="pageType == 0">
  28. {{curTabTow == 0?'待检查共'+total+'项':(curTabTow == 1?'已检查共'+total+'项':'')}}
  29. </view>
  30. <view class="total"
  31. :class="curTabTow == 0?'total-color-1':(curTabTow == 1?'total-color-2':(curTabTow == 2?'total-color-3':''))"
  32. v-if="pageType == 1">
  33. {{curTabTow == 0?'待复查共'+total+'项':(curTabTow == 1?'复查完毕共'+total+'项':(curTabTow == 2?'退回整改共'+total+'项':''))}}
  34. </view>
  35. <view class="total"
  36. :class="curTabTow == 2?'total-color-1':(curTabTow == 0?'total-color-2':(curTabTow == 4?'total-color-3':''))"
  37. v-if="pageType == 2">
  38. {{curTabTow == 2?'待整改共'+total+'项':(curTabTow == 1?'已整改共'+total+'项':(curTabTow == 4?'暂无法整改共'+total+'项':''))}}
  39. </view>
  40. <view class="list-li" v-for="(item,index) in dataList" :key="index">
  41. <view class="list-li-t" @click="itemsClick(item)">
  42. <view v-if="pageType == 0">
  43. <img v-if="item.checkFlag==null" src="@/pages_safetyCheck/images/icon_zg_zh@1x.png">
  44. <img v-if="item.checkFlag==false" src="@/pages_safetyCheck/images/icon_xz_zg@1x.png">
  45. <img v-if="item.checkFlag==true" src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
  46. </view>
  47. <view v-if="pageType == 1">
  48. <img v-if="curTabTow==0" src="@/pages_safetyCheck/images/icon_zg_zh@1x.png">
  49. <img v-if="curTabTow==1" src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
  50. <img v-if="curTabTow==2" src="@/pages_safetyCheck/images/icon_xz_zg@1x.png">
  51. </view>
  52. <view v-if="pageType == 2">
  53. <img v-if="curTabTow==2" src="@/pages_safetyCheck/images/icon_zg_zh@1x.png">
  54. <img v-if="curTabTow==1" src="@/pages_safetyCheck/images/icon_xz_zg@1x.png">
  55. <img v-if="curTabTow==4" src="@/pages_safetyCheck/images/icon_xz_fc@1x.png">
  56. </view>
  57. <view>{{item.hazardCheckCode}}{{item.hazardCheckName}}</view>
  58. </view>
  59. <view v-if="pageType == 1 && item.hazardNum" class="list-li-b" @click="hiddenDangerClick(item)">
  60. 此检查项在当前实验室累计出现<text>{{item.hazardNum}}</text>次隐患
  61. </view>
  62. <view v-if="pageType == 2 && item.dangerNum" class="list-li-b" @click="hiddenDangerClick(item)">
  63. 此检查项在当前实验室累计出现<text>{{item.dangerNum}}</text>次隐患
  64. </view>
  65. </view>
  66. </view>
  67. <view class="get-data-p" v-if="!getDataType">
  68. <img class="get-data-img" src="@/pages_safetyCheck/images/icon_aqjc_sl.png">
  69. <view class="get-data-text">上拉加载</view>
  70. </view>
  71. <view class="get-data-null-p" v-if="getDataType">- 没有更多数据 -</view>
  72. </scroll-view>
  73. <checkItemModule :propsData="propsData" v-if="checkItemModuleType"></checkItemModule>
  74. <!-- <view class="sub-btn" @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary">开展检查</view> -->
  75. <view class="subBtn">
  76. <img @click="saoCode()" v-if="pageType==0" src="@/pages_safetyCheck/images/icon_aqjc_saoma.png">
  77. <img @click="submitBtn(1)" v-if="pageType==0 && inspectRemporary" style="margin-left: 184rpx;"
  78. src="@/pages_safetyCheck/images/icon_aqjc_jiancha.png" />
  79. </view>
  80. </view>
  81. </template>
  82. <script>
  83. import {
  84. config
  85. } from '@/api/request/config.js'
  86. import {
  87. securityAppCheckSetOptionList,
  88. securityAppCheckDangerReviewList,
  89. securityAppCheckDangerGetCheckDangerSubId,
  90. securityAppCheckSetOptionFinishCheck,
  91. securityAppCheckDangerGetCheckDangerSubList,
  92. securityAppCheckDangerReviewSubList,
  93. securityAppCheckManageList,
  94. } from '@/pages_safetyCheck/api/index.js'
  95. import {
  96. checkItemModule
  97. } from '@/pages_safetyCheck/component/checkItemModule.vue'
  98. export default {
  99. name: "hiddenDangerItems",
  100. components: {
  101. checkItemModule
  102. },
  103. data() {
  104. return {
  105. baseUrl: config.base_url,
  106. pageType: 1,
  107. tabTextTow: [],
  108. curTabTow: null,
  109. form: {
  110. imgDtoList: [],
  111. },
  112. lotName: null,
  113. optionData: {
  114. },
  115. dialogVisible: false,
  116. // 查询参数
  117. queryParams: {
  118. page: 1,
  119. pageSize: 20,
  120. },
  121. //符合/不符合
  122. checkFlag: null,
  123. total: 0,
  124. dataList: [],
  125. getDataType: false,
  126. searchIndex: 0,
  127. //检查项组件数据
  128. checkItemModuleType: false,
  129. propsData: {},
  130. inspectRemporary: false, //待检查
  131. inspectRemporaryList: [], //待检查
  132. optionData: {},
  133. }
  134. },
  135. onLoad(option) {
  136. let optionData = JSON.parse(decodeURIComponent(option.infoData));
  137. console.log('检查项列表', optionData)
  138. uni.setNavigationBarTitle({
  139. title: optionData.subName + '(' + (optionData.pageType == 0 ? (optionData.roomNum ? optionData
  140. .roomNum : '-') : (optionData
  141. .subRoom ? optionData
  142. .subRoom : '-')) + ')'
  143. })
  144. this.$set(this, 'pageType', optionData.pageType);
  145. this.$set(this, 'lotName',
  146. optionData.pageType == 0 ? optionData.checkPlanSetVoList.checkName :
  147. (optionData.checkPlanSetVoList.overdueUnrectify ? '整改期限' + optionData.checkPlanSetVoList.rectifyDeadline +'(逾期未完成整改关闭实验室)' : '整改期限' + optionData.checkPlanSetVoList.rectifyDeadline));
  148. this.$set(this, 'tabTextTow',
  149. optionData.pageType == 0 ? (optionData.manageStatus == 2 ? [{
  150. value: '1',
  151. label: '已检查'
  152. }] : [{
  153. value: '0',
  154. label: '待检查'
  155. }, {
  156. value: '1',
  157. label: '已检查'
  158. }]) : (
  159. optionData.pageType == 1 ? [{
  160. value: '0',
  161. label: '待复查'
  162. }, {
  163. value: '1',
  164. label: '复查完毕'
  165. }, {
  166. value: '2',
  167. label: '退回整改'
  168. }] : (
  169. optionData.pageType == 2 ? [{
  170. value: '2',
  171. label: '待整改'
  172. }, {
  173. value: '1',
  174. label: '已整改'
  175. }, {
  176. value: '4',
  177. label: '暂无法整改'
  178. }] : []
  179. )))
  180. if (optionData.pageType == 0) {
  181. if (optionData.manageStatus == 2) {
  182. this.$set(this, 'curTabTow', '1');
  183. }
  184. } else {
  185. this.$set(this, 'curTabTow',
  186. optionData.pageType == 0 ? (optionData.curTabTow == 1 ? '1' : '0') : (
  187. optionData.pageType == 1 ? '0' : (
  188. optionData.pageType == 2 ? '2' : '')));
  189. }
  190. this.$set(this, 'optionData', optionData);
  191. this.$nextTick(() => {
  192. this.getList()
  193. })
  194. },
  195. onShow() {
  196. },
  197. mounted() {
  198. if (this.optionData.pageType == 0) {
  199. if (this.optionData.manageStatus == 2) {
  200. this.securityAppCheckSetOptionList(this.optionData, 1)
  201. } else {
  202. this.securityAppCheckSetOptionList(this.optionData, 0)
  203. }
  204. }
  205. },
  206. methods: {
  207. //滚动事件
  208. scrollGet() {
  209. let self = this;
  210. if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
  211. this.$set(this, 'getDataType', true);
  212. } else {
  213. this.queryParams.page += 1;
  214. this.$nextTick(() => {
  215. this.getList();
  216. })
  217. }
  218. },
  219. //顶部tab点击
  220. tabClickTow(value) {
  221. console.log(this.curTabTow)
  222. this.$set(this, 'checkFlag', null);
  223. this.$set(this.queryParams, 'page', 1);
  224. this.$set(this, 'curTabTow', value);
  225. this.$set(this, 'total', 0);
  226. this.$set(this, 'dataList', []);
  227. this.$nextTick(() => {
  228. this.getList();
  229. })
  230. },
  231. dialogOpen() {
  232. this.dialogVisible = true;
  233. },
  234. dialogClose() {
  235. this.dialogVisible = false;
  236. },
  237. //符合/不符合
  238. checkFlagChange(type) {
  239. if (this.checkFlag == type) {
  240. this.$set(this, 'checkFlag', null);
  241. } else {
  242. this.$set(this, 'checkFlag', type);
  243. }
  244. this.$set(this.queryParams, 'page', 1);
  245. this.getList()
  246. },
  247. checkItemModuleButton(type, item) {
  248. if (type == 'open') {
  249. let obj = {
  250. infoType: this.pageType,
  251. checkType: this.curTabTow,
  252. }
  253. if (this.pageType == 0) {
  254. //检查
  255. obj.manageId = this.optionData.manageId
  256. if (this.optionData.manageStatus == 2) {
  257. obj.checkType = 1
  258. }
  259. } else if (this.pageType != 0) {
  260. //复查/整改
  261. obj.planId = this.optionData.checkPlanSetVoList.planId;
  262. obj.planSetId = this.optionData.checkPlanSetVoList.planSetId;
  263. obj.subId = this.optionData.subId;
  264. }
  265. this.$set(this, 'propsData', obj);
  266. this.$set(this, 'checkItemModuleType', true);
  267. } else if (type == 'out') {
  268. this.$set(this, 'checkItemModuleType', false);
  269. this.$set(this, 'propsData', {});
  270. } else if (type == 'submit') {
  271. this.itemsClick(item);
  272. }
  273. },
  274. /******调用摄像头******/
  275. saoCode() {
  276. let self = this;
  277. uni.scanCode({
  278. onlyFromCamera: true,
  279. success: function(res) {
  280. let list = res.result.split("?")[1].split("&");
  281. let codeData = {};
  282. list.forEach((item) => {
  283. codeData[item.split("=")[0]] = item.split("=")[1];
  284. })
  285. if (codeData.code) {
  286. self.saoList(codeData.subId);
  287. } else {
  288. uni.showToast({
  289. title: '请扫描正确的二维码',
  290. icon: "none",
  291. mask: true,
  292. duration: 2000
  293. });
  294. }
  295. }
  296. });
  297. },
  298. //扫一扫查询数据
  299. async saoList(subId) {
  300. let obj = {
  301. planSetId: this.optionData.checkPlanSetVoList.planSetId,
  302. subId: subId,
  303. }
  304. if (this.pageType == 0) {
  305. //检查计划
  306. const {
  307. data
  308. } = await securityAppCheckManageList(obj);
  309. if (data.code == 200) {
  310. if (data.data.records[0]) {
  311. this.securityAppCheckSetOptionListTow(data.data.records[0], 0)
  312. //跳转检查项列表页面
  313. /* let infoData = data.data.records[0];
  314. infoData.pageType = this.tabIndexTow;
  315. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  316. uni.navigateTo({
  317. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  318. encodeURIComponent(
  319. JSON.stringify(infoData))
  320. }); */
  321. } else {
  322. //未找到数据提示
  323. uni.showToast({
  324. title: '未找到该实验室与本计划批次关联的数据',
  325. icon: "none",
  326. mask: true,
  327. duration: 2000
  328. });
  329. }
  330. }
  331. } else if (this.pageType == 1) {
  332. //复查计划
  333. obj.planId = this.optionData.checkPlanSetVoList.planId;
  334. obj.userId = uni.getStorageSync('userId');
  335. const {
  336. data
  337. } = await securityAppCheckDangerReviewSubList(obj);
  338. if (data.code == 200) {
  339. if (data.data[0] && data.data[0].stayExamineCheckNum != 0) {
  340. //跳转检查项列表页面
  341. let infoData = data.data[0];
  342. infoData.pageType = this.pageType;
  343. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  344. uni.navigateTo({
  345. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  346. encodeURIComponent(
  347. JSON.stringify(infoData))
  348. });
  349. } else {
  350. //未找到数据提示
  351. uni.showToast({
  352. title: '未找到该实验室与本计划批次关联的数据',
  353. icon: "none",
  354. mask: true,
  355. duration: 2000
  356. });
  357. }
  358. }
  359. } else if (this.pageType == 2) {
  360. //整改计划
  361. obj.planId = this.optionData.checkPlanSetVoList.planId;
  362. obj.userId = uni.getStorageSync('userId');
  363. const {
  364. data
  365. } = await securityAppCheckDangerGetCheckDangerSubList(obj);
  366. if (data.code == 200) {
  367. if (data.data[0]) {
  368. //跳转检查项列表页面
  369. let infoData = data.data[0];
  370. infoData.pageType = this.tabIndexTow;
  371. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  372. uni.navigateTo({
  373. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItems?infoData=' +
  374. encodeURIComponent(
  375. JSON.stringify(infoData))
  376. });
  377. } else {
  378. //未找到数据提示
  379. uni.showToast({
  380. title: '未找到该实验室与本计划批次关联的数据',
  381. icon: "none",
  382. mask: true,
  383. duration: 2000
  384. });
  385. }
  386. }
  387. }
  388. },
  389. //检查项选中
  390. itemsClick(row) {
  391. let infoData = this.optionData;
  392. infoData.pageType = this.pageType;
  393. infoData.checkDraftVo = row.checkDraftVo;
  394. infoData.itemsStatus = this.curTabTow;
  395. infoData.setOptionId = row.setOptionId;
  396. infoData.hazardCheckPro = row.hazardCheckPro;
  397. /* infoData.checkCategory = this.optionData.checkCategory;
  398. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList; */
  399. if (this.pageType == 0 && this.curTabTow == 0) {
  400. //待检查
  401. uni.redirectTo({
  402. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  403. encodeURIComponent(
  404. JSON
  405. .stringify(infoData))
  406. });
  407. }
  408. if (this.pageType == 0 && this.curTabTow == 1) {
  409. //已检查
  410. uni.redirectTo({
  411. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
  412. encodeURIComponent(JSON
  413. .stringify(infoData))
  414. });
  415. } else if (this.pageType == 1 && this.curTabTow == 0) {
  416. //待复查
  417. uni.redirectTo({
  418. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
  419. encodeURIComponent(JSON
  420. .stringify(infoData))
  421. });
  422. } else if (this.pageType == 1 && this.curTabTow == 1) {
  423. //复查完毕
  424. uni.redirectTo({
  425. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
  426. encodeURIComponent(JSON
  427. .stringify(infoData))
  428. });
  429. } else if (this.pageType == 1 && this.curTabTow == 2) {
  430. //退回整改
  431. uni.redirectTo({
  432. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
  433. encodeURIComponent(JSON
  434. .stringify(infoData))
  435. });
  436. } else if (this.pageType == 2 && this.curTabTow == 2) {
  437. //待整改
  438. uni.redirectTo({
  439. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerRectification?infoData=' +
  440. encodeURIComponent(JSON
  441. .stringify(infoData))
  442. });
  443. } else if (this.pageType == 2 && this.curTabTow == 1) {
  444. //已完成
  445. uni.redirectTo({
  446. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
  447. encodeURIComponent(JSON
  448. .stringify(infoData))
  449. });
  450. } else if (this.pageType == 2 && this.curTabTow == 4) {
  451. //暂无法整改
  452. uni.redirectTo({
  453. url: '/pages_safetyCheck/views/itemsManage/hiddenDangerItemsDetail?infoData=' +
  454. encodeURIComponent(JSON
  455. .stringify(infoData))
  456. });
  457. }
  458. },
  459. hiddenDangerClick(row) {
  460. let infoData = this.optionData;
  461. infoData.hazardCheckPro = row.hazardCheckPro;
  462. infoData.pageType = this.pageType;
  463. infoData.itemsStatus = this.curTabTow;
  464. infoData.hiddenDangerRecordStatus = true; //判断是否跳转隐患列表
  465. uni.redirectTo({
  466. url: '/pages_safetyCheck/views/inspectManage/hiddenDangerRecord?infoData=' +
  467. encodeURIComponent(JSON.stringify(infoData))
  468. });
  469. },
  470. //
  471. async getList() {
  472. let self = this;
  473. let obj = JSON.parse(JSON.stringify(this.queryParams))
  474. if (this.pageType == 0) {
  475. //检查任务
  476. obj.manageId = this.optionData.manageId;
  477. obj.checkFlag = this.checkFlag;
  478. if (this.optionData.pageType == 0) {
  479. if (this.optionData.manageStatus == 2) {
  480. obj.checkStatus = 1
  481. } else {
  482. obj.checkStatus = this.curTabTow;
  483. }
  484. }
  485. const {
  486. data
  487. } = await securityAppCheckSetOptionList(obj);
  488. if (data.code == 200) {
  489. if (self.queryParams.page == 1) {
  490. this.dataList = data.data.records;
  491. this.total = data.data.total;
  492. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  493. this.$set(this, 'getDataType', true);
  494. }
  495. } else {
  496. this.dataList = [...this.dataList, ...data.data.records]
  497. this.total = data.data.total;
  498. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  499. this.$set(this, 'getDataType', true);
  500. }
  501. }
  502. }
  503. } else if (this.pageType == 1) {
  504. //复查验证
  505. obj.planId = this.optionData.checkPlanSetVoList.planId;
  506. obj.planSetId = this.optionData.checkPlanSetVoList.planSetId;
  507. obj.subId = this.optionData.subId;
  508. obj.appReviewStatus = this.curTabTow;
  509. obj.pageFlag = true;
  510. const {
  511. data
  512. } = await securityAppCheckDangerReviewList(obj);
  513. if (data.code == 200) {
  514. if (self.queryParams.page == 1) {
  515. this.dataList = data.data.records;
  516. this.total = data.data.total;
  517. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  518. this.$set(this, 'getDataType', true);
  519. }
  520. } else {
  521. this.dataList = [...this.dataList, ...data.data.records]
  522. this.total = data.data.total;
  523. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  524. this.$set(this, 'getDataType', true);
  525. }
  526. }
  527. }
  528. } else if (this.pageType == 2) {
  529. //隐患整改
  530. obj.planId = this.optionData.checkPlanSetVoList.planId;
  531. obj.planSetId = this.optionData.checkPlanSetVoList.planSetId;
  532. obj.subId = this.optionData.subId;
  533. obj.rectifyStatus = this.curTabTow;
  534. obj.pageFlag = true;
  535. const {
  536. data
  537. } = await securityAppCheckDangerGetCheckDangerSubId(obj);
  538. if (data.code == 200) {
  539. if (self.queryParams.page == 1) {
  540. this.dataList = data.data.records;
  541. this.total = data.data.total;
  542. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  543. this.$set(this, 'getDataType', true);
  544. }
  545. } else {
  546. this.dataList = [...this.dataList, ...data.data.records]
  547. this.total = data.data.total;
  548. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  549. this.$set(this, 'getDataType', true);
  550. }
  551. }
  552. }
  553. }
  554. },
  555. //查询当前实验室检查项
  556. async securityAppCheckSetOptionList(item, checkStatus) {
  557. let self = this;
  558. let upData = item;
  559. let obj = {
  560. page: 1,
  561. pageSize: 20,
  562. checkStatus: checkStatus,
  563. manageId: upData.manageId,
  564. }
  565. this.inspectRemporaryList = [];
  566. const {
  567. data
  568. } = await securityAppCheckSetOptionList(obj);
  569. if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
  570. if (data.data.records[0]) {
  571. self.inspectRemporary = true;
  572. this.inspectRemporaryList = JSON.parse(JSON.stringify(data.data.records))
  573. }
  574. }
  575. },
  576. //查询扫码进入的实验室检查项
  577. async securityAppCheckSetOptionListTow(item, checkStatus) {
  578. let self = this;
  579. let upData = item;
  580. let obj = {
  581. page: 1,
  582. pageSize: 20,
  583. checkStatus: checkStatus,
  584. manageId: upData.manageId,
  585. }
  586. this.inspectRemporaryList = [];
  587. const {
  588. data
  589. } = await securityAppCheckSetOptionList(obj);
  590. if (data.code == 200 && checkStatus == 0) { //先查询待检查数据
  591. if (data.data.records[0]) {
  592. let infoData = self.optionData;
  593. infoData.pageType = 0;
  594. infoData.subName = upData.subName;
  595. infoData.roomNum = upData.roomNum;
  596. infoData.subId = data.data.records[0].subId;
  597. infoData.manageId = data.data.records[0].manageId;
  598. infoData.setOptionId = data.data.records[0].setOptionId;
  599. infoData.hazardCheckPro = data.data.records[0].hazardCheckPro;
  600. infoData.checkCategory = data.data.records[0].checkCategory;
  601. uni.navigateTo({
  602. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  603. encodeURIComponent(
  604. JSON
  605. .stringify(infoData))
  606. });
  607. } else {
  608. uni.showToast({
  609. title: '该实验室暂无检查工作!',
  610. icon: "none",
  611. mask: true,
  612. duration: 2000
  613. });
  614. }
  615. }
  616. },
  617. //检查完成
  618. async submitBtn(status) {
  619. if (status == 1) {
  620. //开展检查
  621. let infoData = this.inspectRemporaryList[0];
  622. infoData.pageType = this.pageType;
  623. infoData.itemsStatus = this.curTabTow;
  624. infoData.checkCategory = this.optionData.checkCategory;
  625. infoData.checkPlanSetVoList = this.optionData.checkPlanSetVoList;
  626. infoData.subName = this.optionData.subName;
  627. infoData.roomNum = this.optionData.roomNum;
  628. infoData.subRoom = this.optionData.subRoom;
  629. uni.redirectTo({
  630. url: '/pages_safetyCheck/views/inspectManage/conductInspections?infoData=' +
  631. encodeURIComponent(
  632. JSON
  633. .stringify(infoData))
  634. });
  635. }
  636. },
  637. }
  638. }
  639. </script>
  640. <style lang="stylus" scoped>
  641. .hiddenDangerItems {
  642. height: 100%;
  643. display flex;
  644. flex-direction: column;
  645. overflow: hidden;
  646. box-sizing: border-box;
  647. #totalColor-A {
  648. color: #0183FA;
  649. background: rgba(1, 131, 250, 0.2);
  650. }
  651. #totalColor-B {
  652. color: #16B531;
  653. background: rgba(22, 181, 49, 0.2);
  654. }
  655. #totalColor-C {
  656. color: #FF8C00;
  657. background: rgba(255, 140, 0, 0.2);
  658. }
  659. .header {
  660. width: 100%;
  661. height: 268rpx;
  662. overflow: hidden;
  663. background: #fff;
  664. .lotName {
  665. height: 70rpx;
  666. line-height: 70rpx;
  667. font-size: 28rpx;
  668. background: rgba(1, 131, 250, 0.2);
  669. color: #0183FA;
  670. text-align: center;
  671. }
  672. .lotNameOne {
  673. background: #F7E0C4;
  674. color: #FF8C00;
  675. }
  676. .tabTitle_tow {
  677. width: 320rpx;
  678. height: 80rpx;
  679. display flex;
  680. justify-content: flex-start;
  681. align-items: center;
  682. .tabTitle_tow_li {
  683. flex: 1;
  684. position: relative;
  685. text-align center;
  686. .tabTitle_tow_text {
  687. display: inline-block;
  688. font-size: 30rpx;
  689. font-family: PingFang SC;
  690. font-weight: 500;
  691. color: #333333;
  692. line-height: 46rpx;
  693. position: relative;
  694. &.on {
  695. color: #0183FA;
  696. }
  697. }
  698. .tabTitle_tow_across {
  699. width: 50rpx;
  700. height: 4rpx;
  701. background: #0183FA;
  702. border-radius: 2rpx;
  703. margin-left: 38%;
  704. display none;
  705. &.on {
  706. display block;
  707. }
  708. }
  709. }
  710. }
  711. .line {
  712. width: 100%;
  713. height: 13rpx;
  714. background: #F5F5F5;
  715. }
  716. .search {
  717. width: 750rpx;
  718. height: 80rpx;
  719. background: #FFFFFF;
  720. border-radius: 0rpx 0rpx 0rpx 0rpx;
  721. display: flex;
  722. justify-content: flex-start;
  723. align-items: center;
  724. .search-l {
  725. display: flex;
  726. justify-content: flex-start;
  727. align-items: center;
  728. margin: 0 20rpx 0 30rpx;
  729. .search-A {
  730. border-radius: 50rpx 50rpx 50rpx 50rpx;
  731. border: 1rpx solid #E0E0E0;
  732. width: 100rpx;
  733. height: 60rpx;
  734. background: #E0E0E0;
  735. font-weight: normal;
  736. font-size: 24rpx;
  737. color: #333333;
  738. line-height: 60rpx;
  739. text-align: center;
  740. margin-right: 10rpx;
  741. }
  742. .search-B {
  743. border-radius: 50rpx 50rpx 50rpx 50rpx;
  744. border: 1rpx solid #0183FA;
  745. width: 100rpx;
  746. height: 60rpx;
  747. background: #0183FA;
  748. font-weight: normal;
  749. font-size: 24rpx;
  750. color: #FFFFFF;
  751. line-height: 60rpx;
  752. text-align: center;
  753. margin-right: 10rpx;
  754. }
  755. }
  756. .search-r-margin {
  757. width: 700rpx !important;
  758. margin: 0 auto;
  759. }
  760. .search-r {
  761. width: 440rpx;
  762. height: 60rpx;
  763. background: #FFFFFF;
  764. border-radius: 50rpx 50rpx 50rpx 50rpx;
  765. border: 1rpx solid #E0E0E0;
  766. font-size: 24rpx;
  767. color: #999999;
  768. line-height: 60rpx;
  769. text-align: left;
  770. display: flex;
  771. justify-content: flex-start;
  772. align-items: center;
  773. padding: 0 20rpx;
  774. box-sizing: border-box;
  775. >img {
  776. width: 30rpx;
  777. height: 30rpx;
  778. margin-right: 20rpx;
  779. }
  780. }
  781. }
  782. }
  783. .list {
  784. width: 750rpx;
  785. background: #FFFFFF;
  786. padding-bottom: 20rpx;
  787. box-sizing: border-box;
  788. .total {
  789. display: inline-block;
  790. height: 50rpx;
  791. background: rgba(1, 131, 250, 0.2);
  792. border-radius: 0rpx 0rpx 20rpx 0rpx;
  793. font-size: 24rpx;
  794. color: #0183FA;
  795. line-height: 50rpx;
  796. text-align: left;
  797. padding: 0rpx 22rpx;
  798. box-sizing: border-box;
  799. margin-bottom: 20rpx;
  800. }
  801. .total-color-1 {
  802. background: rgba(1, 131, 250, 0.2);
  803. color: #0183FA;
  804. }
  805. .total-color-2 {
  806. background: rgba(22, 181, 49, 0.2);
  807. color: #16B531;
  808. }
  809. .total-color-3 {
  810. background: #F7E0C4;
  811. color: #FF8C00;
  812. }
  813. .list-li {
  814. margin: 0 30rpx;
  815. .list-li-t {
  816. width: 690rpx;
  817. background: #F5F5F5;
  818. border-radius: 10rpx 10rpx 10rpx 10rpx;
  819. display: flex;
  820. justify-content: flex-start;
  821. padding: 12rpx 20rpx 14rpx 14rpx;
  822. box-sizing: border-box;
  823. margin: 20rpx 0;
  824. >view:nth-of-type(1) {
  825. >img {
  826. width: 24rpx;
  827. height: 24rpx;
  828. margin-right: 30rpx;
  829. }
  830. }
  831. >view:nth-of-type(2) {
  832. flex: 1;
  833. font-size: 28rpx;
  834. color: #3D3D3D;
  835. line-height: 40rpx;
  836. text-align: left;
  837. }
  838. }
  839. .list-li-b {
  840. font-size: 28rpx;
  841. color: #3D3D3D;
  842. line-height: 40rpx;
  843. text-align: right;
  844. >text {
  845. color: #FF0000;
  846. }
  847. }
  848. }
  849. }
  850. .get-data-p {
  851. height: 100rpx;
  852. text-align: center;
  853. .get-data-img {
  854. width: 30rpx;
  855. height: 30rpx;
  856. margin: 0 auto;
  857. margin-top: 15rpx;
  858. }
  859. .get-data-text {
  860. text-align: center;
  861. }
  862. }
  863. .get-data-null-p {
  864. height: 100rpx;
  865. line-height: 100rpx;
  866. text-align: center;
  867. }
  868. .subBtn {
  869. display: flex;
  870. justify-content: center;
  871. position: fixed;
  872. bottom: 30rpx;
  873. width: 750rpx;
  874. padding: 0 46rpx;
  875. box-sizing: border-box;
  876. >img {
  877. width: 160rpx;
  878. height: 160rpx;
  879. }
  880. }
  881. .sub-btn {
  882. display: flex;
  883. justify-content: center;
  884. position: fixed;
  885. left: 30rpx;
  886. bottom: 30rpx;
  887. width: 690rpx;
  888. height: 100rpx;
  889. background: #0183FA;
  890. border-radius: 50rpx 50rpx 50rpx 50rpx;
  891. font-size: 30rpx;
  892. color: #FFFFFF;
  893. line-height: 100rpx;
  894. text-align: center;
  895. }
  896. }
  897. </style>