Merge remote-tracking branch 'origin/build' into build

This commit is contained in:
aixianling
2023-01-12 11:11:13 +08:00
4 changed files with 69 additions and 30 deletions

View File

@@ -1,13 +1,14 @@
<template> <template>
<ai-detail> <ai-detail>
<template slot="title"> <template slot="title">
<ai-title title="返回学习回答列表" isShowBack isShowBottomBorder @onBackClick="cancel(false)"> <ai-title title="详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
</ai-title> </ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<ai-card title="基层治理需要关注什么?"> <ai-card title="问答信息">
<div slot="right" class="right-text">{{info.createUserName}}发布于{{info.createTime}} <span>已有{{info.answerCount}}个回答</span></div>
<template #content> <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="item" v-for="(item, index) in info.answers" :key="index">
<div class="flex"> <div class="flex">
<img :src="item.createUserAvatar" alt=""> <img :src="item.createUserAvatar" alt="">
@@ -20,6 +21,7 @@
<ai-uploader :instance="instance" disabled v-model="item.files"></ai-uploader> <ai-uploader :instance="instance" disabled v-model="item.files"></ai-uploader>
<p class="time"><span>发布于 </span>{{item.createTime}}</p> <p class="time"><span>发布于 </span>{{item.createTime}}</p>
</div> </div>
<ai-empty v-if="!info.answers.length">暂无回答</ai-empty>
</template> </template>
</ai-card> </ai-card>
</template> </template>
@@ -63,8 +65,16 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.right-text { .title {
font-size: 22px;
font-weight: 700;
line-height: 44px;
word-break: break-all;
}
.title-text {
color: #999!important; color: #999!important;
margin-bottom: 24px;
font-size: 14px;
span { span {
margin-left: 8px; margin-left: 8px;
} }
@@ -75,14 +85,15 @@
.flex { .flex {
display: flex; display: flex;
img { img {
width: 80px; width: 60px;
height: 80px; height: 60px;
margin-right: 16px; margin-right: 16px;
border-radius: 50%;
} }
h3 { h3 {
line-height: 40px; line-height: 20px;
font-size: 30px; font-size: 20px;
font-weight: 700; font-weight: 400;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }

View File

@@ -4,9 +4,32 @@
<ai-title title="学习问答" isShowBottomBorder></ai-title> <ai-title title="学习问答" isShowBottomBorder></ai-title>
</template> </template>
<template slot="content"> <template slot="content">
<ai-search-bar bottomBorder>
<template #left>
<span class="times">提问时间</span>
<el-date-picker v-model="time" size="small" type="daterange" value-format="yyyy-MM-dd"
range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" @change="getListInit"></el-date-picker>
</template>
<template #right>
<el-input
v-model="search.content"
size="small"
placeholder="请输入问题/提问人员"
clearable
v-throttle="() => {search.current = 1, getList()}"
@clear="search.content = '', getListInit()"
suffix-icon="iconfont iconSearch">
</el-input>
</template>
</ai-search-bar>
<ai-table class="ai-table" :tableData="tableData" :col-configs="colConfigs" :total="page.total" <ai-table class="ai-table" :tableData="tableData" :col-configs="colConfigs" :total="page.total"
:current.sync="page.current" :size.sync="page.size" @getList="getList" :dict="dict"> :current.sync="page.current" :size.sync="page.size" @getList="getList" :dict="dict">
<el-table-column slot="index" type="index" width="100px" label="序号" align="center"></el-table-column> <el-table-column slot="index" type="index" width="100px" label="序号" align="center"></el-table-column>
<el-table-column slot="answerCount" label="回答数" align="center" width="150">
<template slot-scope="{ row }">
<span>{{row.answerCount || 0}}</span>
</template>
</el-table-column>
<el-table-column slot="options" label="操作" align="center" fixed="right" width="200"> <el-table-column slot="options" label="操作" align="center" fixed="right" width="200">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div class="table-options"> <div class="table-options">
@@ -29,9 +52,9 @@ export default {
colConfigs: [ colConfigs: [
{ slot: 'index', label: '序号'}, { slot: 'index', label: '序号'},
{ prop: "content", label: "问题"}, { prop: "content", label: "问题"},
{ prop: "createUserName", label: "提问人员" }, { prop: "createUserName", label: "提问人员", width: 200, align: 'center' },
{ prop: "createTime", label: "提问时间" }, { prop: "createTime", label: "提问时间", width: 200, align: 'center' },
{ prop: "answerCount", label: "回答数" }, { slot: "answerCount" },
{ slot: "options" }, { slot: "options" },
], ],
page: { page: {
@@ -40,11 +63,12 @@ export default {
total: 0 total: 0
}, },
search: { search: {
name: "", content: "",
companyCategory: "", startTime: "",
concernDegree: "" endTime: ""
}, },
id: "" id: "",
time: []
}; };
}, },
created() { created() {
@@ -53,10 +77,21 @@ export default {
}) })
}, },
methods: { methods: {
getListInit() {
this.page.current = 1
this.getList()
},
getList() { getList() {
this.search.startTime = ''
this.search.endTime = ''
if(this.time.length) {
this.search.startTime = this.time[0]
this.search.endTime = this.time[1]
}
this.instance.post(`/app/applearningquestion/list`, null, { this.instance.post(`/app/applearningquestion/list`, null, {
params: { params: {
...this.page, ...this.page,
...this.search
} }
}).then(res => { }).then(res => {
if (res.code == 0) { if (res.code == 0) {
@@ -83,12 +118,6 @@ export default {
}) })
}) })
}, },
reset() {
Object.keys(this.search).forEach(e => {
this.search[e] = ""
})
this.getList()
}
} }
}; };
</script> </script>
@@ -97,5 +126,9 @@ export default {
.list { .list {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
.times {
color: #999;
font-size: 14px;
}
} }
</style> </style>

View File

@@ -212,6 +212,8 @@ export default {
this.getStatistics() this.getStatistics()
this.getGridList() this.getGridList()
this.getRanking() this.getRanking()
this.search.startTime = this.time?.[0]
this.search.endTime = this.time?.[1]
this.getTableData() this.getTableData()
}) })
}, },

View File

@@ -8,25 +8,18 @@
<el-form ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-width="100px"> <el-form ref="ruleForm" :model="dialogInfo" :rules="formRules" size="small" label-width="100px">
<ai-card title="基本信息"> <ai-card title="基本信息">
<template #content> <template #content>
<!-- 首页封面 -->
<el-form-item label="首页封面" prop="imgUrl"> <el-form-item label="首页封面" prop="imgUrl">
<ai-uploader v-model="dialogInfo.imgUrl" :instance="instance" :limit="1"></ai-uploader> <ai-uploader v-model="dialogInfo.imgUrl" :instance="instance" :limit="1"></ai-uploader>
</el-form-item> </el-form-item>
<!-- 活动名称 -->
<el-form-item label="标题" prop="title"> <el-form-item label="标题" prop="title">
<el-input placeholder="请输入标题" :maxlength="30" show-word-limit v-model="dialogInfo.title"></el-input> <el-input placeholder="请输入标题" :maxlength="30" show-word-limit v-model="dialogInfo.title"></el-input>
</el-form-item> </el-form-item>
<!-- 连接类型 -->
<el-form-item label="链接类型" prop="type"> <el-form-item label="链接类型" prop="type">
<ai-select v-model="dialogInfo.type" placeholder="请选择链接类型" <ai-select v-model="dialogInfo.type" placeholder="请选择链接类型" :selectList="$dict.getDict('bannerType')"></ai-select>
:selectList="$dict.getDict('bannerType')"></ai-select>
</el-form-item> </el-form-item>
<el-form-item label="内容" prop="rtf" v-if="dialogInfo.type == 3"> <el-form-item label="内容" prop="rtf" v-if="dialogInfo.type == 3">
<ai-editor v-model="dialogInfo.rtf" :instance="instance" /> <ai-editor v-model="dialogInfo.rtf" :instance="instance" />
</el-form-item> </el-form-item>
<!-- 链接 -->
<el-form-item label="链接" prop="linkUrl" v-else> <el-form-item label="链接" prop="linkUrl" v-else>
<el-input placeholder="请输入链接" v-model="dialogInfo.linkUrl"></el-input> <el-input placeholder="请输入链接" v-model="dialogInfo.linkUrl"></el-input>
</el-form-item> </el-form-item>