fix: BUG修改

This commit is contained in:
kun 2023-08-14 18:58:42 +08:00
parent d1db264723
commit 76fa49fa7a
8 changed files with 49 additions and 24 deletions

View File

@ -133,7 +133,7 @@ export const payGovermentContactAdd = (params: any) => {
export const payGovermentContactEdit = (params: any) => {
return http.post(BASEURL + `/gov/investmentContract/edit`, params);
};
// 投资支付合同设置结算定日期
// 投资支付合同设置结算定日期
export const payGovermentContactSet = (params: any) => {
return http.post(BASEURL + `/gov/engineering/edit`, params);
};

View File

@ -17,7 +17,7 @@
<div class="content">
<div class="fule" v-for="(data, i) in records" :key="i" @click="isActive(i)">
<div class="item" :class="ActiveColor === i ? 'isActive' : ''">
<slot :data="data" />
<slot :data="data" :index="i" />
</div>
</div>
</div>
@ -39,16 +39,17 @@
</template>
<script setup lang="ts">
import { ref } from "vue";
import { ref, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { ElMessage } from "element-plus";
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
defineProps<{
const props = defineProps<{
modelValue: number;
records: ResAiProjectPage[] | ResAiEngineerPage[];
pageable?: { pageNo: number; pageSize: number; total: number };
tabs?: string[];
activeIndex: number;
// leftBack?: boolean;
}>();
@ -92,6 +93,12 @@ const search = () => {
// if (!value.value.trim()) return ElMessage.warning("");
emit("search", value.value);
};
watch(
() => props.activeIndex,
async (value: number) => {
ActiveColor.value = value;
}
);
</script>
<style scoped lang="scss">

View File

@ -4,6 +4,7 @@
v-model="active"
:tabs="['项目名称', '工程名称']"
:records="records"
:activeIndex="modelActive"
@change-page="onCurChange"
@search="onSearchInput"
:pageable="pages"
@ -127,6 +128,8 @@ import { useRoute } from "vue-router";
import { bigItemGovermentAll } from "@/api/modules/huizhou";
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
import { getDustprojectPage, getDustengineeringPage } from "@/api/modules/goverment";
import { sendIframeMessage } from "@/utils/util";
const modelActive = ref(null);
const route = useRoute();
const headerList = reactive([
{ label: "未开始", color: "#D0A530" },
@ -339,9 +342,18 @@ const getEngPage = async () => {
};
onMounted(async () => {
await getEngPage();
onSearch(records.value[0]);
searchSn.value = (records.value as any[])[0].projectSn;
searchName.value = (records.value as any[])[0].projectName;
if (route.query.menuIndex) {
modelActive.value = route.query.menuIndex;
onSearch(records.value[modelActive.value]);
searchSn.value = (records.value as any[])[modelActive.value].projectSn;
searchName.value = (records.value as any[])[modelActive.value].projectName;
} else {
modelActive.value = 0;
onSearch(records.value[0]);
searchSn.value = (records.value as any[])[0].projectSn;
searchName.value = (records.value as any[])[0].projectName;
}
await sendIframeMessage({ obj: { path: route.path } }, 2, undefined);
});
const getGanttStyle = (project: any) => {
console.log("进入 getGanttStyle --- ", project);

View File

@ -39,7 +39,7 @@
<template #formButton="scope">
<el-button class="btnStyle" v-auth="'investment_contract_add'" @click="handleAddItem()">新增</el-button>
<el-button class="btnStyle" v-auth="'investment_contract_setting'" @click="handleSetDate()"
>设置结算定日期</el-button
>设置结算定日期</el-button
>
</template>
<!-- 表格操作 -->
@ -63,7 +63,7 @@
@confirm="saveItem"
>
</DialogForm>
<!-- 设置结算定日期 -->
<!-- 设置结算定日期 -->
<DialogForm
:title="dateTitle"
:formConfig="dateFormConfig"
@ -128,7 +128,7 @@ const columns: ColumnProps[] = [
// prop
{ prop: "contractAmount", label: "合同金额(万元)", width: 200 },
{ prop: "settlementAmount", label: "结算金额(万元)", width: 200 },
{ prop: "settlementTime", label: "结算定日期", width: 200 },
{ prop: "settlementTime", label: "结算定日期", width: 200 },
{ prop: "applicationUnit", label: "申请单位", width: 200 },
{ prop: "bidderTime", label: "中标通知书申请", width: 200 },
{
@ -172,7 +172,7 @@ const formConfig = {
type: "input"
},
// {
// label: "",
// label: "",
// prop: "settlementTime",
// type: "date",
// format: "YYYY-MM-DD",
@ -250,11 +250,11 @@ const formConfig = {
]
}
};
//
//
const dateFormConfig = {
formItemConfig: [
{
label: "结算定日期",
label: "结算定日期",
prop: "settlementTime",
type: "date",
format: "YYYY-MM-DD",
@ -346,7 +346,7 @@ const saveItem = async (form: any) => {
proTable.value.getTableList();
visible.value = false;
};
//
//
const saveDateItem = async (form: any) => {
if (active.value === 0) {
form.projectSn = searchSn.value;

View File

@ -86,8 +86,11 @@
// flex-wrap: wrap;
}
:deep() {
.el-form-item__content > :not(button) {
// width: 160px;
.el-form .el-form-item__content .el-range-editor {
width: 300px;
}
.el-range-separator {
color: var(--el-menu-text-color);
}
.el-input__wrapper {
color: white;
@ -108,7 +111,6 @@
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;

View File

@ -9,8 +9,8 @@
:pageable="pages"
class="leftMenu"
>
<template #default="{ data }">
<div class="leftProject" @click="onSearch(data)">
<template #default="{ data, index }">
<div class="leftProject" @click="onSearch(data, index)">
<span class="projectName">{{ data.projectName || data.engineeringName }}</span>
<div class="leftMenu_item">
<div class="leftMenu_item flx-justify-between">
@ -98,6 +98,7 @@ import { ColumnProps } from "@/components/ProTable/interface";
import { parentItemGovermentList, payGovermentAdd } from "@/api/modules/huizhou";
import { useRoute, useRouter } from "vue-router";
import { sendIframeMessage } from "@/utils/util";
const leftMenuIndex = ref(0);
const route = useRoute();
const pages = ref({
pageNo: 1,
@ -174,7 +175,7 @@ const formConfig = {
type: "input"
},
{
label: "结算定日期",
label: "结算定日期",
prop: "settlementTime",
type: "date"
},
@ -255,7 +256,7 @@ const proTable = ref();
const searchSn = ref("");
//
const seeGantt = () => {
router.push("/goverment/huizhou/progressManagement/GanttchartChart/index");
router.push("/goverment/huizhou/progressManagement/GanttchartChart/index?menuIndex=" + leftMenuIndex.value);
};
//
const handleAddItem = () => {
@ -322,7 +323,10 @@ const getTableList = (params: any) => {
return parentItemGovermentList(newParams);
};
// div
const onSearch = async (params: any) => {
const onSearch = async (params: any, index: number) => {
console.log(params);
console.log(index);
leftMenuIndex.value = index ? index : 0;
active.value === 0 ? (searchSn.value = params.projectSn) : (searchSn.value = params.engineeringSn);
active.value === 0 ? (searchName.value = params.projectName) : (searchName.value = params.engineeringName);
proTable.value.getTableList();

View File

@ -122,7 +122,7 @@ const columns: ColumnProps[] = [
// prop
{ prop: "contractAmount", label: "合同金额(万元)" },
{ prop: "settlementAmount", label: "结算金额(万元)" },
{ prop: "settlementTime", label: "结算定日期" },
{ prop: "settlementTime", label: "结算定日期" },
{ prop: "applicationUnit", label: "申请单位" },
{ prop: "bidderTime", label: "中标通知书申请" },
// { prop: "totalAmount", label: "()", width: 200 },

View File

@ -93,7 +93,7 @@ const columns: ColumnProps[] = [
// prop
{ prop: "contractAmount", label: "合同金额(万元)" },
{ prop: "settlementAmount", label: "结算金额(万元)" },
{ prop: "settlementTime", label: "结算定日期" },
{ prop: "settlementTime", label: "结算定日期" },
{ prop: "applicationUnit", label: "申请单位" },
{ prop: "bidderTime", label: "中标通知书申请" },
// { prop: "totalAmount", label: "()", width: 200 },