学习问答

This commit is contained in:
liuye
2023-01-11 10:59:56 +08:00
parent ee7f70734b
commit 894f3b7952
3 changed files with 12 additions and 13 deletions

View File

@@ -5,8 +5,8 @@
</ai-title>
</template>
<template slot="content">
<ai-card title="基层治理需要关注什么?">
<div slot="right" class="right-text">{{info.createUserName}}发布于{{info.createTime}} <span>已有{{info.answerCount}}个回答</span></div>
<ai-card :title="info.content">
<div slot="right" class="right-text">{{info.createUserName}}发布于{{info.createTime}} <span>已有{{info.answerCount || 0}}个回答</span></div>
<template #content>
<div class="item" v-for="(item, index) in info.answers" :key="index">
<div class="flex">
@@ -20,6 +20,7 @@
<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>

View File

@@ -7,6 +7,11 @@
<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">
<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">
<template slot-scope="{ row }">
<div class="table-options">
@@ -29,9 +34,9 @@ export default {
colConfigs: [
{ slot: 'index', label: '序号'},
{ prop: "content", label: "问题"},
{ prop: "createUserName", label: "提问人员" },
{ prop: "createTime", label: "提问时间" },
{ prop: "answerCount", label: "回答数" },
{ prop: "createUserName", label: "提问人员", width: 200 },
{ prop: "createTime", label: "提问时间", width: 200 },
{ slot: "answerCount" },
{ slot: "options" },
],
page: {