Commit f22f3cb1 by 前端

Merge branch 'v3.5.0' into 'master'

合并V3.5.0

See merge request !2
2 parents 1398b7f4 ae8ac346
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="channel-content gl-form-page"> <div class="channel-content gl-form-page">
<el-form ref="ruleForm" :model="channelForm" label-width="154px" size="small" :rules="rules"> <el-form ref="ruleForm" :model="channelForm" label-width="154px" size="small" :rules="rules">
<el-form-item label="频道名称:" prop="channelName"> <el-form-item label="频道名称:" prop="channelName">
<el-input v-model="channelForm.channelName" :disabled="isDisabled" maxlength="4"></el-input> <el-input v-model="channelForm.channelName"></el-input>
</el-form-item> </el-form-item>
<span v-if="channelForm.channelType == 1"> <span v-if="channelForm.channelType == 1">
<el-form-item label="频道主题:" prop="channelStyle"> <el-form-item label="频道主题:" prop="channelStyle">
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</div> </div>
</el-form-item> </el-form-item>
</span> </span>
<el-form-item label="频道banner:" prop="channelImg" style="margin-top:15px;"> <el-form-item label="频道banner:" prop="channelImg" style="margin-top: 15px">
<glsx-preview :picOptions="picOptions" :imageUrlArr="channelForm.channelImgArr" @change="changeChannelImg"></glsx-preview> <glsx-preview :picOptions="picOptions" :imageUrlArr="channelForm.channelImgArr" @change="changeChannelImg"></glsx-preview>
<div class="el-form-item__error" v-if="channelImgFlag">请上传频道banner</div> <div class="el-form-item__error" v-if="channelImgFlag">请上传频道banner</div>
</el-form-item> </el-form-item>
...@@ -60,7 +60,6 @@ export default { ...@@ -60,7 +60,6 @@ export default {
data() { data() {
return { return {
loading: false, loading: false,
isDisabled: false,
id: this.$route.query.id ? this.$route.query.id : '', id: this.$route.query.id ? this.$route.query.id : '',
merchantChannelId: this.$route.query.merchantChannelId ? this.$route.query.merchantChannelId : '', merchantChannelId: this.$route.query.merchantChannelId ? this.$route.query.merchantChannelId : '',
channelForm: { channelForm: {
...@@ -102,7 +101,6 @@ export default { ...@@ -102,7 +101,6 @@ export default {
}, },
created() { created() {
if (this.id || this.merchantChannelId) this.getChannelDetail() if (this.id || this.merchantChannelId) this.getChannelDetail()
this.isDisabled = this.id ? true : this.merchantChannelId ? false : true
}, },
methods: { methods: {
changeChannelStyle() { changeChannelStyle() {
...@@ -117,7 +115,7 @@ export default { ...@@ -117,7 +115,7 @@ export default {
this.channelForm.channelImg = this.commonImg(this.channelImgbgArr[this.channelForm.channelStyle - 1]) this.channelForm.channelImg = this.commonImg(this.channelImgbgArr[this.channelForm.channelStyle - 1])
} else { } else {
this.channelForm.channelImgArr = [this.commonImg(this.channelOtherImgbgArr[this.channelForm.channelType - 2])] this.channelForm.channelImgArr = [this.commonImg(this.channelOtherImgbgArr[this.channelForm.channelType - 2])]
this.channelForm.channelImg = this.commonImg(this.channelOtherImgbgArr[this.channelForm.channelType - 2]) this.channelForm.channelImg = this.commonImg(this.channelOtherImgbgArr[this.channelForm.channelType - 2])
} }
}, },
getChannelDetail() { getChannelDetail() {
...@@ -130,7 +128,7 @@ export default { ...@@ -130,7 +128,7 @@ export default {
this.channelForm.posterImgArr.push(res.data.posterImg) //海报 this.channelForm.posterImgArr.push(res.data.posterImg) //海报
this.channelForm.publicityImgArr.push(res.data.publicityImg) //频道分享预览图 this.channelForm.publicityImgArr.push(res.data.publicityImg) //频道分享预览图
this.channelForm.channelImgArr.push(res.data.channelImg) //频道banner this.channelForm.channelImgArr.push(res.data.channelImg) //频道banner
if(!res.data.channelImg) this.diffChannelStyle() if (!res.data.channelImg) this.diffChannelStyle()
} }
}) })
}, },
...@@ -256,4 +254,4 @@ export default { ...@@ -256,4 +254,4 @@ export default {
margin-top: 15px; margin-top: 15px;
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -148,7 +148,7 @@ export default { ...@@ -148,7 +148,7 @@ export default {
}, },
handleEdit(val) { handleEdit(val) {
this.$router.push({ this.$router.push({
path: `/channel/add?id=${val.id}&channelType=${val.channelType}` path: `/channel/add?id=${val.id}&channelType=${val.channelType}&$title=频道设置`
}) })
} }
} }
......
<template> <template>
<div class="add-wrap"> <div class="add-wrap">
<div class="container edit-container" style="min-height: 520px !important"> <div class="container edit-container" style="min-height: 520px !important">
<p class="edit-title" id="basic">新增门店</p> <p class="edit-title" id="basic">{{merchantId?'编辑门店':'新增门店'}}</p>
<glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container" ref="editFormRef" :isEdit="true" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="merchantHtml"> <div slot="merchantHtml">
<el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleRelateStoreClose">选择门店</el-button> <el-button type="default" class="el-icon-plus" v-if="!isDisabled" @click="handleRelateStoreClose">选择门店</el-button>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div slot="channelHtml"> <div slot="channelHtml">
<el-checkbox-group v-model="editForm.channelIds" @change="handleCheckedChannelChange"> <el-checkbox-group v-model="editForm.channelIds" @change="handleCheckedChannelChange">
<el-checkbox v-for="channel in channelList" :label="channel.id" :key="channel.id">{{ channel.name }}</el-checkbox> <el-checkbox v-for="channel in channelList" :label="channel.channelType" :key="channel.channelType">{{ channel.channelName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</glsx-combi-form> </glsx-combi-form>
...@@ -35,8 +35,11 @@ export default { ...@@ -35,8 +35,11 @@ export default {
return { return {
size: 'small', size: 'small',
editChildRef: 'editChildRef', editChildRef: 'editChildRef',
merchantId: this.$route.query.merchantId ? this.$route.query.merchantId : '',
editForm: { editForm: {
channelIds: [] channelIds: [],
merchantId: '',
merchantName: ''
}, },
merchantFlag: false, merchantFlag: false,
editFormData: [ editFormData: [
...@@ -52,22 +55,56 @@ export default { ...@@ -52,22 +55,56 @@ export default {
} }
], ],
selectedList: [], selectedList: [],
channelList: [ channelList: [],
{ name: '新车专区', id: 1 },
{ name: '膜类专区', id: 2 },
{ name: '限时众筹', id: 3 },
{ name: '定保专区', id: 4 }
],
relateStoreVisible: false, // 选择门店 relateStoreVisible: false, // 选择门店
editRule: { editRule: {
channelIds: [{ required: true, message: '请选择频道名称', trigger: 'change' }] channelIds: [{ required: true, message: '请选择频道名称', trigger: 'change' }]
} }
} }
}, },
created() { mounted() {
this.getChannelList()
if (this.merchantId) {
this.getconfigMerchant()
this.getMerchantData()
}
}, },
methods: { methods: {
//获取频道名称
getChannelList() {
this.$apis.channel
.getChannelListApi({
pageSize: 100,
pageNum: 1
})
.then(res => {
this.channelList = res.list
})
},
getMerchantData() {
var params = {
merchantId: this.merchantId,
pageSize: 100,
currentPage: 1
}
this.$apis.common.getMerchantList(params).then(res => {
if (res.list.length) {
this.editForm.merchantId = res.list[0].merchantNo
this.editForm.merchantName = res.list[0].merchantName
}
})
},
//获取频道配置
getconfigMerchant() {
this.$apis.store.getconfigMerchant({ merchantId: this.merchantId }).then(res => {
this.editForm.channelIds = []
res.forEach(item => {
this.editForm.channelIds.push(item.channelId)
})
})
},
handleCancel() { handleCancel() {
this.$router.go(-1) this.$router.go(-1)
}, },
...@@ -114,7 +151,7 @@ export default { ...@@ -114,7 +151,7 @@ export default {
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.add-wrap { .add-wrap {
.container { .container {
min-height: 680px; min-height: 680px;
...@@ -161,4 +198,4 @@ export default { ...@@ -161,4 +198,4 @@ export default {
} }
} }
} }
</style>
\ No newline at end of file \ No newline at end of file
</style>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<img class="icon-dele" src="@/assets/channel/dele.png" /> <img class="icon-dele" src="@/assets/channel/dele.png" />
</div> </div>
<el-form-item label="选择视频:" :prop="'contentList.' + index + '.mediaUrl'" :rules="rules.mediaUrl"> <el-form-item label="选择视频:" :prop="'contentList.' + index + '.mediaUrl'" :rules="rules.mediaUrl">
<el-select v-model="item.mediaUrl" placeholder="请选择视频" @change="changeVideo(index)"> <el-select v-model="item.mediaUrl" filterable placeholder="请选择视频" @change="changeVideo(index)">
<el-option :label="video.fileName" :value="video.mediaUrl" v-for="video in videoList" :key="video.id"></el-option> <el-option :label="video.fileName" :value="video.mediaUrl" v-for="video in videoList" :key="video.id"></el-option>
</el-select> </el-select>
<div class="preview" @click="handleView(index)">预览</div> <div class="preview" @click="handleView(index)">预览</div>
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
<div class="gl-form-page mediaType-content"> <div class="gl-form-page mediaType-content">
<el-form ref="ruleForm" :model="editForm" size="small" :rules="rules"> <el-form ref="ruleForm" :model="editForm" size="small" :rules="rules">
<span v-if="editForm.mediaType == 1"> <span v-if="editForm.mediaType == 1">
<el-form-item label="选择视频:" :prop="'contentList.' + 0 + '.mediaUrl'" :rules="rules.mediaCover"> <el-form-item label="选择视频:" :prop="'contentList.' + 0 + '.mediaUrl'" :rules="rules.mediaCover">
<el-select v-model="editForm.contentList[0].mediaUrl" placeholder="请选择视频" @change="changeVideo(0)"> <el-select v-model="editForm.contentList[0].mediaUrl" filterable placeholder="请选择视频" @change="changeVideo(0)">
<el-option :label="video.fileName" :value="video.mediaUrl" v-for="video in videoList" :key="video.id"></el-option> <el-option :label="video.fileName" :value="video.mediaUrl" v-for="video in videoList" :key="video.id"></el-option>
</el-select> </el-select>
<div class="preview" @click="handleView(0)">预览</div> <div class="preview" @click="handleView(0)">预览</div>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</el-form-item> </el-form-item>
<template v-if="membraneForm.mediaType == 1"> <template v-if="membraneForm.mediaType == 1">
<el-form-item label="选择视频:" prop="mediaUrl"> <el-form-item label="选择视频:" prop="mediaUrl">
<el-select v-model="membraneForm.mediaUrl" placeholder="请选择视频" @change="changeVideo"> <el-select v-model="membraneForm.mediaUrl" filterable placeholder="请选择视频" @change="changeVideo">
<el-option :label="video.fileName" :value="video.mediaUrl" v-for="video in videoList" :key="video.id"></el-option> <el-option :label="video.fileName" :value="video.mediaUrl" v-for="video in videoList" :key="video.id"></el-option>
</el-select> </el-select>
<div class="preview" @click="handleView">预览</div> <div class="preview" @click="handleView">预览</div>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<div class="store-head"> <div class="store-head">
<div class="info">{{ tabPaneText }}列表</div> <div class="info">{{ tabPaneText }}列表</div>
<div> <div>
<el-button type="primary" size="small" @click="handleEdit">频道设置</el-button>
<el-button type="primary" size="small" @click="handleAdd">编辑频道</el-button> <el-button type="primary" size="small" @click="handleAdd">编辑频道</el-button>
<el-button type="primary" plain size="small" @click="handleAddContent()">新增内容</el-button> <el-button type="primary" plain size="small" @click="handleAddContent()">新增内容</el-button>
</div> </div>
...@@ -25,14 +26,17 @@ ...@@ -25,14 +26,17 @@
<el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch> <el-switch v-model="scope.scope.isOpen" @change="updateState(scope.scope)"></el-switch>
</template> </template>
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">{{ scope.scope.status == 0 ? '待配置' : '编辑' }}</el-button> <template v-if="scope.scope.confType != 1">
<template v-else> <el-button type="text" v-if="scope.scope.contentType == 1" @click="handleConfig(scope.scope)">{{ scope.scope.status == 0 ? '待配置' : '编辑' }}</el-button>
<el-button type="text" v-if="scope.scope.status == 1 && scope.scope.topStatus == 0" @click="handleTop(scope.scope)">置顶</el-button> <template v-else>
<el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button> <el-button type="text" v-if="scope.scope.status == 1 && scope.scope.topStatus == 0" @click="handleTop(scope.scope)">置顶</el-button>
<el-button type="text" v-if="scope.scope.status == 1" @click="handleOut(scope.scope, '下架')">下架</el-button> <el-button type="text" @click="handleAddContent(scope.scope)">编辑</el-button>
<el-button type="text" v-if="scope.scope.status == 2" @click="handleOut(scope.scope, '上架')">上架</el-button> <el-button type="text" v-if="scope.scope.status == 1" @click="handleOut(scope.scope, '下架')">下架</el-button>
<el-button type="text" v-if="scope.scope.status == 2" @click="handleDelect(scope.scope)">删除</el-button> <el-button type="text" v-if="scope.scope.status == 2" @click="handleOut(scope.scope, '上架')">上架</el-button>
<el-button type="text" v-if="scope.scope.status == 2" @click="handleDelect(scope.scope)">删除</el-button>
</template>
</template> </template>
<span v-else>--</span>
</div> </div>
</GLTable> </GLTable>
</div> </div>
...@@ -85,6 +89,12 @@ export default { ...@@ -85,6 +89,12 @@ export default {
filter: '3,4' filter: '3,4'
}, },
{ {
label: '宣传文案',
name: 'promotion',
type: 'input',
filter: '2'
},
{
label: '创建日期', label: '创建日期',
name: 'createdDate', name: 'createdDate',
type: 'date', type: 'date',
...@@ -285,7 +295,7 @@ export default { ...@@ -285,7 +295,7 @@ export default {
}) })
}) })
this.SET_MERCHANT_ID({ id: this.merchantId }) this.SET_MERCHANT_ID({ id: this.merchantId })
this.SET_CHANNEL_STYLE({ channelStyle: res[0].channelStyle }) this.SET_CHANNEL_STYLE({ channelStyle: res&&res[0].channelStyle })
!this.channelType && this.SET_CHANNEL_TYPE({ channelType: res[0].channelType }) !this.channelType && this.SET_CHANNEL_TYPE({ channelType: res[0].channelType })
this.activeName = res[0].channelType + '' this.activeName = res[0].channelType + ''
this.merchantChannelId = res[0].id this.merchantChannelId = res[0].id
...@@ -367,9 +377,10 @@ export default { ...@@ -367,9 +377,10 @@ export default {
setTableFinishFun() { setTableFinishFun() {
this.$refs.editRef.data.length ? (this.$refs.editRef.tableHeightValues = '') : this.$refs.editRef.setTableHeightFun() this.$refs.editRef.data.length ? (this.$refs.editRef.tableHeightValues = '') : this.$refs.editRef.setTableHeightFun()
}, },
//频道设置
handleEdit(val) { handleEdit(val) {
this.$router.push({ this.$router.push({
path: '/store/edit' path: `/store/add?merchantId=${this.merchantId}&$title=编辑门店`
}) })
}, },
initParams() { initParams() {
......
...@@ -3,7 +3,7 @@ const packageName = require('./package.json').name ...@@ -3,7 +3,7 @@ const packageName = require('./package.json').name
const node_env = process.env.NODE_ENV === 'production' const node_env = process.env.NODE_ENV === 'production'
const publicPath = node_env ? `/child/${packageName}/` : '/' const publicPath = node_env ? `/child/${packageName}/` : '/'
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
const CDN_DOMAIN = 'https://cdn.bootcdn.net/' const CDN_DOMAIN = 'https://img02.glsx.com.cn/'
const cdn = { const cdn = {
css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`], css: [`${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/theme-chalk/index.css`],
js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`,'https://webapi.amap.com/loader.js'] js: [`${CDN_DOMAIN}ajax/libs/vue/2.6.11/vue.min.js`, `${CDN_DOMAIN}ajax/libs/vue-router/3.2.0/vue-router.min.js`, `${CDN_DOMAIN}ajax/libs/element-ui/2.11.1/index.js`, `${CDN_DOMAIN}ajax/libs/vuex/3.6.2/vuex.min.js`, `${CDN_DOMAIN}ajax/libs/echarts/5.1.2/echarts.min.js`,'https://webapi.amap.com/loader.js']
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!