Commit 7540089b authored by 高滢's avatar 高滢

feat(样品): 素材库按钮

parent 235b67db
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
<el-drawer <el-drawer
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
:title="dialogTitle" :title="dialogTitle"
wrapper-closable="false" :wrapper-closable="false"
size="40%" size="40%"
@close="cancleSubmit" @close="cancleSubmit"
> >
...@@ -278,7 +278,11 @@ ...@@ -278,7 +278,11 @@
v-model="editParamsForm.trademark" v-model="editParamsForm.trademark"
:limit="1" :limit="1"
></image-upload> ></image-upload>
<el-link type="primary" @click="selectTrademarkMaterial"> <el-link
v-if="trademarkDisplay"
type="primary"
@click="selectTrademarkMaterial"
>
从素材库选择</el-link 从素材库选择</el-link
> >
</el-form-item> </el-form-item>
...@@ -287,7 +291,11 @@ ...@@ -287,7 +291,11 @@
v-model="editParamsForm.samplePhotos" v-model="editParamsForm.samplePhotos"
:limit="5" :limit="5"
></image-upload> ></image-upload>
<el-link type="primary" @click="selectSampleMaterial"> <el-link
v-if="samplePhotosDisplay"
type="primary"
@click="selectSampleMaterial"
>
从素材库选择</el-link 从素材库选择</el-link
> >
</el-form-item> </el-form-item>
...@@ -412,7 +420,9 @@ export default { ...@@ -412,7 +420,9 @@ export default {
editParamsForm: { editParamsForm: {
id: '', id: '',
deleted: 0, deleted: 0,
flag: '0' flag: '0',
trademark: '',
samplePhotos: ''
}, },
tableLoding: true, tableLoding: true,
activeName: 'completeSample', activeName: 'completeSample',
...@@ -430,7 +440,9 @@ export default { ...@@ -430,7 +440,9 @@ export default {
tableData: [], tableData: [],
total: 0, total: 0,
dialogVisible: false, dialogVisible: false,
dialogTitle: '新建' dialogTitle: '新建',
trademarkDisplay: true,
samplePhotosDisplay: true
} }
}, },
computed: { computed: {
...@@ -438,6 +450,26 @@ export default { ...@@ -438,6 +450,26 @@ export default {
return materialLibrary return materialLibrary
} }
}, },
watch: {
'editParamsForm.trademark'(newVal, oldVal) {
if (newVal) {
this.trademarkDisplay = false
} else {
this.trademarkDisplay = true
}
},
'editParamsForm.samplePhotos'(newVal, oldVal) {
if (newVal) {
var arr = []
arr = newVal.split(',')
if (arr.length < 5) {
this.samplePhotosDisplay = true
} else {
this.samplePhotosDisplay = false
}
}
}
},
created() { created() {
this.getList() this.getList()
}, },
......
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