fix: BUG修改
This commit is contained in:
parent
8ad8940acb
commit
74658678b2
@ -386,3 +386,8 @@ export const entApplyTimeAdd = (params: any) => {
|
||||
export const engineerInfoPage = (params: any) => {
|
||||
return http.post(BASEURL + `/gov/projectQuantity/page`, params);
|
||||
};
|
||||
|
||||
// 获取项目信息
|
||||
export const getProjectInfo = (params: any) => {
|
||||
return http.post(BASEURL + `/hzent/index/projectInfo`, params);
|
||||
};
|
||||
|
||||
@ -49,7 +49,6 @@ const handleClickMenu = async (subItem: Menu.MenuOptions) => {
|
||||
if (res && res.result) {
|
||||
authStore.authButtonList = res.result;
|
||||
}
|
||||
console.log(res, "77712712371237");
|
||||
}
|
||||
router.push(subItem.path);
|
||||
};
|
||||
|
||||
@ -110,11 +110,14 @@
|
||||
white-space: nowrap;
|
||||
color: var(--el-menu-text-color);
|
||||
}
|
||||
.el-input__wrapper {
|
||||
.el-input__wrapper,
|
||||
.el-textarea__inner,
|
||||
.el-input.is-disabled .el-input__wrapper {
|
||||
background-color: transparent;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary) inset;
|
||||
}
|
||||
.el-input__inner,
|
||||
.el-textarea__inner,
|
||||
.el-range-input {
|
||||
font-size: 20px;
|
||||
color: var(--el-menu-text-color);
|
||||
@ -123,6 +126,17 @@
|
||||
.el-range-editor.el-input__wrapper {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.el-range-separator {
|
||||
color: var(--el-menu-text-color);
|
||||
}
|
||||
.el-pager li.is-active {
|
||||
background-color: var(--el-color-primary);
|
||||
color: var(--el-color-white);
|
||||
}
|
||||
.el-table__expand-icon > .el-icon {
|
||||
font-size: 18px;
|
||||
color: var(--el-menu-text-color);
|
||||
}
|
||||
}
|
||||
.operation {
|
||||
display: flex;
|
||||
|
||||
@ -28,12 +28,14 @@
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="btnStyle" v-if="companyType.isDefault != 'Y'" @click="handleAddItem()">新增</el-button>
|
||||
<el-button v-auth="'unit_add'" class="btnStyle" v-if="companyType.isDefault != 'Y'" @click="handleAddItem()"
|
||||
>新增</el-button
|
||||
>
|
||||
<!-- <el-button class="btnStyle" @click="openScore = true">评分表</el-button> -->
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="{ row }">
|
||||
<el-button class="btnStyle" type="primary" @click="openScoreTable(row)">
|
||||
<el-button v-auth="'score_add'" class="btnStyle" type="primary" @click="openScoreTable(row)">
|
||||
<!-- <img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" /> -->
|
||||
<span>评分表</span>
|
||||
</el-button>
|
||||
|
||||
@ -148,7 +148,7 @@ import { GlobalStore } from "@/stores";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import changeTheme from "@/components/changeTheme/index.vue";
|
||||
import { getUnmannedProjectPage, getUnmannedEngineeringPage, getUnmannedPage } from "@/api/modules/goverment";
|
||||
import { videoDataAdd, videoDataEdit, videoDataDelete } from "@/api/modules/project";
|
||||
import { videoDataAdd, videoDataEdit, videoDataDelete } from "@/api/modules/enterpriseApi";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
@ -246,6 +246,7 @@ const confirm = async (formEl: FormInstance | undefined, form: any) => {
|
||||
if (!formEl) return;
|
||||
await formEl.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
form.engineeringSn = searchSn.value;
|
||||
if (formData.value.id) {
|
||||
const res = await videoDataEdit(form);
|
||||
ElMessage.success("编辑成功");
|
||||
@ -300,20 +301,9 @@ const addVideoData = () => {
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: any) => {
|
||||
const { result } = await getUnmannedPage(
|
||||
active.value === 0
|
||||
? { projectSn: params.projectSn, pageNo: pageable.value.pageNo, pageSize: pageable.value.pageSize }
|
||||
: {
|
||||
engineeringSn: params.engineeringSn,
|
||||
pageNo: pageable.value.pageNo,
|
||||
pageSize: pageable.value.pageSize
|
||||
}
|
||||
);
|
||||
pageable.value.total = Number(result.total);
|
||||
videoData.value.records = result.records;
|
||||
active.value === 0 ? (searchSn.value = params.projectSn) : (searchSn.value = params.engineeringSn);
|
||||
active.value === 0 ? (searchName.value = params.projectName) : (searchName.value = params.engineeringName);
|
||||
// getVideoData();
|
||||
getVideoData();
|
||||
};
|
||||
// leftMenu页面的搜索按钮
|
||||
const onSearchInput = async (params: string) => {
|
||||
|
||||
@ -103,7 +103,7 @@
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" width="360" label="操作">
|
||||
<el-table-column align="center" width="420" label="操作">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="scope.row.parentId == 0"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="warning-page">
|
||||
<div class="warning-page" v-if="!showScreen">
|
||||
<div class="table-box">
|
||||
<div class="table">
|
||||
<ProTable
|
||||
@ -15,15 +15,18 @@
|
||||
:onReset="true"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||
<el-button v-auth="'project_add'" class="btnStyle" @click="handleAddItem">新增</el-button>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="onSee(row)"
|
||||
><img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" /><span>查看</span></el-button
|
||||
>
|
||||
<el-button type="primary" link @click="onEdit(row)"
|
||||
<el-button v-auth="'project_update'" type="primary" link @click="onEdit(row)"
|
||||
><img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" /><span>编辑</span></el-button
|
||||
>
|
||||
<el-button v-auth="'project_update'" type="primary" link @click="toScreen(row)"
|
||||
><img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" /><span>项目大屏</span></el-button
|
||||
>
|
||||
<!-- <el-button type="primary" link @click="openMap(row)"
|
||||
><img src="@/assets/images/tableIcon/修正定位.png" alt="" class="configureIcon" /><span>修正定位</span></el-button
|
||||
>
|
||||
@ -49,10 +52,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<largeScreen v-if="showScreen" :engineeringSn="engineeringSn" @change="toScreen"></largeScreen>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, onMounted, reactive } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import ProjectSupervision from "./components/ProjectSupervision/index.vue";
|
||||
@ -61,13 +66,16 @@ import editDialog from "./components/editDialog/index.vue";
|
||||
import { getEngineeringApproveList, getEngineeringApproveArea } from "@/api/modules/goverment";
|
||||
import { getDicList } from "@/api/modules/jxjview";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import type { ReqQueryDictData } from "@/api/types";
|
||||
import largeScreen from "../../../hz-enterprise/largeScreen/largeScreenOne/index.vue";
|
||||
const showScreen = ref(false);
|
||||
const router = useRouter();
|
||||
const editennMEssageVisible = ref(false);
|
||||
const ennMEssageVisible = ref(false);
|
||||
const DicStatusList = ref([]);
|
||||
const DicTypeList = ref([]);
|
||||
const engineeringArea = ref([]);
|
||||
const store = GlobalStore();
|
||||
const engineeringSn = ref("");
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
@ -115,7 +123,7 @@ const columns: ColumnProps[] = [
|
||||
}
|
||||
}
|
||||
},
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 200 }
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 300 }
|
||||
];
|
||||
const relativeId = ref("");
|
||||
const detailsDialog = ref(false);
|
||||
@ -130,7 +138,12 @@ const onSee = row => {
|
||||
relativeId.value = row.id;
|
||||
ennMEssageVisible.value = true;
|
||||
};
|
||||
|
||||
const toScreen = row => {
|
||||
if (row) {
|
||||
engineeringSn.value = row.engineeringSn;
|
||||
}
|
||||
showScreen.value = !showScreen.value;
|
||||
};
|
||||
const onEdit = row => {
|
||||
relativeId.value = row.id;
|
||||
editennMEssageVisible.value = true;
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="btnStyle" @click="handleAddItem()">新增</el-button>
|
||||
<el-button v-auth="'progress_add'" class="btnStyle" @click="handleAddItem()">新增</el-button>
|
||||
</template>
|
||||
<template #state="{ row }">
|
||||
<span>{{
|
||||
|
||||
@ -18,11 +18,11 @@
|
||||
<span class="row-span">检查情况:<span>执法中</span></span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="row-span">工程/项目名称:</span>
|
||||
<span class="row-span">项目名称:</span>
|
||||
<span class="select-text" v-if="projectSelectedData.createTime" style="margin-right: 15px">{{
|
||||
projectSelectedData.projectName || projectSelectedData.engineeringName
|
||||
}}</span>
|
||||
<el-button class="btn-style" type="primary" @click="projectVisible = true">选择工程/项目</el-button>
|
||||
<el-button class="btn-style" type="primary" @click="projectVisible = true">选择项目</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="row-span">建设单位:</span>
|
||||
@ -184,7 +184,7 @@
|
||||
<div class="detail-table">
|
||||
<div class="content-title">
|
||||
<span>隐患问题记录</span>
|
||||
<el-button class="btnStyle" @click="addDangerRecord">新增</el-button>
|
||||
<el-button v-auth="'quality_inspect_check'" class="btnStyle" @click="addDangerRecord">新增</el-button>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
@ -214,7 +214,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn">
|
||||
<el-button type="primary" @click="allSubmit">统一下发放整改单</el-button>
|
||||
<el-button v-auth="'quality_inspect_check'" type="primary" @click="allSubmit">统一下发放整改单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
@ -283,19 +283,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-operate">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button v-auth="'quality_inspect_examine'" type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 工程/项目库 -->
|
||||
<el-dialog v-model="projectVisible" custom-class="project-style" width="60%">
|
||||
<!-- 项目库 -->
|
||||
<el-dialog v-model="projectVisible" custom-class="project-style" width="45%">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: var(--el-menu-text-color)">
|
||||
<span style="margin-left: 5px">选择工程/项目</span>
|
||||
<span style="margin-left: 5px">选择项目</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="content-select">
|
||||
<div class="left-menu">
|
||||
<!-- <div class="left-menu">
|
||||
<el-tree :data="projectData" style="margin-top: 10px" :highlight-current="true" node-key="id">
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node" @click.capture="selectProjectTree(data)">
|
||||
@ -303,36 +303,24 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="right-menu">
|
||||
<div class="table-select" v-if="projectTreeData.id">
|
||||
<span style="margin: 0 10px 2px 0">工程/项目名称</span>
|
||||
<div class="table-select">
|
||||
<span style="margin: 0 10px 2px 0">项目名称</span>
|
||||
<el-input style="width: 200px" v-model="projectForm.name" placeholder="请输入" clearable />
|
||||
<el-button type="primary" style="margin-left: 20px" @click="searchData">查询</el-button>
|
||||
</div>
|
||||
<div class="table" v-if="projectTreeData.id">
|
||||
<div class="table">
|
||||
<el-table
|
||||
style="width: 100%; height: 350px"
|
||||
style="width: 100%; height: 350px; border: 0"
|
||||
ref="multipleTable"
|
||||
:data="projectTableData"
|
||||
tooltip-effect="dark"
|
||||
@row-click="projectRowClick"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
|
||||
<el-table-column
|
||||
prop="engineeringName"
|
||||
align="center"
|
||||
label="工程名称"
|
||||
v-if="projectTreeData.id == 1"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="projectName"
|
||||
align="center"
|
||||
label="项目名称"
|
||||
v-if="projectTreeData.id == 2"
|
||||
></el-table-column>
|
||||
<el-table-column prop="roleName" label="用户名称"></el-table-column>
|
||||
<el-table-column prop="userTel" label="手机号码"></el-table-column>
|
||||
<el-table-column prop="engineeringName" align="center" label="项目名称"></el-table-column>
|
||||
<el-table-column prop="address" align="center" label="项目地址"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@ -582,23 +570,20 @@ const projectRowClick = row => {
|
||||
};
|
||||
const projectTreeData = ref({}); // 工程/项目树数据
|
||||
const searchData = () => {
|
||||
if (projectTreeData.value.id == 1) {
|
||||
getEngieerData();
|
||||
} else {
|
||||
getProjectData();
|
||||
}
|
||||
getEngieerData();
|
||||
};
|
||||
const getRowDetails = async () => {
|
||||
// 工程/项目详细信息
|
||||
if (projectTreeData.value.id == 1) {
|
||||
const res = await getEngineerInfo({ id: projectSelectedData.value.id });
|
||||
console.log(res);
|
||||
basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
} else {
|
||||
const res = await getProjectInfo({ projectId: projectSelectedData.value.projectId });
|
||||
console.log(res);
|
||||
basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
}
|
||||
// 项目详细信息
|
||||
// if (projectTreeData.value.id == 1) {
|
||||
|
||||
// } else {
|
||||
// const res = await getProjectInfo({ projectId: projectSelectedData.value.projectId });
|
||||
// console.log(res);
|
||||
// basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
// }
|
||||
const res = await getEngineerInfo({ id: projectSelectedData.value.id });
|
||||
console.log(res);
|
||||
basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
};
|
||||
const getEngieerData = async () => {
|
||||
// 工程列表
|
||||
@ -669,16 +654,16 @@ const handleSelectionChange = val => {
|
||||
const handleSmallSelectionChange = val => {
|
||||
selectedSmallList.value = val;
|
||||
};
|
||||
const selectProjectTree = data => {
|
||||
// 选择工程/项目树节点
|
||||
console.log(data);
|
||||
if (data.id == 1) {
|
||||
getEngieerData();
|
||||
} else {
|
||||
getProjectData();
|
||||
}
|
||||
projectTreeData.value = data;
|
||||
};
|
||||
// const selectProjectTree = data => {
|
||||
// // 选择工程/项目树节点
|
||||
// console.log(data);
|
||||
// if (data.id == 1) {
|
||||
// getEngieerData();
|
||||
// } else {
|
||||
// getProjectData();
|
||||
// }
|
||||
// projectTreeData.value = data;
|
||||
// };
|
||||
// 图片上传成功后的钩子
|
||||
const handleAvatarSuccess: UploadProps["onSuccess"] = response => {
|
||||
dangerForm.value.image.push({
|
||||
@ -697,7 +682,7 @@ const submitForm = async () => {
|
||||
// 全部提交
|
||||
const allSubmit = async () => {
|
||||
if (!(projectSelectedData.value.projectName || projectSelectedData.value.engineeringName)) {
|
||||
ElMessage.error("请选择工程/项目");
|
||||
ElMessage.error("请选择项目");
|
||||
return;
|
||||
}
|
||||
// if (!basicData.value.selectedMember) {
|
||||
@ -781,7 +766,9 @@ watch(
|
||||
watch(visible1, (n, o) => {
|
||||
emits("update:orderDialog", n);
|
||||
});
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getEngieerData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -1062,17 +1049,23 @@ onMounted(() => {});
|
||||
.right-menu {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border-bottom: 1px solid var(--el-menu-text-color);
|
||||
// border-bottom: 1px solid var(--el-menu-text-color);
|
||||
.table-select {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 20px 0 20px 15px;
|
||||
> span {
|
||||
font-size: 18px;
|
||||
color: var(--el-menu-text-color);
|
||||
}
|
||||
}
|
||||
.table {
|
||||
margin: 0px 15px;
|
||||
:deep() {
|
||||
.el-table__inner-wrapper::before {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-menu {
|
||||
@ -1127,7 +1120,7 @@ onMounted(() => {});
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
// 工程/项目对话框样式
|
||||
// 项目对话框样式
|
||||
:deep(.project-style) {
|
||||
.el-dialog__header {
|
||||
border-bottom: 1px solid var(--el-menu-text-color);
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
>检查情况:
|
||||
<span>{{
|
||||
basicData?.state == 1
|
||||
? "执法中"
|
||||
: basicData?.state == 2
|
||||
? "待整改"
|
||||
: basicData?.state == 3
|
||||
: basicData?.state == 2
|
||||
? "待审核"
|
||||
: basicData?.state == 3 && basicData?.level == 1
|
||||
? "初审通过"
|
||||
: basicData?.state == 3 && basicData?.level == 2
|
||||
? "终审通过"
|
||||
: basicData?.state == 4
|
||||
? "已闭合"
|
||||
: basicData?.state == 5
|
||||
? "已驳回"
|
||||
: ""
|
||||
}}</span>
|
||||
@ -107,8 +107,10 @@
|
||||
? "待整改"
|
||||
: scope.row.state == 2
|
||||
? "待审核"
|
||||
: scope.row.state == 3
|
||||
? "已闭合"
|
||||
: scope.row.state == 3 && scope.row.level == 1
|
||||
? "初审通过"
|
||||
: scope.row.state == 3 && scope.row.level == 2
|
||||
? "终审通过"
|
||||
: scope.row.state == 4
|
||||
? "已驳回"
|
||||
: ""
|
||||
@ -117,7 +119,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn" v-if="basicData?.state != 1 && basicData?.state != 4">
|
||||
<!-- <div class="operation-btn" v-if="basicData?.state != 1 && basicData?.state != 4">
|
||||
<el-button
|
||||
type="info"
|
||||
v-auth="'quality_inspect_examine'"
|
||||
@ -129,7 +131,7 @@
|
||||
<el-button class="btnStyle" v-auth="'quality_inspect_examine'" type="primary" @click="allSubmit"
|
||||
>整改完成,全部合格</el-button
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
<div class="title-detail">
|
||||
@ -172,6 +174,7 @@
|
||||
<div class="situation">
|
||||
<span>整改情况</span>
|
||||
<el-button
|
||||
v-auth="'quality_inspect_add'"
|
||||
class="btnStyle"
|
||||
type="success"
|
||||
@click="addSituation"
|
||||
@ -248,12 +251,23 @@
|
||||
:style="{ color: item.examineState === 0 ? '#008BFF' : item.examineState === 1 ? '#30AC7C' : '#F64D31' }"
|
||||
v-if="!item.type"
|
||||
>
|
||||
{{ item.examineState == 0 ? "待审核" : item.examineState == 1 ? "已通过" : "已驳回" }}
|
||||
{{
|
||||
item.examineState == 0
|
||||
? "待审核"
|
||||
: item.examineState == 1 && item.level == 1
|
||||
? "初审通过"
|
||||
: item.examineState == 1 && item.level == 2
|
||||
? "终审通过"
|
||||
: "已驳回"
|
||||
}}
|
||||
</div>
|
||||
<!-- <div class="status-operate" v-if="item.examineState === 0">
|
||||
<el-button type="primary" @click="auditVisible = true">审核</el-button>
|
||||
</div> -->
|
||||
<div class="status-operate" v-if="item.type">
|
||||
<div v-auth="'quality_inspect_examine'" class="status-operate" v-if="item.level == 1 && item.examineState === 0">
|
||||
<el-button type="primary" @click="singleAudit(item)">审核</el-button>
|
||||
</div>
|
||||
<div v-auth="'quality_inspect_examine'" class="status-operate" v-if="item.level == 1 && item.examineState === 1">
|
||||
<el-button type="primary" @click="singleAgainAudit(item)">终审</el-button>
|
||||
</div>
|
||||
<div v-auth="'quality_inspect_examine'" class="status-operate" v-if="item.type">
|
||||
<el-button class="btnStyle" type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
@ -261,20 +275,36 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 单项审核弹窗 -->
|
||||
<el-dialog v-model="auditVisible" :append-to-body="true">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: #333333">
|
||||
<span style="margin-left: 5px">审核意见</span>
|
||||
<span style="margin-left: 5px; color: var(--el-menu-text-color)">审核意见</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="auditForm.content" type="textarea" :rows="2" placeholder="请输入内容" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="singleAuditSubmit(1)">驳 回</el-button>
|
||||
<el-button class="hzCancelStyle" @click="singleAuditSubmit(1)">驳 回</el-button>
|
||||
<el-button type="primary" @click="singleAuditSubmit(2)">通 过</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 单项终审弹窗 -->
|
||||
<el-dialog v-model="auditAgainVisible" :append-to-body="true">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: #333333">
|
||||
<span style="margin-left: 5px; color: var(--el-menu-text-color)">终审意见</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="auditAgainForm.content" type="textarea" :rows="2" placeholder="请输入内容" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button class="hzCancelStyle" @click="singleAuditAgainSubmit(1)">驳 回</el-button>
|
||||
<el-button type="primary" @click="singleAuditAgainSubmit(2)">通 过</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -301,6 +331,9 @@ const singleData = ref(); // 单个整改情况数据
|
||||
const auditForm = ref({
|
||||
content: ""
|
||||
});
|
||||
const auditAgainForm = ref({
|
||||
content: ""
|
||||
});
|
||||
const timelineList = ref([{ name: 1 }]);
|
||||
const reformInfo = ref({
|
||||
solveBy: "",
|
||||
@ -325,9 +358,14 @@ const submitForm = async () => {
|
||||
ElMessage.success("提交成功");
|
||||
};
|
||||
const addSituation = () => {
|
||||
timelineList.value.unshift({
|
||||
type: "insert"
|
||||
let findInsert = timelineList.value.find(item => {
|
||||
return item.type == "insert";
|
||||
});
|
||||
if (!findInsert) {
|
||||
timelineList.value.unshift({
|
||||
type: "insert"
|
||||
});
|
||||
}
|
||||
};
|
||||
// 图片上传成功后的钩子
|
||||
const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile) => {
|
||||
@ -341,6 +379,7 @@ const singleAuditSubmit = async index => {
|
||||
if (index == 1) {
|
||||
let requestData = {
|
||||
id: singleData.value.id,
|
||||
level: 1,
|
||||
suggest: auditForm.value.content,
|
||||
examineState: 2
|
||||
};
|
||||
@ -349,6 +388,7 @@ const singleAuditSubmit = async index => {
|
||||
} else {
|
||||
let requestData = {
|
||||
id: singleData.value.id,
|
||||
level: 1,
|
||||
suggest: auditForm.value.content,
|
||||
examineState: 1
|
||||
};
|
||||
@ -359,6 +399,31 @@ const singleAuditSubmit = async index => {
|
||||
getInfo();
|
||||
auditVisible.value = false;
|
||||
};
|
||||
// 单项终审提交
|
||||
const singleAuditAgainSubmit = async index => {
|
||||
if (index == 1) {
|
||||
let requestData = {
|
||||
id: singleData.value.id,
|
||||
level: 2,
|
||||
suggest: auditAgainForm.value.content,
|
||||
examineState: 2
|
||||
};
|
||||
const res = await singleOptionAudit(requestData);
|
||||
ElMessage.success("操作成功");
|
||||
} else {
|
||||
let requestData = {
|
||||
id: singleData.value.id,
|
||||
level: 2,
|
||||
suggest: auditAgainForm.value.content,
|
||||
examineState: 1
|
||||
};
|
||||
const res = await singleOptionAudit(requestData);
|
||||
ElMessage.success("操作成功");
|
||||
}
|
||||
closeSecondary();
|
||||
getInfo();
|
||||
auditAgainVisible.value = false;
|
||||
};
|
||||
// 单个整改情况审核
|
||||
const singleAudit = item => {
|
||||
console.log(item);
|
||||
@ -368,6 +433,15 @@ const singleAudit = item => {
|
||||
});
|
||||
auditVisible.value = true;
|
||||
};
|
||||
// 单个整改情况终审
|
||||
const singleAgainAudit = item => {
|
||||
console.log(item);
|
||||
singleData.value = item;
|
||||
auditAgainForm.value = reactive({
|
||||
content: ""
|
||||
});
|
||||
auditAgainVisible.value = true;
|
||||
};
|
||||
// 全部审核完成,驳回
|
||||
const backAll = async () => {
|
||||
const res = await allOptionAudit({ id: basicData.value.id, state: 5, type: 2 });
|
||||
@ -435,6 +509,7 @@ const getTimeLineList = async () => {
|
||||
timelineList.value = res.result;
|
||||
};
|
||||
const auditVisible = ref(false);
|
||||
const auditAgainVisible = ref(false);
|
||||
// 监听父组件的visible,用来简介控制el-dialog的弹框开关,一般是用于开
|
||||
watch(
|
||||
() => props.detailsDialog,
|
||||
@ -668,10 +743,19 @@ onMounted(() => {});
|
||||
.test :deep(.el-input__inner) {
|
||||
text-align: center;
|
||||
}
|
||||
:deep(.el-table__empty-text) {
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
:deep() {
|
||||
.el-table__empty-text {
|
||||
min-height: 200px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.el-input__wrapper,
|
||||
.el-textarea__inner,
|
||||
.el-input.is-disabled .el-input__wrapper {
|
||||
color: var(--el-menu-text-color);
|
||||
background-color: transparent;
|
||||
box-shadow: 0 0 0 1px #087ba4 inset;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -101,7 +101,7 @@ const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{
|
||||
prop: "engineeringName",
|
||||
label: "工程名称",
|
||||
label: "项目名称",
|
||||
search: { el: "input" },
|
||||
width: 150
|
||||
},
|
||||
@ -214,20 +214,16 @@ const onCurChange = async (params: number) => {
|
||||
};
|
||||
const getTableList = (params: any) => {
|
||||
let newParams = JSON.parse(JSON.stringify(params));
|
||||
console.log(newParams);
|
||||
// console.log(newParams);
|
||||
if (newParams.createTime) {
|
||||
newParams.createTime_begin = newParams.createTime[0];
|
||||
newParams.createTime_end = newParams.createTime[1];
|
||||
delete newParams.createTime;
|
||||
}
|
||||
if (active.value === 0) {
|
||||
newParams.projectSn = searchSn.value;
|
||||
} else {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
}
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
newParams.type = 2;
|
||||
if (!(newParams.projectSn || newParams.engineeringSn)) {
|
||||
return;
|
||||
return { result: { records: [], current: "1", total: "0", size: "10" } };
|
||||
}
|
||||
return statisticsTable(newParams);
|
||||
};
|
||||
@ -283,9 +279,9 @@ watch(
|
||||
);
|
||||
onMounted(async () => {
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = (records.value as any[])[0].projectSn;
|
||||
searchName.value = (records.value as any[])[0].projectName;
|
||||
onSearch(records.value[0]);
|
||||
await sendIframeMessage({ obj: { path: route.path } }, 2, undefined);
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -18,11 +18,11 @@
|
||||
<span class="row-span">检查情况:<span>执法中</span></span>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="row-span">工程/项目名称:</span>
|
||||
<span class="row-span">项目名称:</span>
|
||||
<span class="select-text" v-if="projectSelectedData.createTime" style="margin-right: 15px">{{
|
||||
projectSelectedData.projectName || projectSelectedData.engineeringName
|
||||
}}</span>
|
||||
<el-button class="btn-style" type="primary" @click="projectVisible = true">选择工程/项目</el-button>
|
||||
<el-button class="btn-style" type="primary" @click="projectVisible = true">选择项目</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<span class="row-span">建设单位:</span>
|
||||
@ -184,7 +184,7 @@
|
||||
<div class="detail-table">
|
||||
<div class="content-title">
|
||||
<span>隐患问题记录</span>
|
||||
<el-button class="btnStyle" @click="addDangerRecord">新增</el-button>
|
||||
<el-button v-auth="'safe_inspect_add'" class="btnStyle" @click="addDangerRecord">新增</el-button>
|
||||
</div>
|
||||
<div class="table">
|
||||
<el-table
|
||||
@ -214,7 +214,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn">
|
||||
<el-button type="primary" @click="allSubmit">统一下发放整改单</el-button>
|
||||
<el-button v-auth="'safe_inspect_check'" type="primary" @click="allSubmit">统一下发放整改单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
@ -278,7 +278,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="status-operate">
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button v-auth="'safe_inspect_check'" type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -325,15 +325,15 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 工程/项目库 -->
|
||||
<el-dialog v-model="projectVisible" custom-class="project-style">
|
||||
<!-- 项目库 -->
|
||||
<el-dialog v-model="projectVisible" custom-class="project-style" width="45%">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: var(--el-menu-text-color)">
|
||||
<span style="margin-left: 5px">选择工程/项目</span>
|
||||
<span style="margin-left: 5px">选择项目</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="content-select">
|
||||
<div class="left-menu">
|
||||
<!-- <div class="left-menu">
|
||||
<el-tree :data="projectData" style="margin-top: 10px" :highlight-current="true" node-key="id">
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node" @click.capture="selectProjectTree(data)">
|
||||
@ -341,14 +341,15 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="right-menu">
|
||||
<div class="table-select" v-if="projectTreeData.id">
|
||||
<span style="margin: 0 10px 2px 0">工程/项目名称</span>
|
||||
<div class="table-select">
|
||||
<span style="margin: 0 10px 2px 0">项目名称</span>
|
||||
<el-input style="width: 200px" v-model="projectForm.name" placeholder="请输入" clearable />
|
||||
<el-button type="primary" style="margin-left: 20px" @click="searchData">查询</el-button>
|
||||
</div>
|
||||
<div class="table" v-if="projectTreeData.id">
|
||||
<!-- v-if="projectTreeData.id" -->
|
||||
<div class="table">
|
||||
<el-table
|
||||
style="width: 100%; height: 350px"
|
||||
ref="multipleTable"
|
||||
@ -357,20 +358,14 @@
|
||||
@row-click="projectRowClick"
|
||||
>
|
||||
<!-- <el-table-column type="selection" width="55"></el-table-column> -->
|
||||
<el-table-column
|
||||
prop="engineeringName"
|
||||
align="center"
|
||||
label="工程名称"
|
||||
v-if="projectTreeData.id == 1"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
<el-table-column prop="engineeringName" align="center" label="项目名称"></el-table-column>
|
||||
<!-- <el-table-column
|
||||
prop="projectName"
|
||||
align="center"
|
||||
label="项目名称"
|
||||
v-if="projectTreeData.id == 2"
|
||||
></el-table-column>
|
||||
<el-table-column prop="roleName" label="用户名称"></el-table-column>
|
||||
<el-table-column prop="userTel" label="手机号码"></el-table-column>
|
||||
></el-table-column> -->
|
||||
<el-table-column prop="address" align="center" label="项目地址"></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@ -383,9 +378,9 @@
|
||||
</template> -->
|
||||
</el-dialog>
|
||||
<!-- 检查人员 -->
|
||||
<el-dialog v-model="memberVisible" style="width: 500px">
|
||||
<el-dialog v-model="memberVisible" style="width: 700px" custom-class="project-style">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: #333333">
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: var(--el-menu-text-color)">
|
||||
<span style="margin-left: 5px">添加检查人员</span>
|
||||
</div>
|
||||
</template>
|
||||
@ -401,7 +396,7 @@
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="memberVisible = false">取 消</el-button>
|
||||
<el-button class="hzCancelStyle" @click="memberVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="confirmMemberSelected">确 认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
@ -432,7 +427,7 @@ const headers = ref({ Authorization: "Bearer " + store.token });
|
||||
const projectVisible = ref(false);
|
||||
const tableData = ref([{ name: "111" }]);
|
||||
const membertableData = ref([]); // 获取检查人员表格数据
|
||||
const projectTableData = ref([]); // 获取工程/项目表格数据
|
||||
const projectTableData = ref([]); // 获取项目表格数据
|
||||
const projectForm = ref({
|
||||
name: ""
|
||||
});
|
||||
@ -469,6 +464,7 @@ const transformDialog = ref(false); // 整改记录对话框
|
||||
const recordData = ref([]); // 整改记录表格数据
|
||||
const basicData = ref({
|
||||
// 基础信息
|
||||
requireType: 1,
|
||||
opSignature: [],
|
||||
supervisorSignature: [],
|
||||
inspectSignature: [],
|
||||
@ -560,23 +556,27 @@ const projectRowClick = row => {
|
||||
};
|
||||
const projectTreeData = ref({}); // 工程/项目树数据
|
||||
const searchData = () => {
|
||||
if (projectTreeData.value.id == 1) {
|
||||
getEngieerData();
|
||||
} else {
|
||||
getProjectData();
|
||||
}
|
||||
getEngieerData();
|
||||
// if (projectTreeData.value.id == 1) {
|
||||
// getEngieerData();
|
||||
// } else {
|
||||
// getProjectData();
|
||||
// }
|
||||
};
|
||||
const getRowDetails = async () => {
|
||||
// 工程/项目详细信息
|
||||
if (projectTreeData.value.id == 1) {
|
||||
const res = await getEngineerInfo({ id: projectSelectedData.value.id });
|
||||
console.log(res);
|
||||
basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
} else {
|
||||
const res = await getProjectInfo({ projectId: projectSelectedData.value.projectId });
|
||||
console.log(res);
|
||||
basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
}
|
||||
// if (projectTreeData.value.id == 1) {
|
||||
// const res = await getEngineerInfo({ id: projectSelectedData.value.id });
|
||||
// console.log(res);
|
||||
// basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
// } else {
|
||||
// const res = await getProjectInfo({ projectId: projectSelectedData.value.projectId });
|
||||
// console.log(res);
|
||||
// basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
// }
|
||||
const res = await getEngineerInfo({ id: projectSelectedData.value.id });
|
||||
console.log(res);
|
||||
basicData.value = reactive({ ...basicData.value, ...res.result });
|
||||
};
|
||||
const getEngieerData = async () => {
|
||||
// 工程列表
|
||||
@ -654,7 +654,7 @@ const submitForm = async () => {
|
||||
// 全部提交
|
||||
const allSubmit = async () => {
|
||||
if (!(projectSelectedData.value.projectName || projectSelectedData.value.engineeringName)) {
|
||||
ElMessage.error("请选择工程/项目");
|
||||
ElMessage.error("请选择项目");
|
||||
return;
|
||||
}
|
||||
// if (!basicData.value.selectedMember) {
|
||||
@ -721,6 +721,7 @@ watch(
|
||||
visible1.value = n;
|
||||
if (n) {
|
||||
basicData.value = {
|
||||
requireType: 1,
|
||||
opSignature: [],
|
||||
supervisorSignature: [],
|
||||
inspectSignature: [],
|
||||
@ -737,7 +738,9 @@ watch(
|
||||
watch(visible1, (n, o) => {
|
||||
emits("update:orderDialog", n);
|
||||
});
|
||||
onMounted(() => {});
|
||||
onMounted(() => {
|
||||
getEngieerData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -1028,6 +1031,11 @@ onMounted(() => {});
|
||||
}
|
||||
.table {
|
||||
margin: 0px 15px;
|
||||
:deep() {
|
||||
.el-table__inner-wrapper::before {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.member-menu {
|
||||
|
||||
@ -19,14 +19,14 @@
|
||||
>检查情况:
|
||||
<span>{{
|
||||
basicData?.state == 1
|
||||
? "执法中"
|
||||
: basicData?.state == 2
|
||||
? "待整改"
|
||||
: basicData?.state == 3
|
||||
: basicData?.state == 2
|
||||
? "待审核"
|
||||
: basicData?.state == 3 && basicData?.level == 1
|
||||
? "初审通过"
|
||||
: basicData?.state == 3 && basicData?.level == 2
|
||||
? "终审通过"
|
||||
: basicData?.state == 4
|
||||
? "已闭合"
|
||||
: basicData?.state == 5
|
||||
? "已驳回"
|
||||
: ""
|
||||
}}</span>
|
||||
@ -107,8 +107,10 @@
|
||||
? "待整改"
|
||||
: scope.row.state == 2
|
||||
? "待审核"
|
||||
: scope.row.state == 3
|
||||
? "已闭合"
|
||||
: scope.row.state == 3 && scope.row.level == 1
|
||||
? "初审通过"
|
||||
: scope.row.state == 3 && scope.row.level == 2
|
||||
? "终审通过"
|
||||
: scope.row.state == 4
|
||||
? "已驳回"
|
||||
: ""
|
||||
@ -117,14 +119,14 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="operation-btn" v-if="basicData?.state != 1 && basicData?.state != 4">
|
||||
<!-- <div class="operation-btn" v-if="basicData?.state != 1 && basicData?.state != 4">
|
||||
<el-button type="info" v-auth="'safe_inspect_examine'" class="hzCancelStyle" style="margin-right: 98px" @click="backAll"
|
||||
>驳回,请尽快整改</el-button
|
||||
>
|
||||
<el-button type="primary" v-auth="'safe_inspect_examine'" class="btnStyle" @click="allSubmit"
|
||||
>整改完成,全部合格</el-button
|
||||
>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="transform-record" v-if="transformDialog">
|
||||
<div class="title-detail">
|
||||
@ -167,6 +169,7 @@
|
||||
<div class="situation">
|
||||
<span>整改情况</span>
|
||||
<el-button
|
||||
v-auth="'safe_inspect_add'"
|
||||
class="btnStyle"
|
||||
type="success"
|
||||
@click="addSituation"
|
||||
@ -241,33 +244,60 @@
|
||||
:style="{ color: item.examineState === 0 ? '#008BFF' : item.examineState === 1 ? '#30AC7C' : '#F64D31' }"
|
||||
v-if="!item.type"
|
||||
>
|
||||
{{ item.examineState == 0 ? "待审核" : item.examineState == 1 ? "已通过" : "已驳回" }}
|
||||
{{
|
||||
item.examineState == 0
|
||||
? "待审核"
|
||||
: item.examineState == 1 && item.level == 1
|
||||
? "初审通过"
|
||||
: item.examineState == 1 && item.level == 2
|
||||
? "终审通过"
|
||||
: "已驳回"
|
||||
}}
|
||||
</div>
|
||||
<div class="status-operate" v-if="item.level == 1 && item.examineState === 0">
|
||||
<el-button v-auth="'safe_inspect_examine'" type="primary" @click="singleAudit(item)">审核</el-button>
|
||||
</div>
|
||||
<div class="status-operate" v-if="item.level == 1 && item.examineState === 1">
|
||||
<el-button v-auth="'safe_inspect_examine'" type="primary" @click="singleAgainAudit(item)">终审</el-button>
|
||||
</div>
|
||||
<!-- <div class="status-operate" v-if="item.examineState === 0">
|
||||
<el-button type="primary" @click="auditVisible = true">审核</el-button>
|
||||
</div> -->
|
||||
<div class="status-operate" v-if="item.type">
|
||||
<el-button class="btnStyle" type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button v-auth="'safe_inspect_examine'" class="btnStyle" type="primary" @click="submitForm">提交</el-button>
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 单项审核弹窗 -->
|
||||
<el-dialog v-model="auditVisible" :append-to-body="true">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: #333333">
|
||||
<span style="margin-left: 5px">审核意见</span>
|
||||
<span style="margin-left: 5px; color: var(--el-menu-text-color)">审核意见</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="auditForm.content" type="textarea" :rows="2" placeholder="请输入内容" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="singleAuditSubmit(1)">驳 回</el-button>
|
||||
<el-button class="hzCancelStyle" @click="singleAuditSubmit(1)">驳 回</el-button>
|
||||
<el-button type="primary" @click="singleAuditSubmit(2)">通 过</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 单项终审弹窗 -->
|
||||
<el-dialog v-model="auditAgainVisible" :append-to-body="true">
|
||||
<template #title>
|
||||
<div style="border-left: 2px solid #0f81ff; font-size: 20px; color: #333333">
|
||||
<span style="margin-left: 5px; color: var(--el-menu-text-color)">终审意见</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="auditAgainForm.content" type="textarea" :rows="2" placeholder="请输入内容" />
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button class="hzCancelStyle" @click="singleAuditAgainSubmit(1)">驳 回</el-button>
|
||||
<el-button type="primary" @click="singleAuditAgainSubmit(2)">通 过</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -302,6 +332,9 @@ const singleData = ref(); // 单个整改情况数据
|
||||
const auditForm = ref({
|
||||
content: ""
|
||||
});
|
||||
const auditAgainForm = ref({
|
||||
content: ""
|
||||
});
|
||||
// 提交整改情况
|
||||
const submitForm = async () => {
|
||||
reformInfo.value.solveImage = JSON.stringify(reformInfo.value.solveImage);
|
||||
@ -355,12 +388,49 @@ const singleAuditSubmit = async index => {
|
||||
};
|
||||
getInfo();
|
||||
};
|
||||
// 单项终审提交
|
||||
const singleAuditAgainSubmit = async index => {
|
||||
if (index == 1) {
|
||||
let requestData = {
|
||||
id: singleData.value.id,
|
||||
level: 2,
|
||||
suggest: auditAgainForm.value.content,
|
||||
examineState: 2
|
||||
};
|
||||
const res = await singleOptionAudit(requestData);
|
||||
ElMessage.success("操作成功");
|
||||
} else {
|
||||
let requestData = {
|
||||
id: singleData.value.id,
|
||||
level: 2,
|
||||
suggest: auditAgainForm.value.content,
|
||||
examineState: 1
|
||||
};
|
||||
const res = await singleOptionAudit(requestData);
|
||||
ElMessage.success("操作成功");
|
||||
}
|
||||
closeSecondary();
|
||||
getInfo();
|
||||
auditAgainVisible.value = false;
|
||||
};
|
||||
// 单个整改情况审核
|
||||
const singleAudit = item => {
|
||||
console.log(item);
|
||||
singleData.value = item;
|
||||
auditForm.value = reactive({
|
||||
content: ""
|
||||
});
|
||||
auditVisible.value = true;
|
||||
};
|
||||
// 单个整改情况终审
|
||||
const singleAgainAudit = item => {
|
||||
console.log(item);
|
||||
singleData.value = item;
|
||||
auditAgainForm.value = reactive({
|
||||
content: ""
|
||||
});
|
||||
auditAgainVisible.value = true;
|
||||
};
|
||||
// 全部审核完成,驳回
|
||||
const backAll = async () => {
|
||||
const res = await allOptionAudit({ id: basicData.value.id, state: 5, type: 1 });
|
||||
@ -428,6 +498,7 @@ const getTimeLineList = async () => {
|
||||
timelineList.value = res.result;
|
||||
};
|
||||
const auditVisible = ref(false);
|
||||
const auditAgainVisible = ref(false);
|
||||
// 监听父组件的visible,用来简介控制el-dialog的弹框开关,一般是用于开
|
||||
watch(
|
||||
() => props.detailsDialog,
|
||||
|
||||
@ -227,7 +227,7 @@ const getTableList = (params: any) => {
|
||||
}
|
||||
newParams.type = 1;
|
||||
if (!(newParams.projectSn || newParams.engineeringSn)) {
|
||||
return;
|
||||
return { result: { records: [], current: "1", total: "0", size: "10" } };
|
||||
}
|
||||
return statisticsTable(newParams);
|
||||
};
|
||||
|
||||
@ -179,13 +179,13 @@ const dataCallback = (data: any) => {
|
||||
// 默认不做操作就直接在 ProTable 组件上绑定 :requestApi="getUserList"
|
||||
const getTableList = (params: any) => {
|
||||
let newParams = JSON.parse(JSON.stringify(params));
|
||||
if (active.value === 0) {
|
||||
newParams.projectSn = searchSn.value;
|
||||
} else {
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
}
|
||||
if (!(newParams.projectSn || newParams.engineeringSn)) {
|
||||
return;
|
||||
// if (active.value === 0) {
|
||||
// newParams.projectSn = searchSn.value;
|
||||
// } else {
|
||||
// }
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (!newParams.engineeringSn) {
|
||||
return { result: { records: [], current: "1", pages: "1", size: "10", total: "0" } };
|
||||
}
|
||||
return getRealTimePage(newParams);
|
||||
};
|
||||
@ -263,9 +263,9 @@ watch(
|
||||
);
|
||||
onMounted(async () => {
|
||||
await getEngPage();
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].engineeringSn;
|
||||
searchName.value = (records.value as ResAiProjectPage[])[0].engineeringSnName;
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||
await sendIframeMessage({ obj: { path: route.path } }, 2, undefined);
|
||||
});
|
||||
</script>
|
||||
|
||||
@ -0,0 +1,414 @@
|
||||
<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 as any).projectName || (data as any).engineeringName
|
||||
}}</span>
|
||||
<div class="leftMenu_item">
|
||||
<div class="video">
|
||||
<img style="margin-right: 5px" src="@/assets/images/AIwaring/dustMap.png" alt="" />
|
||||
<span class="middleSize">{{ data.projectAddress || data.address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
<div class="table-box">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
title="用户列表"
|
||||
:columns="columns"
|
||||
:requestApi="getTableList"
|
||||
:dataCallback="dataCallback"
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
:onReset="true"
|
||||
:initParam="initParam"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button v-auth="'monitor_dev_add'" class="btnStyle" @click="handleEditItem(1)">新增</el-button>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button v-auth="'monitor_dev_update'" type="primary" link @click="handleEditItem(2, row)">
|
||||
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
||||
<span>编辑</span>
|
||||
</el-button>
|
||||
<el-button v-auth="'monitor_dev_del'" type="danger" link :icon="Delete" @click="handleDeleteItem(row)">删除</el-button>
|
||||
</template>
|
||||
|
||||
<template #examineState="{ row }">
|
||||
{{ row.examineState === 1 ? "待审核" : row.examineState === 2 ? "审核驳回" : "审核通过" }}
|
||||
</template>
|
||||
<template #state="{ row }">
|
||||
<span :class="row.state === 1 ? '' : 'redText'">{{ row.state == 1 ? "在线" : "离线" }}</span>
|
||||
</template>
|
||||
</ProTable>
|
||||
<DialogForm
|
||||
:title="title"
|
||||
:formConfig="formConfig"
|
||||
:formData="formData"
|
||||
v-model:visible="visible"
|
||||
append-to-body
|
||||
width="800px"
|
||||
@confirm="saveItem"
|
||||
>
|
||||
<template #mapIcon>
|
||||
<div class="diaMapIcon" @click="isOpen = true">
|
||||
<el-icon style="font-size: 23px"><Location /></el-icon>
|
||||
</div>
|
||||
</template>
|
||||
</DialogForm>
|
||||
<AMap v-model="isOpen" @get-address="getAddress" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, onMounted } from "vue";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import {
|
||||
getvideoManagementPage,
|
||||
addvideoManagementment,
|
||||
editvideoManagement,
|
||||
deletevideoManagement
|
||||
} from "@/api/modules/enterpriseApi";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import AMap from "@/components/AMap/AMap.vue";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import { getDustprojectPage, getDustengineeringPage, getAIQuestionPage } from "@/api/modules/goverment";
|
||||
const pages = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 7,
|
||||
total: 0
|
||||
});
|
||||
const pageable = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 12,
|
||||
total: 0
|
||||
});
|
||||
const records = ref([]);
|
||||
const active = ref(1);
|
||||
|
||||
const visible = ref(false);
|
||||
const isOpen = ref(false);
|
||||
const title = ref("");
|
||||
const store = GlobalStore();
|
||||
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
|
||||
const proTable = ref();
|
||||
|
||||
interface formData {
|
||||
name?: string;
|
||||
code?: string;
|
||||
hardwareId?: string;
|
||||
lat?: number | undefined;
|
||||
lng?: number | undefined;
|
||||
position?: string;
|
||||
priority: number;
|
||||
}
|
||||
|
||||
const formData = ref<formData>({
|
||||
name: "",
|
||||
code: "",
|
||||
hardwareId: "",
|
||||
priority: 1,
|
||||
lat: undefined,
|
||||
lng: undefined,
|
||||
position: ""
|
||||
});
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// 搜索用的项目sn或者工程sn
|
||||
const searchSn = ref("");
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: any) => {
|
||||
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();
|
||||
};
|
||||
// leftMenu页面的搜索按钮
|
||||
const onSearchInput = async (params: string) => {
|
||||
console.log(params);
|
||||
if (active.value === 0) {
|
||||
const { result } = await getDustprojectPage({ projectName: params, ...pages.value });
|
||||
records.value = result.records;
|
||||
} else {
|
||||
const { result } = await getDustengineeringPage({ engineeringName: params, ...pages.value });
|
||||
records.value = result.records;
|
||||
}
|
||||
};
|
||||
// leftMenu页面的分页
|
||||
const onCurChange = async (params: number) => {
|
||||
console.log(active.value);
|
||||
if (active.value === 0) {
|
||||
const { result } = await getDustprojectPage({ ...pages.value, pageNo: params });
|
||||
records.value = result.records;
|
||||
} else {
|
||||
const { result } = await getDustengineeringPage({ ...pages.value, pageNo: params });
|
||||
records.value = result.records;
|
||||
pages.value.total = +result.total;
|
||||
}
|
||||
pages.value.total = +res.result.total;
|
||||
};
|
||||
// 修改数据按钮
|
||||
const handleEditItem = async (index: number, row: any) => {
|
||||
if (index === 1) {
|
||||
title.value = "新增设备";
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
code: "",
|
||||
hardwareId: "",
|
||||
priority: 1,
|
||||
lat: undefined,
|
||||
lng: undefined,
|
||||
position: ""
|
||||
});
|
||||
} else {
|
||||
title.value = "编辑设备";
|
||||
formData.value = reactive({ ...row });
|
||||
// 判断后端返回的经纬度是不是为null
|
||||
row.lng === null
|
||||
? formData.value.position === ""
|
||||
: (formData.value.position = "经度:" + row.lng + "," + "维度:" + row.lat);
|
||||
}
|
||||
visible.value = true;
|
||||
};
|
||||
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
|
||||
// 多级 prop
|
||||
{ prop: "name", label: "设备名称", search: { el: "input" } },
|
||||
{ prop: "state", label: "在线状态" },
|
||||
{ prop: "code", label: "设备编码" },
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 180 }
|
||||
];
|
||||
|
||||
// 弹窗中的配置
|
||||
const formConfig = reactive({
|
||||
formItemConfig: [
|
||||
{
|
||||
label: "设备名称",
|
||||
prop: "name",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "设备编码",
|
||||
prop: "code",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "显示排序",
|
||||
prop: "priority",
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "经纬度",
|
||||
prop: "position",
|
||||
type: "input",
|
||||
mapIcon: true
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
name: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入视频名称",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
code: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入设备编码",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
priority: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入排序",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
position: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入经纬度",
|
||||
trigger: "change"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||
const initParam = reactive({
|
||||
engineeringSn: ""
|
||||
});
|
||||
|
||||
// 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));
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (!newParams.engineeringSn) {
|
||||
return { result: { records: [], current: "1", total: "0", size: "10" } };
|
||||
}
|
||||
return getvideoManagementPage(newParams);
|
||||
};
|
||||
|
||||
// 删除用户信息
|
||||
const handleDeleteItem = async (params: jxj_User.ResUserList) => {
|
||||
await useHandleData(deletevideoManagement, { monitorId: params.monitorId }, `删除【${params.name}】`);
|
||||
proTable.value.getTableList();
|
||||
};
|
||||
|
||||
// 页面新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
form.engineeringSn = searchSn.value;
|
||||
if (form.monitorId) {
|
||||
const res = await editvideoManagement(form);
|
||||
proTable.value.getTableList();
|
||||
ElMessage.success("编辑成功");
|
||||
} else {
|
||||
const res = await addvideoManagementment(form);
|
||||
ElMessage.success("新增成功");
|
||||
proTable.value.getTableList();
|
||||
}
|
||||
visible.value = false;
|
||||
};
|
||||
|
||||
const getAddress = async (e: any) => {
|
||||
formData.value.lng = e.lng;
|
||||
formData.value.lat = e.lat;
|
||||
formData.value.position = "经度:" + e.lng + "," + "维度:" + e.lat;
|
||||
isOpen.value = false;
|
||||
ElMessage.success("获取经纬度成功");
|
||||
};
|
||||
// 获取工程名称分页
|
||||
const getEngPage = async () => {
|
||||
const { result } = await getDustengineeringPage(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = +result.total;
|
||||
};
|
||||
onMounted(async () => {
|
||||
await getEngPage();
|
||||
searchSn.value = records.value[0].projectSn;
|
||||
searchName.value = records.value[0].projectName;
|
||||
onSearch(records.value[0]);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.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;
|
||||
}
|
||||
:deep {
|
||||
.tab-wrapper {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.leftProject {
|
||||
// padding: 5px 8px;
|
||||
font-size: 20px;
|
||||
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;
|
||||
.video {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.middleSize {
|
||||
font-size: 18px;
|
||||
color: #c4c4c4;
|
||||
white-space: nowrap;
|
||||
}
|
||||
img {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom_item {
|
||||
.bottomSize {
|
||||
font-size: 18px !important;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-box {
|
||||
width: calc(100% - 320px);
|
||||
height: 100%;
|
||||
margin-left: 20px;
|
||||
.table {
|
||||
margin-left: 20px;
|
||||
height: 100%;
|
||||
:deep(.table-main) {
|
||||
height: calc(100% - 82px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -234,14 +234,14 @@ const addMarker = () => {
|
||||
);
|
||||
|
||||
// 创建一个 选中的Icon
|
||||
// let selectIcon = getIcon(
|
||||
// "selected",
|
||||
// item.environAlarmFlag === false ? createMarkerImage("clouding.gif") : createMarkerImage("warnclouding.gif")
|
||||
// );
|
||||
let selectIcon = getIcon(
|
||||
"selected",
|
||||
item.environAlarmFlag === false ? createMarkerImage("zhengchang.png") : createMarkerImage("zhengchang.png")
|
||||
item.environAlarmFlag === false ? createMarkerImage("clouding.gif") : createMarkerImage("warnclouding.gif")
|
||||
);
|
||||
// let selectIcon = getIcon(
|
||||
// "selected",
|
||||
// item.environAlarmFlag === false ? createMarkerImage("zhengchang.png") : createMarkerImage("zhengchang.png")
|
||||
// );
|
||||
|
||||
// 将 icon 传入 marker
|
||||
let point = new BMapGL.Point(Number(item.longitude) || 113, Number(item.latitude) || 21); // 点位设置
|
||||
|
||||
@ -63,9 +63,9 @@ const columns: ColumnProps[] = [
|
||||
label: "预警名称",
|
||||
search: { el: "input" }
|
||||
},
|
||||
// 多级 prop
|
||||
{ prop: "dictSort", label: "排序" },
|
||||
{ prop: "status", label: "状态", render: scope => (scope.row.status == 1 ? "正常" : "停用") },
|
||||
// // 多级 prop
|
||||
// { prop: "dictSort", label: "排序" },
|
||||
// { prop: "status", label: "状态", render: scope => (scope.row.status == 1 ? "正常" : "停用") },
|
||||
{ prop: "dictValue", label: "预警值" },
|
||||
{ prop: "operation", label: "操作" }
|
||||
];
|
||||
@ -77,20 +77,20 @@ const formConfig = {
|
||||
prop: "remark",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "排序",
|
||||
prop: "dictSort",
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "整改状态",
|
||||
prop: "status",
|
||||
type: "radio",
|
||||
data: [
|
||||
{ label: "正常", value: 1 },
|
||||
{ label: "停用", value: 0 }
|
||||
]
|
||||
},
|
||||
// {
|
||||
// label: "排序",
|
||||
// prop: "dictSort",
|
||||
// type: "number"
|
||||
// },
|
||||
// {
|
||||
// label: "整改状态",
|
||||
// prop: "status",
|
||||
// type: "radio",
|
||||
// data: [
|
||||
// { label: "正常", value: 1 },
|
||||
// { label: "停用", value: 0 }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
label: "预警值",
|
||||
prop: "dictValue",
|
||||
@ -105,7 +105,7 @@ const formConfig = {
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
dictSort: [
|
||||
dictValue: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入",
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
</div> -->
|
||||
<div class="item">
|
||||
<span class="label">建筑面积:</span>
|
||||
<span class="value">{{ objData.engineering_area?objData.engineering_area + "㎡":"-" }}</span>
|
||||
<span class="value">{{ objData.engineering_area ? objData.engineering_area + "㎡" : "-" }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label">开工日期:</span>
|
||||
@ -75,6 +75,7 @@ let objData = ref({
|
||||
longitude: "",
|
||||
totalDay: ""
|
||||
});
|
||||
const props = defineProps(["engineeringSn"]);
|
||||
// 定义要发送的emit事件
|
||||
const emit = defineEmits(["projectData"]);
|
||||
const sendData = (data: any) => {
|
||||
@ -82,7 +83,7 @@ const sendData = (data: any) => {
|
||||
};
|
||||
// 获取项目信息
|
||||
const getProject = async () => {
|
||||
const res: any = await getEntProjectInfo({ engineeringSn: "BD78E0C5C2724962930CC9FAEC216EB9" });
|
||||
const res: any = await getEntProjectInfo({ engineeringSn: props.engineeringSn });
|
||||
objData.value = reactive({ ...res.result });
|
||||
sendData(res.result);
|
||||
};
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
<template>
|
||||
<div class="table-box">
|
||||
<div class="change-btn" @click="changeScreen">
|
||||
<img class="changeImg" src="@/assets/images/screenImg/change.png" alt="" />
|
||||
</div>
|
||||
<div class="leftBox">
|
||||
<div class="blockBox">
|
||||
<div class="blockTitle">
|
||||
<img src="@/assets/images/hzImg/xm/xmxx.png" alt="" class="title" />
|
||||
</div>
|
||||
<div class="blockContent" @click="showProjectDialog">
|
||||
<projectInfo @projectData="getProjectData"></projectInfo>
|
||||
<projectInfo :engineeringSn="engineeringSn" @projectData="getProjectData"></projectInfo>
|
||||
</div>
|
||||
</div>
|
||||
<projectInfoDialog v-show="projectDialog" @close="closeProjectDialog" :projectData="projectData"></projectInfoDialog>
|
||||
@ -182,12 +185,17 @@ let myPlugin = ref("");
|
||||
let cameraIndexCode = ref<string>("");
|
||||
let playUrl = ref("");
|
||||
let playIndex = ref(0);
|
||||
const props = defineProps(["engineeringSn"]);
|
||||
const emits = defineEmits(["change"]);
|
||||
const changeScreen = () => {
|
||||
emits("change");
|
||||
};
|
||||
const getProjectData = (data: any) => {
|
||||
projectData.value = data;
|
||||
};
|
||||
const dataObj = ref({});
|
||||
const getPayMentData = async () => {
|
||||
const res = await screenEntPayment({ engineeringSn: "BD78E0C5C2724962930CC9FAEC216EB9" });
|
||||
const res = await screenEntPayment({ engineeringSn: props.engineeringSn });
|
||||
console.log(res);
|
||||
if (res && res.result) {
|
||||
dataObj.value = res.result;
|
||||
@ -253,7 +261,7 @@ let qualityData = ref([
|
||||
]);
|
||||
// 获取安全质量信息
|
||||
const getInspect = async () => {
|
||||
const res: any = await getEntInspectInfo({ engineeringSn: "BD78E0C5C2724962930CC9FAEC216EB9" });
|
||||
const res: any = await getEntInspectInfo({ engineeringSn: props.engineeringSn });
|
||||
safetyTotal.value = res.result.safetyTotal;
|
||||
saftyData.value[0].value = res.result.safetyCompleted;
|
||||
saftyData.value[1].value = res.result.safetyUnCompleted;
|
||||
|
||||
@ -4,6 +4,21 @@
|
||||
font-family: "Source Han Sans CN-Regular", "Source Han Sans CN";
|
||||
color: #ffffff;
|
||||
}
|
||||
.change-btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
background-color: #060f2c;
|
||||
cursor: pointer;
|
||||
.changeImg {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
.leftBox,
|
||||
.rightBox {
|
||||
float: left;
|
||||
@ -68,6 +83,7 @@
|
||||
font-weight: 400;
|
||||
line-height: 14px;
|
||||
.item {
|
||||
width: max-content;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
|
||||
@ -34,7 +34,8 @@
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:initParam="initParam"
|
||||
:isShowSearch="false"
|
||||
:onReset="true"
|
||||
>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" v-if="row.state === 0" link @click="handleEditItem(row)">
|
||||
@ -250,11 +251,6 @@ const formConfig = reactive({
|
||||
}
|
||||
});
|
||||
|
||||
// 如果表格需要初始化请求参数,直接定义传给 ProTable(之后每次请求都会自动带上该参数,此参数更改之后也会一直带上,改变此参数会自动刷新表格数据)
|
||||
const initParam = reactive({
|
||||
engineeringSn: ""
|
||||
});
|
||||
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// 搜索用的项目sn或者工程sn
|
||||
@ -321,6 +317,9 @@ const getTableList = (params: any) => {
|
||||
delete newParams.createTime;
|
||||
}
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (!newParams.engineeringSn) {
|
||||
return { result: { records: [], current: "1", total: "0", size: "10" } };
|
||||
}
|
||||
return getLedgerPage(newParams);
|
||||
};
|
||||
|
||||
@ -361,9 +360,9 @@ const getEngPage = async () => {
|
||||
};
|
||||
onMounted(async () => {
|
||||
await getEngPage();
|
||||
searchSn.value = records.value[0].engineeringSn;
|
||||
searchName.value = records.value[0].engineeringName;
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = records.value[0].projectSn;
|
||||
searchName.value = records.value[0].projectName;
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@ -444,4 +443,9 @@ onMounted(async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep() {
|
||||
.el-form .el-form-item__content .el-range-editor {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -38,14 +38,16 @@
|
||||
:initParam="initParam"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="btnStyle" @click="handleEditItem(1)">新增</el-button>
|
||||
<el-button v-auth="'environment_dev_add'" class="btnStyle" @click="handleEditItem(1)">新增</el-button>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="handleEditItem(2, row)">
|
||||
<el-button v-auth="'environment_dev_update'" type="primary" link @click="handleEditItem(2, row)">
|
||||
<img src="@/assets/images/tableIcon/updateIcon.png" alt="" class="configureIcon" />
|
||||
<span>编辑</span>
|
||||
</el-button>
|
||||
<el-button type="danger" link :icon="Delete" @click="handleDeleteItem(row)">删除</el-button>
|
||||
<el-button v-auth="'environment_dev_del'" type="danger" link :icon="Delete" @click="handleDeleteItem(row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
|
||||
<template #examineState="{ row }">
|
||||
@ -61,7 +63,7 @@
|
||||
:formData="formData"
|
||||
v-model:visible="visible"
|
||||
append-to-body
|
||||
width="700px"
|
||||
width="800px"
|
||||
@confirm="saveItem"
|
||||
>
|
||||
<template #mapIcon>
|
||||
@ -84,14 +86,7 @@ import { jxj_User } from "@/api/types";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import {
|
||||
getDustManagementPage,
|
||||
addDustManagement,
|
||||
editDustManagement,
|
||||
deleteDustManagement,
|
||||
getengineeringList
|
||||
} from "@/api/modules/project";
|
||||
import { getRelevanceList } from "@/api/modules/common";
|
||||
import { getDustManagementPage, addDustManagement, editDustManagement, deleteDustManagement } from "@/api/modules/enterpriseApi";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import AMap from "@/components/AMap/AMap.vue";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
@ -120,7 +115,6 @@ interface formData {
|
||||
name?: string;
|
||||
code?: string;
|
||||
hardwareId?: string;
|
||||
engineeringSn?: string;
|
||||
lat?: number | undefined;
|
||||
lng?: number | undefined;
|
||||
position?: string;
|
||||
@ -132,7 +126,6 @@ const formData = ref<formData>({
|
||||
code: "",
|
||||
hardwareId: "",
|
||||
priority: 1,
|
||||
engineeringSn: "",
|
||||
lat: undefined,
|
||||
lng: undefined,
|
||||
position: ""
|
||||
@ -143,16 +136,6 @@ const searchName = ref<string>("");
|
||||
const searchSn = ref("");
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: any) => {
|
||||
// const { result } = await getAIQuestionPage(
|
||||
// active.value === 0
|
||||
// ? { projectSn: (params as ResAiProjectPage).projectSn, pageNo: pageable.value.pageNo, pageSize: pageable.value.pageSize }
|
||||
// : {
|
||||
// engineeringSn: (params as ResAiEngineerPage).engineeringSn,
|
||||
// pageNo: pageable.value.pageNo,
|
||||
// pageSize: pageable.value.pageSize
|
||||
// }
|
||||
// );
|
||||
// pageable.value.total = Number(result.total);
|
||||
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();
|
||||
@ -184,20 +167,19 @@ const onCurChange = async (params: number) => {
|
||||
// 修改数据按钮
|
||||
const handleEditItem = async (index: number, row: any) => {
|
||||
if (index === 1) {
|
||||
formConfig.formItemConfig[1].disabled = false;
|
||||
// formConfig.formItemConfig[1].disabled = false;
|
||||
title.value = "新增设备";
|
||||
formData.value = reactive({
|
||||
name: "",
|
||||
code: "",
|
||||
hardwareId: "",
|
||||
priority: 1,
|
||||
engineeringSn: "",
|
||||
lat: undefined,
|
||||
lng: undefined,
|
||||
position: ""
|
||||
});
|
||||
} else {
|
||||
formConfig.formItemConfig[1].disabled = true;
|
||||
// formConfig.formItemConfig[1].disabled = true;
|
||||
title.value = "编辑设备";
|
||||
formData.value = reactive({ ...row });
|
||||
// 判断后端返回的经纬度是不是为null
|
||||
@ -230,22 +212,13 @@ const formConfig = reactive({
|
||||
{
|
||||
label: "设备编码",
|
||||
prop: "code",
|
||||
type: "input",
|
||||
disabled: true
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "显示排序",
|
||||
prop: "priority",
|
||||
type: "number"
|
||||
},
|
||||
{
|
||||
label: "所属工程",
|
||||
prop: "engineeringSn",
|
||||
type: "select",
|
||||
data: [],
|
||||
clearable: true
|
||||
},
|
||||
|
||||
{
|
||||
label: "经纬度",
|
||||
prop: "position",
|
||||
@ -281,13 +254,6 @@ const formConfig = reactive({
|
||||
message: "请输入经纬度",
|
||||
trigger: "change"
|
||||
}
|
||||
],
|
||||
engineeringSn: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属工程",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
@ -314,6 +280,9 @@ const dataCallback = (data: any) => {
|
||||
const getTableList = (params: any) => {
|
||||
let newParams = JSON.parse(JSON.stringify(params));
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (!newParams.engineeringSn) {
|
||||
return { result: { records: [], current: "1", total: "0", size: "10" } };
|
||||
}
|
||||
return getDustManagementPage(newParams);
|
||||
};
|
||||
|
||||
@ -325,6 +294,7 @@ const handleDeleteItem = async (params: jxj_User.ResUserList) => {
|
||||
|
||||
// 页面新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
form.engineeringSn = searchSn.value;
|
||||
if (form.id) {
|
||||
const res = await editDustManagement(form);
|
||||
proTable.value.getTableList();
|
||||
@ -344,17 +314,6 @@ const getAddress = async (e: any) => {
|
||||
isOpen.value = false;
|
||||
ElMessage.success("获取经纬度成功");
|
||||
};
|
||||
|
||||
// 新增或者编辑按钮的下拉框
|
||||
const getNameList = async () => {
|
||||
const res = await getengineeringList({});
|
||||
formConfig.formItemConfig[3].data = res.result.map(item => {
|
||||
return {
|
||||
label: item.engineeringName,
|
||||
value: item.engineeringSn
|
||||
};
|
||||
});
|
||||
};
|
||||
// 获取工程名称分页
|
||||
const getEngPage = async () => {
|
||||
const { result } = await getDustengineeringPage(pages.value);
|
||||
@ -366,14 +325,10 @@ const getEngPage = async () => {
|
||||
pages.value.total = +result.total;
|
||||
};
|
||||
onMounted(async () => {
|
||||
getNameList();
|
||||
if (store.projectDateAuth === 1) {
|
||||
delete formConfig.rules.engineeringSn;
|
||||
}
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = records.value[0].projectSn;
|
||||
searchName.value = records.value[0].projectName;
|
||||
onSearch(records.value[0]);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@ -193,6 +193,9 @@ const dataCallback = (data: any) => {
|
||||
const getTableList = (params: any) => {
|
||||
let newParams = JSON.parse(JSON.stringify(params));
|
||||
newParams.engineeringSn = searchSn.value;
|
||||
if (!newParams.engineeringSn) {
|
||||
return { result: { records: [], current: "1", total: "0", size: "10" } };
|
||||
}
|
||||
return getRealTimePage(newParams);
|
||||
};
|
||||
// 获取工程名称分页
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<img src="@/assets/images/hzImg/xm/xmxx.png" alt="" class="title" />
|
||||
</div>
|
||||
<div class="blockContent" @click="showProjectDialog">
|
||||
<projectInfo @projectData="getProjectData"></projectInfo>
|
||||
<projectInfo :engineeringSn="engineeringSn" @projectData="getProjectData"></projectInfo>
|
||||
</div>
|
||||
</div>
|
||||
<projectInfoDialog v-show="projectDialog" @close="closeProjectDialog" :projectData="projectData"></projectInfoDialog>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
height: auto;
|
||||
font-family: "Source Han Sans CN-Regular", "Source Han Sans CN";
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
}
|
||||
.leftBox,
|
||||
.rightBox {
|
||||
|
||||
@ -41,18 +41,21 @@ const tokenIdentify = async () => {
|
||||
// 3.清空 tabs、keepAlive 保留的数据
|
||||
tabsStore.closeMultipleTab();
|
||||
keepAlive.setKeepAliveName();
|
||||
|
||||
if (responseData.accountType === 2) {
|
||||
await sendMessage({ isSuccess: true }, 2);
|
||||
globalStore.setPath("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
||||
await initDynamicRouter({ moduleId: "1670639811581595650" });
|
||||
globalStore.moduleId = "1670639811581595650";
|
||||
} else if (responseData.accountType == 4) {
|
||||
await sendMessage({ isSuccess: true }, 2);
|
||||
globalStore.setPath("/hz-project/largeScreen/largeScreenOne/index");
|
||||
await initDynamicRouter({ moduleId: "1670603312504918018" });
|
||||
globalStore.moduleId = "1670603312504918018";
|
||||
}
|
||||
await sendMessage({ isSuccess: true }, 2);
|
||||
globalStore.setPath("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
||||
await initDynamicRouter({ moduleId: "1670639811581595650" });
|
||||
globalStore.moduleId = "1670639811581595650";
|
||||
// if (responseData.accountType === 2) {
|
||||
// await sendMessage({ isSuccess: true }, 2);
|
||||
// globalStore.setPath("/goverment/huizhou/largeScreen/largeScreenOne/index");
|
||||
// await initDynamicRouter({ moduleId: "1670639811581595650" });
|
||||
// globalStore.moduleId = "1670639811581595650";
|
||||
// } else if (responseData.accountType == 4) {
|
||||
// await sendMessage({ isSuccess: true }, 2);
|
||||
// globalStore.setPath("/hz-project/largeScreen/largeScreenOne/index");
|
||||
// await initDynamicRouter({ moduleId: "1670603312504918018" });
|
||||
// globalStore.moduleId = "1670603312504918018";
|
||||
// }
|
||||
} else {
|
||||
// ElMessage.error("登录信息异常,请刷新或重新登录!");
|
||||
return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user