|
|
|
|
@ -93,6 +93,7 @@
|
|
|
|
|
getFormsPageData,
|
|
|
|
|
delFormsData,
|
|
|
|
|
getFormData,
|
|
|
|
|
exportForm,
|
|
|
|
|
} from '@/api/formrender/index';
|
|
|
|
|
import { getOutKeyList } from '@/api/formdesign/index';
|
|
|
|
|
import { getGeom } from '@/api/sys/layerManagement';
|
|
|
|
|
@ -113,12 +114,12 @@
|
|
|
|
|
const mapFormData = ref<Object>({});
|
|
|
|
|
const { createConfirm, createMessage } = useMessage();
|
|
|
|
|
const route = useRoute();
|
|
|
|
|
const btnArr: any = [
|
|
|
|
|
const btnArr: any = ref([
|
|
|
|
|
{ label: '新增', prop: 'Add', class: 'primary' },
|
|
|
|
|
{ label: '编辑', prop: 'Edit', class: 'success' },
|
|
|
|
|
{ label: '删除', prop: 'Delete', class: 'error' },
|
|
|
|
|
{ label: '详情', prop: 'Details', class: 'default' },
|
|
|
|
|
];
|
|
|
|
|
]);
|
|
|
|
|
const mapSetData = ref({
|
|
|
|
|
width: 100,
|
|
|
|
|
});
|
|
|
|
|
@ -149,6 +150,7 @@
|
|
|
|
|
const isUpdate = ref(false); //是否是编辑
|
|
|
|
|
const infoUseSubTableData = ref();
|
|
|
|
|
const infoUseMainTableData = ref({});
|
|
|
|
|
const exportParams: any = ref();
|
|
|
|
|
// 展示的图层列表
|
|
|
|
|
const layers = reactive();
|
|
|
|
|
const geometryForm = ref({});
|
|
|
|
|
@ -289,6 +291,7 @@
|
|
|
|
|
},
|
|
|
|
|
queryJson: JSON.stringify(querys),
|
|
|
|
|
};
|
|
|
|
|
exportParams.value = temp;
|
|
|
|
|
return temp;
|
|
|
|
|
},
|
|
|
|
|
afterFetch: () => {
|
|
|
|
|
@ -571,6 +574,29 @@
|
|
|
|
|
case 'Import':
|
|
|
|
|
break;
|
|
|
|
|
case 'Export':
|
|
|
|
|
let params = exportParams.value;
|
|
|
|
|
params.code = paramsCode;
|
|
|
|
|
console.log('params', params);
|
|
|
|
|
exportForm(params).then((res) => {
|
|
|
|
|
console.log('aaaa', res);
|
|
|
|
|
const content = res;
|
|
|
|
|
const blob = new Blob([content]);
|
|
|
|
|
const fileName = '数据导出' + getToday() + '.xlsx';
|
|
|
|
|
if ('download' in document.createElement('a')) {
|
|
|
|
|
// 非IE下载
|
|
|
|
|
const elink = document.createElement('a');
|
|
|
|
|
elink.download = fileName;
|
|
|
|
|
elink.style.display = 'none';
|
|
|
|
|
elink.href = URL.createObjectURL(blob);
|
|
|
|
|
document.body.appendChild(elink);
|
|
|
|
|
elink.click();
|
|
|
|
|
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
|
|
|
|
document.body.removeChild(elink);
|
|
|
|
|
} else {
|
|
|
|
|
// IE10+下载
|
|
|
|
|
navigator.msSaveBlob(blob, fileName);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
@ -579,6 +605,25 @@
|
|
|
|
|
const chooseLayer = ref<string>('');
|
|
|
|
|
const geomfield = ref<string>('');
|
|
|
|
|
|
|
|
|
|
function getToday() {
|
|
|
|
|
var date = new Date();
|
|
|
|
|
var year = date.getFullYear();
|
|
|
|
|
var month = date.getMonth() + 1;
|
|
|
|
|
var dates = date.getDate();
|
|
|
|
|
var time = date.getHours();
|
|
|
|
|
var minutes = date.getMinutes();
|
|
|
|
|
var seconds = date.getSeconds();
|
|
|
|
|
|
|
|
|
|
if (month >= 1 && month <= 9) {
|
|
|
|
|
month = '0' + month;
|
|
|
|
|
}
|
|
|
|
|
if (dates >= 0 && dates <= 9) {
|
|
|
|
|
dates = '0' + dates;
|
|
|
|
|
}
|
|
|
|
|
let datatime = year + '0' + month + '0' + dates + time + '0' + minutes + '0' + seconds;
|
|
|
|
|
return datatime;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function findValue(obj, targetKey) {
|
|
|
|
|
for (var key in obj) {
|
|
|
|
|
if (typeof obj[key] === 'object') {
|
|
|
|
|
@ -597,7 +642,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function handlerShowGeomtrys(currentNode, rows) {
|
|
|
|
|
console.log("currentNode222",currentNode.value);
|
|
|
|
|
console.log('currentNode222', currentNode.value);
|
|
|
|
|
findValue(currentNode.value.schemas, 'component');
|
|
|
|
|
|
|
|
|
|
let info = currentNode.value.schemas?.find((item, index) => {
|
|
|
|
|
@ -673,6 +718,7 @@
|
|
|
|
|
let columnObj = JSON.parse(res.entity.scheme);
|
|
|
|
|
let formObj = JSON.parse(res.formScheme.scheme);
|
|
|
|
|
console.log('formObj', formObj);
|
|
|
|
|
console.log('columnObj', columnObj);
|
|
|
|
|
// 将card嵌套起来
|
|
|
|
|
if (formObj.formInfo.tabList && formObj.formInfo.tabList.length > 0) {
|
|
|
|
|
formObj.formInfo.tabList = cardNestStructure(formObj.formInfo.tabList);
|
|
|
|
|
@ -721,6 +767,7 @@
|
|
|
|
|
codeId.value = res.entity.id;
|
|
|
|
|
paramsId.value = res.formScheme.id;
|
|
|
|
|
btnList.value = columnObj.table.btns;
|
|
|
|
|
btnArr.value = columnObj.table.btns;
|
|
|
|
|
if (columnObj.table.columns) {
|
|
|
|
|
columnObj.table.columns.forEach((item) => {
|
|
|
|
|
callColumns.push({
|
|
|
|
|
|