gradingControlFinish.vue 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. <!-- 准入资格证书 -->
  2. <template>
  3. <view id="accessQualification">
  4. <scroll-view scroll-y @scrolltolower="scrollGet" class="info-max-box">
  5. <view class="list">
  6. <view class="list_li" v-for="(item,index) in dataList" :key="index">
  7. <view class="list_li_t">
  8. <!-- <view class="list_li_t_l" :style="'color:'+item.levelColor+';border-color:'+item.levelColor">{{item.levelName}}</view> -->
  9. <view class="list_li_t_c">{{item.subName}}</view>
  10. <!-- <view class="list_li_t_r">{{item.typeName}}</view> -->
  11. </view>
  12. <view class="list_li_b">
  13. <view class="list_li_b_t" @tap="goPageInfo(item2)" v-for="(item2,index2) in item.detailList"
  14. :key="index2"
  15. :style="index2==(item.detailList.length-1)?'border:none;':'border-bottom :1px dashed #cccccc;'">
  16. <view class="list_li_b_t_t">
  17. <view class="list_li_b_t_t_n">
  18. <view class="list_li_b_t_t_l"
  19. :class="[item2.ruleType== '日管控' ? 'purple': '', item2.ruleType=='周管控'? 'blue': '',item2.ruleType=='月管控'? 'orange': '',item2.ruleType=='季度管控'? 'lightBlue ': '',item2.ruleType=='半年管控'? 'deepPurple ': '',item2.ruleType=='年管控'? 'green': '',]">
  20. {{item2.ruleType}}
  21. </view>
  22. <view class="list_li_b_t_t_c">{{item2.ruleName}}</view>
  23. <!-- <view class="list_li_b_t_t_r" v-if="item2.isExpired==1">(过期未完成)</view> -->
  24. </view>
  25. <view class="list_li_t_rr"
  26. :class="item2.status==0?'list_li_t_rr_color_a':(item2.status==2?'list_li_t_rr_color_b':'')">
  27. {{item2.status==0?'未执行':(item2.status==2?'已执行':'')}}
  28. </view>
  29. <img class="list_li_b_t_t_img" src="@/pages_basics/images/icon_04.png">
  30. </view>
  31. <!-- <view class="list_li_b_t_b">{{item2.ruleRemark}}</view> -->
  32. <view class="list_li_b_t_b">截止执行时间:{{item2.endDate}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="get-null-box" v-if="getDataType">暂无更多数据</view>
  38. </scroll-view>
  39. </view>
  40. </template>
  41. <script>
  42. import {
  43. parseTime
  44. } from '@/component/public.js'
  45. import {
  46. gradingControlFinish
  47. } from '@/pages_basics/api/index.js'
  48. export default {
  49. data() {
  50. return {
  51. queryParams: {
  52. page: 1,
  53. pageSize: 20,
  54. },
  55. total: 0,
  56. getDataType: null,
  57. dataList: [],
  58. }
  59. },
  60. onLoad() {
  61. },
  62. onShow() {
  63. //this.clearData();
  64. this.getList();
  65. },
  66. methods: {
  67. //清除
  68. clearData() {
  69. this.dataList = [];
  70. },
  71. //去详情页
  72. goPageInfo(item) {
  73. uni.navigateTo({
  74. url: '/pages_basics/views/gradingControl/gradingControlDetail?item=' + encodeURIComponent(JSON
  75. .stringify(item))
  76. })
  77. },
  78. //滚动事件
  79. scrollGet() {
  80. this.getList();
  81. },
  82. //滚动事件
  83. scrollGet() {
  84. let self = this;
  85. if (self.total / self.queryParams.pageSize <= self.queryParams.page) {
  86. this.$set(this, 'getDataType', true);
  87. } else {
  88. this.queryParams.page += 1;
  89. this.$nextTick(() => {
  90. this.getList();
  91. })
  92. }
  93. },
  94. async getList() {
  95. let self = this;
  96. const {
  97. data
  98. } = await gradingControlFinish(this.queryParams);
  99. if (data.code == 200) {
  100. data.data.records.forEach(function(item) {
  101. item.detailList.forEach(function(item2) {
  102. item2.endDate = parseTime(item2.endDate, "{y}-{m}-{d}");
  103. })
  104. })
  105. if (self.queryParams.page == 1) {
  106. this.dataList = data.data.records;
  107. this.total = data.data.total;
  108. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  109. this.$set(this, 'getDataType', true);
  110. }
  111. } else {
  112. this.dataList = [...this.dataList, ...data.data.records]
  113. this.total = data.data.total;
  114. if (data.data.total / self.queryParams.pageSize <= self.queryParams.page) {
  115. this.$set(this, 'getDataType', true);
  116. }
  117. }
  118. }
  119. },
  120. }
  121. }
  122. </script>
  123. <style lang="stylus" scoped>
  124. #accessQualification {
  125. height: 100%;
  126. display flex;
  127. flex-direction column;
  128. .info-max-box {
  129. flex: 1;
  130. overflow: scroll;
  131. .for-big-box:last-child {
  132. margin-bottom: 180rpx;
  133. }
  134. /* 列表 */
  135. .list {
  136. padding 0 20rpx;
  137. box-sizing border-box;
  138. .list_li {
  139. height auto;
  140. .list_li_t {
  141. height: 80rpx;
  142. display flex;
  143. justify-content flex-start;
  144. align-items: center;
  145. .list_li_t_l {
  146. width: 80rpx;
  147. height: 30rpx;
  148. font-size: 24rpx;
  149. font-family: PingFang SC;
  150. font-weight: 500;
  151. color: #EE3A3A;
  152. line-height: 30rpx;
  153. border: 2rpx solid #EE3A3A;
  154. border-radius: 6rpx;
  155. text-align center;
  156. }
  157. .list_li_t_c {
  158. font-size: 28rpx;
  159. font-family: PingFang SC;
  160. font-weight: 500;
  161. color: #333333;
  162. line-height: 30rpx;
  163. margin 0 32rpx 0 16rpx;
  164. flex: 1;
  165. }
  166. .list_li_t_r {
  167. font-size: 28rpx;
  168. font-family: PingFang SC;
  169. font-weight: 500;
  170. color: #999999;
  171. line-height: 30rpx;
  172. }
  173. }
  174. .list_li_b {
  175. width 710rpx;
  176. height auto;
  177. background: #FFFFFF;
  178. border-radius: 20rpx;
  179. padding: 0 14rpx;
  180. box-sizing: border-box;
  181. .list_li_b_t {
  182. overflow: hidden;
  183. border-bottom: 1rpx dashed #cccccc;
  184. .list_li_b_t_t {
  185. display flex;
  186. flex: 1;
  187. justify-content flex-start;
  188. margin: 24rpx 0 18rpx 0;
  189. .list_li_b_t_t_n {
  190. width: 655rpx;
  191. display flex;
  192. justify-content flex-start;
  193. .list_li_b_t_t_l {
  194. width: 100rpx;
  195. height: 30rpx;
  196. font-size: 24rpx;
  197. font-family: PingFang SC;
  198. font-weight: 500;
  199. /* color: #0183FA; */
  200. line-height: 24rpx;
  201. /* background: rgba(1,131,250,0.2); */
  202. border-radius: 6rpx;
  203. text-align: center;
  204. }
  205. .list_li_b_t_t_c {
  206. font-size: 28rpx;
  207. font-family: PingFang SC;
  208. flex: 1;
  209. font-weight: 500;
  210. color: #333333;
  211. line-height: 28rpx;
  212. margin: 0 16rpx 0 12rpx;
  213. }
  214. .list_li_b_t_t_r {
  215. font-size: 24rpx;
  216. font-family: PingFang SC;
  217. font-weight: 500;
  218. color: #EE3A3A;
  219. line-height: 24rpx;
  220. }
  221. }
  222. .list_li_t_rr {
  223. width: 100rpx;
  224. font-size: 28rpx;
  225. font-family: PingFang SC;
  226. font-weight: 500;
  227. color: #999999;
  228. line-height: 28rpx;
  229. margin-right: 10rpx;
  230. }
  231. .list_li_t_rr_color_a {
  232. color: #FF4E00;
  233. }
  234. .list_li_t_rr_color_b {
  235. color: #14AE10;
  236. }
  237. /* 日管控 */
  238. .purple {
  239. color: #AC20E0;
  240. background: rgba(172, 32, 224, 0.2);
  241. }
  242. /* 周管控 */
  243. .blue {
  244. color: #0183FA;
  245. background: rgba(1, 131, 250, 0.2);
  246. }
  247. /* 月管控 */
  248. .orange {
  249. color: #FA8801;
  250. background: rgba(250, 136, 1, 0.2);
  251. }
  252. /* 季管控 */
  253. .lightBlue {
  254. color: #81d3f8;
  255. background: rgba(129, 211, 248, 0.2);
  256. }
  257. /* 半年管控 */
  258. .deepPurple {
  259. color: #6565f1;
  260. background: rgba(101, 101, 241, 0.2);
  261. }
  262. /* 年管控 */
  263. .green {
  264. color: #11BA25;
  265. background: rgba(17, 186, 37, 0.2);
  266. }
  267. >img {
  268. width: 12rpx;
  269. height: 24rpx;
  270. margin-top: 2rpx;
  271. }
  272. }
  273. .list_li_b_t_b {
  274. font-size: 28rpx;
  275. font-family: PingFang SC;
  276. font-weight: 500;
  277. color: #999999;
  278. line-height: 48rpx;
  279. margin-bottom: 14rpx;
  280. }
  281. }
  282. .list_li_b_b {
  283. .list_li_b_b_t {
  284. display: flex;
  285. justify-content: flex-start;
  286. margin: 30rpx 0 18rpx;
  287. .list_li_b_b_t_n {
  288. width: 655rpx;
  289. display flex;
  290. justify-content flex-start;
  291. .list_li_b_b_t_l {
  292. width: 100rpx;
  293. height: 30rpx;
  294. border-radius: 6rpx;
  295. font-size: 24rpx;
  296. font-family: PingFang SC;
  297. font-weight: 500;
  298. color: #FA8801;
  299. line-height: 30rpx;
  300. background: rgba(250, 136, 1, 0.2);
  301. text-align: center;
  302. margin-right: 12rpx;
  303. }
  304. .list_li_b_b_t_r {
  305. font-size: 28rpx;
  306. font-family: PingFang SC;
  307. font-weight: 500;
  308. color: #333333;
  309. line-height: 30rpx;
  310. }
  311. }
  312. >img {
  313. width: 12rpx;
  314. height: 24rpx;
  315. }
  316. }
  317. .list_li_b_b_b {
  318. font-size: 28rpx;
  319. font-family: PingFang SC;
  320. font-weight: 500;
  321. color: #999999;
  322. line-height: 48rpx;
  323. }
  324. }
  325. }
  326. }
  327. }
  328. /*暂无数据*/
  329. .get-null-box {
  330. height: 100rpx;
  331. line-height: 100rpx;
  332. color: #999;
  333. text-align center
  334. }
  335. }
  336. .bottom-button-box {
  337. border-radius: 20rpx;
  338. margin: 20rpx 50rpx;
  339. width: 650rpx;
  340. height: 100rpx;
  341. line-height: 100rpx;
  342. background: #0183FA;
  343. font-size: 30rpx;
  344. color: #FFFFFF;
  345. text-align center;
  346. }
  347. }
  348. </style>