|
|
@ -124,9 +124,11 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" |
|
|
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" |
|
|
|
:headers="tokenHeader" :action="tablexImportExcelUrl" @change="handleImportExcel">--> |
|
|
|
:headers="tokenHeader" :action="tablexImportExcelUrl" @change="handleImportExcel">--> |
|
|
|
<a-button type="primary" icon="import" @click="showProcess()">导入实体</a-button> |
|
|
|
<a-button type="primary" icon="import" |
|
|
|
|
|
|
|
@click="showProcess( 1)">导入实体 |
|
|
|
|
|
|
|
</a-button> |
|
|
|
<!-- <a-button type="primary" icon="import" @click="showModalImport()">导入实体</a-button>--> |
|
|
|
<!-- <a-button type="primary" icon="import" @click="showModalImport()">导入实体</a-button>--> |
|
|
|
<a-modal |
|
|
|
<!-- <a-modal |
|
|
|
title="正在上传..." |
|
|
|
title="正在上传..." |
|
|
|
:visible="ModalData.isVisible==='true'" |
|
|
|
:visible="ModalData.isVisible==='true'" |
|
|
|
:confirm-loading="false" |
|
|
|
:confirm-loading="false" |
|
|
@ -143,7 +145,7 @@ |
|
|
|
:percent="parseInt(String(ModalData.uploaded/ModalData.records*100))" |
|
|
|
:percent="parseInt(String(ModalData.uploaded/ModalData.records*100))" |
|
|
|
title="上传进度:" |
|
|
|
title="上传进度:" |
|
|
|
status="active" :steps="ModalData.records"/> |
|
|
|
status="active" :steps="ModalData.records"/> |
|
|
|
</a-modal> |
|
|
|
</a-modal>--> |
|
|
|
<!-- </a-upload>--> |
|
|
|
<!-- </a-upload>--> |
|
|
|
|
|
|
|
|
|
|
|
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button> |
|
|
|
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button> |
|
|
@ -484,6 +486,7 @@ export default { |
|
|
|
importExcelUrl: "modulex/modulex/importExcel", |
|
|
|
importExcelUrl: "modulex/modulex/importExcel", |
|
|
|
functionImportExcelUrl: "/functionx/functionx/importExcel", |
|
|
|
functionImportExcelUrl: "/functionx/functionx/importExcel", |
|
|
|
tablexImportExcelUrl: "tablex/tablex/importExcel", |
|
|
|
tablexImportExcelUrl: "tablex/tablex/importExcel", |
|
|
|
|
|
|
|
tablexDownExcelUrl: "tablex/tablex/templateExcel", |
|
|
|
ruleImportExcelUrl: "rulex/rulex/importExcel", |
|
|
|
ruleImportExcelUrl: "rulex/rulex/importExcel", |
|
|
|
exportxsxl: "modulex/modulex/exportxsxl" |
|
|
|
exportxsxl: "modulex/modulex/exportxsxl" |
|
|
|
}, |
|
|
|
}, |
|
|
@ -502,7 +505,7 @@ export default { |
|
|
|
this.loginRole(usercode) |
|
|
|
this.loginRole(usercode) |
|
|
|
//console.log('userole1',this.userRole1) |
|
|
|
//console.log('userole1',this.userRole1) |
|
|
|
this.getSuperFieldList() |
|
|
|
this.getSuperFieldList() |
|
|
|
this.showProcess() |
|
|
|
/* this.showProcess()*/ |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|
importExcelUrl: function () { |
|
|
|
importExcelUrl: function () { |
|
|
@ -521,32 +524,48 @@ export default { |
|
|
|
tablexImportExcelUrl: function () { |
|
|
|
tablexImportExcelUrl: function () { |
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.tablexImportExcelUrl}`; |
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.tablexImportExcelUrl}`; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
tablexDownExcelUrl: function () { |
|
|
|
|
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.tablexDownExcelUrl}`; |
|
|
|
|
|
|
|
}, |
|
|
|
ruleImportExcelUrl: function () { |
|
|
|
ruleImportExcelUrl: function () { |
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.ruleImportExcelUrl}` |
|
|
|
return `${window._CONFIG['domianURL']}/${this.url.ruleImportExcelUrl}` |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
showModalImport() { |
|
|
|
|
|
|
|
this.$refs.moduleximport.edit(this.ModalData); |
|
|
|
|
|
|
|
// this.$refs.moduleximport.title = "测试页面111111"; |
|
|
|
|
|
|
|
this.$refs.moduleximport.disableSubmit = false; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 显示进度 |
|
|
|
// 显示进度 |
|
|
|
showProcess() { |
|
|
|
showProcess(type) { |
|
|
|
|
|
|
|
let data = { |
|
|
|
|
|
|
|
uploadUrl: '', |
|
|
|
|
|
|
|
downUrl: '', |
|
|
|
|
|
|
|
title: '', |
|
|
|
|
|
|
|
note: [] |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
switch (type) { |
|
|
|
|
|
|
|
case 1: { |
|
|
|
|
|
|
|
data.note = ['对应模块id(必填):填写正确的模块名称', |
|
|
|
|
|
|
|
'中文名称(必填):与模块名称相同。', |
|
|
|
|
|
|
|
'英文名称(必填):与模块名称相同,写模块名称的英文名称。', |
|
|
|
|
|
|
|
'结构图(选填):类图或E-R图,可以为空,不填写。', |
|
|
|
|
|
|
|
'实体状态:可填入值为[正常、停用、废弃],若不填写,默认为“正常”状态。', |
|
|
|
|
|
|
|
'版本状态: 可填入值为[当前、历史],若不填写,默认为“当前”状态', |
|
|
|
|
|
|
|
'版本号:请填写小与五位数的正整数' |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
data.title = '导入实体' |
|
|
|
|
|
|
|
data.uploadUrl = this.tablexImportExcelUrl |
|
|
|
|
|
|
|
data.downUrl = this.tablexDownExcelUrl |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
default: { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
let userId = store.getters.userInfo.id |
|
|
|
let userId = store.getters.userInfo.id |
|
|
|
let base_url = window._CONFIG['domianURL'] |
|
|
|
let base_url = window._CONFIG['domianURL'] |
|
|
|
base_url = base_url.replace('http', 'ws') |
|
|
|
base_url = base_url.replace('http', 'ws') |
|
|
|
let ws = new WebSocket(`${base_url}/uploadProcess/${userId}`) |
|
|
|
let ws = new WebSocket(`${base_url}/uploadProcess/${userId}`) |
|
|
|
this.$refs.moduleximport.show(this.tablexImportExcelUrl,''); |
|
|
|
this.$refs.moduleximport.show(data); |
|
|
|
ws.onmessage = (e) => { |
|
|
|
ws.onmessage = (e) => { |
|
|
|
// this.ModalData = JSON.parse(e.data) |
|
|
|
|
|
|
|
this.$refs.moduleximport.edit(JSON.parse(e.data)); |
|
|
|
this.$refs.moduleximport.edit(JSON.parse(e.data)); |
|
|
|
// if (JSON.parse(e.data).isVisible === 'false') { |
|
|
|
|
|
|
|
// this.$refs.moduleximport.close(); |
|
|
|
|
|
|
|
// // this.getList() |
|
|
|
|
|
|
|
// console.log("重新获取列表") |
|
|
|
|
|
|
|
// } |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 多选框的事件回调 |
|
|
|
// 多选框的事件回调 |
|
|
|