Merge branch 'yanyan_huizhou' of http://139.9.66.234:18023/dhp/wisdomisitezwfront into jinglin_huizhou
This commit is contained in:
commit
cebaad32e3
@ -0,0 +1,95 @@
|
||||
.warning-page {
|
||||
// background-color: blue;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.leftMenu {
|
||||
// width: 290px;
|
||||
// 页面的项目工程
|
||||
:deep(.item) {
|
||||
height: 78px !important;
|
||||
}
|
||||
:deep(.content) {
|
||||
height: calc(100% - 160px) !important;
|
||||
}
|
||||
.leftProject {
|
||||
// padding: 5px 8px;
|
||||
color: #333333;
|
||||
.projectName {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
// font-weight: 700;
|
||||
font-family: "siyuan_Medium";
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.leftMenu_item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
.video {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.middleSize {
|
||||
font-size: 12px;
|
||||
color: #c4c4c4;
|
||||
}
|
||||
img {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom_item {
|
||||
.bottomSize {
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table {
|
||||
height: 100%;
|
||||
margin-left: 20px;
|
||||
:deep(.table-main) {
|
||||
height: calc(100% - 82px);
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-scrollbar__view) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
}
|
||||
:deep() {
|
||||
.el-form-item__content > :not(button) {
|
||||
// width: 160px;
|
||||
}
|
||||
.el-input__wrapper {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
.el-input__inner {
|
||||
color: white;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
}
|
||||
|
||||
// :deep(.el-dialog__body) {
|
||||
// padding: 0 0 0 0 !important;
|
||||
// background-color: pink;
|
||||
// }
|
||||
@ -1,8 +1,357 @@
|
||||
<template>
|
||||
<div class="">分部分项工程管理</div>
|
||||
<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 ResAiProjectPage).projectName || (data as ResAiEngineerPage).engineeringName
|
||||
}}</span>
|
||||
<div class="leftMenu_item">
|
||||
<div class="video">
|
||||
<img src="@/assets/images/leftTab/设备列表.png" alt="" />
|
||||
<span class="middleSize">影像视频树:{{ data.deviceNum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
<div class="table-box">
|
||||
<div class="table">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
title="用户列表"
|
||||
:columns="columns"
|
||||
:requestApi="getTableList"
|
||||
:dataCallback="dataCallback"
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="addButtonStyle">刷新</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="scope">
|
||||
<el-button type="primary" @click="handleAddItem()">
|
||||
<!-- <img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" /> -->
|
||||
<span>查看</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
<DialogForm
|
||||
:title="title"
|
||||
:formConfig="formConfig"
|
||||
:formData="formData"
|
||||
v-model:visible="visible"
|
||||
append-to-body
|
||||
width="36%"
|
||||
@confirm="saveItem"
|
||||
>
|
||||
</DialogForm>
|
||||
</div>
|
||||
<el-dialog v-model="configureDialogVisible" title="查看子分部分项" show-close> </el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, nextTick, computed } from "vue";
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import {
|
||||
getDustprojectPage,
|
||||
getDustengineeringPage,
|
||||
getAIQuestionPage,
|
||||
addAIrecords,
|
||||
getAiMonitorDev
|
||||
} from "@/api/modules/goverment";
|
||||
import { videoList, videoDataAdd, videoDataEdit, videoDataDelete } from "@/api/modules/enterpriseApi";
|
||||
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
||||
import { ElMessage, UploadProps } from "element-plus";
|
||||
import type { FormRules, FormInstance, UploadInstance } from "element-plus";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import { getRealTimePage } from "@/api/modules/project";
|
||||
const pages = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 7,
|
||||
total: 0
|
||||
});
|
||||
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
||||
const active = ref(0);
|
||||
const fileList = ref([]);
|
||||
const store = GlobalStore();
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
// 多级 prop
|
||||
{ prop: "name", label: "任务名称", isShow: false, search: { el: "input" } },
|
||||
{ prop: "deviceName", label: "分部分项工程名称" },
|
||||
{
|
||||
prop: "temperature",
|
||||
label: "计划开始日期"
|
||||
},
|
||||
{
|
||||
prop: "temperature",
|
||||
label: "截止完成日期"
|
||||
},
|
||||
{
|
||||
prop: "temperature",
|
||||
label: "实际完成日期"
|
||||
},
|
||||
{
|
||||
prop: "temperature",
|
||||
label: "负责人"
|
||||
},
|
||||
{
|
||||
prop: "windspeed",
|
||||
label: "完成比率%",
|
||||
render: scoped => {
|
||||
return scoped.row.windspeed + "%";
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: "temperature",
|
||||
label: "状态",
|
||||
search: { el: "select" }
|
||||
},
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 120 }
|
||||
];
|
||||
interface formData {
|
||||
title: string;
|
||||
uploadTime: string;
|
||||
remark: string;
|
||||
videoUrl: string;
|
||||
}
|
||||
const formData = ref<formData>({
|
||||
title: "",
|
||||
uploadTime: "",
|
||||
remark: "",
|
||||
videoUrl: ""
|
||||
});
|
||||
const visible = ref(false);
|
||||
const title = ref("新增录像");
|
||||
// 弹窗中的配置
|
||||
const formConfig = {
|
||||
formItemConfig: [
|
||||
{
|
||||
label: "分部分项名称",
|
||||
prop: "governmentName",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "子分部分项名称",
|
||||
prop: "governmentTel",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "施工位置",
|
||||
prop: "account",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "工作量",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "单位",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "任务描述",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "预计开始日期",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "预计完成时间",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "重要程度",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "负责人",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "附件",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
}
|
||||
],
|
||||
rules: {}
|
||||
};
|
||||
const pageable = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 12,
|
||||
total: 0
|
||||
});
|
||||
|
||||
const videoData = ref({
|
||||
records: []
|
||||
});
|
||||
const form = ref({
|
||||
title: "",
|
||||
createTime: "",
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
});
|
||||
// 搜索用的项目sn或者工程sn
|
||||
const searchSn = ref("");
|
||||
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// 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));
|
||||
return getRealTimePage(newParams);
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => {
|
||||
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 as ResAiProjectPage).projectSn)
|
||||
: (searchSn.value = (params as ResAiEngineerPage).engineeringSn);
|
||||
active.value === 0
|
||||
? (searchName.value = (params as ResAiProjectPage).projectName)
|
||||
: (searchName.value = (params as ResAiEngineerPage).engineeringName);
|
||||
getVideoData();
|
||||
};
|
||||
// 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;
|
||||
}
|
||||
};
|
||||
// 添加数据按钮
|
||||
const handleAddItem = () => {
|
||||
visible.value = true;
|
||||
title.value = "查看子分部分项";
|
||||
// formData.value = reactive({});
|
||||
};
|
||||
// 新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
// const res = await addGovernment(form);
|
||||
// ElMessage.success("新增成功");
|
||||
visible.value = false;
|
||||
};
|
||||
// leftMenu页面的分页
|
||||
const onCurChange = async (params: number) => {
|
||||
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 getVideoData = async () => {
|
||||
const res = await videoList({ ...pageable.value, ...form.value });
|
||||
videoData.value.records = res.result.records;
|
||||
console.log(videoData.value);
|
||||
console.log(res);
|
||||
};
|
||||
// 获取项目名称分页
|
||||
const getProPage = async () => {
|
||||
const { result } = await getDustprojectPage(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
// 获取工程名称分页
|
||||
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;
|
||||
};
|
||||
watch(
|
||||
() => active.value,
|
||||
async (value: number) => {
|
||||
pages.value.pageNo = 1;
|
||||
pages.value.total = 0;
|
||||
// console.log(value);
|
||||
|
||||
if (value === 0) {
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
} else {
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
onMounted(async () => {
|
||||
getVideoData();
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,95 @@
|
||||
.warning-page {
|
||||
// background-color: blue;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.leftMenu {
|
||||
// width: 290px;
|
||||
// 页面的项目工程
|
||||
:deep(.item) {
|
||||
height: 78px !important;
|
||||
}
|
||||
:deep(.content) {
|
||||
height: calc(100% - 160px) !important;
|
||||
}
|
||||
.leftProject {
|
||||
// padding: 5px 8px;
|
||||
color: #333333;
|
||||
.projectName {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
// font-weight: 700;
|
||||
font-family: "siyuan_Medium";
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.leftMenu_item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
.video {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.middleSize {
|
||||
font-size: 12px;
|
||||
color: #c4c4c4;
|
||||
}
|
||||
img {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom_item {
|
||||
.bottomSize {
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table {
|
||||
height: 100%;
|
||||
margin-left: 20px;
|
||||
:deep(.table-main) {
|
||||
height: calc(100% - 82px);
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-scrollbar__view) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
}
|
||||
:deep() {
|
||||
.el-form-item__content > :not(button) {
|
||||
// width: 160px;
|
||||
}
|
||||
.el-input__wrapper {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
.el-input__inner {
|
||||
color: white;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
}
|
||||
|
||||
// :deep(.el-dialog__body) {
|
||||
// padding: 0 0 0 0 !important;
|
||||
// background-color: pink;
|
||||
// }
|
||||
@ -1,8 +1,408 @@
|
||||
<template>
|
||||
<div class="">投资支付管理</div>
|
||||
<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 ResAiProjectPage).projectName || (data as ResAiEngineerPage).engineeringName
|
||||
}}</span>
|
||||
<div class="leftMenu_item">
|
||||
<div class="video">
|
||||
<img src="@/assets/images/leftTab/设备列表.png" alt="" />
|
||||
<span class="middleSize">影像视频树:{{ data.deviceNum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
<div class="table-box">
|
||||
<div class="table">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
title="用户列表"
|
||||
:columns="columns"
|
||||
:requestApi="getTableList"
|
||||
:dataCallback="dataCallback"
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="addButtonStyle" @click="handleAddItem()">新增</el-button>
|
||||
<el-button class="addButtonStyle">刷新</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="scope">
|
||||
<el-button type="primary">
|
||||
<!-- <img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" /> -->
|
||||
<span>查看</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
<DialogForm
|
||||
:title="title"
|
||||
:formConfig="formConfig"
|
||||
:formData="formData"
|
||||
v-model:visible="visible"
|
||||
append-to-body
|
||||
width="36%"
|
||||
@confirm="saveItem"
|
||||
>
|
||||
</DialogForm>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, nextTick, computed } from "vue";
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import {
|
||||
getDustprojectPage,
|
||||
getDustengineeringPage,
|
||||
getAIQuestionPage,
|
||||
addAIrecords,
|
||||
getAiMonitorDev
|
||||
} from "@/api/modules/goverment";
|
||||
import { videoList, videoDataAdd, videoDataEdit, videoDataDelete } from "@/api/modules/enterpriseApi";
|
||||
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
||||
import { ElMessage, UploadProps } from "element-plus";
|
||||
import type { FormRules, FormInstance, UploadInstance } from "element-plus";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import { getRealTimePage } from "@/api/modules/project";
|
||||
const pages = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 7,
|
||||
total: 0
|
||||
});
|
||||
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
||||
const active = ref(0);
|
||||
const fileList = ref([]);
|
||||
const store = GlobalStore();
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{ prop: "deviceName", label: "费用类型", search: { el: "input" } },
|
||||
{
|
||||
prop: "deviceName",
|
||||
label: "合同金额(万元)",
|
||||
render: scoped => {
|
||||
return scoped.row.temperature + "万元";
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: "deviceName",
|
||||
label: "结算金额(万元)",
|
||||
render: scoped => {
|
||||
return scoped.row.temperature + "万元";
|
||||
}
|
||||
},
|
||||
{ prop: "deviceName", label: "结算定额日期" },
|
||||
{ prop: "deviceName", label: "申请单位" },
|
||||
{ prop: "deviceName", label: "中标通知书日期" },
|
||||
{ prop: "deviceName", label: "合同签订日期" },
|
||||
{
|
||||
prop: "deviceName",
|
||||
label: "累计拨款金额(万元)",
|
||||
render: scoped => {
|
||||
return scoped.row.temperature + "万元";
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: "deviceName",
|
||||
label: "付款金额(万元)",
|
||||
render: scoped => {
|
||||
return scoped.row.temperature + "万元";
|
||||
}
|
||||
},
|
||||
{ prop: "deviceName", label: "付款日期" },
|
||||
{
|
||||
prop: "deviceName",
|
||||
label: "未支付工程款(万元)",
|
||||
render: scoped => {
|
||||
return scoped.row.temperature + "万元";
|
||||
}
|
||||
},
|
||||
{
|
||||
prop: "deviceName",
|
||||
label: "支付百分比(%)",
|
||||
render: scoped => {
|
||||
return scoped.row.temperature + "%";
|
||||
}
|
||||
},
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 120 }
|
||||
];
|
||||
// 弹窗中的配置
|
||||
const formConfig = {
|
||||
formItemConfig: [
|
||||
{
|
||||
label: "费用类型",
|
||||
prop: "governmentName",
|
||||
type: "select"
|
||||
},
|
||||
{
|
||||
label: "合同金额",
|
||||
prop: "governmentTel",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "结算金额",
|
||||
prop: "account",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "结算定案日期",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "申请单位",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "中标通知书日期",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "合同签订日期",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "累计拨付金额",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "付款金额",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "付款日期",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "未支付工程款",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "支付百分比",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
}
|
||||
],
|
||||
rules: {
|
||||
governmentName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入政务名称",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
governmentTel: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入手机号码",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
account: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入账号",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
password: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入密码",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
interface formData {
|
||||
title: string;
|
||||
uploadTime: string;
|
||||
remark: string;
|
||||
videoUrl: string;
|
||||
}
|
||||
const formData = ref<formData>({
|
||||
title: "",
|
||||
uploadTime: "",
|
||||
remark: "",
|
||||
videoUrl: ""
|
||||
});
|
||||
const visible = ref(false);
|
||||
const title = ref("新增录像");
|
||||
|
||||
const pageable = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 12,
|
||||
total: 0
|
||||
});
|
||||
|
||||
const videoData = ref({
|
||||
records: []
|
||||
});
|
||||
const form = ref({
|
||||
title: "",
|
||||
createTime: "",
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
});
|
||||
// 搜索用的项目sn或者工程sn
|
||||
const searchSn = ref("");
|
||||
// 添加数据按钮
|
||||
const handleAddItem = () => {
|
||||
visible.value = true;
|
||||
title.value = "新增";
|
||||
// formData.value = reactive({});
|
||||
};
|
||||
// 新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
// const res = await addGovernment(form);
|
||||
// ElMessage.success("新增成功");
|
||||
visible.value = false;
|
||||
};
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// 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));
|
||||
return getRealTimePage(newParams);
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => {
|
||||
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 as ResAiProjectPage).projectSn)
|
||||
: (searchSn.value = (params as ResAiEngineerPage).engineeringSn);
|
||||
active.value === 0
|
||||
? (searchName.value = (params as ResAiProjectPage).projectName)
|
||||
: (searchName.value = (params as ResAiEngineerPage).engineeringName);
|
||||
getVideoData();
|
||||
};
|
||||
// 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) => {
|
||||
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 getVideoData = async () => {
|
||||
const res = await videoList({ ...pageable.value, ...form.value });
|
||||
videoData.value.records = res.result.records;
|
||||
console.log(videoData.value);
|
||||
console.log(res);
|
||||
};
|
||||
// 获取项目名称分页
|
||||
const getProPage = async () => {
|
||||
const { result } = await getDustprojectPage(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
// 获取工程名称分页
|
||||
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;
|
||||
};
|
||||
watch(
|
||||
() => active.value,
|
||||
async (value: number) => {
|
||||
pages.value.pageNo = 1;
|
||||
pages.value.total = 0;
|
||||
// console.log(value);
|
||||
|
||||
if (value === 0) {
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
} else {
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
onMounted(async () => {
|
||||
getVideoData();
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,95 @@
|
||||
.warning-page {
|
||||
// background-color: blue;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.leftMenu {
|
||||
// width: 290px;
|
||||
// 页面的项目工程
|
||||
:deep(.item) {
|
||||
height: 78px !important;
|
||||
}
|
||||
:deep(.content) {
|
||||
height: calc(100% - 160px) !important;
|
||||
}
|
||||
.leftProject {
|
||||
// padding: 5px 8px;
|
||||
color: #333333;
|
||||
.projectName {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
|
||||
// font-weight: 700;
|
||||
font-family: "siyuan_Medium";
|
||||
font-size: 16px;
|
||||
color: #ffffff;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.leftMenu_item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
.video {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.middleSize {
|
||||
font-size: 12px;
|
||||
color: #c4c4c4;
|
||||
}
|
||||
img {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
margin: 0 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom_item {
|
||||
.bottomSize {
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table {
|
||||
height: 100%;
|
||||
margin-left: 20px;
|
||||
:deep(.table-main) {
|
||||
height: calc(100% - 82px);
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-scrollbar__view) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
}
|
||||
:deep() {
|
||||
.el-form-item__content > :not(button) {
|
||||
// width: 160px;
|
||||
}
|
||||
.el-input__wrapper {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
.el-input__inner {
|
||||
color: white;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
}
|
||||
|
||||
// :deep(.el-dialog__body) {
|
||||
// padding: 0 0 0 0 !important;
|
||||
// background-color: pink;
|
||||
// }
|
||||
@ -1,8 +1,343 @@
|
||||
<template>
|
||||
<div class="">全景计划管理</div>
|
||||
<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 ResAiProjectPage).projectName || (data as ResAiEngineerPage).engineeringName
|
||||
}}</span>
|
||||
<div class="leftMenu_item">
|
||||
<div class="video">
|
||||
<img src="@/assets/images/leftTab/设备列表.png" alt="" />
|
||||
<span class="middleSize">影像视频树:{{ data.deviceNum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
<div class="table-box">
|
||||
<div class="table">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
title="用户列表"
|
||||
:columns="columns"
|
||||
:requestApi="getTableList"
|
||||
:dataCallback="dataCallback"
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="addButtonStyle">刷新</el-button>
|
||||
</template>
|
||||
<!-- 表格操作 -->
|
||||
<template #operation="scope">
|
||||
<el-button type="primary" @click="handleAddItem()">
|
||||
<!-- <img src="@/assets/images/tableIcon/configureIcon.png" alt="" class="configureIcon" /> -->
|
||||
<span>查看</span>
|
||||
</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
<DialogForm
|
||||
:title="title"
|
||||
:formConfig="formConfig"
|
||||
:formData="formData"
|
||||
v-model:visible="visible"
|
||||
append-to-body
|
||||
width="36%"
|
||||
@confirm="saveItem"
|
||||
>
|
||||
</DialogForm>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, nextTick, computed } from "vue";
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import {
|
||||
getDustprojectPage,
|
||||
getDustengineeringPage,
|
||||
getAIQuestionPage,
|
||||
addAIrecords,
|
||||
getAiMonitorDev
|
||||
} from "@/api/modules/goverment";
|
||||
import { videoList, videoDataAdd, videoDataEdit, videoDataDelete } from "@/api/modules/enterpriseApi";
|
||||
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
||||
import { ElMessage, UploadProps } from "element-plus";
|
||||
import type { FormRules, FormInstance, UploadInstance } from "element-plus";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import DialogForm from "@/components/DialogForm/index.vue";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import { getRealTimePage } from "@/api/modules/project";
|
||||
const pages = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 7,
|
||||
total: 0
|
||||
});
|
||||
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
||||
const active = ref(0);
|
||||
const fileList = ref([]);
|
||||
const store = GlobalStore();
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
{ prop: "name", label: "节点编号" },
|
||||
{ prop: "name", label: "节点名称", search: { el: "input" } },
|
||||
{ prop: "name", label: "节点类型" },
|
||||
{ prop: "name", label: "标准完成时间" },
|
||||
{ prop: "name", label: "计划完成时间" },
|
||||
{ prop: "name", label: "预计完成时间" },
|
||||
{ prop: "name", label: "实际完成时间" },
|
||||
{ prop: "name", label: "状态", search: { el: "select" } },
|
||||
{ prop: "name", label: "智能条线" },
|
||||
{ prop: "name", label: "节点责任人编号" },
|
||||
{ prop: "name", label: "节点责任人" },
|
||||
{ prop: "name", label: "节点失效标记" },
|
||||
{ prop: "name", label: "是否退回" },
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 120 }
|
||||
];
|
||||
interface formData {
|
||||
title: string;
|
||||
uploadTime: string;
|
||||
remark: string;
|
||||
videoUrl: string;
|
||||
}
|
||||
const formData = ref<formData>({
|
||||
title: "",
|
||||
uploadTime: "",
|
||||
remark: "",
|
||||
videoUrl: ""
|
||||
});
|
||||
const visible = ref(false);
|
||||
const title = ref("新增录像");
|
||||
|
||||
const pageable = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 12,
|
||||
total: 0
|
||||
});
|
||||
|
||||
const videoData = ref({
|
||||
records: []
|
||||
});
|
||||
const form = ref({
|
||||
title: "",
|
||||
createTime: "",
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
});
|
||||
// 搜索用的项目sn或者工程sn
|
||||
const searchSn = ref("");
|
||||
// 弹窗中的配置
|
||||
const formConfig = {
|
||||
formItemConfig: [
|
||||
{
|
||||
label: "节点编码",
|
||||
prop: "governmentName",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点名称",
|
||||
prop: "governmentTel",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点类型",
|
||||
prop: "account",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "标准完成时间",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "计划完成时间",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "预计完成时间",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "实际完成时间",
|
||||
prop: "password",
|
||||
type: "date"
|
||||
},
|
||||
{
|
||||
label: "状态",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "实际偏差",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "职能线条",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点负责人编号",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
},
|
||||
{
|
||||
label: "节点负责人",
|
||||
prop: "password",
|
||||
type: "input"
|
||||
}
|
||||
],
|
||||
rules: {}
|
||||
};
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// 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));
|
||||
return getRealTimePage(newParams);
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => {
|
||||
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 as ResAiProjectPage).projectSn)
|
||||
: (searchSn.value = (params as ResAiEngineerPage).engineeringSn);
|
||||
active.value === 0
|
||||
? (searchName.value = (params as ResAiProjectPage).projectName)
|
||||
: (searchName.value = (params as ResAiEngineerPage).engineeringName);
|
||||
getVideoData();
|
||||
};
|
||||
// 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) => {
|
||||
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 getVideoData = async () => {
|
||||
const res = await videoList({ ...pageable.value, ...form.value });
|
||||
videoData.value.records = res.result.records;
|
||||
console.log(videoData.value);
|
||||
console.log(res);
|
||||
};
|
||||
// 获取项目名称分页
|
||||
const getProPage = async () => {
|
||||
const { result } = await getDustprojectPage(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
// 获取工程名称分页
|
||||
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;
|
||||
};
|
||||
// 添加数据按钮
|
||||
const handleAddItem = () => {
|
||||
visible.value = true;
|
||||
title.value = "查看子分部分项";
|
||||
// formData.value = reactive({});
|
||||
};
|
||||
// 新增,编辑数据
|
||||
const saveItem = async (form: any) => {
|
||||
// const res = await addGovernment(form);
|
||||
// ElMessage.success("新增成功");
|
||||
visible.value = false;
|
||||
};
|
||||
watch(
|
||||
() => active.value,
|
||||
async (value: number) => {
|
||||
pages.value.pageNo = 1;
|
||||
pages.value.total = 0;
|
||||
// console.log(value);
|
||||
|
||||
if (value === 0) {
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
} else {
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
onMounted(async () => {
|
||||
getVideoData();
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
.warning-page {
|
||||
// background-color: blue;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.leftMenu {
|
||||
// width: 290px;
|
||||
// 页面的项目工程
|
||||
:deep(.item) {
|
||||
height: 78px !important;
|
||||
}
|
||||
:deep(.content) {
|
||||
height: calc(100% - 160px) !important;
|
||||
}
|
||||
.leftProject {
|
||||
// padding: 5px 8px;
|
||||
color: #333333;
|
||||
.projectName {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
// font-weight: 700;
|
||||
font-family: "siyuan_Medium";
|
||||
font-size: 16px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.leftMenu_item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10px;
|
||||
.video {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.middleSize {
|
||||
color: #c4c4c4;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 4px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottom_item {
|
||||
.bottomSize {
|
||||
font-size: 10px;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.table {
|
||||
margin-left: 20px;
|
||||
height: 100%;
|
||||
:deep(.table-main) {
|
||||
height: calc(100% - 82px);
|
||||
}
|
||||
}
|
||||
}
|
||||
:deep(.el-scrollbar__view) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
// display: flex;
|
||||
// flex-wrap: wrap;
|
||||
}
|
||||
:deep() {
|
||||
.el-form-item__content > :not(button) {
|
||||
width: 160px;
|
||||
}
|
||||
.el-input__wrapper {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
.el-input__inner {
|
||||
color: white;
|
||||
}
|
||||
.el-textarea__inner {
|
||||
color: white;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, var(--el-color-primary)) inset;
|
||||
}
|
||||
}
|
||||
// :deep(.el-dialog__body) {
|
||||
// padding: 0 0 0 0 !important;
|
||||
// background-color: pink;
|
||||
// }
|
||||
@ -1,8 +1,248 @@
|
||||
<template>
|
||||
<div class="">项目进度统计</div>
|
||||
<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 ResAiProjectPage).projectName || (data as ResAiEngineerPage).engineeringName
|
||||
}}</span>
|
||||
<div class="leftMenu_item">
|
||||
<div class="video">
|
||||
<img src="@/assets/images/leftTab/设备列表.png" alt="" />
|
||||
<span class="middleSize">影像视频树:{{ data.deviceNum }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</LeftMenu>
|
||||
<div class="table-box">
|
||||
<div class="table">
|
||||
<ProTable
|
||||
ref="proTable"
|
||||
title="用户列表"
|
||||
:columns="columns"
|
||||
:requestApi="getTableList"
|
||||
:dataCallback="dataCallback"
|
||||
:tool-button="false"
|
||||
:pagination="true"
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #formButton="scope">
|
||||
<el-button class="addButtonStyle">刷新</el-button>
|
||||
</template>
|
||||
</ProTable>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="ProjectSupervisionRecord">
|
||||
import { ref, reactive, nextTick, computed } from "vue";
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, onMounted, watch } from "vue";
|
||||
import {
|
||||
getDustprojectPage,
|
||||
getDustengineeringPage,
|
||||
getAIQuestionPage,
|
||||
addAIrecords,
|
||||
getAiMonitorDev
|
||||
} from "@/api/modules/goverment";
|
||||
import { videoList, videoDataAdd, videoDataEdit, videoDataDelete } from "@/api/modules/enterpriseApi";
|
||||
import Pagination from "@/components/ProTable/components/Pagination.vue";
|
||||
import { ElMessage, UploadProps } from "element-plus";
|
||||
import type { FormRules, FormInstance, UploadInstance } from "element-plus";
|
||||
import { GlobalStore } from "@/stores";
|
||||
import { Delete } from "@element-plus/icons-vue";
|
||||
import { jxj_User } from "@/api/types";
|
||||
import { useHandleData } from "@/hooks/useHandleData";
|
||||
import LeftMenu from "@/components/LeftMenu/LeftMenu.vue";
|
||||
import type { ResAiProjectPage, ResAiEngineerPage } from "@/api/types/government/AIwaring";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import { ColumnProps } from "@/components/ProTable/interface";
|
||||
import { getRealTimePage } from "@/api/modules/project";
|
||||
const pages = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 7,
|
||||
total: 0
|
||||
});
|
||||
const records = ref<ResAiProjectPage[] | ResAiEngineerPage[]>([]);
|
||||
const active = ref(0);
|
||||
const fileList = ref([]);
|
||||
const store = GlobalStore();
|
||||
// 表格配置项
|
||||
const columns: ColumnProps[] = [
|
||||
{ type: "index", label: "序号", width: 80 },
|
||||
// 多级 prop
|
||||
{ prop: "name", label: "任务名称", search: { el: "input" } },
|
||||
{ prop: "deviceName", label: "负责人" },
|
||||
{ prop: "name", label: "任务状态", isShow: false, search: { el: "select" } },
|
||||
{ prop: "deviceName", label: "逾期天数" },
|
||||
{ prop: "deviceName", label: "开始日期" },
|
||||
{ prop: "deviceName", label: "结束日期" },
|
||||
{
|
||||
prop: "winddirection",
|
||||
label: "逾期天数",
|
||||
render: scoped => {
|
||||
return scoped.row.winddirection + "天";
|
||||
}
|
||||
}
|
||||
];
|
||||
interface formData {
|
||||
title: string;
|
||||
uploadTime: string;
|
||||
remark: string;
|
||||
videoUrl: string;
|
||||
}
|
||||
const formData = ref<formData>({
|
||||
title: "",
|
||||
uploadTime: "",
|
||||
remark: "",
|
||||
videoUrl: ""
|
||||
});
|
||||
const visible = ref(false);
|
||||
const title = ref("新增录像");
|
||||
|
||||
const pageable = ref({
|
||||
pageNo: 1,
|
||||
pageSize: 12,
|
||||
total: 0
|
||||
});
|
||||
|
||||
const videoData = ref({
|
||||
records: []
|
||||
});
|
||||
const form = ref({
|
||||
title: "",
|
||||
createTime: "",
|
||||
startTime: "",
|
||||
endTime: ""
|
||||
});
|
||||
// 搜索用的项目sn或者工程sn
|
||||
const searchSn = ref("");
|
||||
|
||||
// 项目或者工程名字
|
||||
const searchName = ref<string>("");
|
||||
// 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));
|
||||
return getRealTimePage(newParams);
|
||||
};
|
||||
// 页面的项目名称和工程名称的div点击事件
|
||||
const onSearch = async (params: ResAiProjectPage | ResAiEngineerPage) => {
|
||||
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 as ResAiProjectPage).projectSn)
|
||||
: (searchSn.value = (params as ResAiEngineerPage).engineeringSn);
|
||||
active.value === 0
|
||||
? (searchName.value = (params as ResAiProjectPage).projectName)
|
||||
: (searchName.value = (params as ResAiEngineerPage).engineeringName);
|
||||
getVideoData();
|
||||
};
|
||||
// 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) => {
|
||||
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 getVideoData = async () => {
|
||||
const res = await videoList({ ...pageable.value, ...form.value });
|
||||
videoData.value.records = res.result.records;
|
||||
console.log(videoData.value);
|
||||
console.log(res);
|
||||
};
|
||||
// 获取项目名称分页
|
||||
const getProPage = async () => {
|
||||
const { result } = await getDustprojectPage(pages.value);
|
||||
records.value = result.records;
|
||||
records.value.map(item => {
|
||||
let showGif = false;
|
||||
item.showGif = showGif;
|
||||
});
|
||||
pages.value.total = Number(result.total);
|
||||
};
|
||||
// 获取工程名称分页
|
||||
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;
|
||||
};
|
||||
watch(
|
||||
() => active.value,
|
||||
async (value: number) => {
|
||||
pages.value.pageNo = 1;
|
||||
pages.value.total = 0;
|
||||
// console.log(value);
|
||||
|
||||
if (value === 0) {
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
} else {
|
||||
await getEngPage();
|
||||
onSearch(records.value[0]);
|
||||
}
|
||||
},
|
||||
{
|
||||
deep: true
|
||||
}
|
||||
);
|
||||
onMounted(async () => {
|
||||
getVideoData();
|
||||
await getProPage();
|
||||
onSearch(records.value[0]);
|
||||
searchSn.value = (records.value as ResAiProjectPage[])[0].projectSn;
|
||||
searchName.value = (records.value as ResAiProjectPage[])[0].projectName;
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "./index.scss";
|
||||
</style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user