|
@@ -366,6 +366,7 @@ const rowDropTap = (rows) => {
|
|
|
sorttableData.value = [] // 先清空,否则排序会异常
|
|
|
nextTick(() => {
|
|
|
tableRef.value?.setData(rows)
|
|
|
+ sorttableData.value = rows
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -377,7 +378,20 @@ const rowSortTap = (rows) => {
|
|
|
})
|
|
|
}
|
|
|
const sortLoding = ref(false)
|
|
|
-const saveSortClick = ()=>{
|
|
|
-
|
|
|
+const saveSortClick = async ()=>{
|
|
|
+ console.log(sorttableData.value, 'sorttableData.value')
|
|
|
+ const ids = arrToId(sorttableData.value)
|
|
|
+ //发起请求
|
|
|
+ sortLoding.value = true
|
|
|
+ const { error, code, msg } = await payApi.getSort({ ids })
|
|
|
+ sortLoding.value = false
|
|
|
+ //判断状态
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window?.$message?.success('保存成功')
|
|
|
+ sortModal.value = false
|
|
|
+ getTableData()
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|