fix: BUG修改
This commit is contained in:
parent
6ba0bdd0c0
commit
788f7e1780
@ -2,10 +2,10 @@
|
||||
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://2xliv7gs.shenzhuo.vip:55296'
|
||||
VITE_WPAPI_URL = "http://182.90.224.147:8081"
|
||||
VITE_API_URL = "http://182.90.224.147:9013"
|
||||
# VITE_API_URL = "http://182.90.224.147:9013"
|
||||
|
||||
# 上传
|
||||
# VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url='
|
||||
|
||||
@ -80,3 +80,17 @@ export const payGovermentSubItemList = (params: any) => {
|
||||
export const subGovermentItemDetailList = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/investmentPaymentDetail/list`, params);
|
||||
};
|
||||
|
||||
// 全景计划------------
|
||||
// 全景计划分页列表
|
||||
export const globalPlanList = (params: any) => {
|
||||
return http.post(BASEURL + `/project/projectNodePlan/page`, params);
|
||||
};
|
||||
// 全景计划新增
|
||||
export const globalPlanAdd = (params: any) => {
|
||||
return http.post(BASEURL + `/project/projectNodePlan/add`, params);
|
||||
};
|
||||
// 全景计划编辑
|
||||
export const globalPlanEdit = (params: any) => {
|
||||
return http.post(BASEURL + `/project/projectNodePlan/edit`, params);
|
||||
};
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</div>
|
||||
<div class="titlecent">
|
||||
总投资:
|
||||
<div class="col">-</div>
|
||||
<div class="col">206</div>
|
||||
万
|
||||
</div>
|
||||
</div>
|
||||
@ -766,7 +766,7 @@ const myChamainlett = () => {
|
||||
color: #00ccff;
|
||||
}
|
||||
div:nth-child(2) {
|
||||
font-size: 16px;
|
||||
font-size: 14px;
|
||||
color: #d1e2e3;
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sicentin">
|
||||
<!-- <div class="sicentin">
|
||||
<div class="sicentintop">本月下达罚单金额(万元)</div>
|
||||
<div class="sicentinbot">
|
||||
<div class="sicentinbottop">0</div>
|
||||
@ -66,7 +66,7 @@
|
||||
<div>0</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="jianta"></div>
|
||||
<div class="jiantacent">投资KPI</div>
|
||||
@ -697,7 +697,7 @@ const setjindue = () => {
|
||||
.sicentin {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 33.3%;
|
||||
width: 49.5%;
|
||||
height: 50%;
|
||||
.sicentintop {
|
||||
display: flex;
|
||||
|
||||
@ -23,22 +23,22 @@
|
||||
</template>
|
||||
</ProTable>
|
||||
<changeTheme />
|
||||
<!-- 新增分部分项 -->
|
||||
<!-- 新增全景计划 -->
|
||||
<DialogForm
|
||||
title="新增计划"
|
||||
:title="newTitle"
|
||||
:formConfig="formConfig"
|
||||
:formData="formData"
|
||||
v-model:visible="subVisible"
|
||||
v-model:visible="visible"
|
||||
append-to-body
|
||||
width="700px"
|
||||
@confirm="saveSubItem"
|
||||
@confirm="saveItem"
|
||||
>
|
||||
</DialogForm>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, nextTick, computed } from "vue";
|
||||
import { ref, reactive, nextTick, computed, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox, UploadProps } from "element-plus";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
@ -48,6 +48,9 @@ import { getRoleList, getTreemRoleList, getTreeByIdList } from "@/api/modules/pr
|
||||
import { GlobalStore } from "@/stores";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import type { FormRules, FormInstance, UploadInstance } from "element-plus";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import { globalPlanAdd, globalPlanEdit, globalPlanList } from "@/api/modules/huizhou";
|
||||
|
||||
const globalStore = GlobalStore();
|
||||
const baseUrl = import.meta.env.VITE_API_URL;
|
||||
const fileList = ref([]);
|
||||
@ -67,12 +70,125 @@ const formConfig = {
|
||||
formItemConfig: [
|
||||
{
|
||||
label: "节点编码",
|
||||
prop: "name",
|
||||
prop: "nodeNumber",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点名称",
|
||||
prop: "nodeName",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点类型",
|
||||
prop: "type",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "标准完成时间",
|
||||
prop: "standardCompleteTime",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "计划完成时间",
|
||||
prop: "planCompleteTime",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "预计完成时间",
|
||||
prop: "expectCompleteTime",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "实际完成时间",
|
||||
prop: "realCompleteTime",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "engineeringSn",
|
||||
type: "select",
|
||||
data: [],
|
||||
clearable: true
|
||||
},
|
||||
{
|
||||
label: "实际偏差",
|
||||
prop: "actualDeviation",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "职能线条",
|
||||
prop: "phaseName",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点负责人编号",
|
||||
prop: "chargerNumber",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点负责人",
|
||||
prop: "chargerName",
|
||||
type: "input"
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
name: [
|
||||
nodeNumber: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
nodeName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
standardCompleteTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
planCompleteTime: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
engineeringSn: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
phaseName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
chargerNumber: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
chargerName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
@ -88,12 +204,12 @@ const router = useRouter();
|
||||
const visible = ref(false);
|
||||
const drawerVisible = ref(false);
|
||||
const title = ref("");
|
||||
const newTitle = ref("新增");
|
||||
const formData = ref({
|
||||
name: ""
|
||||
});
|
||||
const childrenFormData = ref({
|
||||
name: ""
|
||||
});
|
||||
const statusList: any = ref([]);
|
||||
const DicMainList = ref([]);
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref();
|
||||
|
||||
@ -103,64 +219,89 @@ const getId = ref<number | undefined>(undefined);
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{
|
||||
prop: "roleName",
|
||||
label: "角色名称",
|
||||
search: { el: "input" }
|
||||
prop: "nodeNumber",
|
||||
label: "节点编号",
|
||||
width: 150
|
||||
},
|
||||
// 多级 prop
|
||||
{ prop: "priority", label: "显示顺序" },
|
||||
{ prop: "state", label: "使用状态" },
|
||||
{ prop: "nodeName", label: "节点名称", width: 150, search: { el: "input" } },
|
||||
{ prop: "type", label: "节点类型", width: 150 },
|
||||
{ prop: "standardCompleteTime", label: "标准完成时间", width: 150 },
|
||||
{ prop: "planCompleteTime", label: "计划完成时间", width: 150 },
|
||||
{ prop: "expectCompleteTime", label: "预计完成时间", width: 150 },
|
||||
{
|
||||
prop: "state",
|
||||
label: "状态",
|
||||
search: { el: "select" },
|
||||
width: 150,
|
||||
isShow: false,
|
||||
enum: [
|
||||
{ label: "启用", value: 1 },
|
||||
{ label: "禁用", value: 0 }
|
||||
]
|
||||
search: { el: "select" },
|
||||
enum: DicMainList.value,
|
||||
fieldNames: { label: "dictValue", value: "dictLabel" }
|
||||
},
|
||||
{
|
||||
prop: "createTime",
|
||||
label: "时间筛选",
|
||||
isShow: false,
|
||||
prop: "status",
|
||||
label: "状态",
|
||||
width: 150
|
||||
},
|
||||
{
|
||||
prop: "realCompleteTime",
|
||||
label: "实际完成时间",
|
||||
width: 150,
|
||||
search: {
|
||||
el: "date-picker",
|
||||
props: {
|
||||
type: "daterange",
|
||||
format: "YYYY-MM-DD",
|
||||
valueFormat: "YYYY-MM-DD"
|
||||
// defaultTime: defaultTime2
|
||||
}
|
||||
span: 2,
|
||||
props: { type: "daterange", format: "YYYY-MM-DD", valueFormat: "YYYY-MM-DD" }
|
||||
// defaultValue: "2023-05"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// prop: "createTime",
|
||||
// label: "实际完成时间",
|
||||
// isShow: false,
|
||||
// search: {
|
||||
// el: "date-picker",
|
||||
// span: 2,
|
||||
// props: { type: "month", valueFormat: "YYYY-MM-DD" }
|
||||
// // defaultValue: "2023-05"
|
||||
// }
|
||||
// },
|
||||
{ prop: "phaseName", label: "智能条线", width: 150 },
|
||||
{ prop: "chargerNumber", label: "节点责任人编号", width: 150 },
|
||||
{ prop: "chargerName", label: "节点责任人", width: 150 },
|
||||
{ prop: "isDeleted", label: "节点失效标记", width: 150 },
|
||||
{ prop: "isSendBack", label: "是否退回", width: 150 },
|
||||
{ prop: "operation", label: "操作", fixed: "right" }
|
||||
];
|
||||
const childrenConfirm = async (formEl: FormInstance | undefined, form: any) => {
|
||||
// 标记表单校验
|
||||
if (!formEl) return;
|
||||
await formEl.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
// if (formData.value.id) {
|
||||
// const res = await videoDataEdit(form);
|
||||
// ElMessage.success("编辑成功");
|
||||
// visible.value = false;
|
||||
// getVideoData();
|
||||
// } else {
|
||||
// const res = await videoDataAdd(form);
|
||||
// ElMessage.success("保存成功");
|
||||
// visible.value = false;
|
||||
// getVideoData();
|
||||
// }
|
||||
} else {
|
||||
console.log("error submit!", fields);
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "请完善表单信息!",
|
||||
type: "error"
|
||||
});
|
||||
}
|
||||
});
|
||||
const getDicMainList = async () => {
|
||||
// 获取学历字典
|
||||
const { result } = await getDicList({ dictType: "node_plan_state" });
|
||||
console.log(result);
|
||||
if (result.length > 0) {
|
||||
formConfig.formItemConfig[7].data = result.map(item => {
|
||||
return {
|
||||
label: item.dictValue,
|
||||
value: item.status
|
||||
};
|
||||
});
|
||||
DicMainList.value.length = 0;
|
||||
DicMainList.value.push(...result);
|
||||
}
|
||||
statusList.value.length = 0;
|
||||
statusList.value.push(...result);
|
||||
};
|
||||
// 新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
if (form.id) {
|
||||
// console.log(form.dictCode);
|
||||
const res = await globalPlanEdit(form);
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("编辑成功");
|
||||
} else {
|
||||
const res = await globalPlanAdd(form);
|
||||
ElMessage.success("新增成功");
|
||||
proTable.value.getTableList();
|
||||
}
|
||||
visible.value = false;
|
||||
};
|
||||
const uploadSuccess = (response: any) => {
|
||||
ElMessage.success("上传成功");
|
||||
@ -218,15 +359,15 @@ const transfrom = (arr: Array<any>) => {
|
||||
const getTableList = (params: any) => {
|
||||
let newParams = JSON.parse(JSON.stringify(params));
|
||||
if (newParams.createTime) {
|
||||
newParams.createTime_begin = newParams.createTime[0];
|
||||
newParams.createTime_end = newParams.createTime[1];
|
||||
newParams.realCompleteTime_begin = newParams.createTime[0];
|
||||
newParams.realCompleteTime_end = newParams.createTime[1];
|
||||
delete newParams.createTime;
|
||||
}
|
||||
return getRoleList(newParams);
|
||||
return globalPlanList(newParams);
|
||||
};
|
||||
|
||||
const handleAddItem = () => {
|
||||
childrenFormData.value = reactive({
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
buildAddress: "",
|
||||
workload: "",
|
||||
@ -238,9 +379,9 @@ const handleAddItem = () => {
|
||||
commander: "",
|
||||
annexFile: ""
|
||||
});
|
||||
// newTitle.value = "新增";
|
||||
newTitle.value = "新增";
|
||||
// fileList.value = reactive([]);
|
||||
subVisible.value = true;
|
||||
visible.value = true;
|
||||
};
|
||||
|
||||
// 修改数据按钮
|
||||
@ -258,6 +399,9 @@ const handleEditItem = async (row: any) => {
|
||||
treeRef.value.setCheckedKeys(res.result.map(item => item.authorityId));
|
||||
});
|
||||
};
|
||||
onMounted(() => {
|
||||
getDicMainList();
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.table-box {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user