| | |
| | | <template> |
| | | <basic-container> |
| | | <avue-crud :option="option" |
| | | v-model:search="search" |
| | | v-model:page="page" |
| | | v-model="form" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | ref="crud" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad"> |
| | | <avue-crud :option="option" v-model:search="search" v-model:page="page" v-model="form" :table-loading="loading" |
| | | :data="data" :permission="permissionList" :before-open="beforeOpen" ref="crud" @row-update="rowUpdate" |
| | | @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" |
| | | @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
| | | @refresh-change="refreshChange" @on-load="onLoad"> |
| | | <template #menu-left> |
| | | <el-button type="danger" |
| | | icon="el-icon-delete" |
| | | plain |
| | | v-if="permission.evaluateTask_delete" |
| | | @click="handleDelete">删 除 |
| | | <el-button type="primary" icon="el-icon-plus" @click="addParams.visible = true"> |
| | | 添加 |
| | | </el-button> |
| | | <el-button type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | @click="handleExport">导 出 |
| | | <el-button type="danger" icon="el-icon-delete" plain v-if="permission.evaluateTask_delete" @click="handleDelete"> |
| | | 删除 |
| | | </el-button> |
| | | <el-button type="warning" plain icon="el-icon-download" @click="handleExport"> |
| | | 导出 |
| | | </el-button> |
| | | </template> |
| | | <template #menu="{ size, row, index }"> |
| | | <el-button type="primary" text plain icon="el-icon-edit" @click="editDialog(row)"> |
| | | 编辑 |
| | | </el-button> |
| | | <el-button type="primary" text plain icon="el-icon-position" @click="dialogVisible = true"> |
| | | 发布 |
| | | </el-button> |
| | | <el-button type="primary" text plain icon="el-icon-download" @click=""> |
| | | 导出 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | <!-- 发布弹窗 --> |
| | | <el-dialog v-model="dialogVisible" title="发布" width="500px"> |
| | | <el-form :model="publicForm"> |
| | | <el-form-item label="评优评先截止时间:"> |
| | | <el-date-picker v-model="publicForm.publicData" type="datetime" placeholder="请选择截止时间" style="width: 100%;" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | <el-button type="primary" @click="dialogVisible = false">确认</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 新增编辑弹窗 --> |
| | | <addDialog :params="addParams"/> |
| | | </basic-container> |
| | | </template> |
| | | |
| | |
| | | import {dateNow} from "@/utils/date"; |
| | | import NProgress from 'nprogress'; |
| | | import 'nprogress/nprogress.css'; |
| | | import addDialog from "./components/addDialog.vue"; |
| | | |
| | | export default { |
| | | components: { |
| | | addDialog |
| | | }, |
| | | data() { |
| | | return { |
| | | form: {}, |
| | |
| | | }, |
| | | selectionList: [], |
| | | option: option, |
| | | data: [] |
| | | data: [], |
| | | // 发布弹窗 |
| | | dialogVisible: false, |
| | | publicForm: { |
| | | publicData: "" |
| | | }, |
| | | isAddDialogVisible: false, |
| | | addParams: {}, |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | add(row).then(() => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | }); |
| | | console.log(row); |
| | | // add(row).then(() => { |
| | | // this.onLoad(this.page); |
| | | // this.$message({ |
| | | // type: "success", |
| | | // message: "操作成功!" |
| | | // }); |
| | | // done(); |
| | | // }, error => { |
| | | // loading(); |
| | | // window.console.log(error); |
| | | // }); |
| | | }, |
| | | editDialog(row) { |
| | | this.addParams = { |
| | | visible: true, |
| | | title: '编辑', |
| | | addForm: { |
| | | ...row |
| | | } |
| | | } |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | update(row).then(() => { |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |