From e5c50257629f34d895b999d5d5539e026e43828e Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 29 十一月 2024 09:12:32 +0800
Subject: [PATCH] 项目库删除、详细
---
src/views/projectEngineering/projectLibrary/index.vue | 68 +++++++++++++++++++--------------
1 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue
index 5bf5bf6..b2190a7 100644
--- a/src/views/projectEngineering/projectLibrary/index.vue
+++ b/src/views/projectEngineering/projectLibrary/index.vue
@@ -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">
@@ -227,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"
@@ -278,6 +289,7 @@
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',
@@ -355,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) => {
@@ -378,16 +390,16 @@
/** 淇敼鎸夐挳鎿嶄綔 */
handleUpdate(row) {
this.removeStore();
- this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }});
+ 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 }});
+ this.$router.push({path: '/projectEngineering/project/ProjectDetails', query: {projectId: row.id,disabled: 'true' }});
},
// 鏂板椤甸潰
add() {
this.removeStore();
- this.$router.push({ path: '/projectEngineering/project/ProjectDetails' });
+ this.$router.push({path: '/projectEngineering/project/ProjectDetails'});
},
//娓呯悊缂撳瓨
removeStore() {
@@ -413,7 +425,7 @@
return item;
});
//寮哄埗table娓叉煋
- this.tableKey = this.tableKey +1;
+ this.tableKey = this.tableKey + 1;
},
// 鏇存柊鍒楃殑鏂规硶
handleUpdateColumns(row) {
@@ -426,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;
@@ -436,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() {
@@ -456,7 +468,7 @@
getList() {
this.loading = true;
this.queryParams.projectCategory = this.$route.query.projectCategory;
- if(this.timeRange){
+ if (this.timeRange) {
this.queryParams.projectStartTime = this.timeRange[0]
this.queryParams.projectEndTime = this.timeRange[1]
}
@@ -529,12 +541,11 @@
this.multiple = !selection.length
},
-
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
handleDelete(row) {
const ids = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰绠$悊鍩虹淇℃伅缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function () {
- return delInfo(ids);
+ this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰:"' + row.projectName + '"鐨勬暟鎹」锛�').then(function () {
+ return delProject(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
@@ -548,9 +559,8 @@
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
- this.download('code/info/export', {
- ...this.queryParams
- }, `info_${new Date().getTime()}.xlsx`)
+ this.isImportOrExport = true;
+ this.fileDialogVisible = true;
}
}
};
--
Gitblit v1.8.0