Browse Source

1.0.1

master
zkthink 5 years ago
parent
commit
15c7b64f52
  1. 10
      src/api/Applet.js
  2. 1
      src/api/AxiosApi.js
  3. 9
      src/api/Goods.js
  4. 11
      src/components/Management/SearchBar.vue
  5. 149
      src/components/applet/Goods.vue
  6. 20
      src/components/applet/GoodsClass.vue
  7. 245
      src/components/applet/Shops.vue
  8. 3
      src/layout/components/AppMain.vue
  9. 2
      src/layout/index.vue
  10. 48
      src/store/modules/creationCamp.js
  11. 2
      src/styles/sidebar.scss
  12. 52
      src/views/applet/CreationCamp/OperationArea/Allocation/AddComponent/index.vue
  13. 75
      src/views/applet/CreationCamp/OperationArea/Allocation/Carousel/index.vue
  14. 70
      src/views/applet/CreationCamp/OperationArea/Allocation/CategoryNavigation/index.vue
  15. 43
      src/views/applet/CreationCamp/OperationArea/Allocation/Commodity/index.vue
  16. 24
      src/views/applet/CreationCamp/OperationArea/Allocation/Editor/index.vue
  17. 77
      src/views/applet/CreationCamp/OperationArea/Allocation/Footer/index.vue
  18. 59
      src/views/applet/CreationCamp/OperationArea/Allocation/GraphicNavigation/index.vue
  19. 69
      src/views/applet/CreationCamp/OperationArea/Allocation/GroupList/index.vue
  20. 73
      src/views/applet/CreationCamp/OperationArea/Allocation/ImageBox/index.vue
  21. 9
      src/views/applet/CreationCamp/OperationArea/Allocation/Search/index.vue
  22. 75
      src/views/applet/CreationCamp/OperationArea/Allocation/SingleItem/index.vue
  23. 2
      src/views/applet/CreationCamp/OperationArea/Allocation/Video/index.vue
  24. 242
      src/views/applet/CreationCamp/OperationArea/Allocation/components/Jump.vue
  25. 4
      src/views/applet/CreationCamp/OperationArea/Allocation/components/widgetFormitem.vue
  26. 3
      src/views/applet/CreationCamp/PreviewContent/Components/SingleItem/index.vue
  27. 6
      src/views/applet/CreationCamp/PreviewContent/Components/Video/index.vue
  28. 2
      src/views/applet/CreationCamp/PreviewContent/index.vue
  29. 27
      src/views/applet/index.vue
  30. 2
      src/views/cash/details.vue
  31. 19
      src/views/cash/index.vue

10
src/api/Applet.js

@ -3,9 +3,17 @@ import axiosApi from './AxiosApi.js'
const apiList = { const apiList = {
getPlatformTemplate: `/authority/cmsTemplate/getPlatformTemplate`, getPlatformTemplate: `/authority/cmsTemplate/getPlatformTemplate`,
updateTemplate: '/authority/cmsTemplate/updateTemplate', updateTemplate: '/authority/cmsTemplate/updateTemplate',
getCmsTemplate: '/authority/cmsTemplate/' getCmsTemplate: '/authority/cmsTemplate/',
getStorePage: '/authority/store/findStoreListForPlatform'
} }
export default { export default {
getStorePage(data) {
return axiosApi({
method: 'POST',
url: apiList.getStorePage,
data
})
},
getCmsTemplate(id) { getCmsTemplate(id) {
return axiosApi({ return axiosApi({
method: 'GET', method: 'GET',

1
src/api/AxiosApi.js

@ -38,7 +38,6 @@ axios.interceptors.response.use(
function handleError(error, reject) { function handleError(error, reject) {
if (error.code === 'ECONNABORTED') { if (error.code === 'ECONNABORTED') {
debugger
Message({ Message({
message: '请求超时' message: '请求超时'
}) })

9
src/api/Goods.js

@ -8,10 +8,17 @@ const apiList = {
findCategoryList: '/authority/productCategory/findCategoryListByDepth/', findCategoryList: '/authority/productCategory/findCategoryListByDepth/',
saveProduct: '/authority/product/save', saveProduct: '/authority/product/save',
findAdminProductList: '/authority/platformProduct/findAdminProductList', findAdminProductList: '/authority/platformProduct/findAdminProductList',
findGoods: '/authority/platformProduct/findProductListByCategoryOrProductIdList' findGoods: '/authority/platformProduct/findProductListByCategoryOrProductIdList',
queryAllCategory: '/authority/productCategory/queryAllCategory'
} }
export default { export default {
queryAllCategory() {
return axiosApi({
method: 'POST',
url: apiList.queryAllCategory
})
},
findGoods(data) { findGoods(data) {
return axiosApi({ return axiosApi({
method: 'POST', method: 'POST',

11
src/components/Management/SearchBar.vue

@ -19,6 +19,7 @@
</form-item> </form-item>
<form-item> <form-item>
<Button type="primary" size="mini" @click="query">查询</Button> <Button type="primary" size="mini" @click="query">查询</Button>
<Button plain size="mini" @click="reset">重置</Button>
<Button type="success" size="mini" @click="addManagement">新建商家</Button> <Button type="success" size="mini" @click="addManagement">新建商家</Button>
</form-item> </form-item>
</Form> </Form>
@ -53,6 +54,16 @@ export default {
}, },
addManagement() { addManagement() {
this.$emit('addManagement') this.$emit('addManagement')
},
reset() {
this.formParams = {
name: '',
code: '',
duty: '',
status: {
code: ''
}
}
} }
} }
} }

149
src/components/applet/Goods.vue

@ -9,10 +9,7 @@
> >
<div class="product-page"> <div class="product-page">
<div class="toolbar"> <div class="toolbar">
<el-form <el-form :inline="true" :model="formParams">
:inline="true"
:model="formParams"
>
<el-form-item> <el-form-item>
<el-input <el-input
v-model="formParams.keyword" v-model="formParams.keyword"
@ -21,47 +18,30 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="上架状态"> <el-form-item label="上架状态">
<el-select <el-select v-model="formParams.status" size="mini">
v-model="formParams.status" <el-option label="全部" value="" />
size="mini" <el-option label="上架" :value="1" />
> <el-option label="下架" :value="0" />
<el-option
label="全部"
value=""
/>
<el-option
label="上架"
:value="1"
/>
<el-option
label="下架"
:value="0"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="官方分类"> <el-form-item label="官方分类">
<el-select <el-cascader
v-model="formParams.categoryId" v-model="formParams.categoryId"
class="category-select"
size="mini" size="mini"
> :options="categoryList"
<el-option clearable
label="全部" :props="{
value="" checkStrictly: true,
expandTrigger: 'hover',
label: 'categoryName',
value: 'id',
children: 'childs'
}"
/> />
<el-option
v-for="(category, index) in categoryList"
:key="index"
:label="category.categoryName"
:value="category.id"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" size="mini" @click="fetch">
type="primary"
size="mini"
@click="fetch"
>
查询 查询
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -99,35 +79,20 @@
height="80" height="80"
width="80" width="80"
:src="scope.row.productImg" :src="scope.row.productImg"
> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="productName" label="产品名称" />
prop="productName"
label="产品名称"
/>
<el-table-column <el-table-column
prop="id" prop="id"
width="200" width="200"
class="text-overflow" class="text-overflow"
label="产品ID" label="产品ID"
/> />
<el-table-column <el-table-column prop="price" label="售价" />
prop="price" <el-table-column prop="applyPrice" label="原价" />
label="售价" <el-table-column prop="stock" label="库存" />
/> <el-table-column prop="sellCount" label="销量" />
<el-table-column
prop="applyPrice"
label="原价"
/>
<el-table-column
prop="stock"
label="库存"
/>
<el-table-column
prop="sellCount"
label="销量"
/>
</el-table> </el-table>
</div> </div>
<pagination <pagination
@ -167,19 +132,15 @@ export default {
default: false default: false
} }
}, },
data () { data() {
return { return {
formParams: { formParams: {
"categoryId": '', categoryId: '',
"hasStock": '', hasStock: '',
"keyword": "", keyword: '',
"pageSize": 10, pageSize: 10,
"pageIndex": 1, pageIndex: 1,
"status": '' status: ''
},
dialog: {
type: 'add',
isVisible: false
}, },
tableData: [], tableData: [],
categoryList: [], categoryList: [],
@ -195,15 +156,15 @@ export default {
}, },
computed: { computed: {
isVisible: { isVisible: {
get () { get() {
return this.dialogVisible return this.dialogVisible
}, },
set () { set() {
this.close() this.close()
this.reset() this.reset()
} }
}, },
title () { title() {
return '选择商品' return '选择商品'
} }
}, },
@ -240,7 +201,11 @@ export default {
}) })
} }
}, },
async getProductList () { async getProductList() {
const { categoryId } = this.formParams
if (typeof categoryId === 'object') {
this.formParams.categoryId = categoryId.splice(-1, 1)[0]
}
const res = await Goods.findAdminProductList(this.formParams) const res = await Goods.findAdminProductList(this.formParams)
const resData = res.data const resData = res.data
const { code } = resData const { code } = resData
@ -249,21 +214,21 @@ export default {
this.formatData() this.formatData()
} }
}, },
async findCategoryList () { async queryAllCategory() {
const res = await Goods.findCategoryList(3) const res = await Goods.queryAllCategory()
const resData = res.data const resData = res.data
this.categoryList = resData.data this.categoryList = resData.data
}, },
fetch (config) { fetch(config) {
const { limit, page } = config const { limit, page } = config
this.formParams.pageIndex = page || 1 this.formParams.pageIndex = page || 1
this.formParams.pageSize = limit || 10 this.formParams.pageSize = limit || 10
this.getProductList() this.getProductList()
}, },
editClose () { editClose() {
this.dialog.isVisible = false this.dialog.isVisible = false
}, },
onSubmit () { onSubmit() {
if (this.radioState) { if (this.radioState) {
this.$emit('success', [this.selectOneGoods]) this.$emit('success', [this.selectOneGoods])
} else { } else {
@ -271,12 +236,12 @@ export default {
} }
this.close() this.close()
}, },
close () { close() {
this.$emit('close') this.$emit('close')
}, },
open() { open() {
this.getProductList() this.getProductList()
this.findCategoryList() this.queryAllCategory()
}, },
formatData() { formatData() {
if (this.radioState) { if (this.radioState) {
@ -292,22 +257,24 @@ export default {
const excludeIds = this.exclude.map(i => i.id) const excludeIds = this.exclude.map(i => i.id)
this.tableData.adminProductVOList.map(item => { this.tableData.adminProductVOList.map(item => {
if (excludeIds.indexOf(item.id) > 0) { if (excludeIds.indexOf(item.id) > 0) {
this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(item, true) this.$refs.multipleTable &&
this.$refs.multipleTable.toggleRowSelection(item, true)
} else { } else {
this.$refs.multipleTable && this.$refs.multipleTable.toggleRowSelection(item, false) this.$refs.multipleTable &&
this.$refs.multipleTable.toggleRowSelection(item, false)
} }
}) })
} }
}, },
reset () { reset() {
this.radioId = null this.radioId = null
this.formParams = { this.formParams = {
"categoryId": '', categoryId: '',
"hasStock": '', hasStock: '',
"keyword": "", keyword: '',
"pageSize": 10, pageSize: 10,
"pageIndex": 1, pageIndex: 1,
"status": '' status: ''
} }
} }
} }
@ -315,7 +282,7 @@ export default {
</script> </script>
<style lang="less"> <style lang="less">
.add-dialog-component { .add-dialog-component {
.form-inline{ .form-inline {
display: inline-block; display: inline-block;
margin: auto; margin: auto;
} }
@ -328,7 +295,7 @@ export default {
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
.goods-dialog{ .goods-dialog {
/deep/ .el-dialog { /deep/ .el-dialog {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

20
src/components/applet/GoodsClass.vue

@ -9,6 +9,7 @@
> >
<div class="add-dialog-component"> <div class="add-dialog-component">
<el-form ref="form" class="form-inline" label-width="80px"> <el-form ref="form" class="form-inline" label-width="80px">
<template v-if="deep===1">
<el-form-item label="一级分类"> <el-form-item label="一级分类">
<el-select v-model="value" placeholder="请选择" @change="change(value, 1)"> <el-select v-model="value" placeholder="请选择" @change="change(value, 1)">
<el-option <el-option
@ -29,6 +30,7 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</template>
<el-form-item label="三级分类"> <el-form-item label="三级分类">
<el-select v-model="value2" placeholder="请选择" @change="change(value2, 3)"> <el-select v-model="value2" placeholder="请选择" @change="change(value2, 3)">
<el-option <el-option
@ -49,6 +51,7 @@
</template> </template>
<script> <script>
import Classification from '@/api/Classification.js' import Classification from '@/api/Classification.js'
import Goods from '@/api/Goods.js'
export default { export default {
props: { props: {
exclude: { exclude: {
@ -57,6 +60,12 @@ export default {
return [] return []
} }
}, },
deep: {
type: Number,
default() {
return 1
}
},
dialogVisible: { dialogVisible: {
type: Boolean, type: Boolean,
default: false default: false
@ -137,7 +146,9 @@ export default {
} }
}) })
} }
if (deep !== 3) {
this.queryChildCategory(id, deep) this.queryChildCategory(id, deep)
}
}, },
async queryChildCategory (id, deep) { async queryChildCategory (id, deep) {
const res = await Classification.queryChildCategory({ const res = await Classification.queryChildCategory({
@ -159,6 +170,11 @@ export default {
}) })
} }
}, },
async findCategoryList() {
const res = await Goods.findCategoryList(this.deep)
const categoryList = res.data.data || []
this.level3List = categoryList
},
onSubmit () { onSubmit () {
this.$emit('success', this.currentObj) this.$emit('success', this.currentObj)
this.close() this.close()
@ -168,7 +184,11 @@ export default {
this.reset() this.reset()
}, },
open() { open() {
if (this.deep === 1) {
this.getProductCategory() this.getProductCategory()
} else {
this.findCategoryList()
}
}, },
reset () { reset () {
this.value = '' this.value = ''

245
src/components/applet/Shops.vue

@ -0,0 +1,245 @@
<template>
<el-dialog
:close-on-click-modal="false"
:title="title"
top="25px"
:visible.sync="isVisible"
class="goods-dialog"
@opened="open"
>
<div class="product-page">
<div class="toolbar">
<el-form
:inline="true"
:model="formParams"
>
<el-form-item>
<el-input
v-model="formParams.storeName"
size="mini"
placeholder="店铺名称"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="mini"
@click="fetch"
>
查询
</el-button>
</el-form-item>
</el-form>
</div>
<div class="product-content">
<el-table
ref="multipleTable"
:data="tableData.records"
style="width: 100%"
>
<el-table-column width="55" align="center">
<template slot-scope="scope">
<el-radio
v-model="radioId"
:label="scope.row.id"
size="medium"
class="textRadio"
@change.native="getCurrentRow(scope.row)"
>&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column
prop="storeName"
label="店铺名称"
/>
<el-table-column
prop="mobile"
label="手机号"
/>
</el-table>
</div>
<pagination
v-show="tableData.total > 0"
:limit.sync="formParams.size"
:page.sync="formParams.current"
:total="Number(tableData.total)"
@pagination="fetch"
/>
</div>
<div slot="footer" class="add-btn-wrap">
<el-button @click="close"> </el-button>
<el-button type="primary" @click="onSubmit"> </el-button>
</div>
</el-dialog>
</template>
<script>
import Applet from '@/api/Applet'
import Pagination from '@/components/Pagination'
export default {
components: {
Pagination
},
props: {
exclude: {
type: Array,
default() {
return []
}
},
dialogVisible: {
type: Boolean,
default: false
}
},
data () {
return {
tableData: {},
formParams: {
"current": 1,
"map": {},
"model": {
"id": 0,
"isAutoSendRefundAddress": 0,
"logo": "",
"mobile": "",
"refundAddress": "",
"refundContact": "",
"refundTel": "",
"remark": "",
"shipAddress": "",
"storeName": ""
},
"order": "descending",
"size": 10,
"sort": "id"
},
radioId: null
}
},
computed: {
isVisible: {
get () {
return this.dialogVisible
},
set () {
this.close()
this.reset()
}
},
title () {
return '选择商品'
}
},
methods: {
getCurrentRow(row) {
this.radioId = row.id
this.selectOneShop = {
id: row.id,
storeName: row.storeName
}
},
async getStorePage () {
const res = await Applet.getStorePage(this.formParams)
const resData = res.data
const { code } = resData
if (code === 0) {
this.tableData = resData.data
}
},
fetch (config) {
const { limit, page } = config
this.formParams.current = page || 1
this.formParams.size = limit || 10
this.getStorePage()
},
editClose () {
this.dialog.isVisible = false
},
onSubmit () {
this.$emit('success', [this.selectOneShop])
this.close()
},
close () {
this.$emit('close')
},
open() {
this.getStorePage()
},
reset () {
this.radioId = null
this.formParams = {
"current": 1,
"map": {},
"model": {
"id": 0,
"isAutoSendRefundAddress": 0,
"logo": "",
"mobile": "",
"refundAddress": "",
"refundContact": "",
"refundTel": "",
"remark": "",
"shipAddress": "",
"storeName": ""
},
"order": "descending",
"size": 10,
"sort": "id"
}
}
}
}
</script>
<style lang="less">
.add-dialog-component {
.form-inline{
display: inline-block;
margin: auto;
}
.tree-box {
.el-tree-node__content {
margin-bottom: 15px;
height: auto;
}
}
}
</style>
<style lang="less" scoped>
.goods-dialog{
/deep/ .el-dialog {
display: flex;
flex-direction: column;
max-height: 90vh;
min-width: 1000px;
overflow: hidden;
.el-dialog__body {
flex: 1;
overflow: auto;
}
}
.dialog-from {
width: 80%;
margin: auto;
}
.btn-wrap {
margin: 45px auto 0;
text-align: right;
}
.form-item-row {
padding-top: 40px;
/deep/ .el-input {
width: 100px;
margin: 0 5px;
}
}
}
.product-page {
padding: 15px 20px;
.toolbar {
margin-bottom: 25px;
.product-name {
width: 180px;
}
}
}
</style>

3
src/layout/components/AppMain.vue

@ -20,7 +20,8 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
/* 50= navbar 50 */ /* 50= navbar 50 */
min-height: calc(100vh - 50px); // min-height: calc(100vh - 50px);
flex: 1;
width: 100%; width: 100%;
position: relative; position: relative;
overflow: hidden; overflow: hidden;

2
src/layout/index.vue

@ -2,7 +2,7 @@
<div :class="classObj" class="app-wrapper"> <div :class="classObj" class="app-wrapper">
<div v-if="device===&quot;mobile&quot; && sidebar.opened" class="drawer-bg" @click="handleClickOutside" /> <div v-if="device===&quot;mobile&quot; && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
<sidebar class="sidebar-container" /> <sidebar class="sidebar-container" />
<div :class="{hasTagsView:needTagsView}" class="main-container"> <div class="main-container">
<div> <div>
<navbar /> <navbar />
</div> </div>

48
src/store/modules/creationCamp.js

@ -10,28 +10,28 @@ import wode2 from '@/assets/footer/wode2.png'
const footerComponentInit = { const footerComponentInit = {
list: [ list: [
{ {
pagePath: 'pages/index/index', href: 'pages/index/index',
iconPath: shouye1, iconPath: shouye1,
selectedIconPath: shouye2, selectedIconPath: shouye2,
text: '首页', text: '首页',
collapseState: true collapseState: true
}, },
{ {
pagePath: 'pages/category/index', href: 'pages/category/index',
iconPath: fenlei1, iconPath: fenlei1,
selectedIconPath: fenlei2, selectedIconPath: fenlei2,
text: '分类', text: '分类',
collapseState: false collapseState: false
}, },
{ {
pagePath: 'pages/cart/cart', href: 'pages/cart/cart',
iconPath: gouwuche1, iconPath: gouwuche1,
selectedIconPath: gouwuche2, selectedIconPath: gouwuche2,
text: '购物车', text: '购物车',
collapseState: false collapseState: false
}, },
{ {
pagePath: 'pages/userCenter/index', href: 'pages/userCenter/index',
iconPath: wode1, iconPath: wode1,
selectedIconPath: wode2, selectedIconPath: wode2,
text: '我的', text: '我的',
@ -39,6 +39,44 @@ const footerComponentInit = {
} }
] ]
} }
const initPublic = [
{
label: '首页',
value: 'pages/index/index',
isCustom: false
},
{
label: '商品详情',
value: 'pages/product/details/index?id={detailId}',
isCustom: false
},
{
label: '分类页面',
value: 'pages/category/index',
isCustom: false
},
{
label: '分类商品列表',
value: 'pages/product/list/index?category3Id={category3Id}',
isCustom: false
},
{
label: '店铺页面',
value: 'pages/shop/index?id={shopId}',
isCustom: false
},
{
label: '购物车',
value: 'pages/cart/cart',
isCustom: false
},
{
label: '我的',
value: 'pages/userCenter/index',
isCustom: false
}
]
console.log(initPublic)
export default { export default {
namespaced: true, namespaced: true,
state: { state: {
@ -56,7 +94,7 @@ export default {
}) })
}, },
initTemplatePage(state, templatePage) { initTemplatePage(state, templatePage) {
state.templatePage = templatePage state.templatePage = initPublic.concat(templatePage)
}, },
initComponents(state, components) { initComponents(state, components) {
state.currentComponentKeyCode = 'AddComponent' state.currentComponentKeyCode = 'AddComponent'

2
src/styles/sidebar.scss

@ -1,6 +1,8 @@
#app { #app {
.main-container { .main-container {
display: flex;
flex-direction: column;
min-height: 100%; min-height: 100%;
transition: margin-left .28s; transition: margin-left .28s;
margin-left: $sideBarWidth; margin-left: $sideBarWidth;

52
src/views/applet/CreationCamp/OperationArea/Allocation/AddComponent/index.vue

@ -2,18 +2,27 @@
<div class="add-component"> <div class="add-component">
<div class="config-header">基础组件</div> <div class="config-header">基础组件</div>
<div class="parts-list"> <div class="parts-list">
<div v-for="(item, index) in basicComponents" :key="index" class="parts-item" @click="selectItem(item)"> <div
v-for="(item, index) in basicComponents"
:key="index"
class="parts-item"
@click="selectItem(item)"
>
<div class="parts-icon"> <div class="parts-icon">
<i :class="item.icon" /> <i :class="item.icon"></i>
</div> </div>
<div class="parts-name">{{ item.name }}</div> <div class="parts-name">{{ item.name }}</div>
</div> </div>
</div> </div>
<div class="config-header">商品组件</div> <div class="config-header">商品组件</div>
<div class="parts-list"> <div class="parts-list">
<div v-for="(item, index) in commodityComponents" :key="index" class="parts-item" @click="selectItem(item)"> <div
v-for="(item, index) in commodityComponents" :key="index"
class="parts-item"
@click="selectItem(item)"
>
<div class="parts-icon"> <div class="parts-icon">
<i :class="item.icon" /> <i :class="item.icon"></i>
</div> </div>
<div class="parts-name">{{ item.name }}</div> <div class="parts-name">{{ item.name }}</div>
</div> </div>
@ -42,26 +51,32 @@ export default {
content: { content: {
fillStyle: 1, fillStyle: 1,
number: 3, number: 3,
list: [{ list: [
{
href: '', href: '',
src: '', src: '',
isCustom: '',
collapseState: false collapseState: false
}, },
{ {
href: '', href: '',
src: '', src: '',
isCustom: '',
collapseState: false collapseState: false
}, },
{ {
href: '', href: '',
src: '', src: '',
isCustom: '',
collapseState: false collapseState: false
}, },
{ {
href: '', href: '',
src: '', src: '',
isCustom: '',
collapseState: true collapseState: true
}] }
]
} }
}, },
{ {
@ -71,11 +86,14 @@ export default {
content: { content: {
fillStyle: 1, fillStyle: 1,
interval: 5000, interval: 5000,
list: [{ list: [
{
href: '', href: '',
src: '', src: '',
isCustom: '',
collapseState: false collapseState: false
}] }
]
} }
}, },
{ {
@ -144,30 +162,36 @@ export default {
keyCode: 'GraphicNavigation', keyCode: 'GraphicNavigation',
content: { content: {
number: 3, number: 3,
list: [{ list: [
{
href: '', href: '',
src: '', src: '',
isCustom: '',
name: '', name: '',
collapseState: false collapseState: false
}, },
{ {
href: '', href: '',
src: '', src: '',
isCustom: '',
name: '', name: '',
collapseState: false collapseState: false
}, },
{ {
href: '', href: '',
src: '', src: '',
isCustom: '',
name: '', name: '',
collapseState: false collapseState: false
}, },
{ {
href: '', href: '',
src: '', src: '',
isCustom: '',
name: '', name: '',
collapseState: true collapseState: true
}] }
]
} }
}, },
{ {
@ -183,11 +207,13 @@ export default {
originalPrice: true, originalPrice: true,
sellingPrice: true, sellingPrice: true,
paymentNumber: true, paymentNumber: true,
list: [{ list: [
{
name: '', name: '',
categoryList: [], categoryList: [],
goodsList: [] goodsList: []
}] }
]
} }
} }
] ]
@ -221,7 +247,7 @@ export default {
display: inline-block; display: inline-block;
width: 24px; width: 24px;
height: 24px; height: 24px;
i{ i {
font-size: 24px; font-size: 24px;
} }
} }

75
src/views/applet/CreationCamp/OperationArea/Allocation/Carousel/index.vue

@ -7,8 +7,18 @@
</div> </div>
<div class="config-setting"> <div class="config-setting">
<div class="config-setting"> <div class="config-setting">
<el-select v-model="currentSub.fillStyle" placeholder="请选择" class="full-input" @change="change('fillStyle', $event)"> <el-select
<el-option v-for="item in fillStyleLit" :key="item.value" :label="item.label" :value="item.value" /> v-model="currentSub.fillStyle"
placeholder="请选择"
class="full-input"
@change="change('fillStyle', $event)"
>
<el-option
v-for="item in fillStyleLit"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -18,8 +28,18 @@
轮播间隔 轮播间隔
</div> </div>
<div class="config-setting"> <div class="config-setting">
<el-select v-model="currentSub.interval" placeholder="请选择" class="full-input" @change="change('interval', $event)"> <el-select
<el-option v-for="item in intervalList" :key="item.value" :label="item.label" :value="item.value" /> v-model="currentSub.interval"
placeholder="请选择"
class="full-input"
@change="change('interval', $event)"
>
<el-option
v-for="item in intervalList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</div> </div>
</div> </div>
@ -33,41 +53,40 @@
class="collapse-item" class="collapse-item"
> >
<div class="collapse-item-header" @click="collapseToggle(item)"> <div class="collapse-item-header" @click="collapseToggle(item)">
<i class="header-icon el-icon-rank" /> <i class="header-icon el-icon-rank"></i>
<div class="header-thumbnail"> <div class="header-thumbnail">
<img v-if="item.src" :src="item.src"> <img v-if="item.src" :src="item.src" />
<div v-else class="el-icon-picture-outline" /> <div v-else class="el-icon-picture-outline"></div>
</div> </div>
<div class="header-name">图片</div> <div class="header-name">图片</div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-delete" @click="delectItem(currentSub.list, index)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.list, index)"
></i>
</div> </div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-arrow-down" :class="item.collapseState?'open':''" /> <i
class="el-icon-arrow-down"
:class="item.collapseState ? 'open' : ''"
></i>
</div> </div>
</div> </div>
<div v-if="item.collapseState" class="collapse-item-content"> <div v-if="item.collapseState" class="collapse-item-content">
<div class="config-title">选择图片</div> <div class="config-title">选择图片</div>
<ImageUpload :key="index+'-'+1" :item="[item]" :src="item.src" @success="success" /> <ImageUpload
<div class="config-title">跳转至</div> :key="index + '-' + 1"
<el-select :item="[item]"
v-model="item.href" :src="item.src"
placeholder="请选择" @success="success"
class="full-input"
>
<el-option
v-for="link in templatePage"
:key="link.value"
:label="link.label"
:value="link.value"
/> />
</el-select> <Jump :item="item" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<a class="add-widget" href="javascript:;" @click="addCarousel"> <a class="add-widget" href="javascript:;" @click="addCarousel">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加图片 添加图片
</a> </a>
</div> </div>
@ -77,9 +96,11 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import ImageUpload from '@/components/ImageUpload' import ImageUpload from '@/components/ImageUpload'
import Jump from '../components/Jump'
export default { export default {
components: { components: {
ImageUpload ImageUpload,
Jump
}, },
data() { data() {
return { return {
@ -106,14 +127,11 @@ export default {
value: 7000, value: 7000,
label: '7秒' label: '7秒'
} }
], ]
carouselList: [],
value: ''
} }
}, },
computed: { computed: {
...mapState('creationCamp', [ ...mapState('creationCamp', [
'diyComponents',
'templatePage', 'templatePage',
'currentComponentKeyCode', 'currentComponentKeyCode',
'currentComponentConfig' 'currentComponentConfig'
@ -195,4 +213,3 @@ export default {
} }
} }
</style> </style>

70
src/views/applet/CreationCamp/OperationArea/Allocation/CategoryNavigation/index.vue

@ -29,7 +29,10 @@
<div class="collapse-item-header"> <div class="collapse-item-header">
<div class="title">商品来源</div> <div class="title">商品来源</div>
<div class="right"> <div class="right">
<i class="el-icon-delete" @click="delectItem(currentSub.list, index)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.list, index)"
></i>
</div> </div>
</div> </div>
<div class="collapse-item-content"> <div class="collapse-item-content">
@ -39,30 +42,52 @@
placeholder="请选择" placeholder="请选择"
class="full-input" class="full-input"
/> />
<div v-for="(category,index1) in item.categoryList" :key="index1" class="class-item"> <div
v-for="(category, index1) in item.categoryList"
:key="index1"
class="class-item"
>
<div class="left"> <div class="left">
类别 类别
</div> </div>
<div class="content text-overflow">{{ category.categoryName }}</div> <div class="content text-overflow">
{{ category.categoryName }}
</div>
<div class="right"> <div class="right">
<i class="el-icon-delete" @click="delectItem(item.categoryList, index1)" /> <i
class="el-icon-delete"
@click="delectItem(item.categoryList, index1)"
></i>
</div> </div>
</div> </div>
<div v-for="(category,index2) in item&&item.goodsList" :key="index+'-'+index2" class="class-item"> <div
v-for="(category, index2) in item && item.goodsList"
:key="index + '-' + index2"
class="class-item"
>
<div class="left"> <div class="left">
商品 商品
</div> </div>
<div class="content text-overflow">{{ category.productName }}</div> <div class="content text-overflow">
{{ category.productName }}
</div>
<div class="right"> <div class="right">
<i class="el-icon-delete" @click="delectItem(item.goodsList, index2)" /> <i
class="el-icon-delete"
@click="delectItem(item.goodsList, index2)"
></i>
</div> </div>
</div> </div>
<a class="add-shop" href="javascript:;" @click="addGoodsClass(index)"> <a
<i class="el-icon-plus" /> class="add-shop"
href="javascript:;"
@click="addGoodsClass(index)"
>
<i class="el-icon-plus"></i>
添加类别 添加类别
</a> </a>
<a class="add-shop" href="javascript:;" @click="addGoods(index)"> <a class="add-shop" href="javascript:;" @click="addGoods(index)">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加商品 添加商品
</a> </a>
</div> </div>
@ -71,7 +96,7 @@
</div> </div>
</div> </div>
<a class="add-widget" href="javascript:;" @click="addCarousel"> <a class="add-widget" href="javascript:;" @click="addCarousel">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加标签 添加标签
</a> </a>
<goods-class <goods-class
@ -141,8 +166,6 @@ export default {
}, },
computed: { computed: {
...mapState('creationCamp', [ ...mapState('creationCamp', [
'diyComponents',
'templatePage',
'currentComponentKeyCode', 'currentComponentKeyCode',
'currentComponentConfig' 'currentComponentConfig'
]), ]),
@ -190,7 +213,6 @@ export default {
id: goods.id id: goods.id
}) })
}) })
console.log(exclude)
this.exclude2 = exclude this.exclude2 = exclude
}, },
delectItem(list, index) { delectItem(list, index) {
@ -199,14 +221,14 @@ export default {
success1(obj) { success1(obj) {
this.currentSub.list[this.addClassIndex].categoryList.push(obj) this.currentSub.list[this.addClassIndex].categoryList.push(obj)
}, },
close1 () { close1() {
this.dialog1.isVisible = false this.dialog1.isVisible = false
}, },
success2(obj) { success2(obj) {
console.log(obj) console.log(obj)
this.currentSub.list[this.addGoodsIndex].goodsList = obj this.currentSub.list[this.addGoodsIndex].goodsList = obj
}, },
close2 () { close2() {
this.dialog2.isVisible = false this.dialog2.isVisible = false
}, },
addCarousel() { addCarousel() {
@ -232,25 +254,25 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 12px; padding: 0 12px;
.title{ .title {
flex: 1; flex: 1;
} }
} }
.add-shop{ .add-shop {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
font-size: 14px; font-size: 14px;
color: #409EFF; color: #409eff;
border: 1px dashed #ccc; border: 1px dashed #ccc;
text-align: center; text-align: center;
display: block; display: block;
cursor: pointer; cursor: pointer;
margin-bottom: 20px; margin-bottom: 20px;
} }
.full-input{ .full-input {
margin-bottom: 12px; margin-bottom: 12px;
} }
.class-item{ .class-item {
display: flex; display: flex;
align-items: center; align-items: center;
height: 36px; height: 36px;
@ -258,10 +280,10 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
border: 1px solid #eee; border: 1px solid #eee;
font-size: 12px; font-size: 12px;
.left{ .left {
color: #409EFF; color: #409eff;
} }
.content{ .content {
flex: 1; flex: 1;
margin: 0 8px; margin: 0 8px;
} }

43
src/views/applet/CreationCamp/OperationArea/Allocation/Commodity/index.vue

@ -65,30 +65,41 @@
<div class="config-item"> <div class="config-item">
<div class="config-setting"> <div class="config-setting">
<div class="collapse-list"> <div class="collapse-list">
<div <div v-if="currentSub.categoryList.length" class="collapse-item">
v-if="currentSub.categoryList.length"
class="collapse-item"
>
<div class="collapse-item-header"> <div class="collapse-item-header">
<div class="title">商品来源</div> <div class="title">商品来源</div>
<div class="right"> <div class="right">
<i class="el-icon-delete" @click="delectItem(currentSub.categoryList, 0)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.categoryList, 0)"
></i>
</div> </div>
</div> </div>
<div class="collapse-item-content"> <div class="collapse-item-content">
<div v-for="(category,index2) in currentSub.categoryList" :key="index2" class="class-item"> <div
v-for="(category, index2) in currentSub.categoryList"
:key="index2"
class="class-item"
>
<div class="left"> <div class="left">
类别 类别
</div> </div>
<div class="content text-overflow">{{ category.categoryName }}</div> <div class="content text-overflow">
{{ category.categoryName }}
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<a v-if="!currentSub.categoryList.length" class="add-widget" href="javascript:;" @click="addGategory"> <a
<i class="el-icon-plus" /> v-if="!currentSub.categoryList.length"
class="add-widget"
href="javascript:;"
@click="addGategory"
>
<i class="el-icon-plus"></i>
添加类别 添加类别
</a> </a>
<goods-class <goods-class
@ -133,8 +144,6 @@ export default {
}, },
computed: { computed: {
...mapState('creationCamp', [ ...mapState('creationCamp', [
'diyComponents',
'templatePage',
'currentComponentKeyCode', 'currentComponentKeyCode',
'currentComponentConfig' 'currentComponentConfig'
]), ]),
@ -161,7 +170,7 @@ export default {
success1(obj) { success1(obj) {
this.currentSub.categoryList = [obj] this.currentSub.categoryList = [obj]
}, },
close1 () { close1() {
this.dialog1.isVisible = false this.dialog1.isVisible = false
}, },
delectItem(list, index) { delectItem(list, index) {
@ -176,12 +185,12 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 12px; padding: 0 12px;
.title{ .title {
flex: 1; flex: 1;
} }
} }
.class-item{ .class-item {
display: flex; display: flex;
align-items: center; align-items: center;
height: 36px; height: 36px;
@ -189,10 +198,10 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
border: 1px solid #eee; border: 1px solid #eee;
font-size: 12px; font-size: 12px;
.left{ .left {
color: #409EFF; color: #409eff;
} }
.content{ .content {
flex: 1; flex: 1;
margin: 0 8px; margin: 0 8px;
} }

24
src/views/applet/CreationCamp/OperationArea/Allocation/Editor/index.vue

@ -31,14 +31,15 @@ export default {
placeholder: '请输入内容', placeholder: '请输入内容',
modules: { modules: {
toolbar: [ toolbar: [
[{ 'size': ['small', false, 'large'] }], [{ size: ['small', false, 'large'] }],
['bold', 'italic'], ['bold', 'italic'],
[{ 'header': 1 }, { 'header': 2 }], [{ header: 1 }, { header: 2 }],
[{ 'list': 'ordered' }, { 'list': 'bullet' }], [{ list: 'ordered' }, { list: 'bullet' }],
['link'], ['link'],
[{ 'color': [] }, { 'background': [] }], [{ color: [] }, { background: [] }],
[{ 'align': [] }] [{ align: [] }]
], history: { ],
history: {
delay: 1000, delay: 1000,
maxStack: 50, maxStack: 50,
userOnly: false userOnly: false
@ -48,7 +49,10 @@ export default {
} }
}, },
computed: { computed: {
...mapState('creationCamp', ['diyComponents', 'currentComponentKeyCode', 'currentComponentConfig']), ...mapState('creationCamp', [
'currentComponentKeyCode',
'currentComponentConfig'
]),
currentSub() { currentSub() {
return this.currentComponentConfig return this.currentComponentConfig
} }
@ -79,10 +83,10 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.editor-config { .editor-config {
/deep/ .ql-editor{ /deep/ .ql-editor {
height:400px; height: 400px;
} }
.editor-tips{ .editor-tips {
text-align: right; text-align: right;
} }
} }

77
src/views/applet/CreationCamp/OperationArea/Allocation/Footer/index.vue

@ -10,20 +10,23 @@
class="collapse-item" class="collapse-item"
> >
<div class="collapse-item-header" @click="collapseToggle(item)"> <div class="collapse-item-header" @click="collapseToggle(item)">
<i class="header-icon el-icon-rank" /> <i class="header-icon el-icon-rank"></i>
<div class="header-thumbnail"> <div class="header-thumbnail">
<img v-if="item.src" :src="item.src"> <img v-if="item.src" :src="item.src" />
<div v-else class="el-icon-picture-outline" /> <div v-else class="el-icon-picture-outline"></div>
</div> </div>
<div class="header-name">图片</div> <div class="header-name">图片</div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-delete" @click="delectItem(currentSub.list, index)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.list, index)"
></i>
</div> </div>
<div class="header-arrow"> <div class="header-arrow">
<i <i
class="el-icon-arrow-down" class="el-icon-arrow-down"
:class="item.collapseState ? 'open' : ''" :class="item.collapseState ? 'open' : ''"
/> ></i>
</div> </div>
</div> </div>
<div v-if="item.collapseState" class="collapse-item-content"> <div v-if="item.collapseState" class="collapse-item-content">
@ -35,29 +38,27 @@
class="full-input" class="full-input"
/> />
<div class="config-title">默认图标</div> <div class="config-title">默认图标</div>
<ImageUpload :key="index+'-'+1" :item="[item]" :src="item.iconPath" @success="handleImageSuccess1" /> <ImageUpload
:key="index + '-' + 1"
:item="[item]"
:src="item.iconPath"
@success="handleImageSuccess1"
/>
<div class="config-title">选中图标</div> <div class="config-title">选中图标</div>
<ImageUpload :key="index+'-'+2" :item="[item]" :src="item.selectedIconPath" @success="handleImageSuccess2" /> <ImageUpload
<div class="config-title">跳转至</div> :key="index + '-' + 2"
<Select :item="[item]"
v-model="item.pagePath" :src="item.selectedIconPath"
placeholder="请选择" @success="handleImageSuccess2"
class="full-input"
>
<Option
v-for="link in navList"
:key="link.value"
:label="link.label"
:value="link.value"
/> />
</Select> <Jump :item="item" />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<a class="add-widget" href="javascript:;" @click="addImage"> <a class="add-widget" href="javascript:;" @click="addImage">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加图片 添加图片
</a> </a>
</div> </div>
@ -65,40 +66,15 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { Select, Option } from 'element-ui'
import ImageUpload from '@/components/ImageUpload' import ImageUpload from '@/components/ImageUpload'
import Jump from '../components/Jump'
export default { export default {
components: { components: {
Select, ImageUpload,
Option, Jump
ImageUpload
},
data() {
return {
navList: [
{
value: 'pages/index/index',
label: '首页'
},
{
value: 'pages/category/index',
label: '分类'
},
{
value: 'pages/cart/cart',
label: '购物车'
},
{
value: 'pages/userCenter/index',
label: '我的'
}
],
uploadIndex: null
}
}, },
computed: { computed: {
...mapState('creationCamp', [ ...mapState('creationCamp', [
'diyComponents',
'templatePage', 'templatePage',
'currentComponentKeyCode', 'currentComponentKeyCode',
'currentComponentConfig' 'currentComponentConfig'
@ -118,7 +94,6 @@ export default {
deep: true deep: true
} }
}, },
methods: { methods: {
...mapMutations('creationCamp', ['setComponentConfig']), ...mapMutations('creationCamp', ['setComponentConfig']),
collapseToggle(item) { collapseToggle(item) {
@ -144,7 +119,7 @@ export default {
return item return item
}) })
this.currentSub.list.push({ this.currentSub.list.push({
pagePath: '', href: '',
iconPath: '', iconPath: '',
selectedIconPath: '', selectedIconPath: '',
text: '', text: '',
@ -159,7 +134,7 @@ export default {
.image-config { .image-config {
.collapse-list { .collapse-list {
margin-bottom: 10px; margin-bottom: 10px;
.full-input{ .full-input {
margin-bottom: 8px; margin-bottom: 8px;
} }
.collapse-item { .collapse-item {

59
src/views/applet/CreationCamp/OperationArea/Allocation/GraphicNavigation/index.vue

@ -30,22 +30,33 @@
class="collapse-item" class="collapse-item"
> >
<div class="collapse-item-header" @click="collapseToggle(item)"> <div class="collapse-item-header" @click="collapseToggle(item)">
<i class="header-icon el-icon-rank" /> <i class="header-icon el-icon-rank"></i>
<div class="header-thumbnail"> <div class="header-thumbnail">
<img v-if="item.src" :src="item.src"> <img v-if="item.src" :src="item.src" />
<div v-else class="el-icon-picture-outline" /> <div v-else class="el-icon-picture-outline"></div>
</div> </div>
<div class="header-name">图片</div> <div class="header-name">图片</div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-delete" @click="delectItem(currentSub.list, index)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.list, index)"
></i>
</div> </div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-arrow-down" :class="item.collapseState?'open':''" /> <i
class="el-icon-arrow-down"
:class="item.collapseState ? 'open' : ''"
></i>
</div> </div>
</div> </div>
<div v-if="item.collapseState" class="collapse-item-content"> <div v-if="item.collapseState" class="collapse-item-content">
<div class="config-title">选择图片</div> <div class="config-title">选择图片</div>
<ImageUpload :key="index+'-'+1" :item="[item]" :src="item.src" @success="success" /> <ImageUpload
:key="index + '-' + 1"
:item="[item]"
:src="item.src"
@success="success"
/>
<div class="confit-item"> <div class="confit-item">
<div class="config-title"> <div class="config-title">
名称 名称
@ -54,26 +65,14 @@
<Input v-model="item.name" class="full-input" /> <Input v-model="item.name" class="full-input" />
</div> </div>
</div> </div>
<div class="config-title">跳转至</div> <Jump :item="item" />
<Select
v-model="item.href"
placeholder="请选择"
class="full-input"
>
<Option
v-for="link in templatePage"
:key="link.value"
:label="link.label"
:value="link.value"
/>
</Select>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<a class="add-widget" href="javascript:;" @click="addCarousel"> <a class="add-widget" href="javascript:;" @click="addCarousel">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加图片 添加图片
</a> </a>
</div> </div>
@ -83,12 +82,14 @@
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { Select, Option, Input } from 'element-ui' import { Select, Option, Input } from 'element-ui'
import ImageUpload from '@/components/ImageUpload' import ImageUpload from '@/components/ImageUpload'
import Jump from '../components/Jump'
export default { export default {
components: { components: {
Select, Select,
Option, Option,
ImageUpload, ImageUpload,
Input Input,
Jump
}, },
data() { data() {
return { return {
@ -163,7 +164,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.carousel-config { .carousel-config {
.collapse-list{ .collapse-list {
margin-bottom: 10px; margin-bottom: 10px;
.collapse-item { .collapse-item {
margin-top: 10px; margin-top: 10px;
@ -199,9 +200,9 @@ export default {
width: 32px; width: 32px;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
i{ i {
transition: all .3s; transition: all 0.3s;
&.open{ &.open {
transform: rotate(-180deg); transform: rotate(-180deg);
} }
} }
@ -211,14 +212,14 @@ export default {
padding: 20px 10px; padding: 20px 10px;
.upload-widget { .upload-widget {
margin-bottom: 10px; margin-bottom: 10px;
.upload-uploader{ .upload-uploader {
width: 100%; width: 100%;
height: 110px; height: 110px;
/deep/ .el-upload{ /deep/ .el-upload {
width: 100%; width: 100%;
} }
} }
.upload-images{ .upload-images {
width: 100%; width: 100%;
height: 110px; height: 110px;
} }
@ -253,7 +254,7 @@ export default {
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
font-size: 14px; font-size: 14px;
background-color: #2E60F8; background-color: #2e60f8;
color: #fff; color: #fff;
text-align: center; text-align: center;
display: block; display: block;

69
src/views/applet/CreationCamp/OperationArea/Allocation/GroupList/index.vue

@ -55,37 +55,62 @@
class="collapse-item" class="collapse-item"
> >
<div class="collapse-item-header" @click="collapseToggle(item)"> <div class="collapse-item-header" @click="collapseToggle(item)">
<i class="header-icon el-icon-rank" /> <i class="header-icon el-icon-rank"></i>
<div class="header-thumbnail"> <div class="header-thumbnail">
<img v-if="item.src" :src="item.src"> <img v-if="item.src" :src="item.src" />
<div v-else class="el-icon-picture-outline" /> <div v-else class="el-icon-picture-outline"></div>
</div> </div>
<div class="header-name">图片</div> <div class="header-name">图片</div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-delete" @click="delectItem(currentSub.list, index)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.list, index)"
></i>
</div> </div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-arrow-down" :class="item.collapseState?'open':''" /> <i
class="el-icon-arrow-down"
:class="item.collapseState ? 'open' : ''"
></i>
</div> </div>
</div> </div>
<div v-if="item.collapseState" class="collapse-item-content"> <div v-if="item.collapseState" class="collapse-item-content">
<div class="config-title">选择图片</div> <div class="config-title">选择图片</div>
<ImageUpload :key="index+'-'+1" :item="[item]" :src="item.src" @success="success" /> <ImageUpload
:key="index + '-' + 1"
:item="[item]"
:src="item.src"
@success="success"
/>
<div class="collapse-item-header"> <div class="collapse-item-header">
<div class="title">商品来源</div> <div class="title">商品来源</div>
</div> </div>
<div class="collapse-item-content"> <div class="collapse-item-content">
<div v-for="(category,index1) in item.categoryList" :key="index1" class="class-item"> <div
v-for="(category, index1) in item.categoryList"
:key="index1"
class="class-item"
>
<div class="left"> <div class="left">
类别 类别
</div> </div>
<div class="content text-overflow">{{ category.categoryName }}</div> <div class="content text-overflow">
{{ category.categoryName }}
</div>
<div class="right"> <div class="right">
<i class="el-icon-delete" @click="delectItem(item.categoryList, index1)" /> <i
class="el-icon-delete"
@click="delectItem(item.categoryList, index1)"
></i>
</div> </div>
</div> </div>
<a v-if="!item.categoryList.length" class="add-shop" href="javascript:;" @click="addGoodsClass(index)"> <a
<i class="el-icon-plus" /> v-if="!item.categoryList.length"
class="add-shop"
href="javascript:;"
@click="addGoodsClass(index)"
>
<i class="el-icon-plus"></i>
添加类别 添加类别
</a> </a>
</div> </div>
@ -95,7 +120,7 @@
</div> </div>
</div> </div>
<a class="add-widget" href="javascript:;" @click="addGategory"> <a class="add-widget" href="javascript:;" @click="addGategory">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加类别 添加类别
</a> </a>
<goods-class <goods-class
@ -144,8 +169,6 @@ export default {
}, },
computed: { computed: {
...mapState('creationCamp', [ ...mapState('creationCamp', [
'diyComponents',
'templatePage',
'currentComponentKeyCode', 'currentComponentKeyCode',
'currentComponentConfig' 'currentComponentConfig'
]), ]),
@ -199,7 +222,7 @@ export default {
success1(obj) { success1(obj) {
this.currentSub.list[this.addClassIndex].categoryList.push(obj) this.currentSub.list[this.addClassIndex].categoryList.push(obj)
}, },
close1 () { close1() {
this.dialog1.isVisible = false this.dialog1.isVisible = false
}, },
delectItem(list, index) { delectItem(list, index) {
@ -214,25 +237,25 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 12px; padding: 0 12px;
.title{ .title {
flex: 1; flex: 1;
} }
} }
.add-shop{ .add-shop {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
font-size: 14px; font-size: 14px;
color: #409EFF; color: #409eff;
border: 1px dashed #ccc; border: 1px dashed #ccc;
text-align: center; text-align: center;
display: block; display: block;
cursor: pointer; cursor: pointer;
margin-bottom: 20px; margin-bottom: 20px;
} }
.full-input{ .full-input {
margin-bottom: 12px; margin-bottom: 12px;
} }
.class-item{ .class-item {
display: flex; display: flex;
align-items: center; align-items: center;
height: 36px; height: 36px;
@ -240,10 +263,10 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
border: 1px solid #eee; border: 1px solid #eee;
font-size: 12px; font-size: 12px;
.left{ .left {
color: #409EFF; color: #409eff;
} }
.content{ .content {
flex: 1; flex: 1;
margin: 0 8px; margin: 0 8px;
} }

73
src/views/applet/CreationCamp/OperationArea/Allocation/ImageBox/index.vue

@ -26,8 +26,18 @@
</div> </div>
<div class="config-setting"> <div class="config-setting">
<div class="config-setting"> <div class="config-setting">
<Select v-model="currentSub.fillStyle" placeholder="请选择" class="full-input" @change="change('fillStyle', $event)"> <Select
<Option v-for="item in fillStyleLit" :key="item.value" :label="item.label" :value="item.value" /> v-model="currentSub.fillStyle"
placeholder="请选择"
class="full-input"
@change="change('fillStyle', $event)"
>
<Option
v-for="item in fillStyleLit"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</Select> </Select>
</div> </div>
</div> </div>
@ -42,42 +52,42 @@
class="collapse-item" class="collapse-item"
> >
<div class="collapse-item-header" @click="collapseToggle(item)"> <div class="collapse-item-header" @click="collapseToggle(item)">
<i class="header-icon el-icon-rank" /> <i class="header-icon el-icon-rank"></i>
<div class="header-thumbnail"> <div class="header-thumbnail">
<img v-if="item.src" :src="item.src"> <img v-if="item.src" :src="item.src" />
<div v-else class="el-icon-picture-outline" /> <div v-else class="el-icon-picture-outline"></div>
</div> </div>
<div class="header-name">图片</div> <div class="header-name">图片</div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-delete" @click="delectItem(currentSub.list, index)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.list, index)"
></i>
</div> </div>
<div class="header-arrow"> <div class="header-arrow">
<i class="el-icon-arrow-down" :class="item.collapseState?'open':''" /> <i
class="el-icon-arrow-down"
:class="item.collapseState ? 'open' : ''"
></i>
</div> </div>
</div> </div>
<div v-if="item.collapseState" class="collapse-item-content"> <div v-if="item.collapseState" class="collapse-item-content">
<div class="config-title">选择图片</div> <div class="config-title">选择图片</div>
<ImageUpload :key="index+'-'+1" :item="[item]" :src="item.src" @success="success" /> <ImageUpload
<div class="config-title">跳转至</div> :key="index + '-' + 1"
<Select :item="[item]"
v-model="item.href" :src="item.src"
placeholder="请选择" @success="success"
class="full-input"
>
<Option
v-for="link in templatePage"
:key="link.value"
:label="link.label"
:value="link.value"
/> />
</Select> <Jump :item="item" />
<div></div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<a class="add-widget" href="javascript:;" @click="addImage"> <a class="add-widget" href="javascript:;" @click="addImage">
<i class="el-icon-plus" /> <i class="el-icon-plus"></i>
添加图片 添加图片
</a> </a>
</div> </div>
@ -86,12 +96,12 @@
<script> <script>
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import { Select, Option } from 'element-ui' import { Select, Option } from 'element-ui'
import ImageUpload from '@/components/ImageUpload' import Jump from '../components/Jump'
export default { export default {
components: { components: {
Select, Select,
Option, Option,
ImageUpload Jump
}, },
data() { data() {
return { return {
@ -123,7 +133,6 @@ export default {
}, },
computed: { computed: {
...mapState('creationCamp', [ ...mapState('creationCamp', [
'diyComponents',
'templatePage', 'templatePage',
'currentComponentKeyCode', 'currentComponentKeyCode',
'currentComponentConfig' 'currentComponentConfig'
@ -176,7 +185,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.image-config { .image-config {
.collapse-list{ .collapse-list {
margin-bottom: 10px; margin-bottom: 10px;
.collapse-item { .collapse-item {
margin-top: 10px; margin-top: 10px;
@ -213,9 +222,9 @@ export default {
width: 32px; width: 32px;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
i{ i {
transition: all .3s; transition: all 0.3s;
&.open{ &.open {
transform: rotate(-180deg); transform: rotate(-180deg);
} }
} }
@ -225,14 +234,14 @@ export default {
padding: 20px 10px; padding: 20px 10px;
.upload-widget { .upload-widget {
margin-bottom: 10px; margin-bottom: 10px;
.upload-uploader{ .upload-uploader {
width: 100%; width: 100%;
height: 110px; height: 110px;
/deep/ .el-upload{ /deep/ .el-upload {
width: 100%; width: 100%;
} }
} }
.upload-images{ .upload-images {
width: 100%; width: 100%;
height: 110px; height: 110px;
} }
@ -267,7 +276,7 @@ export default {
height: 36px; height: 36px;
line-height: 36px; line-height: 36px;
font-size: 14px; font-size: 14px;
background-color: #2E60F8; background-color: #2e60f8;
color: #fff; color: #fff;
text-align: center; text-align: center;
display: block; display: block;

9
src/views/applet/CreationCamp/OperationArea/Allocation/Search/index.vue

@ -19,7 +19,10 @@ export default {
Input Input
}, },
computed: { computed: {
...mapState('creationCamp', ['diyComponents', 'currentComponentKeyCode', 'currentComponentConfig']), ...mapState('creationCamp', [
'currentComponentKeyCode',
'currentComponentConfig'
]),
placeholder() { placeholder() {
return this.currentComponentConfig.placeholder return this.currentComponentConfig.placeholder
} }
@ -37,7 +40,3 @@ export default {
} }
} }
</script> </script>
<style lang="less" scoped>
.search-config {
}
</style>

75
src/views/applet/CreationCamp/OperationArea/Allocation/SingleItem/index.vue

@ -3,48 +3,75 @@
<div class="config-header">设置</div> <div class="config-header">设置</div>
<widgetFormitem> <widgetFormitem>
卖点 卖点
<el-switch slot="right" v-model="currentSub.sellingPoint" @change="change('sellingPoint', $event)" /> <el-switch
slot="right"
v-model="currentSub.sellingPoint"
@change="change('sellingPoint', $event)"
/>
</widgetFormitem> </widgetFormitem>
<widgetFormitem> <widgetFormitem>
原价 原价
<el-switch slot="right" v-model="currentSub.originalPrice" @change="change('originalPrice', $event)" /> <el-switch
slot="right"
v-model="currentSub.originalPrice"
@change="change('originalPrice', $event)"
/>
</widgetFormitem> </widgetFormitem>
<widgetFormitem> <widgetFormitem>
售价 售价
<el-switch slot="right" v-model="currentSub.sellingPrice" @change="change('sellingPrice', $event)" /> <el-switch
slot="right"
v-model="currentSub.sellingPrice"
@change="change('sellingPrice', $event)"
/>
</widgetFormitem> </widgetFormitem>
<widgetFormitem> <widgetFormitem>
按钮 按钮
<el-switch slot="right" v-model="currentSub.button" @change="change('button', $event)" /> <el-switch
slot="right"
v-model="currentSub.button"
@change="change('button', $event)"
/>
</widgetFormitem> </widgetFormitem>
<div class="config-header">内容</div> <div class="config-header">内容</div>
<div class="config-item"> <div class="config-item">
<div class="config-setting"> <div class="config-setting">
<div class="collapse-list"> <div class="collapse-list">
<div <div v-if="currentSub.goodsList.length" class="collapse-item">
v-if="currentSub.goodsList.length"
class="collapse-item"
>
<div class="collapse-item-header"> <div class="collapse-item-header">
<div class="title">商品来源</div> <div class="title">商品来源</div>
<div class="right"> <div class="right">
<i class="el-icon-delete" @click="delectItem(currentSub.goodsList, 0)" /> <i
class="el-icon-delete"
@click="delectItem(currentSub.goodsList, 0)"
></i>
</div> </div>
</div> </div>
<div class="collapse-item-content"> <div class="collapse-item-content">
<div v-for="(category,index2) in currentSub.goodsList" :key="index2" class="class-item"> <div
v-for="(category, index2) in currentSub.goodsList"
:key="index2"
class="class-item"
>
<div class="left"> <div class="left">
商品 商品
</div> </div>
<div class="content text-overflow">{{ category.productName }}</div> <div class="content text-overflow">
{{ category.productName }}
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<a v-if="!currentSub.goodsList.length" class="add-widget" href="javascript:;" @click="addGoods"> <a
<i class="el-icon-plus" /> v-if="!currentSub.goodsList.length"
class="add-widget"
href="javascript:;"
@click="addGoods"
>
<i class="el-icon-plus"></i>
添加商品 添加商品
</a> </a>
<goods-dialog <goods-dialog
@ -66,18 +93,20 @@ export default {
widgetFormitem, widgetFormitem,
GoodsDialog GoodsDialog
}, },
data () { data() {
return { return {
value1: true, value1: true,
dialog2: { dialog2: {
type: 'add', type: 'add',
isVisible: false isVisible: false
}, }
exclude2: []
} }
}, },
computed: { computed: {
...mapState('creationCamp', ['diyComponents', 'currentComponentKeyCode', 'currentComponentConfig']), ...mapState('creationCamp', [
'currentComponentKeyCode',
'currentComponentConfig'
]),
currentSub() { currentSub() {
return this.currentComponentConfig return this.currentComponentConfig
} }
@ -98,7 +127,7 @@ export default {
success2(obj) { success2(obj) {
this.currentSub.goodsList = obj this.currentSub.goodsList = obj
}, },
close2 () { close2() {
this.dialog2.isVisible = false this.dialog2.isVisible = false
}, },
delectItem(list, index) { delectItem(list, index) {
@ -113,14 +142,14 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 12px; padding: 0 12px;
.title{ .title {
flex: 1; flex: 1;
} }
} }
.single-from-item { .single-from-item {
margin-bottom: 10px; margin-bottom: 10px;
} }
.class-item{ .class-item {
display: flex; display: flex;
align-items: center; align-items: center;
height: 36px; height: 36px;
@ -128,10 +157,10 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
border: 1px solid #eee; border: 1px solid #eee;
font-size: 12px; font-size: 12px;
.left{ .left {
color: #409EFF; color: #409eff;
} }
.content{ .content {
flex: 1; flex: 1;
margin: 0 8px; margin: 0 8px;
} }

2
src/views/applet/CreationCamp/OperationArea/Allocation/Video/index.vue

@ -34,7 +34,7 @@ export default {
Input Input
}, },
computed: { computed: {
...mapState('creationCamp', ['diyComponents', 'currentComponentKeyCode', 'currentComponentConfig']), ...mapState('creationCamp', ['currentComponentKeyCode', 'currentComponentConfig']),
currentSub() { currentSub() {
return this.currentComponentConfig return this.currentComponentConfig
} }

242
src/views/applet/CreationCamp/OperationArea/Allocation/components/Jump.vue

@ -0,0 +1,242 @@
<template>
<div class="jump-component">
<div class="config-title">跳转至</div>
<el-select
v-model="item.href"
placeholder="请选择"
class="full-input"
@change="selectHref(item)"
>
<el-option
v-for="link in templatePage"
:key="link.value"
:label="link.label"
:value="link.value"
/>
</el-select>
<div v-if="item.detailId && item.detailId.length">
<div
v-for="(category, index1) in item.detailId"
:key="index1"
class="class-item"
>
<div class="left">
商品
</div>
<div class="content text-overflow">{{ category.productName }}</div>
<div class="right">
<i class="el-icon-delete" @click="delectGoods(item)"></i>
</div>
</div>
</div>
<a
v-if="item.hasOwnProperty('detailId') && !item.detailId"
class="add-shop"
href="javascript:;"
@click="addGoods()"
>
<i class="el-icon-plus"></i>
添加商品
</a>
<div v-if="item.category3Id && item.category3Id.length">
<div
v-for="(category, index2) in item.category3Id"
:key="index2"
class="class-item"
>
<div class="left">
类别
</div>
<div class="content text-overflow">{{ category.categoryName }}</div>
<div class="right">
<i class="el-icon-delete" @click="delectCategory(item)"></i>
</div>
</div>
</div>
<a
v-if="item.hasOwnProperty('category3Id') && !item.category3Id"
class="add-shop"
href="javascript:;"
@click="addGoodsClass()"
>
<i class="el-icon-plus"></i>
添加类别
</a>
<div v-if="item.shopId && item.shopId.length">
<div
v-for="(shop, index3) in item.shopId"
:key="index3"
class="class-item"
>
<div class="left">
店铺
</div>
<div class="content text-overflow">{{ shop.storeName }}</div>
<div class="right">
<i class="el-icon-delete" @click="delectShop(item)"></i>
</div>
</div>
</div>
<a
v-if="item.hasOwnProperty('shopId') && !item.shopId"
class="add-shop"
href="javascript:;"
@click="addShop()"
>
<i class="el-icon-plus"></i>
添加店铺
</a>
<goods-class
ref="edit"
:dialog-visible="dialog1.isVisible"
:type="dialog1.type"
:deep="3"
@close="close1"
@success="success1"
/>
<goods-dialog
ref="edit"
:dialog-visible="dialog2.isVisible"
:type="dialog2.type"
:radio-state="true"
@close="close2"
@success="success2"
/>
<shop-dialog
ref="edit"
:dialog-visible="dialog3.isVisible"
:type="dialog3.type"
:radio-state="true"
@close="close3"
@success="success3"
/>
</div>
</template>
<script>
import GoodsClass from '@/components/applet/GoodsClass'
import GoodsDialog from '@/components/applet/Goods'
import ShopDialog from '@/components/applet/Shops'
import { mapState } from 'vuex'
export default {
components: {
GoodsClass,
GoodsDialog,
ShopDialog
},
props: {
item: {
type: Object,
default() {
return {}
}
}
},
data() {
return {
dialog1: {
type: 'add',
isVisible: false
},
dialog2: {
type: 'add',
isVisible: false
},
dialog3: {
type: 'add',
isVisible: false
}
}
},
computed: {
...mapState('creationCamp', ['templatePage']),
currentSub() {
return this.currentComponentConfig
}
},
methods: {
addGoodsClass() {
this.dialog1.isVisible = true
},
addGoods() {
this.dialog2.isVisible = true
},
addShop() {
this.dialog3.isVisible = true
},
success1(obj) {
this.item.category3Id = [obj]
},
close1() {
this.dialog1.isVisible = false
},
success2(obj) {
this.item.detailId = obj
},
close2() {
this.dialog2.isVisible = false
},
success3(obj) {
this.item.shopId = obj
},
close3() {
this.dialog3.isVisible = false
},
selectHref(item) {
const { href } = item
var re = /{(.*?)}/g
const execArray = re.exec(href)
delete item.detailId
delete item.category3Id
delete item.shopId
if (execArray) {
this.$set(item, execArray[1], '')
}
if (href.indexOf('/') > -1) {
item.isCustom = false
} else {
item.isCustom = true
}
},
delectGoods(item) {
item.detailId = ''
},
delectCategory(item) {
item.category3Id = ''
},
delectShop(item) {
item.shopId = ''
}
}
}
</script>
<style lang="less" scoped>
.jump-component {
.class-item {
display: flex;
align-items: center;
height: 36px;
padding: 0 12px;
margin-top: 10px;
border: 1px solid #eee;
font-size: 12px;
.left {
color: #409eff;
}
.content {
flex: 1;
margin: 0 8px;
}
}
.add-shop {
height: 30px;
line-height: 30px;
font-size: 14px;
color: #409eff;
border: 1px dashed #ccc;
text-align: center;
display: block;
cursor: pointer;
margin-top: 10px;
}
}
</style>

4
src/views/applet/CreationCamp/OperationArea/Allocation/components/widgetFormitem.vue

@ -1,10 +1,10 @@
<template> <template>
<el-row class="widget-formitem"> <el-row class="widget-formitem">
<el-col class="content-wrapper" :span="18"> <el-col class="content-wrapper" :span="18">
<slot /> <slot></slot>
</el-col> </el-col>
<el-col class="control-wrapper" :span="6"> <el-col class="control-wrapper" :span="6">
<slot name="right" /> <slot name="right"></slot>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>

3
src/views/applet/CreationCamp/PreviewContent/Components/SingleItem/index.vue

@ -5,7 +5,7 @@
<div class="title">商城好物</div> <div class="title">商城好物</div>
</div> </div>
<div class="single-item-content"> <div class="single-item-content">
<img :src="goods.imgs||defaultImg"> <img :src="goods.imgs[0]||defaultImg" />
</div> </div>
<div class="single-item-footer"> <div class="single-item-footer">
<div v-if="configContent.sellingPoint" class="shop-name">{{ goods.productName || '商品A' }}</div> <div v-if="configContent.sellingPoint" class="shop-name">{{ goods.productName || '商品A' }}</div>
@ -64,6 +64,7 @@ export default {
const resData = res.data.data || {} const resData = res.data.data || {}
const goods = resData.goodsList || [] const goods = resData.goodsList || []
this.goods = goods[0] || {} this.goods = goods[0] || {}
console.log(this.goods, '23')
} }
} }
} }

6
src/views/applet/CreationCamp/PreviewContent/Components/Video/index.vue

@ -8,8 +8,8 @@
height="100%" height="100%"
:src="configContent.link" :src="configContent.link"
controls controls
/> ></video>
<img :src="defaultVideo"> <img v-else :src="defaultVideo" />
</div> </div>
</div> </div>
</template> </template>
@ -50,7 +50,7 @@ export default {
font-weight: bold; font-weight: bold;
color: rgba(51, 51, 51, 1); color: rgba(51, 51, 51, 1);
&::before { &::before {
content: ""; content: '';
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;

2
src/views/applet/CreationCamp/PreviewContent/index.vue

@ -1,7 +1,7 @@
<template> <template>
<div class="operation-area-component"> <div class="operation-area-component">
<div class="phone-component"> <div class="phone-component">
<div class="phone-body" /> <div class="phone-body"></div>
<div class="phone-main"> <div class="phone-main">
<component <component
:is="item.keyCode" :is="item.keyCode"

27
src/views/applet/index.vue

@ -1,5 +1,5 @@
<template> <template>
<div class="container"> <div class="applet-container">
<div class="toolbar"> <div class="toolbar">
<el-button <el-button
type="primary" type="primary"
@ -81,10 +81,11 @@ export default {
const res = await Custom.cmsTemplatePage(this.customParams) const res = await Custom.cmsTemplatePage(this.customParams)
const templatePage = res.data.data.records || [] const templatePage = res.data.data.records || []
const templates = templatePage.map(item => { const templates = templatePage.map(item => {
const { name, config } = item const { name, id } = item
return { return {
value: config, value: id,
label: name label: name,
isCustom: true
} }
}) })
this.initTemplatePage(templates) this.initTemplatePage(templates)
@ -97,7 +98,21 @@ export default {
content: this.footerComponent content: this.footerComponent
} }
const diyComponents = this.diyComponents.concat(footerComponent) const diyComponents = this.diyComponents.concat(footerComponent)
let temp = false
const diyComponentsString = JSON.stringify(diyComponents) const diyComponentsString = JSON.stringify(diyComponents)
if (diyComponents.length) {
diyComponents.forEach((item) => {
const t = item.content
if ((t.list && !t.list.length) || (t.goodsList && !t.goodsList.length) || (t.categoryList && !t.categoryList.length)) {
temp = true
return this.$message({
message: `${item.name}组件内容不能为空`,
type: 'error'
})
}
})
}
if (temp) return
const res = await Applet.updateTemplate({ const res = await Applet.updateTemplate({
config: diyComponentsString, config: diyComponentsString,
sCustom: false, sCustom: false,
@ -117,11 +132,11 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.container { .applet-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
height: 100%; height: calc(100vh - 50px);
.toolbar { .toolbar {
padding: 12px; padding: 12px;
text-align: right; text-align: right;

2
src/views/cash/details.vue

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
:title="dialogData.title" :title="dialogData.title"
:visible="dialogData.isVisible" :visible.sync="dialogData.isVisible"
width="45%" width="45%"
> >
<ul> <ul>

19
src/views/cash/index.vue

@ -47,6 +47,13 @@
> >
查询 查询
</el-button> </el-button>
<el-button
plain
size="mini"
@click="reset"
>
重置
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -171,6 +178,18 @@ export default {
query() { query() {
this.getCashList() this.getCashList()
}, },
reset() {
this.formParams = {
model: {
storeName: '',
tenant: '',
applyTimeString: '',
auditStatus: ''
},
size: 10,
current: 1
}
},
look(d) { look(d) {
this.$refs.dialog.getDetail(d.id) this.$refs.dialog.getDetail(d.id)
this.dialogData = { this.dialogData = {

Loading…
Cancel
Save