fix: BUG修改
This commit is contained in:
parent
6484b66727
commit
f387446c02
@ -372,3 +372,9 @@ export const entApplyTimePage = (params: any) => {
|
||||
export const entApplyTimeAdd = (params: any) => {
|
||||
return http.post(BASEURL + `/ent/investmentApply/add`, params);
|
||||
};
|
||||
|
||||
// 工程量清单----政务版
|
||||
// 工程量信息分页列表
|
||||
export const engineerInfoPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/projectQuantity/page`, params);
|
||||
};
|
||||
|
||||
@ -0,0 +1,114 @@
|
||||
.warning-page {
|
||||
// background-color: blue;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.leftMenu {
|
||||
width: 300px;
|
||||
// width: 290px;
|
||||
// 页面的项目工程
|
||||
:deep(.item) {
|
||||
height: 78px !important;
|
||||
}
|
||||
:deep(.content) {
|
||||
height: calc(100% - 160px) !important;
|
||||
}
|
||||
.leftProject {
|
||||
// padding: 5px 8px;
|
||||
color: #333333;
|
||||
.projectName {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
// font-weight: 700;
|
||||
font-family: "siyuan_Medium";
|
||||
font-size: 20px;
|
||||
color: #ffffff;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.leftMenu_item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
.middleSize {
|
||||
display: inline-block;
|
||||
font-size: 18px;
|
||||
color: #c4c4c4;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.video {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
img {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom_item {
|
||||
.bottomSize {
|
||||
font-size: 18px !important;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-box {
|
||||
width: calc(100% - 300px);
|
||||
height: 100%;
|
||||
.table {
|
||||
margin-left: 20px;
|
||||
height: 100%;
|
||||
:deep(.table-main) {
|
||||
height: calc(100% - 82px);
|
||||
overflow-x: scroll;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-scrollbar__view) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
}
|
||||
:deep() {
|
||||
.el-form .el-form-item__content .el-range-editor {
|
||||
width: 300px;
|
||||
}
|
||||
.el-range-separator {
|
||||
color: var(--el-menu-text-color);
|
||||
}
|
||||
.el-form-item__content > :not(button) {
|
||||
// width: 160px;
|
||||
}
|
||||
.el-input__wrapper {
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
.el-input__inner {
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
}
|
||||
// :deep(.el-dialog__body) {
|
||||
// padding: 0 0 0 0 !important;
|
||||
// background-color: pink;
|
||||
// }
|
||||
@ -0,0 +1,247 @@
|
||||
<template>
|
||||
<div class="warning-page">
|
||||
<LeftMenu
|
||||
v-model="active"
|
||||
:tabs="['项目名称', '工程名称']"
|
||||
:records="records"
|
||||
@change-page="onCurChange"
|
||||
@search="onSearchInput"
|
||||
:pageable="pages"
|
||||
class="leftMenu"
|
||||
>
|
||||
<template #default="{ data }">
|
||||
<div class="leftProject" @click="onSearch(data)">
|
||||
<span class="projectName">{{ data.projectName || data.engineeringName }}</span>
|
||||
<div class="leftMenu_item">
|
||||
<div class="leftMenu_item flx-justify-between">
|
||||
<div style="margin-top: 5px" class="flx-justify-between">
|
||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||
</div>
|
||||
<!-- <div>
|
||||
<img src="@/assets/images/AIwaring/报警.png" alt="" />
|
||||
<span class="middleSize">今日报警次数:{{ data.todayAlarm }}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
<div class="table-box">
|
||||
<div class="table">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
title="工程量清单列表"
|
||||
:columns="columns"
|
||||
:requestApi="getTableList"
|
||||
:dataCallback="dataCallback"
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-upload
|
||||
accept=".xlsx"
|
||||
:headers="headers"
|
||||
:action="`${baseUrl}` + '/gov/projectQuantity/importExcel'"
|
||||
:on-success="uploadFileSuccess"
|
||||
multiple
|
||||
:data="otherParams"
|
||||
:limit="1"
|
||||
style="margin-left: 20px"
|
||||
:show-file-list="false"
|
||||
>
|
||||
<el-button type="primary">导入</el-button>
|
||||
</el-upload>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<!-- <template #operation="{ row }">
|
||||
<el-button class="btnStyle" type="primary" @click="handleItemDetail(2, row)">
|
||||
<img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" />
|
||||
<span>查看</span>
|
||||
</el-button>
|
||||
</template> -->
|
||||
</ProTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup name="engineerInventory">
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import { payGovermentEngList, payGovermentProList, engineerInfoPage } from "@/api/modules/huizhou";
|
||||
import { sendIframeMessage } from "@/utils/util";
|
||||
const otherParams = ref({});
|
||||
const detailsDialog = ref(false);
|
||||
const relativeId = ref("");
|
||||
const pages = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 7,
|
||||
total: 0
|
||||
});
|
||||
const records = ref([]);
|
||||
const active = ref(0);
|
||||
const store = GlobalStore();
|
||||
const headers = ref({ Authorization: "Bearer " + store.token });
|
||||
const baseUrl = import.meta.env.VITE_API_URL;
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ prop: "projectCode", label: "子目号", width: 150 },
|
||||
{
|
||||
prop: "projectName",
|
||||
label: "子目名称",
|
||||
search: { el: "input" }
|
||||
},
|
||||
// 多级 prop
|
||||
{ prop: "unit", label: "单位" },
|
||||
{ prop: "number", label: "数量" },
|
||||
{ prop: "unitPrice", label: "单价" },
|
||||
{ prop: "totalPrice", label: "合价" }
|
||||
// { prop: "operation", label: "操作", fixed: "right", width: 120 }
|
||||
];
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref();
|
||||
// 搜索用的项目sn或者工程sn
|
||||
const searchSn = ref("");
|
||||
// 导入文件
|
||||
const uploadFileSuccess = (response: any) => {
|
||||
console.log(response);
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
const handleItemDetail = (index: number, row: any) => {
|
||||
console.log(row);
|
||||
// if (index === 1) {
|
||||
// title.value = "新增角色";
|
||||
// formData.value = reactive({});
|
||||
// } else {
|
||||
// title.value = "编辑角色";
|
||||
// formData.value = reactive({ ...row });
|
||||
// }
|
||||
relativeId.value = row.id;
|
||||
detailsDialog.value = true;
|
||||
};
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// dataCallback 是对于返回的表格数据做处理,如果你后台返回的数据不是 list && total && pageNum && pageSize 这些字段,那么你可以在这里进行处理成这些字段
|
||||
// 或者直接去 hooks/useTable.ts 文件中把字段改为你后端对应的就行
|
||||
const dataCallback = (data: any) => {
|
||||
// console.log(data);
|
||||
return {
|
||||
list: data.records,
|
||||
total: Number(data.total),
|
||||
pageNo: Number(data.current),
|
||||
pageSize: Number(data.size)
|
||||
};
|
||||
};
|
||||
// 如果你想在请求之前对当前请求参数做一些操作,可以自定义如下函数:params 为当前所有的请求参数(包括分页),最后返回请求列表接口
|
||||
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
||||
const getTableList = (params: any) => {
|
||||
let newParams = JSON.parse(JSON.stringify(params));
|
||||
if (newParams.contractTime) {
|
||||
newParams.contractTime_begin = newParams.contractTime[0];
|
||||
newParams.contractTime_end = newParams.contractTime[1];
|
||||
delete newParams.contractTime;
|
||||
}
|
||||
if (active.value === 0) {
|
||||
newParams.projectSn = searchSn.value;
|
||||
} else {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
}
|
||||
return engineerInfoPage(newParams);
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: any) => {
|
||||
otherParams.value = {};
|
||||
console.log(params);
|
||||
if (active.value === 0) {
|
||||
searchSn.value = params.projectSn;
|
||||
searchName.value = params.projectName;
|
||||
otherParams.value.projectSn = params.projectSn;
|
||||
} else {
|
||||
searchSn.value = params.engineeringSn;
|
||||
searchName.value = params.engineeringName;
|
||||
otherParams.value.engineeringSn = params.projectSn;
|
||||
}
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
// leftMenu页面的搜索按钮
|
||||
const onSearchInput = async (params: string) => {
|
||||
console.log(params);
|
||||
if (active.value === 0) {
|
||||
const { result } = await payGovermentProList({ projectName: params, ...pages.value });
|
||||
records.value = result.records;
|
||||
} else {
|
||||
const { result } = await payGovermentEngList({ engineeringName: params, ...pages.value });
|
||||
records.value = result.records;
|
||||
}
|
||||
};
|
||||
// leftMenu页面的分页
|
||||
const onCurChange = async (params: number) => {
|
||||
if (active.value === 0) {
|
||||
const { result } = await payGovermentProList({ ...pages.value, pageNo: params });
|
||||
records.value = result.records;
|
||||
} else {
|
||||
const { result } = await payGovermentEngList({ ...pages.value, pageNo: params });
|
||||
records.value = result.records;
|
||||
pages.value.total = +result.total;
|
||||
}
|
||||
pages.value.total = +res.result.total;
|
||||
};
|
||||
// 获取项目名称分页
|
||||
const getProPage = async () => {
|
||||
const { result } = await payGovermentProList(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
// 获取工程名称分页
|
||||
const getEngPage = async () => {
|
||||
const { result } = await payGovermentEngList(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = +result.total;
|
||||
};
|
||||
watch(
|
||||
() => active.value,
|
||||
async (value: number) => {
|
||||
pages.value.pageNo = 1;
|
||||
pages.value.total = 0;
|
||||
// console.log(value);
|
||||
|
||||
if (value === 0) {
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
} else {
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
onMounted(async () => {
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = records.value[0].projectSn;
|
||||
searchName.value = records.value[0].projectName;
|
||||
await sendIframeMessage({ obj: { path: store.path, moduleId: store.moduleId } }, 2, undefined);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
@ -16,12 +16,12 @@
|
||||
:data="recordData"
|
||||
class="el-table"
|
||||
:span-method="arraySpanMethod"
|
||||
:row-style="{ textAlign: 'center', height: '40px' }"
|
||||
:header-cell-style="{ textAlign: 'center', height: '40px' }"
|
||||
:cell-style="{ textAlign: 'center', height: '40px' }"
|
||||
:row-style="{ height: '40px' }"
|
||||
:header-cell-style="{ height: '40px' }"
|
||||
:cell-style="{ height: '40px' }"
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="80"> </el-table-column>
|
||||
<el-table-column prop="reportContent" label="汇报内容"> </el-table-column>
|
||||
<el-table-column prop="reportContent" label="汇报内容" align="left"> </el-table-column>
|
||||
<el-table-column prop="totalAmount" label="总工程造价(元)">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="completeAmount" label="本期完成工程造价(元)" width="200"> </el-table-column>
|
||||
<el-table-column prop="lastEndAmount" label="至上期末完成工程造价(元)" width="220"> </el-table-column>
|
||||
<el-table-column prop="nowEndAmount" label="至本期末完成工程造价(元)" width="220"> </el-table-column>
|
||||
<el-table-column prop="completeAmount" label="本期完成工程造价(元)" width="220"> </el-table-column>
|
||||
<el-table-column prop="lastEndAmount" label="至上期末完成工程造价(元)" width="260"> </el-table-column>
|
||||
<el-table-column prop="nowEndAmount" label="至本期末完成工程造价(元)" width="260"> </el-table-column>
|
||||
<!-- <el-table-column prop="scheduleRatio" label="本期完成形象进度(%)" width="200"> </el-table-column>
|
||||
<el-table-column prop="completeScheduleRatio" label="至本期末完成形象进度(%)" width="220"> </el-table-column> -->
|
||||
<el-table-column align="left" label="操作">
|
||||
|
||||
@ -18,6 +18,9 @@
|
||||
<template #investmentPaymentId="scope">
|
||||
<span>{{ scope.row.investmentPaymentId ? "已支付" : "未支付" }}</span>
|
||||
</template>
|
||||
<template #applyStartTime="{ row }">
|
||||
<span v-if="row.applyStartTime">{{ row.applyStartTime + "-" + row.applyEndTime }}</span>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="handleItemDetail(2, row)">
|
||||
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
||||
@ -113,7 +116,11 @@ const columns: ColumnProps[] = [
|
||||
// 多级 prop
|
||||
{ prop: "projectName", label: "项目名称" },
|
||||
{ prop: "name", label: "申报时段名称", search: { el: "input" } },
|
||||
{ prop: "applyTime", label: "申报时段" },
|
||||
{ prop: "applyTime", label: "申报日期" },
|
||||
{
|
||||
label: "申报时段",
|
||||
prop: "applyStartTime"
|
||||
},
|
||||
{ prop: "investmentPaymentId", label: "支付状态" },
|
||||
// {
|
||||
// prop: "contractTime",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user