hiddenDangerItems.vue 26 KB

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