明树Git Lab

Commit d3e79971 authored by zhanghan's avatar zhanghan

增加搜索条件

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