Parcourir la source

退回逻辑改造

songxy il y a 10 mois
Parent
commit
ee449bb3d1

+ 5 - 4
client/src/views/OaSystem/officeCenter/mainOfficeCenter/callback.ts

@@ -44,13 +44,14 @@ const useCallback = (option: CallbackOptionType) => {
       }
     })
   }
-  const callbackSumbit = () => {
-    const backToActivitys = callbacks.value.map((item) => {
-      return {
+  const callbackSumbit = (index: number) => {
+    const item = callbacks.value[index]
+    const backToActivitys = [
+      {
         callbackActTempId: item['activityTemplateId'],
         callbackActInsId: item['id']
       }
-    })
+    ]
     checkReturnMethod({
       paramMap: callbackForm,
       backToActivitys

+ 1 - 0
client/src/views/OaSystem/officeCenter/mainOfficeCenter/index.scss

@@ -139,6 +139,7 @@
       font-size: 14px;
       border-radius: 4px;
       margin-right: 10px;
+      cursor: pointer;
       &.active {
       background-color: #409eff;
       color: #fff;

+ 10 - 2
client/src/views/OaSystem/officeCenter/mainOfficeCenter/index.vue

@@ -247,8 +247,9 @@
             <li
               v-for="(item, index) in callbacks"
               :key="index"
-              :class="{ active: index === 0 }"
+              :class="{ active: backActivityIndex === index }"
               :icon="Edit"
+              @click="selectCActivityHandle(item, index)"
             >
               <el-icon style="margin-right: 2px">
                 <DArrowRight />
@@ -270,7 +271,7 @@
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="callbackVisible = false">关闭</el-button>
-          <el-button type="primary" @click="callbackSumbit">提交</el-button>
+          <el-button type="primary" @click="callbackSumbitHandle">提交</el-button>
         </div>
       </template>
     </el-dialog>
@@ -492,6 +493,13 @@ const {
     initHandleCaseCenterData()
   }
 })
+const backActivityIndex = ref<number>(0)
+const selectCActivityHandle = (item, index) => {
+  backActivityIndex.value = index
+}
+const callbackSumbitHandle = () => {
+  callbackSumbit(backActivityIndex.value)
+}
 /**
  * 初始化退回Hook
  */