明树Git Lab

Commit d3e79971 authored by zhanghan's avatar zhanghan

增加搜索条件

parent ea4b8bb4
Pipeline #108558 passed with stage
in 20 seconds
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
:placeholder="placeholder" :placeholder="placeholder"
:no-data-text="noDataText" :no-data-text="noDataText"
:disabled="disabled" :disabled="disabled"
:clearable="clearable"
style="width: 100%" style="width: 100%"
@change="handleChange" @change="handleChange"
> >
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
:disabled="disabled" :disabled="disabled"
@change="handleChange" @change="handleChange"
class="common-radio-group" class="common-radio-group"
:clearable="clearable"
> >
<el-radio <el-radio
v-for="(item, index) in currentOptions" v-for="(item, index) in currentOptions"
...@@ -62,6 +64,11 @@ const props = defineProps({ ...@@ -62,6 +64,11 @@ const props = defineProps({
type: String, type: String,
default: "name", default: "name",
}, },
clearable: {
type: Boolean,
default: true,
},
// 可选:自定义选项值字段(默认key) // 可选:自定义选项值字段(默认key)
valueKey: { valueKey: {
type: String, type: String,
...@@ -133,7 +140,7 @@ watch( ...@@ -133,7 +140,7 @@ watch(
(newVal) => { (newVal) => {
innerValue.value = newVal; innerValue.value = newVal;
}, },
{ immediate: true } { immediate: true },
); );
// 监听2:dictName/labelKey/valueKey变化,重新读取字典(适配动态切换字典的场景) // 监听2:dictName/labelKey/valueKey变化,重新读取字典(适配动态切换字典的场景)
...@@ -142,7 +149,7 @@ watch( ...@@ -142,7 +149,7 @@ watch(
() => { () => {
getDictFromStorage(); getDictFromStorage();
}, },
{ deep: true } { deep: true },
); );
// 核心:值变化时更新外部v-model // 核心:值变化时更新外部v-model
......
This diff is collapsed.
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
style="width: 100%" style="width: 100%"
:data="tableData" :data="tableData"
:stripe="stripe" :stripe="stripe"
border
:size="size" :size="size"
:fit="fit" :fit="fit"
:show-header="showTableHeader" :show-header="showTableHeader"
...@@ -403,14 +402,14 @@ watch( ...@@ -403,14 +402,14 @@ watch(
() => props.currentPage, () => props.currentPage,
(newVal) => { (newVal) => {
currentPage.value = newVal; currentPage.value = newVal;
} },
); );
watch( watch(
() => props.pageSize, () => props.pageSize,
(newVal) => { (newVal) => {
pageSize.value = newVal; pageSize.value = newVal;
} },
); );
// 事件处理函数 // 事件处理函数
...@@ -537,7 +536,7 @@ const handleNextClick = (val) => { ...@@ -537,7 +536,7 @@ const handleNextClick = (val) => {
height: 0; height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.el-table{ .el-table {
flex: 1; flex: 1;
height: 0; height: 0;
} }
...@@ -583,7 +582,7 @@ const handleNextClick = (val) => { ...@@ -583,7 +582,7 @@ const handleNextClick = (val) => {
} }
:deep(.el-table) { :deep(.el-table) {
th.el-table__cell { th.el-table__cell {
background: #f5f7fa; background: #fafafa;
height: 50px; height: 50px;
text-align: center; text-align: center;
} }
......
...@@ -234,6 +234,9 @@ const handleLogout = () => { ...@@ -234,6 +234,9 @@ const handleLogout = () => {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
} }
::v-deep .el-menu {
border-right: none;
}
::v-deep .el-sub-menu { ::v-deep .el-sub-menu {
color: #666; color: #666;
font-size: 14px; font-size: 14px;
...@@ -337,7 +340,6 @@ const handleLogout = () => { ...@@ -337,7 +340,6 @@ const handleLogout = () => {
} }
.city-main { .city-main {
height: calc(100vh - 60px);
overflow-y: auto; overflow-y: auto;
background-color: #ecf2f8; background-color: #ecf2f8;
--el-main-padding: 0; --el-main-padding: 0;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.manage-search { .manage-search {
padding: 16px; padding: 24px 16px 8px 16px;
background: #fff; background: #fff;
margin-bottom: 16px; margin-bottom: 16px;
border-radius: 4px; border-radius: 4px;
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
.manage-container { .manage-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 16px; padding: 24px 24px 0 24px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
padding-top: 16px; padding-top: 16px;
padding-right: 16px; padding-right: 16px;
} }
.system-manage-header { .system-manage-header {
background: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.9);
border-radius: 8px; border-radius: 8px;
...@@ -37,7 +38,8 @@ ...@@ -37,7 +38,8 @@
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.manage-search { .manage-search {
padding: 16px; padding: 24px 16px 8px 16px;
background: #fff; background: #fff;
margin-bottom: 16px; margin-bottom: 16px;
border-radius: 4px; border-radius: 4px;
...@@ -68,7 +70,8 @@ ...@@ -68,7 +70,8 @@
&-container { &-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 16px; padding: 24px 24px 0 24px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
......
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
} }
.add-project-content {
background-color: #fff;
padding-top: 16px;
padding-right: 16px;
}
.system-manage-header { .system-manage-header {
background: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.9);
border-radius: 8px; border-radius: 8px;
...@@ -24,17 +29,14 @@ ...@@ -24,17 +29,14 @@
.system-manage-header .header-left .el-select { .system-manage-header .header-left .el-select {
width: 220px; width: 220px;
} }
.add-project-content {
background-color: #fff;
}
.system-manage-content { .system-manage-content {
background: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.9);
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.manage-search { .manage-search {
padding: 16px; padding: 24px 16px 8px 16px;
background: #fff; background: #fff;
margin-bottom: 16px; margin-bottom: 16px;
border-radius: 4px; border-radius: 4px;
...@@ -47,6 +49,7 @@ ...@@ -47,6 +49,7 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 0;
} }
.manage-content .common-table .table-container { .manage-content .common-table .table-container {
flex: 1; flex: 1;
...@@ -61,7 +64,7 @@ ...@@ -61,7 +64,7 @@
.manage-container { .manage-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 16px; padding: 24px 24px 0 24px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -73,9 +76,12 @@ ...@@ -73,9 +76,12 @@
flex-direction: column; flex-direction: column;
} }
.manage-header { .manage-header {
padding-top: 16px;
padding-right: 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; padding-bottom: 10px;
background-color: #fff;
} }
.manage-content { .manage-content {
flex: 1; flex: 1;
...@@ -87,7 +93,6 @@ ...@@ -87,7 +93,6 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 0;
} }
.manage-content .common-table .table-container { .manage-content .common-table .table-container {
flex: 1; flex: 1;
...@@ -99,7 +104,7 @@ ...@@ -99,7 +104,7 @@
flex: 1; flex: 1;
height: 0; height: 0;
} }
::v-deep.add-project-container { .add-project-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 16px; padding: 16px;
...@@ -107,74 +112,81 @@ ...@@ -107,74 +112,81 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
::v-deep.add-project-container .el-collapse-item__header { .add-project-container .el-collapse-item__header {
color: var(--el-color-primary); color: var(--el-color-primary);
} }
::v-deep.add-project-header { .add-project-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px;
}
.add-project-content {
flex: 1;
height: 0;
display: flex;
flex-direction: column;
} }
::v-deep.add-project-content { .add-project-content .tabs-content {
flex: 1; flex: 1;
height: 0; height: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
::v-deep.add-project-content .tabs-content { .add-project-content .tabs-content > .el-tabs {
flex: 1; flex: 1;
height: 0; height: 0;
} }
::v-deep.add-project-content .el-tabs { .add-project-content .el-tabs {
height: 100%; height: 100%;
} }
::v-deep.add-project-content .el-tab-pane { .add-project-content .el-tab-pane {
height: 100%; height: 100%;
} }
::v-deep.add-project-content .tab-content { .add-project-content .tab-content {
height: 100%; height: 100%;
overflow: auto; overflow: auto;
padding: 0 10px; padding: 0 10px;
} }
::v-deep.add-project-content .tab-content .col-title { .add-project-content .tab-content .col-title {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
::v-deep.add-project-content .tab-content .tab-handle { .add-project-content .tab-content .tab-handle {
margin-bottom: 16px; margin: 10px 0;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
} }
::v-deep.add-project-content .tab-content .el-table { .add-project-content .tab-content .el-table {
margin-bottom: 10px; margin-bottom: 10px;
} }
::v-deep.add-project-content .tab-content .el-table thead { .add-project-content .tab-content .el-table thead {
color: #000; color: #000;
} }
::v-deep.add-project-content .tab-content .el-table thead th { .add-project-content .tab-content .el-table thead th {
background: #f5f7fa; background: #f5f7fa;
} }
::v-deep.add-project-content .tab-content .el-table thead th .cell { .add-project-content .tab-content .el-table thead th .cell {
text-align: center; text-align: center;
} }
::v-deep.add-project-content .tab-content .el-table .sums-column { .add-project-content .tab-content .el-table .sums-column {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: flex-start; justify-content: flex-start;
} }
::v-deep.add-project-content .tab-content .el-table .sums-column > div { .add-project-content .tab-content .el-table .sums-column > div {
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
text-align: center; text-align: center;
} }
::v-deep.add-project-content .tab-content .upload-file-wrap { .add-project-content .tab-content .upload-file-wrap {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
} }
::v-deep.add-project-content .tab-content .upload-file-wrap .file-name { .add-project-content .tab-content .upload-file-wrap .file-name {
flex: 1; flex: 1;
width: 0; width: 0;
color: #409eff; color: #409eff;
...@@ -184,15 +196,41 @@ ...@@ -184,15 +196,41 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
::v-deep.add-project-content .tab-content .upload-file-wrap .delete-btn { .add-project-content .tab-content .upload-file-wrap .delete-btn {
cursor: pointer; cursor: pointer;
color: #f56c6c; color: #f56c6c;
} }
::v-deep.add-project-content .tab-content .el-select__wrapper .el-select__selection.is-near { .add-project-content .tab-content .el-select__wrapper .el-select__selection.is-near {
max-height: 120px; max-height: 120px;
overflow: auto; overflow: auto;
} }
::v-deep.add-project-content .always-click { .add-project-content .tab-content h3 {
text-align: center;
}
.add-project-content .tab-content .text-border {
width: 100%;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
background-color: #f5f7fa;
min-height: 34px;
}
.add-project-content .tab-content .report-item {
display: flex;
align-items: center;
margin: 18px 0;
}
.add-project-content .tab-content .report-label {
width: 150px;
text-align: right;
padding-right: 12px;
}
.add-project-content .tab-content .report-content {
border-left: 1px solid #eaeaea;
flex: 1;
width: 0;
}
.add-project-content .always-click {
padding: 2px; padding: 2px;
font-size: 12px; font-size: 12px;
cursor: pointer !important; cursor: pointer !important;
...@@ -202,13 +240,10 @@ ...@@ -202,13 +240,10 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
::v-deep.add-project-content .project-tab-content { .add-project-content .project-tab-content {
padding: 0 20px; padding: 0 20px;
height: 100%; height: 100%;
} }
::v-deep .el-input {
width: 100% !important;
}
.add-dialog .el-tree { .add-dialog .el-tree {
width: 100%; width: 100%;
} }
......
...@@ -7,6 +7,12 @@ ...@@ -7,6 +7,12 @@
box-sizing: border-box; box-sizing: border-box;
} }
.add-project-content {
background-color: #fff;
padding-top: 16px;
padding-right: 16px;
}
.system-manage-header { .system-manage-header {
background: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.9);
border-radius: 8px; border-radius: 8px;
...@@ -19,25 +25,21 @@ ...@@ -19,25 +25,21 @@
.header-left { .header-left {
flex: 1; flex: 1;
width: 0; width: 0;
.el-input, .el-input,
.el-select { .el-select {
width: 220px; width: 220px;
} }
} }
} }
.add-project-content {
background-color: #fff;
}
.system-manage-content { .system-manage-content {
background: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.9);
border-radius: 8px; border-radius: 8px;
padding: 16px; padding: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
} }
.manage-search { .manage-search {
padding: 16px; padding: 24px 16px 8px 16px;
background: #fff; background: #fff;
margin-bottom: 16px; margin-bottom: 16px;
border-radius: 4px; border-radius: 4px;
...@@ -50,6 +52,8 @@ ...@@ -50,6 +52,8 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 0;
.table-container { .table-container {
flex: 1; flex: 1;
height: 0; height: 0;
...@@ -66,7 +70,8 @@ ...@@ -66,7 +70,8 @@
&-container { &-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 16px; padding: 24px 24px 0 24px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -79,9 +84,12 @@ ...@@ -79,9 +84,12 @@
} }
&-header { &-header {
padding-top: 16px;
padding-right: 16px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px; padding-bottom: 10px;
background-color: #fff;
} }
&-content { &-content {
flex: 1; flex: 1;
...@@ -92,7 +100,6 @@ ...@@ -92,7 +100,6 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 0;
.table-container { .table-container {
flex: 1; flex: 1;
height: 0; height: 0;
...@@ -107,7 +114,7 @@ ...@@ -107,7 +114,7 @@
} }
} }
::v-deep.add-project { .add-project {
&-container { &-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -122,6 +129,7 @@ ...@@ -122,6 +129,7 @@
&-header { &-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10px;
} }
&-content { &-content {
flex: 1; flex: 1;
...@@ -131,6 +139,12 @@ ...@@ -131,6 +139,12 @@
.tabs-content { .tabs-content {
flex: 1; flex: 1;
height: 0; height: 0;
display: flex;
flex-direction: column;
& > .el-tabs {
flex: 1;
height: 0;
}
} }
.el-tabs { .el-tabs {
height: 100%; height: 100%;
...@@ -149,7 +163,7 @@ ...@@ -149,7 +163,7 @@
text-align: center; text-align: center;
} }
.tab-handle { .tab-handle {
margin-bottom: 16px; margin: 10px 0;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
align-items: center; align-items: center;
...@@ -201,6 +215,32 @@ ...@@ -201,6 +215,32 @@
overflow: auto; overflow: auto;
} }
} }
h3 {
text-align: center;
}
.text-border {
width: 100%;
padding: 0 10px;
border: 1px solid #dcdfe6;
border-radius: 4px;
background-color: #f5f7fa;
min-height: 34px;
}
.report-item {
display: flex;
align-items: center;
margin: 18px 0;
}
.report-label {
width: 150px;
text-align: right;
padding-right: 12px;
}
.report-content {
border-left: 1px solid #eaeaea;
flex: 1;
width: 0;
}
} }
.always-click { .always-click {
padding: 2px; padding: 2px;
...@@ -218,9 +258,6 @@ ...@@ -218,9 +258,6 @@
} }
} }
} }
::v-deep .el-input {
width: 100% !important;
}
.add-dialog { .add-dialog {
.el-tree { .el-tree {
width: 100%; width: 100%;
...@@ -276,6 +313,7 @@ ...@@ -276,6 +313,7 @@
} }
} }
} }
.add-project-header { .add-project-header {
margin-bottom: 10px; margin-bottom: 10px;
padding-left: 24px; padding-left: 24px;
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -99,13 +106,14 @@ let total = ref(0); ...@@ -99,13 +106,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzhpjList", url: "/api/project/getTzhpjList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -126,11 +134,11 @@ const getStatementData = () => { ...@@ -126,11 +134,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const evaluateAdd = () => { const evaluateAdd = () => {
router.push("/evaluateAdd"); router.push("/evaluateAdd");
...@@ -166,14 +174,14 @@ const deleteStatement = (item) => { ...@@ -166,14 +174,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -291,7 +291,7 @@ const rcCgqyglId = ref(route.query.id || ""); ...@@ -291,7 +291,7 @@ const rcCgqyglId = ref(route.query.id || "");
// ========== 原有方法保留(移除手动新增/删除) ========== // ========== 原有方法保留(移除手动新增/删除) ==========
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -299,6 +299,7 @@ const getProjectData = () => { ...@@ -299,6 +299,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -59,7 +60,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -59,7 +60,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -97,13 +104,14 @@ let total = ref(0); ...@@ -97,13 +104,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getYyqtzhsList", url: "/api/project/getYyqtzhsList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -116,11 +124,11 @@ const getStatementData = () => { ...@@ -116,11 +124,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const investmentCecoveryAdd = () => { const investmentCecoveryAdd = () => {
router.push("/investmentCecoveryAdd"); router.push("/investmentCecoveryAdd");
...@@ -156,14 +164,14 @@ const deleteStatement = (item) => { ...@@ -156,14 +164,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -616,14 +616,16 @@ const projectList = ref([]); ...@@ -616,14 +616,16 @@ const projectList = ref([]);
const rcCgqyglId = ref(route.query.id || ""); const rcCgqyglId = ref(route.query.id || "");
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
page: 1, page: 1,
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,11 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,11 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -83,13 +88,14 @@ let total = ref(0); ...@@ -83,13 +88,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getYyqtzjcList", url: "/api/project/getYyqtzjcList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -102,11 +108,11 @@ const getStatementData = () => { ...@@ -102,11 +108,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const runningPeriodAdd = () => { const runningPeriodAdd = () => {
router.push("/runningPeriodAdd"); router.push("/runningPeriodAdd");
...@@ -142,14 +148,14 @@ const deleteStatement = (item) => { ...@@ -142,14 +148,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -221,7 +221,7 @@ const deleteyyqtzjcZxjcs = (index) => { ...@@ -221,7 +221,7 @@ const deleteyyqtzjcZxjcs = (index) => {
// ========== 通用方法 ========== // ========== 通用方法 ==========
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -229,6 +229,7 @@ const getProjectData = () => { ...@@ -229,6 +229,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +59,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +59,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -98,13 +106,14 @@ let total = ref(0); ...@@ -98,13 +106,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getYjglList", url: "/api/project/getYjglList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
const countValidRows = (arr) => { const countValidRows = (arr) => {
...@@ -134,11 +143,11 @@ const getStatementData = () => { ...@@ -134,11 +143,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const turnoverAdd = () => { const turnoverAdd = () => {
router.push("/turnoverAdd"); router.push("/turnoverAdd");
...@@ -174,14 +183,14 @@ const deleteStatement = (item) => { ...@@ -174,14 +183,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -161,10 +161,16 @@ const qmyj = ref([ ...@@ -161,10 +161,16 @@ const qmyj = ref([
const yyqtzjcZxjcsList = ref([]); const yyqtzjcZxjcsList = ref([]);
// 获取项目列表数据 // 获取项目列表数据
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { page: 1, pagesize: 1000, attributes: [], menuType: "xmjc" }, data: {
page: 1,
pagesize: 1000,
attributes: [],
menuType: "xmjc",
...params,
},
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
}, },
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -93,13 +100,14 @@ let total = ref(0); ...@@ -93,13 +100,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getCbglList", url: "/api/project/getCbglList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
const countValidRows = (arr) => { const countValidRows = (arr) => {
...@@ -128,11 +136,11 @@ const getStatementData = () => { ...@@ -128,11 +136,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const costAdd = () => { const costAdd = () => {
router.push("/costAdd"); router.push("/costAdd");
...@@ -168,14 +176,14 @@ const deleteStatement = (item) => { ...@@ -168,14 +176,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -110,10 +110,16 @@ const rcCgqyglId = ref(route.query.id || ""); ...@@ -110,10 +110,16 @@ const rcCgqyglId = ref(route.query.id || "");
let options = ref(); let options = ref();
// 获取项目列表数据 // 获取项目列表数据
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { page: 1, pagesize: 1000, attributes: [], menuType: "xmjc" }, data: {
page: 1,
pagesize: 1000,
attributes: [],
menuType: "xmjc",
...params,
},
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
}, },
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -113,13 +120,14 @@ let total = ref(0); ...@@ -113,13 +120,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzjhList", url: "/api/project/getTzjhList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -132,11 +140,11 @@ const getStatementData = () => { ...@@ -132,11 +140,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const annualAdd = () => { const annualAdd = () => {
router.push("/annualAdd"); router.push("/annualAdd");
...@@ -172,14 +180,14 @@ const deleteStatement = (item) => { ...@@ -172,14 +180,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -1345,10 +1345,16 @@ const fillAnnualPlanTable = (backfillData) => { ...@@ -1345,10 +1345,16 @@ const fillAnnualPlanTable = (backfillData) => {
}; };
// ========== 业务方法:获取项目列表(通用) ========== // ========== 业务方法:获取项目列表(通用) ==========
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { page: 1, pagesize: 1000, attributes: [], menuType: "xmjc" }, data: {
page: 1,
pagesize: 1000,
attributes: [],
menuType: "xmjc",
...params,
},
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
}, },
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -103,13 +110,14 @@ let total = ref(0); ...@@ -103,13 +110,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getXxbsList", url: "/api/project/getXxbsList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -127,11 +135,11 @@ const getStatementData = () => { ...@@ -127,11 +135,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const everydayAdd = () => { const everydayAdd = () => {
router.push("/everydayAdd"); router.push("/everydayAdd");
...@@ -167,14 +175,14 @@ const deleteStatement = (item) => { ...@@ -167,14 +175,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -59,7 +60,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -59,7 +60,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -96,13 +103,14 @@ let total = ref(0); ...@@ -96,13 +103,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getXxhjsList", url: "/api/project/getXxhjsList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -120,11 +128,11 @@ const getStatementData = () => { ...@@ -120,11 +128,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const informationConstructionAdd = () => { const informationConstructionAdd = () => {
router.push("/informationConstructionAdd"); router.push("/informationConstructionAdd");
...@@ -160,14 +168,14 @@ const deleteStatement = (item) => { ...@@ -160,14 +168,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -118,13 +125,14 @@ let total = ref(0); ...@@ -118,13 +125,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzghList", url: "/api/project/getTzghList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -142,11 +150,11 @@ const getStatementData = () => { ...@@ -142,11 +150,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const investmentAdd = () => { const investmentAdd = () => {
router.push("/investmentAdd"); router.push("/investmentAdd");
...@@ -182,14 +190,14 @@ const deleteStatement = (item) => { ...@@ -182,14 +190,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -93,13 +100,14 @@ let total = ref(0); ...@@ -93,13 +100,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzdaglList", url: "/api/project/getTzdaglList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -118,11 +126,11 @@ const getStatementData = () => { ...@@ -118,11 +126,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const recordAdd = () => { const recordAdd = () => {
router.push("/recordAdd"); router.push("/recordAdd");
...@@ -158,14 +166,14 @@ const deleteStatement = (item) => { ...@@ -158,14 +166,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -139,7 +139,7 @@ const projectList = ref([]); // 项目下拉列表数据 ...@@ -139,7 +139,7 @@ const projectList = ref([]); // 项目下拉列表数据
// 接口请求:仅保留**实际用到的**,删除所有无用的合计/新增/删除方法 // 接口请求:仅保留**实际用到的**,删除所有无用的合计/新增/删除方法
// 获取项目下拉列表(绑定所属项目) // 获取项目下拉列表(绑定所属项目)
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -147,6 +147,7 @@ const getProjectData = () => { ...@@ -147,6 +147,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -113,13 +120,14 @@ let total = ref(0); ...@@ -113,13 +120,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getCgqyglList", url: "/api/project/getCgqyglList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -132,11 +140,11 @@ const getStatementData = () => { ...@@ -132,11 +140,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const shareAdd = () => { const shareAdd = () => {
router.push("/shareAdd"); router.push("/shareAdd");
...@@ -172,14 +180,14 @@ const deleteStatement = (item) => { ...@@ -172,14 +180,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -690,7 +690,7 @@ const deleteTzfhs = (index) => { ...@@ -690,7 +690,7 @@ const deleteTzfhs = (index) => {
}; };
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -698,6 +698,7 @@ const getProjectData = () => { ...@@ -698,6 +698,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -104,13 +111,14 @@ let total = ref(0); ...@@ -104,13 +111,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTxjsList", url: "/api/project/getTxjsList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -128,11 +136,11 @@ const getStatementData = () => { ...@@ -128,11 +136,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const systemAdd = () => { const systemAdd = () => {
router.push("/systemAdd"); router.push("/systemAdd");
...@@ -168,14 +176,14 @@ const deleteStatement = (item) => { ...@@ -168,14 +176,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -113,13 +120,14 @@ let total = ref(0); ...@@ -113,13 +120,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTwhglList", url: "/api/project/getTwhglList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -138,11 +146,11 @@ const getStatementData = () => { ...@@ -138,11 +146,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const vscouncilAdd = () => { const vscouncilAdd = () => {
router.push("/vscouncilAdd"); router.push("/vscouncilAdd");
...@@ -178,14 +186,14 @@ const deleteStatement = (item) => { ...@@ -178,14 +186,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -919,7 +919,7 @@ let loading = ref(false); ...@@ -919,7 +919,7 @@ let loading = ref(false);
// 项目列表 // 项目列表
let projectList = ref([]); let projectList = ref([]);
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -927,6 +927,7 @@ const getProjectData = () => { ...@@ -927,6 +927,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows; projectList.value = data.rows;
......
This diff is collapsed.
...@@ -582,7 +582,7 @@ const getFullPathById = (id) => { ...@@ -582,7 +582,7 @@ const getFullPathById = (id) => {
}; };
// 项目列表 // 项目列表
let projectList = ref([]); let projectList = ref([]);
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -590,6 +590,7 @@ const getProjectData = () => { ...@@ -590,6 +590,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows; projectList.value = data.rows;
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -109,13 +116,14 @@ let total = ref(0); ...@@ -109,13 +116,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getZdsxspList", url: "/api/project/getZdsxspList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows.map((it) => { tableData.value = data.rows.map((it) => {
...@@ -137,11 +145,11 @@ const getStatementData = () => { ...@@ -137,11 +145,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const bigIssuesAdd = () => { const bigIssuesAdd = () => {
router.push("/bigIssuesAdd"); router.push("/bigIssuesAdd");
...@@ -177,14 +185,14 @@ const deleteStatement = (item) => { ...@@ -177,14 +185,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -172,7 +172,7 @@ const rcCgqyglId = ref(route.query.id || ""); ...@@ -172,7 +172,7 @@ const rcCgqyglId = ref(route.query.id || "");
// ========== 通用方法 ========== // ========== 通用方法 ==========
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -180,6 +180,7 @@ const getProjectData = () => { ...@@ -180,6 +180,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -83,13 +90,14 @@ let total = ref(0); ...@@ -83,13 +90,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getJsqtzjcList", url: "/api/project/getJsqtzjcList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -102,11 +110,11 @@ const getStatementData = () => { ...@@ -102,11 +110,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const constructionAdd = () => { const constructionAdd = () => {
router.push("/constructionAdd"); router.push("/constructionAdd");
...@@ -142,14 +150,14 @@ const deleteStatement = (item) => { ...@@ -142,14 +150,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -307,7 +307,7 @@ const deleteJsqtzjcZxjcs = (index) => { ...@@ -307,7 +307,7 @@ const deleteJsqtzjcZxjcs = (index) => {
// ========== 通用方法 ========== // ========== 通用方法 ==========
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -315,6 +315,7 @@ const getProjectData = () => { ...@@ -315,6 +315,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -59,7 +60,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -59,7 +60,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -97,13 +104,14 @@ let total = ref(0); ...@@ -97,13 +104,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getJsqtzhsList", url: "/api/project/getJsqtzhsList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -116,11 +124,11 @@ const getStatementData = () => { ...@@ -116,11 +124,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const constructionTimeAdd = () => { const constructionTimeAdd = () => {
router.push("/constructionTimeAdd"); router.push("/constructionTimeAdd");
...@@ -156,14 +164,14 @@ const deleteStatement = (item) => { ...@@ -156,14 +164,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -616,7 +616,7 @@ const projectList = ref([]); ...@@ -616,7 +616,7 @@ const projectList = ref([]);
const rcCgqyglId = ref(route.query.id || ""); const rcCgqyglId = ref(route.query.id || "");
// 获取项目列表 // 获取项目列表
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { data: {
...@@ -624,6 +624,7 @@ const getProjectData = () => { ...@@ -624,6 +624,7 @@ const getProjectData = () => {
pagesize: 1000, pagesize: 1000,
attributes: [], attributes: [],
menuType: "xmjc", menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -113,13 +120,14 @@ let total = ref(0); ...@@ -113,13 +120,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzjhList", url: "/api/project/getTzjhList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -132,11 +140,11 @@ const getStatementData = () => { ...@@ -132,11 +140,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const annualAdd = () => { const annualAdd = () => {
router.push("/decisionAdd"); router.push("/decisionAdd");
...@@ -172,14 +180,14 @@ const deleteStatement = (item) => { ...@@ -172,14 +180,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -1767,10 +1767,16 @@ const formData = reactive({ ...@@ -1767,10 +1767,16 @@ const formData = reactive({
}); });
// ========== 业务方法:获取项目列表 ========== // ========== 业务方法:获取项目列表 ==========
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { page: 1, pagesize: 1000, attributes: [], menuType: "xmjc" }, data: {
page: 1,
pagesize: 1000,
attributes: [],
menuType: "xmjc",
...params,
},
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
}, },
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -24,9 +25,19 @@ ...@@ -24,9 +25,19 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button link type="primary" size="small" @click="previewRisk(row)">查看</el-button> <el-button
<el-button link type="primary" size="small" @click="editRisk(row)">编辑</el-button> link
<el-button link type="danger" size="small" @click="deleteRisk(row)">删除</el-button> type="primary"
size="small"
@click="previewRisk(row)"
>查看</el-button
>
<el-button link type="primary" size="small" @click="editRisk(row)"
>编辑</el-button
>
<el-button link type="danger" size="small" @click="deleteRisk(row)"
>删除</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -35,25 +46,30 @@ ...@@ -35,25 +46,30 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, getCurrentInstance } from "vue"; import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const router = useRouter(); const handleSearch = (formData) => {
const { proxy } = getCurrentInstance(); currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter();
const { proxy } = getCurrentInstance();
let tableData = ref([]); let tableData = ref([]);
let tableColumns = ref([ let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "zsqy", prop: "zsqy",
label: "直属企业", label: "直属企业",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "operations", prop: "operations",
...@@ -61,81 +77,84 @@ ...@@ -61,81 +77,84 @@
width: 170, width: 170,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getRiskData = () => { const getProjectData = (params) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getZdfxList", url: "/api/project/getZdfxList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getRiskData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getRiskData(); getProjectData();
} };
const addRisk = () => { const addRisk = () => {
router.push("/addRisk"); router.push("/addRisk");
}; };
const editRisk = (item) => { const editRisk = (item) => {
router.push({ router.push({
name: "addRisk", name: "addRisk",
query: { query: {
riskId: item.id riskId: item.id,
} },
}); });
}; };
const previewRisk = (item) => { const previewRisk = (item) => {
router.push({ router.push({
name: "addRisk", name: "addRisk",
query: { query: {
isPreview: true, isPreview: true,
riskId: item.id riskId: item.id,
} },
});
};
const deleteRisk = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}) })
} .then(() => {
const deleteRisk = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示",{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
proxy.$post({ proxy.$post({
url: "/api/project/deleteZdfx", url: "/api/project/deleteZdfx",
data: { data: {
id: item.id id: item.id,
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getRiskData(); getProjectData();
} },
}) });
}).catch(() => {})
}
onMounted(() => {
getRiskData();
}) })
.catch(() => {});
};
onMounted(() => {
getProjectData();
});
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue"; ...@@ -57,7 +58,13 @@ import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter(); const router = useRouter();
const { proxy } = getCurrentInstance(); const { proxy } = getCurrentInstance();
...@@ -109,13 +116,14 @@ let total = ref(0); ...@@ -109,13 +116,14 @@ let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getXmtcList", url: "/api/project/getXmtcList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
...@@ -128,11 +136,11 @@ const getStatementData = () => { ...@@ -128,11 +136,11 @@ const getStatementData = () => {
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
}; };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
}; };
const annualAdd = () => { const annualAdd = () => {
router.push("/quitAdd"); router.push("/quitAdd");
...@@ -168,14 +176,14 @@ const deleteStatement = (item) => { ...@@ -168,14 +176,14 @@ const deleteStatement = (item) => {
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
}, },
}); });
}) })
.catch(() => {}); .catch(() => {});
}; };
onMounted(() => { onMounted(() => {
getStatementData(); getProjectData();
}); });
</script> </script>
......
...@@ -993,10 +993,16 @@ const handleFinancialIndexChange = (field) => { ...@@ -993,10 +993,16 @@ const handleFinancialIndexChange = (field) => {
}; };
// ========== 业务方法:获取项目列表 ========== // ========== 业务方法:获取项目列表 ==========
const getProjectData = () => { const getProjectData = (params = {}) => {
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
data: { page: 1, pagesize: 1000, attributes: [], menuType: "xmjc" }, data: {
page: 1,
pagesize: 1000,
attributes: [],
menuType: "xmjc",
...params,
},
callback: (data) => { callback: (data) => {
projectList.value = data.rows || []; projectList.value = data.rows || [];
}, },
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -24,9 +25,27 @@ ...@@ -24,9 +25,27 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button link type="primary" size="small" @click="previewControl(row)">查看</el-button> <el-button
<el-button link type="primary" size="small" @click="editControl(row)">编辑</el-button> link
<el-button link type="danger" size="small" @click="deleteControl(row)">删除</el-button> type="primary"
size="small"
@click="previewControl(row)"
>查看</el-button
>
<el-button
link
type="primary"
size="small"
@click="editControl(row)"
>编辑</el-button
>
<el-button
link
type="danger"
size="small"
@click="deleteControl(row)"
>删除</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -34,30 +53,37 @@ ...@@ -34,30 +53,37 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, reactive, onMounted, getCurrentInstance } from "vue"; import { ref, reactive, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
const router = useRouter(); getProjectData(formData);
const { proxy } = getCurrentInstance(); };
let tableData = ref([]); const router = useRouter();
let jcdwList = reactive([]); const { proxy } = getCurrentInstance();
let tableColumns = ref([
let tableData = ref([]);
let jcdwList = reactive([]);
let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "jcdw", prop: "jcdw",
label: "决策单位", label: "决策单位",
showOverflowTooltip: true, showOverflowTooltip: true,
formatter: (row) => { formatter: (row) => {
let data = jcdwList.filter(item => item.key === row.jcdw)[0] let data = jcdwList.filter((item) => item.key === row.jcdw)[0];
return row.jcdw && data ? data.name : row.jcdw; return row.jcdw && data ? data.name : row.jcdw;
} },
}, },
{ {
prop: "operations", prop: "operations",
...@@ -65,83 +91,86 @@ ...@@ -65,83 +91,86 @@
width: 170, width: 170,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getControlData = () => { const getProjectData = (params) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzkzList", url: "/api/project/getTzkzList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getControlData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getControlData(); getProjectData();
} };
const addControl = () => { const addControl = () => {
router.push("/addControl"); router.push("/addControl");
}; };
const editControl = (item) => { const editControl = (item) => {
router.push({ router.push({
name: "addControl", name: "addControl",
query: { query: {
controlId: item.id controlId: item.id,
} },
}); });
}; };
const previewControl = (item) => { const previewControl = (item) => {
router.push({ router.push({
name: "addControl", name: "addControl",
query: { query: {
isPreview: true, isPreview: true,
controlId: item.id controlId: item.id,
} },
});
};
const deleteControl = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}) })
} .then(() => {
const deleteControl = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示",{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
proxy.$post({ proxy.$post({
url: "/api/project/deleteTzkz", url: "/api/project/deleteTzkz",
data: { data: {
id: item.id id: item.id,
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getControlData(); getProjectData();
} },
});
}) })
}).catch(() => {}) .catch(() => {});
} };
onMounted(() => { onMounted(() => {
getControlData(); getProjectData();
let resourceData = JSON.parse(sessionStorage.getItem("resourceData")); let resourceData = JSON.parse(sessionStorage.getItem("resourceData"));
jcdwList = resourceData.jcdw; jcdwList = resourceData.jcdw;
}) });
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -24,9 +25,27 @@ ...@@ -24,9 +25,27 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button link type="primary" size="small" @click="previewStatement(row)">查看</el-button> <el-button
<el-button link type="primary" size="small" @click="editStatement(row)">编辑</el-button> link
<el-button link type="danger" size="small" @click="deleteStatement(row)">删除</el-button> type="primary"
size="small"
@click="previewStatement(row)"
>查看</el-button
>
<el-button
link
type="primary"
size="small"
@click="editStatement(row)"
>编辑</el-button
>
<el-button
link
type="danger"
size="small"
@click="deleteStatement(row)"
>删除</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -35,42 +54,48 @@ ...@@ -35,42 +54,48 @@
</template> </template>
<script setup> <script setup>
import { ref, onMounted, getCurrentInstance } from "vue"; import { ref, onMounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
const router = useRouter(); getProjectData(formData);
const { proxy } = getCurrentInstance(); };
const router = useRouter();
const { proxy } = getCurrentInstance();
let tableData = ref([]); let tableData = ref([]);
let tableColumns = ref([ let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "tzzt", prop: "tzzt",
label: "投资主体", label: "投资主体",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "xmdd", prop: "xmdd",
label: "项目地点", label: "项目地点",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "xmkgrq", prop: "xmkgrq",
label: "项目开工日期", label: "项目开工日期",
showOverflowTooltip: true, showOverflowTooltip: true,
width: 170 width: 170,
}, },
{ {
prop: "xmssqx", prop: "xmssqx",
label: "项目实施期限(年)", label: "项目实施期限(年)",
showOverflowTooltip: true, showOverflowTooltip: true,
width: 120 width: 120,
}, },
{ {
prop: "operations", prop: "operations",
...@@ -78,82 +103,85 @@ ...@@ -78,82 +103,85 @@
width: 170, width: 170,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getStatementData = () => { const getProjectData = (params) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/getTzmbzrsList", url: "/api/project/getTzmbzrsList",
data: { data: {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value pagesize: pageSize.value,
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getStatementData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getStatementData(); getProjectData();
} };
const addStatement = () => { const addStatement = () => {
router.push("/addStatement"); router.push("/addStatement");
}; };
const editStatement = (item) => { const editStatement = (item) => {
router.push({ router.push({
name: "addStatement", name: "addStatement",
query: { query: {
statementId: item.id statementId: item.id,
} },
}); });
}; };
const previewStatement = (item) => { const previewStatement = (item) => {
router.push({ router.push({
name: "addStatement", name: "addStatement",
query: { query: {
isPreview: true, isPreview: true,
statementId: item.id statementId: item.id,
} },
});
};
const deleteStatement = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}) })
} .then(() => {
const deleteStatement = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示",{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
proxy.$post({ proxy.$post({
url: "/api/project/deleteTzmbzrs", url: "/api/project/deleteTzmbzrs",
data: { data: {
id: item.id id: item.id,
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getStatementData(); getProjectData();
} },
}) });
}).catch(() => {})
}
onMounted(() => {
getStatementData();
}) })
.catch(() => {});
};
onMounted(() => {
getProjectData();
});
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<!-- 搜索表单区域 --> <search-form @search="handleSearch" />
<div class="manage-search">
<search-form
v-model="searchForm"
:items="searchItems"
@search="handleSearch"
@reset="handleReset"
@field-clear="handleFieldClear"
/>
</div>
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -95,11 +85,13 @@ let tableColumns = ref([ ...@@ -95,11 +85,13 @@ let tableColumns = ref([
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true, showOverflowTooltip: true,
align: "center",
}, },
{ {
prop: "projectCode", prop: "projectCode",
label: "项目编号", label: "项目编号",
showOverflowTooltip: true, showOverflowTooltip: true,
align: "center",
}, },
{ {
prop: "projectLzType", prop: "projectLzType",
...@@ -205,86 +197,12 @@ let pageSize = ref(10); ...@@ -205,86 +197,12 @@ let pageSize = ref(10);
// ========== 搜索表单相关 ========== // ========== 搜索表单相关 ==========
const searchForm = ref({}); const searchForm = ref({});
// 搜索字段配置
const searchItems = ref([
{
type: "input",
label: "项目名称",
prop: "projectName",
placeholder: "请输入项目名称",
clearable: true,
span: 6,
},
{
type: "input",
label: "项目编号",
prop: "projectCode",
placeholder: "请输入项目编号",
clearable: true,
span: 6,
},
{
type: "input",
label: "直属企业",
prop: "zsqy",
placeholder: "请输入直属企业",
clearable: true,
span: 6,
},
{
type: "input",
label: "管理主体",
prop: "glzt",
placeholder: "请输入管理主体",
clearable: true,
span: 6,
},
{
type: "input",
label: "联系人",
prop: "lxr",
placeholder: "请输入联系人",
clearable: true,
span: 6,
},
{
type: "dict-select",
label: "项目阶段",
prop: "xmjd",
dictName: "xmjd",
placeholder: "请选择项目阶段",
span: 6,
},
{
type: "dict-select",
label: "项目区域",
prop: "xmqy",
dictName: "xmqy",
placeholder: "请选择项目区域",
span: 6,
},
]);
// 搜索处理 // 搜索处理
const handleSearch = (formData) => { const handleSearch = (formData) => {
console.log("搜索参数:", formData);
currentPage.value = 1; currentPage.value = 1;
getProjectData(formData); getProjectData(formData);
}; };
// 重置处理
const handleReset = (formData) => {
currentPage.value = 1;
getProjectData();
};
// 单个字段清空处理
const handleFieldClear = (prop, formData) => {
console.log("字段清空:", prop, formData);
};
// ========== 获取列表数据 ========== // ========== 获取列表数据 ==========
const getProjectData = (params = {}) => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
...@@ -293,7 +211,9 @@ const getProjectData = (params = {}) => { ...@@ -293,7 +211,9 @@ const getProjectData = (params = {}) => {
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
attributes: [], attributes: [],
...params,
menuType: "xmdak", menuType: "xmdak",
...params,
}; };
// 处理搜索条件 // 处理搜索条件
......
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"></div> <div class="header-right"></div>
...@@ -22,10 +23,21 @@ ...@@ -22,10 +23,21 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button link type="primary" size="small" @click="fillProject(row)">继续填报</el-button> <el-button
<el-button link type="primary" size="small" link
:loading="row.loading" @click="fillProject(row)" type="primary"
>发起决策审批</el-button> size="small"
@click="fillProject(row)"
>继续填报</el-button
>
<el-button
link
type="primary"
size="small"
:loading="row.loading"
@click="fillProject(row)"
>发起决策审批</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -34,25 +46,31 @@ ...@@ -34,25 +46,31 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue"; import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
const router = useRouter(); getProjectData(formData);
const { proxy } = getCurrentInstance(); };
const router = useRouter();
const { proxy } = getCurrentInstance();
let tableData = ref([]); let tableData = ref([]);
let tableColumns = ref([ let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectCode", prop: "projectCode",
label: "项目编号", label: "项目编号",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectLzType", prop: "projectLzType",
...@@ -60,10 +78,20 @@ ...@@ -60,10 +78,20 @@
width: 120, width: 120,
align: "center", align: "center",
formatter: (data) => { formatter: (data) => {
return data.projectLzType === "1" ? "待立项" : data.projectLzType === "3" ? "立项审批中" : return data.projectLzType === "1"
data.projectLzType === "5" ? "已立项" : data.projectLzType === "7" ? "决策填报中" : ? "待立项"
data.projectLzType === "8" ? "决策审批中" : data.projectLzType === "9" ? "已决策" : "待立项" : data.projectLzType === "3"
} ? "立项审批中"
: data.projectLzType === "5"
? "已立项"
: data.projectLzType === "7"
? "决策填报中"
: data.projectLzType === "8"
? "决策审批中"
: data.projectLzType === "9"
? "已决策"
: "待立项";
},
}, },
{ {
prop: "operations", prop: "operations",
...@@ -71,15 +99,15 @@ ...@@ -71,15 +99,15 @@
width: 200, width: 200,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getProjectData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
...@@ -87,52 +115,53 @@ ...@@ -87,52 +115,53 @@
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
attributes: [], attributes: [],
menuType: "xmlz" menuType: "xmlz",
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
onMounted(() => { onMounted(() => {
getProjectData(); getProjectData();
}) });
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getProjectData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getProjectData(); getProjectData();
} };
const fillProject = (item) => { const fillProject = (item) => {
router.push({ router.push({
name: "addProject", name: "addProject",
query: { query: {
projectId: item.id projectId: item.id,
} },
}); });
}; };
const approvalProject = (item) => { const approvalProject = (item) => {
item.loading = true; item.loading = true;
proxy.$post({ proxy.$post({
url: "/api/project/startJuece", url: "/api/project/startJuece",
data: { data: {
id: item.id id: item.id,
}, },
callback: (data) => { callback: (data) => {
item.loading = false; item.loading = false;
getProjectData(); getProjectData();
} },
}) });
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"></div> <div class="header-right"></div>
...@@ -22,9 +23,16 @@ ...@@ -22,9 +23,16 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button link type="primary" size="small" <el-button
:loading="row.loading" @click="previewProject(row)" link
>{{ canAudit && row.projectLzType == 8 ? "审批" : "查看" }}</el-button> type="primary"
size="small"
:loading="row.loading"
@click="previewProject(row)"
>{{
canAudit && row.projectLzType == 8 ? "审批" : "查看"
}}</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -33,35 +41,45 @@ ...@@ -33,35 +41,45 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue"; import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/stores/user.js"; import { useUserStore } from "@/stores/user.js";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const handleSearch = (formData) => {
currentPage.value = 1;
const router = useRouter(); getProjectData(formData);
const { proxy } = getCurrentInstance(); };
// 是否是审核角色 const router = useRouter();
const userStore = useUserStore(); const { proxy } = getCurrentInstance();
const userInfo = userStore.userInfo || (sessionStorage.getItem("userInfo") && JSON.parse(sessionStorage.getItem("userInfo"))) || {}; // 是否是审核角色
let canAudit = ref(false); const userStore = useUserStore();
userInfo.roles.map(item => { const userInfo =
userStore.userInfo ||
(sessionStorage.getItem("userInfo") &&
JSON.parse(sessionStorage.getItem("userInfo"))) ||
{};
let canAudit = ref(false);
userInfo.roles.map((item) => {
if (["xmlx_sp", "xmjc_sp"].includes(item.key)) { if (["xmlx_sp", "xmjc_sp"].includes(item.key)) {
canAudit.value = true; canAudit.value = true;
} }
}); });
let tableData = ref([]); let tableData = ref([]);
let tableColumns = ref([ let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectCode", prop: "projectCode",
label: "项目编号", label: "项目编号",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectLzType", prop: "projectLzType",
...@@ -69,10 +87,20 @@ ...@@ -69,10 +87,20 @@
width: 120, width: 120,
align: "center", align: "center",
formatter: (data) => { formatter: (data) => {
return data.projectLzType === "1" ? "待立项" : data.projectLzType === "3" ? "立项审批中" : return data.projectLzType === "1"
data.projectLzType === "5" ? "已立项" : data.projectLzType === "7" ? "决策填报中" : ? "待立项"
data.projectLzType === "8" ? "决策审批中" : data.projectLzType === "9" ? "已决策" : "待立项" : data.projectLzType === "3"
} ? "立项审批中"
: data.projectLzType === "5"
? "已立项"
: data.projectLzType === "7"
? "决策填报中"
: data.projectLzType === "8"
? "决策审批中"
: data.projectLzType === "9"
? "已决策"
: "待立项";
},
}, },
{ {
prop: "operations", prop: "operations",
...@@ -80,16 +108,16 @@ ...@@ -80,16 +108,16 @@
width: 160, width: 160,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getProjectData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
...@@ -97,39 +125,40 @@ ...@@ -97,39 +125,40 @@
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
attributes: [], attributes: [],
menuType: "xmjc" menuType: "xmjc",
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
onMounted(() => { onMounted(() => {
getProjectData(); getProjectData();
}) });
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getProjectData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getProjectData(); getProjectData();
} };
const previewProject = (item) => { const previewProject = (item) => {
router.push({ router.push({
name: "addProject", name: "addProject",
query: { query: {
isPreview: true, isPreview: true,
projectId: item.id projectId: item.id,
} },
}) });
} };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"> <div class="header-right">
...@@ -24,9 +26,27 @@ ...@@ -24,9 +26,27 @@
@current-page-change="handleCurrentPageChange" @current-page-change="handleCurrentPageChange"
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<el-button link type="primary" size="small" @click="previewProject(row)">查看</el-button> <el-button
<el-button link type="primary" size="small" @click="editProject(row)">编辑</el-button> link
<el-button link type="danger" size="small" @click="deleteProject(row)">删除</el-button> type="primary"
size="small"
@click="previewProject(row)"
>查看</el-button
>
<el-button
link
type="primary"
size="small"
@click="editProject(row)"
>编辑</el-button
>
<el-button
link
type="danger"
size="small"
@click="deleteProject(row)"
>删除</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -35,27 +55,30 @@ ...@@ -35,27 +55,30 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue"; import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const router = useRouter(); const handleSearch = (formData) => {
const { proxy } = getCurrentInstance(); currentPage.value = 1;
getProjectData(formData);
};
const router = useRouter();
const { proxy } = getCurrentInstance();
// 计算表格高度 // 计算表格高度
let tableData = ref([]); let tableData = ref([]);
let tableColumns = ref([ let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectCode", prop: "projectCode",
label: "项目编号", label: "项目编号",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectLzType", prop: "projectLzType",
...@@ -63,10 +86,20 @@ ...@@ -63,10 +86,20 @@
width: 120, width: 120,
align: "center", align: "center",
formatter: (data) => { formatter: (data) => {
return data.projectLzType === "1" ? "待立项" : data.projectLzType === "3" ? "立项审批中" : return data.projectLzType === "1"
data.projectLzType === "5" ? "已立项" : data.projectLzType === "7" ? "决策填报中" : ? "待立项"
data.projectLzType === "8" ? "决策审批中" : data.projectLzType === "9" ? "已决策" : "待立项" : data.projectLzType === "3"
} ? "立项审批中"
: data.projectLzType === "5"
? "已立项"
: data.projectLzType === "7"
? "决策填报中"
: data.projectLzType === "8"
? "决策审批中"
: data.projectLzType === "9"
? "已决策"
: "待立项";
},
}, },
{ {
prop: "operations", prop: "operations",
...@@ -74,15 +107,15 @@ ...@@ -74,15 +107,15 @@
width: 170, width: 170,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getProjectData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
...@@ -90,68 +123,71 @@ ...@@ -90,68 +123,71 @@
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
attributes: [], attributes: [],
menuType: "xmlingxuan" menuType: "xmlingxuan",
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
onMounted(() => { onMounted(() => {
getProjectData(); getProjectData();
}) });
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getProjectData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getProjectData(); getProjectData();
} };
const addProject = () => { const addProject = () => {
router.push("/addProject"); router.push("/addProject");
}; };
const editProject = (item) => { const editProject = (item) => {
router.push({ router.push({
name: "addProject", name: "addProject",
query: { query: {
projectId: item.id projectId: item.id,
} },
}); });
}; };
const previewProject = (item) => { const previewProject = (item) => {
router.push({ router.push({
name: "addProject", name: "addProject",
query: { query: {
isPreview: true, isPreview: true,
projectId: item.id projectId: item.id,
} },
});
};
const deleteProject = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "warning",
}) })
} .then(() => {
const deleteProject = (item) => {
ElMessageBox.confirm("确认删除该项?", "提示",{
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
proxy.$post({ proxy.$post({
url: "/api/project/deleteProject", url: "/api/project/deleteProject",
data: { data: {
id: item.id id: item.id,
}, },
callback: (data) => { callback: (data) => {
ElMessage.success("删除成功"); ElMessage.success("删除成功");
getProjectData(); getProjectData();
} },
});
}) })
}).catch(() => {}) .catch(() => {});
} };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
<template> <template>
<div class="manage-container"> <div class="manage-container">
<div class="manage-wrap"> <div class="manage-wrap">
<search-form @search="handleSearch" />
<div class="manage-header"> <div class="manage-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="header-right"></div> <div class="header-right"></div>
...@@ -23,14 +25,24 @@ ...@@ -23,14 +25,24 @@
> >
<template #operations="{ row, index }"> <template #operations="{ row, index }">
<!-- 已立项 --> <!-- 已立项 -->
<el-button link type="primary" size="small" <el-button
link
type="primary"
size="small"
v-if="row.projectLzType === '5'" v-if="row.projectLzType === '5'"
@click="fillDecision(row)" @click="fillDecision(row)"
>决策填报</el-button> >决策填报</el-button
>
<!-- 立项审批中 --> <!-- 立项审批中 -->
<el-button link type="primary" size="small" <el-button
v-else :loading="row.loading" @click="viewDecision(row)" link
>{{ canAudit ? "审批" : "查看" }}</el-button> type="primary"
size="small"
v-else
:loading="row.loading"
@click="viewDecision(row)"
>{{ canAudit ? "审批" : "查看" }}</el-button
>
</template> </template>
</common-table> </common-table>
</div> </div>
...@@ -39,35 +51,44 @@ ...@@ -39,35 +51,44 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue"; import { reactive, ref, onMounted, computed, getCurrentInstance } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import { useUserStore } from "@/stores/user.js"; import { useUserStore } from "@/stores/user.js";
import CommonTable from "@/components/common/commonTable.vue"; import CommonTable from "@/components/common/commonTable.vue";
import SearchForm from "@/components/common/SearchForm.vue";
const router = useRouter(); const handleSearch = (formData) => {
const { proxy } = getCurrentInstance(); currentPage.value = 1;
// 是否是审核角色 getProjectData(formData);
const userStore = useUserStore(); };
const userInfo = userStore.userInfo || (sessionStorage.getItem("userInfo") && JSON.parse(sessionStorage.getItem("userInfo"))) || {}; const router = useRouter();
let canAudit = ref(false); const { proxy } = getCurrentInstance();
userInfo.roles.map(item => { // 是否是审核角色
const userStore = useUserStore();
const userInfo =
userStore.userInfo ||
(sessionStorage.getItem("userInfo") &&
JSON.parse(sessionStorage.getItem("userInfo"))) ||
{};
let canAudit = ref(false);
userInfo.roles.map((item) => {
if (["xmlx_sp", "xmjc_sp"].includes(item.key)) { if (["xmlx_sp", "xmjc_sp"].includes(item.key)) {
canAudit.value = true; canAudit.value = true;
} }
}); });
let tableData = ref([]); let tableData = ref([]);
let tableColumns = ref([ let tableColumns = ref([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称", label: "项目名称",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectCode", prop: "projectCode",
label: "项目编号", label: "项目编号",
showOverflowTooltip: true showOverflowTooltip: true,
}, },
{ {
prop: "projectLzType", prop: "projectLzType",
...@@ -75,10 +96,20 @@ ...@@ -75,10 +96,20 @@
width: 120, width: 120,
align: "center", align: "center",
formatter: (data) => { formatter: (data) => {
return data.projectLzType === "1" ? "待立项" : data.projectLzType === "3" ? "立项审批中" : return data.projectLzType === "1"
data.projectLzType === "5" ? "已立项" : data.projectLzType === "7" ? "决策填报中" : ? "待立项"
data.projectLzType === "8" ? "决策审批中" : data.projectLzType === "9" ? "已决策" : "待立项" : data.projectLzType === "3"
} ? "立项审批中"
: data.projectLzType === "5"
? "已立项"
: data.projectLzType === "7"
? "决策填报中"
: data.projectLzType === "8"
? "决策审批中"
: data.projectLzType === "9"
? "已决策"
: "待立项";
},
}, },
{ {
prop: "operations", prop: "operations",
...@@ -86,16 +117,16 @@ ...@@ -86,16 +117,16 @@
width: 120, width: 120,
slot: "operations", slot: "operations",
fixed: "right", fixed: "right",
align: "center" align: "center",
} },
]); ]);
let loading = ref(false); let loading = ref(false);
let total = ref(0); let total = ref(0);
let currentPage = ref(1); let currentPage = ref(1);
let pageSize = ref(10); let pageSize = ref(10);
// 获取列表数据 // 获取列表数据
const getProjectData = () => { const getProjectData = (params = {}) => {
loading.value = true; loading.value = true;
proxy.$post({ proxy.$post({
url: "/api/project/listProject", url: "/api/project/listProject",
...@@ -103,47 +134,48 @@ ...@@ -103,47 +134,48 @@
page: currentPage.value, page: currentPage.value,
pagesize: pageSize.value, pagesize: pageSize.value,
attributes: [], attributes: [],
menuType: "xmlx" menuType: "xmlx",
...params,
}, },
callback: (data) => { callback: (data) => {
tableData.value = data.rows; tableData.value = data.rows;
total.value = data.count; total.value = data.count;
loading.value = false; loading.value = false;
} },
}) });
}; };
onMounted(() => { onMounted(() => {
getProjectData(); getProjectData();
}) });
// 分页 // 分页
const handleSizeChange = (size) => { const handleSizeChange = (size) => {
pageSize.value = size; pageSize.value = size;
currentPage.value = 1; currentPage.value = 1;
getProjectData(); getProjectData();
} };
const handleCurrentPageChange = (page) => { const handleCurrentPageChange = (page) => {
currentPage.value = page; currentPage.value = page;
getProjectData(); getProjectData();
} };
const viewDecision = (item) => { const viewDecision = (item) => {
router.push({ router.push({
name: "addProject", name: "addProject",
query: { query: {
projectId: item.id, projectId: item.id,
isPreview: true isPreview: true,
} },
}); });
}; };
const fillDecision = (item) => { const fillDecision = (item) => {
router.push({ router.push({
name: "addProject", name: "addProject",
query: { query: {
projectId: item.id projectId: item.id,
} },
}); });
}; };
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
...@@ -9,10 +9,18 @@ ...@@ -9,10 +9,18 @@
</div> </div>
</div> </div>
<div class="manage-content"> <div class="manage-content">
<el-table :data="tableData" style="width: 100%; height: 100%;" empty-text="暂无数据" border> <el-table
:data="tableData"
style="width: 100%; height: 100%"
empty-text="暂无数据"
border
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column v-for="column in tableColumns" :key="column.prop" <el-table-column
:prop="column.prop" :label="column.label" v-for="column in tableColumns"
:key="column.prop"
:prop="column.prop"
:label="column.label"
> >
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row[column.prop]" /> <el-input v-model="scope.row[column.prop]" />
...@@ -20,7 +28,13 @@ ...@@ -20,7 +28,13 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="60"> <el-table-column label="操作" width="60">
<template #default="scope"> <template #default="scope">
<el-button link type="danger" size="small" @click="deleteItem(scope.$index)">删除</el-button> <el-button
link
type="danger"
size="small"
@click="deleteItem(scope.$index)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -30,96 +44,104 @@ ...@@ -30,96 +44,104 @@
</template> </template>
<script setup> <script setup>
import { reactive, ref } from "vue"; import { reactive, ref } from "vue";
import { exportTableFile } from "../../common/tableFileHandle"; import { exportTableFile } from "../../common/tableFileHandle";
const tableColumns = reactive([
const tableColumns = reactive([
{ {
prop: "projectName", prop: "projectName",
label: "项目名称" label: "项目名称",
}, },
{ {
prop: "tzglzt", prop: "tzglzt",
label: "投资管理主体" label: "投资管理主体",
}, },
{ {
prop: "jcdw", prop: "jcdw",
label: "决策单位" label: "决策单位",
}, },
{ {
prop: "xdpfsj", prop: "xdpfsj",
label: "下达批复时间" label: "下达批复时间",
}, },
{ {
prop: "zyx", prop: "zyx",
label: "重要性" label: "重要性",
}, },
{ {
prop: "ssjd", prop: "ssjd",
label: "实施阶段" label: "实施阶段",
}, },
{ {
prop: "pfnr", prop: "pfnr",
label: "批复内容" label: "批复内容",
}, },
{ {
prop: "pfyjsm", prop: "pfyjsm",
label: "批复意见落实情况具体说明" label: "批复意见落实情况具体说明",
}, },
{ {
prop: "lszxqk", prop: "lszxqk",
label: "落实(执行)情况" label: "落实(执行)情况",
}, },
{ {
prop: "zcclxh", prop: "zcclxh",
label: "支撑材料序号" label: "支撑材料序号",
}, },
{ {
prop: "wlsyy", prop: "wlsyy",
label: "未落实原因" label: "未落实原因",
}, },
{ {
prop: "xybgzcs", prop: "xybgzcs",
label: "下一步工作措施" label: "下一步工作措施",
}, },
{ {
prop: "yjwcsj", prop: "yjwcsj",
label: "预计完成时间" label: "预计完成时间",
}, },
{ {
prop: "zrld", prop: "zrld",
label: "责任领导" label: "责任领导",
}, },
{ {
prop: "zrbnmjzrr", prop: "zrbnmjzrr",
label: "责任部门及责任人" label: "责任部门及责任人",
}, },
{ {
prop: "sfgx", prop: "sfgx",
label: "是否更新" label: "是否更新",
}, },
{ {
prop: "bz", prop: "bz",
label: "备注" label: "备注",
} },
]); ]);
let tableData = ref([]); let tableData = ref([]);
const addItem = () => { const addItem = () => {
tableData.value.push({}); tableData.value.push({});
} };
const deleteItem = (index) => { const deleteItem = (index) => {
ElMessageBox.confirm("确认删除该项?", "提示",{ ElMessageBox.confirm("确认删除该项?", "提示", {
confirmButtonText: '确认', confirmButtonText: "确认",
cancelButtonText: '取消', cancelButtonText: "取消",
type: 'warning', type: "warning",
}).then(() => { })
.then(() => {
tableData.value.splice(index, 1); tableData.value.splice(index, 1);
}).catch(() => {}); })
}; .catch(() => {});
const exportData = () => { };
exportTableFile(tableData.value, tableColumns, "投资项目批复意见落实情况统计表", "导出文件") const exportData = () => {
}; exportTableFile(
tableData.value,
tableColumns,
"投资项目批复意见落实情况统计表",
"导出文件",
);
};
</script> </script>
<style lang="less"> <style lang="less">
@import "@/styles/manage.less"; @import "@/styles/manage.less";
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment