Commit 843e9654 authored by Mac's avatar Mac

1

parent 38089aef
<template>
<requestgroup></requestgroup>
<div class="q-pa-md customerField">
<table class="payTable">
<thead>
......@@ -16,7 +17,7 @@
<tr v-if="data && data.length==0">
<td :colspan="8" align="center">暂无数据</td>
</tr>
<draggable v-model="data" tag="tbody" item-key="Id" @update="datadragEnd" :clone="cloneFun">
<draggable v-model="data" tag="tbody" item-key="Id" :move="getdata" @update="datadragEnd" :clone="cloneFun">
<template #item="{ element }">
<tr>
<td><span>{{element.Name}}</span></td>
......@@ -58,15 +59,16 @@
</template>
<script lang="ts">
import { defineComponent ,ref, onMounted } from 'vue'
import requestgroup from '../../../components/customer/request-group.vue'
import customerService from '@/api/customer'
import draggable from "vuedraggable";
export default defineComponent({
components: { draggable },
components: { draggable ,requestgroup},
setup() {
const data =ref([]);
const dragId =ref(0);
const changePage = () => {
customerService.getCustomerFiledList({ Enable: -1 }).then((res) => {
console.log(132,res)
data.value=res.data.Data
})
}
......@@ -74,6 +76,11 @@
console.log('拖动结束',e)
}
const getdata = (e:any) => {
console.log('拖动结束22323',e)
dragId.value = e.draggedContext.element.Id
}
onMounted(() => {
changePage()
......@@ -82,6 +89,7 @@
data,
changePage,
datadragEnd,
getdata
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment