luohairen
2024-11-29 cae62ab1f60bc87a5c573eb4635426cdfa07fc7b
Merge remote-tracking branch 'origin/master'
10个文件已修改
3个文件已添加
1529 ■■■■ 已修改文件
src/views/projectEngineering/abnormalProject/components/FileDialog.vue 204 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/abnormalProject/index.vue 570 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/abnormalProject/list.js 176 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/BasicInfo.vue 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/FileDialog.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/InvestInfo.vue 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/investmentFunds.vue 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/component/legalPerson.vue 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/index.vue 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/projectLibrary/projectDetails.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectProcess/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/projectEngineering/abnormalProject/components/FileDialog.vue
New file
@@ -0,0 +1,204 @@
<template>
  <div>
    <el-dialog
      :visible.sync="fileDialogVisible"
      ref="formDialogRef"
      width="35%"
      append-to-body
      close-on-click-modal
      @close="closeDialog"
    >
      <template slot="title">
        <span style="padding-bottom: 18px">
          {{ isImportOrExport ? '请按照需求导出目标内容' : '请按照模板样式上传项目文件' }}
        </span>
      </template>
      <template slot="default">
        <div v-if="!isImportOrExport" class="dialog-content">
          <el-upload
            ref="uploadRef"
            class="upload-demo"
            :action="uploadUrl"
            :limit="1"
            :accept="accept"
            :headers="uploadHeaders"
            :disabled="uploadIsUploading"
            :on-progress="handleFileUploadProgress"
            :on-success="handleFileSuccess"
            :auto-upload="false"
            drag
          >
            <i class="el-icon-upload"></i>
            <div class="el-upload__text">请上传<em>Zip</em>文件,大小在<em>100M</em>以内</div>
          </el-upload>
          <span>仅允许导入zip格式文件。</span>
          <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline" @click="handleDownloadFile">下载模板</el-link>
        </div>
        <div v-else-if="isImportOrExport" class="dialog-content">
          <el-button class="export-button" @click="handleDownloadTargetList">导出目标列表内容</el-button>
          <el-button class="export-button">导出所有列表内容</el-button>
          <el-button class="export-button">导出目标项目详情</el-button>
          <el-button class="export-button">导出所有项目详情</el-button>
        </div>
      </template>
      <template slot="footer">
        <div v-if="!isImportOrExport" class="dialog-footer">
          <el-button type="primary" @click="submitFileForm">确 定</el-button>
          <el-button @click="closeDialog">取 消</el-button>
        </div>
        <div v-else-if="isImportOrExport"></div>
      </template>
    </el-dialog>
  </div>
</template>
<script>
import { globalHeaders } from '@/utils/request';
import {getToken} from "@/utils/auth";
export default {
  name: 'FileDialog',
  props: {
    isImportOrExport: {
      type: Boolean,
      default: false
    },
    fileDialogVisible: {
      type: Boolean,
      default: false
    },
    currentColumns: {
      type: Array,
      default: function () {
        return [];
      }
    }
  },
  data() {
    return {
      uploadRef: null,
      targetColumn: [],
      accept: `.zip`,
      uploadUrl: '/project/import',
      uploadHeaders: {},
      uploadIsUploading: false
    };
  },
  methods: {
    submit() {
      console.log("子组件submit")
    },
    handleFileUploadProgress() {
      this.uploadIsUploading = true;
    },
    handleFileSuccess(response, file) {
      this.uploadIsUploading = false;
      if (this.uploadRef) {
        this.uploadRef.handleRemove(file);
      }
      if (response.code === 200) {
        this.$emit('fileDialogCancel');
        this.$message({
          message: response.msg,
          type: 'success'
        });
      } else {
        this.$message.error(response.msg);
      }
    },
    handleDownloadFile() {
      // fetch(`${process.env.VITE_APP_BASE_API}/project/info/export/template`, {
      //   method: 'GET',
      //   headers: self.upload.headers
      // })
      //   .then(response => response.blob())
      //   .then(blob => {
      //     const url = window.URL.createObjectURL(blob);
      //     const a = document.createElement('a');
      //     a.style.display = 'none';
      //     a.href = url;
      //     a.download = `项目文件模板_${new Date().getTime()}.zip`;
      //     document.body.appendChild(a);
      //     a.click();
      //     window.URL.revokeObjectURL(url);
      //   })
      //   .catch(error => {
      //     console.error('文件下载失败:', error);
      //   });
      const url = process.env.VUE_APP_BASE_API + '/project/info/export/template';
      axios.post(url, [], { // 发送一个空数组而不是空对象
        responseType: 'blob', // 告诉axios期望服务器返回的是blob类型
        headers: {
          'Content-Type': 'application/json',
          Authorization: "Bearer " + getToken()
        }
      })
        .then(response => {
          // 处理文件下载
          const blob = new Blob([response.data], { type: 'application/zip' }); // 指定MIME类型为zip
          const url = window.URL.createObjectURL(blob);
          const a = document.createElement('a');
          a.style.display = 'none';
          a.href = url;
          a.download = `项目文件模板_${new Date().getTime()}.zip`;
          document.body.appendChild(a);
          a.click();
          document.body.removeChild(a);
          window.URL.revokeObjectURL(url);
        })
        .catch(error => {
          console.error('There was an error!', error);
        });
    },
    submitFileForm() {
      if (this.uploadRef) {
        this.uploadRef.submit();
      }
    },
    closeDialog() {
      this.$emit('fileDialogCancel');
    },
    handleDownloadTargetList() {
      console.log('导出目标列表内容', this.currentColumns);
      this.targetColumn = this.currentColumns.filter(item => item.visible);
    }
  },
  mounted() {
    this.uploadRef = this.$refs.uploadRef;
  },
  created() {
    this.isFileDialogVisible = this.fileDialogVisible;
  }
};
</script>
<style scoped lang="scss">
.dialog-content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  height: 300px;
  .export-button {
    margin-left: 0;
    margin-bottom: 10px;
  }
}
.dialog-footer {
  display: flex;
  justify-content: center;
}
.upload-demo {
  width: 100%;
}
::v-deep  .el-upload{
  width: 100%;
}
::v-deep .el-upload .el-upload-dragger{
  width: 100%;
}
</style>
src/views/projectEngineering/abnormalProject/index.vue
New file
@@ -0,0 +1,570 @@
<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="timeRange"
              type="daterange"
              range-separator="-"
              value-format="yyyy-MM-dd HH:mm:ss"
              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="700" 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.projectColorCode" 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">
          <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="60vh"
      sortable="custom"
      :show-overflow-tooltip="true">
      <el-table-column type="selection" width="55" align="center"/>
      <!-- 动态列 -->
      <el-table-column
        v-for="item in columns"
        v-if="item.visible"
        :prop="item.id"
        :label="item.label"
        :min-width="item.minWidth"
      >
        <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>
            <!-- projectColorCode插槽 -->
            <template v-if="item.slotName === 'projectColorCode'">
              <dict-tag :options="dict.type.sys_project_code" :value="scope.row.projectColorCode"/>
            </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>
            <!-- planStartTime -->
            <template v-if="item.slotName === 'planStartTime'">
              {{ scope.row.planStartTime ? scope.row.planStartTime.split('-')[0] + '年' : '' }}
            </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"
            @click="handleDetail(scope.row)"
          >
          </el-button>
          <el-button
            v-if="isReserve"
            size="medium"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
          >
          </el-button>
          <el-button
            v-if="isReserve"
            size="medium"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >
          </el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <FileDialog
      :fileDialogVisible.sync="fileDialogVisible"
      :isImportOrExport="isImportOrExport"
      @fileDialogCancel="fileDialogCancel"
      :currentColumns="columns"
    />
  </div>
</template>
<script>
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',
    'sys_project_tags', 'sys_key_categories', 'sys_project_type'],
  name: "AbnormalProject",
  components: {
    FileDialog
  },
  data() {
    return {
      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: {
        pageNum: 1,
        pageSize: 10,
        projectCategory: '5',
        projectName: null,
        projectCode: null,
        projectStartTime: null,
        projectEndTime: null,
      },
      moreQueryParams: {
        projectType: '', // 项目类型
        importanceType: '', // 重点分类
        projectStatus: '', // 项目状态
        projectColorCode: '', // 项目码
        investmentType: '', // 资金类型
        projectPhase: '', // 项目阶段
        investType: '', // 投资类别
        area: '', // 行政区划
        assignmentStatus: '', //关联状态
        tag: '' //项目标签
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        projectName: [
          {required: true, message: "项目名称不能为空", trigger: "blur"}
        ],
        projectStatus: [
          {required: true, message: "项目状态不能为空", trigger: "change"}
        ],
      }
    };
  },
  created() {
    const columns = current.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();
  },
  beforeDestroy() {
    this.removeStore();
  },
  methods: {
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.removeStore();
      this.$router.push({path: '/projectEngineering/project/ProjectDetails', query: {projectId: row.id}});
    },
    handleDetail(row) {
      this.removeStore();
      this.$router.push({path: '/projectEngineering/project/ProjectDetails', query: {projectId: row.id}});
    },
    // 新增页面
    add() {
      this.removeStore();
      this.$router.push({path: '/projectEngineering/project/ProjectDetails'});
    },
    //清理缓存
    removeStore() {
      localStorage.removeItem("projectForm")
      localStorage.removeItem("investmentForm")
      localStorage.removeItem("investmentFundsForm")
      localStorage.removeItem("legalPersonForm")
      localStorage.removeItem("policyInfoForm")
      localStorage.removeItem("documentsInfoForm")
    },
    // 重置排序的方法
    handleResetSort() {
      this.defaultColumns = currentRest.map((item, index) => {
        item.index = index + 1;
        item.key = index;
        item.serialNumber = index + 1
        return item;
      });
      this.columns = currentRest.map((item, index) => {
        item.index = index + 1;
        item.key = index;
        item.serialNumber = index + 1
        return item;
      });
      //强制table渲染
      this.tableKey = this.tableKey + 1;
    },
    // 更新列的方法
    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;
      this.queryParams.projectCategory = '5';
      if (this.timeRange) {
        this.queryParams.projectStartTime = this.timeRange[0]
        this.queryParams.projectEndTime = this.timeRange[1]
      }
      listProject(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.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
    },
    /** 删除按钮操作 */
    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.isImportOrExport = true;
      this.fileDialogVisible = true;
    }
  }
};
</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>
src/views/projectEngineering/abnormalProject/list.js
New file
@@ -0,0 +1,176 @@
export const current = [
  {id: 'projectName', label: '项目名称', visible: true},
  {id: 'projectOwnerUnit', label: '业主单位', visible: true},
  {id: 'projectColorCode', label: '项目码', slotName: 'projectColorCode', visible: true},
  {id: 'projectCode', label: '项目代码', visible: true},
  {id: 'projectType', label: '项目类型', slotName: 'projectType', visible: true},
  {id: 'projectPhase', label: '项目阶段', visible: true},
  {id: 'totalInvestment', label: '总投资额', visible: true},
  {id: 'yearInvestAmount', label: '本年计划投资', visible: true},
  {id: 'planStartTime', label: '项目年份', slotName: 'planStartTime', visible: true},
  {id: 'projectStatus', label: '项目状态', slotName: 'projectStatus', visible: true},
  {id: 'investType', label: '投资类别', slotName: 'investType', visible: true},
  {id: 'content', label: '建设内容', visible: false},
  {id: 'fundType', label: '资金类型', visible: false},
  {id: 'projectContactPerson', label: '项目联系人', visible: false},
  {id: 'contact', label: '联系方式', visible: false},
  {id: 'engineeringIdList', label: '关联工程', visible: false},
  {id: 'competentDepartmentList', label: '主管部门', visible: false},
  {id: 'area', label: '行政区划', visible: false},
  {id: 'managementCentralizationList', label: '管理归口', visible: false},
  {id: 'projectApprovalType', label: '项目审批类型', visible: false},
  {id: 'importanceType', label: '重点分类', 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: 'constructionLocation', label: '项目建设地点', visible: false},
  {id: 'detailedAddress', label: '建设详细地址', visible: false},
  {id: 'beCompensationProject', label: '是否是补码项目', visible: false},
  {id: 'compensationReason', label: '补码原因', visible: false},
  {id: 'plannedStartDate', label: '计划开工时间', visible: false},
  {id: 'expectedCompletionDate', label: '拟建成时间', visible: false},
  {id: 'nationalIndustryClassification', label: '国际行业分类', visible: false},
  {id: 'industryClassification', label: '所属行业分类', visible: false},
  {id: 'projectNature', label: '项目建成性质', visible: false},
  {id: 'projectAttribute', label: '项目属性', visible: false},
  {id: 'useEarth', label: '是否使用土地', visible: false},
  {id: 'contentScale', label: '主要建设内容及规模', visible: false},
  {id: 'code', label: '建管平台代码', visible: false},
  {id: 'projectUnit', label: '项目单位', visible: false},
  {id: 'projectUnitType', label: '项目单位类型', visible: false},
  {id: 'registrationType', label: '登记注册类型', visible: false},
  {id: 'holdingSituation', label: '控股情况', visible: false},
  {id: 'certificateType', label: '证照类型', visible: false},
  {id: 'certificateNumber', label: '证件号码', visible: false},
  {id: 'registeredAddress', label: '注册地址', visible: false},
  {id: 'registeredCapital', label: '注册资金', visible: false},
  {id: 'legal_representative', label: '法人代表', visible: false},
  {id: 'fixedPhone', label: '固定电话', visible: false},
  {id: 'legalPersonIdcard', label: '法人身份证号', visible: false},
  {id: 'projectContactPerson', label: '项目联系人', visible: false},
  {id: 'phone', label: '移动电话', visible: false},
  {id: 'contactIdcard', label: '联系人身份证号', visible: false},
  {id: 'wechat', label: '微信号', visible: false},
  {id: 'contactAddress', label: '联系人通讯地址', visible: false},
  {id: 'postCode', label: '邮政编码', visible: false},
  {id: 'email', label: '电子邮箱', visible: false},
  {id: 'totalInvestment', label: '项目总投资额', visible: false},
  {id: 'principal', label: '项目本金', visible: false},
  {id: 'governmentInvestmentTotal', label: '政府投资', visible: false},
  {id: 'centralInvestmentTotal', label: '中央投资', visible: false},
  {id: 'centralBudgetInvestment', label: '中央预算投资', visible: false},
  {id: 'centralFiscalInvestment', label: '中央财政', visible: false},
  {id: 'centralSpecialBondInvestment', label: '中央专项债券筹集的专项建设资金', visible: false},
  {id: 'centralSpecialFundInvestment', label: '中央专项建设基金', visible: false},
  {id: 'provincialInvestmentTotal', label: '省级投资', visible: false},
  {id: 'provincialBudgetInvestment', label: '省预算内投资', visible: false},
  {id: 'provincialFiscalInvestment', label: '省财政性建设投资', visible: false},
  {id: 'provincialSpecialFundInvestment', label: '省专项建设资金', visible: false},
  {id: 'cityInvestmentTotal', label: '市(州)投资', visible: false},
  {id: 'cityBudgetInvestment', label: '市(州)预算内投资', visible: false},
  {id: 'cityFiscalInvestment', label: '市(州)财政性投资', visible: false},
  {id: 'citySpecialFundInvestment', label: '市(州)专项资金', visible: false},
  {id: 'countyInvestmentTotal', label: '县(市、区)投资', visible: false},
  {id: 'countyBudgetInvestment', label: '区(县)预算内投资', visible: false},
  {id: 'countyFiscalInvestment', label: '区(县)财政性建设资金', visible: false},
  {id: 'countySpecialFundInvestment', label: '区(县)专项资金', visible: false},
  {id: 'domesticLoanTotal', label: '国内贷款', visible: false},
  {id: 'bankLoan', label: '银行贷款', visible: false},
  {id: 'foreignInvestmentTotal', label: '外商投资', visible: false},
  {id: 'enterpriseSelfRaisedTotal', label: '企业自筹', visible: false},
  {id: 'otherInvestmentTotal', label: '其他投资', visible: false}
];
export const currentRest = [
  { id: 'projectName', label: '项目名称', visible: true },
  { id: 'projectOwnerUnit', label: '业主单位', visible: true },
  { id: 'projectColorCode', label: '项目码', slotName: 'projectColorCode', visible: true },
  { id: 'projectCode', label: '项目代码', visible: true },
  { id: 'projectType', label: '项目类型', slotName: 'projectType', visible: true },
  { id: 'projectPhase', label: '项目阶段', visible: true },
  { id: 'totalInvestment', label: '总投资额', visible: true },
  { id: 'yearInvestAmount', label: '本年计划投资', visible: true },
  { id: 'planStartTime', label: '项目年份', slotName: 'planStartTime', visible: true },
  { id: 'projectStatus', label: '项目状态', slotName: 'projectStatus', visible: true },
  { id: 'investType', label: '投资类别', slotName: 'investType', visible: true },
  { id: 'content', label: '建设内容', visible: false },
  { id: 'fundType', label: '资金类型', visible: false },
  { id: 'projectContactPerson', label: '项目联系人', visible: false },
  { id: 'contact', label: '联系方式', visible: false },
  { id: 'engineeringIdList', label: '关联工程', visible: false },
  { id: 'competentDepartmentList', label: '主管部门', visible: false },
  { id: 'area', label: '行政区划', visible: false },
  { id: 'managementCentralizationList', label: '管理归口', visible: false },
  { id: 'projectApprovalType', label: '项目审批类型', visible: false },
  { id: 'importanceType', label: '重点分类', 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: 'constructionLocation', label: '项目建设地点', visible: false },
  { id: 'detailedAddress', label: '建设详细地址', visible: false },
  { id: 'beCompensationProject', label: '是否是补码项目', visible: false },
  { id: 'compensationReason', label: '补码原因', visible: false },
  { id: 'plannedStartDate', label: '计划开工时间', visible: false },
  { id: 'expectedCompletionDate', label: '拟建成时间', visible: false },
  { id: 'nationalIndustryClassification', label: '国际行业分类', visible: false },
  { id: 'industryClassification', label: '所属行业分类', visible: false },
  { id: 'projectNature', label: '项目建成性质', visible: false },
  { id: 'projectAttribute', label: '项目属性', visible: false },
  { id: 'useEarth', label: '是否使用土地', visible: false },
  { id: 'contentScale', label: '主要建设内容及规模', visible: false },
  { id: 'code', label: '建管平台代码', visible: false },
  { id: 'projectUnit', label: '项目单位', visible: false },
  { id: 'projectUnitType', label: '项目单位类型', visible: false },
  { id: 'registrationType', label: '登记注册类型', visible: false },
  { id: 'holdingSituation', label: '控股情况', visible: false },
  { id: 'certificateType', label: '证照类型', visible: false },
  { id: 'certificateNumber', label: '证件号码', visible: false },
  { id: 'registeredAddress', label: '注册地址', visible: false },
  { id: 'registeredCapital', label: '注册资金', visible: false },
  { id: 'legal_representative', label: '法人代表', visible: false },
  { id: 'fixedPhone', label: '固定电话', visible: false },
  { id: 'legalPersonIdcard', label: '法人身份证号', visible: false },
  { id: 'projectContactPerson', label: '项目联系人', visible: false },
  { id: 'phone', label: '移动电话', visible: false },
  { id: 'contactIdcard', label: '联系人身份证号', visible: false },
  { id: 'wechat', label: '微信号', visible: false },
  { id: 'contactAddress', label: '联系人通讯地址', visible: false },
  { id: 'postCode', label: '邮政编码', visible: false },
  { id: 'email', label: '电子邮箱', visible: false },
  { id: 'totalInvestment', label: '项目总投资额', visible: false },
  { id: 'principal', label: '项目本金', visible: false },
  { id: 'governmentInvestmentTotal', label: '政府投资', visible: false },
  { id: 'centralInvestmentTotal', label: '中央投资', visible: false },
  { id: 'centralBudgetInvestment', label: '中央预算投资', visible: false },
  { id: 'centralFiscalInvestment', label: '中央财政', visible: false },
  { id: 'centralSpecialBondInvestment', label: '中央专项债券筹集的专项建设资金', visible: false },
  { id: 'centralSpecialFundInvestment', label: '中央专项建设基金', visible: false },
  { id: 'provincialInvestmentTotal', label: '省级投资', visible: false },
  { id: 'provincialBudgetInvestment', label: '省预算内投资', visible: false },
  { id: 'provincialFiscalInvestment', label: '省财政性建设投资', visible: false },
  { id: 'provincialSpecialFundInvestment', label: '省专项建设资金', visible: false },
  { id: 'cityInvestmentTotal', label: '市(州)投资', visible: false },
  { id: 'cityBudgetInvestment', label: '市(州)预算内投资', visible: false },
  { id: 'cityFiscalInvestment', label: '市(州)财政性投资', visible: false },
  { id: 'citySpecialFundInvestment', label: '市(州)专项资金', visible: false },
  { id: 'countyInvestmentTotal', label: '县(市、区)投资', visible: false },
  { id: 'countyBudgetInvestment', label: '区(县)预算内投资', visible: false },
  { id: 'countyFiscalInvestment', label: '区(县)财政性建设资金', visible: false },
  { id: 'countySpecialFundInvestment', label: '区(县)专项资金', visible: false },
  { id: 'domesticLoanTotal', label: '国内贷款', visible: false },
  { id: 'bankLoan', label: '银行贷款', visible: false },
  { id: 'foreignInvestmentTotal', label: '外商投资', visible: false },
  { id: 'enterpriseSelfRaisedTotal', label: '企业自筹', visible: false },
  { id: 'otherInvestmentTotal', label: '其他投资', visible: false }
];
src/views/projectEngineering/projectLibrary/component/BasicInfo.vue
@@ -107,7 +107,7 @@
              placeholder="请选择"
              style="width: 100%"
              collapse-tags
              @change="changeDepartment">
            >
              <el-option
                v-for="item in approvalList"
                :key="item.id"
@@ -139,7 +139,6 @@
              placeholder="请选择"
              style="width: 100%"
              collapse-tags
              @change="changePutUnder"
            >
              <el-option v-for="item in dict.type.sys_centralized_management" :key="item.value" :label="item.label"
                         :value="item.value"/>
@@ -316,7 +315,11 @@
    disabled: {
      type: Boolean,
      default: false
    }
    },
    isShow: {
      type: Boolean,
      required: true,
    },
  },
  data() {
    return {
@@ -360,8 +363,10 @@
        year: '',
        yearInvestAmount: '',
        competentDepartmentList: [],
        managementCentralizationList: []
        managementCentralizationList: [],
      },
      subclass: '',
      largeCategory: '',
      approvalList: [],
      setTime: '',
      planStartTime: '',
@@ -373,8 +378,6 @@
      hasMore: true,
      selectOptions: [],
      accept: ['pdf', 'docx', 'xlsx', 'jpg', 'jpeg'],
      largeCategory: '',
      subclass: '',
      mapCreateInfo: {},
      demoFormRef: null,
      rules: {
@@ -392,28 +395,32 @@
  },
  mounted() {
    this.projectForm.id = this.$route.query.projectId;
    const projectForm = Cookies.get("projectForm");
    const projectForm = localStorage.getItem("projectForm");
    //初始化主管部门下拉框
    this.getApprovalList();
    if (projectForm) {
      this.projectForm = JSON.parse(projectForm);
      this.$emit('updateIsShow', true);
    } else {
      //初始化主管部门下拉框
      this.getApprovalList();
      this.projectForm.id = this.$route.query.projectId;
      // 在组件创建时获取项目信息,如果 projectId 存在
      if (this.projectForm.id) {
        this.getProjectInfo(this.projectForm.id);
      } else {
        this.getProjectCodeApi();
        this.$emit('updateIsShow', true);
      }
      // this.handleLoadMore(1);
    }
  },
  beforeDestroy() {
    Cookies.set("projectForm", JSON.stringify(this.projectForm));
    localStorage.setItem("projectForm", JSON.stringify(this.projectForm));
  },
  methods: {
    getProjectInfo(id) {
      getProject(id).then(res => {
        this.projectForm = res.data;
        this.$emit('updateIsShow', true);
      });
    },
    getApprovalList() {
@@ -424,7 +431,7 @@
    submit() {
      this.$refs["projectForm"].validate(valid => {
        if (valid) {
          if (this.projectForm.id != null) {
          if (this.projectForm.id) {
            updateProject(this.projectForm).then(response => {
              this.$modal.msgSuccess("修改成功");
              //跳转到下个组件
@@ -446,22 +453,23 @@
        this.projectForm.projectCode = res.data;
      });
    },
    changeDepartment(val) {
      if (!val.length) {
        this.largeCategory = '';
        return;
      }
      const labels = this.approvalList.filter(item => val.includes(item.id)).map(item => item.value);
      this.largeCategory = labels.join(',');
    },
    changePutUnder(val) {
      if (!val.length) {
        this.subclass = '';
        return;
      }
      const labels = this.dict.type.sys_centralized_management.filter(item => val.includes(item.value)).map(item => item.label);
      this.subclass = labels.join(',');
    },
    // changeDepartment(val) {
    //   console.log("触发事件" + val + this.approvalList)
    //   if (!val.length) {
    //     this.largeCategory = '';
    //     return;
    //   }
    //   const labels = this.approvalList.filter(item => val.includes(item.id)).map(item => item.value);
    //   this.largeCategory = labels.join(',');
    // },
    // changePutUnder(val) {
    //   if (!val.length) {
    //     this.subclass = '';
    //     return;
    //   }
    //   const labels = this.dict.type.sys_centralized_management.filter(item => val.includes(item.value)).map(item => item.label);
    //   this.subclass = labels.join(',');
    // },
    async loadDataList(newPage) {
      try {
        this.loading = true;
@@ -506,22 +514,25 @@
  },
  watch: {
    'projectForm.managementCentralizationList'(val) {
      if (val) {
        const labels = this.dict.type.sys_centralized_management
          .filter(item => val.includes(item.value))
          .map(item => item.label);
        this.subclass = labels.join(',');
      }
    },
    'projectForm.competentDepartmentList'(val) {
      if (val) {
        const labels = this.approvalList
          .filter(item => val.includes(item.id))
          .map(item => item.value);
        this.largeCategory = labels.join(',');
      }
    },
    'projectForm': {
      handler(newVal, oldVal) {
        setTimeout(() => {
          if (newVal.managementCentralizationList) {
            const labels = this.dict.type.sys_centralized_management
              .filter(item => newVal.managementCentralizationList.includes(item.value))
              .map(item => item.label);
            this.subclass = labels.join(',');
          }
          if (newVal.competentDepartmentList) {
            const labels = this.approvalList
              .filter(item => newVal.competentDepartmentList.includes(item.id))
              .map(item => item.value);
            this.largeCategory = labels.join(',');
          }
        }, 1000);
      },
      deep: true
    }
  }
};
</script>
src/views/projectEngineering/projectLibrary/component/DocumentsInfo.vue
@@ -5,10 +5,10 @@
        <el-col :span="20">
          <el-form-item label="附件:" label-width="100px" prop="appendix" style="width: 100%">
            <div style="display: flex;gap: 10px">
              <file-upload v-model="documentsInfoForm.fileList"
              <file-upload v-model="fileList"
                           :fileType="accept"
                           :isShowTip="false"/>
              <div v-if="documentsInfoForm.fileList.length === 0" style="color: #a9afbc">支持上传PDF格式文件</div>
              <div v-if="fileList.length === 0" style="color: #a9afbc">支持上传PDF格式文件</div>
            </div>
          </el-form-item>
        </el-col>
@@ -19,12 +19,6 @@
<script>
import {
  addProjectInvestmentFunding,
  editProjectInvestmentFunding,
  getProjectInvestmentFundingById
} from "@/api/projectEngineering/projectInvestmentFunding";
import Cookies from "js-cookie";
import {addDocumentInfo, getDocumentInfoById} from "@/api/projectEngineering/projectInfo";
export default {
@@ -38,20 +32,19 @@
  data() {
    return {
      documentsInfoForm: {
        fileList: [],
        projectId: ''
        // fileList: [],
        // projectId: ''
      },
      fileList: [],
      projectForm: {},
      accept: ['pdf'],
    };
  },
  methods: {
    getDocumentsInfo() {
      getDocumentInfoById(this.documentsInfoForm.projectId).then(res => {
      getDocumentInfoById(this.$route.query.projectId).then(res => {
        this.documentsInfoForm = res.data;
        if(!this.documentsInfoForm.fileList) {
          this.documentsInfoForm.fileList = []
        }
        this.fileList = this.documentsInfoForm.fileList
      });
    },
    submit() {
@@ -59,6 +52,7 @@
        this.$message.error("请先保存投资管理基本信息")
      } else {
        this.documentsInfoForm.projectId = this.projectForm.id;
        this.documentsInfoForm.fileList = this.fileList
        addDocumentInfo(this.documentsInfoForm).then(response => {
          this.$modal.msgSuccess("提交成功");
        });
@@ -66,25 +60,25 @@
    },
  },
  mounted() {
    this.documentsInfoForm.projectId = this.$route.query.projectId;
    const documentsInfoForm = Cookies.get("documentsInfoForm");
    const projectForm = Cookies.get("projectForm");
    const documentsInfoForm = localStorage.getItem("documentsInfoForm");
    const projectForm = localStorage.getItem("projectForm");
    const parsedDocumentsInfoForm = documentsInfoForm ? JSON.parse(documentsInfoForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    if (parsedDocumentsInfoForm) {
      this.documentsInfoForm = parsedDocumentsInfoForm
      if(this.documentsInfoForm.fileList) this.fileList = this.documentsInfoForm.fileList
    }
    if (parsedProjectForm) {
      this.projectForm = parsedProjectForm
    }
    // 如果路由存在id且没有缓存,视为编辑或查看,调用api
    if (this.documentsInfoForm.projectId && !parsedDocumentsInfoForm) {
    if (this.$route.query.projectId && !parsedDocumentsInfoForm) {
      this.getDocumentsInfo();
    }
  },
  beforeDestroy() {
    Cookies.set("documentsInfoForm", JSON.stringify(this.documentsInfoForm));
    if(Object.keys(this.documentsInfoForm).length !==0) localStorage.setItem("documentsInfoForm", JSON.stringify(this.documentsInfoForm));
  },
};
src/views/projectEngineering/projectLibrary/component/FileDialog.vue
@@ -55,6 +55,7 @@
<script>
import { globalHeaders } from '@/utils/request';
import {getToken} from "@/utils/auth";
export default {
  name: 'FileDialog',
@@ -107,8 +108,7 @@
      }
    },
    handleDownloadFile() {
      const self = this;
      // fetch(`${process.env.VITE_APP_BASE_API}/project/export/template`, {
      // fetch(`${process.env.VITE_APP_BASE_API}/project/info/export/template`, {
      //   method: 'GET',
      //   headers: self.upload.headers
      // })
@@ -126,6 +126,31 @@
      //   .catch(error => {
      //     console.error('文件下载失败:', error);
      //   });
      const url = process.env.VUE_APP_BASE_API + '/project/info/export/template';
      axios.post(url, [], { // 发送一个空数组而不是空对象
        responseType: 'blob', // 告诉axios期望服务器返回的是blob类型
        headers: {
          'Content-Type': 'application/json',
          Authorization: "Bearer " + getToken()
        }
      })
        .then(response => {
          // 处理文件下载
          const blob = new Blob([response.data], { type: 'application/zip' }); // 指定MIME类型为zip
          const url = window.URL.createObjectURL(blob);
          const a = document.createElement('a');
          a.style.display = 'none';
          a.href = url;
          a.download = `项目文件模板_${new Date().getTime()}.zip`;
          document.body.appendChild(a);
          a.click();
          document.body.removeChild(a);
          window.URL.revokeObjectURL(url);
        })
        .catch(error => {
          console.error('There was an error!', error);
        });
    },
    submitFileForm() {
      if (this.uploadRef) {
src/views/projectEngineering/projectLibrary/component/InvestInfo.vue
@@ -164,7 +164,6 @@
</template>
<script>
import Cookies from "js-cookie";
import {
  addProjectInvestmentInfo,
  editProjectInvestmentInfo,
@@ -179,28 +178,28 @@
      type: Boolean,
      default: false,
      required: true
    }
    },
  },
  data() {
    return {
      projectForm: {},
      investmentForm: {
        id: '',
        beCrossRegion: '',
        constructionLocation: '',
        detailedAddress: '',
        beCompensationProject: '',
        compensationReason: '',
        plannedStartDate: '',
        expectedCompletionDate: '',
        nationalIndustryClassification: '',
        industryClassification: '',
        projectNature: '',
        projectAttribute: '',
        useEarth: '',
        contentScale: '',
        code: '',
        projectId: '',
        // id: '',
        // beCrossRegion: '',
        // constructionLocation: '',
        // detailedAddress: '',
        // beCompensationProject: '',
        // compensationReason: '',
        // plannedStartDate: '',
        // expectedCompletionDate: '',
        // nationalIndustryClassification: '',
        // industryClassification: '',
        // projectNature: '',
        // projectAttribute: '',
        // useEarth: '',
        // contentScale: '',
        // code: '',
        // projectId: '',
      },
      plannedStartDate: '',
      expectedCompletionDate: '',
@@ -213,15 +212,14 @@
    };
  },
  mounted() {
    this.investmentForm.projectId = this.$route.query.projectId
    // 从Cookies中获取缓存数据
    const investmentForm = Cookies.get("investmentForm");
    const projectForm = Cookies.get("projectForm");
    const investmentForm = localStorage.getItem("investmentForm");
    const projectForm = localStorage.getItem("projectForm");
    // 尝试解析JSON数据
    const parsedInvestmentForm = investmentForm ? JSON.parse(investmentForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    console.log(parsedInvestmentForm)
    // 设置investment和projectForm对象
    if(parsedInvestmentForm) {
      this.investmentForm = parsedInvestmentForm;
@@ -230,25 +228,28 @@
      this.projectForm = parsedProjectForm;
    }
    // 如果路由存在id且没有缓存,视为编辑或查看,调用api
    if (this.investmentForm.projectId && !investmentForm) {
    if (this.$route.query.projectId && !investmentForm) {
      this.getInvestment();
    }else {
      this.investmentForm.constructionLocation = this.projectForm.area;
      this.investmentForm.detailedAddress = this.projectForm.projectAddress;
      this.investmentForm.plannedStartDate = this.projectForm.planStartTime;
      this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime;
    }
    this.investmentForm.constructionLocation = this.projectForm.area;
    this.investmentForm.detailedAddress = this.projectForm.projectAddress;
    this.investmentForm.plannedStartDate = this.projectForm.planStartTime;
    this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime;
  },
  beforeDestroy() {
    Cookies.set("investmentForm", JSON.stringify(this.investmentForm));
    if(Object.keys(this.investmentForm).length !==0) localStorage.setItem("investmentForm", JSON.stringify(this.investmentForm));
  },
  methods: {
    getInvestment() {
      getProjectInvestmentInfoById(this.investmentForm.projectId ).then(res => {
      getProjectInvestmentInfoById(this.$route.query.projectId).then(res => {
        this.investmentForm = res.data;
        this.investmentForm.constructionLocation = this.projectForm.area;
        this.investmentForm.detailedAddress = this.projectForm.projectAddress;
        this.investmentForm.plannedStartDate = this.projectForm.planStartTime;
        this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime;
          this.$nextTick(() => {
            this.investmentForm.constructionLocation = this.projectForm.area;
            this.investmentForm.detailedAddress = this.projectForm.projectAddress;
            this.investmentForm.plannedStartDate = this.projectForm.planStartTime;
            this.investmentForm.expectedCompletionDate = this.projectForm.planCompleteTime;
          })
      });
    },
    submit() {
@@ -256,7 +257,7 @@
        this.$message.error("请先保存投资管理基本信息")
      } else {
        this.investmentForm.projectId = this.projectForm.id;
        if (this.investmentForm.id != null) {
        if (this.investmentForm.id) {
          editProjectInvestmentInfo(this.investmentForm).then(response => {
            this.$modal.msgSuccess("修改成功");
            //跳转到下个组件
src/views/projectEngineering/projectLibrary/component/PolicyInfo.vue
@@ -10,10 +10,10 @@
        <el-col :span="20">
          <el-form-item label="符合行业政策:" label-width="180px" prop="industryPolicy" style="width: 100%">
            <div style="display: flex">
              <file-upload v-model="policyInfoForm.fileList"
              <file-upload v-model="fileList"
                           :fileType="accept"
                           :isShowTip="false"/>
              <div v-if="policyInfoForm.fileList.length === 0" style="color: #a9afbc; margin-left: 10px">
              <div v-if="fileList.length === 0" style="color: #a9afbc; margin-left: 10px">
                支持上传PDF格式文件
              </div>
            </div>
@@ -159,7 +159,6 @@
<script>
import Cookies from "js-cookie";
import {
  addProjectInvestmentPolicyCompliance,
  editProjectInvestmentPolicyCompliance,
@@ -173,25 +172,26 @@
      type: Boolean,
      default: false,
      required: true
    }
    },
  },
  data() {
    return {
      policyInfoForm: {
        id: '',
        projectId: '',
        fileList: [],
        belongsToIndustryAdjustmentDirectory: null,
        belongsToWesternEncouragedDirectory: null,
        notBannedOrControlledProject: true,
        informationIsTrue: true,
        specialPlanningCompliance: '',
        energyCheck: null,
        annualEnergyConsumption: '',
        annualElectricityConsumption: '',
        noOnlyCheckType: null,
        remarks: ''
        // id: '',
        // projectId: '',
        // fileList: [],
        // belongsToIndustryAdjustmentDirectory: null,
        // belongsToWesternEncouragedDirectory: null,
        // notBannedOrControlledProject: true,
        // informationIsTrue: true,
        // specialPlanningCompliance: '',
        // energyCheck: null,
        // annualEnergyConsumption: '',
        // annualElectricityConsumption: '',
        // noOnlyCheckType: null,
        // remarks: ''
      },
      fileList: [],
      accept: ['pdf'],
      rules: {
        industrialPolicyProhibition: [{required: true, message: '请选择', trigger: 'change'}],
@@ -200,35 +200,36 @@
    };
  },
  mounted() {
    this.policyInfoForm.projectId = this.$route.query.projectId;
    const policyInfoForm = Cookies.get("policyInfoForm");
    const projectForm = Cookies.get("projectForm");
    const policyInfoForm = localStorage.getItem("policyInfoForm");
    const projectForm = localStorage.getItem("projectForm");
    const parsedPolicyInfoForm = policyInfoForm ? JSON.parse(policyInfoForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    if (parsedPolicyInfoForm) {
      this.policyInfoForm = parsedPolicyInfoForm
      if(this.policyInfoForm.fileList) this.fileList = this.policyInfoForm.fileList
    }
    if (parsedProjectForm) {
      this.projectForm = parsedProjectForm
    }
    // 如果路由存在id且没有缓存,视为编辑或查看,调用api
    if (this.policyInfoForm.projectId && !parsedPolicyInfoForm) {
    if (this.$route.query.projectId && !parsedPolicyInfoForm) {
      this.getProjectInvestmentPolicyCompliance();
    } else {
      this.policyInfoForm.informationIsTrue= true;
      this.policyInfoForm.notBannedOrControlledProject = true;
    }
  },
  beforeDestroy() {
    Cookies.set("policyInfoForm", JSON.stringify(this.policyInfoForm));
    if(Object.keys(this.policyInfoForm).length !==0) localStorage.setItem("policyInfoForm", JSON.stringify(this.policyInfoForm));
  },
  methods: {
    getProjectInvestmentPolicyCompliance() {
      getProjectInvestmentPolicyComplianceById(this.policyInfoForm.projectId).then(res => {
      getProjectInvestmentPolicyComplianceById(this.$route.query.projectId).then(res => {
        this.policyInfoForm = res.data;
        if(!this.policyInfoForm.fileList) {
          this.policyInfoForm.fileList = []
        }
        this.policyInfoForm.notBannedOrControlledProject =true
        this.policyInfoForm.informationIsTrue =true
        this.policyInfoForm.notBannedOrControlledProject = true
        this.policyInfoForm.informationIsTrue = true
        this.fileList =this.policyInfoForm.fileList
      });
    },
    submit() {
@@ -238,7 +239,8 @@
        this.$refs["policyInfoFormRef"].validate(valid => {
          if (valid) {
            this.policyInfoForm.projectId = this.projectForm.id;
            if (this.policyInfoForm.id != null) {
            this.policyInfoForm.fileList = this.fileList
            if (this.policyInfoForm.id) {
              editProjectInvestmentPolicyCompliance(this.policyInfoForm).then(response => {
                this.$modal.msgSuccess("修改成功");
                //跳转到下个组件
src/views/projectEngineering/projectLibrary/component/investmentFunds.vue
@@ -205,45 +205,45 @@
      type: Boolean,
      default: false,
      required: true
    }
    },
  },
  data() {
    return {
      projectForm: {},
      investmentFundsForm: {
        id: '',
        projectId: '',
        totalInvestment: '',
        principal: '',
        governmentInvestmentTotal: '',
        centralInvestmentTotal: '',
        centralBudgetInvestment: '',
        centralFiscalInvestment: '',
        centralSpecialBondInvestment: '',
        centralSpecialFundInvestment: '',
        provincialInvestmentTotal: '',
        provincialBudgetInvestment: '',
        provincialFiscalInvestment: '',
        provincialSpecialFundInvestment: '',
        cityInvestmentTotal: '',
        cityBudgetInvestment: '',
        cityFiscalInvestment: '',
        citySpecialFundInvestment: '',
        countyInvestmentTotal: '',
        countyBudgetInvestment: '',
        countyFiscalInvestment: '',
        countySpecialFundInvestment: '',
        domesticLoanTotal: '',
        bankLoan: '',
        foreignInvestmentTotal: '',
        enterpriseSelfRaisedTotal: '',
        otherInvestmentTotal: ''
        // id: '',
        // projectId: '',
        // totalInvestment: '',
        // principal: '',
        // governmentInvestmentTotal: '',
        // centralInvestmentTotal: '',
        // centralBudgetInvestment: '',
        // centralFiscalInvestment: '',
        // centralSpecialBondInvestment: '',
        // centralSpecialFundInvestment: '',
        // provincialInvestmentTotal: '',
        // provincialBudgetInvestment: '',
        // provincialFiscalInvestment: '',
        // provincialSpecialFundInvestment: '',
        // cityInvestmentTotal: '',
        // cityBudgetInvestment: '',
        // cityFiscalInvestment: '',
        // citySpecialFundInvestment: '',
        // countyInvestmentTotal: '',
        // countyBudgetInvestment: '',
        // countyFiscalInvestment: '',
        // countySpecialFundInvestment: '',
        // domesticLoanTotal: '',
        // bankLoan: '',
        // foreignInvestmentTotal: '',
        // enterpriseSelfRaisedTotal: '',
        // otherInvestmentTotal: ''
      }
    };
  },
  methods: {
    getInvestmentFunds() {
      getProjectInvestmentFundingById(this.investmentFundsForm.projectId ).then(res => {
      getProjectInvestmentFundingById(this.$route.query.projectId).then(res => {
        this.investmentFundsForm = res.data;
      });
    },
@@ -252,7 +252,7 @@
        this.$message.error("请先保存投资管理基本信息")
      } else {
        this.investmentFundsForm.projectId = this.projectForm.id;
        if (this.investmentFundsForm.id != null) {
        if (this.investmentFundsForm.id) {
          editProjectInvestmentFunding(this.investmentFundsForm).then(response => {
            this.$modal.msgSuccess("修改成功");
            //跳转到下个组件
@@ -270,25 +270,24 @@
    },
  },
  mounted() {
    this.investmentFundsForm.projectId = this.$route.query.projectId;
    const investmentFundsForm = Cookies.get("investmentFundsForm");
    const projectForm = Cookies.get("projectForm");
    const investmentFundsForm = localStorage.getItem("investmentFundsForm");
    const projectForm = localStorage.getItem("projectForm");
    const parsedInvestmentFundsForm = investmentFundsForm ? JSON.parse(investmentFundsForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    if (parsedInvestmentFundsForm) {
      this.investmentFundsForm = parsedInvestmentFundsForm
    }
    if (parsedProjectForm){
    if (parsedProjectForm) {
      this.projectForm = parsedProjectForm
    }
    // 如果路由存在id且没有缓存,视为编辑或查看,调用api
    if (this.investmentFundsForm.projectId && !parsedInvestmentFundsForm) {
    if (this.$route.query.projectId&& !parsedInvestmentFundsForm) {
      this.getInvestmentFunds();
    }
  },
  beforeDestroy() {
    Cookies.set("investmentFundsForm", JSON.stringify(this.investmentFundsForm));
    if(Object.keys(this.investmentFundsForm).length !==0) localStorage.setItem("investmentFundsForm", JSON.stringify(this.investmentFundsForm));
  },
}
</script>
src/views/projectEngineering/projectLibrary/component/legalPerson.vue
@@ -4,12 +4,13 @@
      <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" placeholder="请输入" />
            <el-input v-model="legalPersonForm.totalInvestment" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <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-input v-model="legalPersonForm.projectUnit" class="item" clearable maxlength="255" placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
@@ -70,75 +71,84 @@
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="证件号码" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.certificateNumber" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.certificateNumber" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="注册地址" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.registeredAddress" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.registeredAddress" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="注册资金" label-width="120px" prop="projectType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.registeredCapital" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.registeredCapital" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="法人代表" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.legalRepresentative" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.legalRepresentative" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="固定电话" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.fixedPhone" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.fixedPhone" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="法人身份证号" label-width="120px" prop="projectType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.legalPersonIdcard" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.legalPersonIdcard" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="项目联系人" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.projectContactPerson" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.projectContactPerson" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="移动电话" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.phone" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.phone" class="item" clearable maxlength="255" placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="联系人身份证号" label-width="120px" prop="projectType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.contactIdcard" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.contactIdcard" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6">
          <el-form-item label="微信号" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.wechat" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.wechat" class="item" clearable maxlength="255" placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="联系人通讯地址" label-width="120px" prop="investmentType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.contactAddress" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.contactAddress" class="item" clearable maxlength="255"
                      placeholder="请输入"/>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="邮政编码" label-width="120px" prop="projectType" style="width: 100%">
            <el-input v-model.trim="legalPersonForm.postCode" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model.trim="legalPersonForm.postCode" class="item" clearable maxlength="255" placeholder="请输入"/>
          </el-form-item>
        </el-col>
      </el-row>
      <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.email" class="item" clearable  maxlength="255" placeholder="请输入" />
            <el-input v-model="legalPersonForm.email" class="item" clearable maxlength="255" placeholder="请输入"/>
          </el-form-item>
        </el-col>
      </el-row>
@@ -156,66 +166,66 @@
} from "@/api/projectEngineering/projectUnitRegistrationInfo";
export default {
  dicts: ['sys_unit_type','sys_registration_type','sys_holding_situation','sys_license_type'],
  dicts: ['sys_unit_type', 'sys_registration_type', 'sys_holding_situation', 'sys_license_type'],
  name: 'LegalPersonForm',
  props: {
    disabled: {
      type: Boolean,
      default: false,
      required: true
    }
    },
  },
  data() {
    return {
      legalPersonForm: {
        id: '',
        totalInvestment: '',
        projectUnit: '',
        projectUnitType: '',
        registrationType: '',
        holdingSituation: '',
        certificateType: '',
        certificateNumber: '',
        registeredAddress: '',
        registeredCapital: '',
        projectId: '',
        legalRepresentative: '',
        fixedPhone: '',
        legalPersonIdcard: '',
        projectContactPerson: '',
        phone: '',
        contactIdcard: '',
        wechat: '',
        contactAddress: '',
        postCode: '',
        email: ''
        // id: '',
        // totalInvestment: '',
        // projectUnit: '',
        // projectUnitType: '',
        // registrationType: '',
        // holdingSituation: '',
        // certificateType: '',
        // certificateNumber: '',
        // registeredAddress: '',
        // registeredCapital: '',
        // projectId: '',
        // legalRepresentative: '',
        // fixedPhone: '',
        // legalPersonIdcard: '',
        // projectContactPerson: '',
        // phone: '',
        // contactIdcard: '',
        // wechat: '',
        // contactAddress: '',
        // postCode: '',
        // email: ''
      },
    }
  },
  mounted() {
    this.legalPersonForm.projectId = this.$route.query.projectId;
    const legalPersonForm = Cookies.get("legalPersonForm");
    const projectForm = Cookies.get("projectForm");
    const legalPersonForm = localStorage.getItem("legalPersonForm");
    const projectForm = localStorage.getItem("projectForm");
    const parsedLegalPersonForm = legalPersonForm ? JSON.parse(legalPersonForm) : null;
    const parsedProjectForm = projectForm ? JSON.parse(projectForm) : null;
    if (parsedLegalPersonForm) {
      this.legalPersonForm = parsedLegalPersonForm
    }
    if (parsedProjectForm){
    if (parsedProjectForm) {
      this.projectForm = parsedProjectForm
    }
    // 如果路由存在id且没有缓存,视为编辑或查看,调用api
    if (this.legalPersonForm.projectId && !parsedLegalPersonForm) {
    if (this.$route.query.projectId && !parsedLegalPersonForm) {
      this.getProjectUnitRegistrationInfo();
    }
  },
  beforeDestroy() {
    Cookies.set("legalPersonForm", JSON.stringify(this.legalPersonForm));
    if(Object.keys(this.legalPersonForm).length !==0)  localStorage.setItem("legalPersonForm", JSON.stringify(this.legalPersonForm));
  },
  methods: {
    getProjectUnitRegistrationInfo() {
      getProjectUnitRegistrationInfoById(this.legalPersonForm.projectId ).then(res => {
      getProjectUnitRegistrationInfoById(this.$route.query.projectId).then(res => {
        this.legalPersonForm = res.data;
      });
    },
@@ -224,7 +234,7 @@
        this.$message.error("请先保存投资管理基本信息")
      } else {
        this.legalPersonForm.projectId = this.projectForm.id;
        if (this.legalPersonForm.id != null) {
        if (this.legalPersonForm.id) {
          editProjectUnitRegistrationInfo(this.legalPersonForm).then(response => {
            this.$modal.msgSuccess("修改成功");
            //跳转到下个组件
src/views/projectEngineering/projectLibrary/index.vue
@@ -29,10 +29,10 @@
            <el-date-picker
              style="width: 270px"
              size="small"
              v-model="queryParams[timeRange]"
              v-model="timeRange"
              type="daterange"
              range-separator="-"
              value-format="yyyy-MM-dd"
              value-format="yyyy-MM-dd HH:mm:ss"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              @change="handleQuery"
@@ -50,7 +50,8 @@
              <el-row>
                <el-col :span="12">
                  <el-form-item label="项目类型">
                    <el-select v-model="queryParams.projectType" clearable placeholder="请选择" class="select-option" @change="handleQuery"
                    <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"/>
@@ -59,7 +60,8 @@
                </el-col>
                <el-col :span="12">
                  <el-form-item label="重点分类">
                    <el-select v-model="queryParams.importanceType" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <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>
@@ -69,7 +71,8 @@
              <el-row>
                <el-col :span="12">
                  <el-form-item label="项目标签">
                    <el-select v-model="queryParams.tag" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <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>
@@ -77,7 +80,8 @@
                </el-col>
                <el-col :span="12">
                  <el-form-item label="项目状态">
                    <el-select v-model="queryParams.projectStatus" :disabled="isProjectCategory" clearable @change="handleQuery"
                    <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"/>
@@ -88,7 +92,8 @@
              <el-row>
                <el-col :span="12">
                  <el-form-item label="项目码">
                    <el-select v-model="queryParams.projectColorCode" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <el-select v-model="queryParams.projectColorCode" 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>
@@ -96,7 +101,8 @@
                </el-col>
                <el-col :span="12">
                  <el-form-item label="关联状态">
                    <el-select v-model="queryParams.assignmentStatus" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <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>
@@ -106,7 +112,8 @@
              <el-row>
                <el-col :span="12">
                  <el-form-item label="资金类型">
                    <el-select v-model="queryParams.investmentType" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <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>
@@ -114,7 +121,8 @@
                </el-col>
                <el-col :span="12">
                  <el-form-item label="项目阶段">
                    <el-select v-model="queryParams.projectPhase" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <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>
@@ -124,7 +132,8 @@
              <el-row>
                <el-col :span="12">
                  <el-form-item label="投资类别">
                    <el-select v-model="queryParams.investType" clearable placeholder="请选择" class="select-option" @change="handleQuery">
                    <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>
@@ -132,15 +141,17 @@
                </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"
                    <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"
            <el-button style="margin-right: 16px; margin-top: 1px; color: #3369ff" slot="reference"
                       size="small">
              更多筛查条件
              <span style="margin-left: 5px">
@@ -192,7 +203,6 @@
      <!-- 动态列 -->
      <el-table-column
        v-for="item in columns"
        :key="item.id"
        v-if="item.visible"
        :prop="item.id"
        :label="item.label"
@@ -217,6 +227,10 @@
            <template v-if="item.slotName === 'investType'">
              <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/>
            </template>
            <!-- planStartTime -->
            <template v-if="item.slotName === 'planStartTime'">
              {{ scope.row.planStartTime ? scope.row.planStartTime.split('-')[0] + '年' : '' }}
            </template>
          </template>
          <!-- 默认显示 -->
          <span v-else>{{ scope.row[item.id] }}</span>
@@ -224,7 +238,7 @@
      </el-table-column>
      <!-- 操作列 -->
      <el-table-column label="操作" width="140" align="center" >
      <el-table-column label="操作" width="140" align="center">
        <template slot-scope="scope">
          <el-button
            size="medium"
@@ -275,11 +289,12 @@
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',
    'sys_project_tags', 'sys_key_categories', 'sys_project_type'],
  name: "projectInfo",
  name: "ProjectInfo",
  components: {
    FileDialog
  },
@@ -322,6 +337,8 @@
        pageSize: 10,
        projectName: null,
        projectCode: null,
        projectStartTime: null,
        projectEndTime: null,
      },
      moreQueryParams: {
        projectType: '', // 项目类型
@@ -350,10 +367,10 @@
  },
  created() {
    const projectCategory = this.$route.query.projectCategory;
    if(!projectCategory || projectCategory === '1'){
    if (!projectCategory || projectCategory === '1') {
      this.isReserve = true;
    }
    if(projectCategory){
    if (projectCategory) {
      this.isProjectCategory = true;
    }
    const columns = current.map((item, index) => {
@@ -366,29 +383,32 @@
    this.defaultColumns = JSON.parse(JSON.stringify(columns));
    this.getList();
  },
  beforeDestroy() {
    this.removeStore();
  },
  methods: {
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.removeCookie();
      this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }});
      this.removeStore();
      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 }});
      this.removeStore();
      this.$router.push({path: '/projectEngineering/project/ProjectDetails', query: {projectId: row.id}});
    },
    // 新增页面
    add() {
      this.removeCookie();
      this.$router.push({ path: '/projectEngineering/project/ProjectDetails' });
      this.removeStore();
      this.$router.push({path: '/projectEngineering/project/ProjectDetails'});
    },
    //清理缓存
    removeCookie() {
      Cookies.remove("projectForm")
      Cookies.remove("investmentForm")
      Cookies.remove("investmentFundsForm")
      Cookies.remove("legalPersonForm")
      Cookies.remove("policyInfoForm")
      Cookies.remove("documentsInfoForm")
    removeStore() {
      localStorage.removeItem("projectForm")
      localStorage.removeItem("investmentForm")
      localStorage.removeItem("investmentFundsForm")
      localStorage.removeItem("legalPersonForm")
      localStorage.removeItem("policyInfoForm")
      localStorage.removeItem("documentsInfoForm")
    },
    // 重置排序的方法
    handleResetSort() {
@@ -405,7 +425,7 @@
        return item;
      });
      //强制table渲染
      this.tableKey = this.tableKey +1;
      this.tableKey = this.tableKey + 1;
    },
    // 更新列的方法
    handleUpdateColumns(row) {
@@ -418,7 +438,7 @@
      });
    },
    handleUpdateSort(row) {
      console.log( this.columns, '排序前的列');
      console.log(this.columns, '排序前的列');
      this.columns = this.columns.map(item => {
        if (item.key === row.key) {
          return row;
@@ -428,8 +448,8 @@
      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, '排序后的列');
      this.tableKey = this.tableKey + 1;
      console.log(this.columns, '排序后的列');
    },
    // 关闭文件处理弹框的方法
    fileDialogCancel() {
@@ -447,11 +467,16 @@
    /** 查询项目管理基础信息列表 */
    getList() {
      this.loading = true;
      this.queryParams.projectCategory = this.$route.query.projectCategory;
      if (this.timeRange) {
        this.queryParams.projectStartTime = this.timeRange[0]
        this.queryParams.projectEndTime = this.timeRange[1]
      }
      listProject(this.queryParams).then(response => {
        this.projectInfoList = response.data;
        this.total = response.total;
        this.loading = false;
      });
      this.loading = false;
    },
    // 取消按钮
    cancel() {
@@ -516,7 +541,6 @@
      this.multiple = !selection.length
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
@@ -535,9 +559,8 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('code/info/export', {
        ...this.queryParams
      }, `info_${new Date().getTime()}.xlsx`)
      this.isImportOrExport = true;
      this.fileDialogVisible = true;
    }
  }
};
src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -1,7 +1,7 @@
<template>
  <el-card class="card-container">
  <el-card class="card-container" >
    <div class="flex-container mb-4">
      <el-tabs v-model="currentTab" @tab-click="handleClick">
      <el-tabs v-model="currentTab" @tab-click="handleClick" v-show="isShow">
        <el-tab-pane
          v-for="item in TABS_DATA"
          :key="item.value"
@@ -19,6 +19,8 @@
      ref="childRef"
      :disabled="disabled"
      @toNext="changeTable"
      @updateIsShow="updateIsShow"
      :isShow="isShow"
      class="full-width custom-height"
    />
    <div v-if="!disabled" class="button-container">
@@ -41,6 +43,7 @@
  name: 'ProjectDetails',
  data() {
    return {
      isShow: false,
      currentTab: '项目管理基础信息',
      disabled: false,
      projectForm:{},
@@ -81,8 +84,11 @@
    };
  },
  methods: {
    updateIsShow(newValue) {
      this.isShow = newValue;
    },
    handleClick(tabTarget) {
      this.componentName = this.TABS_DATA[tabTarget.index].componentName;
        this.componentName = this.TABS_DATA[tabTarget.index].componentName;
    },
    changeTable(index) {
      this.componentName = this.TABS_DATA[index].componentName;
src/views/projectProcess/index.vue
@@ -477,8 +477,8 @@
      getProjectProcess(this.queryParams).then(response => {
        this.projectInfoList = response.data;
        this.total = response.total;
        this.loading = false;
      });
      this.loading = false;
    },
    // 取消按钮
    cancel() {