Commit 843e9654 authored by Mac's avatar Mac

1

parent 38089aef
<template> <template>
<requestgroup></requestgroup>
<div class="q-pa-md customerField"> <div class="q-pa-md customerField">
<table class="payTable"> <table class="payTable">
<thead> <thead>
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<tr v-if="data && data.length==0"> <tr v-if="data && data.length==0">
<td :colspan="8" align="center">暂无数据</td> <td :colspan="8" align="center">暂无数据</td>
</tr> </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 }"> <template #item="{ element }">
<tr> <tr>
<td><span>{{element.Name}}</span></td> <td><span>{{element.Name}}</span></td>
...@@ -58,15 +59,16 @@ ...@@ -58,15 +59,16 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent ,ref, onMounted } from 'vue' import { defineComponent ,ref, onMounted } from 'vue'
import requestgroup from '../../../components/customer/request-group.vue'
import customerService from '@/api/customer' import customerService from '@/api/customer'
import draggable from "vuedraggable"; import draggable from "vuedraggable";
export default defineComponent({ export default defineComponent({
components: { draggable }, components: { draggable ,requestgroup},
setup() { setup() {
const data =ref([]); const data =ref([]);
const dragId =ref(0);
const changePage = () => { const changePage = () => {
customerService.getCustomerFiledList({ Enable: -1 }).then((res) => { customerService.getCustomerFiledList({ Enable: -1 }).then((res) => {
console.log(132,res)
data.value=res.data.Data data.value=res.data.Data
}) })
} }
...@@ -74,6 +76,11 @@ ...@@ -74,6 +76,11 @@
console.log('拖动结束',e) console.log('拖动结束',e)
} }
const getdata = (e:any) => {
console.log('拖动结束22323',e)
dragId.value = e.draggedContext.element.Id
}
onMounted(() => { onMounted(() => {
changePage() changePage()
...@@ -82,6 +89,7 @@ ...@@ -82,6 +89,7 @@
data, data,
changePage, changePage,
datadragEnd, 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