ebfe41f7 by fanguang Committed by lihua

fix

1 parent 8a330b20
...@@ -306,4 +306,10 @@ export const deleteStandardCodeFieldsData = (params) => request({ ...@@ -306,4 +306,10 @@ export const deleteStandardCodeFieldsData = (params) => request({
306 url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/remove-data`, 306 url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/remove-data`,
307 method: 'post', 307 method: 'post',
308 data: params 308 data: params
309 })
310 /** 元数据-导出 */
311 export const exportStandardCodeData = (params) => request({
312 url: `${import.meta.env.VITE_APP_STANDARD_URL}/standard-code/data/data-export`,
313 method: 'post',
314 data: params
309 }) 315 })
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -15,7 +15,7 @@ import { download } from '@/utils/common' ...@@ -15,7 +15,7 @@ import { download } from '@/utils/common'
15 import { getParamsList } from '@/api/modules/dataAsset' 15 import { getParamsList } from '@/api/modules/dataAsset'
16 import { getStandardCodeList, saveStandardCode, 16 import { getStandardCodeList, saveStandardCode,
17 updateStandardCode, getStandardCodeDetail, 17 updateStandardCode, getStandardCodeDetail,
18 deleteStandardCode, getStandardCodeStandard 18 deleteStandardCode, getStandardCodeStandard, exportStandardCodeData
19 } from '@/api/modules/dataMetaService' 19 } from '@/api/modules/dataMetaService'
20 import { 20 import {
21 addDictionary, 21 addDictionary,
...@@ -1080,32 +1080,15 @@ const uploadFile = (file) => { ...@@ -1080,32 +1080,15 @@ const uploadFile = (file) => {
1080 } 1080 }
1081 1081
1082 const exportData = (type: any = null) => { 1082 const exportData = (type: any = null) => {
1083 if (type == 'model') { 1083 let body = [treeCurrentNodeKey.value]
1084 let params = { 1084 exportStandardCodeData(body).then((res:any) => {
1085 guid: dictGuid.value 1085 if (res && !res.msg) {
1086 } 1086 download(res, '标准代码表.xlsx', 'excel')
1087 if (drawerInfo.value.type == 'add') { 1087 } else {
1088 params.guid = fieldSheetInfo.value.guid 1088 res?.msg && ElMessage.error(res?.msg);
1089 }
1090 exportDictionary(params).then((res: any) => {
1091 if (res && !res.msg) {
1092 download(res, '数据字典模板.xlsx', 'excel')
1093 } else {
1094 res?.msg && ElMessage.error(res?.msg);
1095 }
1096 });
1097 } else {
1098 let params = {
1099 guid: dictGuid.value
1100 } 1089 }
1101 exportDictionaryFileds(params).then((res: any) => { 1090 })
1102 if (res && !res.msg) { 1091 return
1103 download(res, '字典数据.xlsx', 'excel');
1104 } else {
1105 res?.msg && ElMessage.error(res?.msg);
1106 }
1107 });
1108 }
1109 } 1092 }
1110 1093
1111 const importData = (file: any = null) => { 1094 const importData = (file: any = null) => {
...@@ -1221,6 +1204,7 @@ const loadDrawer = async () => { ...@@ -1221,6 +1204,7 @@ const loadDrawer = async () => {
1221 setCodeOptions() 1204 setCodeOptions()
1222 }; 1205 };
1223 1206
1207 const treeCurrentNodeKey = ref('')
1224 const batching = (type) => { 1208 const batching = (type) => {
1225 if (type == 'delete') { 1209 if (type == 'delete') {
1226 if (selectRowData.value.length == 0) { 1210 if (selectRowData.value.length == 0) {
...@@ -1268,6 +1252,7 @@ const nodeClick = (data) => { ...@@ -1268,6 +1252,7 @@ const nodeClick = (data) => {
1268 nextTick(() => { 1252 nextTick(() => {
1269 dictFiledsRef.value.standardGuid = data.value 1253 dictFiledsRef.value.standardGuid = data.value
1270 dictFiledsRef.value.standardName = data.label 1254 dictFiledsRef.value.standardName = data.label
1255 treeCurrentNodeKey.value = data.value
1271 dictFiledsRef.value.getFirstPageData() 1256 dictFiledsRef.value.getFirstPageData()
1272 }) 1257 })
1273 } else { 1258 } else {
...@@ -1385,7 +1370,7 @@ const saveData = async (params) => { ...@@ -1385,7 +1370,7 @@ const saveData = async (params) => {
1385 drawerInfo.value.visible = false 1370 drawerInfo.value.visible = false
1386 } 1371 }
1387 }).finally(() => { 1372 }).finally(() => {
1388 drawerInfo.value.footer.btns.map((item: any) => item.disabled = true) 1373 drawerInfo.value.footer.btns.map((item: any) => item.disabled = false)
1389 }) 1374 })
1390 } 1375 }
1391 1376
...@@ -1513,7 +1498,7 @@ onMounted(() => { ...@@ -1513,7 +1498,7 @@ onMounted(() => {
1513 <template> 1498 <template>
1514 <div class="container_wrap full flex"> 1499 <div class="container_wrap full flex">
1515 <div class="aside_wrap"> 1500 <div class="aside_wrap">
1516 <div class="aside_title">数据字典列表</div> 1501 <div class="aside_title">标准代码列表</div>
1517 <Tree ref="dictTreeRef" :treeInfo="treeInfo" @nodeClick="nodeClick" @loadNode="loadTreeNode"/> 1502 <Tree ref="dictTreeRef" :treeInfo="treeInfo" @nodeClick="nodeClick" @loadNode="loadTreeNode"/>
1518 </div> 1503 </div>
1519 <DictFileds ref="dictFiledsRef" v-if="showFiledsPage" @exportData="exportData" /> 1504 <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!