Commit a49598dd authored by zhengke's avatar zhengke

修改

parent bf063b66
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
<style> <style>
@import url('~assets/css/font.css'); @import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_82qvnhne0zp.css'); @import url('//at.alicdn.com/t/font_2077629_iur7ea01ckc.css');
html, html,
body, body,
......
...@@ -108,6 +108,20 @@ export function RemoveWebMenuStatus(data) { ...@@ -108,6 +108,20 @@ export function RemoveWebMenuStatus(data) {
}) })
} }
/**
* 获取网站新闻类型列表
*
*/
export function GetWebNewsTypeList(data) {
return request({
url: '/WebManager/GetWebNewsTypeList',
method: 'post',
data
})
}
/** /**
* 获取新闻类型分页 * 获取新闻类型分页
* *
...@@ -161,11 +175,11 @@ export function GetWebNewsType(data) { ...@@ -161,11 +175,11 @@ export function GetWebNewsType(data) {
* 获取网站新闻列表 * 获取网站新闻列表
* *
*/ */
export function GetWebNewsList() { export function GetWebNewsList(data) {
return request({ return request({
url: '/WebManager/GetWebNewsList', url: '/WebManager/GetWebNewsList',
method: 'post', method: 'post',
data:'' data
}) })
} }
...@@ -182,4 +196,38 @@ export function GetWebNewsPage(data) { ...@@ -182,4 +196,38 @@ export function GetWebNewsPage(data) {
}) })
} }
/**
* 新增修改网站新闻
*
*/
export function SetWebNews(data) {
return request({
url: '/WebManager/SetWebNews',
method: 'post',
data
})
}
/**
* 获取网站新闻详情
*
*/
export function GetWebNews(data) {
return request({
url: '/WebManager/GetWebNews',
method: 'post',
data
})
}
/**
* 修改网站新闻状态
*
*/
export function RemoveWebNewsStatus(data) {
return request({
url: '/WebManager/RemoveWebNewsStatus',
method: 'post',
data
})
}
\ No newline at end of file
...@@ -140,9 +140,9 @@ ...@@ -140,9 +140,9 @@
}; };
var tipMsg = ""; var tipMsg = "";
if (delMsg.Status == 0) { if (delMsg.Status == 0) {
tipMsg = "是否启用【" + obj.Name + "】菜单?"; tipMsg = "是否启用【" + obj.Name + "】?";
} else { } else {
tipMsg = "是否禁用【" + obj.Name + "】菜单?"; tipMsg = "是否禁用【" + obj.Name + "】?";
} }
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
...@@ -194,9 +194,7 @@ ...@@ -194,9 +194,7 @@
refreshPage() { refreshPage() {
if (!this.menuObjOption) { if (!this.menuObjOption) {
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.msg.NavTitle = ""; this.msg.Name = "";
this.msg.SubTitle = "";
this.msg.NavType = 0;
this.msg.Status = "-1"; this.msg.Status = "-1";
} }
this.getList() this.getList()
......
...@@ -10,21 +10,25 @@ ...@@ -10,21 +10,25 @@
<q-select @input="resetSearch" standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg" <q-select @input="resetSearch" standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg"
v-model="msg.Status" :options="ShowOpts" emit-value map-options label="状态" /> v-model="msg.Status" :options="ShowOpts" emit-value map-options label="状态" />
</div> </div>
<div class="col-3">
<q-select @input="resetSearch" option-value="Id" option-label="TypeName" standout="bg-primary text-white" class="col-6 q-pr-lg q-pr-lg"
v-model="msg.TypeId" :options="TypeList" emit-value map-options label="类型" />
</div>
</div> </div>
</div> </div>
<div class="page-content"> <div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">菜单信息</div> <div class="col-2 q-table__title">新闻信息</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增菜单" @click="EditMenu(null)" /> <q-btn color="accent" class="q-mr-md" size="sm" icon="add" label="新增新闻" @click="EditMenu(null)" />
</div> </div>
</template> </template>
<template v-slot:body-cell-Icon="props"> <template v-slot:body-cell-Img="props">
<q-td :props="props"> <q-td :props="props">
<img :src="props.row.Icon" style="width:50px;" /> <img :src="props.row.Img" style="width:50px;" />
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-Status="props"> <template v-slot:body-cell-Status="props">
...@@ -44,8 +48,8 @@ ...@@ -44,8 +48,8 @@
</q-td> </q-td>
</template> </template>
</q-table> </q-table>
<webmenu-form v-if="isShowMenuForm" :save-obj="menuObjOption" @close="closeMenuSaveForm" @success="refreshPage"> <news-form v-if="isShowNewsForm" :save-obj="menuObjOption" @close="closeMenuSaveForm" @success="refreshPage">
</webmenu-form> </news-form>
</div> </div>
</div> </div>
</template> </template>
...@@ -53,40 +57,35 @@ ...@@ -53,40 +57,35 @@
import { import {
GetWebNewsPage, GetWebNewsPage,
RemoveWebMenuStatus, RemoveWebMenuStatus,
GetWebNewsList GetWebNewsTypeList,
RemoveWebNewsStatus
} from '../../api/system/webkit' } from '../../api/system/webkit'
import webmenuForm from '../../components/system/webmenu-form' import newsForm from '../../components/system/news-form'
export default { export default {
meta: { meta: {
title: "菜单管理" title: "菜单管理"
}, },
components: { components: {
webmenuForm newsForm
}, },
data() { data() {
return { return {
columns: [{ columns: [{
name: 'Name', name: 'Title',
label: '菜单名称', label: '标题',
field: 'Name', field: 'Title',
align: 'left' align: 'left'
}, },
{ {
name: 'MenuUrl', name: 'Content',
label: '菜单链接', label: '内容',
field: 'MenuUrl', field: 'Content',
align: 'left' align: 'left'
}, },
{ {
name: 'MenuLevel', name: 'Img',
label: '菜单等级', label: '图片',
field: 'MenuLevel', field: 'Img',
align: 'left'
},
{
name: 'Icon',
label: '图标',
field: 'Icon',
align: 'left' align: 'left'
}, },
{ {
...@@ -125,7 +124,8 @@ ...@@ -125,7 +124,8 @@
Status: -1 Status: -1
}, },
pageCount: 0, pageCount: 0,
isShowMenuForm: false, TypeList:[],
isShowNewsForm: false,
menuObjOption: null, menuObjOption: null,
} }
}, },
...@@ -143,9 +143,9 @@ ...@@ -143,9 +143,9 @@
}; };
var tipMsg = ""; var tipMsg = "";
if (delMsg.Status == 0) { if (delMsg.Status == 0) {
tipMsg = "是否启用【" + obj.Name + "】菜单?"; tipMsg = "是否启用【" + obj.Title + "】?";
} else { } else {
tipMsg = "是否禁用【" + obj.Name + "】菜单?"; tipMsg = "是否禁用【" + obj.Title + "】?";
} }
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
ok: "确定", ok: "确定",
cancel: "取消", cancel: "取消",
}).onOk(() => { }).onOk(() => {
RemoveWebMenuStatus(delMsg).then(res => { RemoveWebNewsStatus(delMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
that.$q.notify({ that.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
...@@ -195,11 +195,15 @@ ...@@ -195,11 +195,15 @@
}, },
//获取下拉数据 //获取下拉数据
getWebNews(){ getWebNews(){
GetWebNewsList().then(res => { GetWebNewsTypeList({}).then(res => {
console.log(res,'下拉数据来也!'); this.TypeList = res.Data;
let obj = {
Id:0,
TypeName:'不限'
}
this.TypeList.unshift(obj);
}).catch(() => { }).catch(() => {
}) })
}, },
//刷新页面 //刷新页面
...@@ -219,11 +223,11 @@ ...@@ -219,11 +223,11 @@
} else { } else {
this.menuObjOption = null this.menuObjOption = null
} }
this.isShowMenuForm = true this.isShowNewsForm = true
}, },
//关闭弹窗 //关闭弹窗
closeMenuSaveForm() { closeMenuSaveForm() {
this.isShowMenuForm = false this.isShowNewsForm = false
}, },
} }
} }
......
...@@ -128,9 +128,9 @@ ...@@ -128,9 +128,9 @@
}; };
var tipMsg = ""; var tipMsg = "";
if (delMsg.Status == 0) { if (delMsg.Status == 0) {
tipMsg = "是否启用【" + obj.TypeName + "】菜单?"; tipMsg = "是否启用【" + obj.TypeName + "】?";
} else { } else {
tipMsg = "是否禁用【" + obj.TypeName + "】菜单?"; tipMsg = "是否禁用【" + obj.TypeName + "】?";
} }
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
......
...@@ -179,9 +179,9 @@ ...@@ -179,9 +179,9 @@
}; };
var tipMsg = ""; var tipMsg = "";
if (delMsg.Status == 0) { if (delMsg.Status == 0) {
tipMsg = "是否启用【" + obj.NavTitle + "】菜单?"; tipMsg = "是否启用【" + obj.NavTitle + "】?";
} else { } else {
tipMsg = "是否禁用【" + obj.NavTitle + "】菜单?"; tipMsg = "是否禁用【" + obj.NavTitle + "】?";
} }
this.$q.dialog({ this.$q.dialog({
title: '提示信息', title: '提示信息',
......
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