parent
113064352c
commit
149973c60f
11 changed files with 0 additions and 1438 deletions
@ -1,89 +0,0 @@ |
||||
<!-- 关键词回复 --> |
||||
<link rel="stylesheet" href="../../../../static/mweixin/css/keyword-reply.css"> |
||||
|
||||
<div id="keyword-reply" class="keyword-reply ms-weixin-content" v-if="menuVue.menuActive == '关键词表单'"> |
||||
<el-container> |
||||
<el-header class="ms-header" height="50px"> |
||||
<el-row> |
||||
<el-button class="ms-fr" size="small" icon="el-icon-arrow-left" @click="menuVue.menuActive = '关键词回复'">返回</el-button> |
||||
<el-button class="ms-fr" size="small" icon="el-icon-refresh">重置</el-button> |
||||
<el-button class="ms-fr" type="success" size="small" icon="el-icon-tickets" @click="menuVue.menuActive = '关键词回复'">保存</el-button> |
||||
</el-row> |
||||
</el-header> |
||||
<el-main class="ms-container" width="100%"> |
||||
<el-form :model="keywordReplyForm" status-icon :rules="keywordReplyFormRules" ref="keywordReplyForm" label-width="100px"> |
||||
<el-form-item label="关键词" prop="keyword" class="ms-keyword-input"> |
||||
<el-row type='flex' justify='space-between' align='center'> |
||||
<el-col :span='12'> |
||||
<el-input placeholder="请输入内容" v-model="keywordReplyForm.keyword" class="input-with-select" size='mini' maxlength='30' @input='resetWord'> |
||||
<el-select v-model="keywordReplyForm.select" slot="prepend" placeholder="请选择"> |
||||
<el-option label="模糊匹配" value="1"></el-option> |
||||
<el-option label="全匹配" value="2"></el-option> |
||||
</el-select> |
||||
<span slot='suffix' v-text="wordNumber+'/30'"></span> |
||||
</el-input> |
||||
</el-col> |
||||
<el-col> |
||||
<i class="el-icon-plus" @click='addKeyWord'></i> |
||||
</el-col> |
||||
</el-row> |
||||
</el-form-item> |
||||
<el-form-item class="ms-keyword-reply-content" label="回复内容"> |
||||
<el-tabs v-model="activeName" @tab-click="" class="keyword-reply-tabs"> |
||||
<el-tab-pane label="文字" name="text"> |
||||
<el-input type="textarea" v-model="keywordReplyForm.reply" :autosize="{ minRows: 4, maxRows: 4}" resize='none'> |
||||
</el-input> |
||||
<i class="el-icon-delete" @click="keywordReplyForm.reply = ''"></i> |
||||
<div class="footer"> |
||||
<i class="el-icon-star-off"></i> |
||||
<a>插入超链接</a> |
||||
</div> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="图片" name="picture"> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="图文" name="article"> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
</el-form-item> |
||||
</el-form> |
||||
</el-main> |
||||
</el-container> |
||||
</div> |
||||
|
||||
<script> |
||||
var keywordReplyVue = new Vue({ |
||||
el: '#keyword-reply', |
||||
data: { |
||||
keywordReplyForm: { |
||||
keyword: "", //关键词 |
||||
select: '', |
||||
reply: "", |
||||
}, |
||||
keywordReplyFormRules: { |
||||
|
||||
}, |
||||
activeName: 'text', |
||||
wordNumber: 30, //剩余字数 |
||||
}, |
||||
methods: { |
||||
// 添加关键词 |
||||
addKeyWord: function() { |
||||
|
||||
}, |
||||
// 计算剩余字数 |
||||
resetWord: function(value) { |
||||
if(!value) return 30; |
||||
if(value.length >= 30) { |
||||
this.$message.error('任务名称不得超过30个字'); |
||||
// 这里涉及到获取数据更新之后的DOM,需要用$nextTick |
||||
this.$nextTick(function() { |
||||
this.keywordReplyForm.keyword = event.target.value = value.slice(0, 30); |
||||
}) |
||||
this.wordNumber = 0 |
||||
} else { |
||||
this.wordNumber = 30 - value.length |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
@ -1,67 +0,0 @@ |
||||
<!-- 关键字列表 --> |
||||
<link rel="stylesheet" href="../../../../static/mweixin/css/keyword-list.css"> |
||||
|
||||
<div id="keyword-list" class="keyword-list ms-weixin-content" v-if="menuVue.menuActive == '关键词回复'"> |
||||
<el-container> |
||||
<!--右侧头部--> |
||||
<el-header class="ms-header" height="50px"> |
||||
<el-row> |
||||
<el-button type="primary" size="small" icon="el-icon-plus" @click="menuVue.menuActive = '关键词表单'">添加</el-button> |
||||
<el-button class="ms-fr" size="small" icon="el-icon-refresh">重置</el-button> |
||||
</el-row> |
||||
</el-header> |
||||
<el-container> |
||||
<!--内容头部--> |
||||
<el-header class="ms-tr ms-header"> |
||||
<el-input size="medium" placeholder="请输入内容" suffix-icon="el-icon-search"> |
||||
</el-input> |
||||
</el-header> |
||||
<!--素材列表--> |
||||
<el-main class="ms-admin-picture-list ms-container"> |
||||
<el-table :data="tableData" border style="width: 100%"> |
||||
<el-table-column prop="date" label="规则名" width="180" align='center'> |
||||
</el-table-column> |
||||
<el-table-column prop="name" label="关键词" width="180" align='center'> |
||||
</el-table-column> |
||||
<el-table-column prop="address" label="消息回复类型" align='center'> |
||||
</el-table-column> |
||||
<el-table-column prop="address" label="发送对象" align='center'> |
||||
</el-table-column> |
||||
<el-table-column prop="address" label="回复方式" align='center'> |
||||
</el-table-column> |
||||
</el-table> |
||||
</el-main> |
||||
</el-container> |
||||
</el-container> |
||||
</div> |
||||
|
||||
<script> |
||||
var keywordListVue = new Vue({ |
||||
el: '#keyword-list', |
||||
data: { |
||||
tableData: [{ |
||||
date: '2016-05-02', |
||||
name: '王小虎', |
||||
address: '上海市普陀区金沙江路 1518 弄' |
||||
}, { |
||||
date: '2016-05-04', |
||||
name: '王小虎', |
||||
address: '上海市普陀区金沙江路 1517 弄' |
||||
}, { |
||||
date: '2016-05-01', |
||||
name: '王小虎', |
||||
address: '上海市普陀区金沙江路 1519 弄' |
||||
}, { |
||||
date: '2016-05-03', |
||||
name: '王小虎', |
||||
address: '上海市普陀区金沙江路 1516 弄' |
||||
}] |
||||
}, |
||||
methods: { |
||||
// 获取关键词列表 |
||||
list: function() { |
||||
|
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
@ -1,59 +0,0 @@ |
||||
<link rel="stylesheet" href="../../../static/mweixin/css/menu.css"> |
||||
|
||||
<div id="menu-vue"> |
||||
<!--左侧--> |
||||
<el-container class="ms-admin-menu"> |
||||
<!--右侧头部--> |
||||
<el-header class="ms-header" height="50px"> |
||||
<div> |
||||
<i class="el-icon-arrow-left"></i> |
||||
<span> |
||||
吕小布微信号 |
||||
</span> |
||||
</div> |
||||
</el-header> |
||||
<el-main> |
||||
<el-menu class="ms-admin-menu-menu" default-active="0-0"> |
||||
<template v-for="(menu,i) in menuList"> |
||||
<!--单个选项--> |
||||
<el-menu-item :index="i" @click="menuActive = menu.title" v-if="!menu.sub" v-text="menu.title" class="ms-admin-menu-menu-item"></el-menu-item> |
||||
<!--多个选项--> |
||||
<el-submenu :index="i+''" v-if="menu.sub" class="ms-admin-submenu"> |
||||
<template slot="title"> |
||||
<span v-text="menu.title"></span> |
||||
</template> |
||||
<el-menu-item class="ms-admin-menu-menu-item" @click="menuActive = sub.title" :index="i+'-'+index" v-for="(sub,index) in menu.sub" v-text="sub.title"></el-menu-item> |
||||
</el-submenu> |
||||
</template> |
||||
</el-menu> |
||||
</el-main> |
||||
</el-container> |
||||
</div> |
||||
|
||||
<script> |
||||
var menuVue = new Vue({ |
||||
el: "#menu-vue", |
||||
data: { |
||||
menuList: [{ |
||||
title: '图文素材', |
||||
sub: [{ |
||||
title: '图文' |
||||
}, { |
||||
title: '图片' |
||||
}], |
||||
}, { |
||||
title: '自定义菜单', |
||||
}, { |
||||
title: '自动回复', |
||||
sub: [{ |
||||
title: '关注时回复' |
||||
}, { |
||||
title: '消息回复' |
||||
}, { |
||||
title: '关键词回复' |
||||
}] |
||||
}], //左侧导航列表 |
||||
menuActive: '图文', //选中 |
||||
} |
||||
}) |
||||
</script> |
||||
@ -1,320 +0,0 @@ |
||||
<!-- 自定义菜单 --> |
||||
<link rel="stylesheet" href="../../../../static/mweixin/css/custom-menu.css" /> |
||||
<div id="custom-menu" class="ms-custom-menu ms-weixin-content" v-if="menuVue.menuActive == '自定义菜单'"> |
||||
<el-container class="ms-custom-container"> |
||||
<el-header class="ms-header" height="50px"> |
||||
<el-row> |
||||
<el-button type="danger" size="small" icon="el-icon-delet" @click='menuDel'>删除</el-button> |
||||
<el-button size="small" @click="menuSort">菜单排序</el-button> |
||||
<el-button class="ms-fr" size="small" icon="el-icon-refresh" @click='resetForm'>重置</el-button> |
||||
<el-button type="success" class="ms-fr" size="small" icon="el-icon-tickets" @click='menuSave'>保存</el-button> |
||||
<el-button type="success" class="ms-fr" size="small" icon="el-icon-tickets" @click='menuCreate'>发布菜单</el-button> |
||||
</el-row> |
||||
</el-header> |
||||
<el-container class="ms-container"> |
||||
<el-aside> |
||||
<el-container> |
||||
<el-header>公众号</el-header> |
||||
<el-main></el-main> |
||||
<el-footer> |
||||
<el-button icon="el-icon-date"></el-button> |
||||
<div class="ms-create-menu"> |
||||
<div class="ms-create-sub-menu" v-for="(menu,index) of mainMenuList" :key="index"> |
||||
<!-- 父菜单 --> |
||||
<el-button type="primary" @click="openSubMenu(index,menu);menu.addSubMenuShow = !menu.addSubMenuShow;$forceUpdate()">{{ |
||||
menu.menuTitle }}</el-button> |
||||
<div class="sub-menu-list" v-show="menu.addSubMenuShow"> |
||||
<!-- 子菜单 --> |
||||
<el-button v-for="(sub,index) of currentSubMenuList" :key="index" v-text="sub.menuTitle" class="sub-menu-item" |
||||
@click='customMenuForm = sub;$forceUpdate();'></el-button> |
||||
<!-- 添加子菜单的加号按钮 --> |
||||
<el-button icon="el-icon-plus" class="ms-create-btn" @click="addSubMenu"></el-button> |
||||
</div> |
||||
</div> |
||||
<!-- 添加父菜单的加号按钮 --> |
||||
<el-button icon="el-icon-plus" @click="addMenu" v-show="addMenuBtn && mainMenuList.length<3" class="add-menu"></el-button> |
||||
</div> |
||||
</el-footer> |
||||
</el-container> |
||||
</el-aside> |
||||
<el-main> |
||||
<el-card class="custom-menu-card" shadow="never"> |
||||
<div slot="header" class="clearfix"> |
||||
<span v-text="customMenuForm.menuId ? '修改菜单' : '新建菜单'"></span> |
||||
</div> |
||||
<el-form ref="customMenuForm" :rules="customMenuFormRules" :model="customMenuForm" label-width="81px"> |
||||
<el-form-item label="菜单名称" prop="menuTitle" class="ms-custom-menu-name"> |
||||
<el-input v-model="customMenuForm.menuTitle" size="medium"></el-input> |
||||
<span>菜单名称字数不多于5个汉字或10个字母</span> |
||||
</el-form-item> |
||||
<el-form-item label="菜单内容" class="ms-custom-menu-content" prop='menuUrl'> |
||||
<el-input v-model="customMenuForm.menuUrl" size="medium"></el-input> |
||||
<span>请输入菜单地址</span> |
||||
<!-- <el-tabs v-model="activeName" @tab-click=""> |
||||
<el-tab-pane label="图片" name="picture"> |
||||
<span slot="label"> |
||||
<i class="el-icon-picture"></i>图片</span> |
||||
<div onclick="materialBankFormVue.open()"> |
||||
<i class="el-icon-picture-outline"></i> |
||||
<span>从素材库选择</span> |
||||
</div> |
||||
<div onclick="newPicFormVue.open()"> |
||||
<i class="el-icon-plus"></i> |
||||
<span>新建图片</span> |
||||
</div> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="图文管理" name="article"> |
||||
<span slot="label"> |
||||
<i class="el-icon-picture"></i>图文管理</span> |
||||
<div onclick="materialBankFormVue.open()"> |
||||
<i class="el-icon-picture-outline"></i> |
||||
<span>从素材库选择</span> |
||||
</div> |
||||
<div onclick="newPicFormVue.open()"> |
||||
<i class="el-icon-plus"></i> |
||||
<span>新建图文</span> |
||||
</div> |
||||
</el-tab-pane> |
||||
</el-tabs> --> |
||||
</el-form-item> |
||||
</el-form> |
||||
</el-card> |
||||
</el-main> |
||||
</el-container> |
||||
</el-container> |
||||
</div> |
||||
<script> |
||||
var customMenuVue = new Vue({ |
||||
el: "#custom-menu", |
||||
data: { |
||||
customMenuForm: { |
||||
menuTitle: "", |
||||
menuUrl: "", |
||||
menuId: "", |
||||
menuMenuId: "", //父菜单编号 |
||||
menuStatus: "", //菜单状态 0:不启用 1:启用 |
||||
menuStyle: "", //类型:1文本 2图文 4外链接 |
||||
menuType: "", //菜单属性 0:链接 1:回复 |
||||
}, |
||||
customMenuFormRules: { |
||||
menuTitle: [{ |
||||
required: true, |
||||
message: "请输入菜单名称", |
||||
trigger: ["blur", "change"] |
||||
}, |
||||
{ |
||||
min: 1, |
||||
max: 5, |
||||
message: "长度在 1 到 5 个字符", |
||||
trigger: ["blur", "change"] |
||||
} |
||||
], |
||||
menuUrl: [{ |
||||
required: true, |
||||
message: '请输入菜单地址', |
||||
trigger: 'change' |
||||
}, { |
||||
validator: function (rule, value, callback) { |
||||
/^(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/.test(value) ? |
||||
callback() : callback('链接不合法') |
||||
} |
||||
}] |
||||
}, |
||||
addMenuBtn: true, //添加菜单按钮 |
||||
activeName: "picture", //导航切换 当前激活面板 |
||||
mainMenuList: [], |
||||
subMenuList: [], //所有的子菜单 |
||||
currentSubMenuList: [], //打开当前父菜单的子菜单列表 |
||||
currentMenuMenuId: '', //打开当前父菜单的菜单ID |
||||
}, |
||||
methods: { |
||||
menuList: function () { |
||||
var that = this; |
||||
ms.http.get(ms.manager + "/mweixin/menu/list.do") |
||||
.then((res) => { |
||||
console.log('res菜单', res); |
||||
that.mainMenuList = [] |
||||
that.subMenuList = [] |
||||
res.rows && res.rows.forEach(function (item, index) { |
||||
item.menuMenuId == null && that.mainMenuList.push(item) |
||||
item.menuMenuId != null && that.subMenuList.push(item) |
||||
}) |
||||
// 初始化显示第一个菜单 |
||||
if(that.mainMenuList.length){ |
||||
that.customMenuForm = that.mainMenuList[0] |
||||
}else{ |
||||
that.mainMenuList.push(that.customMenuForm) |
||||
// 没有一个菜单的时候 |
||||
that.mainMenuList[0].menuTitle = '新建菜单' |
||||
} |
||||
}, (err) => { |
||||
console.log(err) |
||||
}) |
||||
}, |
||||
// 菜单排序 |
||||
menuSort: function () { |
||||
event.target.innerText = "完成"; |
||||
}, |
||||
// 添加菜单 |
||||
addMenu: function () { |
||||
this.mainMenuList.push({ |
||||
menuTitle: "新建菜单" |
||||
}); |
||||
this.$nextTick(function () { |
||||
var that = this; |
||||
Array.prototype.forEach.call( |
||||
document.querySelectorAll(".ms-create-sub-menu"), |
||||
function (item, index) { |
||||
item.style.width = '80px'; |
||||
} |
||||
); |
||||
document.querySelector(".add-menu").style.width = '80px'; |
||||
}); |
||||
if (this.mainMenuList.length == 3) { |
||||
return (this.addMenuBtn = false); |
||||
} |
||||
}, |
||||
// 添加子菜单 |
||||
addSubMenu: function () { |
||||
if(!this.currentMenuMenuId){ |
||||
return this.$message.error("创建子菜单前,必须先创建父菜单"); |
||||
} |
||||
if (this.currentSubMenuList.length > 4) { |
||||
return this.$message.error("子菜单最多5项"); |
||||
} |
||||
var that = this; |
||||
console.log('that.currentMenuMenuId', that.currentMenuMenuId); |
||||
this.currentSubMenuList.push({ |
||||
menuTitle: "新建子菜单", |
||||
menuMenuId: that.currentMenuMenuId, |
||||
}); |
||||
console.log('currentSubMenuList', this.currentSubMenuList); |
||||
}, |
||||
openSubMenu(index, menu) { |
||||
console.log('menu', menu); |
||||
var that = this; |
||||
that.customMenuForm = menu |
||||
that.closeAllSubMenu(index); |
||||
that.currentSubMenuList = []; |
||||
that.currentMenuMenuId = menu.menuId; |
||||
console.log('that.subMenuList', that.subMenuList); |
||||
that.subMenuList.forEach(function (item, index) { |
||||
item.menuMenuId == menu.menuId && that.currentSubMenuList.push(item) |
||||
}) |
||||
}, |
||||
// 关闭所有的子菜单弹出层 |
||||
closeAllSubMenu: function (num) { |
||||
// 确保当前的菜单不被重置成false |
||||
this.mainMenuList.forEach(function (item, index) { |
||||
num != index && (item.addSubMenuShow = false) |
||||
}) |
||||
}, |
||||
// 保存菜单 |
||||
menuSave: function () { |
||||
// 表单校验 |
||||
var that = this; |
||||
this.$refs.customMenuForm.validate(function (ispass, object) { |
||||
if (ispass) { |
||||
// 判断保存的菜单类型,这里先简单处理,写死 |
||||
that.customMenuForm.menuStatus = 1 |
||||
that.customMenuForm.menuStyle = 4 //类型:1文本 2图文 4外链接 |
||||
that.customMenuForm.menuType = 0 //菜单属性 0:链接 1:回复 |
||||
ms.http.post(ms.manager + "/mweixin/menu/save.do", that.customMenuForm) |
||||
.then(function (res) { |
||||
that.customMenuForm.menuStatus = that.customMenuForm.menuStyle = that.customMenuForm.menuType = '' |
||||
if(res.menuId){ |
||||
that.$message.success('菜单保存成功') |
||||
that.menuList(); |
||||
}else{ |
||||
that.$message.error(res.resultMsg) |
||||
} |
||||
}, function (err) { |
||||
console.log(err) |
||||
}) |
||||
} |
||||
}) |
||||
}, |
||||
// 删除菜单 |
||||
menuDel: function () { |
||||
var that = this; |
||||
// 当存在子菜单的时候,不得删除菜单 |
||||
if(that.customMenuForm.menuMenuId == null && that.currentSubMenuList.length){ |
||||
return that.$message.error('当前菜单存在子菜单,不得删除') |
||||
} |
||||
if(!that.customMenuForm.menuId){ |
||||
return that.$message.error('请新建菜单之后,再进行删除') |
||||
} |
||||
this.$confirm('此操作将永久删除该菜单, 是否继续?', '提示', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
}).then(() => { |
||||
ms.http.post(ms.manager + "/mweixin/menu/delete.do", { |
||||
ids: that.customMenuForm.menuId |
||||
}) |
||||
.then(function (res) { |
||||
that.$message({ |
||||
type: 'success', |
||||
message: '删除成功!' |
||||
}); |
||||
// 清空表单值 |
||||
that.resetForm(); |
||||
// 刷新菜单列表 |
||||
that.menuList(); |
||||
}, function (err) { |
||||
console.log(err) |
||||
}) |
||||
}).catch(() => { |
||||
this.$message({ |
||||
type: 'info', |
||||
message: '已取消删除' |
||||
}); |
||||
}) |
||||
}, |
||||
// 发布菜单 |
||||
menuCreate: function () { |
||||
var that = this; |
||||
this.$confirm('此操作将发布公众号菜单, 是否继续?', '提示', { |
||||
confirmButtonText: '确定', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
}).then(() => { |
||||
ms.http.get(ms.manager + "/mweixin/menu/create.do") |
||||
.then(function (res) { |
||||
if(res.result){ |
||||
that.$message({ |
||||
type: 'success', |
||||
message: '发布成功!,菜单将于2小时后生效' |
||||
}); |
||||
}else{ |
||||
that.$message({ |
||||
type: 'error', |
||||
message: '发布失败!' |
||||
}); |
||||
} |
||||
}, function (err) { |
||||
console.log(err) |
||||
}) |
||||
}).catch(() => { |
||||
this.$message({ |
||||
type: 'info', |
||||
message: '已取消删除' |
||||
}); |
||||
}) |
||||
}, |
||||
// 重置 |
||||
resetForm:function(){ |
||||
// this.$refs.customMenuForm.resetFields();未在表单中,清空不了 |
||||
this.customMenuForm.menuStatus = |
||||
this.customMenuForm.menuStyle = |
||||
this.customMenuForm.menuType = |
||||
this.customMenuForm.menuTitle = |
||||
this.customMenuForm.menuUrl = |
||||
'' |
||||
} |
||||
}, |
||||
mounted: function () { |
||||
this.menuList(); |
||||
}, |
||||
}); |
||||
</script> |
||||
@ -1,92 +0,0 @@ |
||||
<!-- 素材库 --> |
||||
<link rel="stylesheet" href="../../../../static/mweixin/css/material-bank-form.css"> |
||||
<div id="material-bank-form" class="material-bank-form"> |
||||
<el-dialog title="选择图片" :visible.sync="isShow" custom-class='ms-weixin-dialog'> |
||||
<el-tabs tab-position="left"> |
||||
<el-tab-pane :label="group.label + '('+group.total+')'" v-for='(group,index) of materialGroup' :key='index'> |
||||
<el-upload :file-list='fileList' action="" list-type="picture-card" :on-preview="handlePictureCardPreview" |
||||
:on-remove="handleRemove"> |
||||
<i class="el-icon-plus"></i> |
||||
</el-upload> |
||||
<el-dialog :visible.sync="dialogVisible" :modal='false' :title='flieName' custom-class='ms-weixin-dialog'> |
||||
<!-- 这是图片放大 --> |
||||
<img width="100%" :src="dialogImageUrl" alt=""> |
||||
</el-dialog> |
||||
<el-row type='flex' justify='end'> |
||||
<el-col :span='11'> |
||||
<el-pagination |
||||
@size-change="handleSizeChange" |
||||
background |
||||
:pager-count="1" |
||||
@current-change="handleCurrentChange" |
||||
:current-page.sync="currentPage" |
||||
:page-size="10" |
||||
layout="prev, pager, next, jumper" |
||||
:total="50"> |
||||
</el-pagination> |
||||
</el-col> |
||||
</el-row> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button type="primary" @click="isShow = false" size='mini'>确 定</el-button> |
||||
<el-button @click="isShow = false" size='mini'>取 消</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
</div> |
||||
<script> |
||||
var materialBankFormVue = new Vue({ |
||||
el: '#material-bank-form', |
||||
data: { |
||||
isShow: false, |
||||
materialGroup: [{ |
||||
label: '未分组', |
||||
total:36, |
||||
}, |
||||
{ |
||||
label: '云创', |
||||
total:12, |
||||
}, |
||||
{ |
||||
label: 'PM管理', |
||||
total:16, |
||||
}, |
||||
], |
||||
fileList: [], //文件列表 |
||||
dialogImageUrl: '',//点击放大,触发弹窗里面的图片地址 |
||||
dialogVisible: false, |
||||
flieName:"",//放大图片的文件名 |
||||
currentPage:'',//当前页数 |
||||
}, |
||||
watch:{ |
||||
fileList:{ |
||||
handler:function(n,o){ |
||||
console.log('文件列表',n); |
||||
}, |
||||
deep:true |
||||
} |
||||
}, |
||||
methods: { |
||||
// 表单打开 |
||||
open: function () { |
||||
this.isShow = true; |
||||
}, |
||||
handlePictureCardPreview:function(file){ |
||||
// 点击预览大图触发的钩子函数 |
||||
console.log('file',file); |
||||
this.dialogVisible = true; |
||||
this.dialogImageUrl = file.url |
||||
this.flieName = file.name |
||||
}, |
||||
handleRemove:function(){ |
||||
|
||||
}, |
||||
handleSizeChange:function(){ |
||||
|
||||
}, |
||||
handleCurrentChange:function(){ |
||||
|
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
@ -1,113 +0,0 @@ |
||||
<!-- 新建图片表单 --> |
||||
<link rel="stylesheet" href="../../../../static/mweixin/css/new-pic-form.css"> |
||||
<div id='new-pic-form' v-show='isShow' class="new-pic-form"> |
||||
<el-dialog title="选择图片" :visible.sync="isShow" custom-class='ms-weixin-dialog'> |
||||
<el-form :model="newPicForm"> |
||||
<el-form-item label="上传图片" label-width="100px"> |
||||
<el-upload class="new-pic-upload" :on-preview="handlePreview" :on-remove="handleRemove" :file-list="picList" |
||||
list-type="picture"> |
||||
<el-button size="small" type="primary">本地上传</el-button> |
||||
<div slot="tip" class="el-upload__tip"> |
||||
<dl> |
||||
<dt>注意:1.图片上传仅支持bmp、png、jpeg、jpg、gif格式</dt> |
||||
<dd>2.同步至微信公众平台的图片最大2M,存在铭飞本地,最大支持5M的图片</dd> |
||||
</dl> |
||||
</div> |
||||
</el-upload> |
||||
</el-form-item> |
||||
<el-form-item label="选择分组" label-width="100px"> |
||||
<el-popover placement="top-start" width="350" trigger="click" v-model='popoverShow'> |
||||
<el-form label-width="81px" :model="groupForm" ref="groupForm" :rules='groupRule'> |
||||
<el-form-item label="创建分组" prop='name'> |
||||
<el-input v-model="groupForm.name" size='mini'></el-input> |
||||
</el-form-item> |
||||
<div class="dialog-footer" style="float:right"> |
||||
<el-button @click="cancel" size='mini'>取消</el-button> |
||||
<el-button type="primary" @click="saveGroup" size='mini'>确定</el-button> |
||||
</div> |
||||
</el-form> |
||||
<el-button slot="reference" icon='el-icon-plus' size='mini'>添加分组</el-button> |
||||
</el-popover> |
||||
<el-select v-model="selectedOption" placeholder="请选择分组" size='mini'> |
||||
<el-option v-for="item in picGroup" :key="item.value" :label="item.label" :value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-form> |
||||
<div slot="footer" class="dialog-footer"> |
||||
<el-button @click="isShow = false" size='mini'>取 消</el-button> |
||||
<el-button type="primary" @click="isShow = false" size='mini'>确 定</el-button> |
||||
</div> |
||||
</el-dialog> |
||||
</div> |
||||
<script> |
||||
var newPicFormVue = new Vue({ |
||||
el: '#new-pic-form', |
||||
data: { |
||||
isShow: false, |
||||
newPicForm: { |
||||
|
||||
}, |
||||
picGroup: [{ |
||||
value: 'default', |
||||
label: '默认分组' |
||||
}, { |
||||
value: 'yun', |
||||
label: '云创' |
||||
}, |
||||
{ |
||||
value: 'pm', |
||||
label: 'PM管理系统' |
||||
} |
||||
], |
||||
selectedOption: '', //被选中的选项 |
||||
picList: [], //图片列表 |
||||
popoverShow: false, |
||||
groupForm: { //创建分组 |
||||
name: '' |
||||
}, |
||||
// 规则 |
||||
groupRule: { |
||||
name: [{ |
||||
required: true, |
||||
message: '请输入分组名称', |
||||
trigger: ['blur', 'change'] |
||||
}, |
||||
{ |
||||
min: 1, |
||||
max: 5, |
||||
message: '长度在 1 到 5 个字符', |
||||
trigger: ['blur', 'change'] |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
methods: { |
||||
// 表单打开 |
||||
open: function () { |
||||
this.isShow = true; |
||||
}, |
||||
// 图片刚加载完 |
||||
handlePreview: function () { |
||||
|
||||
}, |
||||
// 图片删除 |
||||
handleRemove: function () { |
||||
|
||||
}, |
||||
saveGroup: function () { |
||||
var that = this; |
||||
that.$refs.groupForm.validate(function (pass, object) { |
||||
if (pass) { |
||||
// 校验成功 |
||||
} |
||||
}) |
||||
}, |
||||
cancel: function () { |
||||
this.popoverShow = false |
||||
this.$refs.groupForm.resetFields() |
||||
}, |
||||
|
||||
}, |
||||
}) |
||||
</script> |
||||
@ -1,152 +0,0 @@ |
||||
<!-- 消息回复 && 关注回复 --> |
||||
<link rel="stylesheet" href="../../../../static/mweixin/css/message-reply.css"> |
||||
<div id="message-reply" class="ms-message-reply ms-weixin-content" v-if="menuVue.menuActive == '消息回复'||menuVue.menuActive == '关注时回复'"> |
||||
<el-container class="ms-admin-message-reply"> |
||||
<el-header class="ms-header" height="50px"> |
||||
<el-row> |
||||
<el-button class="ms-fr" size="small" icon="el-icon-refresh">重置</el-button> |
||||
<el-button type="success" class="ms-fr" size="small" icon="el-icon-tickets">保存</el-button> |
||||
</el-row> |
||||
</el-header> |
||||
<el-container> |
||||
<el-header class="ms-tr ms-header"> |
||||
<el-input size="medium" placeholder="请输入内容" suffix-icon="el-icon-search"> |
||||
</el-input> |
||||
</el-header> |
||||
<em-main class="ms-container"> |
||||
<div>回复内容</div> |
||||
<el-tabs v-model="activeName" @tab-click="" class="message-reply-tabs"> |
||||
<el-tab-pane label="文字" name="text"> |
||||
<el-form ref="messageReplyForm" :rules='messageReplyFormRules' :model="messageReplyForm"> |
||||
<el-form-item class="ms-message-reply-content"> |
||||
<el-input type="textarea" v-model="messageReplyForm.reply" :autosize="{ minRows: 4, maxRows: 4}" resize='none'> |
||||
</el-input> |
||||
<i class="el-icon-delete" @click="messageReplyForm.reply = ''"></i> |
||||
<div class="footer"> |
||||
<i class="el-icon-star-off"></i> |
||||
<!-- 插入超链接 --> |
||||
<el-popover placement="top-start" width="350" trigger="click" v-model='popoverShow'> |
||||
<el-form label-width="81px" :model="hyperlinkForm" ref="hyperlinkForm" :rules='hyperlinkRule'> |
||||
<el-form-item label="文本内容" prop='text'> |
||||
<el-input v-model="hyperlinkForm.text" size='mini'></el-input> |
||||
</el-form-item> |
||||
<el-form-item label="链接地址" prop='link'> |
||||
<el-input v-model="hyperlinkForm.link" size='mini'></el-input> |
||||
</el-form-item> |
||||
<el-form-item style="margin:0"> |
||||
<el-row type='flex' justify='end'> |
||||
<el-col span='6'> |
||||
<el-button type="primary" @click="saveLink" size='mini'>保存</el-button> |
||||
</el-col> |
||||
<el-col span='6'> |
||||
<el-button @click="cancelLink" size='mini'>取消</el-button> |
||||
</el-col> |
||||
</el-row> |
||||
</el-form-item> |
||||
</el-form> |
||||
<a slot="reference">插入超链接</a> |
||||
</el-popover> |
||||
</div> |
||||
</el-form-item> |
||||
</el-form> |
||||
</el-form> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="图片" name="picture" class="message-reply-picture"> |
||||
<div onclick="materialBankFormVue.open()"> |
||||
<i class="el-icon-picture-outline"></i> |
||||
<span>从素材库选择</span> |
||||
</div> |
||||
<div onclick="newPicFormVue.open()"> |
||||
<i class="el-icon-plus"></i> |
||||
<span>新建图片</span> |
||||
</div> |
||||
</el-tab-pane> |
||||
<el-tab-pane label="图文" name="article" class="message-reply-article"> |
||||
<div onclick="materialBankFormVue.open()"> |
||||
<i class="el-icon-picture-outline"></i> |
||||
<span>从素材库选择</span> |
||||
</div> |
||||
<div onclick="newPicFormVue.open()"> |
||||
<i class="el-icon-plus"></i> |
||||
<span>新建图文</span> |
||||
</div> |
||||
</el-tab-pane> |
||||
</el-tabs> |
||||
</em-main> |
||||
</el-container> |
||||
</el-container> |
||||
</div> |
||||
<script> |
||||
var messageReplyVue = new Vue({ |
||||
el: "#message-reply", |
||||
data: { |
||||
messageReplyForm: { |
||||
reply: '', |
||||
}, |
||||
messageReplyFormRules: { |
||||
name: [{ |
||||
required: true, |
||||
message: '请输入菜单名称', |
||||
trigger: ['blur', 'change'] |
||||
}, |
||||
{ |
||||
min: 1, |
||||
max: 5, |
||||
message: '长度在 1 到 5 个字符', |
||||
trigger: ['blur', 'change'] |
||||
} |
||||
], |
||||
}, |
||||
activeName: 'text', |
||||
// 超链接 |
||||
hyperlinkForm: { |
||||
text: "", |
||||
link: "", |
||||
}, |
||||
hyperlinkRule: { |
||||
text: [{ |
||||
required: true, |
||||
message: '请输入超链接显示的文本内容', |
||||
trigger: 'blur' |
||||
}, |
||||
{ |
||||
min: 1, |
||||
max: 50, |
||||
message: '长度在 1 到 50 个字符', |
||||
trigger: 'blur' |
||||
} |
||||
], |
||||
link: [{ |
||||
required: true, |
||||
message: '请输入超链接地址', |
||||
trigger: 'change' |
||||
}, { |
||||
validator: function(rule, value, callback) { |
||||
/^(http|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?$/.test(value) ? |
||||
callback() : callback('链接不合法') |
||||
} |
||||
}], |
||||
}, |
||||
popoverShow: false, //弹出层显示与否的状态值 |
||||
}, |
||||
methods: { |
||||
// 保存超链接 |
||||
saveLink: function() { |
||||
var that = this; |
||||
that.$refs.hyperlinkForm.validate(function(boolean, object) { |
||||
if(boolean) { |
||||
// 校验成功 |
||||
that.messageReplyForm.reply = that.messageReplyForm.reply + `<a href=${that.hyperlinkForm.link}>${that.hyperlinkForm.text}</a>` |
||||
that.cancelLink() |
||||
} |
||||
}) |
||||
}, |
||||
// 取消超链接 |
||||
cancelLink: function() { |
||||
this.$refs.hyperlinkForm.resetFields(); |
||||
this.popoverShow = false |
||||
}, |
||||
} |
||||
|
||||
}) |
||||
</script> |
||||
@ -1,116 +0,0 @@ |
||||
<!--图文素材页--> |
||||
<link rel="stylesheet" href="../../../static/mweixin/css/material-list.css"> |
||||
<div id="material-list-vue" v-if="menuVue.menuActive == '图文'" class="ms-weixin-content"> |
||||
<el-container> |
||||
<!--右侧头部--> |
||||
<el-header class="ms-header" height="50px"> |
||||
<el-row> |
||||
<el-button type="primary" size="small" icon="el-icon-plus" onclick="articleVue.open()">添加</el-button> |
||||
<el-button class="ms-fr" size="small" icon="el-icon-refresh">刷新</el-button> |
||||
<el-button class="ms-fr" size="small" @click='sync'>同步微信素材</el-button> |
||||
</el-row> |
||||
</el-header> |
||||
<el-container> |
||||
<!--内容头部--> |
||||
<el-header class="ms-tr ms-header ms-header-select"> |
||||
<el-select v-model="value1" placeholder="请选择" size="small"> |
||||
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select v-model="value2" placeholder="请选择" size="small"> |
||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-button type="primary" icon="el-icon-search" size="small" @click='search'>查询</el-button> |
||||
</el-header> |
||||
<!--素材列表--> |
||||
<el-main class="ms-admin-material-list"> |
||||
<div class="ms-admin-material-item" v-for="(material,index) in materialList" :key='index'> |
||||
<div class="head"> |
||||
<span v-text="'更新于'+formmateTime(material.newsDateTime)"></span> |
||||
<i class="iconfont icon-weixin" v-if='material.newsIsSyn'></i> |
||||
</div> |
||||
<div class="body"> |
||||
<span v-text="material.newsArticle.basicTitle"></span> |
||||
<img :src="material.newsArticle.basicThumbnails || ms.base+'/WEB-INF/manager/images/data/ms-bg_1.jpg'" /> |
||||
<p v-text="material.newsArticle.basicDescription"></p> |
||||
</div> |
||||
<div class="footer"> |
||||
<i class="el-icon-edit" @click="articleVue.open(material)"></i> |
||||
<em></em> |
||||
<i class="el-icon-delete" @click='del(material,index)'></i> |
||||
</div> |
||||
</div> |
||||
</el-main> |
||||
</el-container> |
||||
</el-container> |
||||
</div> |
||||
|
||||
<script> |
||||
var materialListVue = new Vue({ |
||||
el: "#material-list-vue", |
||||
data: { |
||||
options1: [{ |
||||
value: '全部图片', |
||||
label: '全部图片' |
||||
}], |
||||
options2: [{ |
||||
value: '全部图片', |
||||
label: '全部图片' |
||||
}], |
||||
value1: '全部图片', |
||||
value2: '', |
||||
materialList: [], |
||||
}, |
||||
methods: { |
||||
// 获取微信素材 |
||||
newsList: function () { |
||||
var that = this; |
||||
ms.http.get(ms.manager + "/weixin/news/list.do") |
||||
.then(function (res) { |
||||
that.materialList = res.rows |
||||
console.log('微信', res); |
||||
}, function (err) { |
||||
that.$message.error(err) |
||||
}) |
||||
}, |
||||
// 删除 |
||||
del: function (material,index) { |
||||
var that = this; |
||||
ms.http.post(ms.manager + "/weixin/news/"+material.newsId+"/delete.do") |
||||
.then(function (res) { |
||||
if(res.result){ |
||||
that.$message.success('素材删除成功'); |
||||
that.materialList.splice(index,1); |
||||
} |
||||
}, function (err) { |
||||
that.$message.error(err); |
||||
}) |
||||
}, |
||||
// 同步微信素材 |
||||
sync: function () { |
||||
|
||||
}, |
||||
// 刷新图文素材 |
||||
refresh: function () { |
||||
|
||||
}, |
||||
// 查询 |
||||
search: function () { |
||||
|
||||
}, |
||||
// 格式化时间 |
||||
formmateTime: function (time) { |
||||
var updateTime = /^[0-9]{4}-[0-9]{2}-[0-9]{2}/.exec(time) |
||||
if (updateTime != null) { |
||||
return updateTime[0] |
||||
} |
||||
} |
||||
}, |
||||
mounted: function () { |
||||
var that = this; |
||||
// 微信图文素材 |
||||
that.newsList(); |
||||
} |
||||
}) |
||||
</script> |
||||
@ -1,100 +0,0 @@ |
||||
<!--图片素材页--> |
||||
<link rel="stylesheet" href="../../../static/mweixin/css/picture-list.css"> |
||||
<div id="picture-list-vue" v-if="menuVue.menuActive == '图片'" class="ms-weixin-content"> |
||||
<el-container class="ms-admin-picture"> |
||||
<!--右侧头部--> |
||||
<el-header class="ms-header" height="50px"> |
||||
<el-row> |
||||
<el-button type="primary" size="small" icon="el-icon-plus">添加</el-button> |
||||
<el-button size="small" icon="el-icon-refresh" class="ms-fr">刷新</el-button> |
||||
<el-button size="small" class="ms-fr">同步微信素材</el-button> |
||||
</el-row> |
||||
</el-header> |
||||
<el-container> |
||||
<!--内容头部--> |
||||
<el-header class="ms-tr ms-header ms-header-select"> |
||||
<el-select v-model="value1" placeholder="请选择" size="small"> |
||||
<el-option v-for="item in options1" :key="item.value" :label="item.label" :value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-select v-model="value2" placeholder="请选择" size="small"> |
||||
<el-option v-for="item in options2" :key="item.value" :label="item.label" :value="item.value"> |
||||
</el-option> |
||||
</el-select> |
||||
<el-button type="primary" icon="el-icon-search" size="small">查询</el-button> |
||||
</el-header> |
||||
<!--素材列表--> |
||||
<el-main class="ms-admin-picture-list"> |
||||
<el-container> |
||||
<el-aside class="ms-admin-picture-item"> |
||||
<div v-for="picture in pictureList"> |
||||
<div class="body"> |
||||
<img :src="picture.img" /> |
||||
<div> |
||||
<input type="checkbox" /> |
||||
<span v-text="picture.title"></span> |
||||
</div> |
||||
</div> |
||||
<div class="footer"> |
||||
<i class="el-icon-edit"></i> |
||||
<em></em> |
||||
<i class="el-icon-download"></i> |
||||
<em></em> |
||||
<i class="el-icon-delete"></i> |
||||
</div> |
||||
</div> |
||||
</el-aside> |
||||
<el-main class="ms-admin-picture-show"> |
||||
<span>全部图片(6)</span> |
||||
<div> |
||||
<span>小米(1)</span> |
||||
<i class="el-icon-edit"></i> |
||||
<i class="el-icon-delete"></i> |
||||
</div> |
||||
<div> |
||||
<span>小米(1)</span> |
||||
<i class="el-icon-edit"></i> |
||||
<i class="el-icon-delete"></i> |
||||
</div> |
||||
<p> |
||||
<i class="el-icon-plus"></i>新建分组</p> |
||||
</el-main> |
||||
</el-container> |
||||
|
||||
</el-main> |
||||
</el-container> |
||||
</el-container> |
||||
</div> |
||||
|
||||
<script> |
||||
new Vue({ |
||||
el: "#picture-list-vue", |
||||
data: { |
||||
options1: [{ |
||||
value: '全部图片', |
||||
label: '全部图片' |
||||
}], |
||||
options2: [{ |
||||
value: '全部图片', |
||||
label: '全部图片' |
||||
}], |
||||
value1: '全部图片', |
||||
value2: '', |
||||
pictureList: [{ |
||||
date: '12月27日', |
||||
title: 'HUAWEI Mate 20 6GB+64GB 全网最低价...', |
||||
img: '../images/data/ms-bg_1.jpg', |
||||
det: '传播名HUAWEI Mate 20 6GB+64GB 全网最低价,后置摄像头后置莱卡散射,12000万亿像素(光脚,1/1.6光圈)+1200万像素(超广角),......' |
||||
}, |
||||
{ |
||||
date: '12月27日', |
||||
title: 'HUAWEI Mate 20 6GB+64GB 全网最低价...', |
||||
img: '../images/data/ms-bg_1.jpg', |
||||
det: '传播名HUAWEI Mate 20 6GB+64GB 全网最低价,后置摄像头后置莱卡散射,12000万亿像素(光脚,1/1.6光圈)+1200万像素(超广角),......' |
||||
} |
||||
], |
||||
}, |
||||
methods: {}, |
||||
mounted: function () {} |
||||
}) |
||||
</script> |
||||
@ -1,24 +0,0 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
|
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title></title> |
||||
<!-- <#include "/include/head-file.ftl"/> --> |
||||
<!--#include virtual="../include/head-file.ftl" --> |
||||
</head> |
||||
|
||||
<body> |
||||
<!--#include virtual="menu.ftl" --> |
||||
<!--#include virtual="metarial/index.ftl" --> |
||||
<!--#include virtual="metarial/form.ftl" --> |
||||
<!--#include virtual="picture/index.ftl" --> |
||||
<!--#include virtual="keyword/index.ftl" --> |
||||
<!--#include virtual="keyword/form.ftl" --> |
||||
<!--#include virtual="menu/index.ftl" --> |
||||
<!--#include virtual="menu/new-pic-form.ftl" --> |
||||
<!--#include virtual="menu/material-bank-form.ftl" --> |
||||
<!--#include virtual="message/index.ftl" --> |
||||
</body> |
||||
|
||||
</html> |
||||
Loading…
Reference in new issue