This commit is contained in:
liuye
2023-06-09 14:46:46 +08:00
5 changed files with 41 additions and 141 deletions

View File

@@ -110,6 +110,7 @@ export default {
{label: "姓名", slot: "name"},
{label: "手机号", prop: "phone", align: 'center'},
{label: "所属单位", prop: "unitName", align: 'center'},
{label: "公众号", prop: "wxMpNames", align: 'center'},
{label: "角色", prop: "roleName", align: 'center'},
{slot: "options"}
]
@@ -158,7 +159,7 @@ export default {
chooseWechat (id) {
this.form.userId = id
this.instance.post(`/sysuserwxmp/list?size=1000&userId=${id}`).then(res => {
this.instance.post(`/api/sysuserwxmp/list?size=1000&userId=${id}`).then(res => {
if (res.code == 0) {
this.form.appids = res.data.records.map(v => v.appId)
}
@@ -168,7 +169,7 @@ export default {
},
getWechatList () {
this.instance.post(`/wxmpconfig/list?size=1000`).then(res => {
this.instance.post(`/api/wxmpconfig/list?size=1000`).then(res => {
if (res.code == 0) {
this.wechatList = res.data.records.map(v => {
return {
@@ -182,7 +183,7 @@ export default {
onConfirm () {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/sysuserwxmp/addOrUpdate`, {
this.instance.post(`/api/sysuserwxmp/addOrUpdate`, {
...this.form
}).then(res => {
if (res.code == 0) {

View File

@@ -1,123 +0,0 @@
<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>

View File

@@ -58,7 +58,7 @@
<el-form-item label="收益率" style="width: 100%" prop="yield" :rules="[{required: true, message: '请输入收益率', trigger: 'blur'}]">
<el-input-number :precision="2" size="small" type="input" v-model="form.yield" :min="0" placeholder="请输入"></el-input-number>
</el-form-item>
<el-form-item label="备注" style="width: 100%" prop="notes" :rules="[{required: true, message: '请输入备注', trigger: 'blur'}]">
<el-form-item label="备注" style="width: 100%" prop="notes">
<el-input v-model="form.notes" type="textarea" :rows="3" size="small" placeholder="请输入备注"></el-input>
</el-form-item>
</el-form>
@@ -126,7 +126,7 @@
methods: {
getList () {
this.instance.post(`/wxmpconfig/list`, null, {
this.instance.post(`/api/wxmpconfig/list`, null, {
params: {
...this.search
}
@@ -168,7 +168,7 @@
onAmountConfirm () {
this.$refs.amountForm.validate((valid) => {
if (valid) {
this.instance.post(`/wxmpconfig/updateSettledAmount`, null, {
this.instance.post(`/api/wxmpconfig/updateSettledAmount`, null, {
params: {
...this.amountForm,
id: this.id
@@ -188,7 +188,7 @@
onConfirm () {
this.$refs.form.validate((valid) => {
if (valid) {
this.instance.post(`/wxmpconfig/addOrUpdate`, {
this.instance.post(`/api/wxmpconfig/addOrUpdate`, {
...this.form,
id: this.id || ''
}).then(res => {
@@ -205,7 +205,7 @@
remove (id) {
this.$confirm('删除后不可恢复,确定删除该数据?').then(() => {
this.instance.post(`/wxmpconfig/delete?ids=${id}`).then(res => {
this.instance.post(`/api/wxmpconfig/delete?ids=${id}`).then(res => {
if (res.code == 0) {
this.$message.success('删除成功!')
this.getList()

View File

@@ -49,10 +49,19 @@
</div>
<div class="statistics-top__item">
<span>已结算金额</span>
<h2 style="color: #22AA99;">{{ info['已结算金额'] ? (info['已结算金额'] / 100).toFixed(2) : 0 }}</h2>
<h2 style="color: #22AA99;">{{ info['已结算金额'] || 0 }}</h2>
</div>
</div>
<ai-card title="每日收益明细">
<template #right>
<ai-download
:instance="instance"
url="/api/wxmppublisheradposgeneral/export"
:params="params" fileName="每日收益明细"
:disabled="tableData.length == 0">
<el-button icon="iconfont iconExported" :disabled="tableData.length == 0">导出</el-button>
</ai-download>
</template>
<ai-table
:tableData="tableData"
:col-configs="colConfigs"
@@ -92,20 +101,33 @@
wechatList: [],
colConfigs: [
{ prop: 'ymd', label: '日期' },
{ prop: 'adSlot', label: '广告位类型', align: 'center', format: v => this.dict.getLabel('ad_slot', v) },
{ prop: 'reqSuccCount', label: '拉取量', align: 'center' },
{ prop: 'exposureCount', label: '曝光量', align: 'center' },
{ prop: 'exposureRate', label: '曝光率', align: 'center', format: v => (v * 100).toFixed(2) + '%' },
{ prop: 'clickCount', label: '点击量', align: 'center' },
{ prop: 'clickRate', label: '点击率', align: 'center', format: v => (v * 100).toFixed(2) + '%' },
{ prop: 'ecpm', label: 'eCPM', align: 'center', format: v => v.toFixed(2) },
{ prop: 'income', label: '收入(元)', align: 'center', format: v => v.toFixed(2) }
{ prop: 'ecpm', label: 'eCPM', align: 'center', format: v => (v / 100).toFixed(2) },
{ prop: 'income', label: '收入(元)', align: 'center', format: v => (v / 100).toFixed(2) }
]
}
},
computed: {
params () {
return {
...this.search,
startTime: this.search.type === '3' ? this.date[0] : '',
endTime: this.search.type === '3' ? this.date[1] : ''
}
}
},
created () {
this.getInfo()
this.getWechatList()
this.dict.load('ad_slot').then(() => {
this.getWechatList()
})
},
methods: {
@@ -120,7 +142,7 @@
},
getInfo () {
this.instance.post(`wxmppublisheradposgeneral/statistics`, null, {
this.instance.post(`/api/wxmppublisheradposgeneral/statistics`, null, {
params: {
...this.search,
startTime: this.search.type === '3' ? this.date[0] : '',
@@ -128,7 +150,7 @@
}
}).then(res => {
if (res.code === 0) {
this.info = res.data
this.info = res.data || {}
this.getList()
}
@@ -136,7 +158,7 @@
},
getList () {
this.instance.post(`/wxmppublisheradposgeneral/list`, null, {
this.instance.post(`/api/wxmppublisheradposgeneral/list`, null, {
params: {
...this.search,
startTime: this.search.type === '3' ? this.date[0] : '',
@@ -151,9 +173,9 @@
},
getWechatList () {
this.instance.post(`/wxmpconfig/list?size=1000`).then(res => {
this.instance.post(`/api/wxmpconfig/queryMyAppids`).then(res => {
if (res.code == 0) {
this.wechatList = res.data.records.map(v => {
this.wechatList = res.data.map(v => {
return {
dictValue: v.appId,
dictName: v.mpName