Compare commits

..

No commits in common. 'f84d5ef57ee0fedb1a51f39edcbdb181450d7789' and 'e2d6ac6cb8dd52590e88427c7f5285e557ca356e' have entirely different histories.

  1. 16
      ant-design-vue-jeecg/src/views/modulex/ModulexList.vue
  2. 168
      ant-design-vue-jeecg/src/views/modulex/modules/ModulexImport.vue

@ -70,8 +70,6 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button type="primary" @click="showModal1()"></a-button> -->
<a-button type="primary" icon="import" @click="showModalImport()">导入模块</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-modal
title="正在上传..."
@ -241,8 +239,6 @@
<modulex-modal ref="modalForm" @ok="modalFormOk"></modulex-modal>
<bugx-modal ref="BugxModal"></bugx-modal>
<!-- 导入弹出框 -->
<modulex-import ref="moduleximport" @ok="modalFormOk"></modulex-import>
<TablexList ref="TablexList"></TablexList>
<FieldxList ref="FieldxList"></FieldxList>
</a-card>
@ -254,7 +250,7 @@ import '@assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ModulexModal from './modules/ModulexModal'
import ModulexImport from './modules/ModulexImport.vue'
import { getAction } from "@api/manage"
import BugxModal from "@views/modulex/modules/BugxModal"
import store from "@/store"
@ -269,8 +265,7 @@ export default {
TablexList,
FieldxList,
BugxModal,
ModulexModal,
ModulexImport
ModulexModal
},
data () {
return {
@ -281,7 +276,6 @@ export default {
status: '判断文件结构'
},
visible:false,
moduleximport: false,
description: '模块管理管理页面',
//
columns: [
@ -520,12 +514,6 @@ export default {
},
},
methods: {
showModalImport(){
this.$refs.moduleximport.edit();
// this.$refs.moduleximport.title = "111111";
this.$refs.moduleximport.disableSubmit = false;
},
//
showProcess(){
let userId = store.getters.userInfo.id

@ -1,168 +0,0 @@
<template>
<a-modal
:title="title"
width="50%"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleOk"
@cancel="handleCancel"
cancelText="关闭">
<a-alert message="请下载" type="info" show-icon style="margin-bottom: 20px;"/>
<a-form :form="form" :label-col="{ span: 5 }" :wrapper-col="{ span: 16 }" >
<!-- <a-alert message="请下载" type="info" show-icon /> -->
<a-form-item label="下载标准表格">
<div class="standB"><a-button type="primary" icon="download" @click="handleDownload"/></div>
<div class="standBu"> <a-alert
message="必须下载标准表格,否则审核不通过"
type="error"
closable
@close="onClose"
/></div>
</a-form-item>
<a-form-item label="上传标准表格">
<!-- @click="showProcess" -->
<a-upload
:multiple="false"
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
@change="handleChange">
<a-button type="primary" icon="upload" ></a-button>
<!-- <div>
<p>当前状态{{ ModalData.status }}</p>
<p>总记录数{{ ModalData.records }}</p>
<p>已上传{{ ModalData.uploaded }}</p>
<a-progress
:percent="parseInt(String(ModalData.uploaded/ModalData.records*100))"
title="上传进度:"
status="active"
:steps="ModalData.records"/>
</div> -->
</a-upload>
</a-form-item>
<a-form-model-item label="注意事项" v-if="uploadFinished">
<a-list size="small" :data-source="datas">
<a-list-item slot="renderItem" slot-scope="item,index" style="border-bottom:0px ;"> {{ index+1 }} . {{ item }}</a-list-item>
</a-list>
</a-form-model-item>
</a-form>
</a-modal>
</template>
<script>
import getAction from '@api/manage'
import store from '@/store'
export default {
name: 'ModelTest',
comments: {
},
data() {
return {
title: '导入xxxxxx',
visible: false,
model: {},
//
uploadFinished: false,
ModalData: {
uploaded: '0',
isVisible: 'false',
records: '0',
status: '判断文件结构'
},
confirmLoading: false,
form: this.$form.createForm(this),
url:
{
downfile: ''
},
datas: [
'Racing car sprays burning fuel into crowd.',
'Japanese princess to wed commoner.',
'Australian walks 100km after outback crash.',
'Man charged over missing wedding girl.',
'Los Angeles battles huge wildfires.'
]
}
},
created() {
},
computed: {
},
methods: {
//
//
showProcess() {
let userId = store.getters.userInfo.id
let baseUrl = window._CONFIG['domianURL']
baseUrl = baseUrl.replace('http', 'ws')
let ws = new WebSocket(`${baseUrl}/uploadProcess/${userId}`)
ws.onmessage = (e) => {
this.ModalData = JSON.parse(e.data)
}
},
//
handleChange(info) {
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList)
}
if (info.file.status === 'done') {
this.$message.success(`${info.file.name} file uploaded successfully`)
this.handleUploadFinished()
} else if (info.file.status === 'error') {
this.$message.error(`${info.file.name} file upload failed.`)
}
},
// 使
handleUploadFinished() {
this.uploadFinished = true
},
//
handleDownload() {
console.log(1111)
// getAction(this.url.downfile).then(response => {
// const url = window.URL.createObjectURL(new Blob([response.data]))
// const link = document.createElement('a')
// link.href = url
// link.setAttribute('download', 'your-document.pdf')
// document.body.appendChild(link)
// link.click()
// })
// .catch(error => {
// console.error(error)
// })
},
add() {
},
edit(record) {
this.visible = true
},
close() {
this.$emit('close')
this.visible = false
},
handleCancel() {
this.close()
},
handleOk() {
},
//
onClose(e) {
console.log(e, 'I was closed.')
}
}
}
</script>
<style scoped>
.standB{
width: 15%;
float: left;
}
.standBu{
width: 85%;
float: right;
}
</style>
Loading…
Cancel
Save