Quellcode durchsuchen

[Feature] 工单增加 挂起、激活、终止 操作 V1.1

AA vor 7 Monaten
Ursprung
Commit
509d929c30

+ 3 - 1
.gitignore

@@ -2,4 +2,6 @@
 node_modules
 dist
 .idea
-dist.zip
+dist.zip
+
+package-lock.json

+ 5 - 0
config/btn-icon-config.js

@@ -13,6 +13,11 @@ const btnAttr = [
     ["查询", "el-icon-search"],
     ["重置", "el-icon-refresh-right"],
     ["撤回", "icon icon-return2"],
+    //20241101 add status start
+    ["激活", "icon el-icon-video-play"],
+    ["挂起", "icon el-icon-video-pause"],
+    ["终止", "icon el-icon-close"],
+    //20241101 add status end
     ["用户信息", "el-icon-document"],
     ["管理范围", "el-icon-edit"],
     ["资源获取", "el-icon-refresh"],

+ 32 - 1
src/api/permission-selfhelp-manage.js

@@ -143,4 +143,35 @@ export function rediListCheck(data) {
      method: "POST",
      data
   })
-}
+}
+
+// 20241101 add status start
+
+// 申请挂起
+export function suspendApply(params) {
+  return request({
+    url: `${baseUrl}/authApplySuspend`,
+    method: 'GET',
+    params
+  });
+}
+
+// 申请激活
+export function activateApply(params) {
+  return request({
+    url: `${baseUrl}/authApplyActivate`,
+    method: 'GET',
+    params
+  });
+}
+
+
+// 申请终止
+export function stopApply(params) {
+  return request({
+    url: `${baseUrl}/authApplyStop`,
+    method: 'GET',
+    params
+  });
+}
+//20241101 add status end

+ 9 - 0
src/pages/permission-selfhelp-manage/component/comments-table/main.js

@@ -19,6 +19,15 @@ export default {
             }, {
                 value: 'recall',
                 label: '撤回'
+            }, {
+                value: 'suspend',
+                label: '挂起'
+            }, {
+                value: 'activate',
+                label: '激活'
+            }, {
+                value: 'redo',
+                label: '终止'
             }],
             tableData: []
         };

+ 3 - 2
src/pages/permission-selfhelp-manage/component/detail.vue

@@ -12,7 +12,7 @@
         <!-- 审批意见 -->
         <comments-table class="b-mt-1" :applyOrdNo="applyOrdNo"></comments-table>
       </el-tab-pane>
-      <el-tab-pane label="流程图" name="second">
+      <el-tab-pane label="流程图" name="second" v-if="flowStatus !== '8'">
         <flow-chart :key="chartKey" :applyOrdNo="applyOrdNo"></flow-chart>
       </el-tab-pane>
       <el-tab-pane label="流程状态" name="third">
@@ -32,7 +32,8 @@ import basicForm from './basic-form.vue';
 import commentsTable from './comments-table';
 export default {
   props: {
-    applyOrdNo: [String]
+    applyOrdNo: [String],
+    flowStatus: String
   },
   components: {
     flowChart,

+ 51 - 4
src/pages/permission-selfhelp-manage/index.vue

@@ -11,7 +11,7 @@
     <operate-bar :pageOptList="pageOptList" @submitPageOpt="receviceOpt"></operate-bar>
     <!-- 表格 -->
     <new-table ref="table" :tableUrl="tableUrl" :tableHeader="tableHeader" :condition="condition">
-      <dg-table-column label="操作" align="center">
+      <dg-table-column label="操作" align="center" :width="180">
         <template slot-scope="{ row }">
           <div class="u-table__operation">
             <el-tooltip content="详情" effect="dark" placement="top-end">
@@ -23,7 +23,18 @@
             <el-tooltip content="撤回" effect="dark" placement="top-end" v-if="row.showRecall">
               <i :class="'撤回' | optIcon" @click="handleRecall(row)"></i>
             </el-tooltip>
-            <el-tooltip content="删除" effect="dark" placement="top-end">
+            <!--20241101 add status start-->
+            <el-tooltip content="激活" effect="dark" placement="top-end" v-if="row.showActivate">
+              <i :class="'激活' | optIcon" @click="handleActivate(row)"></i>
+            </el-tooltip>
+            <el-tooltip content="挂起" effect="dark" placement="top-end" v-if="row.showSuspend">
+              <i :class="'挂起' | optIcon" @click="handleSuspend(row)"></i>
+            </el-tooltip>
+            <el-tooltip content="终止" effect="dark" placement="top-end" v-if="row.showStop">
+              <i :class="'终止' | optIcon" @click="handleStop(row)"></i>
+            </el-tooltip>
+            <!--20241101 add status end-->
+            <el-tooltip content="删除" effect="dark" placement="top-end" v-if="!row.showActivate">
               <i :class="'删除' | optIcon" @click="handleDelete(row)"></i>
             </el-tooltip>
           </div>
@@ -35,7 +46,7 @@
 <script>
 import newTable from '@/components/new-table';
 import { tableHeader } from './DataConfig';
-import { tableUrl, delApply, recallApply } from '@/api/permission-selfhelp-manage';
+import { tableUrl, delApply, recallApply, suspendApply, activateApply, stopApply} from '@/api/permission-selfhelp-manage';
 import operateBar from '@/components/operate-bar';
 import searchBar from '@/components/search-bar';
 import { searchOpt } from '@/mixins/page-opt';
@@ -120,7 +131,8 @@ export default {
         title: '详情',
         props: {
           applyOrdNo: row.applyOrdNo,
-          type: 'detail'
+          type: 'detail',
+          flowStatus: row.flowStatus
         },
         content: require('./component/detail.vue'),
         area: ['1280px', '900px'],
@@ -159,7 +171,42 @@ export default {
           this.handleSearch();
         });
       });
+    },
+    // 20241101 add status start
+    handleActivate(row) {
+      this.$dgConfirm(`是否确定激活这条数据!`, '提示', {}).then(() => {
+        const params = {
+          applyOrdNo: row.applyOrdNo
+        };
+        activateApply(params).then((res) => {
+          this.$message.success('激活成功!');
+          this.handleSearch();
+        });
+      });
+    },
+    handleSuspend(row) { 
+      this.$dgConfirm(`是否确定挂起这条数据!`, '提示', {}).then(() => {
+        const params = {
+          applyOrdNo: row.applyOrdNo
+        };
+        suspendApply(params).then((res) => {
+          this.$message.success('挂起成功!');
+          this.handleSearch();
+        });
+      });
+    },
+    handleStop(row) {
+      this.$dgConfirm(`是否确定终止这条数据!`, '提示', {}).then(() => {
+        const params = {
+          applyOrdNo: row.applyOrdNo
+        };
+        stopApply(params).then((res) => {
+          this.$message.success('终止成功!');
+          this.handleSearch();
+        });
+      });
     }
+    // 20241101 add status end
   },
   created() {},
   mounted() {}