Merge branch 'main' into dev-sy-12-23

This commit is contained in:
BianLzhaoMin 2024-12-23 13:53:14 +08:00
commit 760abfd218
5 changed files with 200 additions and 29 deletions

View File

@ -167,7 +167,7 @@
<span>{{ item.description }}</span>
</el-col>
</el-row>
<div class="label" style="padding: 10px 0">参考图片/样式</div>
<!-- <div class="label" style="padding: 10px 0">参考图片/样式</div>
<el-row>
<el-col :span="12" v-for="img in item.fileInfoList" :key="img.id">
<el-image
@ -183,7 +183,7 @@
:preview-teleported="true"
/>
</el-col>
</el-row>
</el-row> -->
</div>
</div>

View File

@ -138,6 +138,7 @@
type="primary"
class="primary-lease"
icon="ChatDotRound"
@click="onChat"
>在线聊</el-button
>
</div>
@ -213,14 +214,13 @@
</div>
</el-col>
</el-row>
<el-row>
<!-- <el-row>
<el-col :span="2">
<div>检测证明</div>
</el-col>
<el-col :span="22">
<div class="prove-container">
<div v-for="item in pageData.examinationPdf" :key="item.id">
<!-- <img :src="item.fileUrl" alt="" /> -->
<el-image
style="width: 100%; height: 100%"
:src="item.fileUrl"
@ -236,7 +236,7 @@
</div>
</div>
</el-col>
</el-row>
</el-row> -->
</div>
</div>
<div class="appearance">
@ -250,6 +250,18 @@
<el-table-column align="center" type="index" label="序号" width="80" />
<el-table-column align="center" prop="qcTime" label="检测日期" />
<el-table-column align="center" prop="maintenanceAlarmDay" label="有效期" />
<el-table-column align="center" prop="fileInfo" label="检测证明" >
<template #default="row">
<a
v-if="row.row.fileInfo && row.row.fileInfo.fileUrl"
:href="row.row.fileInfo.fileUrl"
target="_blank"
style="color: #00a288; text-decoration: underline"
>查看</a
>
<span v-else>无检测证明</span>
</template>
</el-table-column>
<el-table-column align="center" prop="comName" label="检测单位" />
</el-table>
</div>
@ -435,6 +447,47 @@
</span>
</template>
</el-dialog>
<!-- 在线聊 -->
<el-dialog
title="在线聊"
v-model="dialogChatVisible"
width="80%"
:before-close="handleClose"
>
<div class="chat-container" style="height: 700px; display: flex;">
<div class="contact-list" style="width: 20%; height: 100%;">
<div class="contact-list-header">聊天列表</div>
<el-menu default-active="1" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
<el-menu-item v-for="(contact, index) in contacts" :key="index" :index="index.toString()">
<el-avatar :src="contact.avatar" />
{{ contact.name }}
<el-badge :value="contact.unreadCount" class="custom-badge" v-if="contact.unreadCount > 0"></el-badge>
</el-menu-item>
<!-- 其他联系人 -->
</el-menu>
</div>
<div class="chat-content" style="width: 70%; height: 100%; display: flex; flex-direction: column;">
<!-- 聊天内容框占右侧高度的80% -->
<div class="message-box" style="flex: 8; overflow-y: auto;">
<!-- 聊天消息 -->
<div class="chat-content-header" style="text-align: left;">{{ "聊天人" }}</div>
<div class="message" v-for="message in messages" :key="message.id">
<el-avatar :src="message.avatar" />
<div class="message-text">{{ message.text }}</div>
</div>
</div>
<!-- 发送消息的输入框占右侧高度的20% -->
<div class="input-box" style="flex: 1;display: flex;">
<el-input
v-model="newMessage"
class="chat-input"
></el-input>
<el-button type="primary" @click="sendMessage">发送</el-button>
</div>
</div>
</div>
</el-dialog>
</div>
</template>
<script lang="ts" setup>
@ -980,6 +1033,16 @@ const submit = async (Ref) => {
})
}
const dialogVisibles = ref(false)
const imgIndex = ref(0)
const dialogImageUrls = ref([])
//
const picturesPreview = (row:any) => {
dialogImageUrls.value = []
// window.open(url)
}
// const init = async () => {
// await gethotList()
// await getData()
@ -1022,6 +1085,41 @@ const onAddCart = async () => {
})
.catch(() => {})
}
const contacts = ref([
{
name: '张三',
phone: '12345678901',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
unreadCount: 2,
},
{
name: '李四',
phone: '12345678902',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
unreadCount: 1,
},
{
name: '王五',
phone: '12345678903',
avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png',
unreadCount: 0,
},
])
const unreadCount = ref(1)
const messages = ref([
{ id: 1, avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', text: '你好,欢迎来到在线聊!' },
//
],)
const dialogChatVisible = ref(false)
const onChat = () => {
dialogChatVisible.value = true
}
onMounted(() => {
// getUnreadCount()
})
</script>
<style scoped lang="scss">
:deep(.dialoglease) {
@ -1469,4 +1567,54 @@ const onAddCart = async () => {
}
}
}
.chat-container {
display: flex;
}
.contact-list {
width: 200px;
/* border-right: 1px solid #ccc; */
}
.chat-content {
flex: 1;
padding: 10px;
overflow-y: auto;
background-color: #f8f8f8;
}
.message {
display: flex;
align-items: center;
margin-bottom: 10px;
}
.message-text {
margin-left: 10px;
}
.chat-input {
width: 100%;
}
.custom-badge {
position: absolute;
top: 0;
right: 0;
transform: translate(50%, -50%);
margin-right: 10px;
}
.contact-list-header {
font-size: 18px;
font-weight: bold;
text-align: left;
padding: 10px;
border-bottom: 1px solid #e5e5e5;
}
.chat-content-header {
font-size: 18px;
font-weight: bold;
text-align: center;
padding: 10px;
background-color: #f8f8f8;
border-bottom: 1px solid #e5e5e5;
}
</style>

View File

@ -343,6 +343,7 @@ const getDetailData = async (row: any) => {
equipTableList.value = []
}
}
console.log('tt23123', equipTableList.value)
// addAndEditForm.deviceTypeList[0].data.propertyNames.forEach((item:any) =>{
// options.value.push({'label':item,'value':item})
// })
@ -1206,6 +1207,7 @@ const viewCertificate = (url:string) => {
window.open(url, '_blank');
};
const changeDate = (row:any,index:number) => {
console.log('3333',row)
const currentDate = new Date(row.checkDate);
console.log('1111',currentDate)
console.log('2222',warningDays.value)
@ -1781,7 +1783,10 @@ const changeDate = (row:any,index:number) => {
</el-form-item>
</el-col>
</el-row>
<TitleTip :titleText="`装备证书`" />
<div style="display: flex;align-items: center;">
<TitleTip :titleText="`装备证书`" />
<el-button size="mini" type="primary" @click="handleAddBack" style="margin-left: 20px;margin-top: 20px" :disabled="!addAndEditForm.deviceTypeList" v-if="settleinTitle=='新增装备'">添加</el-button>
</div>
<!-- <el-row :gutter="20" v-if="!isEditForm && !isViewForm">
<el-col :span="24">
<el-button class="primary-lease" type="primary" @click="onAddDescription">
@ -2122,10 +2127,9 @@ const changeDate = (row:any,index:number) => {
height: 40px;
display: flex;
align-items: center;
justify-content: space-between;
justify-content: center;
"
>
<el-button size="mini" type="primary" @click="handleAddBack">添加</el-button>
<el-button size="mini" type="danger" @click="handleDeleteBack($index)" v-show="$index!=0">删除</el-button>
</div>
</template>

View File

@ -72,7 +72,7 @@
<el-form-item>
<el-button @click="onSearch" type="primary" class="primary-lease">查询</el-button>
<el-button @click="onReset" type="primary" class="primary-lease">重置</el-button>
<el-button
<!-- <el-button
@click="
() => {
isRepublish = true
@ -84,7 +84,7 @@
class="primary-lease"
>
新建
</el-button>
</el-button> -->
</el-form-item>
</el-form>
@ -105,8 +105,17 @@
<el-table-column align="center" prop="createBy" label="创建人" width="120" />
<el-table-column align="center" prop="createTime" label="上传时间" />
<el-table-column align="center" prop="updateTime" label="更新时间" />
<el-table-column align="center" label="操作" :width="220">
<el-table-column align="center" label="操作" :width="280">
<template #default="{ row }">
<el-button
size="small"
type="primary"
class="primary-lease"
@click="onAddQualityRecord(row)"
>
新建
</el-button>
<el-button
size="small"
type="primary"
@ -170,7 +179,7 @@
:model="addOrEditForm"
:rules="addOrEditFormRules"
>
<el-row :gutter="20">
<!-- <el-row :gutter="20">
<el-col :span="24">
<el-form-item label="关联装备" style="width: 100%" prop="maId">
<el-select
@ -190,7 +199,7 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-row> -->
<!-- <el-row :gutter="20">
<el-col :span="24">
<el-form-item label="质检名称" prop="qcName">
@ -606,7 +615,7 @@ const onSubmit = () => {
//
const onViewQualityRecord = (row: any) => {
qualityDetails.value = row
searchParamsInDialog.id = row.id
searchParamsInDialog.maId = row.maId
getLeaseListDataInDialog()
dialogTitle.value = '质检记录'
addOrEditDialogVisible.value = true
@ -625,6 +634,28 @@ const getLeaseListDataInDialog = async () => {
totalInDialog.value = res.total
}
//
const onAddQualityRecord = (row: any) => {
isRepublish.value = true
dialogTitle.value = '质检新增'
addOrEditDialogVisible.value = true
addOrEditForm.value.qcTime = ''
addOrEditForm.value.nextCheckTime = ''
addOrEditForm.value.maId = row.maId
warningDays.value = row.maintenanceAlarmDay
// const onChange = (value: any) => {
// addOrEditForm.value.qcTime = ''
// addOrEditForm.value.nextCheckTime = ''
// associationList.value.forEach((e: any) => {
// if (e.maId === value) {
// console.log('11111111',e.maintenanceAlarmDay)
// warningDays.value = Number(e.maintenanceAlarmDay)
// }
// })
// }
}
//
const onFileChange = (fileList: any) => {
addOrEditForm.value.fileInfoTempList = []
@ -639,18 +670,6 @@ const onFileChange = (fileList: any) => {
}
const warningDays: any = ref(0)
const onChange = (value: any) => {
console.log('11111',value)
addOrEditForm.value.qcTime = ''
addOrEditForm.value.nextCheckTime = ''
console.log('11111111',associationList)
associationList.value.forEach((e: any) => {
if (e.maId === value) {
console.log('11111111',e.maintenanceAlarmDay)
warningDays.value = Number(e.maintenanceAlarmDay)
}
})
}
const onQcChange = (value: any) => {
const currentDate = new Date(value);
currentDate.setDate(currentDate.getDate() + warningDays.value);

View File

@ -290,8 +290,8 @@
color: '#fff',
}"
>
<el-table-column prop="fileName" align="center" label="文件名称" />
<el-table-column align="center" label="文件" width="120">
<!-- <el-table-column prop="fileName" align="center" label="文件名称" /> -->
<el-table-column align="center" label="文件" >
<template #default="{ row }">
<el-image
style="width: 60px; height: 60px"
@ -307,7 +307,7 @@
/>
</template>
</el-table-column>
<el-table-column align="center" label="文件" width="120">
<el-table-column align="center" label="操作" >
<template #default="{ row }">
<el-button type="primary" size="mini" @click="onDownload(row)">
下载