gradingControl.vue 7.9 KB

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