From 1bbbfcb0852aafba3489b0e4c617201f1aa0e0bd Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期二, 26 十一月 2024 16:03:08 +0800
Subject: [PATCH] import目录修复

---
 src/views/projectEngineering/projectLibrary/index.vue                |    2 
 src/views/projectEngineering/projectLibrary/component/BasicInfo.vue  |  529 ++++++++++++++++++++++++++++++++++++++++
 src/views/projectEngineering/projectLibrary/projectDetails.vue       |  206 +++++++++++++++
 src/views/projectProcess/index.vue                                   |    2 
 src/views/projectEngineering/projectLibrary/component/FileDialog.vue |    0 
 5 files changed, 737 insertions(+), 2 deletions(-)

diff --git a/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue
new file mode 100644
index 0000000..c649a96
--- /dev/null
+++ b/src/views/projectEngineering/projectLibrary/component/BasicInfo.vue
@@ -0,0 +1,529 @@
+<template>
+  <div class="basic-info">
+    <el-form ref="demoFormRef" :disabled="disabled" :model="projectForm" :rules="rules" class="dialog_form" :inline = "true">
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item class="item" label="椤圭洰鍚嶇О" label-width="100px" prop="projectName">
+            <el-input v-model.trim="projectForm.projectName" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item class="item" label="椤圭洰浠g爜" label-width="100px" prop="code">
+            <el-input v-model.trim="projectForm.projectCode" class="item" clearable disabled maxlength="255" placeholder="璇疯緭鍏�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" style="position: relative">
+          <div style="width: 150px; position: absolute;"><img alt="" src="../../../../assets/images/s.png" /></div>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="12">
+          <el-form-item class="item" label="寤鸿鍐呭" label-width="100px" prop="content">
+            <el-input v-model.trim="projectForm.content" style="width: 100%;"   clearable maxlength="255" placeholder="璇疯緭鍏�" type="textarea" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="璧勯噾绫诲瀷" label-width="100px" prop="fundsType" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.fundType"
+              :data="sys_funding_type"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="椤圭洰鎶曡祫绫诲埆" label-width="100px" prop="investmentType" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.investType"
+              :data="sys_investment_type"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="椤圭洰闃舵" label-width="100px" prop="fundsType" style="width: 100%">
+            <el-input v-model.trim="projectForm.projectPhase" class="item" clearable disabled maxlength="255" placeholder="璇疯緭鍏�" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="椤圭洰绫诲瀷" label-width="100px" prop="projectType" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.projectType"
+              :data="sys_project_type"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="椤圭洰鐘舵��" label-width="100px" prop="projectstatus" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.projectStatus"
+              :data="sys_project_status"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="椤圭洰涓氫富鍗曚綅" label-width="100px" prop="company" style="width: 100%">
+            <el-input v-model.trim="projectForm.projectOwnerUnit" 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="100px" style="width: 100%">
+            <el-input v-model.trim="projectForm.projectContactPerson" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="鑱旂郴鏂瑰紡" label-width="100px" prop="projectPhone" style="width: 100%">
+            <el-input v-model.trim="projectForm.contact" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="鍏宠仈宸ョ▼" label-width="100px" prop="engineering" 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%">
+              <el-option v-for="item in selectOptions" :key="item.id" :label="item.engineeringName" :value="item.id" />
+              <RemoteSelect v-if="selectOptions.length" :hasMore="hasMore" :loading="loading" :page="page" @loadMore="handleLoadMore" />
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="涓荤閮ㄩ棬" label-width="100px" prop="department" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.competentDepartmentList"
+              :data="sys_competent_department"
+              :multiple="true"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              collapse-tags
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+              @change="changeDepartment"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="琛屾斂鍖哄垝" label-width="100px" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.area"
+              :data="sys_administrative_divisions"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="绠$悊褰掑彛" label-width="100px" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.managementCentralizationList"
+              :data="sys_centralized_management"
+              :multiple="true"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              collapse-tags
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+              @change="changePutUnder"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="椤圭洰瀹℃壒绫诲瀷" label-width="100px" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.projectApprovalType"
+              :data="sys_approval_type"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="鎸夌洰褰�" label-width="100px" style="width: 100%">
+            <el-input v-model="largeCategory" clearable disabled placeholder="璇烽�夋嫨澶х被" style="width: 49%" />
+            <el-input v-model="subclass" class="ml-[2%]" clearable disabled placeholder="璇烽�夋嫨灏忕被" style="width: 49%" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="閲嶇偣鍒嗙被" label-width="100px" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.importanceType"
+              :data="sys_key_categories"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="绔嬮」鏃堕棿" label-width="100px" prop="setTime" style="width: 100%">
+            <el-date-picker v-model="setTime" placeholder="閫夋嫨鏃堕棿" style="width: 100%" type="date" @change="chaneApproval" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="璁″垝寮�宸ユ椂闂�" label-width="100px" style="width: 100%">
+            <el-date-picker v-model="planStartTime" placeholder="閫夋嫨鏃堕棿" style="width: 100%" type="date" @change="chaneStartWork" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="璁″垝绔e伐鏃堕棿" label-width="100px" style="width: 100%">
+            <el-date-picker v-model="planCompleteTime" placeholder="閫夋嫨鏃堕棿" style="width: 100%" type="date" @change="chaneCompleted" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="涓爣鍗曚綅" label-width="100px" prop="setTime" style="width: 100%">
+            <el-input v-model.trim="projectForm.winUnit" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="涓爣閲戦" label-width="100px" style="width: 100%">
+            <el-input v-model.trim="projectForm.winAmount" class="item" clearable maxlength="255" placeholder="璇疯緭鍏�" type="number" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="涓爣鏃堕棿" label-width="100px" style="width: 100%">
+            <el-date-picker v-model="winTime" placeholder="閫夋嫨鏃堕棿" style="width: 100%" type="date" @change="chaneWinTime" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20">
+        <el-col :span="6">
+          <el-form-item label="骞村害鎶曡祫璁″垝" label-width="100px" prop="year" style="width: 100%">
+            <el-tree-select
+              v-model="projectForm.year"
+              :data="sys_annual_plan"
+              :props="{ dictLabel: 'label', dictValue: 'id' }"
+              :render-after-expand="false"
+              clearable
+              placeholder="璇烽�夋嫨"
+              style="width: 100%"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="骞村害鎶曡祫閲戦" label-width="100px" prop="company" style="width: 100%; display: flex; min-width: 260px">
+            <el-input v-model.trim="projectForm.yearInvestAmount" clearable maxlength="255" placeholder="璇疯緭鍏�" style="width: 90%" type="number" />
+            <span style="margin-left: 2px">鍏�</span>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="0">
+        <el-col :span="18">
+          <el-form-item label="椤圭洰鍦板潃:" label-width="100px" prop="medicalAddr" style="width: 100%">
+            <div class="input-row">
+              <el-input v-model.trim="projectForm.address" class="input-item" disabled maxlength="255" placeholder="璇疯緭鍏�"></el-input>
+              <div v-if="!disabled" class="map-btn" @click="dialogMap = true">
+                <img alt="" src="@/assets/images/positionl.png" />
+              </div>
+            </div>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row :gutter="0">
+        <el-col :span="18">
+          <el-form-item label="瀹℃壒璁″垝涔�:" label-width="100px" prop="medicalAddr" style="width: 100%">
+            <div class="flex">
+              <upload-standard
+                :file-list.sync="projectList"
+                :accept="accept"
+                listType="text"
+                @fileListAdd="handleAdd"
+                @fileListRemove="handleRemove"
+              >
+                <el-button :icon="Upload" type="primary">涓婁紶</el-button>
+              </upload-standard>
+            </div>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <el-dialog :visible.sync="dialogMap" width="900">
+      <map-component
+        v-if="dialogMap"
+        id="dialogMapId"
+        :mapList="dialogMapList"
+        class="w-full h-[643px]"
+        @map-click="mapClick"
+        @label-click="mapCreateClick"
+      />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// import Upload from '@element-plus/icons-vue/dist/Upload.vue';
+// import MapComponent from '@/components/Map/index.vue';
+// import UploadStandard from '@/components/uploadStandard.vue';
+// import { usePlanLibrary } from '@/hooks/detailsInformation';
+// import { getList } from '@/api/engineeringLibrary/index';
+// import RemoteSelect from '@/components/RemoteSelect/index.vue';
+import { formatDate } from '@/utils';
+
+export default {
+  components: {
+    // MapComponent,
+    // UploadStandard,
+    // RemoteSelect
+  },
+  props: {
+    disabled: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      projectForm: {
+        projectName: '',
+        projectCode: '',
+        projectType: '',
+        projectStatus: '1',
+        fundType: '',
+        investType: '',
+        importanceType: '',
+        projectPhase: '鍌ㄥ瑙勫垝闃舵',
+        tag: '',
+        competentDepartment: '',
+        projectLocation: '',
+        longitude: '',
+        latitude: '',
+        managementCentralization: '',
+        projectApplicationPhase: '',
+        projectApprovalType: '',
+        investmentCatalogue: '',
+        approvalPlan: '',
+        isSetProject: '',
+        setTime: '',
+        assignmentStatus: '',
+        area: '',
+        winTime: '',
+        winUnit: '',
+        winAmount: '',
+        address: '',
+        engineeringIdList: [],
+        content: '',
+        contact: '',
+        projectOwnerUnit: '',
+        planStartTime: '',
+        planCompleteTime: '',
+        projectContactPerson: '',
+        fileIdList: [],
+        sysOssVos: [],
+        engineeringInfos: [],
+        year: '',
+        yearInvestAmount: '',
+        competentDepartmentList: [],
+        managementCentralizationList: []
+      },
+      projectList: [],
+      dialogMap: false,
+      page: 1,
+      loading: false,
+      hasMore: true,
+      selectOptions: [],
+      accept: `'pdf', 'docx', 'xlsx', 'jpg','jpeg'`,
+      largeCategory: '',
+      subclass: '',
+      mapCreateInfo: {},
+      demoFormRef: null,
+      rules: {
+        projectName: [{ required: true, message: '璇疯緭鍏ラ」鐩悕绉�', trigger: 'blur' }]
+      }
+    };
+  },
+  computed: {
+    dialogMapList() {
+      return [{
+        addr: this.projectForm.address,
+        name: '鍒涘缓'
+      }];
+    },
+    // // 鍦╒ue 2涓娇鐢� computed 鏇夸唬 sys_* 鐨勫搷搴斿紡瀛楀吀
+    // sysFundingType() {
+    //   return this.$dict.get('sys_funding_type');
+    // },
+    // sysInvestmentType() {
+    //   return this.$dict.get('sys_investment_type');
+    //   // 鍏朵粬瀛楀吀鍚岀悊
+    // }
+  },
+  created() {
+    this.handleLoadMore(1);
+  },
+  methods: {
+    changeDepartment(val) {
+      if (!val.length) {
+        this.largeCategory = '';
+        return;
+      }
+      const labels = this.sysDepartment.filter(item => val.includes(item.value)).map(item => item.label);
+      this.largeCategory = labels.join(',');
+    },
+    changePutUnder(val) {
+      // 鍚� changeDepartment 鏂规硶
+    },
+    chaneApproval(val) {
+      if (!val) return;
+      this.projectForm.setTime = formatDate(val);
+    },
+    chaneCompleted(val) {
+      if (!val) return;
+      this.projectForm.planCompleteTime = formatDate(val);
+    },
+    chaneWinTime(val) {
+      if (!val) return;
+      this.projectForm.winTime = formatDate(val);
+    },
+    chaneStartWork(val) {
+      if (!val) return;
+      this.projectForm.planStartTime = formatDate(val);
+    },
+    async loadDataList(newPage) {
+      try {
+        this.loading = true;
+        const res = await getList({ pageNum: newPage, pageSize: 10000 });
+        const list = res.rows || [];
+        if (newPage === 1) {
+          this.selectOptions = [];
+        }
+        this.selectOptions.push(...list);
+        this.hasMore = this.selectOptions.length < res.total;
+        this.page = newPage;
+      } catch (err) {
+        console.error(err);
+      } finally {
+        this.loading = false;
+      }
+    },
+    handleLoadMore(newPage) {
+      this.loadDataList(newPage);
+    },
+    mapClick({ e, addr }) {
+      this.mapCreateInfo = {
+        lon: e.lnglat.lng,
+        lat: e.lnglat.lat,
+        addr
+      };
+    },
+    mapCreateClick() {
+      const { lon, lat, addr } = this.mapCreateInfo;
+      if (lon && lat && addr) {
+        this.projectForm.longitude = lon;
+        this.projectForm.latitude = lat;
+        this.projectForm.address = addr;
+        this.$message.success('鑾峰彇鍦板潃鎴愬姛');
+        this.dialogMap = false;
+      } else {
+        this.$message.error('鑾峰彇鍧愭爣澶辫触');
+      }
+    },
+    handleRemove(file) {
+      if (file) {
+        this.projectForm.fileIdList = this.projectList.map(item => item.fileId);
+        localStorage.setItem('projectList', JSON.stringify(file));
+      }
+    },
+    handleAdd(file) {
+      if (file) {
+        localStorage.setItem('projectList', JSON.stringify(file));
+      }
+    }
+  },
+  watch: {
+    'projectForm.managementCentralizationList'(val) {
+      if (val) {
+        const labels = this.sysCentralizedManagement
+          .filter(item => val.includes(item.value))
+          .map(item => item.label);
+        this.subclass = labels.join(',');
+      }
+    },
+    'projectForm.competentDepartmentList'(val) {
+      if (val) {
+        const labels = this.sysDepartment
+          .filter(item => val.includes(item.value))
+          .map(item => item.label);
+        this.largeCategory = labels.join(',');
+      }
+    },
+    projectList: {
+      handler(val) {
+        if (val) {
+          this.projectForm.fileIdList = val.map(item => item.fileId);
+        }
+      },
+      deep: true
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.item {
+  width: 130%;
+}
+
+.input-row {
+  display: flex;
+  width: 100%;
+
+  .input-item {
+    width: 100%;
+  }
+}
+
+.map-btn {
+  width: 32px;
+  height: 32px;
+  background: #c6d6ff;
+  border: 1px solid #3369ff;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  cursor: pointer;
+
+  img {
+    width: 20px;
+  }
+}
+</style>
diff --git a/src/views/projectEngineering/component/FileDialog.vue b/src/views/projectEngineering/projectLibrary/component/FileDialog.vue
similarity index 100%
rename from src/views/projectEngineering/component/FileDialog.vue
rename to src/views/projectEngineering/projectLibrary/component/FileDialog.vue
diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue
index 7584bc8..c84ac84 100644
--- a/src/views/projectEngineering/projectLibrary/index.vue
+++ b/src/views/projectEngineering/projectLibrary/index.vue
@@ -277,7 +277,7 @@
 <script>
 import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo";
 import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list';
-import FileDialog from '@/views/projectEngineering/component/FileDialog';
+import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog';
 
 export default {
   dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases',
diff --git a/src/views/projectEngineering/projectLibrary/projectDetails.vue b/src/views/projectEngineering/projectLibrary/projectDetails.vue
new file mode 100644
index 0000000..0cd0d7e
--- /dev/null
+++ b/src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -0,0 +1,206 @@
+<template>
+  <el-card class="card-container">
+    <div class="flex justify-between mb-4">
+      <el-tabs v-model="currentTab" @tab-click="handleClick">
+        <el-tab-pane
+          v-for="item in TABS_DATA"
+          :key="item.value"
+          :label="item.label"
+          :name="item.value"
+        >
+          <template slot="label">
+            <div class="text-sm">{{ item.label }}</div>
+          </template>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+    <component :is="componentName" ref="childRef" :disabled="disabled" class="w-full h-[calc(100%-55px)]" />
+    <div v-if="!disabled" class="mt-[3%] ml-[3%] flex">
+      <el-button class="w-[72px]" type="primary" @click="submit">淇濆瓨</el-button>
+      <el-button class="w-[72px]" @click="reset">閲嶇疆</el-button>
+      <!-- <el-button v-else class="w-[72px]" @click="cancel">鍙栨秷</el-button> -->
+    </div>
+  </el-card>
+</template>
+
+<script>
+import BasicInfo from '@/views/projectEngineering/projectLibrary/component/BasicInfo';
+// import InvestInfo from '@/components/InvestInfo.vue';
+// import InvestmentFunds from '@/components/investmentFunds.vue';
+// import LegalPerson from '@/components/legalPerson.vue';
+// import PolicyInfo from '@/components/PolicyInfo.vue';
+// import DocumentsInfo from '@/components/DocumentsInfo.vue';
+import { addProject, getProject, updateProject, getProjectCode } from '@/api/projectInfo';
+
+export default {
+  data() {
+    return {
+      currentTab: '椤圭洰绠$悊鍩虹淇℃伅',
+      id: this.$route.query.id || '',
+      disabled: false,
+      componentName: 'BasicInfo',
+      TABS_DATA: [
+        {
+          label: '椤圭洰绠$悊鍩虹淇℃伅',
+          value: '椤圭洰绠$悊鍩虹淇℃伅',
+          componentName: BasicInfo
+        },
+        {
+          label: '鎶曡祫绠$悊鍩虹淇℃伅',
+          value: '浠诲姟涓嬪彂',
+          componentName: 'InvestInfo'
+        },
+        {
+          label: ' 椤圭洰鎶曡祫鍙婅祫閲戞潵婧�',
+          value: '椤圭洰鎶曡祫鍙婅祫閲戞潵婧�',
+          componentName: 'InvestmentFunds'
+        },
+        {
+          label: '椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅',
+          value: '椤圭洰(娉曚汉)鍗曚綅鐧昏淇℃伅',
+          componentName: 'LegalPerson'
+        },
+        {
+          label: '鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌',
+          value: '鎶曡祫椤圭洰浜т笟鏀跨瓥绗﹀悎鎯呭喌',
+          componentName: 'PolicyInfo'
+        },
+        {
+          label: '鐩稿叧鏂囦功',
+          value: '鐩稿叧鏂囦功',
+          componentName: 'DocumentsInfo'
+        }
+      ],
+      childRef: null,
+      // 鍋囪杩欎簺鐘舵�佹槸浠� Vuex 涓幏鍙栫殑锛屾垨鑰呬綘鍙互鐩存帴鍦� data 涓畾涔夊畠浠�
+      // projectForm, investment, investmentFunds, legalPerson, resetPlanLibrary, investmentProjectPolicyComplianceDTO, fileIdList, documentsInfoList, projectList, fileList
+    };
+  },
+  methods: {
+    handleClick(tabTarget) {
+      this.componentName = this.TABS_DATA[tabTarget.index].componentName;
+    },
+    submit() {
+      if (!this.projectForm.projectName) {
+        this.$message.error('璇疯緭鍏ラ」鐩悕绉�');
+        return;
+      }
+      if (this.projectForm.contact) {
+        const phoneRegex = /^1[3-9]\d{9}$/;
+        if (!phoneRegex.test(this.projectForm.contact)) {
+          this.$message.error('璇疯緭鍏ユ纭殑鎵嬫満鍙风爜');
+          return;
+        }
+      }
+      if (this.$refs.childRef) {
+        this.$refs.childRef.$refs.demoFormRef.validate((valid) => {
+          if (valid) {
+            const payload = {
+              projectInfoInsertDTO: this.projectForm,
+              projectInvestmentInfo: this.investment,
+              projectInvestmentFunding: this.investmentFunds,
+              projectUnitRegistrationInfo: this.legalPerson,
+              investmentProjectPolicyComplianceDTO: this.investmentProjectPolicyComplianceDTO,
+              fileIdList: this.fileIdList
+            };
+            if (this.id) {
+              updateProject(payload).then(res => {
+                if (res.code === 200) {
+                  this.$message.success(res.msg);
+                  this.$router.push({ path: '/projectEngineering/project/projectLibrary' });
+                } else {
+                  this.$message.error(res.msg);
+                }
+              });
+            } else {
+              addProject(payload).then(res => {
+                if (res.code === 200) {
+                  this.$message.success(res.msg);
+                  this.$router.push({ path: '/projectEngineering/project/projectLibrary' });
+                } else {
+                  this.$message.error(res.msg);
+                }
+              });
+            }
+          }
+        });
+      }
+    },
+    getProjectInfo(id) {
+      getProject(id, 0).then(res => {
+        if (res.data) {
+          this.investment = res.data.projectInvestmentInfo || {};
+          this.investmentFunds = res.data.projectInvestmentFunding || {};
+          this.legalPerson = res.data.projectUnitRegistrationInfo || {};
+          this.investmentProjectPolicyComplianceDTO = res.data.investmentProjectPolicyComplianceDTO || {};
+          if (res.data.investmentProjectPolicyComplianceDTO && res.data.investmentProjectPolicyComplianceDTO.sysOssVos.length > 0) {
+            this.fileList = res.data.investmentProjectPolicyComplianceDTO.sysOssVos.map(item => ({
+              fileId: item.ossId,
+              name: item.originalName,
+              url: item.url
+            }));
+          } else {
+            this.fileList = [];
+          }
+
+          if (res.data.fileIdList) {
+            this.fileIdList = res.data.fileIdList;
+            this.documentsInfoList = res.data.sysOssVos.map(item => ({
+              fileId: item.ossId,
+              name: item.originalName,
+              url: item.url
+            }));
+          }
+          this.projectForm = res.data.projectInfoInsertDTO || {};
+          this.projectList = res.data.projectInfoInsertDTO.sysOssVos.map(item => ({
+            fileId: item.ossId,
+            name: item.originalName,
+            url: item.url
+          }));
+        }
+      });
+    },
+    reset() {
+      if (this.id) {
+        this.getProjectInfo(this.id);
+      } else {
+        this.getProjectCodeApi();
+        // 鍋囪 resetPlanLibrary 鏄竴涓柟娉曪紝鐢ㄤ簬閲嶇疆鐘舵��
+        this.resetPlanLibrary();
+        this.fileList = [];
+        this.fileIdList = [];
+        this.projectList = [];
+        this.documentsInfoList = [];
+      }
+    },
+    cancel() {
+      this.$router.push({ path: '/projectEngineering/project/reserveProjects', query: { projectCategory: '1' } });
+      localStorage.removeItem('fileIdList');
+    },
+    getProjectCodeApi() {
+      getProjectCode().then(res => {
+        if (res.code === 200) {
+          this.projectForm.projectCode = res.msg;
+        }
+      });
+    },
+    // 鍋囪 resetPlanLibrary 鏄粠鏌愪釜鍦版柟寮曞叆鎴栧畾涔夌殑锛屼綘闇�瑕佺‘淇濆畠鍦ㄤ綘鐨勭粍浠朵腑鍙敤
+    // resetPlanLibrary() { ... }
+  },
+  created() {
+    // 鍦ㄧ粍浠跺垱寤烘椂鑾峰彇椤圭洰淇℃伅锛屽鏋� id 瀛樺湪
+    if (this.id) {
+      this.getProjectInfo(this.id);
+    } else {
+      this.getProjectCodeApi();
+      // 鍒濆鍖栨垨閲嶇疆鐘舵��
+      // this.resetPlanLibrary();
+    }
+  },
+
+};
+</script>
+
+<style scoped>
+/* 浣犵殑鏍峰紡 */
+</style>
diff --git a/src/views/projectProcess/index.vue b/src/views/projectProcess/index.vue
index a8d58d1..cef7b7d 100644
--- a/src/views/projectProcess/index.vue
+++ b/src/views/projectProcess/index.vue
@@ -277,7 +277,7 @@
 <script>
 import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectInfo";
 import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list';
-import FileDialog from '@/views/projectEngineering/component/FileDialog';
+import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog';
 
 export default {
   dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases',

--
Gitblit v1.8.0