|
@@ -17,12 +17,14 @@
|
|
|
|
|
|
<!-- 列表 -->
|
|
|
<el-table :data="tableData" v-loading="loading">
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
label="排序"
|
|
|
align="center"
|
|
|
type="index"
|
|
|
show-overflow-tooltip
|
|
|
- />
|
|
|
+ /> -->
|
|
|
+
|
|
|
+ <el-table-column label="排序" align="center" width="200px" prop="sort" />
|
|
|
|
|
|
<el-table-column label="图片" align="center" width="100px">
|
|
|
<template slot-scope="scope">
|
|
@@ -130,6 +132,7 @@ export default {
|
|
|
// 弹窗
|
|
|
dialogVisible: false,
|
|
|
dialogTitle: "新增",
|
|
|
+ picTemp: "",
|
|
|
dialogData: {
|
|
|
sort: 1,
|
|
|
},
|
|
@@ -233,13 +236,17 @@ export default {
|
|
|
|
|
|
// 上传
|
|
|
uploadCode(e) {
|
|
|
- this.dialogData.pic = e.file;
|
|
|
+ this.picTemp = e.file;
|
|
|
+ if (e != null && e.file != "") {
|
|
|
+ this.dialogData.pic = e.file;
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 提交分类表单
|
|
|
getDialogSubmit() {
|
|
|
var that = this;
|
|
|
- var pic = that.dialogData.pic;
|
|
|
+ var pic = this.picTemp;
|
|
|
+ // var pic = that.dialogData.pic;
|
|
|
if (pic == null || pic == "") {
|
|
|
that.$message.success("请上传图片");
|
|
|
return;
|