This commit is contained in:
parent
22e946c54a
commit
c28493b2ca
|
|
@ -128,11 +128,13 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="equipmentDeployment"
|
@click="equipmentDeployment"
|
||||||
v-show="!isAddVisible"
|
v-show="!isAddVisible"
|
||||||
style="margin-right: -12px"
|
|
||||||
>
|
>
|
||||||
新增装备
|
新增装备
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleImport" v-show="!isAddVisible"> 批量导入 </el-button>
|
<el-button type="primary" size="mini" @click="handleImport" v-show="!isAddVisible"> 批量导入 </el-button>
|
||||||
|
<el-button type="primary" size="mini" @click="handleImportImg" v-show="!isAddVisible">
|
||||||
|
批量导入图片
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
|
|
@ -567,6 +569,33 @@
|
||||||
<el-button @click="dialogVisible = false">关 闭</el-button>
|
<el-button @click="dialogVisible = false">关 闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog title="批量导入图片" :visible.sync="upload.open2" width="400px" append-to-body>
|
||||||
|
<el-upload
|
||||||
|
ref="upload"
|
||||||
|
:limit="1"
|
||||||
|
accept=".zip"
|
||||||
|
:headers="upload.headers"
|
||||||
|
:action="upload.url2 + '?orderId=' + orderId"
|
||||||
|
:disabled="upload.isUploading"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
:auto-upload="false"
|
||||||
|
drag
|
||||||
|
>
|
||||||
|
<i class="el-icon-upload"></i>
|
||||||
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
<div class="el-upload__tip text-center" slot="tip">
|
||||||
|
<span>仅允许导入zip格式文件。</span>
|
||||||
|
<el-link
|
||||||
|
type="primary"
|
||||||
|
:underline="false"
|
||||||
|
style="font-size: 12px; vertical-align: baseline"
|
||||||
|
@click="importTemplate2"
|
||||||
|
>下载模板
|
||||||
|
</el-link>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
</el-dialog>
|
||||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
|
|
@ -659,6 +688,7 @@ export default {
|
||||||
upload: {
|
upload: {
|
||||||
// 是否显示弹出层(用户导入)
|
// 是否显示弹出层(用户导入)
|
||||||
open: false,
|
open: false,
|
||||||
|
open2: false,
|
||||||
// 弹出层标题(用户导入)
|
// 弹出层标题(用户导入)
|
||||||
title: '',
|
title: '',
|
||||||
// 是否禁用上传
|
// 是否禁用上传
|
||||||
|
|
@ -669,6 +699,7 @@ export default {
|
||||||
headers: { Authorization: 'Bearer ' + getToken() },
|
headers: { Authorization: 'Bearer ' + getToken() },
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: process.env.VUE_APP_BASE_API + '/material-mall/order/importData',
|
url: process.env.VUE_APP_BASE_API + '/material-mall/order/importData',
|
||||||
|
url2: process.env.VUE_APP_BASE_API + '/material-mall/order/upload-multi',
|
||||||
},
|
},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
orderCreateUser: '',
|
orderCreateUser: '',
|
||||||
|
|
@ -748,6 +779,7 @@ export default {
|
||||||
// 文件上传成功处理
|
// 文件上传成功处理
|
||||||
handleFileSuccess(response, file, fileList) {
|
handleFileSuccess(response, file, fileList) {
|
||||||
this.upload.open = false
|
this.upload.open = false
|
||||||
|
this.upload.open2 = false
|
||||||
this.upload.isUploading = false
|
this.upload.isUploading = false
|
||||||
this.$refs.upload.clearFiles()
|
this.$refs.upload.clearFiles()
|
||||||
this.$alert(
|
this.$alert(
|
||||||
|
|
@ -934,6 +966,9 @@ export default {
|
||||||
this.upload.title = '导入'
|
this.upload.title = '导入'
|
||||||
this.upload.open = true
|
this.upload.open = true
|
||||||
},
|
},
|
||||||
|
handleImportImg() {
|
||||||
|
this.upload.open2 = true
|
||||||
|
},
|
||||||
//编辑
|
//编辑
|
||||||
editRowInfo(row) {
|
editRowInfo(row) {
|
||||||
// this.orderId = orderId.toString()
|
// this.orderId = orderId.toString()
|
||||||
|
|
@ -1066,6 +1101,9 @@ export default {
|
||||||
importTemplate() {
|
importTemplate() {
|
||||||
this.download('/material-mall/order/template', {}, `装备信息导入模板_${new Date().getTime()}.xlsx`)
|
this.download('/material-mall/order/template', {}, `装备信息导入模板_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
importTemplate2() {
|
||||||
|
this.download(`/material-mall/order/zip?orderId=${this.orderId}`, {}, `装备信息图片导入模板_${new Date().getTime()}.zip`)
|
||||||
|
},
|
||||||
async addList() {
|
async addList() {
|
||||||
try {
|
try {
|
||||||
if (!this.$route.query.orderId) {
|
if (!this.$route.query.orderId) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue