|
|
|
@ -19,38 +19,45 @@ import Header from '@/views/common/header/formTable/header.vue' |
|
|
|
import SearchSelect from '@/components/lowCode/selectSearch.vue' |
|
|
|
|
|
|
|
import CardPage from '@/views/formTable/page/cardPage.vue' |
|
|
|
import { getFieldRecord } from '@/api/lowCode' |
|
|
|
import { tableButton } from '@/api/common/tableButton' |
|
|
|
import { FormInstance } from 'element-plus' |
|
|
|
|
|
|
|
|
|
|
|
const route = useRoute() |
|
|
|
const router = useRouter() |
|
|
|
|
|
|
|
const appKey = ref<number>(route.query.key) |
|
|
|
const appId = ref<number>(route.query.id) |
|
|
|
const taskTitle = ref<number>(route.query.title) |
|
|
|
const taskId = ref<number>(route.query.formid) |
|
|
|
const taskKey = ref<number>(route.query.formKey) |
|
|
|
const appKey = ref<string>(String(route.query.key)) |
|
|
|
const appId = ref<string>(String(route.query.id)) |
|
|
|
const taskTitle = ref<string>(String(route.query.title)) |
|
|
|
const taskId = ref<string>(String(route.query.formid)) |
|
|
|
const taskKey = ref<string>(String(route.query.formKey)) |
|
|
|
const listLoading = ref(false) |
|
|
|
const appInitData = ref<appPageDataInit>("") |
|
|
|
const appInitData = ref<appPageDataInit>() |
|
|
|
const mastesformjson = ref("") // |
|
|
|
const activeName = ref('1') |
|
|
|
const activeName = ref('1') |
|
|
|
const taskScrollbar = ref() //滚动条 |
|
|
|
const loadingList = ref(false) //是否显示加载 |
|
|
|
const loadText = ref("数据加载中,请稍后......") |
|
|
|
const _scrollTop = ref<number>(0) |
|
|
|
//表单列表 |
|
|
|
const stateList = reactive<tableFormStruct>({ |
|
|
|
tableData: { |
|
|
|
// tableProps: {}, //表格所有参数 |
|
|
|
columns: [], |
|
|
|
config: {}, |
|
|
|
controlBtn:[], |
|
|
|
operateBtn:[] |
|
|
|
// tableProps: {}, //表格所有参数 |
|
|
|
columns: [], |
|
|
|
config: {}, |
|
|
|
controlBtn: [], |
|
|
|
operateBtn: [] |
|
|
|
}, |
|
|
|
searchData: [], |
|
|
|
loading: false, |
|
|
|
attrObj: {}, |
|
|
|
config: { |
|
|
|
pageSize:10, |
|
|
|
searchIsShow:true, |
|
|
|
searchFormIsShow:true, |
|
|
|
openPageMode:"drawer" |
|
|
|
}, |
|
|
|
pageSize: 10, |
|
|
|
searchIsShow: true, |
|
|
|
searchFormIsShow: true, |
|
|
|
openPageMode: "drawer" |
|
|
|
}, |
|
|
|
tagList: {}, |
|
|
|
formId: taskId || '', |
|
|
|
formList: [], // 所有可选表单数据源 |
|
|
|
@ -59,88 +66,88 @@ const stateList = reactive<tableFormStruct>({ |
|
|
|
previewVisible: false, |
|
|
|
tabsName: 'second', |
|
|
|
formFieldList: [], // 表单数据源所有可选字段 |
|
|
|
formApi:{ |
|
|
|
type:"1", |
|
|
|
addApiUrl:"", |
|
|
|
editApiUrl:"", |
|
|
|
delApiUrl:"", |
|
|
|
lookApiUrl:"" |
|
|
|
}, |
|
|
|
formApi: { |
|
|
|
type: "1", |
|
|
|
addApiUrl: "", |
|
|
|
editApiUrl: "", |
|
|
|
delApiUrl: "", |
|
|
|
lookApiUrl: "" |
|
|
|
}, |
|
|
|
dict: {}, |
|
|
|
refreshTable: true, |
|
|
|
view:{ |
|
|
|
list:{ |
|
|
|
status:true, |
|
|
|
isClick:false, |
|
|
|
form:{ |
|
|
|
sortWord:"", |
|
|
|
sortClass:1, |
|
|
|
title:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
date:{ |
|
|
|
status:false, |
|
|
|
isClick:false, |
|
|
|
form:{ |
|
|
|
startTime:"", |
|
|
|
endTime:"", |
|
|
|
dayType:1, |
|
|
|
title:[] |
|
|
|
} |
|
|
|
} |
|
|
|
, |
|
|
|
time:{ |
|
|
|
status:false, |
|
|
|
isClick:false, |
|
|
|
form:{ |
|
|
|
sortWord:"", |
|
|
|
sort:1, |
|
|
|
title:[] |
|
|
|
} |
|
|
|
} |
|
|
|
, |
|
|
|
gantt:{ |
|
|
|
status:false, |
|
|
|
isClick:false, |
|
|
|
form:{ |
|
|
|
startTime:"", |
|
|
|
endTime:"", |
|
|
|
dayType:2, |
|
|
|
sortWord:"", |
|
|
|
sort:1, |
|
|
|
title:[] |
|
|
|
} |
|
|
|
} |
|
|
|
, |
|
|
|
map:{ |
|
|
|
status:false, |
|
|
|
isClick:false, |
|
|
|
form:{ |
|
|
|
mapWord:"", |
|
|
|
sortWord:"", |
|
|
|
sort:1, |
|
|
|
title:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
card:{ |
|
|
|
status:false, |
|
|
|
isClick:false, |
|
|
|
form:{ |
|
|
|
sort:1, |
|
|
|
sortWord:"", |
|
|
|
imgWork:"", |
|
|
|
imgWidth:50, |
|
|
|
imgHeight:50, |
|
|
|
imgBorderRadius:5, |
|
|
|
imgPadding:2, |
|
|
|
titleWork:"", |
|
|
|
describe:"", |
|
|
|
ranks:3, |
|
|
|
title:[] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
view: { |
|
|
|
list: { |
|
|
|
status: true, |
|
|
|
isClick: false, |
|
|
|
form: { |
|
|
|
sortWord: "", |
|
|
|
sortClass: 1, |
|
|
|
title: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
date: { |
|
|
|
status: false, |
|
|
|
isClick: false, |
|
|
|
form: { |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
dayType: 1, |
|
|
|
title: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
time: { |
|
|
|
status: false, |
|
|
|
isClick: false, |
|
|
|
form: { |
|
|
|
sortWord: "", |
|
|
|
sort: 1, |
|
|
|
title: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
gantt: { |
|
|
|
status: false, |
|
|
|
isClick: false, |
|
|
|
form: { |
|
|
|
startTime: "", |
|
|
|
endTime: "", |
|
|
|
dayType: 2, |
|
|
|
sortWord: "", |
|
|
|
sort: 1, |
|
|
|
title: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
map: { |
|
|
|
status: false, |
|
|
|
isClick: false, |
|
|
|
form: { |
|
|
|
mapWord: "", |
|
|
|
sortWord: "", |
|
|
|
sort: 1, |
|
|
|
title: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
card: { |
|
|
|
status: false, |
|
|
|
isClick: false, |
|
|
|
form: { |
|
|
|
sort: 1, |
|
|
|
sortWord: "", |
|
|
|
imgWork: "", |
|
|
|
imgWidth: 50, |
|
|
|
imgHeight: 50, |
|
|
|
imgBorderRadius: 5, |
|
|
|
imgPadding: 2, |
|
|
|
titleWork: "", |
|
|
|
describe: "", |
|
|
|
ranks: 3, |
|
|
|
title: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
isOpen: false |
|
|
|
}) |
|
|
|
|
|
|
|
/** |
|
|
|
@ -317,8 +324,8 @@ const unitIsShow = (val:tableButton,unitName:string) => { |
|
|
|
@ 时间: 2024-11-04 13:59:42 |
|
|
|
@ 功能: 功能按钮动作 |
|
|
|
*/ |
|
|
|
const setUpClick = (val:string,id:string) => { |
|
|
|
console.log("功能按钮动作",val,"----id----->",id,"-----formId---->") |
|
|
|
const setUpClick = (val:any) => { |
|
|
|
console.log("功能按钮动作",val,"----id----->-----formId---->") |
|
|
|
if(val.key == "newAdd"){ |
|
|
|
|
|
|
|
}else{ |
|
|
|
@ -332,7 +339,7 @@ const setUpClick = (val:string,id:string) => { |
|
|
|
id: pageIdAry.value, |
|
|
|
isTrue: 2, |
|
|
|
}; |
|
|
|
softDeletion(sendData).then((data) => { |
|
|
|
softDeletion(sendData).then((data: { mag: any }) => { |
|
|
|
// console.log('cancel!',data) |
|
|
|
ElNotification({ |
|
|
|
title: "温馨提示!", |
|
|
|
@ -483,11 +490,76 @@ const getPageData = () => { |
|
|
|
const openLook = (val:any) => { |
|
|
|
console.log("查看表单详情--->",val) |
|
|
|
} |
|
|
|
const transformOption = (val:any,dataVal:any) => {} |
|
|
|
|
|
|
|
/** |
|
|
|
@ 作者: 秦东 |
|
|
|
@ 时间: 2025-12-22 11:10:54 |
|
|
|
@ 功能: 监听滚动条状态 |
|
|
|
*/ |
|
|
|
const onHandleAppTaskScroll = (event:any) => { |
|
|
|
console.log("onHandleScroll",loadingList.value, event) |
|
|
|
if (loadingList.value === true) { |
|
|
|
return |
|
|
|
} |
|
|
|
let wrapRef = taskScrollbar.value.wrapRef |
|
|
|
taskScrollbar.value.moveY = wrapRef.scrollTop * 100 / wrapRef.clientHeight |
|
|
|
taskScrollbar.value.moveX = wrapRef.scrollLeft * 100 / wrapRef.clientWidth |
|
|
|
let poor = wrapRef.scrollHeight - wrapRef.clientHeight |
|
|
|
if (event.scrollTop + 2 >= poor) { |
|
|
|
_scrollTop.value = event.scrollTop |
|
|
|
|
|
|
|
loadingList.value=true |
|
|
|
state.currentPage++ |
|
|
|
// console.log("searchInfo.page",searchInfo.page++) |
|
|
|
getPageData() |
|
|
|
} |
|
|
|
} |
|
|
|
const requeryList = () => { |
|
|
|
console.log("重置查询列表:") |
|
|
|
state.currentPage = 1 |
|
|
|
tableDataList.value = [] |
|
|
|
nextTick(() => { |
|
|
|
getPageData() |
|
|
|
}) |
|
|
|
} |
|
|
|
/** |
|
|
|
@ 作者: 秦东 |
|
|
|
@ 时间: 2024-11-06 14:23:25 |
|
|
|
@ 功能: 删除按钮 |
|
|
|
*/ |
|
|
|
const delTask = (val:any) => { |
|
|
|
console.log("删除按钮", val,val.masters_key) |
|
|
|
ElMessageBox.confirm( |
|
|
|
'是否要删除此信息?已经删除将不可恢复!请慎重操作', |
|
|
|
'删除提示', |
|
|
|
{ |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
} |
|
|
|
) |
|
|
|
.then(() => { |
|
|
|
let sendData = { |
|
|
|
id: [val.masters_key], |
|
|
|
tableKey:val.tableKey, |
|
|
|
isTrue: 2, |
|
|
|
}; |
|
|
|
softDeletion(sendData).then((data: any) => { |
|
|
|
ElNotification({ |
|
|
|
title: "系统提示!", |
|
|
|
message: data.mag ? data.mag : "删除成功", |
|
|
|
type: "success", |
|
|
|
}); |
|
|
|
requeryList() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => {}) |
|
|
|
} |
|
|
|
</script> |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<Header :header-title="taskTitle" :app-key="appKey" menu-tree="" :call-back-click="true" /> |
|
|
|
<Header :header-title="taskTitle" :app-key="appKey" :call-back-click="true" /> |
|
|
|
<div ref="container" class="table-list-comm"> |
|
|
|
<div class="contentBetween"> |
|
|
|
|
|
|
|
@ -502,7 +574,7 @@ const openLook = (val:any) => { |
|
|
|
{{ item.label }} |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<SvgIcon icon-class="search" :size="20" @click="openSearch" /> |
|
|
|
<SvgIcon icon-class="search" :size="'20px'" @click="openSearch" /> |
|
|
|
|
|
|
|
<el-drawer |
|
|
|
v-model="drawerOpen" |
|
|
|
@ -523,7 +595,7 @@ const openLook = (val:any) => { |
|
|
|
v-model="item.value" |
|
|
|
type="datetime" |
|
|
|
:placeholder="'请选择'+item.label" |
|
|
|
:shortcuts="shortcuts" |
|
|
|
|
|
|
|
v-if="unitIsShow(item,'time')" |
|
|
|
/> |
|
|
|
<SearchSelect |
|
|
|
@ -648,24 +720,9 @@ const openLook = (val:any) => { |
|
|
|
</table> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
<el-card class="taskCardBox" shadow="always"> |
|
|
|
<table> |
|
|
|
<tbody @click="openLook(item)"> |
|
|
|
<tr> |
|
|
|
<td class="cardInfoTitle">发起人:</td> |
|
|
|
<td class="cardInfoTitle"></td> |
|
|
|
</tr> |
|
|
|
</tbody> |
|
|
|
</table> |
|
|
|
<div class="cardFoot contentBetween"> |
|
|
|
<el-checkbox label="" value="Value B" /> |
|
|
|
<el-button-group> |
|
|
|
<el-button type="warning" size="small">修改</el-button> |
|
|
|
<el-button type="danger" size="small" @click="delTask(item)">删除</el-button> |
|
|
|
</el-button-group> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
</el-checkbox-group> |
|
|
|
<div v-if="loadingList" class="loading">{{loadText}}</div> |
|
|
|
</el-scrollbar> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|