inspectList.vue 31 KB

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