feat: 项目管理、项目前期管理添加二级类别选项以及修改了页面必填项
This commit is contained in:
parent
9c87149040
commit
d4e55efd0e
@ -2,11 +2,11 @@
|
||||
NODE_ENV = 'development'
|
||||
|
||||
# 本地环境接口地址(/api/index.ts文件中使用)
|
||||
# VITE_API_URL = 'http://192.168.34.155:6688'
|
||||
VITE_API_URL = 'http://192.168.34.155:6688'
|
||||
# VITE_API_URL = 'http://183.63.230.59:6090'
|
||||
# VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296'
|
||||
VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081"
|
||||
VITE_API_URL = "http://jxjzw.zhgdyun.com:9013"
|
||||
# VITE_API_URL = "http://jxjzw.zhgdyun.com:9013"
|
||||
# VITE_API_URL = 'https://xmglcs.hyjgxt.cn:6090'
|
||||
|
||||
# 上传
|
||||
|
||||
@ -39,18 +39,18 @@
|
||||
<div>里程(km)</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="topsixin" @click="toProjectList(2)">
|
||||
<div class="bg4"></div>
|
||||
<div class="titles">
|
||||
<div>{{ projectInfo.bridge }}</div>
|
||||
<div>桥梁工程</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topsixin" @click="toProjectList(3)">
|
||||
<div class="bg5"></div>
|
||||
<div class="titles">
|
||||
<div>{{ projectInfo.tunnel }}</div>
|
||||
<div>隧道工程</div>
|
||||
<div>市政工程</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topsixin" @click="toProjectList(2)">
|
||||
<div class="bg4"></div>
|
||||
<div class="titles">
|
||||
<div>{{ projectInfo.bridge }}</div>
|
||||
<div>信息化工程</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topsixin" @click="toProjectList(4)">
|
||||
|
||||
@ -108,6 +108,9 @@ const submit = async () => {
|
||||
...addRepostData.value,
|
||||
isDraft: 0 // 0代表直接提交
|
||||
};
|
||||
if (Array.isArray(requestData.projectSecondType)) {
|
||||
requestData.projectSecondType = requestData.projectSecondType.join(",");
|
||||
}
|
||||
if (!store.Message) {
|
||||
const data = await addPreEngineering(requestData);
|
||||
ElMessage.success(data.message);
|
||||
|
||||
@ -18,6 +18,7 @@ export enum Important {
|
||||
const data = {
|
||||
engineeringName: "",
|
||||
engineeringType: "",
|
||||
projectSecondType: [],
|
||||
engineeringUse: Type["One"],
|
||||
engineeringCost: "",
|
||||
engineeringArea: "",
|
||||
@ -40,7 +41,8 @@ const data = {
|
||||
{ dictValue: "项目建议书", files: [] },
|
||||
{ dictValue: "各单位回复", files: [] },
|
||||
{ dictValue: "政投会PPT(定稿)", files: [] },
|
||||
{ dictValue: "政投会会议纪要", files: [] }
|
||||
{ dictValue: "政投会会议纪要", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -52,6 +54,7 @@ export const reset = () => {
|
||||
form.value = {
|
||||
engineeringName: "",
|
||||
engineeringType: "",
|
||||
projectSecondType: [],
|
||||
engineeringUse: Type["One"],
|
||||
engineeringCost: "",
|
||||
engineeringArea: "",
|
||||
@ -74,7 +77,8 @@ export const reset = () => {
|
||||
{ dictValue: "项目建议书", files: [] },
|
||||
{ dictValue: "各单位回复", files: [] },
|
||||
{ dictValue: "政投会PPT(定稿)", files: [] },
|
||||
{ dictValue: "政投会会议纪要", files: [] }
|
||||
{ dictValue: "政投会会议纪要", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
@ -89,6 +93,10 @@ export const rules = ref<FormRules>({
|
||||
// required: true,
|
||||
// message: "请输入项目类别"
|
||||
// },
|
||||
// projectSecondType: {
|
||||
// required: true,
|
||||
// message: "请输入项目类别"
|
||||
// },
|
||||
// engineeringUse: {
|
||||
// type: "number",
|
||||
// required: true,
|
||||
|
||||
@ -22,6 +22,21 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="项目二级类别:" prop="projectSecondType">
|
||||
<el-select class="select" multiple placeholder="请选择" v-model="form.projectSecondType">
|
||||
<el-option
|
||||
v-for="item in engineeringTypeSecondOptions"
|
||||
:key="item.dictCode"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictLabel"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="建设地址:" prop="address">
|
||||
<el-input placeholder="请输入" v-model="form.address" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="项目总投资:" prop="engineeringCost">
|
||||
<el-input placeholder="请输入" v-model="form.engineeringCost" />
|
||||
@ -69,9 +84,6 @@
|
||||
<el-form-item label="所属管辖区域:">
|
||||
<area-selected v-model="addressList" @get-address="handleGetAdress"></area-selected>
|
||||
</el-form-item>
|
||||
<el-form-item label="建设地址:" prop="address">
|
||||
<el-input placeholder="请输入" v-model="form.address" />
|
||||
</el-form-item>
|
||||
<div class="row">
|
||||
<el-form-item label="开始时间:" prop="oneStartTime">
|
||||
<el-date-picker
|
||||
@ -181,6 +193,7 @@ const oneStartTimeRef = ref<ElDatePickerType>(),
|
||||
oneEndTimeRef = ref<ElDatePickerType>();
|
||||
|
||||
const engineeringTypeOptions = ref<any>([]),
|
||||
engineeringTypeSecondOptions = ref<any>([]),
|
||||
engineeringUseOptions = ref<DictDataList>([]);
|
||||
|
||||
const engineeringPurpose = ref<any>([]);
|
||||
@ -302,6 +315,7 @@ onMounted(async () => {
|
||||
item.files = files;
|
||||
});
|
||||
}
|
||||
form.value.projectSecondType = store.Message.projectSecondType.split(",").map((item: string) => Number(item));
|
||||
}
|
||||
// if (store.Message) {
|
||||
// form.value = store.Message;
|
||||
@ -320,6 +334,13 @@ onUnmounted(() => {
|
||||
ruleFormRef.value?.clearValidate();
|
||||
reset();
|
||||
});
|
||||
watch(
|
||||
() => form.value.engineeringType,
|
||||
async newVal => {
|
||||
const res = await getDicList({ dictType: "engineering_type_" + newVal });
|
||||
engineeringTypeSecondOptions.value = res.result;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -31,7 +31,8 @@ const data = {
|
||||
twoReportedBy: "",
|
||||
engineeringSingles: [
|
||||
{ dictValue: "可行性研究报告", files: [] },
|
||||
{ dictValue: "立项批复", files: [] }
|
||||
{ dictValue: "立项批复", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -56,7 +57,8 @@ export const reset = () => {
|
||||
twoReportedBy: "",
|
||||
engineeringSingles: [
|
||||
{ dictValue: "可行性研究报告", files: [] },
|
||||
{ dictValue: "立项批复", files: [] }
|
||||
{ dictValue: "立项批复", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -36,7 +36,8 @@ const data = {
|
||||
engineeringSingles: [
|
||||
{ dictValue: "用地预审回函", files: [] },
|
||||
{ dictValue: "用地规划回函", files: [] },
|
||||
{ dictValue: "征地拆迁回函", files: [] }
|
||||
{ dictValue: "征地拆迁回函", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -66,7 +67,8 @@ export const reset = () => {
|
||||
engineeringSingles: [
|
||||
{ dictValue: "用地预审回函", files: [] },
|
||||
{ dictValue: "用地规划回函", files: [] },
|
||||
{ dictValue: "征地拆迁回函", files: [] }
|
||||
{ dictValue: "征地拆迁回函", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -25,7 +25,8 @@ const data = {
|
||||
engineeringSingles: [
|
||||
{ dictValue: "汇报文档", files: [] },
|
||||
{ dictValue: "方案阶段图纸", files: [] },
|
||||
{ dictValue: "会议签到及意见汇总", files: [] }
|
||||
{ dictValue: "会议签到及意见汇总", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -44,7 +45,8 @@ export const reset = () => {
|
||||
engineeringSingles: [
|
||||
{ dictValue: "汇报文档", files: [] },
|
||||
{ dictValue: "方案阶段图纸", files: [] },
|
||||
{ dictValue: "会议签到及意见汇总", files: [] }
|
||||
{ dictValue: "会议签到及意见汇总", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -30,7 +30,8 @@ const data = {
|
||||
{ dictValue: "初步设计图纸", files: [] },
|
||||
{ dictValue: "概算文件", files: [] },
|
||||
{ dictValue: "初步设计及概算批复文件", files: [] },
|
||||
{ dictValue: "会议签到及意见汇总", files: [] }
|
||||
{ dictValue: "会议签到及意见汇总", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -54,7 +55,8 @@ export const reset = () => {
|
||||
{ dictValue: "初步设计图纸", files: [] },
|
||||
{ dictValue: "概算文件", files: [] },
|
||||
{ dictValue: "初步设计及概算批复文件", files: [] },
|
||||
{ dictValue: "会议签到及意见汇总", files: [] }
|
||||
{ dictValue: "会议签到及意见汇总", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -29,7 +29,8 @@ const data = {
|
||||
{ dictValue: "勘察文件", files: [] },
|
||||
{ dictValue: "施工图", files: [] },
|
||||
{ dictValue: "审图报告", files: [] },
|
||||
{ dictValue: "施工图批复", files: [] }
|
||||
{ dictValue: "施工图批复", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -52,7 +53,8 @@ export const reset = () => {
|
||||
{ dictValue: "勘察文件", files: [] },
|
||||
{ dictValue: "施工图", files: [] },
|
||||
{ dictValue: "审图报告", files: [] },
|
||||
{ dictValue: "施工图批复", files: [] }
|
||||
{ dictValue: "施工图批复", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -27,7 +27,8 @@ const data = {
|
||||
engineeringSingles: [
|
||||
{ dictValue: "预算文件", files: [] },
|
||||
{ dictValue: "预算审核文件", files: [] },
|
||||
{ dictValue: "预算定案书", files: [] }
|
||||
{ dictValue: "预算定案书", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -48,7 +49,8 @@ export const reset = () => {
|
||||
engineeringSingles: [
|
||||
{ dictValue: "预算文件", files: [] },
|
||||
{ dictValue: "预算审核文件", files: [] },
|
||||
{ dictValue: "预算定案书", files: [] }
|
||||
{ dictValue: "预算定案书", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -46,7 +46,8 @@ const data = {
|
||||
{ dictValue: "招标文件", files: [] },
|
||||
{ dictValue: "投标文件", files: [] },
|
||||
{ dictValue: "评标文件", files: [] },
|
||||
{ dictValue: "中标通知书", files: [] }
|
||||
{ dictValue: "中标通知书", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
|
||||
@ -86,7 +87,8 @@ export const reset = () => {
|
||||
{ dictValue: "招标文件", files: [] },
|
||||
{ dictValue: "投标文件", files: [] },
|
||||
{ dictValue: "评标文件", files: [] },
|
||||
{ dictValue: "中标通知书", files: [] }
|
||||
{ dictValue: "中标通知书", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
]
|
||||
};
|
||||
};
|
||||
|
||||
@ -409,7 +409,7 @@ const addFormContentFn = (index: number) => {
|
||||
let arr = [
|
||||
{ dictValue: "编制文件", files: [] },
|
||||
{ dictValue: "批复文件", files: [] },
|
||||
{ dictValue: "其他文件", files: [] }
|
||||
// { dictValue: "其他文件", files: [] }
|
||||
];
|
||||
form.value.engineeringSingles.push(...arr);
|
||||
}
|
||||
|
||||
@ -323,13 +323,13 @@ const formRules = {
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
settlementAmount: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
// settlementAmount: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入",
|
||||
// trigger: "blur"
|
||||
// }
|
||||
// ],
|
||||
// settlementTime: [
|
||||
// {
|
||||
// message: "请选择",
|
||||
@ -356,21 +356,21 @@ const formRules = {
|
||||
message: "请选择",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
performanceTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
warrantyPeriod: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
// performanceTime: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请选择",
|
||||
// trigger: "change"
|
||||
// }
|
||||
// ],
|
||||
// warrantyPeriod: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入",
|
||||
// trigger: "blur"
|
||||
// }
|
||||
// ]
|
||||
};
|
||||
// 弹窗中的配置
|
||||
const formConfig = {
|
||||
|
||||
@ -76,6 +76,9 @@ const submit = async () => {
|
||||
...addRepostData.value
|
||||
};
|
||||
console.log(requestData, 888999);
|
||||
if (Array.isArray(requestData.projectSecondType)) {
|
||||
requestData.projectSecondType = requestData.projectSecondType.join(",");
|
||||
}
|
||||
if (!store.Message || requestData.examineState == -1) {
|
||||
delete requestData.id;
|
||||
const data = await addEngineering(requestData);
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
// background-color: #fff;
|
||||
flex: 1;
|
||||
.form {
|
||||
padding: 40px 10% 0 10%;
|
||||
padding: 0px 10% 0 10%;
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@ -21,6 +21,7 @@ const data = {
|
||||
engineeringName: "",
|
||||
engineeringCode: "",
|
||||
engineeringType: "",
|
||||
projectSecondType: [],
|
||||
engineeringUse: Type["One"],
|
||||
engineeringCost: "",
|
||||
engineeringArea: "",
|
||||
@ -63,6 +64,7 @@ export const reset = () => {
|
||||
engineeringName: "",
|
||||
engineeringCode: "",
|
||||
engineeringType: "",
|
||||
projectSecondType: [],
|
||||
engineeringUse: Type["One"],
|
||||
engineeringCost: "",
|
||||
engineeringArea: "",
|
||||
@ -113,7 +115,11 @@ export const rules = ref<FormRules>({
|
||||
engineeringType: {
|
||||
type: "number",
|
||||
required: true,
|
||||
message: "请输入项目类别"
|
||||
message: "请选择项目类别"
|
||||
},
|
||||
projectSecondType: {
|
||||
required: true,
|
||||
message: "请选择项目二级类别"
|
||||
},
|
||||
engineeringUse: {
|
||||
type: "number",
|
||||
|
||||
@ -32,6 +32,31 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="项目二级类别:" prop="projectSecondType">
|
||||
<el-select class="select" multiple placeholder="请选择" v-model="form.projectSecondType">
|
||||
<el-option
|
||||
v-for="item in engineeringTypeSecondOptions"
|
||||
:key="item.dictCode"
|
||||
:label="item.dictValue"
|
||||
:value="item.dictLabel"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目位置:" prop="position">
|
||||
<!-- <label class="label"><span>经度</span> <el-input disabled v-model="form.longitude" size="small" /></label>
|
||||
<label class="label"><span>纬度</span> <el-input disabled v-model="form.latitude" size="small" /></label> -->
|
||||
<el-input placeholder="请选择" v-model="form.position">
|
||||
<template #append>
|
||||
<el-icon size="22" @click="openMap"><Location /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
|
||||
<!-- <el-icon style="background-color: #008bff; color: #fff; height: 42px; width: 36px" size="22" @click="openMap"
|
||||
><Location
|
||||
/></el-icon> -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="row">
|
||||
<el-form-item label="项目用途:" prop="engineeringUse">
|
||||
<el-select class="select" placeholder="请选择" v-model="form.engineeringUse">
|
||||
@ -69,19 +94,6 @@
|
||||
<el-radio :label="0">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目位置:" prop="position">
|
||||
<!-- <label class="label"><span>经度</span> <el-input disabled v-model="form.longitude" size="small" /></label>
|
||||
<label class="label"><span>纬度</span> <el-input disabled v-model="form.latitude" size="small" /></label> -->
|
||||
<el-input placeholder="请选择" v-model="form.position">
|
||||
<template #append>
|
||||
<el-icon size="22" @click="openMap"><Location /></el-icon>
|
||||
</template>
|
||||
</el-input>
|
||||
|
||||
<!-- <el-icon style="background-color: #008bff; color: #fff; height: 42px; width: 36px" size="22" @click="openMap"
|
||||
><Location
|
||||
/></el-icon> -->
|
||||
</el-form-item>
|
||||
</div>
|
||||
<!-- 标记校验 -->
|
||||
<el-form-item label="所属管辖区域:">
|
||||
@ -269,7 +281,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, onUnmounted, onActivated, onDeactivated } from "vue";
|
||||
import { ref, onMounted, onUnmounted, watch, onActivated, onDeactivated } from "vue";
|
||||
import { form, reset, rules } from "./overview";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import { getEngineeringName } from "@/api/modules/project";
|
||||
@ -304,6 +316,7 @@ const licenseCreateTimeRef = ref<ElDatePickerType>(),
|
||||
endTimeRef = ref<ElDatePickerType>();
|
||||
|
||||
const engineeringTypeOptions = ref<any>([]),
|
||||
engineeringTypeSecondOptions = ref<any>([]),
|
||||
engineeringUseOptions = ref<DictDataList>([]);
|
||||
|
||||
const engineeringPurpose = ref<any>([]);
|
||||
@ -399,6 +412,7 @@ onMounted(async () => {
|
||||
form.value = store.Message;
|
||||
form.value.position = "经度:" + store.Message.longitude + " 纬度:" + store.Message.latitude;
|
||||
addressList.value = store.Message;
|
||||
form.value.projectSecondType = store.Message.projectSecondType.split(",").map((item: string) => Number(item));
|
||||
}
|
||||
const res2 = await getDicList({ dictType: "engineering_state" });
|
||||
engineeringState.value = res2.result;
|
||||
@ -422,6 +436,13 @@ onUnmounted(() => {
|
||||
ruleFormRef.value?.clearValidate();
|
||||
reset();
|
||||
});
|
||||
watch(
|
||||
() => form.value.engineeringType,
|
||||
async newVal => {
|
||||
const res = await getDicList({ dictType: "engineering_type_" + newVal });
|
||||
engineeringTypeSecondOptions.value = res.result;
|
||||
}
|
||||
);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user