hiddenDangerItems.vue 26 KB

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