flx:工作票新增风险状态

This commit is contained in:
Rain_ 2025-11-12 18:26:48 +08:00
parent dd0c419883
commit a822502927
4 changed files with 2007 additions and 1841 deletions

View File

@ -4695,6 +4695,12 @@ const routes2 = [{
component: (resolve) =>
require(["@/views/companyAdmin/companyBigScreen/aIEarlyWarn/index.vue"], resolve),
},
{
path: "/companyAdmin/highRiskOperation",
name: "highRiskOperation",
component: (resolve) =>
require(["@/views/companyAdmin/companyBigScreen/highRiskOperation/index.vue"], resolve),
},
{
path: "/companyAdmin/videoSurveillance",
name: "videoSurveillance",

View File

@ -8,7 +8,7 @@
src="@/assets/images/companyBigScreen/card-edit-icon.png"
alt="icon"
/>
{{customInfo.name || '智慧工地企业版数据大屏'}}
{{ customInfo.name || "智慧工地企业版数据大屏" }}
</div>
<div
class="left-text_image"
@ -28,6 +28,12 @@
>
AI预警
</div>
<div
class="left-text_image"
@click="onRouterLink('/companyAdmin/highRiskOperation')"
>
高风险作业
</div>
</div>
<!-- <div class="nav-list">
<div class="nav-item" :class="{ 'nav-active': pageIndex == 1 }" @click="changeNav(1)">集团中心</div>
@ -56,7 +62,7 @@ import moment from "moment";
import HeaderDialog from "./headerDialog.vue";
import { getWeatherLiveData } from "@/assets/js/api/environmentManage";
import { getQueryBySnCompanyInfo } from "@/assets/js/api/companyBigScreen";
import { queryCustomConfig } from '@/assets/js/api/common'
import { queryCustomConfig } from "@/assets/js/api/common";
export default {
naem: "headers",
components: { HeaderDialog },
@ -91,12 +97,14 @@ export default {
projectSn: this.$store.state.userInfo.sn,
});
console.log(res);
this.isEdit = res.result?.id ? true : false
this.isEdit = res.result?.id ? true : false;
if (res.result) {
const { data: curIsCustom } = JSON.parse(res.result.configValue || '{}');
console.log(112333, curIsCustom)
this.customInfo = curIsCustom
this.customData = res.result
const { data: curIsCustom } = JSON.parse(
res.result.configValue || "{}"
);
console.log(112333, curIsCustom);
this.customInfo = curIsCustom;
this.customData = res.result;
}
},
getDeviceConfig() {
@ -104,7 +112,9 @@ export default {
this.getCustomConfig();
},
handleEdit() {
this.$refs.headerDialogRef.showModal(this.isEdit ? this.customData : null)
this.$refs.headerDialogRef.showModal(
this.isEdit ? this.customData : null
);
},
async getCompanyInfoData() {
const res = await getQueryBySnCompanyInfo({

View File

@ -0,0 +1,38 @@
<template>
<div class="bigScreen-wrap">
<NewHeader
@refresh="onRefresh"
:title="'甘肃华润新能源智慧电站'"
></NewHeader>
<!-- <HomeworkControlProcess ref="homeworkRef"></HomeworkControlProcess> -->
</div>
</template>
<script setup>
import { ref, onMounted } from "vue";
import NewHeader from "@/views/companyAdmin/companyBigScreen/components/newHeader.vue";
// import HomeworkControlProcess from "./homeworkControlProcess.vue";
const homeworkRef = ref(null);
const onRefresh = () => {
console.log("刷新");
homeworkRef.value.onRefresh();
};
//
onMounted(() => {});
</script>
<style lang="less" scoped>
.bigScreen-wrap {
width: 100%;
height: 100%;
min-width: 1680px;
// min-height: 1080px;
position: relative;
color: #fff;
// background: #0a141c;
background: url("~@/assets/images/companyBigScreen/big-screen-bg.png")
center no-repeat;
background-size: 100% 100%;
overflow: hidden;
}
</style>

View File

@ -296,6 +296,13 @@
v-if="scope.row.status == 3"
>继续作业</el-button
>
<el-button
type="text"
@click="onStateShow(3, scope.row.id)"
icon="el-icon-video-play"
v-if="scope.row.status == 4"
>重新开始</el-button
>
<el-button
@click="onExamineClick(scope.row)"
type="text"
@ -451,6 +458,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="风险级别" prop="riskType">
<el-radio-group v-model="workTicketForm.riskType">
<el-radio :label="1">一般风险</el-radio>
<el-radio :label="2">高风险</el-radio>
</el-radio-group>
</el-form-item>
<!-- 敦煌升级 -->
<!-- <el-form-item label="班组" prop="teamIds">
<el-select
@ -869,6 +882,15 @@
>
{{ statusUp(workTicketDetail.status) }}
</div>
<div
class="status-box"
:class="{
ybfx_active: workTicketDetail.riskType == 1,
gfx_active: workTicketDetail.riskType == 2,
}"
>
{{workTicketDetail.riskType == 2 ? '高风险' : '一般风险'}}
</div>
</div>
<div>
<div
@ -892,6 +914,13 @@
>
继续作业
</div>
<div
@click="onStateShow(3, workTicketDetail.id)"
class="bg-3e"
v-if="workTicketDetail.status == 4"
>
重新开始
</div>
<div
@click="onStateShow(4, workTicketDetail.id)"
class="bg-ed"
@ -988,8 +1017,16 @@
:controls="true"
/> -->
<IscPlayer
v-if="videoConfig.enableNotPlugin"
:devList="videoItemList"
></IscPlayer>
<div v-else class="fullHeight videoOverview" :id="`videoOverview${workTicketDetail.id}`">
<IscPlugin
:devList="videoItemList"
:itemId="workTicketDetail.id"
:type="'1x1'"
></IscPlugin>
</div>
</div>
<!-- videoItemInfo.videoInfo.url -->
@ -1258,15 +1295,18 @@ import {
getPoliceCameraItemListApi,
} from "@/assets/js/api/bodyWornCamera";
import { getTeamInfoList } from "@/assets/js/api/laborPerson.js";
import { projectVideoConfigListApi } from "@/assets/js/api/equipmentCenter/cameraList";
import dayjs from "dayjs";
import duration from "dayjs/plugin/duration";
import { isJSON } from "@/util/nowDate";
import HlsPlayer from "./components/HlsPlayer.vue";
import IscPlayer from "./components/iscPlayer.vue";
import IscPlugin from "@/views/companyAdmin/companyBigScreen/terminalOperation/components/isc_plugin.vue";
export default {
components: {
HlsPlayer,
IscPlayer,
IscPlugin,
},
data() {
return {
@ -1292,6 +1332,7 @@ export default {
workTicketAttachment: [],
otherAttachment: [],
safetyRiskAnalysis: [],
riskType: 1,
},
workTicketRules: {
typeId: [
@ -1330,20 +1371,27 @@ export default {
// trigger: "change",
// },
// ],
// applicants: [
// {
// required: true,
// message: "",
// trigger: "change",
// },
// ],
// constructionAddr: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
applicants: [
{
required: true,
message: "请选择申请单位",
trigger: "change",
},
],
constructionAddr: [
{
required: true,
message: "请输入施工地点",
trigger: "blur",
},
],
riskType: [
{
required: true,
message: "请选择风险级别",
trigger: "change",
},
],
},
//
queryParams: {
@ -1409,6 +1457,9 @@ export default {
itemId: "",
videoItemInfo: {},
videoItemList: [],
videoConfig: {
enableNotPlugin: 1,
},
};
},
created() {
@ -1423,8 +1474,23 @@ export default {
this.getWorkTicketCountWorkTicket();
this.getPoliceCameraItemList();
this.getQueryBindRegions();
this.getProjectVideoConfigList();
},
methods: {
//
getProjectVideoConfigList() {
projectVideoConfigListApi({
projectSn: this.projectSn,
}).then((res) => {
if (res.code == 200) {
if (res.result) {
this.videoConfig = res.result;
} else {
this.videoConfig.enableNotPlugin = 1;
}
}
});
},
//
onViewrePlayClick(row) {
this.viewreplayTitle = `${row.no}次作业回放`;
@ -1481,17 +1547,21 @@ export default {
...res.result,
workTicketAttachment:
isJSON(res.result.workTicketAttachment) &&
JSON.parse(res.result.workTicketAttachment) instanceof Array
JSON.parse(
res.result.workTicketAttachment
) instanceof Array
? JSON.parse(res.result.workTicketAttachment)
: [],
safetyRiskAnalysis:
isJSON(res.result.safetyRiskAnalysis) &&
JSON.parse(res.result.safetyRiskAnalysis) instanceof Array
JSON.parse(res.result.safetyRiskAnalysis) instanceof
Array
? JSON.parse(res.result.safetyRiskAnalysis)
: [],
otherAttachment:
isJSON(res.result.otherAttachment) &&
JSON.parse(res.result.otherAttachment) instanceof Array
JSON.parse(res.result.otherAttachment) instanceof
Array
? JSON.parse(res.result.otherAttachment)
: [],
};
@ -1500,7 +1570,12 @@ export default {
res.result.itemList.length > 0
) {
this.itemId = res.result.itemList[0].itemId;
this.videoItemList = [res.result.itemList[0]];
this.videoItemList = [
{
...res.result.itemList[0],
status: this.workTicketDetail.status,
},
];
console.log(111222, this.videoItemList);
// this.getVideoItemInfoPoliceCameraItem();
} else {
@ -1547,7 +1622,9 @@ export default {
},
//
onDelete(row) {
const findIndex = this.selectList.findIndex((item) => item == row.itemId);
const findIndex = this.selectList.findIndex(
(item) => item == row.itemId
);
if (findIndex > -1) {
this.selectList.splice(findIndex, 1);
}
@ -1612,7 +1689,8 @@ export default {
return {
...item,
bindChecked:
this.selectList.includes(item.itemId) || item.bindTicket == 1
this.selectList.includes(item.itemId) ||
item.bindTicket == 1
? true
: false,
};
@ -1653,11 +1731,15 @@ export default {
};
this.workTicketForm[obj[type]].push({
name: file.name,
url: this.$store.state.FILEURL + file.response.data[0].imageUrl,
url:
this.$store.state.FILEURL +
file.response.data[0].imageUrl,
newUrl: file.response.data[0].imageUrl,
});
if (type == 1) {
this.$refs.workTicketForm.clearValidate("workTicketAttachment");
this.$refs.workTicketForm.clearValidate(
"workTicketAttachment"
);
}
}
},
@ -1711,9 +1793,15 @@ export default {
if (isExpandAll == null) {
this.$refs.multipleTable.toggleRowSelection(item, true);
} else {
this.$refs.multipleTable.toggleRowExpansion(item, isExpandAll);
this.$refs.multipleTable.toggleRowExpansion(
item,
isExpandAll
);
}
if (item.children instanceof Array && item.children.length > 0) {
if (
item.children instanceof Array &&
item.children.length > 0
) {
this.toggleSelectionAll(item.children, isExpandAll);
}
});
@ -1746,17 +1834,20 @@ export default {
...item,
workTicketAttachment:
isJSON(item.workTicketAttachment) &&
JSON.parse(item.workTicketAttachment) instanceof Array
JSON.parse(item.workTicketAttachment) instanceof
Array
? JSON.parse(item.workTicketAttachment)
: [],
safetyRiskAnalysis:
isJSON(item.safetyRiskAnalysis) &&
JSON.parse(item.safetyRiskAnalysis) instanceof Array
JSON.parse(item.safetyRiskAnalysis) instanceof
Array
? JSON.parse(item.safetyRiskAnalysis)
: [],
otherAttachment:
isJSON(item.otherAttachment) &&
JSON.parse(item.otherAttachment) instanceof Array
JSON.parse(item.otherAttachment) instanceof
Array
? JSON.parse(item.otherAttachment)
: [],
};
@ -1826,6 +1917,7 @@ export default {
? this.queryBindRegionList.map((item) => item.id)
: [],
constructionAddr: "",
riskType: 1,
applicants: this.$store.state.userInfo.enterpriseId
? [this.$store.state.userInfo.enterpriseId]
: [],
@ -1864,13 +1956,15 @@ export default {
newUrl: item.url,
};
}),
workTicketAttachment: row.workTicketAttachment.map((item) => {
workTicketAttachment: row.workTicketAttachment.map(
(item) => {
return {
name: item.name,
url: this.$store.state.FILEURL + item.url,
newUrl: item.url,
};
}),
}
),
safetyRiskAnalysis: row.safetyRiskAnalysis.map((item) => {
return {
name: item.name,
@ -1930,14 +2024,13 @@ export default {
},
//---
submit() {
const workTicketAttachment = this.workTicketForm.workTicketAttachment.map(
(item) => {
const workTicketAttachment =
this.workTicketForm.workTicketAttachment.map((item) => {
return {
name: item.name,
url: item.newUrl,
};
}
);
});
const otherAttachment = this.workTicketForm.otherAttachment.map(
(item) => {
return {
@ -1946,14 +2039,13 @@ export default {
};
}
);
const safetyRiskAnalysis = this.workTicketForm.safetyRiskAnalysis.map(
(item) => {
const safetyRiskAnalysis =
this.workTicketForm.safetyRiskAnalysis.map((item) => {
return {
name: item.name,
url: item.newUrl,
};
}
);
});
const data = {
...this.workTicketForm,
constructionTimeBegin:
@ -1964,20 +2056,26 @@ export default {
this.workTicketForm.constructionTime.length > 1
? this.workTicketForm.constructionTime[1]
: "",
constructionAreas: this.workTicketForm.constructionAreas.join(","),
constructionAreas:
this.workTicketForm.constructionAreas.join(","),
workTicketAttachment: JSON.stringify(workTicketAttachment),
otherAttachment: JSON.stringify(otherAttachment),
safetyRiskAnalysis: JSON.stringify(safetyRiskAnalysis),
projectSn: this.projectSn,
policeCameraIds: this.selectList.join(","),
applicants: this.workTicketForm.applicants.join(","),
teamIds: this.workTicketForm.teamIds.join(","),
teamIds:
this.workTicketForm.teamIds instanceof Array
? this.workTicketForm.teamIds.join(",")
: "",
};
if (this.workTicketType == 2) {
addWorkTicketApi(data).then((res) => {
// console.log(res);
if (res.code == 200) {
this.$message.success(this.$t("message.quality.newSuccess"));
this.$message.success(
this.$t("message.quality.newSuccess")
);
// this.workTicketDialog = false;
this.workTicketId = res.result.id;
this.stepActive = 2;
@ -2016,7 +2114,10 @@ export default {
if (res.code == 200) {
this.$message({
type: "success",
message: this.$t("message.quality.successfullyDelete") + "!",
message:
this.$t(
"message.quality.successfullyDelete"
) + "!",
});
this.getWorkTicketList();
this.getWorkTicketCountWorkTicket();
@ -2096,7 +2197,8 @@ export default {
if (!res.result || res.result.length == 0) {
this.workTicketBindCamera = 0;
} else {
let workTicketBindCamera = res.result[0].workTicketBindCamera;
let workTicketBindCamera =
res.result[0].workTicketBindCamera;
this.workTicketBindCamera = workTicketBindCamera;
}
});
@ -2155,7 +2257,9 @@ export default {
itemListDevNameUp() {
return (row) => {
return row.itemList
? row.itemList.map((item) => item && item.devName).join("、")
? row.itemList
.map((item) => item && item.devName)
.join("、")
: "--";
};
},
@ -2865,6 +2969,14 @@ export default {
background-color: #88cf65;
color: #1a1a1a;
}
.ybfx_active {
background-color: #88cf65;
color: #ffffff;
}
.gfx_active {
background-color: #ff0000;
color: #ffffff;
}
.checkPoint {
/deep/ .el-form-item {
margin-bottom: 20px;