|
@@ -13,9 +13,31 @@
|
|
<editor v-model="form.agree" url="/files/point/config/upload" />
|
|
<editor v-model="form.agree" url="/files/point/config/upload" />
|
|
</template>
|
|
</template>
|
|
<template #bottom_menu>
|
|
<template #bottom_menu>
|
|
- <data-form :span="24" :fields="testfields" v-model="form.bottom_menu" labelWidth="auto" :isSave="false"> </data-form>
|
|
|
|
|
|
+ <data-form :span="24" :fields="testfields" v-model="form.bottom_menu" labelWidth="auto" :isSave="false">
|
|
|
|
+ <template #is_use>
|
|
|
|
+ <el-option v-for="i in useList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
|
+ </template>
|
|
|
|
+ <template #list>
|
|
|
|
+ <el-col :span="24" style="margin: 0 0 10px 0">
|
|
|
|
+ <el-button type="primary" size="mini" @click="toAdd()">添加</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ <data-table :usePage="false" :fields="fieldsList" :opera="opera" :data="list" @del="toDel"> </data-table>
|
|
|
|
+ </template>
|
|
|
|
+ </data-form>
|
|
</template>
|
|
</template>
|
|
</data-form>
|
|
</data-form>
|
|
|
|
+ <e-dialog :dialog="dialog" @toClose="toClose">
|
|
|
|
+ <template v-slot:info>
|
|
|
|
+ <data-form :span="24" :fields="fieldsForm" :rules="rules" v-model="fieldform" labelWidth="150px" @save="onSubmit">
|
|
|
|
+ <template #is_use>
|
|
|
|
+ <el-option v-for="i in useList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
|
+ </template>
|
|
|
|
+ <template #type>
|
|
|
|
+ <el-option v-for="i in typeList" :key="i.model" :label="i.label" :value="i.value"></el-option>
|
|
|
|
+ </template>
|
|
|
|
+ </data-form>
|
|
|
|
+ </template>
|
|
|
|
+ </e-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -43,9 +65,51 @@ export default {
|
|
rules: {},
|
|
rules: {},
|
|
form: { bottom_menu: {} },
|
|
form: { bottom_menu: {} },
|
|
testfields: [
|
|
testfields: [
|
|
- { label: '是否使用', model: 'is_use' },
|
|
|
|
- { label: '菜单列表', model: 'list' },
|
|
|
|
|
|
+ { label: '是否使用', model: 'is_use', type: 'select' },
|
|
|
|
+ { label: '菜单列表', model: 'list', custom: true },
|
|
|
|
+ ],
|
|
|
|
+ opera: [{ label: '删除', method: 'del', confirm: true, type: 'danger' }],
|
|
|
|
+ list: [],
|
|
|
|
+ fieldform: {},
|
|
|
|
+ fieldsForm: [
|
|
|
|
+ { label: '名称', model: 'name' },
|
|
|
|
+ { label: '跳转路径', model: 'route' },
|
|
|
|
+ { label: '未选中', model: 'normal', type: 'upload', limit: 1, url: '/files/point/config/upload' },
|
|
|
|
+ { label: '选中', model: 'active', type: 'upload', limit: 1, url: '/files/point/config/upload' },
|
|
|
|
+ { label: '跳转类型', model: 'type', type: 'select' },
|
|
|
|
+ { label: '是否使用', model: 'is_use', type: 'select' },
|
|
|
|
+ ],
|
|
|
|
+ fieldsList: [
|
|
|
|
+ { label: '名称', model: 'name' },
|
|
|
|
+ { label: '跳转路径', model: 'route' },
|
|
|
|
+ // { label: '未选中', model: 'normal' },
|
|
|
|
+ // { label: '选中', model: 'active' },
|
|
|
|
+ {
|
|
|
|
+ label: '跳转类型',
|
|
|
|
+ model: 'type',
|
|
|
|
+ format: (i) => {
|
|
|
|
+ let data = this.typeList.find((f) => f.value == i);
|
|
|
|
+ if (data) return data.label;
|
|
|
|
+ else return '暂无';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '是否正在使用',
|
|
|
|
+ model: 'is_use',
|
|
|
|
+ format: (i) => {
|
|
|
|
+ let data = this.useList.find((f) => f.value == i);
|
|
|
|
+ if (data) return data.label;
|
|
|
|
+ else return '暂无';
|
|
|
|
+ },
|
|
|
|
+ },
|
|
],
|
|
],
|
|
|
|
+ useList: [],
|
|
|
|
+ typeList: [
|
|
|
|
+ { label: 'redirectTo', value: '0' },
|
|
|
|
+ { label: 'navigateTo', value: '1' },
|
|
|
|
+ ],
|
|
|
|
+ // 弹框
|
|
|
|
+ dialog: { title: '信息管理', show: false, type: '1' },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -73,24 +137,50 @@ export default {
|
|
autoCloseOrder: data.config.autoCloseOrder,
|
|
autoCloseOrder: data.config.autoCloseOrder,
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- if (!data.bottom_menu) data.bottom_menu = {};
|
|
|
|
|
|
+ if (!data.bottom_menu) {
|
|
|
|
+ data.bottom_menu = {};
|
|
|
|
+ } else {
|
|
|
|
+ this.$set(this, `list`, data.bottom_menu.list);
|
|
|
|
+ }
|
|
this.$set(this, `form`, data);
|
|
this.$set(this, `form`, data);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async toAdd() {
|
|
|
|
+ this.dialog = { title: '信息管理', show: true, type: '1' };
|
|
|
|
+ },
|
|
|
|
+ // 关闭
|
|
|
|
+ toClose() {
|
|
|
|
+ this.fieldform = {};
|
|
|
|
+ this.dialog = { title: '信息管理', show: false, type: '1' };
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ // 删除
|
|
|
|
+ toDel(index, data) {
|
|
|
|
+ let list = this.list;
|
|
|
|
+ list.splice(index, 1);
|
|
|
|
+ this.$set(this, `list`, list);
|
|
|
|
+ },
|
|
|
|
+ onSubmit({ data }) {
|
|
|
|
+ this.list.push(data);
|
|
|
|
+ this.toClose();
|
|
|
|
+ },
|
|
async toSave({ data }) {
|
|
async toSave({ data }) {
|
|
|
|
+ data.bottom_menu.list = this.list;
|
|
let config = { logo: data.logo, buyPoint: data.buyPoint, pointPlan: data.pointPlan, share: data.share, autoCloseOrder: data.autoCloseOrder };
|
|
let config = { logo: data.logo, buyPoint: data.buyPoint, pointPlan: data.pointPlan, share: data.share, autoCloseOrder: data.autoCloseOrder };
|
|
data.config = config;
|
|
data.config = config;
|
|
const res = await this.update(data);
|
|
const res = await this.update(data);
|
|
|
|
+ console.log(data);
|
|
this.$checkRes(res, '操作成功', '操作失败');
|
|
this.$checkRes(res, '操作成功', '操作失败');
|
|
},
|
|
},
|
|
|
|
+
|
|
// 查询其他信息
|
|
// 查询其他信息
|
|
async searchOther() {
|
|
async searchOther() {
|
|
let res;
|
|
let res;
|
|
// 是否使用
|
|
// 是否使用
|
|
- // res = await this.dictQuery({ code: 'use' });
|
|
|
|
- // if (this.$checkRes(res)) {
|
|
|
|
- // this.$set(this, `useList`, res.data);
|
|
|
|
- // }
|
|
|
|
|
|
+ res = await this.dictQuery({ code: 'use' });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `useList`, res.data);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
metaInfo() {
|
|
metaInfo() {
|