filecenter.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <template name="filecenter">
  2. <view class="container">
  3. <u-navbar
  4. title="文件中心"
  5. :safeAreaInsetTop="false"
  6. style="margin-top: 30px"
  7. leftIcon=""
  8. >
  9. </u-navbar>
  10. <view class="main">
  11. <u-subsection
  12. :list="list"
  13. mode="subsection"
  14. :current="curNow"
  15. @change="sectionChange"
  16. ></u-subsection>
  17. <u-list>
  18. <u-list-item
  19. class="itemback"
  20. v-for="(item, index) in fileData"
  21. :key="index"
  22. >
  23. <view class="">
  24. <view class="content flcard">
  25. <view
  26. class="demo-layout bg-purple-light"
  27. style="margin-bottom: 20rpx"
  28. >
  29. <view style="margin-top: 10rpx">
  30. <text class="text-style1">{{ item.fileName }}</text>
  31. </view>
  32. </view>
  33. <view class="datacard laiyuan">
  34. <view style="margin: 20rpx 20rpx">
  35. <text class="text-style">{{ item.fileSource }}</text>
  36. </view>
  37. <view style="margin: 20rpx 20rpx; font-size: small"
  38. >文件来源</view
  39. >
  40. </view>
  41. <view class="datacard zhuangtai">
  42. <view style="margin: 20rpx 20rpx">
  43. <text class="text-style">{{ item.bpmStatus_dictText }}</text>
  44. </view>
  45. <view style="margin: 20rpx 20rpx; font-size: small"
  46. >审批状态</view
  47. >
  48. </view>
  49. <view class="datacard user">
  50. <view style="margin: 20rpx 20rpx">
  51. <text class="text-style">{{ item.createBy }}</text>
  52. </view>
  53. <view style="margin: 20rpx 20rpx; font-size: small"
  54. >创建人</view
  55. >
  56. </view>
  57. <view class="datacard time">
  58. <view style="margin: 20rpx 20rpx">
  59. <text class="text-style">{{ item.createTime }}</text>
  60. </view>
  61. <view style="margin: 20rpx 20rpx; font-size: small"
  62. >上传时间</view
  63. >
  64. </view>
  65. </view>
  66. </view>
  67. </u-list-item>
  68. </u-list>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. import api from "@/api/api";
  74. export default {
  75. components: {},
  76. name: "filecenter",
  77. watch: {},
  78. data() {
  79. return {
  80. list: [{ name: "全部" }, { name: "待审批" }, { name: "已审批" }],
  81. curNow: 0,
  82. fileData: [],
  83. };
  84. },
  85. mounted() {
  86. this.getFileInfo();
  87. },
  88. methods: {
  89. sectionChange(index) {
  90. this.curNow = index;
  91. },
  92. getFileInfo() {
  93. var params = {
  94. bpmStatus: "",
  95. column: "createTime",
  96. fileSuffix: "",
  97. likeFileName: "",
  98. pageNo: 1,
  99. pageSize: 10000,
  100. parentId: "",
  101. selectFlag: true,
  102. sysOrgCode: "",
  103. };
  104. new Promise((resolve, reject) => {
  105. api
  106. .getFileInfo(params)
  107. .then((response) => {
  108. if (response.data.code == 200) {
  109. this.fileData = response.data.result.records;
  110. } else {
  111. reject(response);
  112. }
  113. })
  114. .catch((error) => {
  115. console.log("catch===>response", response);
  116. reject(error);
  117. });
  118. });
  119. },
  120. },
  121. };
  122. </script>
  123. <style scoped>
  124. >>> .u-navbar--fixed {
  125. margin-top: 20px;
  126. }
  127. .main {
  128. margin-top: 100rpx;
  129. display: flex;
  130. flex-direction: column;
  131. }
  132. .itemback {
  133. padding: 20rpx;
  134. background-color: #ffffff;
  135. margin-bottom: 5rpx;
  136. }
  137. .text-style {
  138. color: #3787fe;
  139. font-weight: bold;
  140. }
  141. .text-style1 {
  142. color: #000000;
  143. font-size: large;
  144. font-weight: bold;
  145. }
  146. .datacard {
  147. width: 48%;
  148. margin: 1%;
  149. float: left;
  150. height: 120rpx;
  151. border-radius: 10px;
  152. }
  153. .time {
  154. background: url(/static/filecenter/time.png),
  155. linear-gradient(
  156. to right,
  157. rgba(55, 135, 254, 0.08),
  158. rgba(4, 184, 255, 0.08),
  159. rgba(60, 161, 237, 0.08)
  160. );
  161. background-size: auto 100%;
  162. background-position: right;
  163. background-repeat: no-repeat;
  164. }
  165. .laiyuan {
  166. background: url(/static/filecenter/laiyuan.png),
  167. linear-gradient(
  168. to right,
  169. rgba(55, 135, 254, 0.08),
  170. rgba(4, 184, 255, 0.08),
  171. rgba(60, 161, 237, 0.08)
  172. );
  173. background-size: auto 100%;
  174. background-position: right;
  175. background-repeat: no-repeat;
  176. }
  177. .user {
  178. background: url(/static/filecenter/user.png),
  179. linear-gradient(
  180. to right,
  181. rgba(55, 135, 254, 0.08),
  182. rgba(4, 184, 255, 0.08),
  183. rgba(60, 161, 237, 0.08)
  184. );
  185. background-size: auto 100%;
  186. background-position: right;
  187. background-repeat: no-repeat;
  188. }
  189. .zhuangtai {
  190. background: url(/static/filecenter/zhuangtai.png),
  191. linear-gradient(
  192. to right,
  193. rgba(55, 135, 254, 0.08),
  194. rgba(4, 184, 255, 0.08),
  195. rgba(60, 161, 237, 0.08)
  196. );
  197. background-size: auto 100%;
  198. background-position: right;
  199. background-repeat: no-repeat;
  200. }
  201. .datacard1 {
  202. width: 100%;
  203. margin: 1%;
  204. float: left;
  205. height: 100rpx;
  206. text-align: center;
  207. border-radius: 10px;
  208. background: linear-gradient(
  209. to right,
  210. rgba(55, 135, 254, 0.08),
  211. rgba(4, 184, 255, 0.08),
  212. rgba(60, 161, 237, 0.08)
  213. );
  214. }
  215. </style>