ZaiZai 2 gadi atpakaļ
vecāks
revīzija
c34479d813
1 mainītis faili ar 20 papildinājumiem un 20 dzēšanām
  1. 20 20
      src/views/system/components/tab-approve.vue

+ 20 - 20
src/views/system/components/tab-approve.vue

@@ -39,7 +39,7 @@
                         </el-checkbox-group>
                         <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" ui="hc-test-drop-table" is-row-drop is-sort @row-drop="rowDropTap" @row-sort="rowSortTap" />
                     </div>
-                
+
                     <div class="approve-box mt-4">
                         <el-checkbox-group v-model="checkList1" @change="handleCheckedApproveChange1">
                             <el-checkbox v-for="item in checkData" :key="item" :label="item.dictName" />
@@ -86,21 +86,21 @@ watch(() => [
 ], ([key, type]) => {
     tabsKey.value = key
     tabsType.value = type
-   
+
 })
 
 onMounted(() => {
     setContextMenu()
     getParentListData()
     getcheckData()
-   
+
 })
 const menuItem = ref({})
 //获取一级科目
 const getParentListData = async ()=>{
     const { error, code, data, msg } = await getParentList({
         type:tabsType.value,
-       
+
     })
     if (!error && code === 200) {
         menuOptions.value = getArrValue(data['records'])
@@ -108,7 +108,7 @@ const getParentListData = async ()=>{
             menuKey.value = menuOptions.value[0]?.id
             menuItem.value.id = menuOptions.value[0]?.id
             getApproveListData()
-           
+
         }
     } else {
         menuOptions.value = []
@@ -127,7 +127,7 @@ const menuChange = (item) => {
     menuKey.value = item?.id
     menuItem.value = item
     getApproveListData()
-  
+
 }
 const getApproveListData = async ()=>{
     checkList.value = []
@@ -152,7 +152,7 @@ const getApproveListData = async ()=>{
     } else {
         checkList1.value = []
     }
-        
+
     } else {
         tableData.value = []
         tableData1.value = []
@@ -196,7 +196,7 @@ const priceModalClose = () => {
 const contextMenuClick = ({ key, item }) => {
     console.log(item, 'item')
     menuKey.value = item?.id
-  
+
     if (key === 'edit') {
         openpriceEdit(2)
         menuKey.value = item?.id
@@ -231,7 +231,7 @@ const saveparentClick = async ()=>{
         dictName:priceform.value?.dictName,
         id:menuKey.value || null,
     })
-   
+
     if (!error && code === 200) {
         window.$message?.success(msg)
         priceModal.value = false
@@ -242,7 +242,7 @@ const saveparentClick = async ()=>{
 }
 const tableColumn = [
     { key: 'roleName', name: '审批岗位', align:'center' },
-  
+
 ]
 const tableData = ref([])
 const tableData1 = ref([])
@@ -254,12 +254,12 @@ const handleCheckedApproveChange = (val)=>{
             if (item.dictName === ele) {
                 tabarr.push({ roleName:ele, roleId: item.id })
             }
-          
+
         })
     })
-   
+
     tableData.value = tabarr
-} 
+}
 const handleCheckedApproveChange1 = (val)=>{
     let tabarr = []
     checkData.value.forEach((item)=>{
@@ -267,25 +267,25 @@ const handleCheckedApproveChange1 = (val)=>{
             if (item.dictName === ele) {
                 tabarr.push({ roleName:ele, roleId: item.id })
             }
-          
+
         })
     })
     tableData1.value = tabarr
-} 
+}
 const tableColumn1 = [
     { key: 'roleName', name: '抄送信息', align:'center' },
-  
+
 ]
 const checkData = ref([])
 const getcheckData = async ()=>{
     const { error, code, data, msg } = await getParentList({
         code:'dept_info',
         type:11,
-       
+
     })
     if (!error && code === 200) {
         checkData.value = getArrValue(data['records'])
-        
+
     } else {
         checkData.value = []
         window.$message?.warning(msg)
@@ -296,7 +296,7 @@ const getcheckData = async ()=>{
 // 行拖拽
 const tableRef = ref(null)
 const rowDropTap = (rows) => {
-    tableData.value = rows
+    tableData.value = []
     tableRef.value?.setData(rows)
 }
 // 点击排序
@@ -324,7 +324,7 @@ const submitApprove = async ()=>{
     saveApprovelaoding.value = false
     if (!error && code === 200) {
         window.$message.success(msg)
-    } 
+    }
 
 }
 </script>