UNPKG

w-vue-middle

Version:

统一公共服务组件

96 lines (90 loc) 2.22 kB
/* * @Author: Jason Liu * @Date: 2023-07-17 16:10:28 * @Desc: */ //数据源服务 const $dataSource = require("w-vue-middle/api/appService/dataSource.js"); const sourceSelection = require("../sourceSelection").default; const sourceColumnSelection = require("../sourceColumnSelection").default; import draggable from "vuedraggable"; export default { components: { draggable, sourceSelection, sourceColumnSelection }, props: { value: { type: Object, default: () => { return { dbId: undefined, //数据源ID dbSchema: undefined, //SchemaName tableCode: undefined,//表格ID }; } }, }, data() { return { loading: false, nodeData: this.value, } }, created() { }, methods: { clickColumn(e) { this.$emit("clickColumn", e); }, callColumns(e) { this.$emit("callColumns", e); }, callGetTable(e) { this.$emit("callGetTable", e); }, /** * @Author: Jason Liu * @description: 点击表格时间 */ clickTable(e) { this.$emit("clickTable", e); }, callTable(e) { this.$emit("table", e); }, cloneEntry(row) { return { key: `${(new Date()).getTime()}`, ...row, }; }, /** * @Author: Jason Liu * @description: 开始克隆事件 */ cloneStart(e) { this.$emit("start", e); }, /** * @Author: Jason Liu * @description: 结束克隆事件 */ cloneEnd(e) { this.$emit("end", e); }, /** * @Author: Jason Liu * @description: 移动事件 */ cloneMove(e) { this.$emit("move", e); }, }, watch: { nodeData(val) { this.$emit("input", val); this.$emit("change", val); }, value(val) { this.nodeData = val; } }, }