rectifyList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. <!-- 整改列表 -->
  2. <template>
  3. <view id="safetyInspect" style="display: flex;flex-direction: column;flex: 1;">
  4. <view class="tabTitle" v-if="userType==1">
  5. <view class="tabTitle_li" @tap="tabClick(index)" :key="index" v-for="(item,index) in tabText">
  6. <view :class="{on:curTab==index}" class="tabTitle_text">{{item}}</view>
  7. <view :class="{on:curTab==index}" class="tabTitle_across"></view>
  8. </view>
  9. </view>
  10. <view class="top-button-box" :style="userType==1?'margin-top: 116rpx;':'margin-top: 0rpx;'">
  11. <view class="left-title">检查状态</view>
  12. <picker @change="bindPickerChange" :value="pickerIndex" :range="pickerArray" class="right-button-big-box">
  13. <view class="right-button-box">
  14. <view class="uni-input">{{pickerArray[pickerIndex]}}</view>
  15. <img src="@/pages_manage/images/icon_06.png">
  16. </view>
  17. </picker>
  18. </view>
  19. <scroll-view scroll-y @scrolltolower="scrollGet" class="for-max-box">
  20. <view class="for-big-box">
  21. <view class="for-box" @click="goInfo(item)" v-for="(item,index) in infoList" :key="index">
  22. <view class="for-title-box">
  23. <view v-if="item.isYuqi" class="viewColor1">逾期</view>
  24. <view v-if="!item.isYuqi" :class="item.spStatus==5?'viewColor1':(item.spStatus==0?'viewColor2':(item.spStatus==1?'viewColor3':(item.spStatus==2?'viewColor4':(item.spStatus==3?'viewColor5':(item.spStatus==4?'viewColor6':'')))))">{{item.spStatus==5?'逾期':(item.spStatus==0?'待整改':(item.spStatus==1?'待复核':(item.spStatus==2?'驳回':(item.spStatus==3?'整改中':(item.spStatus==4?'已完成':'')))))}}</view>
  25. <view class="min-for-name-p">{{item.laboratoryName}}</view>
  26. <view v-if="item.zgType == 1">(重大)</view>
  27. </view>
  28. <view class="for-address-box">
  29. <img src="@/pages_manage/images/Version2.2/icon_wtzg_xx.png">
  30. <view>{{item.yhMs|ellipsis}}</view>
  31. </view>
  32. <view class="for-time-box">
  33. <img src="@/pages_manage/images/Version2.2/icon_wtzg_sj.png">
  34. <view>{{item.checkTime}}</view>
  35. </view>
  36. </view>
  37. </view>
  38. <img class="null-img" v-if="!infoList[0]" src="@/pages_manage/images/null-data-1.png">
  39. </scroll-view>
  40. </view>
  41. </template>
  42. <script>
  43. import { config } from '@/api/request/config.js'
  44. import { listWtzgList,checkSign} from '@/api/index.js'
  45. export default {
  46. name: "rectifyList",
  47. data() {
  48. return {
  49. userType:uni.getStorageSync('userType'),
  50. infoList:[],
  51. //列表请求参数
  52. getData:{
  53. zgStatus:"",
  54. spStatus:'',
  55. isZgStatus:"",
  56. isCg:0,
  57. page:1,
  58. pageSize:20,
  59. getType:true,
  60. nullDataType:true,
  61. },
  62. curTab:1,
  63. tabText:['检查记录','问题整改',],
  64. //下拉框
  65. pickerIndex:0,
  66. pickerArray:['全部','待整改','待复核','驳回','已完成','逾期'],
  67. }
  68. },
  69. filters:{
  70. ellipsis(value){
  71. if (!value) return '';
  72. if (value.length > 20) {
  73. return value.slice(0,20) + '...'
  74. }
  75. return value
  76. }
  77. },
  78. onLoad() {
  79. //判断如果是学生端进入只显示问题整改
  80. if(this.userType==2){
  81. this.pageType=1
  82. }
  83. },
  84. onShow() {
  85. this.infoList=[];
  86. this.getList();
  87. },
  88. mounted(){
  89. },
  90. methods: {
  91. //顶部tab点击
  92. tabClick(index) {
  93. if(index==0){
  94. uni.redirectTo({
  95. url: '/pages_manage/workbench/securityCheck/inspectionRecords',//安全检查
  96. });
  97. }
  98. },
  99. //去详情
  100. async goInfo(item){
  101. console.log(item)
  102. if(item.zgType==1){//重大-点击时需要判断是否上传签名,如果未上传签名需要上传签名信息才可以提交整改
  103. const {data} = await checkSign();
  104. if(data.code==200){
  105. if(data.data==false){//true有电子签名false没有电子签名
  106. uni.showModal({
  107. title: '',
  108. cancelColor:'#999999',
  109. confirmColor:'#FF6E6E',
  110. content: '重大整改需上传电子签名,是否上传?',
  111. success (res) {
  112. if (res.confirm) {
  113. console.log('用户点击确定')
  114. uni.navigateTo({
  115. url: '/pages_manage/workbench/signature/signature'
  116. });
  117. } else if (res.cancel) {
  118. console.log('用户点击取消')
  119. }
  120. }
  121. })
  122. }else{
  123. uni.navigateTo({
  124. url: '/pages_manage/workbench/problemRectification/rectifyDetails?item='+JSON.stringify(item),//未提交列表
  125. });
  126. }
  127. }
  128. }else{
  129. uni.navigateTo({
  130. url: '/pages_manage/workbench/problemRectification/rectifyDetails?item='+JSON.stringify(item),//未提交列表
  131. });
  132. }
  133. },
  134. //下啦选择
  135. bindPickerChange(e){
  136. console.log(e.target.value)
  137. if(e.target.value == 0){
  138. this.getData.zgStatus = "";
  139. this.getData.isYuqi = "";
  140. }else if(e.target.value == 1){
  141. this.getData.zgStatus = 0;
  142. this.getData.isYuqi = "";
  143. }else if(e.target.value == 2){
  144. this.getData.zgStatus = 1;
  145. this.getData.isYuqi = "";
  146. }else if(e.target.value == 3){
  147. this.getData.zgStatus = 2;
  148. this.getData.isYuqi = "";
  149. }/* else if(e.target.value == 4){
  150. this.getData.zgStatus = 3;
  151. this.getData.isYuqi = "";
  152. } */else if(e.target.value == 4){
  153. this.getData.zgStatus = 4;
  154. this.getData.isYuqi = "";
  155. }else if(e.target.value == 5){
  156. this.getData.zgStatus = 5;
  157. this.getData.isYuqi = '';
  158. }else if(e.target.value == 6){
  159. this.getData.isZgStatus = 1;
  160. this.getData.spStatus = '';
  161. }
  162. this.pickerIndex = e.target.value
  163. this.getData.page = 1;
  164. this.getData.getType = true;
  165. this.getData.nullDataType = true;
  166. this.infoList = [];
  167. this.getList();
  168. },
  169. //滚动加载事件
  170. scrollGet(){
  171. if(this.getData.getType){
  172. this.getData.page += 1;
  173. this.getList();
  174. }
  175. },
  176. //获取列表数据
  177. async getList(){
  178. let self = this;
  179. let obj = {
  180. spStatus:this.getData.zgStatus,
  181. isZgStatus:this.getData.isZgStatus,
  182. isCg:0,
  183. pageNum:this.getData.page,
  184. pageSize:this.getData.pageSize,
  185. };
  186. this.getData.isCg = 0;
  187. const {data} = await listWtzgList(obj);
  188. if(data.code==200){
  189. if(self.page==1){
  190. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  191. self.infoList = data.rows;
  192. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  193. self.infoList = data.rows;
  194. self.getData.getType = false;
  195. self.getData.nullDataType = true;
  196. }else{
  197. self.getData.getType = false;
  198. self.getData.nullDataType = true;
  199. }
  200. }else{
  201. if(data.rows.length > 0 && data.rows.length == self.getData.pageSize){
  202. self.infoList = self.infoList.concat(data.rows)
  203. }else if(data.rows.length > 0 && data.rows.length != self.getData.pageSize){
  204. self.infoList = self.infoList.concat(data.rows);
  205. self.getData.getType = false;
  206. self.getData.nullDataType = true;
  207. }else{
  208. self.getData.getType = false;
  209. self.getData.nullDataType = true;
  210. }
  211. }
  212. }
  213. },
  214. }
  215. }
  216. </script>
  217. <style lang="stylus" scoped>
  218. #safetyInspect{
  219. height:100%;
  220. width: 100%;
  221. display flex;
  222. flex-direction column;
  223. .tabTitle{
  224. position: fixed;
  225. z-index: 1000;
  226. display flex;
  227. width:100%;
  228. height: 100rpx;
  229. background: #fff;
  230. .tabTitle_li{
  231. width:146rpx;
  232. text-align center;
  233. .tabTitle_text{
  234. display: inline-block;
  235. font-size: 28rpx;
  236. font-family: PingFang SC;
  237. font-weight: 500;
  238. color: #333333;
  239. line-height: 70rpx;
  240. &.on{
  241. color:#0183FA;
  242. }
  243. }
  244. .tabTitle_across{
  245. width: 80rpx;
  246. height: 5rpx;
  247. background: #0183FA;
  248. border-radius: 3rpx;
  249. margin-left 34rpx;
  250. display none;
  251. &.on{
  252. display block;
  253. }
  254. }
  255. }
  256. }
  257. .top-button-box{
  258. height:150rpx;
  259. margin-bottom:20rpx;
  260. display flex;
  261. padding:0 20rpx;
  262. background #fff;
  263. .left-title{
  264. line-height:150rpx;
  265. margin-right:15rpx;
  266. font-size:28rpx;
  267. color:#333;
  268. }
  269. .right-button-big-box{
  270. flex:1;
  271. .right-button-box{
  272. margin:34rpx 0;
  273. border:1rpx solid #A2A2A2;
  274. border-radius:10rpx;
  275. height:80rpx;
  276. display flex
  277. flex:1;
  278. view{
  279. flex:1;
  280. line-height:80rpx;
  281. margin-left:20rpx;
  282. color: #999999;
  283. font-size:28rpx;
  284. }
  285. img{
  286. width:24rpx;
  287. height:12rpx;
  288. margin:35rpx 22rpx;
  289. }
  290. }
  291. }
  292. }
  293. .for-max-box{
  294. flex:1;
  295. overflow-y scroll
  296. .for-big-box{
  297. background:#fff;
  298. border-radius:20rpx;
  299. margin:20rpx;
  300. .for-box:nth-child(1){
  301. .for-title-box{
  302. border:none;
  303. }
  304. }
  305. .for-box{
  306. overflow hidden
  307. .for-title-box{
  308. display:flex;
  309. margin:0 26rpx 0;
  310. border-top:1rpx solid #dedede;
  311. padding-top:45rpx;
  312. view:nth-of-type(1){
  313. width:98rpx;
  314. line-height:38rpx;
  315. height:38rpx;
  316. border-radius:6rpx;
  317. font-size:20rpx;
  318. text-align center;
  319. margin-right:10rpx;
  320. }
  321. .min-for-name-p{
  322. width: 468rpx;
  323. font-size:28rpx;
  324. display:block;
  325. overflow:hidden;
  326. text-overflow:ellipsis;
  327. white-space:nowrap;
  328. }
  329. view:nth-of-type(3){
  330. font-size:30rpx;
  331. color:#333;
  332. height:36rpx;
  333. lin-height:36rpx;
  334. color:#D80000;
  335. }
  336. .viewColor1{
  337. background #ffe6e6;
  338. color:#ff5555;
  339. }
  340. .viewColor2{
  341. background #fef2dd;
  342. color:#f6a71d;
  343. }
  344. .viewColor3{
  345. background #e0f1e2;
  346. color:#30a23d;
  347. }
  348. .viewColor4{
  349. background #f2dddd;
  350. color:#a51919;
  351. }
  352. .viewColor5{
  353. background #e2f6f8;
  354. color:#3ac3d3;
  355. }
  356. .viewColor6{
  357. background #d9edfe;
  358. color:#0183fa;
  359. }
  360. }
  361. .for-address-box{
  362. display:flex;
  363. margin:33rpx 26rpx 0;
  364. img{
  365. width:28rpx;
  366. height:28rpx;
  367. margin-right:20rpx;
  368. }
  369. view{
  370. font-size:28rpx;
  371. line-height:28rpx;
  372. color:#666;
  373. }
  374. }
  375. .for-time-box{
  376. display:flex;
  377. margin:26rpx 26rpx 0;
  378. padding-bottom:32rpx;
  379. img{
  380. width:28rpx;
  381. height:28rpx;
  382. margin-right:20rpx;
  383. }
  384. view{
  385. font-size:28rpx;
  386. line-height:28rpx;
  387. color:#666;
  388. }
  389. }
  390. }
  391. }
  392. .null-img{
  393. display block
  394. width:276rpx;
  395. height:321rpx;
  396. position absolute
  397. top:100rpx;
  398. left:274rpx;
  399. }
  400. }
  401. }
  402. </style>