Commit dc1d5677 authored by 高滢's avatar 高滢

feat(样品): 图片展示

parent 7e122319
......@@ -39,7 +39,7 @@ export default {
if (isExternal(real_src)) {
return real_src
}
return process.env.VUE_APP_BASE_API + real_src
return process.env.VUE_APP_IMAGE_API + real_src
},
realSrcList() {
if (!this.src) {
......@@ -51,7 +51,7 @@ export default {
if (isExternal(item)) {
return srcList.push(item)
}
return srcList.push(process.env.VUE_APP_BASE_API + item)
return srcList.push(process.env.VUE_APP_IMAGE_API + item)
})
return srcList
},
......
......@@ -100,7 +100,7 @@
<el-link
type="primary"
:underline="false"
@click="clickSampleName()"
@click="clickSampleName(scope.row)"
>{{ scope.row.sampleName }}</el-link
>
</template>
......@@ -302,6 +302,37 @@
</div>
</el-form>
</el-drawer>
<el-dialog
title="查看"
:visible.sync="dialogFormVisible"
width="700px"
@close="closeSamplePhoto"
>
<el-form
:model="editParamsForm"
size="small"
label-position="right"
label-width="100px"
>
<el-form-item label="商标:" prop="trademark">
<image-preview
:src="clickNameForm.trademark"
width="150px"
height="150px"
></image-preview>
</el-form-item>
<el-form-item label="样品照片:" prop="samplePhotos">
<image-preview
:src="clickNameForm.samplePhotos"
width="150px"
height="150px"
></image-preview>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
</div>
</el-dialog>
</page-standard>
</template>
<script>
......@@ -316,6 +347,8 @@ import {
export default {
data() {
return {
clickNameForm: {},
dialogFormVisible: false,
addLoading: false,
editFormRules: {
identificationCode: [
......@@ -455,7 +488,13 @@ export default {
this.getList()
},
loadData() {},
clickSampleName() {},
clickSampleName(row) {
this.dialogFormVisible = true
this.clickNameForm = row
},
closeSamplePhoto() {
this.clickNameForm = {}
},
handleUpdate(id) {
selectSampleInfo({ id: id }).then(res => {
this.editParamsForm = res.data
......
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