| | |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" size="mini" @click="proposalChange">新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" size="mini" @click="handleDelete">批量删除</el-button> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | |
| | | height="580px"> |
| | | <el-table-column type="selection" width="40" align="center" /> |
| | | <el-table-column label="序号" width="70" align="center" prop="newID" /> |
| | | <el-table-column label="用户名" width="70" align="center" prop="userName" /> |
| | | <el-table-column label="标题" width="120" align="center" prop="title" /> |
| | | <el-table-column label="建议内容" align="left" prop="advice" /> |
| | | <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="100px"> |
| | |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body :close-on-click-modal="false"> |
| | | <el-form ref="form" :model="form" label-width="80px" :inline="true"> |
| | | <el-form-item label="标题" prop="title"> |
| | | <el-input v-model="form.title" placeholder="请输入标题" style="width: 200px" /> |
| | | <el-input v-model="form.title" placeholder="请输入标题" style="width: 780px" /> |
| | | </el-form-item> |
| | | <el-form-item label="内容" prop="advice"> |
| | | <el-input v-model="form.advice" type="textarea" placeholder="请输入主要内容" style="width: 780px" /> |
| | | <el-input v-model="form.advice" type="textarea" :rows="20" placeholder="请输入主要内容" style="width: 780px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | updateAdvice, |
| | | addAdvice, |
| | | getAdvice, |
| | | delAdvice |
| | | delAdvice, |
| | | delCyremove |
| | | } from "@/api/advice/advice"; |
| | | import { |
| | | addCyTjAdvice, |
| | |
| | | this.reset(); |
| | | }, |
| | | proposalChange() { |
| | | this.reset(); |
| | | this.open = true; |
| | | }, |
| | | // 表单重置 |
| | |
| | | const id = row.id || this.ids; |
| | | this.kjbq = []; |
| | | getAdvice(id).then((response) => { |
| | | console.log(response, 55566); |
| | | this.form = response.data; |
| | | this.open = true; |
| | | // this.form.deptId = this.queryParams.deptId; |
| | |
| | | }); |
| | | }, |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; // 获取主键值,如果row中没有主键值,则使用this.ids |
| | | let idss = this.ids + '' |
| | | const ids = row.id || idss; // 获取主键值,如果row中没有主键值,则使用this.ids |
| | | this.$modal |
| | | .confirm(`是否确认删除"${ids}"的数据项?`) |
| | | .then(() => { |
| | | return delAdvice(ids); // 调用删除接口,传入主键值 |
| | | return delCyremove(ids); // 调用删除接口,传入主键值 |
| | | }) |
| | | .then(() => { |
| | | this.getList(); // 删除成功后刷新列表 |