hiddenDangerItems.vue 26 KB

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