| | |
| | | placeholder="请输入"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="position: relative"> |
| | | <div style="width: 100%; height: 100%; position: absolute;"> |
| | | <el-col :span="5"> |
| | | <el-form-item class="item" label="赋码" label-width="50px" prop="coding"> |
| | | <template slot-scope="scope"> |
| | | <!-- <div class="yellow-dot" v-if="scope.row.coding === 'yellow'"></div>--> |
| | | <!-- <div class="green-dot" v-if="scope.row.coding === 'green'"></div>--> |
| | | <!-- <div class="red-dot" v-if="scope.row.coding === 'red'"></div>--> |
| | | <div class="red-dot"></div> |
| | | <tag-list></tag-list> |
| | | </template> |
| | | </el-form-item> |
| | | <!-- <img alt="" src="../../../../assets/images/s.png"/>--> |
| | | </div> |
| | | <template slot-scope="scope"> |
| | | <!-- <div class="yellow-dot" v-if="scope.row.coding === 'yellow'"></div>--> |
| | | <!-- <div class="green-dot" v-if="scope.row.coding === 'green'"></div>--> |
| | | <!-- <div class="red-dot" v-if="scope.row.coding === 'red'"></div>--> |
| | | <div class="red-dot"></div> |
| | | </template> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | <el-form-item label="标签" label-width="50px" prop="tag"> |
| | | <template slot-scope="scope"> |
| | | <tag-list :tag-list="tagList" ref="tagList" @getTags="getTagList"></tag-list> |
| | | </template> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="建设性质" label-width="100px" prop="constructionNature" style="width: 100%; min-width: 260px"> |
| | | <el-select |
| | | v-model="projectForm.constructionNature" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in dict.type.construction_nature" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-form-item label="建设性质" label-width="100px" prop="constructionNature" |
| | | style="width: 100%; min-width: 260px"> |
| | | <el-select |
| | | v-model="projectForm.constructionNature" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in dict.type.construction_nature" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="招商引资项目" label-width="100px" prop="attractInvestment" |
| | | style="width: 100%; min-width: 260px"> |
| | | <el-select |
| | | v-model="projectForm.attractInvestment" |
| | | clearable |
| | | placeholder="请选择" |
| | | style="width: 100%" |
| | | > |
| | | <el-option v-for="item in dict.type.attract_investment" :key="item.value" :label="item.label" |
| | | :value="item.value"/> |
| | | </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="projectType" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectType" clearable placeholder="请选择" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectType" @change="getChildSelect" clearable placeholder="请选择" style="width: 100%"> |
| | | <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="6"> |
| | | <el-form-item label="项目子类型" label-width="100px" prop="projectSubType" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectSubType" :disabled="projectForm.projectType === ''" clearable placeholder="请选择" style="width: 100%"> |
| | | <el-option v-for="item in projectSubTypeList" :key="item.dictCode + 'zd'" :label="item.dictLabel" |
| | | :value="item.dictValue"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="项目状态" label-width="100px" prop="projectstatus" style="width: 100%"> |
| | | <el-select v-model="projectForm.projectStatus" clearable placeholder="请选择" @change="handleProjectStatusChange" style="width: 100%"> |
| | |
| | | placeholder="请输入"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="6">--> |
| | | <!-- <el-form-item label="项目业主单位" label-width="100px" prop="projectOwnerUnit" style="width: 100%">--> |
| | | <!-- <el-input v-model.trim="projectForm.projectOwnerUnit" class="item" clearable maxlength="255"--> |
| | | <!-- placeholder="请输入"/>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="6">--> |
| | | <!-- <el-form-item label="项目业主单位" label-width="100px" prop="projectOwnerUnit" 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-col> |
| | | <el-col :span="6"> |
| | | <!-- TODO:暂时不做 --> |
| | | <el-form-item label="关联工程" label-width="100px" prop="engineering" style="width: 100%"> |
| | | <el-form-item label="项目业主单位" label-width="100px" prop="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"/> |
| | | <!-- <el-select v-model="projectForm.engineeringIdList" :multiple="true" collapse-tags placeholder="请选择"--> |
| | | <!-- style="width: 100%">--> |
| | | <!-- <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />--> |
| | | |
| | | <treeselect v-model="projectForm.projectOwnerUnit" :options="selectOptions" :normalizer="normalizer" placeholder="选择单位" /> |
| | | <!-- <RemoteSelect v-if="selectOptions.length" :hasMore="hasMore" :loading="loading" :page="page" @loadMore="handleLoadMore" />--> |
| | | </el-select> |
| | | <!-- </el-select>--> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="行业主管部门" label-width="100px" prop="industryCompetentDepartment" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.industryCompetentDepartment" |
| | | clearable |
| | | @change="handleDepartmentChange" |
| | | placeholder="请选择" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="item in approvalList" |
| | | :key="item.id" |
| | | :value="item.id" |
| | | :label="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系人" label-width="100px" style="width: 100%"> |
| | | <el-select |
| | | v-model="projectForm.industryCompetentDepartmentPerson" |
| | | clearable |
| | | placeholder="请选择" |
| | | @change="handleContactChange" |
| | | style="width: 100%;" |
| | | > |
| | | <el-option |
| | | v-for="person in personList" |
| | | :key="person.userId" |
| | | :value="person.userId" |
| | | :label="person.nickName" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="联系人联系方式" label-width="100px" style="width: 100%"> |
| | | <el-input |
| | | v-model="projectForm.departmentPersonPhone" |
| | | clearable |
| | | placeholder="请输入联系方式" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | <div class="label"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="7"> |
| | | <el-form-item label="年度投资金额" label-width="100px" prop="company" style="width: 100%; min-width: 260px"> |
| | | <el-input v-model.trim="yearPlan.yearTotalMoney" clearable maxlength="255" placeholder="请输入" |
| | | style="width: 90%" type="number"/> |
| | | <span style="margin-left: 2px">元</span> |
| | | <span style="margin-left: 2px">万元</span> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | |
| | | |
| | | <script> |
| | | // import Upload from '@element-plus/icons-vue/dist/Upload.vue'; |
| | | import Treeselect from '@riophae/vue-treeselect' |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import Map from '@/views/components/Map/index.vue'; |
| | | import TagList from "./TagList.vue"; |
| | | // import MapMouseEvent from '@/views/components/Map/types'; |
| | |
| | | // import { getList } from '@/api/engineeringLibrary/index'; |
| | | // import RemoteSelect from '@/components/RemoteSelect/index.vue'; |
| | | import Cookies from "js-cookie"; |
| | | import {addProject, getProject, updateProject, getProjectCode} from '@/api/projectEngineering/projectInfo'; |
| | | import {approvalList} from "@/api/system/dept"; |
| | | import {addProject, getProject, updateProject, getProjectCode, editProject} from '@/api/projectEngineering/projectInfo'; |
| | | import {approvalList,listDept} from "@/api/system/dept"; |
| | | import {getByDept} from "@/api/system/user"; |
| | | import {getChildList, getDicts} from "@/api/system/dict/data"; |
| | | import log from "@/views/monitor/job/log"; |
| | | import { deptList2 } from '../../../../api/system/dept' |
| | | |
| | | export default { |
| | | name: 'BasicInfo', |
| | | dicts: ['sys_funding_type', 'sys_investment_type', 'sys_project_type', 'sys_project_status', 'sys_competent_department' |
| | | , 'sys_administrative_divisions', 'sys_centralized_management', 'sys_approval_type', 'sys_key_categories', 'sys_annual_plan', 'construction_nature'], |
| | | , 'sys_administrative_divisions', 'sys_centralized_management', 'sys_approval_type', 'sys_key_categories', 'sys_annual_plan' |
| | | , 'construction_nature', 'attract_investment'], |
| | | components: { |
| | | Treeselect, |
| | | Map, |
| | | TagList, |
| | | // UploadStandard, |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | tagList: [], |
| | | projectSubTypeList: [], // 项目子类型 |
| | | projectForm: { |
| | | id: '', |
| | | projectName: '', |
| | | attractInvestment: '', |
| | | projectCode: '', |
| | | projectType: '', |
| | | projectSubType: '', |
| | | projectStatus: 'pendding', |
| | | fundType: '', |
| | | investType: '', |
| | |
| | | projectImageProgress: '', |
| | | }], |
| | | projectAddress: '', |
| | | engineeringIdList: [], |
| | | engineeringIdList: null, |
| | | content: '', |
| | | constructionNature: '', |
| | | contact: '', |
| | |
| | | engineeringInfos: [], |
| | | competentDepartmentList: [], |
| | | managementCentralizationList: [], |
| | | remark: '' |
| | | remark: '', |
| | | industryCompetentDepartment: null, |
| | | industryCompetentDepartmentPerson: null, |
| | | departmentPersonPhone: null, |
| | | }, |
| | | personList: [], |
| | | subclass: '', |
| | | largeCategory: '', |
| | | approvalList: [], |
| | |
| | | page: 1, |
| | | loading: false, |
| | | hasMore: true, |
| | | deptOptions: [], |
| | | selectOptions: [], |
| | | accept: ['pdf', 'docx', 'xlsx', 'jpg', 'jpeg'], |
| | | mapCreateInfo: {}, |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getDeptList(); |
| | | |
| | | this.projectForm.id = this.$route.query.projectId; |
| | | const projectForm = localStorage.getItem("projectForm"); |
| | | //初始化主管部门下拉框 |
| | | this.getApprovalList(); |
| | | |
| | | if (projectForm) { |
| | | this.projectForm = JSON.parse(projectForm); |
| | | if (this.projectForm.industryCompetentDepartment) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(this.projectForm.industryCompetentDepartment).then((res) => { |
| | | this.personList = res.data; |
| | | }) |
| | | } |
| | | if (this.projectForm.projectType) { |
| | | // 根据项目类型查子类型 |
| | | getDicts("sys_project_type").then(res => { |
| | | const projectType = res.data.find(item => item.dictValue === this.projectForm.projectType); |
| | | if (projectType) { |
| | | getChildList(projectType.dictCode).then(res => { |
| | | this.projectSubTypeList = res.data |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | this.$emit('updateIsShow', true); |
| | | } else { |
| | | this.projectForm.id = this.$route.query.projectId; |
| | |
| | | } |
| | | // this.handleLoadMore(1); |
| | | } |
| | | console.log(this.projectForm, "原始值") |
| | | this.$nextTick(() => { |
| | | console.log("设置了") |
| | | this.tagList = this.projectForm.tag ? this.projectForm.tag.split(",") : [] |
| | | console.log(this.tagList) |
| | | }) |
| | | }, |
| | | beforeDestroy() { |
| | | // localStorage.setItem("projectForm", JSON.stringify(this.projectForm)); |
| | | localStorage.setItem("projectForm", JSON.stringify(this.projectForm)); |
| | | }, |
| | | methods: { |
| | | getTagList(list) { |
| | | console.log("拿到了") |
| | | if (!list || list.length < 1) { |
| | | this.projectForm.tag = '' |
| | | } else { |
| | | this.projectForm.tag = list.join(","); |
| | | } |
| | | }, |
| | | getChildSelect(select) { |
| | | this.projectForm.projectSubType = '' |
| | | if (select) { |
| | | getChildList(this.dict.type.sys_project_type.filter(item => item.raw.dictValue === select)[0].raw.dictCode).then(res => { |
| | | this.projectSubTypeList = res.data |
| | | }) |
| | | } |
| | | }, |
| | | /** 转换部门数据结构 */ |
| | | normalizer(node) { |
| | | if (node.children && !node.children.length) { |
| | | delete node.children; |
| | | } |
| | | return { |
| | | id: node.deptId, |
| | | label: node.deptName, |
| | | children: node.children |
| | | }; |
| | | }, |
| | | // 监听联系人选择事件 |
| | | handleContactChange(userId) { |
| | | if (userId) { |
| | | // 根据选中的userId查找对应的联系人 |
| | | const selectedPerson = this.personList.find(person => person.userId === userId); |
| | | if (selectedPerson) { |
| | | // 将联系人的phone字段回填到联系电话输入框 |
| | | this.projectForm.departmentPersonPhone = selectedPerson.phonenumber; |
| | | } else { |
| | | // 如果未找到联系人,清空联系电话 |
| | | this.projectForm.departmentPersonPhone = ''; |
| | | } |
| | | } else { |
| | | // 如果userId为空,清空联系电话 |
| | | this.projectForm.departmentPersonPhone = ''; |
| | | } |
| | | }, |
| | | handleDepartmentChange(departmentId) { |
| | | if (departmentId) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(departmentId).then((res) => { |
| | | this.personList = res.data; |
| | | }) |
| | | } else { |
| | | // 如果未选择部门,清空人员列表 |
| | | this.personList = []; |
| | | } |
| | | this.$set(this.projectForm, 'industryCompetentDepartmentPerson', null); |
| | | this.$set(this.projectForm, 'departmentPersonPhone', ''); |
| | | }, |
| | | addWinUnit() { |
| | | this.projectForm.winUnitList.push({ |
| | | winUnit: '', |
| | |
| | | getProjectInfo(id) { |
| | | getProject(id).then(res => { |
| | | this.projectForm = res.data; |
| | | if (this.projectForm.industryCompetentDepartment) { |
| | | // 根据选中的部门ID查询人员 |
| | | getByDept(this.projectForm.industryCompetentDepartment).then((res) => { |
| | | this.personList = res.data; |
| | | }) |
| | | } |
| | | if (this.projectForm.projectType) { |
| | | // 根据项目类型查子类型 |
| | | getDicts("sys_project_type").then(res => { |
| | | const projectType = res.data.find(item => item.dictValue === this.projectForm.projectType); |
| | | if (projectType) { |
| | | getChildList(projectType.dictCode).then(res => { |
| | | this.projectSubTypeList = res.data |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | this.$emit('updateIsShow', true); |
| | | |
| | | console.log(this.projectForm, "原始值") |
| | | this.$nextTick(() => { |
| | | console.log("设置了") |
| | | this.tagList = this.projectForm.tag ? this.projectForm.tag.split(",") : [] |
| | | console.log(this.tagList) |
| | | }) |
| | | }); |
| | | }, |
| | | getApprovalList() { |
| | |
| | | this.approvalList = res.data; |
| | | }); |
| | | }, |
| | | getDeptList(){ |
| | | listDept().then(response => { |
| | | console.log(response.data) |
| | | |
| | | this.selectOptions = this.handleTree(response.data, "deptId"); |
| | | }); |
| | | }, |
| | | |
| | | submit(usedStatus) { |
| | | this.$refs["projectForm"].validate(valid => { |
| | | if (valid) { |
| | |
| | | // this.subclass = labels.join(','); |
| | | // }, |
| | | async loadDataList(newPage) { |
| | | |
| | | try { |
| | | this.loading = true; |
| | | const res = await getList({pageNum: newPage, pageSize: 10000}); |