From 7adbf0551f6a6b307e66cdd6537ab45fc5a2bf11 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期五, 29 十一月 2024 04:00:10 +0800 Subject: [PATCH] bug修复和页面查询 --- src/views/projectEngineering/projectLibrary/index.vue | 43 ++++++++++++++++++++++++++++--------------- 1 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/views/projectEngineering/projectLibrary/index.vue b/src/views/projectEngineering/projectLibrary/index.vue index f2db159..5bf5bf6 100644 --- a/src/views/projectEngineering/projectLibrary/index.vue +++ b/src/views/projectEngineering/projectLibrary/index.vue @@ -29,10 +29,10 @@ <el-date-picker style="width: 270px" size="small" - v-model="queryParams[timeRange]" + v-model="timeRange" type="daterange" range-separator="-" - value-format="yyyy-MM-dd" + value-format="yyyy-MM-dd HH:mm:ss" start-placeholder="寮�濮嬫棩鏈�" end-placeholder="缁撴潫鏃ユ湡" @change="handleQuery" @@ -192,7 +192,6 @@ <!-- 鍔ㄦ�佸垪 --> <el-table-column v-for="item in columns" - :key="item.id" v-if="item.visible" :prop="item.id" :label="item.label" @@ -216,6 +215,10 @@ <!-- investType鎻掓Ы --> <template v-if="item.slotName === 'investType'"> <dict-tag :options="dict.type.sys_investment_type" :value="scope.row.investType"/> + </template> + <!-- planStartTime --> + <template v-if="item.slotName === 'planStartTime'"> + {{ scope.row.planStartTime ? scope.row.planStartTime.split('-')[0] + '骞�' : '' }} </template> </template> <!-- 榛樿鏄剧ず --> @@ -279,7 +282,7 @@ 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", + name: "ProjectInfo", components: { FileDialog }, @@ -322,6 +325,8 @@ pageSize: 10, projectName: null, projectCode: null, + projectStartTime: null, + projectEndTime: null, }, moreQueryParams: { projectType: '', // 椤圭洰绫诲瀷 @@ -366,29 +371,32 @@ this.defaultColumns = JSON.parse(JSON.stringify(columns)); this.getList(); }, + beforeDestroy() { + this.removeStore(); + }, methods: { /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { - this.removeCookie(); + this.removeStore(); this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); }, handleDetail(row) { - this.removeCookie(); + this.removeStore(); this.$router.push({ path: '/projectEngineering/project/ProjectDetails', query: { projectId: row.id }}); }, // 鏂板椤甸潰 add() { - this.removeCookie(); + this.removeStore(); this.$router.push({ path: '/projectEngineering/project/ProjectDetails' }); }, //娓呯悊缂撳瓨 - removeCookie() { - Cookies.remove("projectForm") - Cookies.remove("investmentForm") - Cookies.remove("investmentFundsForm") - Cookies.remove("legalPersonForm") - Cookies.remove("policyInfoForm") - Cookies.remove("documentsInfoForm") + removeStore() { + localStorage.removeItem("projectForm") + localStorage.removeItem("investmentForm") + localStorage.removeItem("investmentFundsForm") + localStorage.removeItem("legalPersonForm") + localStorage.removeItem("policyInfoForm") + localStorage.removeItem("documentsInfoForm") }, // 閲嶇疆鎺掑簭鐨勬柟娉� handleResetSort() { @@ -447,11 +455,16 @@ /** 鏌ヨ椤圭洰绠$悊鍩虹淇℃伅鍒楄〃 */ getList() { this.loading = true; + this.queryParams.projectCategory = this.$route.query.projectCategory; + if(this.timeRange){ + this.queryParams.projectStartTime = this.timeRange[0] + this.queryParams.projectEndTime = this.timeRange[1] + } listProject(this.queryParams).then(response => { this.projectInfoList = response.data; this.total = response.total; + this.loading = false; }); - this.loading = false; }, // 鍙栨秷鎸夐挳 cancel() { -- Gitblit v1.8.0