diff --git a/src/components/DesignForm/tableListPage/index.vue b/src/components/DesignForm/tableListPage/index.vue index 6d4d1d05e..cd1cacdeb 100644 --- a/src/components/DesignForm/tableListPage/index.vue +++ b/src/components/DesignForm/tableListPage/index.vue @@ -18,6 +18,7 @@ import { softDeletion,retractRunWorkFlow } from '@/api/taskapi/management' //引入组件 import FormPageCont from '@/components/DesignForm/tableListPage/formPageCont.vue' +import TableFlow from '@/views/sysworkflow/lowcodepage/pageFlow/tableFlow.vue' const props = withDefaults( defineProps<{ @@ -36,7 +37,9 @@ const props = withDefaults( query?: { [key: string]: any } // 一些附加的请求参数 autoLoad?: boolean // 初始时自动请求加载数据 delKey?: string // 删除标识 - lookPageIsShow?:boolean + lookPageIsShow?:boolean, + versionid?:string, + versiontitle?:string, }>(), { showPage: true, @@ -55,6 +58,12 @@ const props = withDefaults( formId:() =>{ return "" }, + versionid:() =>{ + return "" + }, + versiontitle:() =>{ + return "" + }, fixedBottomScroll: true, autoLoad: true, delKey: 'id', @@ -76,6 +85,7 @@ const designStore = useDesignFormStore() const route = useRoute() const router = useRouter() const tableDataList = ref([]) // 表格行数据 +const openTaskDrawer = ref(false) //新增数据 const state = reactive({ loading: false, @@ -167,9 +177,40 @@ const resetFields = (formEl: FormInstance | undefined) => { @ 功能: 功能按钮动作 */ const setUpClick = (val:string,id:string) =>{ - console.log("功能按钮动作",val) + console.log("功能按钮动作",val,"----id----->",props.versionid,"-----formId---->",props.versiontitle) + if(val.key == "newAdd"){ + drawerWith.value = container.value?.clientWidth + openTaskDrawer.value = true + }else{ + if(idList.value.length > 0){ + ElMessageBox.confirm("确认删除此数据项?删除后不可恢复!", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + let sendData = { + id:idList.value, + isTrue:2 + } + softDeletion(sendData) + .then((data)=>{ + console.log('cancel!',data) + ElNotification({ + title: '温馨提示!', + message: data.mag, + type: 'success', + }) + getPageData() + }) + }); + }else{ + ElMessage.error("你还未选中要删除的项目!"); + } + + } } + /** @ 作者: 秦东 @ 时间: 2024-04-01 13:30:06 @@ -178,6 +219,16 @@ const setUpClick = (val:string,id:string) =>{ const selectionChange = (row: any) => { state.selectionChecked = row emits('selectionChange', row) + console.log('selectionChange', row) + idList.value.length = 0 + console.log('idList.value-1-->', idList.value) + if(row && row.length>0){ + row.forEach((item:any) => { + console.log('item', item.masters_key) + idList.value.push(item.masters_key.toString()) + }) + } + console.log('idList.value--->', idList.value) } /** @ 作者: 秦东 @@ -725,6 +776,9 @@ const editFormSendFlow = (val:any) => { + + +