From af8996daf8ec97e4da6a6263860fa5394b75b6ba Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 27 二月 2025 09:51:45 +0800
Subject: [PATCH] 流程推进页面展示工程
---
src/views/projectEngineering/projectLibrary/list.js | 8
src/views/engineering/index.vue | 22 +
src/views/projectProcess/index.vue | 47 +--
src/views/projectProcess/index-copy.vue | 640 +++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 670 insertions(+), 47 deletions(-)
diff --git a/src/views/engineering/index.vue b/src/views/engineering/index.vue
index ff5a68f..3dfc4a5 100644
--- a/src/views/engineering/index.vue
+++ b/src/views/engineering/index.vue
@@ -76,7 +76,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
- @click="handleDelete"
+ @click="deleteByIds"
v-hasPermi="['code:engineering:remove']"
>鍒犻櫎</el-button>
</el-col>
@@ -102,7 +102,7 @@
<dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/>
</template>
</el-table-column>
- <el-table-column label="鎶曡祫棰�" align="center" prop="investmentAmount" />
+ <el-table-column label="鎶曡祫棰�(涓�)" align="center" prop="investmentAmount" />
<el-table-column label="寮�宸ョ姸鎬�" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_project_status" :value="scope.row.status"/>
@@ -121,7 +121,7 @@
size="mini"
type="text"
icon="el-icon-delete"
- @click="handleDelete(scope.row)"
+ @click="deleteById(scope.row)"
v-hasPermi="['code:engineering:remove']"
>鍒犻櫎</el-button>
</template>
@@ -193,7 +193,7 @@
</template>
<script>
-import { getProjectEngineerings, getProjectEngineeringById, deleteProjectEngineeringByIds, editProjectEngineering, addProjectEngineering } from "@/api/projectEngineering/projectEngineering";
+import { getProjectEngineerings, getProjectEngineeringById, deleteProjectEngineeringByIds, deleteProjectEngineeringById, editProjectEngineering, addProjectEngineering } from "@/api/projectEngineering/projectEngineering";
import {list} from "@/api/projectEngineering/projectInfo";
export default {
@@ -332,10 +332,18 @@
}
});
},
+ deleteById(row) {
+ this.$modal.confirm('鏄惁纭鍒犻櫎閫変腑宸ョ▼锛�').then(function() {
+ return deleteProjectEngineeringById(row.id);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => {});
+ },
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎宸ョ▼搴撶紪鍙蜂负"' + ids + '"鐨勬暟鎹」锛�').then(function() {
+ deleteByIds() {
+ const ids = this.ids;
+ this.$modal.confirm('鏄惁纭鍒犻櫎閫変腑宸ョ▼锛�').then(function() {
return deleteProjectEngineeringByIds(ids);
}).then(() => {
this.getList();
diff --git a/src/views/projectEngineering/projectLibrary/list.js b/src/views/projectEngineering/projectLibrary/list.js
index ea2eb19..4f6c975 100644
--- a/src/views/projectEngineering/projectLibrary/list.js
+++ b/src/views/projectEngineering/projectLibrary/list.js
@@ -196,7 +196,7 @@
{id: 'projectOwnerUnitName', label: '涓氫富鍗曚綅', visible: true},
{id: 'coding', label: '椤圭洰鐮�', slotName: 'coding', visible: true},
{id: 'projectCode', label: '椤圭洰浠g爜', visible: true},
- {id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true},
+ {id: 'projectType', label: '椤圭洰鎺ㄨ繘绫诲瀷', slotName: 'projectType', visible: true},
{id: 'projectPhase', label: '椤圭洰闃舵', visible: true},
{id: 'constructionNature', label: '寤鸿鎬ц川', slotName: 'constructionNature', visible: true},
{id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true},
@@ -216,10 +216,6 @@
{id: 'importanceType', label: '閲嶇偣鍒嗙被', slotName: 'importanceType', visible: false},
{id: 'setTime', label: '绔嬮」鏃堕棿', visible: false},
{id: 'planCompleteTime', label: '璁″垝绔e伐鏃堕棿', 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},
@@ -286,7 +282,7 @@
{id: 'projectOwnerUnitName', label: '涓氫富鍗曚綅', visible: true},
{id: 'coding', label: '椤圭洰鐮�', slotName: 'coding', visible: true},
{id: 'projectCode', label: '椤圭洰浠g爜', visible: true},
- {id: 'projectType', label: '椤圭洰绫诲瀷', slotName: 'projectType', visible: true},
+ {id: 'projectType', label: '椤圭洰鎺ㄨ繘绫诲瀷', slotName: 'projectType', visible: true},
{id: 'projectPhase', label: '椤圭洰闃舵', visible: true},
{id: 'constructionNature', label: '寤鸿鎬ц川', slotName: 'constructionNature', visible: true},
{id: 'totalInvestment', label: '鎬绘姇璧勯', visible: true},
diff --git a/src/views/projectProcess/index-copy.vue b/src/views/projectProcess/index-copy.vue
new file mode 100644
index 0000000..5a24dde
--- /dev/null
+++ b/src/views/projectProcess/index-copy.vue
@@ -0,0 +1,640 @@
+<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="椤圭洰浠g爜" 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="queryParams[timeRange]"
+ type="daterange"
+ range-separator="-"
+ value-format="yyyy-MM-dd"
+ 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="500" 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.coding" 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">
+ <div>
+ <el-button @click="handleExport" size="small">
+ <svg-icon icon-class="exportIcon" style="margin-right: 8px"/>
+ 瀵煎嚭鏁版嵁
+ </el-button>
+ <el-button :disabled="!isReserve" @click="handleImport" size="small">
+ <svg-icon icon-class="importIcon" style="margin-right: 8px"/>
+ 瀵煎叆鏁版嵁
+ </el-button>
+ </div>
+ <div class="add-btn">
+ <el-tooltip content="鏂板" effect="dark" placement="top">
+ <el-button :disabled="!isReserve" circle icon="el-icon-plus" @click="add()" size="small"/>
+ </el-tooltip>
+ </div>
+ <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="100%"
+ sortable="custom"
+ :show-overflow-tooltip="true">
+ <el-table-column type="selection" width="55" align="center"/>
+ <!-- 鍔ㄦ�佸垪 -->
+ <el-table-column
+ v-for="item in columns"
+ :key="item.id"
+ v-if="item.visible"
+ :prop="item.id"
+ :label="item.label"
+ :min-width="item.minWidth"
+ :show-overflow-tooltip="item.showOverflowTooltip"
+ >
+ <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>
+ <!-- coding鎻掓Ы -->
+ <template v-if="item.slotName === 'coding' || item.slotName === 'coding'">
+ <dict-tag :options="dict.type.sys_project_code" :value="scope.row.coding"/>
+ </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>
+ </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"
+ v-if="scope.row.processInsId"
+ @click="lookProcessDetail(scope.row)"
+ >
+ </el-button>
+ <!-- <el-button-->
+ <!-- v-if="isReserve"-->
+ <!-- size="medium"-->
+ <!-- type="text"-->
+ <!-- icon="el-icon-edit"-->
+ <!-- @click="handleUpdate(scope.row)"-->
+ <!-- >-->
+ <!-- </el-button>-->
+ <el-tooltip content="娴佺▼" placement="top" effect="light" :enterable="false">
+ <el-button
+ v-if="isReserve"
+ size="medium"
+ type="text"
+ icon="el-icon-s-operation"
+ @click="openOpProcess(scope.row)"
+ >
+ </el-button>
+ </el-tooltip>
+ </template>
+ </el-table-column>
+ </el-table>
+
+ <pagination
+ v-show="total>0"
+ :total="total"
+ :page.sync="queryParams.currentPage"
+ :limit.sync="queryParams.pageSize"
+ @pagination="getList"
+ />
+
+ <FileDialog
+ :fileDialogVisible.sync="fileDialogVisible"
+ :isImportOrExport="isImportOrExport"
+ @fileDialogCancel="fileDialogCancel"
+ :currentColumns="columns"
+ />
+
+ <RunProcess ref="runProcess" :show="showRunProcess"
+ :now-process-def-id="nowProcessDefId"
+ :now-process-ins-id="nowProcessInsId"
+ :project-info="projectRunFrom"
+ :process-list="processList"
+ @close="closeRunProcess">
+ </RunProcess>
+ </div>
+</template>
+
+<script>
+import { listDefinition } from "@/api/flowable/definition";
+import {listInfo, getInfo, delInfo, addInfo, updateInfo} from "@/api/projectEngineering/projectInfo";
+import { getProjectProcess } from "@/api/projectProcess/projectProcess"
+import {projectProcessCurrent, projectProcessCurrentRest} from '@/views/projectEngineering/projectLibrary/list';
+import FileDialog from '@/views/projectEngineering/projectLibrary/component/FileDialog';
+import RunProcess from "@/views/projectProcess/components/RunProcess";
+import {getProcessConfigInfoList} from "@/api/projectProcess/processConfigInfo";
+
+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",
+ components: {
+ FileDialog, RunProcess
+ },
+ data() {
+ return {
+ projectRunFrom: {
+ projectId: null,
+ projectName: ''
+ },
+ processList: [],
+ showRunProcess: false,
+ nowProcessDefId: '',
+ nowProcessInsId: '',
+ 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: {
+ currentPage: 1,
+ pageSize: 10,
+ projectName: null,
+ projectCode: null,
+ },
+ moreQueryParams: {
+ projectType: '', // 椤圭洰绫诲瀷
+ importanceType: '', // 閲嶇偣鍒嗙被
+ projectStatus: '', // 椤圭洰鐘舵��
+ coding: '', // 椤圭洰鐮�
+ investmentType: '', // 璧勯噾绫诲瀷
+ projectPhase: '', // 椤圭洰闃舵
+ investType: '', // 鎶曡祫绫诲埆
+ area: '', // 琛屾斂鍖哄垝
+ assignmentStatus: '', //鍏宠仈鐘舵��
+ tag: '' //椤圭洰鏍囩
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ projectName: [
+ {required: true, message: "椤圭洰鍚嶇О涓嶈兘涓虹┖", trigger: "blur"}
+ ],
+ projectStatus: [
+ {required: true, message: "椤圭洰鐘舵�佷笉鑳戒负绌�", trigger: "change"}
+ ],
+ }
+ };
+ },
+ created() {
+ const projectCategory = this.$route.query.projectCategory;
+ if(!projectCategory || projectCategory === '1'){
+ this.isReserve = true;
+ }
+ if(projectCategory){
+ this.isProjectCategory = true;
+ }
+ const columns = projectProcessCurrent.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();
+ },
+ methods: {
+ // 鏌ョ湅璇︽儏
+ lookProcessDetail(row) {
+ sessionStorage.removeItem("projectProDetail")
+ this.$router.push({
+ path: '/projectFlow/detail',
+ query: {
+ projectId: row.id,
+ processDefId: row.processDefId,
+ processInsId: row.processInsId,
+ deployId: row.deployId,
+ processName: row.flowableProcessName
+ }
+ })
+ },
+ closeRunProcess() {
+ this.projectRunFrom = {
+ projectId: null,
+ projectName: ''
+ }
+ this.nowProcessDefId = "";
+ this.nowProcessInsId = "";
+ this.showRunProcess = false
+ this.getList()
+ },
+ // 鎵撳紑娴佺▼椤甸潰
+ openOpProcess(row) {
+ this.nowProcessDefId = row.processDefId ? row.processDefId : '';
+ this.nowProcessInsId = row.processInsId ? row.processInsId : '';
+ // // 闃叉锛歩d娌″彉涓嶈Е鍙戠洃鍚�
+ // this.$refs.runProcess.setSelect(row.flowableProcessId);
+ this.projectRunFrom.projectId = row.id;
+ this.projectRunFrom.projectName = row.projectName;
+
+ this.showRunProcess = true;
+ // 鎷垮埌娴佺▼鍒楄〃 TODO 鏍规嵁椤圭洰绫诲瀷鍋氱瓫閫�
+ // getProcessConfigInfoList().then(response => {
+ // this.processList = response.data;
+ //
+ // });
+ },
+ // 閲嶇疆鎺掑簭鐨勬柟娉�
+ handleResetSort() {
+ this.defaultColumns = projectProcessCurrentRest.map((item, index) => {
+ item.index = index + 1;
+ item.key = index;
+ item.serialNumber = index + 1
+ return item;
+ });
+ this.columns = projectProcessCurrentRest.map((item, index) => {
+ item.index = index + 1;
+ item.key = index;
+ item.serialNumber = index + 1
+ return item;
+ });
+ },
+ // 鏇存柊鍒楃殑鏂规硶
+ 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;
+ getProjectProcess(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.currentPage = 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
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "娣诲姞椤圭洰绠$悊鍩虹淇℃伅";
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.reset();
+ const id = row.id || this.ids
+ getInfo(id).then(response => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "淇敼椤圭洰绠$悊鍩虹淇℃伅";
+ });
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ if (this.form.id != null) {
+ updateInfo(this.form).then(response => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addInfo(this.form).then(response => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ 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.download('code/info/export', {
+ ...this.queryParams
+ }, `info_${new Date().getTime()}.xlsx`)
+ }
+ }
+};
+</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>
diff --git a/src/views/projectProcess/index.vue b/src/views/projectProcess/index.vue
index 5a24dde..93aafd2 100644
--- a/src/views/projectProcess/index.vue
+++ b/src/views/projectProcess/index.vue
@@ -179,48 +179,27 @@
</el-form>
<el-table
- :key="tableKey"
ref="elTable"
style="margin-top: 20px"
v-loading="loading"
:data="projectInfoList"
- @selection-change="handleSelectionChange"
height="100%"
sortable="custom"
+ row-key="id"
+ border
+ default-expand-all
+ :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
:show-overflow-tooltip="true">
- <el-table-column type="selection" width="55" align="center"/>
- <!-- 鍔ㄦ�佸垪 -->
- <el-table-column
- v-for="item in columns"
- :key="item.id"
- v-if="item.visible"
- :prop="item.id"
- :label="item.label"
- :min-width="item.minWidth"
- :show-overflow-tooltip="item.showOverflowTooltip"
- >
+ <el-table-column label="椤圭洰鍚嶇О" prop="projectName" />
+ <el-table-column label="椤圭洰鎺ㄨ繘绫诲瀷" align="center" prop="projectType">
<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>
- <!-- coding鎻掓Ы -->
- <template v-if="item.slotName === 'coding' || item.slotName === 'coding'">
- <dict-tag :options="dict.type.sys_project_code" :value="scope.row.coding"/>
- </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>
- </template>
- <!-- 榛樿鏄剧ず -->
- <span v-else>{{ scope.row[item.id] }}</span>
+ <dict-tag :options="dict.type.sys_project_type" :value="scope.row.projectType"/>
+ </template>
+ </el-table-column>
+ <el-table-column label="鎶曡祫棰�(涓�)" align="center" prop="investmentAmount" />
+ <el-table-column label="寮�宸ョ姸鎬�" align="center" prop="status">
+ <template slot-scope="scope">
+ <dict-tag :options="dict.type.sys_project_status" :value="scope.row.status"/>
</template>
</el-table-column>
--
Gitblit v1.8.0