This commit is contained in:
chc
2022-10-21 11:22:56 +08:00
138 changed files with 14354 additions and 2038 deletions

View File

@@ -108,10 +108,10 @@ export default {
type: "INDEX",
title: "首页",
},
// {
// type: "SPECIAL",
// title: "专题",
// },
{
type: "SPECIAL",
title: "专题",
}
],
list: [], // 模板列表
};
@@ -127,7 +127,8 @@ export default {
const data = this.formData;
data.status ? (data.pageShow = "OPEN") : (data.pageShow = "CLOSE");
delete data.status;
(data.pageType = "INDEX"), (data.pageClientType = "PC");
// (data.pageType = "INDEX"), (data.pageClientType = "PC");
(data.pageType = this.searchForm.pageType), (data.pageClientType = "PC");
if (data.id) {
API_floor.updateHome(data.id, data).then((res) => {
this.$Message.success("编辑模板成功");
@@ -146,6 +147,13 @@ export default {
}
});
},
clickType(type,index){
this.searchForm.pageNumber = 1
this.searchForm.pageType = type;
this.selectedIndex = index;
this.getTemplateList();
},
createTemp() {
// 新建表单

View File

@@ -288,4 +288,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -11,7 +11,10 @@ import layout from "./index";
import navbar from "./navbar";
export default {
components: {
navbar,
navbar
},
mounted() {
this.pagetype = this.$route.query.pagetype;
},
data() {
return {
@@ -30,7 +33,8 @@ export default {
this.pagetype = this.$route.query.pagetype;
},
methods: {
selected(val) { // 顶部栏点击切换
selected(val) {
// 顶部栏点击切换
this.name = val;
}
}

View File

@@ -9,9 +9,7 @@
v-for="(item, index) in way"
:key="index"
:type="item.selected ? 'primary' : ''"
>
{{ item.title }}
</Button>
>{{ item.title }}</Button>
</div>
<div class="model-title-view-btn">
<!-- TODO 后期会补全 目前版本暂无 -->
@@ -21,7 +19,7 @@
<div>临时预览</div>
<div ref="qrCodeUrl"></div>
</div>
</Poptip> -->
</Poptip>-->
<Button size="default" type="primary" @click="handleSpinShow">保存模板</Button>
<Modal
@@ -33,7 +31,8 @@
>
<div v-if="progress">
<div class="model-item">
模板名称 <Input style="width: 200px" v-model="submitWay.name" />
模板名称
<Input style="width: 200px" v-model="submitWay.name"/>
</div>
<div class="model-item">
是否立即发布
@@ -45,7 +44,7 @@
<Button type="primary" @click="save()">保存</Button>
</div>
<Progress v-else :percent="num" status="active" />
<Progress v-else :percent="num" status="active"/>
</Modal>
</div>
</div>
@@ -54,6 +53,7 @@
import * as API_Other from "@/api/other.js";
export default {
props: ["pagetype"],
data() {
return {
progress: true, // 展示进度
@@ -82,8 +82,8 @@ export default {
// 表单信息
pageShow: this.$route.query.type || false,
name: this.$route.query.name || "模板名称",
pageClientType: "H5",
},
pageClientType: "H5"
}
};
},
watch: {
@@ -158,7 +158,7 @@ export default {
pageType: this.submitWay.pageType,
pageClientType: "H5",
})
.then((res) => {
.then(res => {
this.num = 50;
if (res.success) {
this.num = 80;
@@ -174,7 +174,7 @@ export default {
}
console.log(res);
})
.catch((error) => {});
.catch(error => {});
},
@@ -237,7 +237,7 @@ export default {
submit(submitWay) {
this.progress = false;
API_Other.setHomeSetup(submitWay)
.then((res) => {
.then(res => {
this.num = 50;
if (res.success) {
this.num = 80;
@@ -254,9 +254,9 @@ export default {
}
console.log(res);
})
.catch((error) => {});
},
},
.catch(error => {});
}
}
};
</script>
<style scoped lang="scss">

View File

@@ -14,7 +14,7 @@
<Button type="primary" @click="handleAdd()">添加页面</Button>
<div class="list">
<Spin size="large" fix v-if="loading"></Spin>
<div class="item item-title" >
<div class="item item-title">
<div>页面名称</div>
<div class="item-config">
<div>状态</div>
@@ -30,19 +30,25 @@
<span slot="close"></span>
</i-switch>
<Button type="info" placement="right" @click="handleEdit(item)" size="small">修改</Button>
<Poptip confirm title="删除此模板?" @on-ok="handleDel(item)" >
<Poptip confirm title="删除此模板?" @on-ok="handleDel(item)">
<Button type="error" size="small">删除</Button>
</Poptip>
</div>
</div>
<div class="no-more" v-if="list.length ==0">暂无更多模板</div>
</div>
<Page :total="total" size="small" @on-change="(val) => {params.pageNumber = val; } " :current="params.pageNumber" :page-size="params.pageSize" show-sizer :page-size-opts="[10, 20, 50]" @on-page-size-change="changePageSize"/>
<Page
:total="total"
size="small"
@on-change="(val) => {params.pageNumber = val; } "
:current="params.pageNumber"
:page-size="params.pageSize"
show-sizer
:page-size-opts="[10, 20, 50]"
@on-page-size-change="changePageSize"
/>
</Card>
</div>
</template>
<script>
import * as API_Other from "@/api/other.js";
@@ -51,25 +57,27 @@ export default {
data() {
return {
selectedIndex: 0, // 装修那个页面的下标
columns: [ // 表头
columns: [
// 表头
{
title: "页面名称",
key: "name",
key: "name"
},
{
title: "状态",
title: "状态"
},
{
title: "操作",
key: "action",
},
key: "action"
}
],
loading: false, // 加载状态
pageTypes: [ // 装修类型
pageTypes: [
// 装修类型
{
type: "INDEX",
title: "首页",
title: "首页"
},
{
type: "SPECIAL",
@@ -84,26 +92,27 @@ export default {
// title: "app开屏页面",
// },
],
params: { // 请求参数
params: {
// 请求参数
pageNumber: 1,
pageSize: 10,
sort: "createTime",
order: "desc",
pageType: "INDEX",
pageClientType: "H5",
pageClientType: "H5"
},
total: 0, // 页面数量
list: [], // 总数据
list: [] // 总数据
};
},
watch: {
params: {
handler(val) {
// this.pageNumber++;
this.init();
},
deep: true,
},
// params: {
// handler(val) {
// // this.pageNumber++;
// this.init();
// },
// deep: true,
// },
},
mounted() {
this.init();
@@ -133,7 +142,7 @@ export default {
// 是否发布
changeSwitch(item) {
this.loading = true;
API_Other.releasePageHome(item.id).then((res) => {
API_Other.releasePageHome(item.id).then(res => {
if (res.result) {
this.loading = false;
this.$Message.success("发布成功");
@@ -148,10 +157,10 @@ export default {
// 初始化数据
init() {
this.loading = true;
API_Other.getHomeList(this.params).then((res) => {
API_Other.getHomeList(this.params).then(res => {
if (!res.result) return false;
this.loading = false;
res.result.records.forEach((item) => {
res.result.records.forEach(item => {
if (item.pageShow == "OPEN") {
item.pageShow = true;
} else {
@@ -181,8 +190,8 @@ export default {
query: { pagetype: this.params.pageType },
});
},
// 分页 改变页数
changePageSize(v) {
// 分页 改变页数
changePageSize(v) {
this.params.pageNumber = 1;
this.params.pageSize = v;
this.init();
@@ -190,7 +199,7 @@ export default {
// 删除模板
handleDel(val) {
this.loading = true;
API_Other.removePageHome(val.id).then((res) => {
API_Other.removePageHome(val.id).then(res => {
if (res.result) {
this.loading = false;
this.init();
@@ -199,8 +208,8 @@ export default {
this.loading = false;
});
},
},
}
}
};
</script>
<style scoped lang="scss">
@@ -212,7 +221,7 @@ export default {
background: #ededed;
}
.item-title {
background: #d7e7f5!important;
background: #d7e7f5 !important;
height: 54px;
}
.no-more {
@@ -256,7 +265,7 @@ export default {
align-items: center;
}
}
.item:nth-of-type(2n+1) {
.item:nth-of-type(2n + 1) {
background: #f5f7fa;
}
</style>

View File

@@ -10,6 +10,9 @@
<FormItem label="reqURL" prop="reqURL">
<Input v-model="formValidate.reqURL" />
</FormItem>
<FormItem label="电子面单URL" prop="sheetReqURL">
<Input v-model="formValidate.sheetReqURL" />
</FormItem>
<div class="label-btns">
<Button type="primary" @click="submit('formValidate')">保存</Button>
@@ -24,7 +27,7 @@ export default {
data() {
return {
ruleValidate: {}, // 验证规则
formValidate: { ebusinessID: "", reqURL: "", appKey: "" }, // 表单数据
formValidate: { ebusinessID: "", reqURL: "", appKey: "" ,sheetReqURL: "" ,}, // 表单数据
};
},
props: ["res",'type'],

View File

@@ -12,7 +12,7 @@
/>
</Form-item>
<Form-item label="联系方式">
<Input
<Inputuser-manage
type="text"
v-model="searchForm.mobile"
placeholder="请输入联系方式"