| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | > |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="标题" prop="bt"> |
| | | <el-input |
| | | v-model="queryParams.bt" |
| | | placeholder="请输入标题" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-input v-model="queryParams.bt" placeholder="请输入标题" clearable @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | <el-form-item label="建议" prop="nr"> |
| | | <el-input |
| | | v-model="queryParams.nr" |
| | | placeholder="请输入检查项目" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | <el-input v-model="queryParams.nr" placeholder="请输入检查项目" clearable @keyup.enter.native="handleQuery" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >搜索</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >重置</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-table |
| | | :data="dataList" |
| | | ref="elTable" |
| | | v-loading="loading" |
| | | @selection-change="handleSelectionChange" |
| | | border |
| | | height="580px" |
| | | > |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" size="mini" @click="proposalChange">新增</el-button> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | | |
| | | <el-table :data="dataList" ref="elTable" v-loading="loading" @selection-change="handleSelectionChange" border |
| | | 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="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-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width" width="100px"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleEdit(scope.row)" |
| | | title="修改" |
| | | ></el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | title="删除" |
| | | ></el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleEdit(scope.row)" title="修改"></el-button> |
| | | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" |
| | | title="删除"></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="queryParams.page" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" /> |
| | | |
| | | <!-- 修改快速建议标题和内容 --> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | append-to-body |
| | | :close-on-click-modal="false" |
| | | > |
| | | <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: 200px" /> |
| | | </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" placeholder="请输入主要内容" style="width: 780px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | <script> |
| | | import { |
| | | updateAdvice, |
| | | addAdvice, |
| | | getAdvice, |
| | | delAdvice |
| | | } from "@/api/advice/advice"; |
| | | import { |
| | | addCyTjAdvice, |
| | | } from "@/api/system/biaoqianzidian"; |
| | | import { |
| | | getKjTjAdviceKjbqBySex, |
| | | getCyTjAdviceKjbqBySex, |
| | |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | proposalChange() { |
| | | this.open = true; |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addAdvice(this.form).then((response) => { |
| | | // addAdvice(this.form).then((response) => { |
| | | // this.$modal.msgSuccess("新增成功"); |
| | | // this.open = false; |
| | | // this.getList(); |
| | | // }); |
| | | addCyTjAdvice(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
| | | </script> |