cf5151e0 by fanguang

fix

1 parent 549c0152
......@@ -306,4 +306,10 @@ export const deleteStandardCodeFieldsData = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/remove-data`,
method: 'post',
data: params
})
/** 元数据-导出 */
export const exportStandardCodeData = (params) => request({
url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/data-export`,
method: 'post',
data: params
})
\ No newline at end of file
......
......@@ -15,7 +15,7 @@ import { download } from '@/utils/common'
import { getParamsList } from '@/api/modules/dataAsset'
import { getStandardCodeList, saveStandardCode,
updateStandardCode, getStandardCodeDetail,
deleteStandardCode, getStandardCodeStandard
deleteStandardCode, getStandardCodeStandard, exportStandardCodeData
} from '@/api/modules/dataMetaService'
import {
addDictionary,
......@@ -1080,32 +1080,15 @@ const uploadFile = (file) => {
}
const exportData = (type: any = null) => {
if (type == 'model') {
let params = {
guid: dictGuid.value
}
if (drawerInfo.value.type == 'add') {
params.guid = fieldSheetInfo.value.guid
}
exportDictionary(params).then((res: any) => {
if (res && !res.msg) {
download(res, '数据字典模板.xlsx', 'excel')
} else {
res?.msg && ElMessage.error(res?.msg);
}
});
} else {
let params = {
guid: dictGuid.value
let body = [treeCurrentNodeKey.value]
exportStandardCodeData(body).then((res:any) => {
if (res && !res.msg) {
download(res, '标准代码表.xlsx', 'excel')
} else {
res?.msg && ElMessage.error(res?.msg);
}
exportDictionaryFileds(params).then((res: any) => {
if (res && !res.msg) {
download(res, '字典数据.xlsx', 'excel');
} else {
res?.msg && ElMessage.error(res?.msg);
}
});
}
})
return
}
const importData = (file: any = null) => {
......@@ -1221,6 +1204,7 @@ const loadDrawer = async () => {
setCodeOptions()
};
const treeCurrentNodeKey = ref('')
const batching = (type) => {
if (type == 'delete') {
if (selectRowData.value.length == 0) {
......@@ -1268,6 +1252,7 @@ const nodeClick = (data) => {
nextTick(() => {
dictFiledsRef.value.standardGuid = data.value
dictFiledsRef.value.standardName = data.label
treeCurrentNodeKey.value = data.value
dictFiledsRef.value.getFirstPageData()
})
} else {
......@@ -1385,7 +1370,7 @@ const saveData = async (params) => {
drawerInfo.value.visible = false
}
}).finally(() => {
drawerInfo.value.footer.btns.map((item: any) => item.disabled = true)
drawerInfo.value.footer.btns.map((item: any) => item.disabled = false)
})
}
......@@ -1513,7 +1498,7 @@ onMounted(() => {
<template>
<div class="container_wrap full flex">
<div class="aside_wrap">
<div class="aside_title">数据字典列表</div>
<div class="aside_title">标准代码列表</div>
<Tree ref="dictTreeRef" :treeInfo="treeInfo" @nodeClick="nodeClick" @loadNode="loadTreeNode"/>
</div>
<DictFileds ref="dictFiledsRef" v-if="showFiledsPage" @exportData="exportData" />
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!