|
|
@@ -1,14 +1,12 @@
|
|
|
<template>
|
|
|
<basic-container>
|
|
|
- <avue-tabs :option="tabOption" @change="(data)=>tabChange(data.prop)">
|
|
|
+ <avue-tabs :option="tabOption" @change="(row)=>tabChange(row.prop)">
|
|
|
</avue-tabs>
|
|
|
- <avue-crud v-if="['PAGE_INTERFACE_SHOW','ACTIVE_SETTING'].indexOf(key)!==-1"
|
|
|
- :option="option"
|
|
|
+ <avue-crud v-if="['ACTIVE_SETTING'].indexOf(key)!==-1"
|
|
|
+ :option="crudOption"
|
|
|
:table-loading="loading"
|
|
|
:data="data"
|
|
|
:page.sync="page"
|
|
|
- :permission="permissionList"
|
|
|
- :before-open="beforeOpen"
|
|
|
v-model="form"
|
|
|
ref="crud"
|
|
|
@search-change="searchChange"
|
|
|
@@ -22,10 +20,10 @@
|
|
|
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
- <avue-form v-if="['POINT_GOODS_SETTING','COMMON_SETTING'].indexOf(key)!==-1"
|
|
|
+ <avue-form v-if="['COMMON_SETTING','POINT_GOODS_SETTING'].indexOf(key)!==-1"
|
|
|
ref="form"
|
|
|
v-model="form"
|
|
|
- :option="option"
|
|
|
+ :option="formOption"
|
|
|
@submit="updateSetting">
|
|
|
</avue-form>
|
|
|
</basic-container>
|
|
|
@@ -39,32 +37,43 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
form: {},
|
|
|
+ query: {},
|
|
|
+ data: [],
|
|
|
+ loading: true,
|
|
|
+ page: {
|
|
|
+ pageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ key: "",
|
|
|
tabOption: {
|
|
|
column: [{
|
|
|
icon: 'iconfont icon-jifen',
|
|
|
label: '公共设置',
|
|
|
prop: 'COMMON_SETTING',
|
|
|
}, {
|
|
|
- icon: 'el-icon-s-operation',
|
|
|
- label: '页面设置',
|
|
|
- prop: 'PAGE_INTERFACE_SHOW',
|
|
|
+ icon: 'iconfont icon-jifen',
|
|
|
+ label: '积分商场设置',
|
|
|
+ prop: 'POINT_GOODS_SETTING',
|
|
|
}, {
|
|
|
icon: 'iconfont iconicon_task',
|
|
|
label: '活动设置',
|
|
|
prop: 'ACTIVE_SETTING',
|
|
|
- }, {
|
|
|
- icon: 'iconfont icon-jifen',
|
|
|
- label: '积分商场设置',
|
|
|
- prop: 'POINT_GOODS_SETTING',
|
|
|
}]
|
|
|
},
|
|
|
- option: {
|
|
|
+ formOption: {
|
|
|
submitText: '保存',
|
|
|
labelWidth: 120,
|
|
|
emptyBtn: false,
|
|
|
column: []
|
|
|
},
|
|
|
- key: "",
|
|
|
+ crudOption: {
|
|
|
+ labelWidth: 120,
|
|
|
+ emptyBtn: false,
|
|
|
+ addBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ column: []
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -102,8 +111,76 @@ export default {
|
|
|
tabChange(key) {
|
|
|
this.key = key;
|
|
|
//活动页面
|
|
|
- if (this.key === "PAGE_INTERFACE_SHOW") {
|
|
|
- this.option.column = [
|
|
|
+ if (this.key === "COMMON_SETTING") {
|
|
|
+ this.formOption.column = [
|
|
|
+ {
|
|
|
+ label: "默认活动",
|
|
|
+ prop: "defaultActiveId",
|
|
|
+ // type: "select",
|
|
|
+ // dicUrl:"/api/sing_active/activerecord/list?current=1&size=999",
|
|
|
+ // props: {
|
|
|
+ // label: 'title',
|
|
|
+ // value: 'id',
|
|
|
+ // desc: 'content',
|
|
|
+ // res: "data.records"
|
|
|
+ // },
|
|
|
+ span: 12,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择默认活动",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ } else if (this.key === "POINT_GOODS_SETTING") {
|
|
|
+ this.formOption.column = [
|
|
|
+ {
|
|
|
+ label: "主页轮播图",
|
|
|
+ prop: "indexImageList",
|
|
|
+ type: 'dynamic',
|
|
|
+ span: 24,
|
|
|
+ children: {
|
|
|
+ align: 'center',
|
|
|
+ headerAlign: 'center',
|
|
|
+ column: [{
|
|
|
+ label: '轮播图',
|
|
|
+ prop: "url",
|
|
|
+ dataType: "string",
|
|
|
+ type: 'upload',
|
|
|
+ propsHttp: {
|
|
|
+ res: 'data',
|
|
|
+ url: 'link'
|
|
|
+ },
|
|
|
+ listType: 'picture-img',
|
|
|
+ tip: '只能上传jpg/png文件,且不超过500kb',
|
|
|
+ action: '/api/blade-resource/oss/endpoint/put-file',
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入类型",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ }, {
|
|
|
+ label: '类型',
|
|
|
+ prop: "type",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入类型",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ }, {
|
|
|
+ label: '地址',
|
|
|
+ prop: "path",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请输入地址",
|
|
|
+ trigger: "blur"
|
|
|
+ }],
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ } else if (this.key === "ACTIVE_SETTING") {
|
|
|
+ this.formOption.column = [
|
|
|
{
|
|
|
label: "主页标题",
|
|
|
prop: "indexTitle",
|
|
|
@@ -187,27 +264,6 @@ export default {
|
|
|
}],
|
|
|
}]
|
|
|
}
|
|
|
- }
|
|
|
- ]
|
|
|
- } else if (this.key === "ACTIVE_SETTING") {
|
|
|
- this.option.column = [
|
|
|
- {
|
|
|
- label: "默认活动",
|
|
|
- prop: "defaultActiveId",
|
|
|
- // type: "select",
|
|
|
- // dicUrl:"/api/sing_active/activerecord/list?current=1&size=999",
|
|
|
- // props: {
|
|
|
- // label: 'title',
|
|
|
- // value: 'id',
|
|
|
- // desc: 'content',
|
|
|
- // res: "data.records"
|
|
|
- // },
|
|
|
- span: 12,
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请选择默认活动",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
},
|
|
|
{
|
|
|
label: "热力值/票",
|
|
|
@@ -283,53 +339,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
]
|
|
|
- } else if (this.key === "POINT_GOODS_SETTING") {
|
|
|
- this.option.column = [
|
|
|
- {
|
|
|
- label: "主页轮播图",
|
|
|
- prop: "indexImageList",
|
|
|
- type: 'dynamic',
|
|
|
- span: 24,
|
|
|
- children: {
|
|
|
- align: 'center',
|
|
|
- headerAlign: 'center',
|
|
|
- column: [{
|
|
|
- label: '轮播图',
|
|
|
- prop: "url",
|
|
|
- dataType: "string",
|
|
|
- type: 'upload',
|
|
|
- propsHttp: {
|
|
|
- res: 'data',
|
|
|
- url: 'link'
|
|
|
- },
|
|
|
- listType: 'picture-img',
|
|
|
- tip: '只能上传jpg/png文件,且不超过500kb',
|
|
|
- action: '/api/blade-resource/oss/endpoint/put-file',
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入类型",
|
|
|
- trigger: "blur"
|
|
|
- }]
|
|
|
- }, {
|
|
|
- label: '类型',
|
|
|
- prop: "type",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入类型",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- }, {
|
|
|
- label: '地址',
|
|
|
- prop: "path",
|
|
|
- rules: [{
|
|
|
- required: true,
|
|
|
- message: "请输入地址",
|
|
|
- trigger: "blur"
|
|
|
- }],
|
|
|
- }]
|
|
|
- }
|
|
|
- }
|
|
|
- ]
|
|
|
} else {
|
|
|
this.option.column = [];
|
|
|
}
|
|
|
@@ -346,10 +355,10 @@ export default {
|
|
|
this.onLoad(this.page, params);
|
|
|
done();
|
|
|
},
|
|
|
- currentChange(currentPage){
|
|
|
+ currentChange(currentPage) {
|
|
|
this.page.currentPage = currentPage;
|
|
|
},
|
|
|
- sizeChange(pageSize){
|
|
|
+ sizeChange(pageSize) {
|
|
|
this.page.pageSize = pageSize;
|
|
|
},
|
|
|
refreshChange() {
|