268 changed files with 1662 additions and 1102 deletions
@ -0,0 +1,3 @@ |
|||||
|
. 用户管理功能中,设置用户机构时,机构树直接展示已经选择的机构,新增“选入”、“选出”功能,用于修改机构 |
||||
|
. 用户管理功能中,可修改设置用户所属默认机构,默认角色等 |
||||
|
. |
@ -0,0 +1,89 @@ |
|||||
|
import { $t, axios, NotifyManager, Tools } from '@/platform'; |
||||
|
import { exportFile } from 'quasar'; |
||||
|
import { PropsType, TableType } from '../../index'; |
||||
|
import { Button } from '../Button'; |
||||
|
|
||||
|
export class Export extends Button { |
||||
|
name = 'export'; |
||||
|
|
||||
|
constructor(props: PropsType, table: TableType) { |
||||
|
super(props, table); |
||||
|
this.click = this.click.bind(this); |
||||
|
this.getExportData = this.getExportData.bind(this); |
||||
|
this.wrapCsvValue = this.wrapCsvValue.bind(this); |
||||
|
this.getButtonConfig = this.getButtonConfig.bind(this); |
||||
|
} |
||||
|
|
||||
|
async click(args) { |
||||
|
this.showLoading(); |
||||
|
let exportData = args.grid.getRows(); |
||||
|
// 判断是否配置了 url, 以不分页形式请求后端获取全部数据一把导出。
|
||||
|
if (!Tools.isEmpty(args.grid.props.fetchDataUrl) || !Tools.isEmpty(args.grid.props.dataUrl)) { |
||||
|
const fetchResult = await this.getExportData(); |
||||
|
if (fetchResult && fetchResult.length > 0) { |
||||
|
exportData = fetchResult; |
||||
|
} |
||||
|
} |
||||
|
const content = [args.grid.props.columns.map((col) => this.wrapCsvValue(col.label))] |
||||
|
.concat( |
||||
|
exportData.map((row) => |
||||
|
args.grid.props.columns |
||||
|
.map((col) => |
||||
|
this.wrapCsvValue(typeof col.field === 'function' ? col.field(row) : row[col.field === void 0 ? col.name : col.field], col.format, row), |
||||
|
) |
||||
|
.join(','), |
||||
|
), |
||||
|
) |
||||
|
.join('\r\n'); |
||||
|
|
||||
|
const status = exportFile('table-export.csv', content, { |
||||
|
encoding: 'utf-8', |
||||
|
mimeType: 'text/csv', |
||||
|
byteOrderMark: '\uFEFF', // 解决乱码问题
|
||||
|
}); |
||||
|
|
||||
|
if (status !== true) { |
||||
|
NotifyManager.error($t('action.export.failed')); |
||||
|
} |
||||
|
this.hideLoading(); |
||||
|
} |
||||
|
|
||||
|
getButtonConfig() { |
||||
|
return { |
||||
|
name: this.name, |
||||
|
icon: 'file_download', |
||||
|
labelI18nKey: 'action.export', |
||||
|
label: $t('action.export'), |
||||
|
click: this.click, |
||||
|
}; |
||||
|
} |
||||
|
|
||||
|
private async getExportData() { |
||||
|
let resultData = <any>[]; |
||||
|
const reqParams: any = { pageable: false }; |
||||
|
const urlSearchParams = this.tools?.criteriaFM.buildURLSearchParams(reqParams); |
||||
|
const resp = await axios.get(this.table?.url.fetchDataUrl || this.table.url.dataUrl, { params: urlSearchParams }); |
||||
|
if (resp && resp.data) { |
||||
|
const responseData = resp.data; |
||||
|
if (Array.isArray(responseData)) { |
||||
|
resultData = responseData; |
||||
|
} else if (typeof responseData === 'object' && responseData.content) { |
||||
|
resultData = responseData.content; |
||||
|
} |
||||
|
} |
||||
|
return resultData; |
||||
|
} |
||||
|
|
||||
|
private wrapCsvValue(val, formatFn, row) { |
||||
|
let formatted = formatFn !== void 0 ? formatFn(val, row) : val; |
||||
|
formatted = formatted === void 0 || formatted === null ? '' : String(formatted); |
||||
|
formatted = formatted.split('"').join('""'); |
||||
|
/** |
||||
|
* Excel accepts \n and \r in strings, but some other CSV parsers do not |
||||
|
* Uncomment the next two lines to escape new lines |
||||
|
*/ |
||||
|
// .split('\n').join('\\n')
|
||||
|
// .split('\r').join('\\r')
|
||||
|
return `"${formatted}"`; |
||||
|
} |
||||
|
} |
Binary file not shown.
@ -1,58 +0,0 @@ |
|||||
<template> |
|
||||
<w-splitter :model-value="50" separator-style="height: 1px;" class="w-full" style="height: 100%"> |
|
||||
<template #before> |
|
||||
<w-grid |
|
||||
ref="gridRef" |
|
||||
:title="$t('system.org.grid.title')" |
|
||||
:config-button="true" |
|
||||
db-click-operation="edit" |
|
||||
selection="multiple" |
|
||||
:checkbox-selection="false" |
|
||||
:data-url="Environment.apiContextPath('/api/exportexcel/template')" |
|
||||
:pageable="false" |
|
||||
:toolbar-configure="{ noIcon: false }" |
|
||||
:toolbar-actions="['refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|
||||
:columns="[ |
|
||||
{ width: 120, name: 'code', label: $t('code') }, |
|
||||
{ width: '100%', name: 'name', label: $t('name') }, |
|
||||
]" |
|
||||
:editor="{ |
|
||||
dialog: { |
|
||||
width: '600px', |
|
||||
}, |
|
||||
form: { |
|
||||
colsNum: 1, |
|
||||
fields: [ |
|
||||
{ name: 'code', label: $t('code'), type: 'w-text', requiredIf: true }, |
|
||||
{ name: 'name', label: $t('name'), type: 'w-text', requiredIf: true }, |
|
||||
], |
|
||||
}, |
|
||||
}" |
|
||||
:viewer="{ |
|
||||
panel: { |
|
||||
columnNum: 1, |
|
||||
fields: [ |
|
||||
{ name: 'id', label: $t('id') }, |
|
||||
{ name: 'code', label: $t('code') }, |
|
||||
{ name: 'name', label: $t('name') }, |
|
||||
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
|
||||
{ name: 'creator', label: $t('creator') }, |
|
||||
{ name: 'createDate', label: $t('createDate') }, |
|
||||
{ name: 'lastModifier', label: $t('lastModifier') }, |
|
||||
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
|
||||
{ name: 'corporationCode', label: $t('corporationCode') }, |
|
||||
], |
|
||||
}, |
|
||||
}" |
|
||||
@row-click="(args: any) => {}" |
|
||||
></w-grid> |
|
||||
</template> |
|
||||
<template #after> </template> |
|
||||
</w-splitter> |
|
||||
</template> |
|
||||
<script setup lang="ts"> |
|
||||
import { ref, onMounted } from 'vue'; |
|
||||
import { Environment, eventBus, Formater } from 'platform-core'; |
|
||||
|
|
||||
const gridRef = ref(); |
|
||||
</script> |
|
@ -1,154 +0,0 @@ |
|||||
<template> |
|
||||
<w-splitter :model-value="50" horizontal separator-style="height: 1px;" class="w-full" style="height: 100%"> |
|
||||
<template #before> |
|
||||
<w-grid |
|
||||
ref="treeGridRef" |
|
||||
:title="$t('system.org.grid.title')" |
|
||||
:config-button="true" |
|
||||
db-click-operation="edit" |
|
||||
selection="multiple" |
|
||||
:checkbox-selection="false" |
|
||||
:data-url="Environment.apiContextPath('/api/exportexcel/template')" |
|
||||
:pageable="false" |
|
||||
:toolbar-configure="{ noIcon: false }" |
|
||||
:toolbar-actions="['refresh', 'separator', 'add', 'edit', 'remove', 'separator', 'view', 'separator', 'export']" |
|
||||
:columns="[ |
|
||||
{ width: 120, name: 'code', label: $t('code') }, |
|
||||
{ width: '100%', name: 'name', label: $t('name') }, |
|
||||
]" |
|
||||
:editor="{ |
|
||||
dialog: { |
|
||||
width: '600px', |
|
||||
}, |
|
||||
form: { |
|
||||
colsNum: 1, |
|
||||
fields: [ |
|
||||
{ name: 'code', label: $t('code'), type: 'w-text', requiredIf: true }, |
|
||||
{ name: 'name', label: $t('name'), type: 'w-text', requiredIf: true }, |
|
||||
], |
|
||||
}, |
|
||||
}" |
|
||||
:viewer="{ |
|
||||
panel: { |
|
||||
columnNum: 1, |
|
||||
fields: [ |
|
||||
{ name: 'id', label: $t('id') }, |
|
||||
{ name: 'code', label: $t('code') }, |
|
||||
{ name: 'name', label: $t('name') }, |
|
||||
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
|
||||
{ name: 'creator', label: $t('creator') }, |
|
||||
{ name: 'createDate', label: $t('createDate') }, |
|
||||
{ name: 'lastModifier', label: $t('lastModifier') }, |
|
||||
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
|
||||
{ name: 'corporationCode', label: $t('corporationCode') }, |
|
||||
], |
|
||||
}, |
|
||||
}" |
|
||||
@row-click=" |
|
||||
(args) => { |
|
||||
refreshRelationshipComponents(args.row.id); |
|
||||
} |
|
||||
" |
|
||||
></w-grid> |
|
||||
</template> |
|
||||
<template #after> |
|
||||
<div class="row no-wrap items-center py-1"> |
|
||||
<q-btn icon="bi-floppy2" :label="$t('save')" outline no-caps> </q-btn> |
|
||||
</div> |
|
||||
<div ref="divRef" class="border border-gray-200" style="height: calc(100% - 48px)"></div> |
|
||||
</template> |
|
||||
</w-splitter> |
|
||||
</template> |
|
||||
<script setup lang="ts"> |
|
||||
import '@univerjs/design/lib/index.css'; |
|
||||
import '@univerjs/ui/lib/index.css'; |
|
||||
import '@univerjs/docs-ui/lib/index.css'; |
|
||||
import '@univerjs/sheets-ui/lib/index.css'; |
|
||||
//import '@univerjs/sheets-formula/lib/index.css'; |
|
||||
// |
|
||||
|
|
||||
import { ref, onMounted } from 'vue'; |
|
||||
import { Environment, eventBus, Formater } from 'platform-core'; |
|
||||
|
|
||||
import { LocaleType, Tools, Univer, UniverInstanceType } from '@univerjs/core'; |
|
||||
import { defaultTheme } from '@univerjs/design'; |
|
||||
|
|
||||
import { UniverFormulaEnginePlugin } from '@univerjs/engine-formula'; |
|
||||
import { UniverRenderEnginePlugin } from '@univerjs/engine-render'; |
|
||||
|
|
||||
import { UniverUIPlugin } from '@univerjs/ui'; |
|
||||
|
|
||||
import { UniverDocsPlugin } from '@univerjs/docs'; |
|
||||
import { UniverDocsUIPlugin } from '@univerjs/docs-ui'; |
|
||||
|
|
||||
import { UniverSheetsPlugin } from '@univerjs/sheets'; |
|
||||
import { UniverSheetsFormulaPlugin } from '@univerjs/sheets-formula'; |
|
||||
import { UniverSheetsUIPlugin } from '@univerjs/sheets-ui'; |
|
||||
|
|
||||
import Design_en_US from '@univerjs/design/locale/en-US'; |
|
||||
import UI_en_US from '@univerjs/ui/locale/en-US'; |
|
||||
import DocsUI_en_US from '@univerjs/docs-ui/locale/en-US'; |
|
||||
import Sheets_en_US from '@univerjs/sheets/locale/en-US'; |
|
||||
import SheetsUI_en_US from '@univerjs/sheets-ui/locale/en-US'; |
|
||||
import SheetsFormula_en_US from '@univerjs/sheets-formula/locale/en-US'; |
|
||||
|
|
||||
import Design_zh_CN from '@univerjs/design/locale/zh-CN'; |
|
||||
import UI_zh_CN from '@univerjs/ui/locale/zh-CN'; |
|
||||
import DocsUI_zh_CN from '@univerjs/docs-ui/locale/zh-CN'; |
|
||||
import Sheets_zh_CN from '@univerjs/sheets/locale/zh-CN'; |
|
||||
import SheetsUI_zh_CN from '@univerjs/sheets-ui/locale/zh-CN'; |
|
||||
import SheetsFormula_zh_CN from '@univerjs/sheets-formula/locale/zh-CN'; |
|
||||
|
|
||||
import Design_zh_TW from '@univerjs/design/locale/zh-TW'; |
|
||||
import UI_zh_TW from '@univerjs/ui/locale/zh-TW'; |
|
||||
import DocsUI_zh_TW from '@univerjs/docs-ui/locale/zh-TW'; |
|
||||
import Sheets_zh_TW from '@univerjs/sheets/locale/zh-TW'; |
|
||||
import SheetsUI_zh_TW from '@univerjs/sheets-ui/locale/zh-TW'; |
|
||||
import SheetsFormula_zh_TW from '@univerjs/sheets-formula/locale/zh-TW'; |
|
||||
|
|
||||
import type { IWorkbookData } from '@univerjs/core'; |
|
||||
|
|
||||
const divRef = ref(); |
|
||||
const treeGridRef = ref(); |
|
||||
|
|
||||
onMounted(() => { |
|
||||
const univer = new Univer({ |
|
||||
theme: defaultTheme, |
|
||||
locale: LocaleType.ZH_CN, |
|
||||
locales: { |
|
||||
[LocaleType.EN_US]: Tools.deepMerge(Sheets_en_US, DocsUI_en_US, SheetsUI_en_US, SheetsFormula_en_US, UI_en_US, Design_en_US), |
|
||||
[LocaleType.ZH_CN]: Tools.deepMerge(Sheets_zh_CN, DocsUI_zh_CN, SheetsUI_zh_CN, SheetsFormula_zh_CN, UI_zh_CN, Design_zh_CN), |
|
||||
[LocaleType.ZH_TW]: Tools.deepMerge(Sheets_zh_TW, DocsUI_zh_TW, SheetsUI_zh_TW, SheetsFormula_zh_TW, UI_zh_TW, Design_zh_TW), |
|
||||
}, |
|
||||
}); |
|
||||
|
|
||||
/** |
|
||||
* 语言改变事件 |
|
||||
*/ |
|
||||
eventBus.on('onLocaleChanged', (locale) => { |
|
||||
if (locale === 'en') { |
|
||||
univer.setLocale(LocaleType.EN_US); |
|
||||
} else if (locale === 'zh_CN') { |
|
||||
univer.setLocale(LocaleType.ZH_CN); |
|
||||
} else if (locale === 'tw_CN') { |
|
||||
univer.setLocale(LocaleType.ZH_TW); |
|
||||
} |
|
||||
}); |
|
||||
|
|
||||
univer.registerPlugin(UniverRenderEnginePlugin); |
|
||||
univer.registerPlugin(UniverFormulaEnginePlugin); |
|
||||
|
|
||||
univer.registerPlugin(UniverUIPlugin, { |
|
||||
container: divRef.value, |
|
||||
}); |
|
||||
|
|
||||
univer.registerPlugin(UniverDocsPlugin); |
|
||||
univer.registerPlugin(UniverDocsUIPlugin); |
|
||||
|
|
||||
univer.registerPlugin(UniverSheetsPlugin); |
|
||||
univer.registerPlugin(UniverSheetsUIPlugin); |
|
||||
univer.registerPlugin(UniverSheetsFormulaPlugin); |
|
||||
|
|
||||
univer.createUnit(UniverInstanceType.UNIVER_SHEET, {}); |
|
||||
}); |
|
||||
</script> |
|
@ -0,0 +1,74 @@ |
|||||
|
<template> |
||||
|
<w-dialog ref="dialogRef" :title="$t('re.resources.dialog.import.title')" width="600px" :can-maximize="false"> |
||||
|
<q-form action="post"> |
||||
|
<div class="row py-1"> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-10"> |
||||
|
<q-file ref="fileRef" v-model="modelValue.file" :label="$t('file.single.tip')" dense outlined clearable counter accept=".xlsx"> |
||||
|
<template #prepend> |
||||
|
<q-icon name="cloud_upload" /> |
||||
|
</template> |
||||
|
</q-file> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
</div> |
||||
|
<div class="row py-1"> |
||||
|
<div class="col-1"></div> |
||||
|
<div class="col-10 row justify-center q-gutter-md py-2"> |
||||
|
<q-btn icon="bi-database-up" :label="$t('import')" color="primary" @click="importData"></q-btn> |
||||
|
</div> |
||||
|
<div class="col-1"></div> |
||||
|
</div> |
||||
|
</q-form> |
||||
|
</w-dialog> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref, reactive } from 'vue'; |
||||
|
import { axios, Environment } from 'platform-core'; |
||||
|
|
||||
|
const emit = defineEmits<{ |
||||
|
(e: 'afterUploaded', evt: Event): void; |
||||
|
}>(); |
||||
|
|
||||
|
const dialogRef = ref(); |
||||
|
const modelValue = reactive({ |
||||
|
file: undefined, |
||||
|
}); |
||||
|
const fileRef = ref(); |
||||
|
const idRef = ref(); |
||||
|
|
||||
|
const importData = () => { |
||||
|
axios |
||||
|
.post( |
||||
|
Environment.apiContextPath('/api/lcdp/jxls/template/updateAttachment/' + idRef.value), |
||||
|
{ |
||||
|
file: fileRef.value.nativeEl.files[0], |
||||
|
}, |
||||
|
{ |
||||
|
loading: true, |
||||
|
headers: { |
||||
|
'Content-Type': 'multipart/form-data', |
||||
|
}, |
||||
|
}, |
||||
|
) |
||||
|
.then(() => { |
||||
|
close(); |
||||
|
emit('afterUploaded'); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
const open = (id) => { |
||||
|
idRef.value = id; |
||||
|
modelValue.file = undefined; |
||||
|
dialogRef.value.show(); |
||||
|
}; |
||||
|
|
||||
|
const close = () => { |
||||
|
dialogRef.value.hide(); |
||||
|
}; |
||||
|
|
||||
|
defineExpose({ |
||||
|
open, |
||||
|
close, |
||||
|
}); |
||||
|
</script> |
@ -0,0 +1,126 @@ |
|||||
|
<template> |
||||
|
<div style="height: 100%"> |
||||
|
<w-grid |
||||
|
ref="gridRef" |
||||
|
:title="$t('lcdp.jxls.template.grid.title')" |
||||
|
:config-button="true" |
||||
|
db-click-operation="edit" |
||||
|
selection="multiple" |
||||
|
:checkbox-selection="false" |
||||
|
:data-url="Environment.apiContextPath('/api/lcdp/jxls/template')" |
||||
|
:pageable="false" |
||||
|
:toolbar-configure="{ noIcon: false }" |
||||
|
:toolbar-actions="[ |
||||
|
'refresh', |
||||
|
'separator', |
||||
|
'add', |
||||
|
'clone', |
||||
|
'edit', |
||||
|
'remove', |
||||
|
'separator', |
||||
|
{ |
||||
|
name: 'updateAttachment', |
||||
|
label: $t('lcdp.jxls.template.grid.action.updateAttachment'), |
||||
|
icon: 'file_upload', |
||||
|
enableIf: (args: any) => { |
||||
|
return args.selected; |
||||
|
}, |
||||
|
click: (args: any) => { |
||||
|
attachmentDialogRef.open(args.selected.id); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'downloadAttachment', |
||||
|
icon: 'file_upload', |
||||
|
label: $t('lcdp.jxls.template.grid.action.downloadAttachment'), |
||||
|
enableIf: (args: any) => { |
||||
|
return args.selected; |
||||
|
}, |
||||
|
click: (args: any) => { |
||||
|
Downloader.post(Environment.apiContextPath('/api/lcdp/jxls/template/downloadAttachment/' + args.selected.id), { loading: true }); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'removeAttachment', |
||||
|
icon: 'file_upload', |
||||
|
label: $t('lcdp.jxls.template.grid.action.removeAttachment'), |
||||
|
enableIf: (args: any) => { |
||||
|
return args.selected; |
||||
|
}, |
||||
|
click: (args: any) => { |
||||
|
DialogManager.confirm($t('lcdp.jxls.template.grid.action.removeAttachment.confirm'), () => { |
||||
|
axios.post(Environment.apiContextPath('/api/lcdp/jxls/template/removeAttachment/' + args.selected.id)).then(() => { |
||||
|
gridRef.refresh(); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
name: 'download', |
||||
|
icon: 'file_upload', |
||||
|
label: $t('download'), |
||||
|
enableIf: (args: any) => { |
||||
|
return args.selected; |
||||
|
}, |
||||
|
click: (args: any) => { |
||||
|
Downloader.post(Environment.apiContextPath('/api/system/user/export'), { loading: true }); |
||||
|
}, |
||||
|
}, |
||||
|
'separator', |
||||
|
'view', |
||||
|
]" |
||||
|
:columns="[ |
||||
|
{ width: 150, name: 'code', label: $t('code') }, |
||||
|
{ width: 250, name: 'name', label: $t('name') }, |
||||
|
{ width: 350, name: 'jpaEntityClass', label: $t('lcdp.jxls.template.grid.entity.jpaEntityClass') }, |
||||
|
{ width: '100%', name: 'description', label: $t('description') }, |
||||
|
{ width: 100, name: 'hasAttachment', label: $t('lcdp.jxls.template.grid.entity.hasAttachment'), format: Formater.yesNo() }, |
||||
|
]" |
||||
|
:editor="{ |
||||
|
dialog: { |
||||
|
width: '600px', |
||||
|
}, |
||||
|
form: { |
||||
|
colsNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'code', label: $t('code'), type: 'w-text', requiredIf: true }, |
||||
|
{ name: 'name', label: $t('name'), type: 'w-text', requiredIf: true }, |
||||
|
{ name: 'jpaEntityClass', label: $t('lcdp.jxls.template.grid.entity.jpaEntityClass'), type: 'w-text' }, |
||||
|
{ name: 'description', label: $t('description'), type: 'w-textarea' }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
:viewer="{ |
||||
|
panel: { |
||||
|
columnNum: 1, |
||||
|
fields: [ |
||||
|
{ name: 'id', label: $t('id') }, |
||||
|
{ name: 'code', label: $t('code') }, |
||||
|
{ name: 'name', label: $t('name') }, |
||||
|
{ name: 'jpaEntityClass', label: $t('lcdp.jxls.template.grid.entity.jpaEntityClass') }, |
||||
|
{ name: 'description', label: $t('description') }, |
||||
|
{ name: 'dataComeFrom', label: $t('dataComeFrom') }, |
||||
|
{ name: 'creator', label: $t('creator') }, |
||||
|
{ name: 'createDate', label: $t('createDate') }, |
||||
|
{ name: 'lastModifier', label: $t('lastModifier') }, |
||||
|
{ name: 'lastModifyDate', label: $t('lastModifyDate'), format: Formater.none() }, |
||||
|
{ name: 'corporationCode', label: $t('corporationCode') }, |
||||
|
], |
||||
|
}, |
||||
|
}" |
||||
|
></w-grid> |
||||
|
<AttachmentDialog ref="attachmentDialogRef" @after-uploaded="afterUploaded"></AttachmentDialog> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script setup lang="ts"> |
||||
|
import { ref } from 'vue'; |
||||
|
import { axios, Environment, eventBus, DialogManager, Formater, Downloader } from 'platform-core'; |
||||
|
import AttachmentDialog from './AttachmentDialog.vue'; |
||||
|
|
||||
|
const gridRef = ref(); |
||||
|
const attachmentDialogRef = ref(); |
||||
|
|
||||
|
const afterUploaded = () => { |
||||
|
gridRef.value.refresh(); |
||||
|
}; |
||||
|
</script> |
@ -1,15 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.controller; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateColumnEntity; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExportExcelTemplateColumnRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.service.ExportExcelTemplateColumnService; |
|
||||
import io.sc.platform.lcdp.excel.template.vo.ExportExcelTemplateColumnVo; |
|
||||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/api/exportexcel/column") |
|
||||
public class ExportExcelTemplateColumnController extends RestCrudController<ExportExcelTemplateColumnVo, ExportExcelTemplateColumnEntity,String, ExportExcelTemplateColumnRepository, ExportExcelTemplateColumnService> { |
|
||||
|
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.controller; |
|
||||
|
|
||||
import io.sc.platform.core.response.ResponseWrapper; |
|
||||
import io.sc.platform.core.response.SuccessResponseWrapper; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExcelTemplate; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateEntity; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExcelTemplateRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExportExcelTemplateRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.service.ExcelTemplateService; |
|
||||
import io.sc.platform.lcdp.excel.template.service.ExportExcelTemplateService; |
|
||||
import io.sc.platform.lcdp.excel.template.vo.ExcelTemplateVo; |
|
||||
import io.sc.platform.lcdp.excel.template.vo.ExportExcelTemplateVo; |
|
||||
import io.sc.platform.mvc.controller.support.RestCrudController; |
|
||||
import org.springframework.web.bind.annotation.*; |
|
||||
|
|
||||
import java.util.Map; |
|
||||
|
|
||||
@RestController |
|
||||
@RequestMapping("/api/exportexcel/template") |
|
||||
public class ExportExcelTemplateController extends RestCrudController<ExportExcelTemplateVo, ExportExcelTemplateEntity,String, ExportExcelTemplateRepository, ExportExcelTemplateService> { |
|
||||
|
|
||||
} |
|
@ -1,136 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.entity; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.enums.DataType; |
|
||||
import io.sc.platform.lcdp.excel.template.vo.ExportExcelTemplateColumnVo; |
|
||||
import io.sc.platform.lcdp.excel.template.vo.ExportExcelTemplateVo; |
|
||||
import io.sc.platform.orm.entity.CorporationAuditorEntity; |
|
||||
import org.hibernate.annotations.GenericGenerator; |
|
||||
|
|
||||
import javax.persistence.*; |
|
||||
import javax.validation.constraints.Size; |
|
||||
|
|
||||
/** |
|
||||
* 导出 Excel 模版实体 |
|
||||
*/ |
|
||||
@Entity |
|
||||
@Table(name="LCDP_EXPORT_TEMPLATE_COLUMN") |
|
||||
public class ExportExcelTemplateColumnEntity extends CorporationAuditorEntity<ExportExcelTemplateColumnVo> { |
|
||||
@Id |
|
||||
@GeneratedValue(generator = "system-uuid") |
|
||||
@GenericGenerator(name = "system-uuid", strategy = "uuid2") |
|
||||
@Column(name="ID_", length=36) |
|
||||
@Size(max=36) |
|
||||
private String id; |
|
||||
|
|
||||
//字段代码
|
|
||||
@Column(name="CODE_",nullable=false,length=255) |
|
||||
@Size(min=1,max=255) |
|
||||
private String code; |
|
||||
|
|
||||
//字段名称
|
|
||||
@Column(name="NAME_", length=255) |
|
||||
@Size(min=1,max=255) |
|
||||
private String name; |
|
||||
|
|
||||
//字段描述
|
|
||||
@Column(name="DESCRIPTION_", length=255) |
|
||||
@Size(min=1,max=255) |
|
||||
private String description; |
|
||||
|
|
||||
//排序
|
|
||||
@Column(name="ORDER_") |
|
||||
private Integer order; |
|
||||
|
|
||||
//字段值类型
|
|
||||
@Column(name="VALUE_TYPE_", length=255) |
|
||||
private String valueType; |
|
||||
|
|
||||
//字段值公式
|
|
||||
@Column(name="VALUE_FORMULA") |
|
||||
private String valueFormula; |
|
||||
|
|
||||
//所属模版
|
|
||||
@ManyToOne(fetch=FetchType.LAZY) |
|
||||
@JoinColumn(name="TEMPLATE_ID_") |
|
||||
protected ExportExcelTemplateEntity template; |
|
||||
|
|
||||
@Override |
|
||||
public ExportExcelTemplateColumnVo toVo() { |
|
||||
ExportExcelTemplateColumnVo vo = new ExportExcelTemplateColumnVo(); |
|
||||
super.toVo(vo); |
|
||||
|
|
||||
vo.setId(this.getId()); |
|
||||
vo.setCode(this.getCode()); |
|
||||
vo.setName(this.getName()); |
|
||||
vo.setDescription(this.getDescription()); |
|
||||
vo.setOrder(this.getOrder()); |
|
||||
vo.setValueType(this.getValueType()); |
|
||||
vo.setValueFormula(this.getValueFormula()); |
|
||||
vo.setTemplate(this.getTemplate().getId()); |
|
||||
return vo; |
|
||||
} |
|
||||
|
|
||||
public String getId() { |
|
||||
return id; |
|
||||
} |
|
||||
|
|
||||
public void setId(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
public String getCode() { |
|
||||
return code; |
|
||||
} |
|
||||
|
|
||||
public void setCode(String code) { |
|
||||
this.code = code; |
|
||||
} |
|
||||
|
|
||||
public String getName() { |
|
||||
return name; |
|
||||
} |
|
||||
|
|
||||
public void setName(String name) { |
|
||||
this.name = name; |
|
||||
} |
|
||||
|
|
||||
public String getDescription() { |
|
||||
return description; |
|
||||
} |
|
||||
|
|
||||
public void setDescription(String description) { |
|
||||
this.description = description; |
|
||||
} |
|
||||
|
|
||||
public Integer getOrder() { |
|
||||
return order; |
|
||||
} |
|
||||
|
|
||||
public void setOrder(Integer order) { |
|
||||
this.order = order; |
|
||||
} |
|
||||
|
|
||||
public String getValueType() { |
|
||||
return valueType; |
|
||||
} |
|
||||
|
|
||||
public void setValueType(String valueType) { |
|
||||
this.valueType = valueType; |
|
||||
} |
|
||||
|
|
||||
public String getValueFormula() { |
|
||||
return valueFormula; |
|
||||
} |
|
||||
|
|
||||
public void setValueFormula(String valueFormula) { |
|
||||
this.valueFormula = valueFormula; |
|
||||
} |
|
||||
|
|
||||
public ExportExcelTemplateEntity getTemplate() { |
|
||||
return template; |
|
||||
} |
|
||||
|
|
||||
public void setTemplate(ExportExcelTemplateEntity template) { |
|
||||
this.template = template; |
|
||||
} |
|
||||
} |
|
@ -1,9 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.enums; |
|
||||
|
|
||||
/** |
|
||||
* 导出数据类型 |
|
||||
*/ |
|
||||
public enum DataType { |
|
||||
JPA_ENTITY, // JPA 实体
|
|
||||
SQL_RESULT_SET; // SQL 记录集
|
|
||||
} |
|
@ -1,7 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.repository; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateColumnEntity; |
|
||||
import io.sc.platform.orm.repository.DaoRepository; |
|
||||
|
|
||||
public interface ExportExcelTemplateColumnRepository extends DaoRepository<ExportExcelTemplateColumnEntity, String> { |
|
||||
} |
|
@ -1,8 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.repository; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExcelTemplate; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateEntity; |
|
||||
import io.sc.platform.orm.repository.DaoRepository; |
|
||||
|
|
||||
public interface ExportExcelTemplateRepository extends DaoRepository<ExportExcelTemplateEntity, String> { |
|
||||
} |
|
@ -1,9 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.service; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateColumnEntity; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExportExcelTemplateColumnRepository; |
|
||||
import io.sc.platform.orm.service.DaoService; |
|
||||
|
|
||||
public interface ExportExcelTemplateColumnService extends DaoService<ExportExcelTemplateColumnEntity, String, ExportExcelTemplateColumnRepository> { |
|
||||
|
|
||||
} |
|
@ -1,13 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.service; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExcelTemplate; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateEntity; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExcelTemplateRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExportExcelTemplateRepository; |
|
||||
import io.sc.platform.orm.service.DaoService; |
|
||||
|
|
||||
import java.util.Map; |
|
||||
|
|
||||
public interface ExportExcelTemplateService extends DaoService<ExportExcelTemplateEntity, String, ExportExcelTemplateRepository> { |
|
||||
|
|
||||
} |
|
@ -1,12 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.service.impl; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateColumnEntity; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExportExcelTemplateColumnRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.service.ExportExcelTemplateColumnService; |
|
||||
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
@Service("io.sc.platform.lcdp.excel.template.service.impl.ExportExcelTemplateColumnServiceImpl") |
|
||||
public class ExportExcelTemplateColumnServiceImpl extends DaoServiceImpl<ExportExcelTemplateColumnEntity, String, ExportExcelTemplateColumnRepository> implements ExportExcelTemplateColumnService { |
|
||||
|
|
||||
} |
|
@ -1,24 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.service.impl; |
|
||||
|
|
||||
import com.fasterxml.jackson.databind.ObjectMapper; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExcelParams; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExcelTemplate; |
|
||||
import io.sc.platform.lcdp.excel.template.entity.ExportExcelTemplateEntity; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExcelParamsRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExcelTemplateRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.repository.ExportExcelTemplateRepository; |
|
||||
import io.sc.platform.lcdp.excel.template.service.ExcelTemplateService; |
|
||||
import io.sc.platform.lcdp.excel.template.service.ExportExcelTemplateService; |
|
||||
import io.sc.platform.orm.service.impl.DaoServiceImpl; |
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
|
||||
import org.springframework.jdbc.core.JdbcTemplate; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
import java.util.*; |
|
||||
import java.util.regex.Matcher; |
|
||||
import java.util.regex.Pattern; |
|
||||
|
|
||||
@Service("io.sc.platform.lcdp.excel.template.service.impl.ExportExcelTemplateServiceImpl") |
|
||||
public class ExportExcelTemplateServiceImpl extends DaoServiceImpl<ExportExcelTemplateEntity, String, ExportExcelTemplateRepository> implements ExportExcelTemplateService { |
|
||||
|
|
||||
} |
|
@ -1,82 +0,0 @@ |
|||||
package io.sc.platform.lcdp.excel.template.vo; |
|
||||
|
|
||||
import io.sc.platform.lcdp.excel.template.enums.DataType; |
|
||||
import io.sc.platform.orm.api.vo.CorporationAuditorVo; |
|
||||
|
|
||||
/** |
|
||||
* 导出 Excel 模版 Vo |
|
||||
*/ |
|
||||
public class ExportExcelTemplateColumnVo extends CorporationAuditorVo { |
|
||||
private String id; |
|
||||
private String code;//模版代码
|
|
||||
private String name;//模版名称
|
|
||||
private String description;//模版描述
|
|
||||
private Integer order;//排序
|
|
||||
private String valueType;//值类型
|
|
||||
private String valueFormula;//值公式
|
|
||||
private String template;//模版ID
|
|
||||
|
|
||||
public String getId() { |
|
||||
return id; |
|
||||
} |
|
||||
|
|
||||
public void setId(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
public String getCode() { |
|
||||
return code; |
|
||||
} |
|
||||
|
|
||||
public void setCode(String code) { |
|
||||
this.code = code; |
|
||||
} |
|
||||
|
|
||||
public String getName() { |
|
||||
return name; |
|
||||
} |
|
||||
|
|
||||
public void setName(String name) { |
|
||||
this.name = name; |
|
||||
} |
|
||||
|
|
||||
public String getDescription() { |
|
||||
return description; |
|
||||
} |
|
||||
|
|
||||
public void setDescription(String description) { |
|
||||
this.description = description; |
|
||||
} |
|
||||
|
|
||||
public Integer getOrder() { |
|
||||
return order; |
|
||||
} |
|
||||
|
|
||||
public void setOrder(Integer order) { |
|
||||
this.order = order; |
|
||||
} |
|
||||
|
|
||||
public String getValueType() { |
|
||||
return valueType; |
|
||||
} |
|
||||
|
|
||||
public void setValueType(String valueType) { |
|
||||
this.valueType = valueType; |
|
||||
} |
|
||||
|
|
||||
public String getValueFormula() { |
|
||||
return valueFormula; |
|
||||
} |
|
||||
|
|
||||
public void setValueFormula(String valueFormula) { |
|
||||
this.valueFormula = valueFormula; |
|
||||
} |
|
||||
|
|
||||
public String getTemplate() { |
|
||||
return template; |
|
||||
} |
|
||||
|
|
||||
public void setTemplate(String template) { |
|
||||
this.template = template; |
|
||||
} |
|
||||
} |
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue