2025-09-16 15:50:24 +08:00
|
|
|
<template>
|
|
|
|
<div class="dialog" v-if="dialogForm">
|
|
|
|
<div class="head_box">
|
|
|
|
<span class="title">{{ title }}规则 </span>
|
|
|
|
<div>
|
|
|
|
<el-button type="primary" size="small" :loading="loading" @click="submit" v-show="title != '详情'">保存</el-button>
|
|
|
|
<el-button size="small" @click="close">关闭</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form_cnt">
|
2025-09-19 23:10:52 +08:00
|
|
|
<VueDraggable @update="onUpdate"
|
|
|
|
@add="onAdd"
|
|
|
|
@remove="remove">
|
|
|
|
<el-button type="primary" v-for="(item,index) in listBut" :key="index">{{ item }}</el-button>
|
|
|
|
</VueDraggable>
|
|
|
|
<VueDraggable>
|
2025-09-16 15:50:24 +08:00
|
|
|
<el-button type="primary" v-for="(item,index) in listBut" :key="index">{{ item }}</el-button>
|
2025-09-19 23:10:52 +08:00
|
|
|
</VueDraggable>
|
2025-09-16 15:50:24 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import { reactive, ref } from 'vue'
|
|
|
|
import FormMessage from "@/components/aboutTable/FormMessage.vue";
|
2025-09-20 19:55:19 +08:00
|
|
|
// import { VueDraggable } from 'vue-draggable-plus'
|
2025-09-16 15:50:24 +08:00
|
|
|
const dialogForm = ref(false)
|
|
|
|
const title = ref("新增")
|
|
|
|
const init = (type, row) => {
|
|
|
|
dialogForm.value = true
|
|
|
|
if (type == 'edit') {
|
|
|
|
title.value = "编辑"
|
|
|
|
} else if (type == 'add') {
|
|
|
|
title.value = "新增"
|
|
|
|
} else {
|
|
|
|
title.value = "详情"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const loading = ref(false)
|
|
|
|
// 新增
|
|
|
|
const submit = () => {
|
|
|
|
loading.value = true
|
|
|
|
}
|
|
|
|
const listBut = ref(["物品", "人员", "组织", "次数", "事件", "地点", "整情"])
|
|
|
|
// 关闭
|
|
|
|
const close = () => {
|
|
|
|
dialogForm.value = false
|
|
|
|
}
|
2025-09-19 23:10:52 +08:00
|
|
|
|
|
|
|
const onUpdate = (evt) => {
|
|
|
|
console.log(evt)
|
|
|
|
}
|
|
|
|
// 新增
|
|
|
|
const onAdd = (evt) => {
|
|
|
|
console.log(evt)
|
|
|
|
}
|
|
|
|
// 删除
|
|
|
|
const remove = (evt) => {
|
|
|
|
console.log(evt)
|
|
|
|
}
|
2025-09-16 15:50:24 +08:00
|
|
|
defineExpose({
|
|
|
|
init
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|