rectifyList.vue 9.5 KB

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