Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -121,7 +121,7 @@ const loadMore = () => {
|
|||||||
|
|
||||||
const getPage = async (page: any, params: any = null) => {
|
const getPage = async (page: any, params: any = null) => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
let dataTemp = await getMessagePage(
|
const dataTemp = await getMessagePage(
|
||||||
Object.assign(
|
Object.assign(
|
||||||
{
|
{
|
||||||
pageNo: page.pageNo,
|
pageNo: page.pageNo,
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<div class="news-main">
|
<div class="news-main">
|
||||||
<div class="news-content">
|
<div class="news-content">
|
||||||
<el-image
|
<el-image
|
||||||
:src="article.picUrl||article.thumbUrl"
|
:src="article.picUrl || article.thumbUrl"
|
||||||
class="material-img"
|
class="material-img"
|
||||||
style="width: 100%; height: 120px"
|
style="width: 100%; height: 120px"
|
||||||
/>
|
/>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<div class="news-content-item">
|
<div class="news-content-item">
|
||||||
<div class="news-content-item-title">{{ article.title }}</div>
|
<div class="news-content-item-title">{{ article.title }}</div>
|
||||||
<div class="news-content-item-img">
|
<div class="news-content-item-img">
|
||||||
<img :src="article.picUrl||article.thumbUrl" class="material-img" height="100%"/>
|
<img :src="article.picUrl || article.thumbUrl" class="material-img" height="100%" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -106,7 +106,7 @@ watch(
|
|||||||
if (temp) {
|
if (temp) {
|
||||||
reply.value = temp
|
reply.value = temp
|
||||||
} else {
|
} else {
|
||||||
let newData = createEmptyReply(reply)
|
const newData = createEmptyReply(reply)
|
||||||
newData.type = newTab
|
newData.type = newTab
|
||||||
reply.value = newData
|
reply.value = newData
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="waterfall" v-loading="props.loading">
|
<div class="waterfall" v-loading="props.loading">
|
||||||
<template v-for="item in props.list" :key="item.articleId">
|
<template v-for="(item, index) in props.list" :key="index">
|
||||||
<div class="waterfall-item" v-if="item.content && item.content.newsItem">
|
<div class="waterfall-item" v-if="item.content && item.content.newsItem">
|
||||||
<WxNews :articles="item.content.newsItem" />
|
<WxNews :articles="item.content.newsItem" />
|
||||||
<!-- 操作按钮 -->
|
<!-- 操作按钮 -->
|
||||||
|
|||||||
@ -186,7 +186,9 @@ const removeNews = async (index: number) => {
|
|||||||
if (activeNewsIndex.value === index) {
|
if (activeNewsIndex.value === index) {
|
||||||
activeNewsIndex.value = 0
|
activeNewsIndex.value = 0
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch {
|
||||||
|
// empty
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加一个图文
|
// 添加一个图文
|
||||||
|
|||||||
@ -110,7 +110,9 @@ const onBeforeDialogClose = async (onDone: () => {}) => {
|
|||||||
try {
|
try {
|
||||||
await message.confirm('修改内容可能还未保存,确定关闭吗?')
|
await message.confirm('修改内容可能还未保存,确定关闭吗?')
|
||||||
onDone()
|
onDone()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================== 列表查询 ========================
|
// ======================== 列表查询 ========================
|
||||||
@ -179,7 +181,9 @@ const onPublish = async (item: Article) => {
|
|||||||
await MpFreePublishApi.submitFreePublish(accountId.value, mediaId)
|
await MpFreePublishApi.submitFreePublish(accountId.value, mediaId)
|
||||||
message.notifySuccess('发布成功')
|
message.notifySuccess('发布成功')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
@ -190,7 +194,9 @@ const onDelete = async (item: Article) => {
|
|||||||
await MpDraftApi.deleteDraft(accountId.value, mediaId)
|
await MpDraftApi.deleteDraft(accountId.value, mediaId)
|
||||||
message.notifySuccess('删除成功')
|
message.notifySuccess('删除成功')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -97,7 +97,9 @@ const handleDelete = async (item: any) => {
|
|||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@ -101,7 +101,7 @@ const uploadVideoRef = ref<UploadInstance | null>(null)
|
|||||||
const submitVideo = () => {
|
const submitVideo = () => {
|
||||||
uploadFormRef.value?.validate((valid) => {
|
uploadFormRef.value?.validate((valid) => {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
return false
|
return
|
||||||
}
|
}
|
||||||
uploadVideoRef.value?.submit()
|
uploadVideoRef.value?.submit()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -131,7 +131,7 @@ const onParentDragEnd = ({ oldIndex, newIndex }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 使用一个辅助数组来模拟菜单移动,然后找到展开的二级菜单的新下标`newParent`
|
// 使用一个辅助数组来模拟菜单移动,然后找到展开的二级菜单的新下标`newParent`
|
||||||
let positions = new Array<boolean>(menuList.value.length).fill(false)
|
const positions = new Array<boolean>(menuList.value.length).fill(false)
|
||||||
positions[props.parentIndex] = true
|
positions[props.parentIndex] = true
|
||||||
const [out] = positions.splice(oldIndex, 1) // 移出菜单,保存到变量out
|
const [out] = positions.splice(oldIndex, 1) // 移出菜单,保存到变量out
|
||||||
positions.splice(newIndex, 0, out) // 把out变量插入被移出的菜单
|
positions.splice(newIndex, 0, out) // 把out变量插入被移出的菜单
|
||||||
|
|||||||
@ -217,7 +217,9 @@ const onDeleteMenu = async () => {
|
|||||||
activeMenu.value = {}
|
activeMenu.value = {}
|
||||||
showRightPanel.value = false
|
showRightPanel.value = false
|
||||||
activeIndex.value = MENU_NOT_SELECTED
|
activeIndex.value = MENU_NOT_SELECTED
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ======================== 菜单编辑 ========================
|
// ======================== 菜单编辑 ========================
|
||||||
@ -267,7 +269,7 @@ const menuListToBackend = () => {
|
|||||||
// 将前端的 menu,转换成后端接收的 menu
|
// 将前端的 menu,转换成后端接收的 menu
|
||||||
// TODO: @芋艿,需要根据后台API删除不需要的字段
|
// TODO: @芋艿,需要根据后台API删除不需要的字段
|
||||||
const menuToBackend = (menu: any) => {
|
const menuToBackend = (menu: any) => {
|
||||||
let result = {
|
const result = {
|
||||||
...menu,
|
...menu,
|
||||||
children: undefined, // 不处理子节点
|
children: undefined, // 不处理子节点
|
||||||
reply: undefined // 稍后复制
|
reply: undefined // 稍后复制
|
||||||
|
|||||||
@ -99,7 +99,7 @@ const userSummaryOption = reactive({
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '新增用户',
|
name: '新增用户',
|
||||||
type: 'bar',
|
type: 'bar' as const,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
@ -108,7 +108,7 @@ const userSummaryOption = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '取消关注的用户',
|
name: '取消关注的用户',
|
||||||
type: 'bar',
|
type: 'bar' as const,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
@ -122,7 +122,7 @@ const userCumulateOption = reactive({
|
|||||||
data: ['累计用户量']
|
data: ['累计用户量']
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category' as const,
|
||||||
data: [] as any[]
|
data: [] as any[]
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
@ -132,7 +132,7 @@ const userCumulateOption = reactive({
|
|||||||
{
|
{
|
||||||
name: '累计用户量',
|
name: '累计用户量',
|
||||||
data: [] as any[], // 累计用户量的数据
|
data: [] as any[], // 累计用户量的数据
|
||||||
type: 'line',
|
type: 'line' as const,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
@ -156,7 +156,7 @@ const upstreamMessageOption = reactive({
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '用户发送人数',
|
name: '用户发送人数',
|
||||||
type: 'line',
|
type: 'line' as const,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
@ -165,7 +165,7 @@ const upstreamMessageOption = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '用户发送条数',
|
name: '用户发送条数',
|
||||||
type: 'line',
|
type: 'line' as const,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
@ -188,7 +188,7 @@ const interfaceSummaryOption = reactive({
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '被动回复用户消息的次数',
|
name: '被动回复用户消息的次数',
|
||||||
type: 'bar',
|
type: 'bar' as const,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
@ -197,7 +197,7 @@ const interfaceSummaryOption = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '失败次数',
|
name: '失败次数',
|
||||||
type: 'bar',
|
type: 'bar' as const,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
@ -205,7 +205,7 @@ const interfaceSummaryOption = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '最大耗时',
|
name: '最大耗时',
|
||||||
type: 'bar',
|
type: 'bar' as const,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
@ -213,7 +213,7 @@ const interfaceSummaryOption = reactive({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '总耗时',
|
name: '总耗时',
|
||||||
type: 'bar',
|
type: 'bar' as const,
|
||||||
label: {
|
label: {
|
||||||
show: true
|
show: true
|
||||||
},
|
},
|
||||||
@ -282,7 +282,9 @@ const initUserSummaryChart = async () => {
|
|||||||
userSummaryOption.series[1].data[index] = item.cancelUser
|
userSummaryOption.series[1].data[index] = item.cancelUser
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 累计用户数据 */
|
/** 累计用户数据 */
|
||||||
@ -300,7 +302,9 @@ const initUserCumulateChart = async () => {
|
|||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
userCumulateOption.series[0].data[index] = item.cumulateUser
|
userCumulateOption.series[0].data[index] = item.cumulateUser
|
||||||
})
|
})
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 消息概况数据 */
|
/** 消息概况数据 */
|
||||||
@ -320,7 +324,9 @@ const initUpstreamMessageChart = async () => {
|
|||||||
upstreamMessageOption.series[0].data[index] = item.messageUser
|
upstreamMessageOption.series[0].data[index] = item.messageUser
|
||||||
upstreamMessageOption.series[1].data[index] = item.messageCount
|
upstreamMessageOption.series[1].data[index] = item.messageCount
|
||||||
})
|
})
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 接口分析数据 */
|
/** 接口分析数据 */
|
||||||
@ -344,6 +350,8 @@ const interfaceSummaryChart = async () => {
|
|||||||
interfaceSummaryOption.series[2].data[index] = item.maxTimeCost
|
interfaceSummaryOption.series[2].data[index] = item.maxTimeCost
|
||||||
interfaceSummaryOption.series[3].data[index] = item.totalTimeCost
|
interfaceSummaryOption.series[3].data[index] = item.totalTimeCost
|
||||||
})
|
})
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -139,7 +139,9 @@ const handleDelete = async (id: number) => {
|
|||||||
message.success(t('common.delSuccess'))
|
message.success(t('common.delSuccess'))
|
||||||
// 刷新列表
|
// 刷新列表
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 同步操作 */
|
/** 同步操作 */
|
||||||
@ -149,6 +151,8 @@ const handleSync = async () => {
|
|||||||
await MpTagApi.syncTag(queryParams.accountId as number)
|
await MpTagApi.syncTag(queryParams.accountId as number)
|
||||||
message.success('同步标签成功')
|
message.success('同步标签成功')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -54,7 +54,7 @@
|
|||||||
<el-table-column label="用户标识" align="center" prop="openid" width="260" />
|
<el-table-column label="用户标识" align="center" prop="openid" width="260" />
|
||||||
<el-table-column label="用户头像" min-width="80px" prop="headImageUrl">
|
<el-table-column label="用户头像" min-width="80px" prop="headImageUrl">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-avatar :src="scope.row.headImageUrl"/>
|
<el-avatar :src="scope.row.headImageUrl" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="昵称" align="center" prop="nickname" />
|
<el-table-column label="昵称" align="center" prop="nickname" />
|
||||||
@ -176,7 +176,9 @@ const handleSync = async () => {
|
|||||||
await MpUserApi.syncUser(queryParams.accountId)
|
await MpUserApi.syncUser(queryParams.accountId)
|
||||||
message.success('开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询')
|
message.success('开始从微信公众号同步粉丝信息,同步需要一段时间,建议稍后再查询')
|
||||||
await getList()
|
await getList()
|
||||||
} catch {}
|
} catch {
|
||||||
|
//
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 */
|
/** 初始化 */
|
||||||
|
|||||||
Reference in New Issue
Block a user