gradingControl.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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=='年管控'? '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.endDate}}</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.endDate=parseTime(item2.endDate, "{y}-{m}-{d} {h}:{i}:{s}");
  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. .green {
  221. color: #11BA25;
  222. background: rgba(17, 186, 37, 0.2);
  223. }
  224. >img {
  225. width: 12rpx;
  226. height: 24rpx;
  227. }
  228. }
  229. .list_li_b_t_b {
  230. font-size: 28rpx;
  231. font-family: PingFang SC;
  232. font-weight: 500;
  233. color: #999999;
  234. line-height: 48rpx;
  235. margin-bottom: 14rpx;
  236. display: block;
  237. overflow: hidden;
  238. text-overflow: ellipsis;
  239. white-space: nowrap;
  240. }
  241. }
  242. .list_li_b_b {
  243. .list_li_b_b_t {
  244. display: flex;
  245. justify-content: flex-start;
  246. margin: 30rpx 0 18rpx;
  247. .list_li_b_b_t_l {
  248. width: 100rpx;
  249. height: 30rpx;
  250. border-radius: 6rpx;
  251. font-size: 24rpx;
  252. font-family: PingFang SC;
  253. font-weight: 500;
  254. color: #FA8801;
  255. line-height: 30rpx;
  256. background: rgba(250, 136, 1, 0.2);
  257. text-align: center;
  258. margin-right: 12rpx;
  259. }
  260. .list_li_b_b_t_r {
  261. font-size: 28rpx;
  262. font-family: PingFang SC;
  263. font-weight: 500;
  264. color: #333333;
  265. line-height: 30rpx;
  266. }
  267. }
  268. .list_li_b_b_b {
  269. font-size: 28rpx;
  270. font-family: PingFang SC;
  271. font-weight: 500;
  272. color: #999999;
  273. line-height: 48rpx;
  274. }
  275. }
  276. }
  277. }
  278. }
  279. /*暂无数据*/
  280. .get-null-box {
  281. height: 100rpx;
  282. line-height: 100rpx;
  283. color: #999;
  284. text-align: center;
  285. }
  286. }
  287. .bottom-button-box {
  288. border-radius: 20rpx;
  289. margin: 20rpx 50rpx;
  290. width: 650rpx;
  291. height: 100rpx;
  292. line-height: 100rpx;
  293. background: #0183FA;
  294. font-size: 30rpx;
  295. color: #FFFFFF;
  296. text-align: center;
  297. }
  298. }
  299. </style>