filecenter.vue 5.1 KB

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