From c57ac1aa704d5700d6949cc73ab424e70b4a9f63 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 20 二月 2025 16:54:49 +0800
Subject: [PATCH] 项目增加项目子类型字段
---
src/views/projectEngineering/projectLibrary/index.vue | 23 +++++++++++++++++++++++
src/views/projectEngineering/projectLibrary/list.js | 2 ++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue
index 5a355a4..29818cd 100644
--- a/src/views/projectEngineering/projectLibrary/index.vue
+++ b/src/views/projectEngineering/projectLibrary/index.vue
@@ -224,6 +224,10 @@
<template v-if="item.slotName === 'projectType'">
<dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/>
</template>
+<!-- <!– projectSubType鎻掓Ы –>-->
+<!-- <template v-if="item.slotName === 'projectSubType'">-->
+<!-- {{ getProjectSubType(scope.row.projectType, scope.row.projectSubType) }}-->
+<!-- </template>-->
<!-- constructionNature鎻掓Ы -->
<template v-if="item.slotName === 'constructionNature'">
<dict-tag :options="dict.type.construction_nature" :value="scope.row.constructionNature"/>
@@ -321,6 +325,7 @@
import {current, currentRest} from '@/views/projectEngineering/projectLibrary/list';
import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog';
import Cookies from "js-cookie";
+import {getChildList} from "@/api/system/dict/data";
export default {
dicts: ['sys_administrative_divisions', 'sys_investment_type', 'sys_project_phases',
@@ -427,6 +432,24 @@
this.removeStore();
},
methods: {
+ // async getProjectSubType(projectType, projectSubType) {
+ // if (!projectType || !projectSubType) {
+ // return ''
+ // }
+ // let value = '';
+ // // 鏍规嵁椤圭洰绫诲瀷鏌ュ瓙绫诲瀷
+ // const projectTypeItem = this.dict.type.sys_project_type.find(item => item.raw.dictValue === projectType);
+ // if (projectTypeItem) {
+ // const res = await getChildList(projectTypeItem.raw.dictCode);
+ // const target = res.data.filter(item => item.dictValue === projectSubType);
+ // if (target && target.length > 0) {
+ // value = target[0].dictLabel;
+ // console.log(value);
+ // }
+ // }
+ // console.log("鎷垮埌鍊间簡", value);
+ // return value;
+ // },
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.removeStore();
diff --git a/src/views/projectEngineering/projectLibrary/list.js b/src/views/projectEngineering/projectLibrary/list.js
index e1e65a8..ff04631 100644
--- a/src/views/projectEngineering/projectLibrary/list.js
+++ b/src/views/projectEngineering/projectLibrary/list.js
@@ -4,6 +4,7 @@
{id: 'coding', label: '椤圭洰鐮�', slotName: 'coding', visible: true},
{id: 'projectCode', label: '椤圭洰浠g爜', visible: true},
{id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true},
+ {id: 'projectSubType', label: '椤圭洰瀛愮被鍨�', visible: true},
{id: 'projectPhase', label: '椤圭洰闃舵', visible: true},
{id: 'constructionNature', label: '寤鸿鎬ц川', slotName: 'constructionNature', visible: true},
{id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true},
@@ -94,6 +95,7 @@
{id: 'coding', label: '椤圭洰鐮�', slotName: 'coding', visible: true},
{id: 'projectCode', label: '椤圭洰浠g爜', visible: true},
{id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true},
+ {id: 'projectSubType', label: '椤圭洰瀛愮被鍨�', visible: true},
{id: 'projectPhase', label: '椤圭洰闃舵', visible: true},
{id: 'constructionNature', label: '寤鸿鎬ц川', slotName: 'constructionNature', visible: true},
{id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true},
--
Gitblit v1.8.0