2023-06-19 15:32:07 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<div class="table-box">
|
|
|
|
|
|
<ProTable
|
|
|
|
|
|
ref="proTable"
|
|
|
|
|
|
title="全景计划列表"
|
|
|
|
|
|
:columns="columns"
|
|
|
|
|
|
:requestApi="getTableList"
|
|
|
|
|
|
:dataCallback="dataCallback"
|
|
|
|
|
|
:tool-button="false"
|
|
|
|
|
|
:pagination="true"
|
|
|
|
|
|
background
|
|
|
|
|
|
:isShowSearch="false"
|
|
|
|
|
|
:onReset="true"
|
|
|
|
|
|
>
|
2023-07-01 21:49:51 +08:00
|
|
|
|
<template #formButton="scope">
|
|
|
|
|
|
<el-button class="btnStyle" @click="handleAddItem()">新增</el-button>
|
|
|
|
|
|
</template>
|
2023-06-19 15:32:07 +08:00
|
|
|
|
<template #operation="{ row }">
|
2023-07-01 21:49:51 +08:00
|
|
|
|
<el-button type="primary" link @click="handleEditItem(row)">
|
2023-06-19 15:32:07 +08:00
|
|
|
|
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
|
|
|
|
|
<span>编辑</span>
|
|
|
|
|
|
</el-button>
|
2023-07-05 15:08:49 +08:00
|
|
|
|
<el-button type="primary" link @click="handleItemDetail(row)">
|
|
|
|
|
|
<img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" />
|
|
|
|
|
|
<span>查看</span>
|
|
|
|
|
|
</el-button>
|
2023-06-19 15:32:07 +08:00
|
|
|
|
</template>
|
|
|
|
|
|
</ProTable>
|
|
|
|
|
|
<changeTheme />
|
2023-07-04 21:11:22 +08:00
|
|
|
|
<!-- 新增全景计划 -->
|
2023-06-19 15:32:07 +08:00
|
|
|
|
<DialogForm
|
2023-07-04 21:11:22 +08:00
|
|
|
|
:title="newTitle"
|
2023-06-19 15:32:07 +08:00
|
|
|
|
:formConfig="formConfig"
|
|
|
|
|
|
:formData="formData"
|
2023-07-04 21:11:22 +08:00
|
|
|
|
v-model:visible="visible"
|
2023-06-19 15:32:07 +08:00
|
|
|
|
append-to-body
|
|
|
|
|
|
width="700px"
|
2023-07-04 21:11:22 +08:00
|
|
|
|
@confirm="saveItem"
|
2023-06-19 15:32:07 +08:00
|
|
|
|
>
|
|
|
|
|
|
</DialogForm>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
2023-07-04 21:11:22 +08:00
|
|
|
|
import { ref, reactive, nextTick, computed, onMounted } from "vue";
|
2023-06-19 15:32:07 +08:00
|
|
|
|
import { ElMessage, ElMessageBox, UploadProps } from "element-plus";
|
|
|
|
|
|
import { useRouter } from "vue-router";
|
|
|
|
|
|
import { ColumnProps } from "@/components/ProTable/interface";
|
|
|
|
|
|
import ProTable from "@/components/ProTable/index.vue";
|
|
|
|
|
|
import changeTheme from "@/components/changeTheme/index.vue";
|
|
|
|
|
|
import { getRoleList, getTreemRoleList, getTreeByIdList } from "@/api/modules/project";
|
|
|
|
|
|
import { GlobalStore } from "@/stores";
|
|
|
|
|
|
import DialogForm from "@/components/DialogForm/index.vue";
|
|
|
|
|
|
import type { FormRules, FormInstance, UploadInstance } from "element-plus";
|
2023-07-04 21:11:22 +08:00
|
|
|
|
import { getDicList } from "@/api/modules/jxjview";
|
|
|
|
|
|
import { globalPlanAdd, globalPlanEdit, globalPlanList } from "@/api/modules/huizhou";
|
|
|
|
|
|
|
2023-06-19 15:32:07 +08:00
|
|
|
|
const globalStore = GlobalStore();
|
|
|
|
|
|
const baseUrl = import.meta.env.VITE_API_URL;
|
|
|
|
|
|
const fileList = ref([]);
|
|
|
|
|
|
const headers = ref({ Authorization: "Bearer " + globalStore.token });
|
|
|
|
|
|
const ruleFormRef = ref<FormInstance>();
|
|
|
|
|
|
const rules = reactive<FormRules>({
|
|
|
|
|
|
name: {
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: "请输入",
|
|
|
|
|
|
trigger: "blur"
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
const childrenVisible = ref(false);
|
|
|
|
|
|
const subVisible = ref(false);
|
|
|
|
|
|
// 弹窗中的配置
|
|
|
|
|
|
const formConfig = {
|
|
|
|
|
|
formItemConfig: [
|
|
|
|
|
|
{
|
2023-07-01 21:49:51 +08:00
|
|
|
|
label: "节点编码",
|
2023-07-04 21:11:22 +08:00
|
|
|
|
prop: "nodeNumber",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "节点名称",
|
|
|
|
|
|
prop: "nodeName",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "节点类型",
|
|
|
|
|
|
prop: "type",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "标准完成时间",
|
|
|
|
|
|
prop: "standardCompleteTime",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "date",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "计划完成时间",
|
|
|
|
|
|
prop: "planCompleteTime",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "date",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "预计完成时间",
|
|
|
|
|
|
prop: "expectCompleteTime",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "date",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "实际完成时间",
|
|
|
|
|
|
prop: "realCompleteTime",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "date",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "状态",
|
2023-07-05 09:23:23 +08:00
|
|
|
|
prop: "state",
|
2023-07-04 21:11:22 +08:00
|
|
|
|
type: "select",
|
|
|
|
|
|
data: [],
|
2023-07-05 15:08:49 +08:00
|
|
|
|
clearable: true,
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "实际偏差",
|
|
|
|
|
|
prop: "actualDeviation",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "职能线条",
|
|
|
|
|
|
prop: "phaseName",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "节点负责人编号",
|
|
|
|
|
|
prop: "chargerNumber",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-07-04 21:11:22 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
label: "节点负责人",
|
|
|
|
|
|
prop: "chargerName",
|
2023-07-05 15:08:49 +08:00
|
|
|
|
type: "input",
|
|
|
|
|
|
disabled: false
|
2023-06-19 15:32:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
rules: {
|
2023-07-04 21:11:22 +08:00
|
|
|
|
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: [
|
2023-06-19 15:32:07 +08:00
|
|
|
|
{
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
message: "请输入",
|
|
|
|
|
|
trigger: "blur"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
};
|
|
|
|
|
|
const treeRef = ref(null);
|
|
|
|
|
|
|
|
|
|
|
|
const datas = reactive([]);
|
|
|
|
|
|
const router = useRouter();
|
|
|
|
|
|
const visible = ref(false);
|
|
|
|
|
|
const drawerVisible = ref(false);
|
|
|
|
|
|
const title = ref("");
|
2023-07-04 21:11:22 +08:00
|
|
|
|
const newTitle = ref("新增");
|
2023-06-19 15:32:07 +08:00
|
|
|
|
const formData = ref({
|
2023-07-05 09:23:23 +08:00
|
|
|
|
nodeNumber: "",
|
|
|
|
|
|
nodeName: "",
|
|
|
|
|
|
type: "",
|
|
|
|
|
|
standardCompleteTime: "",
|
|
|
|
|
|
planCompleteTime: "",
|
|
|
|
|
|
expectCompleteTime: "",
|
|
|
|
|
|
realCompleteTime: "",
|
|
|
|
|
|
state: null,
|
|
|
|
|
|
actualDeviation: "",
|
|
|
|
|
|
phaseName: "",
|
|
|
|
|
|
chargerNumber: "",
|
|
|
|
|
|
chargerName: ""
|
2023-06-19 15:32:07 +08:00
|
|
|
|
});
|
2023-07-04 21:11:22 +08:00
|
|
|
|
const statusList: any = ref([]);
|
|
|
|
|
|
const DicMainList = ref([]);
|
2023-06-19 15:32:07 +08:00
|
|
|
|
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
|
|
|
|
|
const proTable = ref();
|
|
|
|
|
|
|
|
|
|
|
|
const getId = ref<number | undefined>(undefined);
|
|
|
|
|
|
|
|
|
|
|
|
// 表格配置项
|
|
|
|
|
|
const columns: ColumnProps[] = [
|
|
|
|
|
|
{ type: "index", label: "序号", width: 80 },
|
|
|
|
|
|
{
|
2023-07-04 21:11:22 +08:00
|
|
|
|
prop: "nodeNumber",
|
|
|
|
|
|
label: "节点编号",
|
|
|
|
|
|
width: 150
|
2023-06-19 15:32:07 +08:00
|
|
|
|
},
|
|
|
|
|
|
// 多级 prop
|
2023-07-04 21:11:22 +08:00
|
|
|
|
{ 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 },
|
2023-06-19 15:32:07 +08:00
|
|
|
|
{
|
|
|
|
|
|
prop: "state",
|
|
|
|
|
|
label: "状态",
|
2023-07-04 21:11:22 +08:00
|
|
|
|
width: 150,
|
2023-06-19 15:32:07 +08:00
|
|
|
|
isShow: false,
|
2023-07-04 21:11:22 +08:00
|
|
|
|
search: { el: "select" },
|
|
|
|
|
|
enum: DicMainList.value,
|
|
|
|
|
|
fieldNames: { label: "dictValue", value: "dictLabel" }
|
2023-06-19 15:32:07 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2023-07-04 21:11:22 +08:00
|
|
|
|
prop: "status",
|
|
|
|
|
|
label: "状态",
|
|
|
|
|
|
width: 150
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
prop: "realCompleteTime",
|
|
|
|
|
|
label: "实际完成时间",
|
|
|
|
|
|
width: 150,
|
2023-06-19 15:32:07 +08:00
|
|
|
|
search: {
|
|
|
|
|
|
el: "date-picker",
|
2023-07-04 21:11:22 +08:00
|
|
|
|
span: 2,
|
|
|
|
|
|
props: { type: "daterange", format: "YYYY-MM-DD", valueFormat: "YYYY-MM-DD" }
|
|
|
|
|
|
// defaultValue: "2023-05"
|
2023-06-19 15:32:07 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-07-04 21:11:22 +08:00
|
|
|
|
// {
|
|
|
|
|
|
// 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 },
|
2023-07-05 09:23:23 +08:00
|
|
|
|
{
|
|
|
|
|
|
prop: "isDeleted",
|
|
|
|
|
|
label: "节点失效标记",
|
|
|
|
|
|
width: 150,
|
|
|
|
|
|
render: scoped => {
|
|
|
|
|
|
return scoped.row.isDeleted == 0 ? "有效" : "失效";
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
prop: "isSendBack",
|
|
|
|
|
|
label: "是否退回",
|
|
|
|
|
|
width: 150,
|
|
|
|
|
|
render: scoped => {
|
|
|
|
|
|
return scoped.row.isSendBack == 1 ? "是" : "否";
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-07-05 15:08:49 +08:00
|
|
|
|
{ prop: "operation", label: "操作", width: 200, fixed: "right" }
|
2023-06-19 15:32:07 +08:00
|
|
|
|
];
|
2023-07-04 21:11:22 +08:00
|
|
|
|
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) => {
|
2023-07-05 15:08:49 +08:00
|
|
|
|
if (form.id && newTitle.value != "查看") {
|
2023-07-04 21:11:22 +08:00
|
|
|
|
// console.log(form.dictCode);
|
|
|
|
|
|
const res = await globalPlanEdit(form);
|
|
|
|
|
|
proTable.value.getTableList();
|
|
|
|
|
|
ElMessage.success("编辑成功");
|
2023-07-05 15:08:49 +08:00
|
|
|
|
} else if (newTitle.value != "查看" && !form.id) {
|
2023-07-04 21:11:22 +08:00
|
|
|
|
const res = await globalPlanAdd(form);
|
|
|
|
|
|
ElMessage.success("新增成功");
|
|
|
|
|
|
proTable.value.getTableList();
|
|
|
|
|
|
}
|
|
|
|
|
|
visible.value = false;
|
2023-06-19 15:32:07 +08:00
|
|
|
|
};
|
|
|
|
|
|
const uploadSuccess = (response: any) => {
|
|
|
|
|
|
ElMessage.success("上传成功");
|
|
|
|
|
|
// formData.value.videoUrl = response.result.url;
|
|
|
|
|
|
// fileList.value = [{ name: response.result.originalFilename, url: response.result.downloadPath }];
|
|
|
|
|
|
};
|
|
|
|
|
|
const onRemove: UploadProps["onRemove"] = (file, uploadFiles) => {
|
|
|
|
|
|
// formData.value.videoUrl = "";
|
|
|
|
|
|
fileList.value = reactive([]);
|
|
|
|
|
|
};
|
|
|
|
|
|
const saveSubItem = async (form: any) => {
|
|
|
|
|
|
// if (form.roleId) {
|
|
|
|
|
|
// // console.log(form.dictCode);
|
|
|
|
|
|
// const res = await editRole(form);
|
|
|
|
|
|
// proTable.value.getTableList();
|
|
|
|
|
|
// ElMessage.success("编辑成功");
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
// const res = await addRole(form);
|
|
|
|
|
|
// ElMessage.success("新增成功");
|
|
|
|
|
|
// proTable.value.getTableList();
|
|
|
|
|
|
// }
|
|
|
|
|
|
visible.value = false;
|
|
|
|
|
|
};
|
|
|
|
|
|
// 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)
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const transfrom = (arr: Array<any>) => {
|
|
|
|
|
|
const result = [];
|
|
|
|
|
|
return arr
|
|
|
|
|
|
.map(item => {
|
|
|
|
|
|
if (arr.children && Array.isArray(arr.children)) {
|
|
|
|
|
|
result.concat(transfrom(arr.children));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
authorityId: item.name,
|
|
|
|
|
|
roleId: getId.value,
|
|
|
|
|
|
type: item.type
|
|
|
|
|
|
};
|
|
|
|
|
|
})
|
|
|
|
|
|
.concat(result);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 如果你想在请求之前对当前请求参数做一些操作,可以自定义如下函数:params 为当前所有的请求参数(包括分页),最后返回请求列表接口
|
|
|
|
|
|
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
|
|
|
|
|
const getTableList = (params: any) => {
|
|
|
|
|
|
let newParams = JSON.parse(JSON.stringify(params));
|
2023-07-05 09:23:23 +08:00
|
|
|
|
if (newParams.realCompleteTime) {
|
|
|
|
|
|
newParams.realCompleteTime_begin = newParams.realCompleteTime[0];
|
|
|
|
|
|
newParams.realCompleteTime_end = newParams.realCompleteTime[1];
|
|
|
|
|
|
delete newParams.realCompleteTime;
|
2023-06-19 15:32:07 +08:00
|
|
|
|
}
|
2023-07-04 21:11:22 +08:00
|
|
|
|
return globalPlanList(newParams);
|
2023-06-19 15:32:07 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2023-07-01 21:49:51 +08:00
|
|
|
|
const handleAddItem = () => {
|
2023-07-04 21:11:22 +08:00
|
|
|
|
formData.value = reactive({
|
2023-07-05 09:23:23 +08:00
|
|
|
|
nodeNumber: "",
|
|
|
|
|
|
nodeName: "",
|
|
|
|
|
|
type: "",
|
|
|
|
|
|
standardCompleteTime: "",
|
|
|
|
|
|
planCompleteTime: "",
|
|
|
|
|
|
expectCompleteTime: "",
|
|
|
|
|
|
realCompleteTime: "",
|
|
|
|
|
|
state: null,
|
|
|
|
|
|
actualDeviation: "",
|
|
|
|
|
|
phaseName: "",
|
|
|
|
|
|
chargerNumber: "",
|
|
|
|
|
|
chargerName: ""
|
2023-07-01 21:49:51 +08:00
|
|
|
|
});
|
2023-07-04 21:11:22 +08:00
|
|
|
|
newTitle.value = "新增";
|
2023-07-01 21:49:51 +08:00
|
|
|
|
// fileList.value = reactive([]);
|
2023-07-05 15:08:49 +08:00
|
|
|
|
formConfig.formItemConfig.map(item => {
|
|
|
|
|
|
item.disabled = false;
|
|
|
|
|
|
});
|
2023-07-04 21:11:22 +08:00
|
|
|
|
visible.value = true;
|
2023-06-19 15:32:07 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 修改数据按钮
|
|
|
|
|
|
const handleEditItem = async (row: any) => {
|
2023-07-05 09:23:23 +08:00
|
|
|
|
console.log(row);
|
|
|
|
|
|
formData.value = reactive({ ...row });
|
|
|
|
|
|
newTitle.value = "编辑";
|
2023-07-05 15:08:49 +08:00
|
|
|
|
formConfig.formItemConfig.map(item => {
|
|
|
|
|
|
item.disabled = false;
|
|
|
|
|
|
});
|
|
|
|
|
|
visible.value = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
// 查看数据按钮
|
|
|
|
|
|
const handleItemDetail = async (row: any) => {
|
|
|
|
|
|
console.log(row);
|
|
|
|
|
|
formData.value = reactive({ ...row });
|
|
|
|
|
|
formConfig.formItemConfig.map(item => {
|
|
|
|
|
|
item.disabled = true;
|
|
|
|
|
|
});
|
|
|
|
|
|
newTitle.value = "查看";
|
2023-07-05 09:23:23 +08:00
|
|
|
|
visible.value = true;
|
2023-06-19 15:32:07 +08:00
|
|
|
|
};
|
2023-07-04 21:11:22 +08:00
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
getDicMainList();
|
|
|
|
|
|
});
|
2023-06-19 15:32:07 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
|
.table-box {
|
2023-07-01 11:18:42 +08:00
|
|
|
|
height: 100%;
|
2023-06-19 15:32:07 +08:00
|
|
|
|
position: relative;
|
|
|
|
|
|
.imgDialog {
|
|
|
|
|
|
.uploadBtn {
|
|
|
|
|
|
color: white;
|
2023-07-14 17:54:21 +08:00
|
|
|
|
font-size: 20px;
|
2023-06-19 15:32:07 +08:00
|
|
|
|
border: 1px solid #087ba4;
|
|
|
|
|
|
background: #087ba4;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-07-05 09:23:23 +08:00
|
|
|
|
:deep() {
|
|
|
|
|
|
.el-form .el-form-item__content .el-range-editor {
|
|
|
|
|
|
width: 300px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.el-range-separator {
|
|
|
|
|
|
color: var(--el-menu-text-color);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-06-19 15:32:07 +08:00
|
|
|
|
</style>
|