From 6b988bd582bfcd17fee48c476a5a6e5cc172b0d5 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期三, 12 三月 2025 10:08:33 +0800
Subject: [PATCH] dev-2

---
 src/views/workflow/processDefinition/index.vue |   34 +++++++++++++++++++++++++---------
 1 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/src/views/workflow/processDefinition/index.vue b/src/views/workflow/processDefinition/index.vue
index 38ba903..9888892 100644
--- a/src/views/workflow/processDefinition/index.vue
+++ b/src/views/workflow/processDefinition/index.vue
@@ -56,7 +56,7 @@
               <el-col :span="1.5">
                 <el-button type="warning" icon="Download" :disabled="single" @click="handleExportDef">瀵煎嚭</el-button>
               </el-col>
-              <right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
+              <right-toolbar v-model:show-search="showSearch" @query-table="handleQuery"></right-toolbar>
             </el-row>
           </template>
           <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
@@ -116,7 +116,7 @@
               v-model:page="queryParams.pageNum"
               v-model:limit="queryParams.pageSize"
               :total="total"
-              @pagination="handleQuery"
+              @pagination="getPageList"
             />
           </el-tabs>
         </el-card>
@@ -143,13 +143,13 @@
           class="upload-demo"
           drag
           multiple
-          accept="application/zip,application/xml,.bpmn"
+          accept="application/json,application/text"
           :before-upload="handlerBeforeUpload"
           :http-request="handlerImportDefinition"
         >
           <el-icon class="UploadFilled"><upload-filled /></el-icon>
-          <div class="el-upload__text"><em>鐐瑰嚮涓婁紶锛岄�夋嫨BPMN娴佺▼鏂囦欢</em></div>
-          <div class="el-upload__text">浠呮敮鎸� .zip銆�.bpmn20.xml銆乥pmn 鏍煎紡鏂囦欢</div>
+          <div class="el-upload__text"><em>鐐瑰嚮涓婁紶锛岄�夋嫨JSON娴佺▼鏂囦欢</em></div>
+          <div class="el-upload__text">浠呮敮鎸乯son鏍煎紡鏂囦欢</div>
           <div class="el-upload__text">PS:濡傝嫢閮ㄧ讲璇烽儴缃蹭粠鏈」鐩ā鍨嬬鐞嗗鍑虹殑鏁版嵁</div>
         </el-upload>
       </div>
@@ -261,7 +261,7 @@
   formPath: ''
 });
 onMounted(() => {
-  handleQuery();
+  getPageList();
   getTreeselect();
 });
 
@@ -323,6 +323,18 @@
   multiple.value = !selection.length;
 };
 //鍒嗛〉
+const getPageList = async () => {
+  console.log(proxy.$route.query.activeName)
+  if (proxy.$route.query.activeName) {
+    activeName.value = proxy.$route.query.activeName;
+  }
+  if (activeName.value === '0') {
+    getList();
+  } else {
+    getUnPublishList();
+  }
+};
+//鍒嗛〉
 const getList = async () => {
   loading.value = true;
   const resp = await listDefinition(queryParams.value);
@@ -358,6 +370,7 @@
   loading.value = true;
   await publish(row.id).finally(() => (loading.value = false));
   processDefinitionDialog.visible = false;
+  activeName.value = "0"
   await handleQuery();
   proxy?.$modal.msgSuccess('鍙戝竷鎴愬姛');
 };
@@ -404,6 +417,7 @@
     .then(() => {
       uploadDialog.visible = false;
       proxy?.$modal.msgSuccess('閮ㄧ讲鎴愬姛');
+      activeName.value = "1"
       handleQuery();
     })
     .finally(() => {
@@ -420,7 +434,8 @@
     path: `/workflow/design/index`,
     query: {
       definitionId: row.id,
-      disabled: false
+      disabled: false,
+      activeName: activeName.value
     }
   });
 };
@@ -434,7 +449,8 @@
     path: `/workflow/design/index`,
     query: {
       definitionId: row.id,
-      disabled: true
+      disabled: true,
+      activeName: activeName.value
     }
   });
 };
@@ -496,6 +512,6 @@
 
 /** 瀵煎嚭鎸夐挳鎿嶄綔 */
 const handleExportDef = () => {
-  proxy?.download(`/workflow/definition/exportDef/${ids.value[0]}`, {}, `${flowCodeList.value[0]}.xml`);
+  proxy?.download(`/workflow/definition/exportDef/${ids.value[0]}`, {}, `${flowCodeList.value[0]}.json`);
 };
 </script>

--
Gitblit v1.9.3