|
@@ -39,7 +39,7 @@
|
|
|
<el-table row-key="id" :data="textData">
|
|
|
<el-table-column prop="title" label="标题">
|
|
|
<template slot-scope="{row}">
|
|
|
- <el-radio v-model="reply.relateId" :label="row.id">{{ limitString(row.title, 8) }}</el-radio>
|
|
|
+ <el-radio v-model="reply.relateId" :label="row.id" @change="setReplyTitle(row.title)">{{ limitString(row.title, 8) }}</el-radio>
|
|
|
</template>>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="content" label="内容">
|
|
@@ -52,6 +52,10 @@
|
|
|
<el-table-column prop="updateTime" label="最后更新时间" width="100" />
|
|
|
</el-table>
|
|
|
<pagination v-show="textTotal>0" :total="textTotal" :page.sync="textQuery.pageNum" :limit.sync="textQuery.pageSize" @pagination="getTextData" />
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="resetReplyTitle">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="dialogTableVisible = false">确 定</el-button>
|
|
|
+ </div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -143,6 +147,22 @@ export default {
|
|
|
}
|
|
|
return str
|
|
|
},
|
|
|
+ setReplyTitle(title) {
|
|
|
+ this.reply.title = title
|
|
|
+ },
|
|
|
+ resetReplyTitle() {
|
|
|
+ if (this.$route.query.id) {
|
|
|
+ this.reply.id = this.$route.query.id
|
|
|
+ getReply(this.reply.id).then(response => {
|
|
|
+ this.reply.title = response.data.title
|
|
|
+ this.reply.relateId = response.data.relateId
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.reply.title = ''
|
|
|
+ this.reply.relateId = 0
|
|
|
+ }
|
|
|
+ this.dialogTableVisible = false
|
|
|
+ },
|
|
|
resetForm(formName) {
|
|
|
this.$refs[formName].resetFields()
|
|
|
this.reply = Object.assign({}, defaultReply)
|