inspectList.vue 31 KB

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