fix: BUG修改

This commit is contained in:
kun 2024-03-07 19:04:39 +08:00
parent 828ddce748
commit 639fa42153
8 changed files with 186 additions and 36 deletions

View File

@ -70,4 +70,8 @@ export const getWorkTicketDetail = (params: {}) => {
export const getRiskList = (params: {}) => {
return http.get(BASEURL + `/xmgl/rtRiskInventoryType/tree/page`, params);
};
//风险清册编辑
export const riskDataEdit = (params: {}) => {
return http.post(BASEURL + `/xmgl/rtRiskInventoryType/edit`, params);
};

View File

@ -10,7 +10,7 @@
<div class="href-content" v-if="activeTab == 0">
<el-carousel indicator-position="none" height="450px">
<el-carousel-item v-for="(item, index) in videoList" :key="item.id">
<div style="width: 100%;height: 100%;">
<div style="width: 100%; height: 100%">
<ckplayerComp
:name="index"
:poster="''"
@ -49,13 +49,12 @@ const getVideoList = async () => {
// 使
setTimeout(() => {
// video
var videos = document.getElementsByTagName('video');
var videos = document.getElementsByTagName("video");
// video
for (var i = 0; i < videos.length; i++) {
//
videos[i].style.width = '99.9%';
videos[i].style.height = '99.9%';
videos[i].style.width = "99.9%";
videos[i].style.height = "99.9%";
}
}, 1000);
};
@ -76,6 +75,24 @@ const changeActive = (activeIndex: any) => {
// }
// );
onMounted(() => {
//
// window.addEventListener("message", (event:any) => {
// console.log(event)
// },false);
window.addEventListener(
"message",
async event => {
console.log(event)
const { type, data } = event.data;
//
if (type === "modelClick") {
console.log(data);
emits("openDialog",{...data,title:'风险提示'})
}
},
false
);
getVideoList();
});
</script>

View File

@ -7,8 +7,11 @@
<i>{{ postData.title || '' }}</i>
</div>
</div>
<div class="political-outlook">
<!-- <div class="political-outlook" v-if="!postData.projectSn">
<memberMoreList ref="historyList" :dataObj="postData"></memberMoreList>
</div> -->
<div class="political-outlook">
<riskTipDialog ref="riskTipDialog" :dataObj="postData"></riskTipDialog>
</div>
<div class="close-icon" @click="showDialog = false">
<el-icon><Close /></el-icon>
@ -20,6 +23,7 @@
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import memberMoreList from "./member-more-list.vue";
import riskTipDialog from "./risk-tip-dialog.vue";
import { GlobalStore } from "@/stores";
let showDialog = ref(false as any);
const postData = ref({} as any);

View File

@ -7,7 +7,7 @@
<div class="leftBottom"><LeftBottom /></div>
</div>
<div class="center">
<div class="centerTop"><CenterTop/></div>
<div class="centerTop" @openDialog="openPeopleCountDialog"><CenterTop/></div>
<div class="centerBottom"><CenterBottom /></div>
</div>
<div class="right">

View File

@ -53,14 +53,16 @@ onMounted(() => {
<style lang="scss" scoped>
.box {
width: 100%;
// width: 100%;
height: 100%;
margin-left: 20px;
display: flex;
flex-direction: column;
justify-content: space-around;
>div{
display: flex;
align-items: center;
font-size: 18px;
margin-top: 8px;
>span:nth-child(1){
display: inline-block;
width: 100px;

View File

@ -41,13 +41,26 @@
<el-option v-for="(item, index) in onlineWorkList" :key="index" :label="item.name" :value="item.value" />
</el-select>
</div>
<div class="search-item" v-if="props.dataObj.memberType">
<span>在场状态</span>
<el-select
class="m-2"
placeholder="请选择"
size="small"
v-model="searchForm.presence"
:clearable="true"
style="width: 150px"
>
<el-option v-for="(item, index) in presenceWorkList" :key="index" :label="item.name" :value="item.value" />
</el-select>
</div>
<div class="search-item">
<span>姓名</span>
<el-input placeholder="请输入" v-model="searchForm.name" :clearable="true" style="width: 150px" />
<el-input placeholder="请输入" size="small" v-model="searchForm.name" :clearable="true" style="width: 150px" />
</div>
<div class="search-item">
<span>身份证号</span>
<el-input placeholder="请输入" v-model="searchForm.idCard" :clearable="true" style="width: 180px" />
<el-input placeholder="请输入" size="small" v-model="searchForm.idCard" :clearable="true" style="width: 180px" />
</div>
<el-button @click="getMemberCountList('search')">查询</el-button>
</div>
@ -83,7 +96,7 @@
<div>{{item.personType == 1?item.teamName:item.personType == 2?item.departmentName:''}}</div>
<div>{{item.enterDate}}</div>
<div>{{onlineWorkList[item.inserviceType - 1].name}}</div>
<div style="width: 10%">{{item.presence===1?'在场':'离场'}}</div>
<div style="width: 10%">{{presenceWorkList[item.presence - 1].name}}</div>
<div style="width: 20%">{{item.idCard}}</div>
<div>{{memberTypeList[item.personType - 1].name}}</div>
<div style="width: 25%;">{{item.enterpriseName}}</div>
@ -104,6 +117,10 @@ import { getCompanyDataList, getMemberInfoList } from "@/api/modules/labor";
const store = GlobalStore();
const props = defineProps(["dataObj"]);
const BASEURL = import.meta.env.VITE_API_URL;
const presenceWorkList = ref([
{ name: "在场", value: 1 },
{ name: "离场", value: 2 }
])
const onlineWorkList = ref([
{ name: "在职", value: 1 },
{ name: "离职", value: 2 }
@ -114,7 +131,6 @@ const memberTypeList = ref([
{ name: "管理人员", value: 2 },
{ name: "临时人员", value: 3 }
]);
const alarmTypeList = ref(["报警", "预警"]);
let pageNo = ref(1 as any);
let moreScroll = ref(true as any);
const refScrollbar = ref(null as any); //
@ -123,6 +139,7 @@ const searchForm = ref({
memberType: '',
belongCompany: '',
workState: '',
presence: '',
name: '',
idCard: ''
});
@ -147,14 +164,15 @@ const getMemberCountList = async (tip:any) => {
personType: searchForm.value.memberType?searchForm.value.memberType:props.dataObj.memberType, //
enterpriseId: searchForm.value.belongCompany, //
inserviceType: searchForm.value.workState?searchForm.value.workState:props.dataObj.inserviceType, //
presence: searchForm.value.presence?searchForm.value.presence:props.dataObj.presence, //
idCard: searchForm.value.idCard, //
workerName: searchForm.value.name, //
pageNo: tip == 'search'?1:pageNo.value,
pageSize: 100
}
if(props.dataObj.presence){
requestData.presence = props.dataObj.presence;
}
// if(props.dataObj.presence){
// requestData.presence = props.dataObj.presence;
// }
const res: any = await getMemberInfoList(requestData);
console.log("获取人员信息列表", res);
if(tip == 'more'){

View File

@ -0,0 +1,86 @@
<template>
<div class="political-outlook">
<div class="content">
<div class="tab-select">
<span :class="activeTab == 0 ? 'active-span' : ''" @click="changeActive(0)">危险点辨识</span>
<span :class="activeTab == 1 ? 'active-span' : ''" @click="changeActive(1)">风险控制措施</span>
<span :class="activeTab == 2 ? 'active-span' : ''" @click="changeActive(2)">施工要点</span>
</div>
<div class="text-content">
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref, onMounted } from "vue";
import { GlobalStore } from "@/stores";
import { getCompanyDataList } from "@/api/modules/labor";
const store = GlobalStore();
const props = defineProps(["dataObj"]);
const activeTab = ref(0);
const changeActive = (activeIndex: any) => {
activeTab.value = activeIndex;
};
//
const getCompanyList = async () => {
let data = {
projectSn: store.sn,
enterpriseName: "",
userEnterpriseId: store.userInfo?.userEnterpriseId
};
const res: any = await getCompanyDataList(data);
if (res.code == 200) {
}
};
onMounted(async () => {
await getCompanyList();
});
</script>
<style lang="scss" scoped>
@mixin flex {
display: flex;
align-items: center;
}
.political-outlook {
width: 100%;
height: 97%;
.content {
height: 95%;
width: 100%;
margin-top: 10px;
// background: url("@/assets/images/cardImg.png") no-repeat;
background-size: 100% 100%;
.tab-select {
width: 35%;
height: 30px;
margin: 0 auto;
margin-top: 20px;
display: flex;
align-items: center;
justify-content: space-between;
span {
cursor: pointer;
color: #7c859c;
font-size: 15px;
transition: all 0.5s;
}
.active-span {
color: #fff;
font-size: 18px;
}
}
.text-content{
color: #fff;
height: 500px;
overflow-y: scroll;
text-indent: 2em;
margin-top: 20px;
line-height: 25px;
letter-spacing: 0.3em;
}
}
}
</style>

View File

@ -5,19 +5,19 @@
<div class="today-warning-list">
<div class="list-content">
<div class="tab-list">
<div style="width: 20%;">序号</div>
<div style="width: 20%;">工序</div>
<div style="width: 45%;">风险可能导致的后果</div>
<div style="width: 15%;">风险等级</div>
<!-- <div>告警时间</div> -->
<div style="width: 10%">序号</div>
<div>工序</div>
<div style="width: 40%">风险可能导致的后果</div>
<div style="width: 15%">风险等级</div>
<div style="width: 15%">是否已销号</div>
</div>
<el-scrollbar class="list-box" ref="refScrollbar">
<div v-for="(item, index) in alarmList" class="list-style" :key="index">
<div style="width: 20%;">{{ index + 1 }}</div>
<div style="width: 20%;" :title="item.processName">{{item.processName}}</div>
<div style="width: 45%;" :title="item.riskPossibleConsequence">{{item.riskPossibleConsequence}}</div>
<div style="width: 15%;">{{item.riskLevel}}</div>
<!-- <div>{{ item.createTime }}</div> -->
<div style="width: 10%">{{ index + 1 }}</div>
<div :title="item.processName">{{ item.processName }}</div>
<div style="width: 40%" :title="item.riskPossibleConsequence">{{ item.riskPossibleConsequence }}</div>
<div style="width: 15%">{{ item.riskLevel }}</div>
<div style="width: 15%"><el-checkbox v-model="item.accountState" :true-value="2" :false-value="1" :true-label="2" :false-label="1" @change="stateEdit(item)"/></div>
</div>
<div class="not-data" v-if="false">
<img src="@/assets/images/noData.png" />
@ -46,7 +46,8 @@
import Card from "@/components/card.vue";
import { ref, onMounted, computed } from "vue";
import { GlobalStore } from "@/stores";
import { getRiskList } from "@/api/modules/headNoise";
import { getRiskList, riskDataEdit } from "@/api/modules/headNoise";
import { ElMessage } from "element-plus";
let pageNo = ref(1 as any);
let moreScroll = ref(true as any);
@ -66,10 +67,25 @@ function handleClick(event: any) {
//
let alarmList = ref([] as any);
let detailData = ref({} as any);
//
const stateEdit = async (obj:any) => {
let data: any = {
...obj
};
const res: any = await riskDataEdit(data);
if (res.success) {
ElMessage({
showClose: true,
message: "操作成功",
type: "success"
});
await getAlarmListInfo("search");
}
}
const getAlarmListInfo = async (tip: any) => {
let data: any = {
projectSn: store.sn,
pageNo: tip == 'search'?1:pageNo.value,
pageNo: tip == "search" ? 1 : pageNo.value,
pageSize: 20
};
const res: any = await getRiskList(data);
@ -98,7 +114,7 @@ function closeDialog() {
}
onMounted(async () => {
await getAlarmListInfo('search');
await getAlarmListInfo("search");
refScrollbar.value.wrapRef.addEventListener("scroll", (e: any) => {
// console.log("", e);
const scrollTop = e.target.scrollTop;
@ -153,7 +169,7 @@ onMounted(async () => {
justify-content: center;
align-items: center;
text-align: center;
width: 25%;
width: 20%;
}
}
.list-box {
@ -185,7 +201,7 @@ onMounted(async () => {
}
div {
text-align: center;
width: 25%;
width: 20%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
@ -275,5 +291,8 @@ onMounted(async () => {
.h-card .content {
height: 87% !important;
}
.el-checkbox__inner {
background-color: transparent;
}
}
</style>