Commit be9c56d3 authored by 黄奎's avatar 黄奎

页面修改

parent cc4c6363
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div> <div>
<div class="searchInput"> <div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" <el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容"
v-model="msg.NavIconName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()"> v-model="msg.Title" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input> </el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px" <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span> @click="msg.pageIndex=1,getList()"> </span>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="SortNum" label="排序" width="250"> <el-table-column prop="SortNum" label="排序" width="250">
</el-table-column> </el-table-column>
<el-table-column prop="IsDisable" label="状态" width="150"> <el-table-column prop="IsDisable" label="状态" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0" <el-switch v-model="scope.row.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0"
@change="updateIsDisable(scope.row)"> @change="updateIsDisable(scope.row)">
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
Title: ""
}, },
total: 0, total: 0,
ArticleIsShowAdd: true, ArticleIsShowAdd: true,
...@@ -191,9 +191,11 @@ ...@@ -191,9 +191,11 @@
}) })
}, },
//更新状态 //更新状态
updateIsDisable(item) updateIsDisable(item) {
{ this.apipost("/api/MContent/UpdateArticleStatus", {
this.apipost("/api/MContent/SetArticle", {Id:item.Id,IsDisable:item.IsDisable}, res => { Id: item.Id,
IsDisable: item.IsDisable
}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.ArticleIsShowAdd = true; this.ArticleIsShowAdd = true;
this.getList(); this.getList();
......
...@@ -2,36 +2,42 @@ ...@@ -2,36 +2,42 @@
<div class="projectClass"> <div class="projectClass">
<template v-if="projectClassIsShowAdd"> <template v-if="projectClassIsShowAdd">
<div class="head-title"> <div class="head-title">
文章列表 专题分类
<el-button @click="projectClassIsShowAdd=false" style="float:right;margin-top: -5px;" size="small" type="primary"> <el-button @click="projectClassIsShowAdd=false" style="float:right;margin-top: -5px;" size="small"
添加文章 type="primary">
添加分类
</el-button> </el-button>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
<div class="searchInput"> <div class="searchInput">
<el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容" <el-input style="display:inline-block;width:225px;height:30px" placeholder="请输入搜索内容"
v-model="msg.NavIconName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()"> v-model="msg.TopicName" size="small" clearable @keyup.enter.native="msg.pageIndex=1,getList()">
</el-input> </el-input>
<span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px" <span class="el-icon-search" style="color:#979dad;font-size:14px;position:relative;top:1px"
@click="msg.pageIndex=1,getList()"> </span> @click="msg.pageIndex=1,getList()"> </span>
</div> </div>
</div> </div>
<el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0"> <el-table :data="dataList" v-loading="loading" border style="width: 100%;margin:20px 0">
<el-table-column prop="id" label="ID" width="150"> <el-table-column prop="Id" label="ID" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题" width="829"> <el-table-column prop="TopicName" label="分类名称" width="829">
</el-table-column> </el-table-column>
<el-table-column prop="sort" label="排序" width="250"> <el-table-column prop="SortNum" label="排序" width="250">
</el-table-column> </el-table-column>
<el-table-column prop="status" label="状态" width="150"> <el-table-column prop="IsDisable" label="状态" width="150">
<template slot-scope="scope">
<el-switch v-model="scope.row.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0"
@change="updateIsDisable(scope.row)">
</el-switch>
</template>
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<img @click="EditprojectClass(scope.row)" class="operatImg" <img @click="EditprojectClass(scope.row)" class="operatImg" src="../../assets/img/userman/edit.png"
src="../../assets/img/userman/edit.png" alt=""> alt="">
<img @click="RemoveprojectClass(scope.row)" class="operatImg" <img @click="RemoveprojectClass(scope.row)" class="operatImg" src="../../assets/img/userman/del.png"
src="../../assets/img/userman/del.png" alt=""> alt="">
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -47,24 +53,19 @@ ...@@ -47,24 +53,19 @@
</div> </div>
<div class="content"> <div class="content">
<div class="projectClass_condiv"> <div class="projectClass_condiv">
<el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px" style="padding:0 20px;"> <el-form :model="addMsg" :rules="rules" ref="addMsg" label-width="100px" style="padding:0 20px;">
<el-form-item label="标题" prop="title"> <el-form-item label="专题分类名称" prop="title">
<el-input v-model="addMsg.title" size="small" placeholder="请输入名称" maxlength="20" /> <el-input v-model="addMsg.TopicName" size="small" placeholder="请输入名称" maxlength="20" />
</el-form-item> </el-form-item>
<el-form-item label="排序"> <el-form-item label="排序">
<el-input type="text" v-model="addMsg.Sort" size="small" placeholder="请输入排序" <el-input type="text" v-model="addMsg.SortNum" size="small" @keyup.native="checkInteger(addMsg,'SortNum')"
maxlength="4" /> placeholder="请输入排序" maxlength="4" />
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-switch v-model="addMsg.status" active-color="#409EFF" :active-value="1" :inactive-value="0"> <el-switch v-model="addMsg.IsDisable" active-color="#409EFF" :active-value="1" :inactive-value="0">
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item label="内容"> </el-form>
<div style="line-height:normal;">
<UE :defaultMsg="defaultMsg" :config="config" ref="ue" @input="input"></UE>
</div>
</el-form-item>
</el-form>
</div> </div>
</div> </div>
<el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存 <el-button size="small" style="margin-top:20px;padding:9px 25px;" type="primary" @click="submitform('addMsg')">保存
...@@ -73,71 +74,52 @@ ...@@ -73,71 +74,52 @@
</div> </div>
</template> </template>
<script> <script>
import UE from '@/components/global/UE.vue'
export default { export default {
data() { data() {
return { return {
//是否线下链接弹窗 //是否线下链接弹窗
loading: false, loading: false,
dataList: [{ dataList: [],
id:123,
title:'标题',
sort:1,
status:0
}],
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
NavIconName: "", TopicName: ""
MallBaseId: 0,
NavIconIsShow:-1
}, },
total: 0, total: 0,
projectClassIsShowAdd: true, projectClassIsShowAdd: true,
addMsg: { addMsg: {
title:'', //标题 Id: 0, //编号
Sort:'', //排序 TopicName: '', //专题分类名称
status:0, //状态 SortNum: 0, //排序
content:'' // 内容 IsDisable: 0, //状态
}, },
rules:{ rules: {
title: [ TopicName: [{
{ required: true, message: '标题不能为空', trigger: 'change' } required: true,
], message: '专题分类名称',
}, trigger: 'change'
defaultMsg: '', }],
config: {
initialFrameWidth: null,
initialFrameHeight: 350,
}, },
}; };
}, },
components: {
UE
},
created() { created() {
}, },
methods: { methods: {
getMenu() {
//调用子组件方法
var obj = this.$refs.chooseMeun.getChooseMenu();
this.addMsg.NavIconUrl = obj.PageUrl;
this.isShowLink = false;
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
}, },
getList() { getList() {
// this.apipost("/api/Tenant/GetMiniProgrameNaviconPage", this.msg, res => { this.apipost("/api/MContent/GetTopicTypePageList", this.msg, res => {
// if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
// this.dataList = res.data.data.pageData; this.dataList = res.data.data.pageData;
// this.total = res.data.data.count; this.total = res.data.data.count;
// } else { } else {
// this.Info(res.data.message); this.Info(res.data.message);
// } }
// }) })
}, },
submitform(addMsg) { submitform(addMsg) {
//提交创建、修改表单 //提交创建、修改表单
...@@ -151,18 +133,39 @@ ...@@ -151,18 +133,39 @@
}, },
//保存 //保存
saveMsg() { saveMsg() {
this.apipost("/api/MContent/SetTopicType", this.addMsg, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = true;
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
}, },
//修改 //修改
EditprojectClass(item) { EditprojectClass(item) {
this.apipost("/api/MContent/GetTopicType", {
Id: item.Id
}, res => {
if (res.data.resultCode == 1) {
this.projectClassIsShowAdd = false;
var jsonData = res.data.data;
this.addMsg.Id = jsonData.Id;
this.addMsg.TopicName = jsonData.TopicName;
this.addMsg.SortNum = jsonData.SortNum;
this.addMsg.IsDisable = jsonData.IsDisable;
} else {
this.Info(res.data.message);
}
})
}, },
//删除 //删除
RemoveprojectClass(item) { RemoveprojectClass(item) {
var that = this; var that = this;
that.Confirm("是否要删除?", function () { that.Confirm("是否要删除?", function () {
that.apipost("/api/Tenant/RemoveMiniProgrameNavicon", { that.apipost("/api/MContent/RemoveTopicType", {
NavIconId: item.NavIconId Id: item.Id
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.getList(); that.getList();
...@@ -172,6 +175,21 @@ ...@@ -172,6 +175,21 @@
}) })
}) })
}, },
//更新状态
updateIsDisable(item) {
this.apipost("/api/MContent/UpdateTopicTypeStatus", {
Id: item.Id,
IsDisable: item.IsDisable
}, res => {
if (res.data.resultCode == 1) {
this.ArticleIsShowAdd = true;
this.getList();
this.Success(res.data.message);
} else {
this.Info(res.data.message);
}
})
},
input(obj) { input(obj) {
this.addMsg.content = obj this.addMsg.content = obj
}, },
...@@ -183,7 +201,6 @@ ...@@ -183,7 +201,6 @@
</script> </script>
<style> <style>
.projectClass .content .searchInput { .projectClass .content .searchInput {
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
border-radius: 4px; border-radius: 4px;
...@@ -212,15 +229,18 @@ ...@@ -212,15 +229,18 @@
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
} }
.projectClass .operatImg{
width:32px; .projectClass .operatImg {
height:32px; width: 32px;
margin:0 10px height: 32px;
margin: 0 10px
} }
.projectClass .projectClass_condiv{
.projectClass .projectClass_condiv {
padding: 20px 0; padding: 20px 0;
background-color: #fff; background-color: #fff;
margin-bottom: 20px; margin-bottom: 20px;
padding-right: 50%; padding-right: 50%;
} }
</style> </style>
...@@ -7,7 +7,7 @@ Vue.use(Router) ...@@ -7,7 +7,7 @@ Vue.use(Router)
*/ */
const routerPush = Router.prototype.push const routerPush = Router.prototype.push
Router.prototype.push = function push(location) { Router.prototype.push = function push(location) {
return routerPush.call(this, location).catch(error=> error) return routerPush.call(this, location).catch(error => error)
} }
export default new Router({ export default new Router({
...@@ -56,7 +56,7 @@ export default new Router({ ...@@ -56,7 +56,7 @@ export default new Router({
name: 'Fsetting', name: 'Fsetting',
component: resolve => require(['@/components/Fsetting'], resolve), component: resolve => require(['@/components/Fsetting'], resolve),
children: [ children: [
//店铺管理 微信基础设置 //店铺管理 微信基础设置
{ {
path: '/wexinappconfig', path: '/wexinappconfig',
name: 'wexinappconfig', name: 'wexinappconfig',
...@@ -76,19 +76,19 @@ export default new Router({ ...@@ -76,19 +76,19 @@ export default new Router({
] ]
}, },
{ {
path:'/Ftemplate', //DIY装修 path: '/Ftemplate', //DIY装修
name: 'Ftemplate', name: 'Ftemplate',
component: resolve => require(['@/components/Ftemplate'], resolve), component: resolve => require(['@/components/Ftemplate'], resolve),
children:[{ //模板管理 children: [{ //模板管理
path:'/templateManage', path: '/templateManage',
name:'templateManage', name: 'templateManage',
component: resolve => require(['@/components/sallCenter/templateManage'], resolve), component: resolve => require(['@/components/sallCenter/templateManage'], resolve),
},{ //添加 修改模板 }, { //添加 修改模板
path:'/templateEdit', path: '/templateEdit',
name: 'templateEdit', name: 'templateEdit',
component: resolve => require(['@/components/sallCenter/templateEdit'], resolve), component: resolve => require(['@/components/sallCenter/templateEdit'], resolve),
},{ //自定义页面 }, { //自定义页面
path:'/CustomPage', path: '/CustomPage',
name: 'CustomPage', name: 'CustomPage',
component: resolve => require(['@/components/sallCenter/CustomPage'], resolve), component: resolve => require(['@/components/sallCenter/CustomPage'], resolve),
}] }]
...@@ -314,6 +314,18 @@ export default new Router({ ...@@ -314,6 +314,18 @@ export default new Router({
name: 'ProjectClassific', name: 'ProjectClassific',
component: resolve => require(['@/components/StoreDesign/ProjectClassific'], resolve), component: resolve => require(['@/components/StoreDesign/ProjectClassific'], resolve),
}, },
//店铺管理 内容管理 视频管理
{
path: '/videoManage',
name: 'videoManage',
component: resolve => require(['@/components/StoreDesign/videoManage'], resolve),
},
//店铺管理 内容管理 门店管理
{
path: '/storesManage',
name: 'storesManage',
component: resolve => require(['@/components/StoreDesign/storesManage'], resolve),
},
//店铺管理 内容管理 直播管理 //店铺管理 内容管理 直播管理
{ {
path: '/liveManage', path: '/liveManage',
...@@ -325,8 +337,7 @@ export default new Router({ ...@@ -325,8 +337,7 @@ export default new Router({
path: '/minititle', path: '/minititle',
name: 'minititle', name: 'minititle',
component: resolve => require(['@/components/StoreDesign/minititle'], resolve), component: resolve => require(['@/components/StoreDesign/minititle'], resolve),
} }, //店铺管理 版权设置
, //店铺管理 版权设置
{ {
path: '/copyrightset', path: '/copyrightset',
name: 'copyrightset', name: 'copyrightset',
...@@ -416,8 +427,7 @@ export default new Router({ ...@@ -416,8 +427,7 @@ export default new Router({
path: '/salesStatistics', path: '/salesStatistics',
name: 'salesStatistics', name: 'salesStatistics',
component: resolve => require(['@/components/statistics/salesStatistics'], resolve), component: resolve => require(['@/components/statistics/salesStatistics'], resolve),
} },
,
//营销中心 充值管理 //营销中心 充值管理
{ {
path: '/rechargeManage', path: '/rechargeManage',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment