lion 9 months ago
parent f53ebd5478
commit e116f211a9

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 30 KiB

@ -2,12 +2,11 @@
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img src="../../../assets/logo-mini.png?v=1" class="sidebar-logo">
<img src="../../../assets/logo-mini.png?v=1" style="width:54px;height:32px" class="sidebar-logo">
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img src="../../../assets/logo-mini.png?v=1" class="sidebar-logo">
<img src="../../../assets/logo.png?v=2" class="sidebar-name-logo" />
<!-- <img src="../../../assets/logo.png?v=2" class="sidebar-name-logo" /> -->
</router-link>
</transition>
</div>

@ -33,18 +33,30 @@
<el-input placeholder="Please Input" style="width:100%" v-model="form.sort"></el-input>
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in visibelList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:is_visible>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Visible
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_visible" placeholder="Please Select">
<el-option v-for="item in visibelList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:is_recommend>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Recommend
</div>
<div class="xy-table-item-content">
<el-select style="width:100%" v-model="form.is_recommend" placeholder="Please Select">
<el-option v-for="item in visibelList" :key="item.id" :label="item.value" :value="item.id"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:size>
@ -115,6 +127,34 @@
</el-select>
</div>
</div>
</template>
<template v-slot:icon_id>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Icon
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' :limit="1" list-type="picture-card"
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :file-list="iconList" ref="pictureUpload" :auto-upload="true"
:on-success="handlesuccess" :on-remove="handleRemove">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
<template v-slot:icon_active_id>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Icon Active
</div>
<div class="xy-table-item-content">
<el-upload :action="action" class='upload-demo' :limit="1" list-type="picture-card"
accept=".PNG,.jpg,.jpeg,.bmp,.svg" :file-list="iconActiveList" ref="pictureUpload" :auto-upload="true"
:on-success="handlesuccessA" :on-remove="handleRemoveA">
<i class="el-icon-plus"></i>
</el-upload>
</div>
</div>
</template>
</xy-dialog>
@ -129,7 +169,10 @@
} from "@/api/application/category.js"
import {
index as getBaseList
} from "@/api/system/baseForm.js"
} from "@/api/system/baseForm.js"
import {
getToken
} from '@/utils/auth'
import {
index
} from "@/api/product/category.js"
@ -140,15 +183,21 @@
id: '',
type: 'add',
productPhaseList: [],
webinarList: [],
webinarList: [],
uploadOther: {
token: ""
},
action: `${process.env.VUE_APP_UPLOAD_API}`,
iconList: [], // category id
iconActiveList: [],
sampleTypeList: [{
id: 0,
value: 'Normal'
}, {
id: 1,
value: 'Special'
}],
visibelList:[{
}],
visibelList: [{
id: 1,
value: 'Yes'
}, {
@ -157,14 +206,17 @@
}],
form: {
name: '',
type: 0,
is_visible:1,
type: 0,
is_visible: 1,
is_recommend: 0,
sort: 0,
size: [],
lon: [],
phase: [],
interaction: [],
webinar_ids: []
webinar_ids: [],
icon_id:'',
icon_active_id:''
},
rules: {
name: [{
@ -200,12 +252,61 @@
page_size: 9999,
})
this.webinarList = res.data
},
},
handleRemove(file, fileList) {
this.iconList = fileList
},
handlesuccess(response, file, fileList) {
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
this.iconList = []
return
}
this.iconList = fileList
},
handleRemoveA(file, fileList) {
this.iconActiveList = fileList
},
handlesuccessA(response, file, fileList) {
if (response && response.hasOwnProperty('errcode')) {
this.$Message.warning(response.errmsg || '')
this.iconList = []
return
}
this.iconActiveList = fileList
},
submit() {
if (this.id) {
this.form.id = this.id
} else {
this.form.id = ''
}
if (this.iconList.length > 0) {
for (var h of this.iconList) {
if (h.response) {
this.form.icon_id = h.response.id
} else {
this.form.icon_id = h.id
}
}
} else {
this.form.icon_id = ''
}
if (this.iconActiveList.length > 0) {
for (var h of this.iconActiveList) {
if (h.response) {
this.form.icon_active_id = h.response.id
} else {
this.form.icon_active_id = h.id
}
}
} else {
this.form.icon_active_id = ''
}
console.log("this.form", this.form)
// return
@ -225,16 +326,34 @@
getDetail() {
show({
id: this.id,
show_relation: []
show_relation: ['icon','iconActive']
}).then(res => {
this.form = this.base.requestToForm(res, this.form)
this.form.type = res.type ? res.type : 0
this.form.is_visible = res.is_visible?res.is_visible:0
this.form.type = res.type ? res.type : 0
this.form.is_visible = res.is_visible ? res.is_visible : 0
this.form.is_recommend = res.is_recommend ? res.is_recommend : 0
this.form.size = res.size ? res.size : []
this.form.lon = res.lon ? res.lon : []
this.form.phase = res.phase ? res.phase : []
this.form.interaction = res.interaction ? res.interaction : [],
this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : []
this.form.interaction = res.interaction ? res.interaction : []
this.form.webinar_ids = res.webinar_ids ? res.webinar_ids : []
if(res.icon){
this.iconList.push({
name: res.icon.original_name,
id: res.icon.id,
url: res.icon.url
})
}
if(res.icon_active){
this.iconActiveList.push({
name: res.icon_active.original_name,
id: res.icon_active.id,
url: res.icon_active.url
})
}
})
}
},
@ -245,11 +364,14 @@
this.getDetail()
}
} else {
this.id = ''
this.id = ''
this.iconList = []
this.iconActiveList = []
this.form = {
name: '',
type: 0,
is_visible:1,
type: 0,
is_visible: 1,
is_recommend: 0,
sort: 0,
size: [],
lon: [],
@ -266,4 +388,13 @@
</script>
<style scoped lang="scss">
::v-deep .is_recommend,
::v-deep .is_visible,
::v-deep .sort {
flex-basis: 33%;
}
::v-deep .icon_id,
::v-deep .icon_active_id{
flex-basis: 100%;
}
</style>

@ -49,7 +49,22 @@
</el-radio-group>
</div>
</div>
</template>
</template>
<template v-slot:is_sample>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>Sample
</div>
<div class="xy-table-item-content">
<el-radio-group v-model="form.is_sample">
<el-radio :label="1">Yes</el-radio>
<el-radio :label="0">No</el-radio>
</el-radio-group>
</div>
</div>
</template>
<template v-slot:picture_id>
<div class="xy-table-item">
<div class="xy-table-item-label" style="font-weight: bold">
@ -321,7 +336,8 @@
product_category_links_by_sub: [],
name: '',
sort: 0,
is_recommend: 0,
is_recommend: 0,
is_sample:0,
picture_id: '',
description: '',
application_note_desc: '',
@ -632,7 +648,9 @@
this.form.character = res.character ? res.character : ''
this.form.packing = res.packing ? res.packing : ''
// this.applicationsList = res.product_category_applications
this.form.is_recommend = res.is_recommend ? res.is_recommend : 0
this.form.is_recommend = res.is_recommend ? res.is_recommend : 0
this.form.is_sample = res.is_sample ? res.is_sample : 0
this.showWang = true
this.showPacking = true
@ -713,7 +731,8 @@
product_category_links_by_sub: [],
name: '',
sort: 0,
is_recommend: 0,
is_recommend: 0,
is_sample:0,
picture_id: '',
description: '',
application_note_desc: '',
@ -747,7 +766,9 @@
{
flex-basis: 100%;
}
::v-deep .sort,::v-deep .is_recommend,::v-deep .is_sample{
flex-basis: 33%;
}
::v-deep .el-checkbox__input .el-checkbox__inner {
border-radius: 50%;
}

@ -25,7 +25,7 @@ module.exports = {
* Detail: https://cli.vuejs.org/config/#publicpath
*/
publicPath: process.env.ENV === 'staging' ? '/admin_test' : '/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin',
outputDir: '/Users/mac/Documents/朗业/2024/s-美国赛分/saifen/public/admin_test',
assetsDir: 'static',
css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save