| | |
| | | <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%"> |
| | | <el-table-column prop="question" label="问题" /> |
| | | <el-table-column prop="answer" label="回答" /> |
| | | <el-table-column prop="attachment" label="附件" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in getUrl(scope.row.attachment)" :key="item.url"> |
| | | <el-link :underline="false" type="primary" :href="'/api/upload/download?url=' + item.url +'&fileName=' + item.name" >{{ item.name }}</el-link> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="状态" prop="status" width="70px"> |
| | | <template slot-scope="{row}"> |
| | | <el-tag :type="row.status !== '启用' ? 'danger' : 'success'"> |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | getUrl(urlJson) { |
| | | return urlJson ? JSON.parse(urlJson) : []; |
| | | }, |
| | | search() { |
| | | this.listLoading = true |
| | | questionAnswerApi.pageList(this.queryParam).then(data => { |