公众号设置
This commit is contained in:
56
project/oms/apps/AppWechatConfig/AppWechatConfig.vue
Normal file
56
project/oms/apps/AppWechatConfig/AppWechatConfig.vue
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
<template>
|
||||||
|
<div class="AppWechatConfig">
|
||||||
|
<keep-alive :include="['List']">
|
||||||
|
<component
|
||||||
|
ref="component"
|
||||||
|
:is="component"
|
||||||
|
@change="onChange"
|
||||||
|
:params="params"
|
||||||
|
:instance="instance"
|
||||||
|
:dict="dict">
|
||||||
|
</component>
|
||||||
|
</keep-alive>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import List from './components/List'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
label: '公众号设置',
|
||||||
|
name: 'AppWechatConfig',
|
||||||
|
|
||||||
|
components: {
|
||||||
|
List
|
||||||
|
},
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
permissions: Function
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
component: 'List',
|
||||||
|
params: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
onChange(data) {
|
||||||
|
if (data.type === 'List') {
|
||||||
|
this.component = 'List'
|
||||||
|
this.params = data.params
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.AppWechatConfig {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
123
project/oms/apps/AppWechatConfig/components/Detail.vue
Normal file
123
project/oms/apps/AppWechatConfig/components/Detail.vue
Normal file
@@ -0,0 +1,123 @@
|
|||||||
|
<template>
|
||||||
|
<ai-detail>
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||||
|
</ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-card title="问答信息">
|
||||||
|
<template #content>
|
||||||
|
<p class="title">{{info.content}}</p>
|
||||||
|
<div class="title-text">{{info.createUserName}}发布于{{info.createTime}} <span>已有{{info.answerCount || 0}}个回答</span></div>
|
||||||
|
<div class="item" v-for="(item, index) in info.answers" :key="index">
|
||||||
|
<div class="flex">
|
||||||
|
<img :src="item.createUserAvatar" alt="">
|
||||||
|
<div class="user-info">
|
||||||
|
<h3>{{item.createUserName}}</h3>
|
||||||
|
<p>{{item.createUserDeptName}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="content" v-html="item.content"></div>
|
||||||
|
<ai-uploader :instance="instance" disabled v-model="item.files"></ai-uploader>
|
||||||
|
<p class="time"><span>发布于 </span>{{item.createTime}}</p>
|
||||||
|
</div>
|
||||||
|
<ai-empty v-if="!info.answers.length">暂无回答</ai-empty>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
</template>
|
||||||
|
</ai-detail>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'Detail',
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
params: Object
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
info: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.getInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getInfo () {
|
||||||
|
this.instance.post(`/app/applearningquestion/queryDetailById?id=${this.params.id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
if (res.data) {
|
||||||
|
this.info = {...res.data}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancel () {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'List',
|
||||||
|
isRefresh: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.title {
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 44px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
.title-text {
|
||||||
|
color: #999!important;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
font-size: 14px;
|
||||||
|
span {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item {
|
||||||
|
margin-bottom: 32px;
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
.flex {
|
||||||
|
display: flex;
|
||||||
|
img {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
margin-right: 16px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
h3 {
|
||||||
|
line-height: 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 400;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.content {
|
||||||
|
margin: 16px 0;
|
||||||
|
}
|
||||||
|
p {
|
||||||
|
line-height: 30px;
|
||||||
|
color: #999;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.time {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
.img-list {
|
||||||
|
img {
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
margin: 0 8px 8px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.item:nth-last-of-type(1) {
|
||||||
|
border-bottom: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
107
project/oms/apps/AppWechatConfig/components/List.vue
Normal file
107
project/oms/apps/AppWechatConfig/components/List.vue
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<ai-list class="list">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="公众号设置" isShowBottomBorder></ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-search-bar>
|
||||||
|
<template #left>
|
||||||
|
<el-button size="small" type="primary" icon="iconfont iconAdd" @click="isShow = true">新增</el-button>
|
||||||
|
</template>
|
||||||
|
<template #right>
|
||||||
|
<el-input
|
||||||
|
v-model="search.content"
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入公众号名称"
|
||||||
|
clearable
|
||||||
|
v-throttle="() => getList()"
|
||||||
|
@clear="search.content = '', getList()"
|
||||||
|
suffix-icon="iconfont iconSearch">
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</ai-search-bar>
|
||||||
|
<ai-table
|
||||||
|
style="margin-top: 8px;"
|
||||||
|
:tableData="tableData"
|
||||||
|
:col-configs="colConfigs"
|
||||||
|
:total="total"
|
||||||
|
:current.sync="search.current"
|
||||||
|
:size.sync="search.size"
|
||||||
|
@getList="getList">
|
||||||
|
<el-table-column slot="options" label="操作" align="center" fixed="right" width="180">
|
||||||
|
<template slot-scope="{ row }">
|
||||||
|
<div class="table-options">
|
||||||
|
<el-button type="text" @click="remove(row.id)">编辑</el-button>
|
||||||
|
<el-button type="text" @click="remove(row.id)">删除</el-button>
|
||||||
|
<el-button type="text" @click="remove(row.id)">结算金额</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</ai-table>
|
||||||
|
</template>
|
||||||
|
</ai-list>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'List',
|
||||||
|
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
params: Object
|
||||||
|
},
|
||||||
|
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
tableData: [],
|
||||||
|
isShow: false,
|
||||||
|
colConfigs: [
|
||||||
|
{ prop: 'content', label: '公众号名称' },
|
||||||
|
{ prop: 'createUserName', label: 'appid', align: 'center' },
|
||||||
|
{ prop: 'createTime', label: 'secret', align: 'center' },
|
||||||
|
{ prop: 'createUserName', label: '收益率', align: 'center' },
|
||||||
|
{ prop: 'createTime', label: '已结算金额(元)', align: 'center' },
|
||||||
|
{ prop: 'createUserName', label: '备注', align: 'center' }
|
||||||
|
],
|
||||||
|
search: {
|
||||||
|
size: 10,
|
||||||
|
current: 1
|
||||||
|
},
|
||||||
|
total: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created () {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
getList () {
|
||||||
|
this.instance.post(`/app/applearningquestion/list`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove (id) {
|
||||||
|
this.$confirm('删除后不可恢复,确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`/app/applearningquestion/deleteQuestion?id=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user