Browse Source

流程办理页调整

lxf 1 year ago
parent
commit
d972d69781
1 changed files with 38 additions and 3 deletions
  1. 38 3
      src/views/process/dealWith/index.vue

+ 38 - 3
src/views/process/dealWith/index.vue

@@ -1,6 +1,14 @@
 <template>
   <el-card class="box-card">
-    <byTable :source="sourceList.data" :pagination="sourceList.pagination" :config="config" :loading="loading" highlight-current-row @get-list="getList">
+    <byTable
+      :source="sourceList.data"
+      :pagination="sourceList.pagination"
+      :config="config"
+      :loading="loading"
+      :searchConfig="searchConfig"
+      highlight-current-row
+      @get-list="getList"
+      @clickReset="clickReset">
     </byTable>
   </el-card>
 </template>
@@ -19,6 +27,30 @@ const sourceList = ref({
   },
 });
 const { proxy } = getCurrentInstance();
+const searchConfig = computed(() => {
+  return [
+    {
+      type: "select",
+      prop: "status",
+      label: "流程状态",
+      data: [
+        {
+          dictKey: 1,
+          dictValue: "待处理",
+        },
+        {
+          dictKey: 2,
+          dictValue: "已通过",
+        },
+        {
+          dictKey: 3,
+          dictValue: "相关流程",
+        },
+      ],
+      clearable: true,
+    },
+  ];
+});
 const config = computed(() => {
   return [
     {
@@ -65,7 +97,7 @@ const config = computed(() => {
         return [
           {
             attrs: {
-              label: row.status == 0 || row.status == 1 ? "办理" : "查看",
+              label: (row.status != 1 && row.status != 0) || sourceList.value.pagination.status != 1 ? "查看" : "办理",
               type: "primary",
               text: true,
               bg: true,
@@ -73,7 +105,7 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              if (row.status != 1 && row.status != 0) {
+              if ((row.status != 1 && row.status != 0) || sourceList.value.pagination.status != 1) {
                 proxy.$router.push({
                   path: "/platform_manage/process/processApproval",
                   query: {
@@ -134,6 +166,9 @@ onMounted(() => {
   sourceList.value.pagination.status = route.query.type ? route.query.type : 1;
   getList();
 });
+const clickReset = () => {
+  getList({ status: 1 });
+};
 </script>
 
 <style lang="scss" scoped></style>