Merge branch 'dev-cq' of http://192.168.0.56:3000/bonus/devicesmgt into dev-cq
This commit is contained in:
commit
886a093818
|
|
@ -50,6 +50,7 @@
|
||||||
icon="el-icon-bottom"
|
icon="el-icon-bottom"
|
||||||
size="mini"
|
size="mini"
|
||||||
v-hasPermi="['machinery:parts:add']"
|
v-hasPermi="['machinery:parts:add']"
|
||||||
|
@click="handleUploadExcel"
|
||||||
>导入</el-button
|
>导入</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -249,6 +250,45 @@
|
||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
title="上传文件"
|
||||||
|
:visible.sync="openUpload"
|
||||||
|
width="400px"
|
||||||
|
append-to-body
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-upload
|
||||||
|
ref="excelUpload"
|
||||||
|
:http-request="(file) => excelUpload(file)"
|
||||||
|
accept=".xlsx, .xls"
|
||||||
|
:limit="1"
|
||||||
|
:file-list="excelList"
|
||||||
|
>
|
||||||
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
|
</el-upload>
|
||||||
|
<div style="
|
||||||
|
font-size: 12px;
|
||||||
|
color: #999999;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 20px 0;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span>支持格式:excel表格,单个文件不能超过20MB</span>
|
||||||
|
<span>注意:需要根据模版导入本年配件框架内容,重复上传会覆盖本年框架内容。</span>
|
||||||
|
</div>
|
||||||
|
<div style="
|
||||||
|
display: flex;
|
||||||
|
justify-content: right;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20px
|
||||||
|
">
|
||||||
|
<el-button type="primary" style="margin-right: 15px;">确定</el-button>
|
||||||
|
<el-button>取消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -261,6 +301,7 @@ import {
|
||||||
updatePartTypeById,
|
updatePartTypeById,
|
||||||
delPartType,
|
delPartType,
|
||||||
} from '@/api/store/tools'
|
} from '@/api/store/tools'
|
||||||
|
import { fileUpLoad } from '@/api/system/upload'
|
||||||
|
|
||||||
import Treeselect from '@riophae/vue-treeselect'
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
|
@ -283,6 +324,7 @@ export default {
|
||||||
title: '',
|
title: '',
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
openUpload: false,
|
||||||
// 是否展开,默认全部展开
|
// 是否展开,默认全部展开
|
||||||
isExpandAll: true,
|
isExpandAll: true,
|
||||||
// 重新渲染表格状态
|
// 重新渲染表格状态
|
||||||
|
|
@ -333,12 +375,30 @@ export default {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
isEdit: false,
|
isEdit: false,
|
||||||
|
// excel文件列表
|
||||||
|
excelList: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/** 上传excel文件 */
|
||||||
|
uploadExcel(file) {
|
||||||
|
console.log(file)
|
||||||
|
},
|
||||||
|
/** 上传excel文件前 */
|
||||||
|
beforeExcelUpload(file) {
|
||||||
|
console.log(file)
|
||||||
|
},
|
||||||
|
/** 上传excel文件成功 */
|
||||||
|
excelSuccess() {
|
||||||
|
console.log('上传成功')
|
||||||
|
},
|
||||||
|
/** 上传excel文件失败 */
|
||||||
|
excelError() {
|
||||||
|
console.log('上传失败')
|
||||||
|
},
|
||||||
/** 查询部门列表 */
|
/** 查询部门列表 */
|
||||||
getList() {
|
getList() {
|
||||||
console.log(this.queryParams)
|
console.log(this.queryParams)
|
||||||
|
|
@ -400,6 +460,11 @@ export default {
|
||||||
this.isEdit = false
|
this.isEdit = false
|
||||||
this.initApiGetPartTree()
|
this.initApiGetPartTree()
|
||||||
},
|
},
|
||||||
|
/** 导入excel按钮操作 */
|
||||||
|
handleUploadExcel() {
|
||||||
|
this.reset()
|
||||||
|
this.openUpload = true
|
||||||
|
},
|
||||||
/** 展开/折叠操作 */
|
/** 展开/折叠操作 */
|
||||||
toggleExpandAll() {
|
toggleExpandAll() {
|
||||||
this.refreshTable = false
|
this.refreshTable = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue