| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo"; |
| | | import {listProject, getProject, delProject, addProject, updateProject} from "@/api/projectEngineering/projectInfo"; |
| | | import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list'; |
| | | import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog'; |
| | | |
| | | import Cookies from "js-cookie"; |
| | | export default { |
| | | dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', |
| | | 'sys_funding_type', 'sys_association_status', 'sys_project_status', 'sys_project_code', |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.removeCookie(); |
| | | this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); |
| | | }, |
| | | handleDetail(row) { |
| | | this.removeCookie(); |
| | | this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); |
| | | }, |
| | | // 新增页面 |
| | | add() { |
| | | this.$router.push({ path: '/projectEngineering/project/projectDetails' }); |
| | | this.removeCookie(); |
| | | this.$router.push({ path: '/projectEngineering/project/ProjectDetails' }); |
| | | }, |
| | | //清理缓存 |
| | | removeCookie() { |
| | | Cookies.remove("projectForm") |
| | | Cookies.remove("investmentForm") |
| | | }, |
| | | // 重置排序的方法 |
| | | handleResetSort() { |
| | |
| | | /** 查询项目管理基础信息列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listInfo(this.queryParams).then(response => { |
| | | listProject(this.queryParams).then(response => { |
| | | this.projectInfoList = response.data; |
| | | this.total = response.total; |
| | | }); |
| | |
| | | this.single = selection.length !== 1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "添加项目管理基础信息"; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getInfo(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "修改项目管理基础信息"; |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addInfo(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |