Merge branch 'master' into dev
New file |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | |
| | | // 获取项目工程分页 |
| | | export const getProjectEngineerings = (params) => { |
| | | return request({ |
| | | url: "/project-engineering/page", |
| | | method: "GET", |
| | | params: params |
| | | }) |
| | | } |
| | | |
| | | // 获取项目工程列表 |
| | | export const getProjectEngineeringList = () => { |
| | | return request({ |
| | | url: "/project-engineering/list", |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id获取项目工程 |
| | | export const getProjectEngineeringById = (params) => { |
| | | return request({ |
| | | url: "/project-engineering/" + params, |
| | | method: "GET" |
| | | }) |
| | | } |
| | | |
| | | // 通过id删除项目工程 |
| | | export const deleteProjectEngineeringById = (params) => { |
| | | return request({ |
| | | url: "/project-engineering/" + params, |
| | | method: "DELETE" |
| | | }) |
| | | } |
| | | |
| | | // 批量删除项目工程 |
| | | export const deleteProjectEngineeringByIds = (params) => { |
| | | return request({ |
| | | url: "/project-engineering/batch", |
| | | method: "DELETE", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 修改项目工程 |
| | | export const editProjectEngineering = (params) => { |
| | | return request({ |
| | | url: "/project-engineering/", |
| | | method: "PUT", |
| | | data: params |
| | | }) |
| | | } |
| | | |
| | | // 添加项目工程 |
| | | export const addProjectEngineering = (params) => { |
| | | return request({ |
| | | url: "/project-engineering/", |
| | | method: "POST", |
| | | data: params |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 全部 |
| | | export function list() { |
| | | return request({ |
| | | url: '/project/info/list', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // 查询项目管理基础信息详细 |
| | | export function getProject(id) { |
| | | return request({ |
| | |
| | | export function saveHiddenList(data){ |
| | | return request({ |
| | | url:'/hidden-admin/updateList', |
| | | method:'put', |
| | | data:data |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | export function addList(data){ |
| | |
| | | }, |
| | | save(){ |
| | | //保存逻辑 |
| | | |
| | | if (this.saveList.length !== 0){ |
| | | saveHiddenList(CircularJSON.stringify(this.saveList)).then(res =>{ |
| | | this.$modal.msgSuccess(res.msg); |
| | | this.$modal.msgSuccess("保存成功"); |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.$router.push({ |
| | | path: '/projectEngineering/project/reserveProjects', |
| | | query: { |
| | | projectCategory: '1' |
| | | projectPhase: '1' |
| | | } |
| | | }); |
| | | break; |
| | |
| | | this.$router.push({ |
| | | path: '/projectEngineering/project/previousProjects', |
| | | query: { |
| | | projectCategory: '2' |
| | | projectPhase: '2' |
| | | } |
| | | }); |
| | | break; |
| | |
| | | this.$router.push({ |
| | | path: '/projectEngineering/project/implementationProject', |
| | | query: { |
| | | projectCategory: '3' |
| | | projectPhase: '3' |
| | | } |
| | | }); |
| | | break; |
| | |
| | | this.$router.push({ |
| | | path: '/projectEngineering/project/completedProjects', |
| | | query: { |
| | | projectCategory: '4' |
| | | projectPhase: '4' |
| | | } |
| | | }); |
| | | break; |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="工程名称" prop="projectName"> |
| | | <el-input |
| | | v-model="queryParams.projectName" |
| | | placeholder="请输入工程名称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="主项目" prop="projectInfoId"> |
| | | <el-row> |
| | | <el-select v-model="queryParams.projectInfoId" filterable clearable style="width: 100%" placeholder="请选择主项目"> |
| | | <el-option |
| | | v-for="item in projectList" |
| | | :key="'pp1' + item.id" |
| | | :label="item.projectName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-form-item label="项目推进类型" label-width="120px" prop="projectType"> |
| | | <el-select v-model="queryParams.projectType" placeholder="请选择项目推进类型" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_project_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请选择状态" clearable> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_project_status" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | /> |
| | | </el-select> |
| | | </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-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['code:engineering:add']" |
| | | >新增</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['code:engineering:edit']" |
| | | >修改</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="deleteByIds" |
| | | v-hasPermi="['code:engineering:remove']" |
| | | >删除</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['code:engineering:export']" |
| | | >导出</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="engineeringList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="工程名称" align="center" prop="projectName" /> |
| | | <el-table-column label="主项目名称" align="center" prop="projectInfoName" /> |
| | | <el-table-column label="项目推进类型" align="center" prop="projectType"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="投资额(万)" align="center" prop="investmentAmount" /> |
| | | <el-table-column label="开工状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_project_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['code:engineering:edit']" |
| | | >修改</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="deleteById(scope.row)" |
| | | v-hasPermi="['code:engineering:remove']" |
| | | >删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.currentPage" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- 添加或修改工程库对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="800px" :close-on-click-modal="false" :destroy-on-close="true" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="工程名称" prop="projectName"> |
| | | <el-input v-model="form.projectName" placeholder="请输入工程名称" /> |
| | | </el-form-item> |
| | | <el-form-item label="主项目" prop="projectInfoId"> |
| | | <el-row> |
| | | <el-select v-model="form.projectInfoId" filterable style="width: 100%" placeholder="请选择主项目"> |
| | | <el-option |
| | | v-for="item in projectList" |
| | | :key="'pp' + item.id" |
| | | :label="item.projectName" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-row> |
| | | </el-form-item> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="投资额(万)" prop="investmentAmount"> |
| | | <el-input v-model="form.investmentAmount" type="number" placeholder="请输入投资额(万元)" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目推进类型" prop="projectType" label-width="100px"> |
| | | <el-select v-model="form.projectType" style="width: 100%" placeholder="请选择项目推进类型"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_project_type" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-form-item label="开工状态" prop="status"> |
| | | <el-select v-model="form.status" placeholder="请选择开工状态"> |
| | | <el-option |
| | | v-for="dict in dict.type.sys_project_status" |
| | | :key="'1111' + dict.value" |
| | | :value="dict.value" |
| | | :label="dict.label" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getProjectEngineerings, getProjectEngineeringById, deleteProjectEngineeringByIds, deleteProjectEngineeringById, editProjectEngineering, addProjectEngineering } from "@/api/projectEngineering/projectEngineering"; |
| | | import {list} from "@/api/projectEngineering/projectInfo"; |
| | | |
| | | export default { |
| | | name: "Engineering", |
| | | dicts: ['sys_project_type', 'sys_project_status'], |
| | | data() { |
| | | return { |
| | | projectList: [], // 主项目列表 |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 工程库表格数据 |
| | | engineeringList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | projectInfoId: null, |
| | | projectName: null, |
| | | projectType: null, |
| | | status: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | projectName: [{required: true, message: '请输入工程名称', trigger: 'blur'}], |
| | | projectInfoId: [{required: true, message: '请选择主项目', trigger: 'change'}], |
| | | investmentAmount: [{required: true, message: '请输入投资额', trigger: 'change'}], |
| | | projectType: [{required: true, message: '请选择流程推进类型', trigger: 'change'}], |
| | | status: [{required: true, message: '请选择开工状态', trigger: 'change'}], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getProjectList(); |
| | | }, |
| | | methods: { |
| | | getProjectList() { |
| | | list().then(res => { |
| | | this.projectList = res.data |
| | | }) |
| | | }, |
| | | /** 查询工程库列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | getProjectEngineerings(this.queryParams).then(res => { |
| | | this.engineeringList = res.data; |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | projectInfoId: null, |
| | | projectName: null, |
| | | projectType: null, |
| | | investmentAmount: null, |
| | | status: null, |
| | | gmtCreate: null, |
| | | gmtUpdate: null, |
| | | deleted: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | 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 |
| | | getProjectEngineeringById(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) { |
| | | editProjectEngineering(this.form).then(response => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addProjectEngineering(this.form).then(response => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | deleteById(row) { |
| | | this.$modal.confirm('是否确认删除选中工程?').then(function() { |
| | | return deleteProjectEngineeringById(row.id); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 删除按钮操作 */ |
| | | deleteByIds() { |
| | | const ids = this.ids; |
| | | this.$modal.confirm('是否确认删除选中工程?').then(function() { |
| | | return deleteProjectEngineeringByIds(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('code/engineering/export', { |
| | | ...this.queryParams |
| | | }, `engineering_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | currentTab: "corporation", |
| | | codeUrl: "", |
| | | loginForm: { |
| | | username: "admin", |
| | | password: "admin123", |
| | | username: "", |
| | | password: "", |
| | | rememberMe: false, |
| | | code: "", |
| | | uuid: "", |
| | |
| | | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="资金类型" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="资金类型" label-width="100px" prop="fundTypeList" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.fundTypeList" |
| | | clearable |
| | |
| | | <!-- </el-col>--> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目状态" label-width="100px" prop="projectstatus" style="width: 100%"> |
| | | <el-form-item label="项目状态" label-width="100px" prop="projectStatus" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectStatus" clearable placeholder="请选择" @change="handleProjectStatusChange" style="width: 100%"> |
| | | <el-option v-for="item in dict.type.sys_project_status" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <!-- TODO:暂时不做 --> |
| | | <el-form-item label="项目业主单位" label-width="100px" prop="engineering" style="width: 100%"> |
| | | <el-form-item label="项目业主单位" label-width="100px" prop="projectOwnerUnit" style="width: 100%"> |
| | | <!-- <el-input v-model.trim="getEngineeringName" class="item" clearable disabled maxlength="255" placeholder="请在工程中选择项目" />--> |
| | | <!-- <el-select v-model="projectForm.engineeringIdList" :multiple="true" collapse-tags placeholder="请选择"--> |
| | | <!-- style="width: 100%">--> |
| | | <!-- <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />--> |
| | | |
| | | <treeselect v-model="projectForm.projectOwnerUnit" :disabled="disabled" :options="selectOptions" noChildrenText="无匹配数据" :normalizer="normalizer" placeholder="选择单位" /> |
| | | <treeselect v-model="projectForm.projectOwnerUnit" :disabled="disabled" :options="selectOptions" @input="getProjectOwnerUnit" noChildrenText="无匹配数据" :normalizer="normalizer" placeholder="选择单位" /> |
| | | <!-- <RemoteSelect v-if="selectOptions.length" :hasMore="hasMore" :loading="loading" :page="page" @loadMore="handleLoadMore" />--> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="主管部门" label-width="100px" prop="competentDepartment" style="width: 100%"> |
| | | <treeselect v-model="projectForm.competentDepartment" :disabled="disabled" @input="getCompetentDepartmentInfo" noChildrenText="无匹配数据" :options="approvalList" :normalizer="normalizer" placeholder="选择单位" /> |
| | | <treeselect v-model="competentDepartment" :disabled="disabled" @input="getCompetentDepartmentInfo" noChildrenText="无匹配数据" :options="approvalList" :normalizer="normalizer" placeholder="选择单位" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="主管部门联系人" label-width="140px" style="width: 100%"> |
| | | <el-form-item label="主管部门联系人" prop="competentDepartmentPerson" label-width="140px" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.competentDepartmentPerson" |
| | | clearable |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="主管部门联系方式" label-width="140px" style="width: 100%"> |
| | | <el-form-item label="主管部门联系方式" prop="competentDepartmentPhone" label-width="140px" style="width: 100%"> |
| | | <el-input |
| | | v-model="projectForm.competentDepartmentPhone" |
| | | clearable |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="管理归口" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="管理归口" prop="managementCentralizationList" label-width="100px" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.managementCentralizationList" |
| | | clearable |
| | |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目审批类型" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="项目审批类型" prop="projectApprovalType" label-width="100px" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.projectApprovalType" |
| | | clearable |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="投资类别" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="投资类别" prop="largeCategory" label-width="100px" style="width: 100%"> |
| | | <el-input v-model="largeCategory" clearable disabled placeholder="请选择大类" style="width: 49%"/> |
| | | <el-input v-model="subclass" clearable disabled placeholder="请选择小类" style="width: 49%;margin-left: 2%"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="重点分类" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="重点分类" prop="importanceTypeList" label-width="100px" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.importanceTypeList" |
| | | :multiple="true" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | |
| | | |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计划开工时间" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="计划开工时间" prop="planStartTime" label-width="100px" style="width: 100%"> |
| | | <el-date-picker v-model="projectForm.planStartTime " |
| | | placeholder="选择时间" |
| | | style="width: 100%" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="计划竣工时间" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="计划竣工时间" prop="planCompleteTime" label-width="100px" style="width: 100%"> |
| | | <el-date-picker v-model="projectForm.planCompleteTime " |
| | | placeholder="选择时间" |
| | | style="width: 100%" |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="行业主管部门" label-width="100px" prop="industryCompetentDepartment" style="width: 100%"> |
| | | <treeselect v-model="projectForm.industryCompetentDepartment" :disabled="disabled" noChildrenText="无匹配数据" @input="getIndustryCompetentDepartmentInfo" :options="approvalList" :normalizer="normalizer" placeholder="选择单位" /> |
| | | <treeselect v-model="industryCompetentDepartment" :disabled="disabled" noChildrenText="无匹配数据" @input="getIndustryCompetentDepartmentInfo" :options="approvalList" :normalizer="normalizer" placeholder="选择单位" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="行业主管部门联系人" label-width="160px" style="width: 100%"> |
| | | <el-form-item label="行业主管部门联系人" prop="industryCompetentDepartmentPerson" label-width="160px" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.industryCompetentDepartmentPerson" |
| | | clearable |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="行业主管部门联系方式" label-width="160px" style="width: 100%"> |
| | | <el-form-item label="行业主管部门联系方式" prop="departmentPersonPhone" label-width="160px" style="width: 100%"> |
| | | <el-input |
| | | v-model="projectForm.departmentPersonPhone" |
| | | clearable |
| | |
| | | <div class="label"> |
| | | <div style="font-size: small;margin-bottom: 10px">中标单位:</div> |
| | | <div> |
| | | <el-row :gutter="20" v-for="(winUnit,index) in projectForm.winUnitList" :key="'zb' + index"> |
| | | <el-col :span="5"> |
| | | <el-form-item label="单位名称" label-width="100px" prop="setTime" style="width: 100%"> |
| | | <el-row :gutter="10" v-for="(winUnit,index) in projectForm.winUnitList" :key="'zb' + index"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="单位名称" label-width="80px" prop="setTime" style="width: 100%"> |
| | | <el-input v-model.trim="winUnit.winUnit" class="item" clearable maxlength="255" placeholder="请输入"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="中标金额" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="中标金额" label-width="80px" style="width: 100%"> |
| | | <el-input v-model.trim="winUnit.winAmount" class="item" clearable maxlength="255" placeholder="请输入" |
| | | type="number"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-form-item label="中标时间" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="中标时间" label-width="80px" style="width: 100%"> |
| | | <el-date-picker v-model="winUnit.winTime" |
| | | placeholder="选择时间" |
| | | style="width: 100%" |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="联系电话" label-width="100px" style="width: 100%"> |
| | | <el-form-item label="联系电话" label-width="80px" style="width: 100%"> |
| | | <el-input v-model.trim="winUnit.phone" class="item" clearable maxlength="20" placeholder="请输入"/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | return { |
| | | tagList: [], |
| | | projectSubTypeList: [], // 项目子类型 |
| | | competentDepartment: '', |
| | | industryCompetentDepartment: '', |
| | | projectForm: { |
| | | id: '', |
| | | projectName: '', |
| | |
| | | mapCreateInfo: {}, |
| | | demoFormRef: null, |
| | | rules: { |
| | | projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}] |
| | | } |
| | | projectName: [{required: true, message: '请输入项目名称', trigger: 'blur'}], |
| | | content: [{required: true, message: '请输入建设内容', trigger: 'blur'}], |
| | | fundTypeList: [{required: true, message: '请选择资金类型', trigger: 'change'}], |
| | | investType: [{required: true, message: '请选择项目投资类别', trigger: 'change'}], |
| | | constructionNature: [{required: true, message: '请选择建设性质', trigger: 'change'}], |
| | | attractInvestment: [{required: true, message: '请选择是否招商引资项目', trigger: 'change'}], |
| | | projectType: [{required: true, message: '请选择项目推进类型', trigger: 'change'}], |
| | | projectStatus: [{required: true, message: '请选择项目状态', trigger: 'change'}], |
| | | projectPhase: [{required: true, message: '请选择项目阶段', trigger: 'change'}], |
| | | projectContactPerson: [{required: true, message: '请输入项目联系人', trigger: 'blur'}], |
| | | contact: [{required: true, message: '请输入项目联系方式', trigger: 'blur'}], |
| | | projectOwnerUnit: [{required: true, message: '请选择项目业主单位', trigger: 'change'}], |
| | | competentDepartment: [{required: true, message: '请选择主管部门', trigger: 'change'}], |
| | | competentDepartmentPerson: [{required: true, message: '请选择主管部门联系人', trigger: 'change'}], |
| | | competentDepartmentPhone: [{required: true, message: '请输入主管部门联系方式', trigger: 'blur'}], |
| | | area: [{required: true, message: '请选择行政区划', trigger: 'change'}], |
| | | managementCentralizationList: [{required: true, message: '请选择管理归口', trigger: 'change'}], |
| | | projectApprovalType: [{required: true, message: '请选择项目审批类型', trigger: 'change'}], |
| | | importanceTypeList: [{required: true, message: '请选择重点分类', trigger: 'change'}], |
| | | planStartTime: [{required: true, message: '请选择计划开工时间', trigger: 'change'}], |
| | | planCompleteTime: [{required: true, message: '请选择计划竣工时间', trigger: 'change'}], |
| | | industryCompetentDepartment: [{required: true, message: '请选择行业主管部门', trigger: 'change'}], |
| | | industryCompetentDepartmentPerson: [{required: true, message: '请输入行业主管部门联系人', trigger: 'blur'}], |
| | | departmentPersonPhone: [{required: true, message: '请输入行业主管部门联系方式', trigger: 'blur'}], |
| | | }, |
| | | needClearPeople: true |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | |
| | | if (projectForm) { |
| | | this.projectForm = JSON.parse(projectForm); |
| | | if (this.projectForm.industryCompetentDepartment) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(this.projectForm.industryCompetentDepartment).then((res) => { |
| | | this.personList = res.data; |
| | | }) |
| | | } |
| | | if (this.projectForm.projectType) { |
| | | // 根据项目类型查子类型 |
| | | getDicts("sys_project_type").then(res => { |
| | |
| | | }) |
| | | } |
| | | this.$emit('updateIsShow', true); |
| | | this.competentDepartment = this.projectForm.competentDepartment |
| | | this.industryCompetentDepartment = this.projectForm.industryCompetentDepartment |
| | | } else { |
| | | this.projectForm.id = this.$route.query.projectId; |
| | | // 在组件创建时获取项目信息,如果 projectId 存在 |
| | |
| | | } |
| | | // this.handleLoadMore(1); |
| | | } |
| | | console.log(this.projectForm, "原始值") |
| | | |
| | | this.$nextTick(() => { |
| | | console.log("设置了") |
| | | this.tagList = this.projectForm.tag ? this.projectForm.tag.split(",") : [] |
| | | console.log(this.tagList) |
| | | }) |
| | | }, |
| | | beforeDestroy() { |
| | | localStorage.setItem("projectForm", JSON.stringify(this.projectForm)); |
| | | }, |
| | | methods: { |
| | | getIndustryCompetentDepartmentPeople(deptId) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(deptId).then((res) => { |
| | | this.personList = res.data; |
| | | this.personList.forEach(item => item.userId += '') |
| | | }) |
| | | }, |
| | | getCompetentDepartmentPeople(deptId) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(deptId).then((res) => { |
| | | this.deptPersonList = res.data; |
| | | this.deptPersonList.forEach(item => item.userId += '') |
| | | }) |
| | | }, |
| | | getTagList(list) { |
| | | console.log("拿到了") |
| | | if (!list || list.length < 1) { |
| | |
| | | }, |
| | | getIndustryCompetentDepartmentInfo(deptId) { |
| | | if (deptId) { |
| | | getByDept(deptId).then((res) => { |
| | | this.personList = res.data; |
| | | }) |
| | | if (this.projectForm.industryCompetentDepartment != deptId) { |
| | | this.projectForm.industryCompetentDepartmentPerson = "" |
| | | this.projectForm.departmentPersonPhone = "" |
| | | } |
| | | this.projectForm.industryCompetentDepartment = deptId |
| | | this.getIndustryCompetentDepartmentPeople(deptId) |
| | | } else { |
| | | this.projectForm.industryCompetentDepartment = '' |
| | | this.personList = []; |
| | | } |
| | | }, |
| | | getProjectOwnerUnit(deptId) { |
| | | if (deptId) { |
| | | this.projectForm.projectOwnerUnit = deptId |
| | | } else { |
| | | this.projectForm.projectOwnerUnit = '' |
| | | } |
| | | }, |
| | | getCompetentDepartmentInfo(deptId) { |
| | | if (deptId) { |
| | | getByDept(deptId).then((res) => { |
| | | this.deptPersonList = res.data; |
| | | }) |
| | | if (this.projectForm.competentDepartment != deptId) { |
| | | this.projectForm.competentDepartmentPerson = "" |
| | | this.projectForm.competentDepartmentPhone = "" |
| | | } |
| | | this.projectForm.competentDepartment = deptId |
| | | this.getCompetentDepartmentPeople(deptId) |
| | | } else { |
| | | this.projectForm.competentDepartment = '' |
| | | this.deptPersonList = []; |
| | | } |
| | | }, |
| | | handleDepartmentChange(departmentId) { |
| | | if (departmentId) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(departmentId).then((res) => { |
| | | this.personList = res.data; |
| | | }) |
| | | this.getIndustryCompetentDepartmentPeople(departmentId) |
| | | } else { |
| | | // 如果未选择部门,清空人员列表 |
| | | this.personList = []; |
| | |
| | | this.tagList = this.projectForm.tag ? this.projectForm.tag.split(",") : [] |
| | | console.log(this.tagList) |
| | | }) |
| | | this.competentDepartment = this.projectForm.competentDepartment |
| | | this.industryCompetentDepartment = this.projectForm.industryCompetentDepartment |
| | | }); |
| | | }, |
| | | getApprovalList() { |
| | | approvalList().then(res => { |
| | | this.approvalList = this.handleTree(res.data, "deptId");; |
| | | this.approvalList = this.handleTree(res.data, "deptId"); |
| | | this.approvalList.push({deptId: '', deptName: '无', children: []}) |
| | | }); |
| | | }, |
| | | getDeptList(){ |
| | | listDept().then(response => { |
| | | console.log(response.data) |
| | | |
| | | this.selectOptions = this.handleTree(response.data, "deptId"); |
| | | this.selectOptions.push({deptId: '', deptName: '无', children: []}) |
| | | }); |
| | | }, |
| | | |
| | |
| | | <template> |
| | | <div class="basic-info"> |
| | | <el-form ref="demoFormRef" :disabled="disabled" :model="investmentFundsForm" class="dialog_form"> |
| | | <el-form ref="demoFormRef" :disabled="disabled" :model="investmentFundsForm" :rules="rules" class="dialog_form"> |
| | | <!-- 保持原有模板内容不变 --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目总投资额" label-width="130px" prop="fundsType" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.totalInvestment" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-form-item label="项目总投资额" label-width="130px" prop="totalInvestment" required style="width: 100%"> |
| | | <el-input v-model.trim="totalInvestment" class="item" clearable disabled style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="18"> |
| | | <el-form-item label="(一)中央投资" label-width="130px" prop="projectType" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.centralInvestmentTotal" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-input v-model.trim="centralInvestmentTotal" class="item" clearable disabled style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="18"> |
| | | <el-form-item label="(二)省级投资" label-width="130px" prop="engineering" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.provincialInvestmentTotal" class="item" clearable style="width: 90%" |
| | | maxlength="255" placeholder="请输入"/> |
| | | <el-input v-model.trim="provincialInvestmentTotal" class="item" clearable disabled style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="18"> |
| | | <el-form-item label="(三)市(州)投资" label-width="130px" prop="engineering" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.cityInvestmentTotal" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-input v-model.trim="cityInvestmentTotal" class="item" clearable disabled style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="18"> |
| | | <el-form-item label="(四)县(市、区)投资" label-width="130px" prop="engineering" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.countyInvestmentTotal" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-input v-model.trim="countyInvestmentTotal" class="item" disabled style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="1.区(县)预算内投资" label-width="180px" prop="fundsType" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.countyBudgetInvestment" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-input v-model.trim="investmentFundsForm.countyBudgetInvestment" class="item" clearable style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="2.区(县)财政性建设资金" label-width="170px" prop="investmentType" |
| | | style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.countyFiscalInvestment" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-input v-model.trim="investmentFundsForm.countyFiscalInvestment" class="item" clearable style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="3.区(县)专项资金" label-width="130px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.countySpecialFundInvestment" class="item" clearable style="width: 90%" |
| | | maxlength="255" placeholder="请输入"/> |
| | | type="number" placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="4.地方政府专项债券" label-width="180px" prop="engineering" style="width: 100%"> |
| | | <el-input v-model.trim="investmentFundsForm.deptBond" class="item" clearable maxlength="255" style="width: 90%" |
| | | <el-input v-model.trim="investmentFundsForm.deptBond" class="item" clearable style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | |
| | | required: true |
| | | }, |
| | | }, |
| | | computed: { |
| | | totalInvestment() { |
| | | this.investmentFundsForm.totalInvestment = |
| | | parseFloat(this.investmentFundsForm.governmentInvestmentTotal ? this.investmentFundsForm.governmentInvestmentTotal : 0) + |
| | | this.centralInvestmentTotal + |
| | | this.provincialInvestmentTotal + |
| | | this.cityInvestmentTotal + |
| | | this.countyInvestmentTotal + |
| | | parseFloat(this.investmentFundsForm.domesticLoanTotal ? this.investmentFundsForm.domesticLoanTotal : 0) + |
| | | parseFloat(this.investmentFundsForm.bankLoan ? this.investmentFundsForm.bankLoan : 0) + |
| | | parseFloat(this.investmentFundsForm.foreignInvestmentTotal ? this.investmentFundsForm.foreignInvestmentTotal : 0) + |
| | | parseFloat(this.investmentFundsForm.enterpriseSelfRaisedTotal ? this.investmentFundsForm.enterpriseSelfRaisedTotal : 0) + |
| | | parseFloat(this.investmentFundsForm.otherInvestmentTotal ? this.investmentFundsForm.otherInvestmentTotal : 0) |
| | | return this.investmentFundsForm.totalInvestment; |
| | | }, |
| | | centralInvestmentTotal() { |
| | | this.investmentFundsForm.centralInvestmentTotal = |
| | | parseFloat(this.investmentFundsForm.centralBudgetInvestment ? this.investmentFundsForm.centralBudgetInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.centralFiscalInvestment ? this.investmentFundsForm.centralFiscalInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.centralSpecialBondInvestment ? this.investmentFundsForm.centralSpecialBondInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.centralSpecialFundInvestment ? this.investmentFundsForm.centralSpecialFundInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.nationalDebt ? this.investmentFundsForm.nationalDebt : 0) + |
| | | parseFloat(this.investmentFundsForm.additionalNationalDebt ? this.investmentFundsForm.additionalNationalDebt : 0) |
| | | return this.investmentFundsForm.centralInvestmentTotal; |
| | | }, |
| | | provincialInvestmentTotal() { |
| | | this.investmentFundsForm.provincialInvestmentTotal = |
| | | parseFloat(this.investmentFundsForm.provincialBudgetInvestment ? this.investmentFundsForm.provincialBudgetInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.provincialFiscalInvestment ? this.investmentFundsForm.provincialFiscalInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.provincialSpecialFundInvestment ? this.investmentFundsForm.provincialSpecialFundInvestment : 0) |
| | | return this.investmentFundsForm.provincialInvestmentTotal; |
| | | }, |
| | | cityInvestmentTotal() { |
| | | this.investmentFundsForm.cityInvestmentTotal = |
| | | parseFloat(this.investmentFundsForm.cityBudgetInvestment ? this.investmentFundsForm.cityBudgetInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.cityFiscalInvestment ? this.investmentFundsForm.cityFiscalInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.citySpecialFundInvestment ? this.investmentFundsForm.citySpecialFundInvestment : 0) |
| | | return this.investmentFundsForm.cityInvestmentTotal; |
| | | }, |
| | | countyInvestmentTotal() { |
| | | this.investmentFundsForm.countyInvestmentTotal = |
| | | parseFloat(this.investmentFundsForm.countyBudgetInvestment ? this.investmentFundsForm.countyBudgetInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.countyFiscalInvestment ? this.investmentFundsForm.countyFiscalInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.countySpecialFundInvestment ? this.investmentFundsForm.countySpecialFundInvestment : 0) + |
| | | parseFloat(this.investmentFundsForm.deptBond ? this.investmentFundsForm.deptBond : 0) |
| | | return this.investmentFundsForm.countyInvestmentTotal; |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | projectForm: {}, |
| | | rules: { |
| | | |
| | | }, |
| | | investmentFundsForm: { |
| | | // id: '', |
| | | // projectId: '', |
| | |
| | | <div class="basic-info"> |
| | | <el-form ref="demoFormRef" :disabled="disabled" :model="legalPersonForm" class="dialog_form"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目总投额" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model="legalPersonForm.totalInvestment" class="item" clearable maxlength="255" style="width: 90%" |
| | | placeholder="请输入"/> |
| | | <span class="money">万元</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <!-- <el-col :span="6">--> |
| | | <!-- <el-form-item label="项目总投额" label-width="120px" prop="investmentType" style="width: 100%">--> |
| | | <!-- <el-input v-model="legalPersonForm.totalInvestment" class="item" clearable maxlength="255" style="width: 90%"--> |
| | | <!-- placeholder="请输入"/>--> |
| | | <!-- <span class="money">万元</span>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目单位" label-width="120px" prop="investmentType" style="width: 100%"> |
| | | <el-input v-model="legalPersonForm.projectUnit" class="item" clearable maxlength="255" placeholder="请输入"/> |
| | | </el-form-item> |
| | |
| | | {id: 'projectOwnerUnitName', label: '业主单位', visible: true}, |
| | | {id: 'coding', label: '项目码', slotName: 'coding', visible: true}, |
| | | {id: 'projectCode', label: '项目代码', visible: true}, |
| | | {id: 'projectType', label: '项目类型', slotName: 'projectType', visible: true}, |
| | | {id: 'projectType', label: '项目推进类型', slotName: 'projectType', visible: true}, |
| | | {id: 'projectPhase', label: '项目阶段', visible: true}, |
| | | {id: 'constructionNature', label: '建设性质', slotName: 'constructionNature', visible: true}, |
| | | {id: 'totalInvestment', label: '总投资额', visible: true}, |
| | |
| | | {id: 'importanceType', label: '重点分类', slotName: 'importanceType', visible: false}, |
| | | {id: 'setTime', label: '立项时间', visible: false}, |
| | | {id: 'planCompleteTime', label: '计划竣工时间', visible: false}, |
| | | // {id: 'winUnit', label: '中标单位', visible: false}, |
| | | // {id: 'winAmount', label: '中标金额', visible: false}, |
| | | // {id: 'winTime', label: '中标时间', visible: false}, |
| | | // {id: 'year', label: '年度投资计划', visible: false}, |
| | | {id: 'address', label: '项目地址', visible: false}, |
| | | {id: 'projectBudget', label: '项目预算', visible: false}, |
| | | {id: 'beCrossRegion', label: '建设地点是否跨域', visible: false}, |
| | |
| | | {id: 'projectOwnerUnitName', label: '业主单位', visible: true}, |
| | | {id: 'coding', label: '项目码', slotName: 'coding', visible: true}, |
| | | {id: 'projectCode', label: '项目代码', visible: true}, |
| | | {id: 'projectType', label: '项目类型', slotName: 'projectType', visible: true}, |
| | | {id: 'projectType', label: '项目推进类型', slotName: 'projectType', visible: true}, |
| | | {id: 'projectPhase', label: '项目阶段', visible: true}, |
| | | {id: 'constructionNature', label: '建设性质', slotName: 'constructionNature', visible: true}, |
| | | {id: 'totalInvestment', label: '总投资额', visible: true}, |
| | |
| | | // }, |
| | | ], |
| | | childRef: null, |
| | | baseInfoRules: [ |
| | | {name: 'projectName', message: '请输入项目名称'}, |
| | | {name: 'content', message: '请输入建设内容'}, |
| | | {name: 'fundTypeList', message: '请选择资金类型'}, |
| | | {name: 'investType', message: '请选择项目投资类别'}, |
| | | {name: 'constructionNature', message: '请选择建设性质'}, |
| | | {name: 'attractInvestment', message: '请选择是否招商引资项目'}, |
| | | {name: 'projectType', message: '请选择项目推进类型'}, |
| | | {name: 'projectStatus', message: '请选择项目状态'}, |
| | | {name: 'projectPhase', message: '请选择项目阶段'}, |
| | | {name: 'projectContactPerson', message: '请输入项目联系人'}, |
| | | {name: 'contact', message: '请输入项目联系方式'}, |
| | | {name: 'projectOwnerUnit', message: '请选择项目业主单位'}, |
| | | {name: 'competentDepartment', message: '请选择主管部门'}, |
| | | {name: 'competentDepartmentPerson', message: '请选择主管部门联系人'}, |
| | | {name: 'competentDepartmentPhone', message: '请输入主管部门联系方式'}, |
| | | {name: 'area', message: '请选择行政区划'}, |
| | | {name: 'managementCentralizationList', message: '请选择管理归口'}, |
| | | {name: 'projectApprovalType', message: '请选择项目审批类型'}, |
| | | {name: 'importanceTypeList', message: '请选择重点分类'}, |
| | | {name: 'planStartTime', message: '请选择计划开工时间'}, |
| | | {name: 'planCompleteTime', message: '请选择计划竣工时间'}, |
| | | {name: 'industryCompetentDepartment', message: '请选择行业主管部门'}, |
| | | {name: 'industryCompetentDepartmentPerson', message: '请输入行业主管部门联系人'}, |
| | | {name: 'departmentPersonPhone', message: '请输入行业主管部门联系方式'}, |
| | | ], |
| | | investmentFundsFormRules: [ |
| | | {name: 'totalInvestment', message: '项目总投资额不能为空(且大于0)'}, |
| | | ] |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | saveProject(num) { |
| | | this.projectForm.projectInfoForm.usedStatus = num; |
| | | editProject(this.projectForm).then((res) => { |
| | | this.$message.success("保存成功"); |
| | | this.$store.dispatch("tagsView/delView", this.$route); |
| | | this.$router.push('/projectEngineering/project/projectLibrary') |
| | | }) |
| | | |
| | | } |
| | | const msg = this.formValidate() |
| | | if (msg && num != 0) { // 草稿不校验 |
| | | this.$message.error(msg) |
| | | } else { |
| | | editProject(this.projectForm).then((res) => { |
| | | this.$message.success("保存成功"); |
| | | this.$store.dispatch("tagsView/delView", this.$route); |
| | | this.$router.push('/projectEngineering/project/projectLibrary') |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | | * 临时使用这种方式校验 |
| | | */ |
| | | formValidate() { |
| | | let msg = ""; |
| | | for (let i = 0; i < this.baseInfoRules.length; i++) { |
| | | if (! this.projectForm.projectInfoForm[this.baseInfoRules[i].name]) { |
| | | msg = this.baseInfoRules[i].message |
| | | return msg |
| | | } |
| | | } |
| | | console.log(this.projectForm, "项目信息") |
| | | if (this.projectForm.projectInvestmentFundingForm) { |
| | | for (let i = 0; i < this.investmentFundsFormRules.length; i++) { |
| | | const name = this.investmentFundsFormRules[i].name |
| | | if (! this.projectForm.projectInvestmentFundingForm[name]) { |
| | | msg = this.investmentFundsFormRules[i].message |
| | | return msg |
| | | } else if (name == 'totalInvestment' && parseFloat(this.projectForm.projectInvestmentFundingForm[name]) <= 0) { |
| | | // 如果是总投资额,不仅不能为空还必须大于0 |
| | | msg = this.investmentFundsFormRules[i].message |
| | | return msg |
| | | } |
| | | } |
| | | } |
| | | return msg; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | if (this.$route.query.disabled) { |
| | |
| | | <div @click="changeTab(4, 'remaining')" :class="{'item-warm': true, 'remaining-color': true, 'active': 4 === selectTabId}">剩余事项<span v-if="detailData && detailData.statistics">({{detailData.statistics.remainingTaskNum}})</span></div> |
| | | <div @click="changeTab(5, 'timely')" :class="{'item-warm': true, 'timely-color': true, 'active': 5 === selectTabId}">按时完成<span v-if="detailData && detailData.statistics">({{detailData.statistics.timelyFinishedTaskNum}})</span></div> |
| | | <div @click="changeTab(6, 'overtime')" :class="{'item-warm': true, 'overtime-color': true, 'active': 6 === selectTabId}">超时事项(0)</div> |
| | | <div @click="changeTab(7, 'willOvertime')" :class="{'item-warm': true, 'willOvertime-color': true, 'active': 7 === selectTabId}">临期事项(0)</div> |
| | | <!-- <div @click="changeTab(7, 'willOvertime')" :class="{'item-warm': true, 'willOvertime-color': true, 'active': 7 === selectTabId}">临期事项(0)</div>--> |
| | | <div @click="changeTab(8, 'urge')" :class="{'item-warm': true, 'urge-color': true, 'active': 8 === selectTabId}">督办事项(0)</div> |
| | | </div> |
| | | <div style="display: flex;justify-content: center;align-items: center;margin-top: 20px; position: relative"> |
| | |
| | | }) |
| | | }, |
| | | unitFormatter(row) { |
| | | if (row.handlerType === 'USER') { |
| | | return null; |
| | | } else if (row.handlerType === 'DEPT') { |
| | | return row.handlerUnitName.join("、") |
| | | } else if (row.handlerType === 'ROLE') { |
| | | return row.handlerUnitName.join('、') |
| | | if (row.taskStatus != '已完成') { |
| | | return null |
| | | } |
| | | return row.handlerUnitName.join("、") |
| | | }, |
| | | candidateFormatter(row) { |
| | | if (row.handlerType === 'USER') { |
| | | return row.handlerName.join('、') |
| | | } else if (row.handlerType === 'DEPT') { |
| | | return row.handlerUnitName.join('、') |
| | | } else if (row.handlerType === 'ROLE') { |
| | | return row.handlerUnitName.join('、') |
| | | if (row.taskStatus != '已完成') { |
| | | return null |
| | | } |
| | | return row.handlerName.join("、") |
| | | // if (row.handlerType === 'USER') { |
| | | // return row.handlerName.join('、') |
| | | // } else if (row.handlerType === 'DEPT') { |
| | | // return row.handlerUnitName.join('、') |
| | | // } else if (row.handlerType === 'ROLE') { |
| | | // return row.handlerUnitName.join('、') |
| | | // } |
| | | }, |
| | | finalFinishedFormatter(row) { |
| | | // 不是已完成的状态没有实际处理人,已完成的状态只有一个人 |
New file |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryParamsRef" size="small" :inline="true" v-show="showSearch" |
| | | label-width="68px"> |
| | | <div class="slot"> |
| | | <div class="left-section"> |
| | | <el-form-item label="项目名称" prop="projectName"> |
| | | <el-input |
| | | style="width: 190px;margin-right: 20px" |
| | | size="small" |
| | | v-model="queryParams.projectName" |
| | | placeholder="请输入项目名称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="项目代码" prop="projectCode"> |
| | | <el-input |
| | | style="width: 190px;margin-right: 20px" |
| | | size="small" |
| | | v-model="queryParams.projectCode" |
| | | placeholder="请输入项目代码" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="项目年限" prop="timeRange"> |
| | | <el-date-picker |
| | | style="width: 270px" |
| | | size="small" |
| | | v-model="queryParams[timeRange]" |
| | | type="daterange" |
| | | range-separator="-" |
| | | value-format="yyyy-MM-dd" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | @change="handleQuery" |
| | | clearable |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button icon="el-icon-search" size="small" @click="handleQuery">查询</el-button> |
| | | <el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button> |
| | | </el-form-item> |
| | | <el-popover :value="popoverValue" trigger="click" :width="500" placement="bottom"> |
| | | <span>筛选条件</span> |
| | | <el-form ref="moreQueryParamsRef" label-width="68px" label-position="right" :model="queryParams"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目类型"> |
| | | <el-select v-model="queryParams.projectType" clearable placeholder="请选择" class="select-option" @change="handleQuery" |
| | | size="small"> |
| | | <el-option v-for="item in dict.type.sys_project_type" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="重点分类"> |
| | | <el-select v-model="queryParams.importanceType" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_key_categories" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目标签"> |
| | | <el-select v-model="queryParams.tag" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_project_tags" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目状态"> |
| | | <el-select v-model="queryParams.projectStatus" :disabled="isProjectCategory" clearable @change="handleQuery" |
| | | placeholder="请选择" class="select-option"> |
| | | <el-option v-for="item in dict.type.sys_project_status" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目码"> |
| | | <el-select v-model="queryParams.coding" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_project_code" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="关联状态"> |
| | | <el-select v-model="queryParams.assignmentStatus" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_association_status" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="资金类型"> |
| | | <el-select v-model="queryParams.investmentType" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_funding_type" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目阶段"> |
| | | <el-select v-model="queryParams.projectPhase" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_project_phases" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="投资类别"> |
| | | <el-select v-model="queryParams.investType" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_investment_type" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="行政区划"> |
| | | <el-select v-model="queryParams.area" clearable placeholder="请选择" class="select-option" @change="handleQuery"> |
| | | <el-option v-for="item in dict.type.sys_administrative_divisions" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <el-button style="margin-right: 16px; margin-top: 1px; color: #3369ff" slot="reference" |
| | | size="small"> |
| | | 更多筛查条件 |
| | | <span style="margin-left: 5px"> |
| | | <el-icon v-if="!popoverValue" class="el-icon-arrow-down"></el-icon> |
| | | <el-icon v-else-if="popoverValue" class="el-icon-arrow-up"></el-icon> |
| | | </span> |
| | | </el-button> |
| | | </el-popover> |
| | | </div> |
| | | <div class="right-section"> |
| | | <div> |
| | | <el-button @click="handleExport" size="small"> |
| | | <svg-icon icon-class="exportIcon" style="margin-right: 8px"/> |
| | | 导出数据 |
| | | </el-button> |
| | | <el-button :disabled="!isReserve" @click="handleImport" size="small"> |
| | | <svg-icon icon-class="importIcon" style="margin-right: 8px"/> |
| | | 导入数据 |
| | | </el-button> |
| | | </div> |
| | | <div class="add-btn"> |
| | | <el-tooltip content="新增" effect="dark" placement="top"> |
| | | <el-button :disabled="!isReserve" circle icon="el-icon-plus" @click="add()" size="small"/> |
| | | </el-tooltip> |
| | | </div> |
| | | <VisibilityToolbar |
| | | v-model:showSearch="showSearch" |
| | | :columns="defaultColumns" |
| | | @queryTable="handleQuery" |
| | | @update:sort="handleUpdateSort" |
| | | @update:columns="handleUpdateColumns" |
| | | @update:resetSort="handleResetSort" |
| | | ></VisibilityToolbar> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <el-table |
| | | :key="tableKey" |
| | | ref="elTable" |
| | | style="margin-top: 20px" |
| | | v-loading="loading" |
| | | :data="projectInfoList" |
| | | @selection-change="handleSelectionChange" |
| | | height="100%" |
| | | sortable="custom" |
| | | :show-overflow-tooltip="true"> |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <!-- 动态列 --> |
| | | <el-table-column |
| | | v-for="item in columns" |
| | | :key="item.id" |
| | | v-if="item.visible" |
| | | :prop="item.id" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <!-- 使用具名插槽 --> |
| | | <template v-if="item.slotName"> |
| | | <!-- projectStatus插槽 --> |
| | | <template v-if="item.slotName === 'projectStatus'"> |
| | | <dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/> |
| | | </template> |
| | | <!-- coding插槽 --> |
| | | <template v-if="item.slotName === 'coding' || item.slotName === 'coding'"> |
| | | <dict-tag :options="dict.type.sys_project_code" :value="scope.row.coding"/> |
| | | </template> |
| | | <!-- projectType插槽 --> |
| | | <template v-if="item.slotName === 'projectType'"> |
| | | <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> |
| | | </template> |
| | | <!-- investType插槽 --> |
| | | <template v-if="item.slotName === 'investType'"> |
| | | <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> |
| | | </template> |
| | | </template> |
| | | <!-- 默认显示 --> |
| | | <span v-else>{{ scope.row[item.id] }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <!-- 操作列 --> |
| | | <el-table-column label="操作" width="140" align="center" > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | v-if="scope.row.processInsId" |
| | | @click="lookProcessDetail(scope.row)" |
| | | > |
| | | </el-button> |
| | | <!-- <el-button--> |
| | | <!-- v-if="isReserve"--> |
| | | <!-- size="medium"--> |
| | | <!-- type="text"--> |
| | | <!-- icon="el-icon-edit"--> |
| | | <!-- @click="handleUpdate(scope.row)"--> |
| | | <!-- >--> |
| | | <!-- </el-button>--> |
| | | <el-tooltip content="流程" placement="top" effect="light" :enterable="false"> |
| | | <el-button |
| | | v-if="isReserve" |
| | | size="medium" |
| | | type="text" |
| | | icon="el-icon-s-operation" |
| | | @click="openOpProcess(scope.row)" |
| | | > |
| | | </el-button> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.currentPage" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <FileDialog |
| | | :fileDialogVisible.sync="fileDialogVisible" |
| | | :isImportOrExport="isImportOrExport" |
| | | @fileDialogCancel="fileDialogCancel" |
| | | :currentColumns="columns" |
| | | /> |
| | | |
| | | <RunProcess ref="runProcess" :show="showRunProcess" |
| | | :now-process-def-id="nowProcessDefId" |
| | | :now-process-ins-id="nowProcessInsId" |
| | | :project-info="projectRunFrom" |
| | | :process-list="processList" |
| | | @close="closeRunProcess"> |
| | | </RunProcess> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listDefinition } from "@/api/flowable/definition"; |
| | | import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectEngineering/projectInfo"; |
| | | import { getProjectProcess } from "@/api/projectProcess/projectProcess" |
| | | import {projectProcessCurrent, projectProcessCurrentRest} from '@/views/projectEngineering/projectLibrary/list'; |
| | | import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog'; |
| | | import RunProcess from "@/views/projectProcess/components/RunProcess"; |
| | | import {getProcessConfigInfoList} from "@/api/projectProcess/processConfigInfo"; |
| | | |
| | | export default { |
| | | dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases', |
| | | 'sys_funding_type', 'sys_association_status', 'sys_project_status', 'sys_project_code', |
| | | 'sys_project_tags', 'sys_key_categories', 'sys_project_type'], |
| | | name: "projectInfo", |
| | | components: { |
| | | FileDialog, RunProcess |
| | | }, |
| | | data() { |
| | | return { |
| | | projectRunFrom: { |
| | | projectId: null, |
| | | projectName: '' |
| | | }, |
| | | processList: [], |
| | | showRunProcess: false, |
| | | nowProcessDefId: '', |
| | | nowProcessInsId: '', |
| | | isImportOrExport: false, |
| | | fileDialogVisible: false, |
| | | //是否需要新增按钮(储蓄项目需要) |
| | | isReserve: false, |
| | | //项目状态筛选条件 |
| | | isProjectCategory: false, |
| | | //表头 |
| | | columns: [], |
| | | defaultColumns: [], |
| | | //控制更多筛选显隐 |
| | | popoverValue: false, |
| | | // 遮罩层 |
| | | loading: true, |
| | | // 选中数组 |
| | | ids: [], |
| | | // 非单个禁用 |
| | | single: true, |
| | | // 非多个禁用 |
| | | multiple: true, |
| | | // 显示搜索条件 |
| | | showSearch: true, |
| | | // 总条数 |
| | | total: 0, |
| | | // 项目管理基础信息表格数据 |
| | | projectInfoList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | tableKey: 0, |
| | | open: false, |
| | | timeRange: [], |
| | | // 查询参数 |
| | | queryParams: { |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | projectName: null, |
| | | projectCode: null, |
| | | }, |
| | | moreQueryParams: { |
| | | projectType: '', // 项目类型 |
| | | importanceType: '', // 重点分类 |
| | | projectStatus: '', // 项目状态 |
| | | coding: '', // 项目码 |
| | | investmentType: '', // 资金类型 |
| | | projectPhase: '', // 项目阶段 |
| | | investType: '', // 投资类别 |
| | | area: '', // 行政区划 |
| | | assignmentStatus: '', //关联状态 |
| | | tag: '' //项目标签 |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | // 表单校验 |
| | | rules: { |
| | | projectName: [ |
| | | {required: true, message: "项目名称不能为空", trigger: "blur"} |
| | | ], |
| | | projectStatus: [ |
| | | {required: true, message: "项目状态不能为空", trigger: "change"} |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | const projectCategory = this.$route.query.projectCategory; |
| | | if(!projectCategory || projectCategory === '1'){ |
| | | this.isReserve = true; |
| | | } |
| | | if(projectCategory){ |
| | | this.isProjectCategory = true; |
| | | } |
| | | const columns = projectProcessCurrent.map((item, index) => { |
| | | item.index = index + 1; |
| | | item.key = index; |
| | | item.serialNumber = index + 1; |
| | | return item; |
| | | }); |
| | | this.columns = columns; |
| | | this.defaultColumns = JSON.parse(JSON.stringify(columns)); |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | // 查看详情 |
| | | lookProcessDetail(row) { |
| | | sessionStorage.removeItem("projectProDetail") |
| | | this.$router.push({ |
| | | path: '/projectFlow/detail', |
| | | query: { |
| | | projectId: row.id, |
| | | processDefId: row.processDefId, |
| | | processInsId: row.processInsId, |
| | | deployId: row.deployId, |
| | | processName: row.flowableProcessName |
| | | } |
| | | }) |
| | | }, |
| | | closeRunProcess() { |
| | | this.projectRunFrom = { |
| | | projectId: null, |
| | | projectName: '' |
| | | } |
| | | this.nowProcessDefId = ""; |
| | | this.nowProcessInsId = ""; |
| | | this.showRunProcess = false |
| | | this.getList() |
| | | }, |
| | | // 打开流程页面 |
| | | openOpProcess(row) { |
| | | this.nowProcessDefId = row.processDefId ? row.processDefId : ''; |
| | | this.nowProcessInsId = row.processInsId ? row.processInsId : ''; |
| | | // // 防止:id没变不触发监听 |
| | | // this.$refs.runProcess.setSelect(row.flowableProcessId); |
| | | this.projectRunFrom.projectId = row.id; |
| | | this.projectRunFrom.projectName = row.projectName; |
| | | |
| | | this.showRunProcess = true; |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | // getProcessConfigInfoList().then(response => { |
| | | // this.processList = response.data; |
| | | // |
| | | // }); |
| | | }, |
| | | // 重置排序的方法 |
| | | handleResetSort() { |
| | | this.defaultColumns = projectProcessCurrentRest.map((item, index) => { |
| | | item.index = index + 1; |
| | | item.key = index; |
| | | item.serialNumber = index + 1 |
| | | return item; |
| | | }); |
| | | this.columns = projectProcessCurrentRest.map((item, index) => { |
| | | item.index = index + 1; |
| | | item.key = index; |
| | | item.serialNumber = index + 1 |
| | | return item; |
| | | }); |
| | | }, |
| | | // 更新列的方法 |
| | | handleUpdateColumns(row) { |
| | | // this.currentColumns = row; |
| | | this.columns = this.columns.map(item => { |
| | | if (item.key === row.key) { |
| | | return row; |
| | | } |
| | | return item; |
| | | }); |
| | | }, |
| | | handleUpdateSort(row) { |
| | | console.log( this.columns, '排序前的列'); |
| | | this.columns = this.columns.map(item => { |
| | | if (item.key === row.key) { |
| | | return row; |
| | | } |
| | | return item; |
| | | }); |
| | | this.defaultColumns = JSON.parse(JSON.stringify(this.columns)).sort((a, b) => a.index - b.index); |
| | | this.columns.sort((a, b) => a.serialNumber - b.serialNumber); |
| | | //强制table渲染 |
| | | this.tableKey = this.tableKey +1; |
| | | console.log( this.columns, '排序后的列'); |
| | | }, |
| | | // 关闭文件处理弹框的方法 |
| | | fileDialogCancel() { |
| | | this.tableLoading = true; |
| | | this.fileDialogVisible = false; |
| | | // this.getList(); |
| | | this.tableLoading = false; |
| | | }, |
| | | handlePopover() { |
| | | this.popoverValue = true; |
| | | }, |
| | | closePopover() { |
| | | this.popoverValue = false; |
| | | }, |
| | | /** 查询项目管理基础信息列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | getProjectProcess(this.queryParams).then(response => { |
| | | this.projectInfoList = response.data; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | projectName: null, |
| | | projectCode: null, |
| | | content: null, |
| | | projectType: null, |
| | | projectStatus: null, |
| | | fundType: null, |
| | | investType: null, |
| | | projectPhase: null, |
| | | tag: null, |
| | | competentDepartment: null, |
| | | areaCode: null, |
| | | managementCentralization: null, |
| | | projectApprovalType: null, |
| | | investmentCatalogue: null, |
| | | importanceType: null, |
| | | year: null, |
| | | yearInvestAmount: null, |
| | | createProjectTime: null, |
| | | planStartTime: null, |
| | | planCompleteTime: null, |
| | | winUnit: null, |
| | | winAmount: null, |
| | | winTime: null, |
| | | projectAddress: null, |
| | | longitude: null, |
| | | latitude: null, |
| | | projectOwnerUnit: null, |
| | | projectContactPerson: null, |
| | | contact: null, |
| | | gmtCreateTime: null, |
| | | gmtUpdateTime: null, |
| | | updateBy: null, |
| | | createBy: null, |
| | | deleted: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** 搜索按钮操作 */ |
| | | handleQuery() { |
| | | this.queryParams.currentPage = 1; |
| | | this.getList(); |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // 多选框选中数据 |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | 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; |
| | | this.$modal.confirm('是否确认删除项目管理基础信息编号为"' + ids + '"的数据项?').then(function () { |
| | | return delInfo(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("删除成功"); |
| | | }).catch(() => { |
| | | }); |
| | | }, |
| | | /** 导入按钮操作 */ |
| | | handleImport() { |
| | | this.isImportOrExport = false; |
| | | this.fileDialogVisible = true; |
| | | }, |
| | | /** 导出按钮操作 */ |
| | | handleExport() { |
| | | this.download('code/info/export', { |
| | | ...this.queryParams |
| | | }, `info_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .select-option { |
| | | width: 100%; |
| | | } |
| | | |
| | | .slot { |
| | | display: flex; |
| | | } |
| | | |
| | | .left-section { |
| | | flex-grow: 1; |
| | | } |
| | | |
| | | .right-section { |
| | | display: flex; |
| | | margin-left: auto; |
| | | |
| | | .add-btn { |
| | | margin: 0 10px; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | </el-form> |
| | | |
| | | <el-table |
| | | :key="tableKey" |
| | | ref="elTable" |
| | | style="margin-top: 20px" |
| | | v-loading="loading" |
| | | :data="projectInfoList" |
| | | @selection-change="handleSelectionChange" |
| | | height="100%" |
| | | sortable="custom" |
| | | row-key="id" |
| | | border |
| | | default-expand-all |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | :show-overflow-tooltip="true"> |
| | | <el-table-column type="selection" width="55" align="center"/> |
| | | <!-- 动态列 --> |
| | | <el-table-column |
| | | v-for="item in columns" |
| | | :key="item.id" |
| | | v-if="item.visible" |
| | | :prop="item.id" |
| | | :label="item.label" |
| | | :min-width="item.minWidth" |
| | | :show-overflow-tooltip="item.showOverflowTooltip" |
| | | > |
| | | <el-table-column label="项目名称" prop="projectName" /> |
| | | <el-table-column label="项目推进类型" align="center" prop="projectType"> |
| | | <template slot-scope="scope"> |
| | | <!-- 使用具名插槽 --> |
| | | <template v-if="item.slotName"> |
| | | <!-- projectStatus插槽 --> |
| | | <template v-if="item.slotName === 'projectStatus'"> |
| | | <dict-tag :options="dict.type.sys_project_status" :value="scope.row.projectStatus"/> |
| | | </template> |
| | | <!-- coding插槽 --> |
| | | <template v-if="item.slotName === 'coding' || item.slotName === 'coding'"> |
| | | <dict-tag :options="dict.type.sys_project_code" :value="scope.row.coding"/> |
| | | </template> |
| | | <!-- projectType插槽 --> |
| | | <template v-if="item.slotName === 'projectType'"> |
| | | <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> |
| | | </template> |
| | | <!-- investType插槽 --> |
| | | <template v-if="item.slotName === 'investType'"> |
| | | <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> |
| | | </template> |
| | | </template> |
| | | <!-- 默认显示 --> |
| | | <span v-else>{{ scope.row[item.id] }}</span> |
| | | <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="投资额(万)" align="center" prop="investmentAmount" /> |
| | | <el-table-column label="开工状态" align="center" prop="status"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_project_status" :value="scope.row.status"/> |
| | | </template> |
| | | </el-table-column> |
| | | |