Jelajahi Sumber

项目列表新增键
接口调用方法优化
审核详情页面样式调整

XuZinan 3 tahun lalu
induk
melakukan
a49ebc0609
3 mengubah file dengan 21 tambahan dan 8 penghapusan
  1. 3 3
      pages/Project/detail.vue
  2. 18 4
      pages/Project/list.vue
  3. 0 1
      services/project.js

+ 3 - 3
pages/Project/detail.vue

@@ -53,6 +53,9 @@
     </view>
 
     <view class="group">
+      <button v-if="canAuth()" @click="onHandleAudit(0)" class="commit">
+        审核拒绝
+      </button>
       <button
         v-if="canAuth()"
         @click="onHandleAudit(1)"
@@ -61,9 +64,6 @@
       >
         审核通过
       </button>
-      <button v-if="canAuth()" @click="onHandleAudit(0)" class="commit">
-        审核拒绝
-      </button>
     </view>
   </view>
 </template>

+ 18 - 4
pages/Project/list.vue

@@ -21,6 +21,12 @@
         {{ `${project.project_name}(${project.project_full_code})` }}
       </view>
     </view>
+
+    <uni-fab
+      :horizontal="'right'"
+      :popMenu="false"
+      @fabClick="onClickAdd()"
+    ></uni-fab>
   </view>
 </template>
 
@@ -37,16 +43,17 @@ export default {
     return {
       checkself: [],
       projectList: [],
+      projectFilter: { pageSize: 99999 },
       self: [{ text: "只看自己", value: 0 }],
     };
   },
   onShow() {
-    this.getProject({});
+    this.getProject();
   },
   methods: {
-    async getProject(params) {
+    async getProject() {
       let res = {};
-      res = await queryProject(params);
+      res = await queryProject(this.projectFilter);
       this.projectList = res.data.list;
     },
     async onClickProject(project) {
@@ -56,8 +63,15 @@ export default {
       });
     },
     checkSelf() {
-      this.getProject({
+      this.projectFilter = {
+        ...this.projectFilter,
         filter_type: this.checkself.length,
+      };
+      this.getProject();
+    },
+    onClickAdd() {
+      uni.navigateTo({
+        url: "./add",
       });
     },
   },

+ 0 - 1
services/project.js

@@ -3,7 +3,6 @@ import request from "./request";
 export async function queryProject(params) {
   return await request("/v2/approval/record", "GET", {
     ...params,
-    pageSize: 99999,
   });
 }