dev^2
itcast 1 year ago
parent d453ec37c5
commit 85d6e31eab
  1. 37
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  2. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/fieldx/controller/FieldxController.java

@ -111,10 +111,9 @@
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button> <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>
<a-button type="primary" icon="download" @click="exportxsxl('模块,功能,规则表')">导出综合表</a-button> <a-button type="primary" icon="download" @click="exportxsxl('模块,功能,规则表')">导出综合表</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrlf"
@change="handleImportExcel"> <a-button type="primary" icon="import" @click="showProcess( fieldData)">导入字段</a-button>
<a-button type="primary" icon="import">导入字段</a-button>
</a-upload>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@ -443,8 +442,10 @@ export default {
deleteBatch: "/modulex/modulex/deleteBatch", deleteBatch: "/modulex/modulex/deleteBatch",
exportXlsUrl: "/modulex/modulex/exportXls", exportXlsUrl: "/modulex/modulex/exportXls",
importExcelUrlf: "fieldx/fieldx/importExcel", importExcelUrlf: "fieldx/fieldx/importExcel",
exportExcelUrlf: "fieldx/fieldx/exportXls",
modelImportExcelUrl: "modulex/modulex/importExcel", modelImportExcelUrl: "modulex/modulex/importExcel",
modelDownExcelUrl: "modulex/modulex/templateExcel", modelDownExcelUrl: "modulex/modulex/templateExcel",
importExcelUrl: "modulex/modulex/importExcel",
functionImportExcelUrl: "/functionx/functionx/importExcel", functionImportExcelUrl: "/functionx/functionx/importExcel",
tablexImportExcelUrl: "tablex/tablex/importExcel", tablexImportExcelUrl: "tablex/tablex/importExcel",
tablexDownExcelUrl: "tablex/tablex/templateExcel", tablexDownExcelUrl: "tablex/tablex/templateExcel",
@ -479,6 +480,9 @@ export default {
importExcelUrlf: function () { importExcelUrlf: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlf}` return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlf}`
}, },
exportExcelUrlf: function () {
return `${window._CONFIG['domianURL']}/${this.url.exportExcelUrlf}`
},
// columnsdataIndex // columnsdataIndex
checkColumn: function () { checkColumn: function () {
return this.columns.map(item => item.title) return this.columns.map(item => item.title)
@ -537,6 +541,31 @@ export default {
} }
}, },
fieldData: function () {
return {
note: ['序号: 请按顺序填入每行数据的序号,比如第一行就写1',
'表名(非空): 请填写实体表的名称',
'中文名称(非空): 请填写字段名称',
'英文名称(非空): 请填写字段名称的英语名称',
'数据类型(非空): 请填写数据类型,{char,varchar,int}这些等等,具体可以查看数据字典',
'数据长度(非空): 请填写该字段对应的长度',
'浮点精度: 请填写浮点精度',
'显示形式: 请填写该字段显示的形式',
'是否主键(非空): 请填写该字段是否为主键,填:是或否',
'是否外键(非空): 请填写该字段是否为外键,填:是或否',
'关联实体: 请填写该字段关联的其它实体表',
'关联字段: 请填写该字段关联实体表中对应的字段',
'是否为空(非空): 请填写该字段是否为空,填:是或否',
'是否重复(非空): 请填写该字段是否重复,填:是或否',
'字段规则: 请填写该字段的字段规则',
'字段状态(非空): 请填写该字段状态,填:正常、停用、废弃',
'版本状态(非空): 请填写该字段版本状态,填:当前,历史'
],
title: '导入字段',
uploadUrl: this.importExcelUrlf,
downUrl: this. exportExcelUrlf
}
},
ruleData: function () { ruleData: function () {
return { return {
note: ['对应模块(必填):填写正确的模块名称', note: ['对应模块(必填):填写正确的模块名称',

@ -413,6 +413,8 @@ public class FieldxController extends JeecgController<Fieldx, IFieldxService> {
webSocketUtils.sendMessage(loginUser.getId(), message); webSocketUtils.sendMessage(loginUser.getId(), message);
fieldx222Service.saveBatch(list); fieldx222Service.saveBatch(list);
List<Fieldx222> list222 = fieldx222Service.list(); List<Fieldx222> list222 = fieldx222Service.list();
message.put("records", String.valueOf(list222.size()));
webSocketUtils.sendMessage(loginUser.getId(), message);
fieldx222Service.remove(null); fieldx222Service.remove(null);
if(list222==null) if(list222==null)
return Result.error("文件上传失败"); return Result.error("文件上传失败");

Loading…
Cancel
Save