Browse Source

组件资源申请完成

sujunling 2 years ago
parent
commit
e3b5c8d791
1 changed files with 25 additions and 26 deletions
  1. 25 26
      src/views/assembly/library/index.vue

+ 25 - 26
src/views/assembly/library/index.vue

@@ -47,7 +47,7 @@
           //   },
           // },
           {
-            label: '浏览',
+            label: '提交申请',
             icon: '' /**clarity:note-edit-line*/,
             // ifShow: record.servicealiasname,
             // ifShow: ((action) => action.servicealiasname),
@@ -89,12 +89,12 @@ import { RoleEnum } from '/@/enums/roleEnum';
 import { Authority } from '/@/components/Authority';
 import { useBatchDelete } from '/@/hooks/web/useBatchDelete';
 import { useMessage } from '/@/hooks/web/useMessage';
-import { Switch, Popconfirm } from 'ant-design-vue';
+import { Switch, Popconfirm, message } from 'ant-design-vue';
 import { list, deleteService, getAssemblyLibs } from '/@/api/dataAdmin/assembly';
 //操作申请库资源
 // import { getResInCar, clearResInCar, deleteResInCar } from '/@/api/resource/plat';
 import Moment from 'moment'
-import { submitExamine } from '/@/api/resource/examine';
+import { queryFlowInfoPage, submitExamine } from '/@/api/resource/examine';
 
 export default defineComponent({
   name: 'RoleManagement',
@@ -215,34 +215,33 @@ export default defineComponent({
 
     })
 
-    function submitApply(i) {
-      console.log("submitApply:", i)
+    function submitApply(e) {
+      console.log("submitApply:", e)
       queryFlowInfoPage({
         page: 1,
         rows: 1000000
       }).then(flowRes => {
-        // console.log("flowRes:", flowRes)
-        // if (flowRes && flowRes.length) {
-        //   var flow = flowRes.filter(i => i.FLOWNAME === '组件资源授权');
-        //   if (flow.length) {
-        //     let params = {
-        //       bussInfo: {
-        //         bussname: '组件资源上传',//业务名称
-        //         flowid: flow[0].id,//流程id
-        //         serverids: e.serviceid//资源id
-        //       }
-        //     }
-        //     submitExamine(params).then(res => {
-        //       if (res.resp_code === 0 && res.resp_msg === '提交成功') {
-        //         message.success('申请成功')
-        //         reload();
-        //       } else {
-        //         message.error('申请失败')
-        //       }
-        //     })
-        //   }
+        if (flowRes && flowRes.length) {
+          var flow = flowRes.filter(i => i.FLOWNAME === '组件资源授权');
+          if (flow.length) {
+            let params = {
+              bussInfo: {
+                bussname: '组件资源授权',//业务名称
+                flowid: flow[0].id,//流程id
+                serverids: e.resInfo.SERVICEID//资源id
+              }
+            }
+            submitExamine(params).then(res => {
+              if (res.resp_code === 0 && res.resp_msg === '提交成功') {
+                message.success('申请成功')
+                reload();
+              } else {
+                message.error('申请失败')
+              }
+            })
+          }
 
-        // }
+        }
       })
     }