|
|
|
@ -118,6 +118,16 @@
|
|
|
|
|
{{ scope.$index + 1 }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="图片">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<img style="height: 50px;" :src="scope.row.image" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="缩略图">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<img style="height: 50px;" :src="scope.row.thumbnail" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="中文名称" prop="nameCh"></el-table-column>
|
|
|
|
|
<el-table-column label="英文名称" prop="nameEn"></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
@ -218,6 +228,7 @@
|
|
|
|
|
:visible="modifyDialog.visible"
|
|
|
|
|
v-if="modifyDialog.visible"
|
|
|
|
|
width="30%"
|
|
|
|
|
top="50px"
|
|
|
|
|
:before-close="handleDialogBeforeClose"
|
|
|
|
|
>
|
|
|
|
|
<el-form
|
|
|
|
@ -265,7 +276,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="image" label="上传图片">
|
|
|
|
|
<img
|
|
|
|
|
style="width: 170px;height: 120px;"
|
|
|
|
|
style="width: 150px;height: 100px;"
|
|
|
|
|
:src="modifyDialog.form.data.image"
|
|
|
|
|
/>
|
|
|
|
|
<el-upload
|
|
|
|
@ -285,11 +296,34 @@
|
|
|
|
|
>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item prop="thumbnail" label="上传缩略图">
|
|
|
|
|
<img
|
|
|
|
|
style="width: 150px;height: 100px;"
|
|
|
|
|
:src="modifyDialog.form.data.thumbnail"
|
|
|
|
|
/>
|
|
|
|
|
<el-upload
|
|
|
|
|
:action="`${uploadBase}/luoo-tag/tag/upload/image`"
|
|
|
|
|
:headers="uploadHeader"
|
|
|
|
|
:on-preview="handlePreview"
|
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
:before-remove="beforeRemove"
|
|
|
|
|
:on-change="handleUploadTagThumbnailSuccess"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="1"
|
|
|
|
|
:on-exceed="handleExceed"
|
|
|
|
|
:file-list="modifyDialog.thumbnailUploadFileList"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="small" type="primary" icon="el-icon-receiving"
|
|
|
|
|
>上传缩略图</el-button
|
|
|
|
|
>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="描述信息" prop="description">
|
|
|
|
|
<el-input
|
|
|
|
|
size="small"
|
|
|
|
|
type="textarea"
|
|
|
|
|
v-model="modifyDialog.form.data.description"
|
|
|
|
|
rows="6"
|
|
|
|
|
></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
@ -365,10 +399,12 @@ export default {
|
|
|
|
|
nameCh: null,
|
|
|
|
|
nameEn: null,
|
|
|
|
|
image: null,
|
|
|
|
|
thumbnail: null,
|
|
|
|
|
description: null
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
imageUploadFileList: []
|
|
|
|
|
imageUploadFileList: [],
|
|
|
|
|
thumbnailUploadFileList: []
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
@ -472,6 +508,17 @@ export default {
|
|
|
|
|
this.modifyDialog.imageUploadFileList = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleUploadTagThumbnailSuccess(response, file, fileList) {
|
|
|
|
|
if (response.status === "success") {
|
|
|
|
|
if (response.response.code === 200) {
|
|
|
|
|
this.$message.success("上传成功");
|
|
|
|
|
this.modifyDialog.form.data.thumbnail = response.response.data;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.response.message);
|
|
|
|
|
}
|
|
|
|
|
this.modifyDialog.thumbnailUploadFileList = [];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// ************************* 按扭事件 *************************
|
|
|
|
|
/**
|
|
|
|
|
* 查询按扭点击事件
|
|
|
|
@ -501,6 +548,7 @@ export default {
|
|
|
|
|
this.modifyDialog.form.data.nameCh = null;
|
|
|
|
|
this.modifyDialog.form.data.nameEn = null;
|
|
|
|
|
this.modifyDialog.form.data.image = null;
|
|
|
|
|
this.modifyDialog.form.data.thumbnail = null;
|
|
|
|
|
this.modifyDialog.form.data.description = null;
|
|
|
|
|
|
|
|
|
|
this.modifyDialog.type = 0;
|
|
|
|
@ -523,6 +571,7 @@ export default {
|
|
|
|
|
this.modifyDialog.form.data.nameCh = row.nameCh;
|
|
|
|
|
this.modifyDialog.form.data.nameEn = row.nameEn;
|
|
|
|
|
this.modifyDialog.form.data.image = row.image;
|
|
|
|
|
this.modifyDialog.form.data.thumbnail = row.thumbnail;
|
|
|
|
|
this.modifyDialog.form.data.description = row.description;
|
|
|
|
|
|
|
|
|
|
this.modifyDialog.type = 1;
|
|
|
|
@ -538,6 +587,7 @@ export default {
|
|
|
|
|
this.modifyDialog.form.data.nameCh = null;
|
|
|
|
|
this.modifyDialog.form.data.nameEn = null;
|
|
|
|
|
this.modifyDialog.form.data.image = null;
|
|
|
|
|
this.modifyDialog.form.data.thumbnail = null;
|
|
|
|
|
this.modifyDialog.form.data.description = null;
|
|
|
|
|
|
|
|
|
|
this.modifyDialog.type = 2;
|
|
|
|
@ -587,6 +637,7 @@ export default {
|
|
|
|
|
nameCh: this.modifyDialog.form.data["nameCh"],
|
|
|
|
|
nameEn: this.modifyDialog.form.data["nameEn"],
|
|
|
|
|
image: this.modifyDialog.form.data["image"],
|
|
|
|
|
thumbnail: this.modifyDialog.form.data["thumbnail"],
|
|
|
|
|
description: this.modifyDialog.form.data["description"],
|
|
|
|
|
parentId:
|
|
|
|
|
this.modifyDialog.form.data["parentId"] === null ||
|
|
|
|
|