Преглед изворни кода

审批流程参数接口调试

duy пре 2 година
родитељ
комит
1245a56b24
2 измењених фајлова са 23 додато и 7 уклоњено
  1. 1 1
      src/api/modules/system/parameter.js
  2. 22 6
      src/views/system/components/tab-approve.vue

+ 1 - 1
src/api/modules/system/parameter.js

@@ -45,5 +45,5 @@ export const getApproveList = (form, msg = false) => httpApi({
 export const submitApproveList = (form, msg = false) => httpApi({
     url: '/api/blade-control/approve/data/dict/submit',
     method: 'post',
-    params: form
+    data: form
 }, msg);

+ 22 - 6
src/views/system/components/tab-approve.vue

@@ -108,6 +108,7 @@ const getParentListData=async()=>{
         if( menuOptions.value.length>0){
             menuKey.value= menuOptions.value[0]?.id
             menuItem.value.id =   menuOptions.value[0]?.id
+            getApproveListData()
            
         }
     } 
@@ -133,14 +134,29 @@ const menuChange = (item) => {
 const getApproveListData=async()=>{
     const { error, code, data,msg } = await getApproveList({
        id:menuKey.value
-       
     })
     if (!error && code === 200) {
-       console.log(data,'data');
+      tableData.value=data?.审批岗位||[]
+      tableData1.value=data?.抄送信息||[]
+      if(tableData.value.length>0){
+        tableData.value.forEach((ele)=>{
+        checkList.value.push(ele.roleName)
+        })
+      }else{
+        checkList.value=[]
+      }
+    if(tableData1.value.length>0){
+        tableData1.value.forEach((ele)=>{
+        checkList1.value.push(ele.roleName)
+      })
+    }else{
+        checkList1.value=[]
+    }
         
     } 
     else {
-       
+        tableData.value=[]
+        tableData1.value=[]
     }
 
 }
@@ -227,7 +243,7 @@ const saveparentClick=async()=>{
     }
 }
 const tableColumn = [
-    {key: 'dictName', name: '审批岗位',align:'center'},
+    {key: 'roleName', name: '审批岗位',align:'center'},
   
 ]
 const tableData = ref([
@@ -263,7 +279,7 @@ const handleCheckedApproveChange1=(val)=>{
     tableData1.value=tabarr
 } 
 const tableColumn1 = [
-    {key: 'dictName', name: '抄送信息',align:'center'},
+    {key: 'roleName', name: '抄送信息',align:'center'},
   
 ]
 const checkData = ref([])
@@ -303,7 +319,7 @@ const saveApprove=()=>{
     subObj.value.ccRoleList=tableData.value
     subObj.value.dictId=menuKey.value
     console.log( subObj.value,' subObj.value');
-    // submitApprove()
+    submitApprove()
 
 
 }