Commit 9b89c042 authored by xiaoman's avatar xiaoman

Merge branch 'feature/develop_0713' of...

Merge branch 'feature/develop_0713' of http://gitlab.wanwudezhi.work/quanku/qk_admin into feature/develop_0713
parents 14e13b7d d8d832a7
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/qk_admin.iml" filepath="$PROJECT_DIR$/.idea/qk_admin.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<template>
<el-dialog
:visible.sync="showLargeDialog"
:before-close="handleClose">
<div >
<img :src="imageUrl" class="image" @click="handleClose">
</div>
</el-dialog>
</template>
<script>
export default {
name: 'CheckLargeImageDialog',
props: {
showLargeDialog: {
type: Boolean,
default: false
},
imageUrl: {
type: String,
default: ''
}
},
methods: {
handleClose() {
this.$emit('closeLargeDialog')
}
}
}
</script>
<style lang="scss" scoped>
.image {
min-width: 400px;
max-width: 600px;
height: auto;
}
</style>
......@@ -15,7 +15,7 @@
<div class="detail_image">
<div class="detail_title">{{ `钱币图片:` }}</div>
<div class="list">
<div v-for="(item, index) in goodsParams.images" :key="item + index" class="select_item">
<div v-for="(item, index) in goodsParams.images" :key="item + index" class="select_item" @click="handleShowLargeDialog(item)">
<img :src="item" class="gallery">
</div>
</div>
......@@ -137,9 +137,10 @@
<div style="text-align: end; margin-right: 20px;font-weight: bold; width: 100%">预览</div>
<div class="content_preview--image">
<a
v-if="compositeImageSrc"
:href="compositeImageSrc"
:style="{'background-image': `url(${compositeImageSrc})`}"
class="image" />
class="image"/>
</div>
</div>
......@@ -195,6 +196,11 @@
@closeDialog="dialogVisible = false"
@selectSuccess="handleSelectSuccess"
@imageBase64Str="handlerGetBase64" />
<CheckLargeImageDialog
:show-large-dialog="showLargeDialog"
:image-url="imageUrl"
@closeLargeDialog="showLargeDialog = false"
/>
</div>
</template>
......@@ -205,10 +211,11 @@ import { getToken } from '@/utils/auth'
import SelectImageDialog from './components/selectImageDialog'
import { listCategories } from '@/api/business/goods'
import { detailGoods, editGoods } from '@/api/business/goodsNew'
import CheckLargeImageDialog from './components/CheckLargeImageDialog'
export default {
name: 'InfoSet',
components: { SelectImageDialog, VuePictureCut, VuePictureCutMask, VuePictureCutMenu },
components: { CheckLargeImageDialog, SelectImageDialog, VuePictureCut, VuePictureCutMask, VuePictureCutMenu },
data() {
return {
pictureCut: null,
......@@ -241,7 +248,8 @@ export default {
goodsParams: { images: [] },
goodIdList: [],
currentIndex: 0,
isDisabledNext: false
showLargeDialog: false,
imageUrl: ''
}
},
......@@ -376,10 +384,10 @@ export default {
this.$message.error('请先删除已裁剪图片')
return
}
/* if (!this.goodsParams.images || this.goodsParams.images.length === 0) {
if (!this.goodsParams.images || this.goodsParams.images.length === 0) {
this.$message.error('无线上图片选择')
return
}*/
}
this.dialogVisible = true
this.selectDialogType = type
},
......@@ -401,17 +409,31 @@ export default {
cutCancel() {
this.src = ''
},
// 删除裁剪后图片
deleteCutImage(type) {
if (type === 1) { // 正面
this.blob = ''
this.base64 = ''
} else {
this.blobSecond = ''
this.base64Second = ''
event.preventDefault()
if (type === 1 && !this.blob) { // 正面
return
}
this.compositeImageSrc = ''
if (type === 2 && !this.blobSecond) {
return
}
this.$confirm(
'你确定删除吗?',
'提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (type === 1) { // 正面
this.blob = ''
this.base64 = ''
} else {
this.blobSecond = ''
this.base64Second = ''
}
this.compositeImageSrc = ''
})
},
// 选择线上图片后的图片链接
......@@ -524,6 +546,10 @@ export default {
} else {
this.handleGetDetail('', 3)
}
},
handleShowLargeDialog(imageUrl) {
this.imageUrl = imageUrl
this.showLargeDialog = true
}
}
}
......
......@@ -16,7 +16,7 @@
<template slot-scope="props">
<el-form label-position="left" class="table-expand">
<el-form-item label="钱币图片">
<img v-for="pic in props.row.images" :key="pic" :src="pic" class="gallery">
<img :src="props.row.topImage" class="gallery">
</el-form-item>
<el-form-item label="钱币价格">
<span>{{ props.row.price }}</span>
......@@ -34,7 +34,7 @@
<el-table-column align="center" property="iconUrl" label="图片">
<template slot-scope="scope">
<img :src="scope.row.images[0]" width="100%">
<img :src="scope.row.topImage" width="100%">
</template>
</el-table-column>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment