Browse Source

信息同步和弹框样式更新

feature-no-sdk
zth 3 weeks ago
parent
commit
2f1757035e
  1. 9
      src/api/dike/index.ts
  2. 94
      src/views/Main/Dike/components/BaseInfo.vue
  3. 28
      src/views/Main/Dike/components/fileManagement.vue
  4. 478
      src/views/Main/Dike/components/floodControlMaterials.vue
  5. 352
      src/views/Main/Dike/components/safetyAppraisal.vue
  6. 19
      src/views/Main/Sluice/components/fileManagement.vue
  7. 392
      src/views/Main/Sluice/components/floodControlMaterials.vue
  8. 295
      src/views/Main/Sluice/components/safetyAppraisal.vue
  9. 4
      src/views/Main/index.vue
  10. 2
      vite.config.ts

9
src/api/dike/index.ts

@ -101,6 +101,15 @@ export function listDagl(query:any) {
})
}
export function getFileStream(query:any) {
return request({
url: '/common/download',
method: 'get',
params: query,
responseType: "blob"
})
}
// 查询水文特征详细
export function getSwtz(id: any) {

94
src/views/Main/Dike/components/BaseInfo.vue

@ -9,7 +9,7 @@
border
:labelStyle="{
'text-align': 'left',
width: '120px',
width: '200px',
height: '50px',
}"
:contentStyle="{ minWidth: '180px' }"
@ -142,14 +142,15 @@
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="堤防横断面特征值" name="2">
<el-tab-pane label="堤防横断面特征值" name="2" v-model="activeName" @tab-click="handleChangeTab" class="sub-tabs">
<el-table
:data="hdmzData"
style="color: black"
>
<el-table-column
label="序号"
type="index"
width="50"
width="100"
align="center"
fixed
/>
@ -157,252 +158,253 @@
label="堤防横断面代码"
align="center"
prop="bntrCode"
min-width="120"
min-width="200"
/>
<el-table-column
label="测量日期"
align="center"
prop="srDate"
min-width="120"
min-width="200"
/>
<el-table-column
label="断面桩号"
align="center"
prop="trCh"
min-width="120"
min-width="200"
/>
<el-table-column
label="起始断面位置"
align="center"
prop="intrPl"
min-width="120"
min-width="200"
/>
<el-table-column
label="起始断面桩号"
align="center"
prop="intrCh"
min-width="120"
min-width="200"
/>
<el-table-column
label="至起始断面距离"
align="center"
prop="tointrDs"
min-width="120"
min-width="200"
/>
<el-table-column
label="起测点位置"
align="center"
prop="jmsrpnPl"
min-width="120"
min-width="200"
/>
<el-table-column
label="起测点高程"
align="center"
prop="jmsrpneLev"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤身土质"
align="center"
prop="bnbdSlch"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤身防渗形式"
align="center"
prop="bnbdAntp"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤基地质"
align="center"
prop="bnbsGl"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤基防渗形式"
align="center"
prop="bnbsAntp"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤身净高度"
align="center"
prop="bnbdHigh"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤顶高程"
align="center"
prop="bntpeLev"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤顶超高"
align="center"
prop="bntpFr"
min-width="120"
min-width="200"
/>
<el-table-column
label="堤顶宽度"
align="center"
prop="bntpWd"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河面堤脚高程"
align="center"
prop="upbnToel"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河面堤脚高程"
align="center"
prop="dwbnToel"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河坡坡比"
align="center"
prop="upslSlrt"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河坡坡比"
align="center"
prop="dwslSlrt"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河坡坡比"
align="center"
prop="upslSlrt"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河坡护坡情况"
align="center"
prop="uspsIn"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河坡护坡情况"
align="center"
prop="dspsIn"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河面滩地宽度"
align="center"
prop="upbtWide"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河面滩地宽度"
align="center"
prop="upbtWide"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河面平台(前戗)顶高程"
align="center"
prop="ufrteLev"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河面平台(前戗)顶宽"
align="center"
prop="ufrtWide"
min-width="120"
min-width="200"
/>
<el-table-column
label="迎河面平台(前戗)坡度"
align="center"
prop="upflRfsl"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河面平台(后戗)顶高程"
align="center"
prop="dfrtEl"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河面平台(后戗)顶高程"
align="center"
prop="dfrtEl"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河面平台(后戗)顶宽"
align="center"
prop="dfrtWide"
min-width="120"
min-width="200"
/>
<el-table-column
label="背河面平台(后戗)坡度"
align="center"
prop="dwflRfsl"
min-width="120"
min-width="200"
/>
<el-table-column
label="备注"
align="center"
prop="note"
min-width="120"
min-width="200"
/>
</el-table>
</el-tab-pane>
<el-tab-pane label="历史决溢记录" name="4">
<el-tab-pane label="历史决溢记录" name="4" v-model="activeName" @tab-click="handleChangeTab" class="sub-tabs">
<el-table
:data="overflows"
style="color: black"
>
<el-table-column type="selection" width="55" align="center" fixed />
<el-table-column
label="序号"
type="index"
width="50"
width="100"
align="center"
fixed
/>
<el-table-column
label="堤防名称"
align="center"
prop="dikeName"
min-width="120"
min-width="200"
/>
<el-table-column
label="记录更新时间"
align="center"
prop="updateDate"
min-width="120"
min-width="200"
/>
<el-table-column
label="决溢地点"
align="center"
prop="brspPl"
min-width="120"
min-width="200"
/>
<el-table-column
label="决溢时间"
align="center"
prop="brspDatetime"
min-width="120"
min-width="200"
/>
<el-table-column
label=""
align="决溢形式"
prop="brspForm"
min-width="120"
min-width="200"
/>
<!-- <el-table-column
label="责任人类型"
align="center"
prop="personResponsibleType"
:formatter="personResponsibleTypeFormat"
min-width="120"
min-width="200"
/> -->
</el-table>
</el-tab-pane>
@ -570,7 +572,7 @@ watch(
.sy-descriptions {
.sy-descriptions__label {
text-align: left;
min-width: 120px;
min-width: 200px;
height: 50px;
}
.sy-descriptions__content {

28
src/views/Main/Dike/components/fileManagement.vue

@ -28,7 +28,7 @@
<div class="table-container">
<el-table :data="tableData" border style="width: 100%;color: black">
<el-table-column type="index" label="序号" width="120" align="center" />
<el-table-column prop="regulationsAttachment" label="档案类型" width="180" align="center" >
<el-table-column prop="regulationsAttachment" label="档案类型" width="650" align="center" >
<template #default="{ row }">
{{projTypeFormat(row.regulationsAttachment)}}
</template>
@ -36,24 +36,22 @@
<el-table-column prop="planAttachment" label="档案附件" align="center">
<template #default="{ row }">
<div
style="cursor: pointer"
v-for="(item, index) in parseAttachments(row.planAttachment)"
:key="index"
@click="downloadFile(item, index)"
>
<i class="el-icon-document"></i>
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120">
<template #default="scope">
<el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</div>
@ -61,7 +59,6 @@
v-model="dialogVisible"
title="档案详情"
width="50%"
:before-close="handleDialogClose"
>
<div class="detail-container">
<div class="detail-item">
@ -80,7 +77,6 @@
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer; margin-left: 8px;"
></i>
</div>
@ -103,7 +99,7 @@
<script setup lang="ts">
import {ref, onMounted, watch, reactive} from 'vue';
import type { PropType } from 'vue';
import {listAqjdxx, listDagl, listFzwz} from "~/api/dike";
import {listAqjdxx, listDagl, listFzwz,getFileStream} from "~/api/dike";
import {getDicts} from "~/api/common";
import {getDictLabel} from "~/utils/dictUtils";
@ -167,14 +163,16 @@ const handleReset = () => {
};
function downloadFile(item: string, index: number): void {
const file = JSON.parse(item)[index];
handlePreview(file);
console.log(item,1111)
const file = item;
console.log(file)
handlePreview(item);
}
function parseAttachments(attachment: string): FileItem[] {
function parseAttachments(attachment: string): [] {
return JSON.parse(attachment);
}
function handlePreview(file: { fileName: string; name: string }): void {
function handlePreview(file:object): void {
getFileStream({ fileName: file.fileName }).then((res) => {
const blob = new Blob([res], {
type: "application/xlsx",
@ -223,6 +221,7 @@ function initDagl() {
}).then((res) => {
if (res) {
tableData.value=res.records || [];
}
});
}
@ -248,6 +247,7 @@ onMounted(() => {
align-items: center;
.option-label {
margin-left: 10px;
margin-right: 8px;
}
}

478
src/views/Main/Dike/components/floodControlMaterials.vue

@ -5,16 +5,15 @@
<div class="search-item">
<span class="option-label">采购时间</span>
<el-date-picker
v-model="dateRange"
type="daterange"
v-model="procurementTime"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
start-placeholder="开始日期"
end-placeholder="结束日期"
placeholder="选择日期"
style="width: 240px"
/>
</div>
<div class="search-item">
<div class="search-item" style="margin-left: 10px">
<span class="option-label">物资名称</span>
<el-input
v-model="materialName"
@ -22,14 +21,7 @@
style="width: 200px"
/>
</div>
<div class="search-item">
<span class="option-label">负责人姓名</span>
<el-input
v-model="responsiblePerson"
placeholder="请输入负责人姓名"
style="width: 200px"
/>
</div>
</div>
<div class="right-options">
<el-button type="primary" class="add-button" @click="handleSearch">查询</el-button>
@ -42,8 +34,13 @@
<el-table-column type="index" label="序号" width="120" align="center" />
<el-table-column prop="materialName" label="物资名称" width="180" align="center" />
<el-table-column prop="materialNumber" label="物资数量" align="center" />
<el-table-column prop="materialType" label="物资类型" align="center" />
<el-table-column prop="materialNumber" label="采购时间" align="center" />
<el-table-column prop="materialType" label="物资类型" align="center" >
<template #default="scope">
{{projTypeFormat(scope.row.materialType)}}
</template>
</el-table-column>
<el-table-column prop="procurementTime" label="采购时间" align="center" />
<el-table-column prop="personName" label="负责人" align="center" />
<el-table-column label="操作" align="center" width="120">
<template #default="scope">
<el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button>
@ -52,40 +49,129 @@
</el-table>
</div>
<el-dialog
v-model="dialogVisible"
title="物资详情"
width="50%"
:before-close="handleDialogClose"
>
<div class="detail-container">
<div class="detail-item">
<span class="detail-label">物资名称</span>
<span class="detail-value">{{ currentRow.materialName || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">物资数量</span>
<span class="detail-value">{{ currentRow.materialNumber || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">物资类型</span>
<span class="detail-value">{{ currentRow.materialType || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">采购时间</span>
<span class="detail-value">{{ currentRow.purchaseTime || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">负责人</span>
<span class="detail-value">{{ currentRow.responsiblePerson || '--' }}</span>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
<Teleport to="body">
<Transition name="dialog-fade">
<div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
<div class="modern-dialog-container" @click.stop>
<div class="modern-dialog-header">
<div class="modern-dialog-title">
<div class="title-icon">
<i class="el-icon-document"></i>
</div>
<h3>防汛物资详情</h3>
</div>
<button class="modern-dialog-close" @click="dialogVisible = false">
<svg viewBox="0 0 24 24" width="24" height="24">
<path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</svg>
</button>
</div>
<div class="modern-dialog-content">
<div class="detail-card">
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">物资名称</span>
<span class="detail-value">{{ currentRow.materialName || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">负责人</span>
<span class="detail-value">{{ currentRow.personName || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">负责人电话</span>
<span class="detail-value">{{ currentRow.personPhone || '--' }}</span>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">负责人职务</span>
<div class="detail-value">{{ currentRow.personLevel || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">物资数量</span>
<div class="detail-value">{{ currentRow.materialNumber || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">采购时间</span>
<div class="detail-value">{{ currentRow.procurementTime || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">物资种类</span>
<div class="detail-value">{{ projTypeFormat(currentRow.materialType) || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">保质期</span>
<div class="detail-value">{{ currentRow.shelfLife || '--' }}</div>
</div>
</div>
</div>
</div>
<div class="modern-dialog-footer">
<el-button class="close-button" @click="dialogVisible = false">关闭</el-button>
</div>
</div>
</div>
</template>
</el-dialog>
</Transition>
</Teleport>
<!-- <el-dialog-->
<!-- v-model="dialogVisible"-->
<!-- title="物资详情"-->
<!-- width="50%"-->
<!-- :before-close="handleDialogClose"-->
<!-- >-->
<!-- <div class="detail-container">-->
<!-- <div class="detail-item">-->
<!-- <span class="detail-label">物资名称</span>-->
<!-- <span class="detail-value">{{ currentRow.materialName || '&#45;&#45;' }}</span>-->
<!-- </div>-->
<!-- <div class="detail-item">-->
<!-- <span class="detail-label">物资数量</span>-->
<!-- <span class="detail-value">{{ currentRow.materialNumber || '&#45;&#45;' }}</span>-->
<!-- </div>-->
<!-- <div class="detail-item">-->
<!-- <span class="detail-label">物资类型</span>-->
<!-- <span class="detail-value">{{ projTypeFormat(currentRow.materialType) || '&#45;&#45;' }}</span>-->
<!-- </div>-->
<!-- <div class="detail-item">-->
<!-- <span class="detail-label">采购时间</span>-->
<!-- <span class="detail-value">{{ currentRow.procurementTime || '&#45;&#45;' }}</span>-->
<!-- </div>-->
<!-- <div class="detail-item">-->
<!-- <span class="detail-label">负责人</span>-->
<!-- <span class="detail-value">{{ currentRow.personName || '&#45;&#45;' }}</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- <template #footer>-->
<!-- <div class="dialog-footer">-->
<!-- <el-button @click="dialogVisible = false">关闭</el-button>-->
<!-- </div>-->
<!-- </template>-->
<!-- </el-dialog>-->
</div>
</template>
@ -93,7 +179,11 @@
import {ref, onMounted, watch, reactive} from 'vue';
import type { PropType } from 'vue';
import {listAqjdxx, listFzwz} from "~/api/dike";
import {getDictLabel} from "~/utils/dictUtils";
import {getDicts} from "~/api/common";
const handleOverlayClick = (e: MouseEvent) => {
dialogVisible.value = false;
};
const props = defineProps({
resCode: {
type: String as PropType<string>,
@ -103,7 +193,7 @@ const props = defineProps({
const dateRange = ref([]);
const materialName = ref('');
const responsiblePerson = ref('');
const procurementTime=ref(null)
// Dialog visibility
const dialogVisible = ref(false);
@ -111,11 +201,22 @@ const dialogVisible = ref(false);
const currentRow = reactive({
materialName: '',
materialNumber: '',
personLevel:'',
personPhone:'',
shelfLife:'',
materialType: '',
purchaseTime: '',
responsiblePerson: ''
procurementTime: '',
personName: ''
});
const handleReset = () => {
procurementTime.value = null;
materialName.value = '';
responsiblePerson.value = '';
initFxwz();
};
// View function
const handleView = (row: any) => {
console.log('View row:', row);
@ -124,17 +225,31 @@ const handleView = (row: any) => {
currentRow.materialName = row.materialName || '';
currentRow.materialNumber = row.materialNumber || '';
currentRow.materialType = row.materialType || '';
currentRow.purchaseTime = row.purchaseTime || '';
currentRow.responsiblePerson = row.responsiblePerson || '';
currentRow.procurementTime = row.procurementTime || '';
currentRow.personName = row.personName || '';
currentRow.personPhone=row.personPhone||'',
currentRow.personLevel=row.personLevel||'',
currentRow.shelfLife=row.shelfLife||''
// Show dialog
dialogVisible.value = true;
};
const typesMaterials=ref([])
// Handle dialog close
const handleDialogClose = () => {
dialogVisible.value = false;
};
function getType() {
getDicts("types_materials").then((res) => {
typesMaterials.value = res || [];
console.log(typesMaterials.value,'11111')
});
}
function projTypeFormat(key: string) {
if (!key) return '--';
return getDictLabel(typesMaterials.value, key) || key;
}
// Search function
const handleSearch = () => {
@ -171,24 +286,25 @@ function initFxwz() {
dikeCode: props.resCode,
};
if (procurementTime.value){
requestData.procurementTime=procurementTime.value;
}
// Add search parameters if they exist
if (materialName.value) {
requestData.materialName = materialName.value;
}
if (responsiblePerson.value) {
requestData.responsiblePerson = responsiblePerson.value;
requestData.personName = responsiblePerson.value;
}
// Add date range if selected
if (dateRange.value && dateRange.value.length === 2) {
requestData.startTime = dateRange.value[0];
requestData.endTime = dateRange.value[1];
}
listFzwz({
page: 1,
pageSize: 10,
data:requestData
}).then((res) => {
if (res) {
tableData.value=res.records || [];
@ -197,6 +313,7 @@ function initFxwz() {
}
onMounted(() => {
getType();
initFxwz();
});
</script>
@ -214,13 +331,24 @@ onMounted(() => {
.left-options {
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 15px;
.option-label {
margin-right: 8px;
.search-item {
display: flex;
align-items: center;
.option-label {
padding: 15px;
white-space: nowrap;
}
}
}
.right-options {
display: flex;
align-items: center;
.add-button {
background-color: #4cd964;
border-color: #4cd964;
@ -241,4 +369,230 @@ onMounted(() => {
}
}
}
/* 详情对话框样式 */
.detail-container {
padding: 10px;
.detail-item {
margin-bottom: 15px;
display: flex;
.detail-label {
width: 100px;
font-weight: 500;
color: #606266;
}
.detail-value {
flex: 1;
color: #333;
}
}
}
.dialog-footer {
text-align: right;
margin-top: 20px;
}
.dialog-fade-enter-active,
.dialog-fade-leave-active {
transition: opacity 0.3s ease, transform 0.3s ease;
}
.dialog-fade-enter-from,
.dialog-fade-leave-to {
opacity: 0;
transform: scale(0.9);
}
.modern-dialog-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
}
.modern-dialog-container {
width: 550px;
max-width: 90%;
background: #fff;
border-radius: 12px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
overflow: hidden;
display: flex;
flex-direction: column;
animation: dialog-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialog-slide-in {
0% {
opacity: 0;
transform: translateY(30px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.modern-dialog-header {
padding: 20px 24px;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
color: #fff;
.modern-dialog-title {
display: flex;
align-items: center;
.title-icon {
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
}
h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
}
}
.modern-dialog-close {
background: transparent;
border: none;
cursor: pointer;
color: #fff;
width: 32px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
&:hover {
background-color: rgba(255, 255, 255, 0.2);
}
}
}
.modern-dialog-content {
padding: 24px;
flex: 1;
overflow-y: auto;
.detail-card {
background: #f8f9fa;
border-radius: 8px;
padding: 20px;
}
.detail-item {
display: flex;
align-items: flex-start;
margin-bottom: 5px;
padding-bottom: 5px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
transition: transform 0.2s, box-shadow 0.2s;
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
&:hover {
transform: translateX(5px);
}
.detail-icon {
flex-shrink: 0;
width: 40px;
height: 40px;
border-radius: 8px;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
margin-right: 16px;
}
.detail-content {
flex: 1;
display: flex;
flex-direction: column;
}
.detail-label {
font-size: 14px;
color: #666;
margin-bottom: 6px;
}
.detail-value {
font-size: 16px;
font-weight: 500;
color: #333;
}
&.conclusion-item {
.conclusion-value {
font-size: 16px;
font-weight: 500;
color: #333;
padding: 12px;
background: #fff;
border-radius: 6px;
border-left: 4px solid #0acccc;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
}
}
}
.modern-dialog-footer {
padding: 16px 24px;
display: flex;
justify-content: flex-end;
background: #f8f9fa;
border-top: 1px solid #e9ecef;
.close-button {
background: linear-gradient(135deg, #2C7EF8 0%, #2C5EF8 100%);
border: none;
color: white;
padding: 10px 24px;
border-radius: 6px;
font-weight: 500;
cursor: pointer;
transition: transform 0.15s, box-shadow 0.15s;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(44, 126, 248, 0.3);
}
&:active {
transform: translateY(0);
}
}
}
</style>

352
src/views/Main/Dike/components/safetyAppraisal.vue

@ -33,36 +33,68 @@
</el-table>
</div>
<el-dialog
v-model="dialogVisible"
title="安全评定详情"
width="50%"
:before-close="handleDialogClose"
>
<div class="detail-container">
<div class="detail-item">
<span class="detail-label">安全评定时间</span>
<span class="detail-value">{{ currentRow.identifyTime || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">安全评的单位</span>
<span class="detail-value">{{ currentRow.safetyEvaluationUnit || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">评价单位资质</span>
<span class="detail-value">{{ currentRow.unitQualification || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">安全评价结论</span>
<span class="detail-value">{{ currentRow.mainIssues || '--' }}</span>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
<Teleport to="body">
<Transition name="dialog-fade">
<div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
<div class="modern-dialog-container" @click.stop>
<div class="modern-dialog-header">
<div class="modern-dialog-title">
<div class="title-icon">
<i class="el-icon-document"></i>
</div>
<h3>安全评定详情</h3>
</div>
<button class="modern-dialog-close" @click="dialogVisible = false">
<svg viewBox="0 0 24 24" width="24" height="24">
<path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</svg>
</button>
</div>
<div class="modern-dialog-content">
<div class="detail-card">
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">安全评定时间</span>
<span class="detail-value">{{ currentRow.identifyTime || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">安全评的单位</span>
<span class="detail-value">{{ currentRow.safetyEvaluationUnit || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">评价单位资质</span>
<span class="detail-value">{{ currentRow.unitQualification || '--' }}</span>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">安全评价结论</span>
<div class="conclusion-value">{{ currentRow.mainIssues || '--' }}</div>
</div>
</div>
</div>
</div>
<div class="modern-dialog-footer">
<el-button class="close-button" @click="dialogVisible = false">关闭</el-button>
</div>
</div>
</div>
</template>
</el-dialog>
</Transition>
</Teleport>
</div>
</template>
@ -74,7 +106,7 @@ import {listAqjdxx, listJyjl} from "~/api/dike";
const props = defineProps({
resCode: {
type: String as PropType<string>,
default: '',
default: 'HP017440705000067X',
},
});
@ -85,33 +117,34 @@ const identifyTime = ref(null);
// Search parameters
const searchDate = ref([]);
// View function
// const handleView = (row: any) => {
// console.log('View row:', row);
// };
// Fetch data based on resCode changes
watch(
() => props.resCode,
(newVal) => {
if (newVal) {
fetchSafetyData();
}
},
{ immediate: true }
);
// Watch for resCode changes
// watch(
// () => props.resCode,
// (newVal) => {
// if (newVal) {
// fetchSafetyData();
// }
// },
// { immediate: true }
// );
// Fetch safety appraisal data
const fetchSafetyData = async () => {
// const fetchSafetyData = async () => {
//
// };
};
// Current row data for dialog
const currentRow = reactive({
identifyTime: '',
safetyEvaluationUnit: '',
unitQualification: '',
mainIssues: ''
});
// Dialog visibility
const dialogVisible = ref(false);
// Handle viewing a row
const handleView = (row: any) => {
console.log('View row:', row);
// Copy row data to currentRow
@ -120,26 +153,33 @@ const handleView = (row: any) => {
currentRow.unitQualification = row.unitQualification || '';
currentRow.mainIssues = row.mainIssues || '';
// Show dialog
// Show dialog with animation
dialogVisible.value = true;
};
// Handle dialog overlay click
const handleOverlayClick = (e: MouseEvent) => {
dialogVisible.value = false;
};
// Reset filter
const resetFilter = () => {
identifyTime.value = null;
initSafe();
};
const dialogVisible = ref(false);
// Initialize safety data
function initSafe() {
console.log("Selected date:", identifyTime.value);
// Build request data object
const requestData: any = {
dfrwId: props.resCode
dikeCode: props.resCode
};
// Only add identifyTime if it has a value
if (identifyTime.value) {
requestData.identifyTime = identifyTime.value;
requestData.identifyTime= identifyTime.value;
}
listAqjdxx({
page: 1,
@ -152,7 +192,6 @@ function initSafe() {
});
}
onMounted(() => {
initSafe();
});
@ -162,7 +201,7 @@ onMounted(() => {
.safety-appraisal-container {
padding: 16px;
height: 100%;
color: #333; //
color: #333;
.top-options {
display: flex;
@ -195,8 +234,8 @@ onMounted(() => {
.table-container {
.custom-table {
.el-table__cell {
color: #333; //
.el-table__cell {
color: #333;
}
}
@ -205,4 +244,205 @@ onMounted(() => {
}
}
}
/* 惊艳的弹窗样式 */
.dialog-fade-enter-active,
.dialog-fade-leave-active {
transition: opacity 0.3s ease, transform 0.3s ease;
}
.dialog-fade-enter-from,
.dialog-fade-leave-to {
opacity: 0;
transform: scale(0.9);
}
.modern-dialog-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
}
.modern-dialog-container {
width: 550px;
max-width: 90%;
background: #fff;
border-radius: 12px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
overflow: hidden;
display: flex;
flex-direction: column;
animation: dialog-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialog-slide-in {
0% {
opacity: 0;
transform: translateY(30px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.modern-dialog-header {
padding: 20px 24px;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
color: #fff;
.modern-dialog-title {
display: flex;
align-items: center;
.title-icon {
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
}
h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
}
}
.modern-dialog-close {
background: transparent;
border: none;
cursor: pointer;
color: #fff;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
&:hover {
background-color: rgba(255, 255, 255, 0.2);
}
}
}
.modern-dialog-content {
padding: 24px;
flex: 1;
overflow-y: auto;
.detail-card {
background: #f8f9fa;
border-radius: 8px;
padding: 20px;
}
.detail-item {
display: flex;
align-items: flex-start;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
transition: transform 0.2s, box-shadow 0.2s;
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
&:hover {
transform: translateX(5px);
}
.detail-icon {
flex-shrink: 0;
width: 40px;
height: 40px;
border-radius: 8px;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
margin-right: 16px;
}
.detail-content {
flex: 1;
display: flex;
flex-direction: column;
}
.detail-label {
font-size: 14px;
color: #666;
margin-bottom: 6px;
}
.detail-value {
font-size: 16px;
font-weight: 500;
color: #333;
}
&.conclusion-item {
.conclusion-value {
font-size: 16px;
font-weight: 500;
color: #333;
padding: 12px;
background: #fff;
border-radius: 6px;
border-left: 4px solid #0acccc;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
}
}
}
.modern-dialog-footer {
padding: 16px 24px;
display: flex;
justify-content: flex-end;
background: #f8f9fa;
border-top: 1px solid #e9ecef;
.close-button {
background: linear-gradient(135deg, #2C7EF8 0%, #2C5EF8 100%);
border: none;
color: white;
padding: 10px 24px;
border-radius: 6px;
font-weight: 500;
cursor: pointer;
transition: transform 0.15s, box-shadow 0.15s;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(44, 126, 248, 0.3);
}
&:active {
transform: translateY(0);
}
}
}
</style>

19
src/views/Main/Sluice/components/fileManagement.vue

@ -28,7 +28,7 @@
<div class="table-container">
<el-table :data="tableData" border style="width: 100%;color: black">
<el-table-column type="index" label="序号" width="120" align="center" />
<el-table-column prop="regulationsAttachment" label="档案类型" width="180" align="center" >
<el-table-column prop="regulationsAttachment" label="档案类型" width="650" align="center" >
<template #default="{ row }">
{{projTypeFormat(row.regulationsAttachment)}}
</template>
@ -43,17 +43,12 @@
{{ item.name }}
<i
class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer"
></i>
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120">
<template #default="scope">
<el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
@ -105,7 +100,15 @@ const searchDate = ref([]);
const handleSearch = () => {
initDagl();
};
const handleView = (row: any) => {
console.log('View row:', row);
// Copy row data to currentRow
currentRow.regulationsAttachment = row.regulationsAttachment || '';
currentRow.planAttachment = row.planAttachment || '';
// Show dialog
dialogVisible.value = true;
};
//
const handleReset = () => {
selectedFileType.value = '';

392
src/views/Main/Sluice/components/floodControlMaterials.vue

@ -5,12 +5,11 @@
<div class="search-item">
<span class="option-label">采购时间</span>
<el-date-picker
v-model="dateRange"
type="daterange"
v-model="procurementTime"
type="date"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
start-placeholder="开始日期"
end-placeholder="结束日期"
placeholder="选择日期"
style="width: 240px"
/>
</div>
@ -22,14 +21,7 @@
style="width: 200px"
/>
</div>
<div class="search-item">
<span class="option-label">负责人姓名</span>
<el-input
v-model="responsiblePerson"
placeholder="请输入负责人姓名"
style="width: 200px"
/>
</div>
</div>
<div class="right-options">
<el-button type="primary" class="add-button" @click="handleSearch">查询</el-button>
@ -42,10 +34,13 @@
<el-table-column type="index" label="序号" width="120" align="center" />
<el-table-column prop="materialName" label="物资名称" width="180" align="center" />
<el-table-column prop="materialNumber" label="物资数量" align="center" />
<el-table-column prop="materialType" label="物资类型" align="center" />
<el-table-column prop="purchaseTime" label="采购时间" align="center" />
<el-table-column prop="materialType" label="物资类型" align="center" >
<template #default="scope">
{{projTypeFormat(scope.row.materialType)}}
</template>
</el-table-column> <el-table-column prop="purchaseTime" label="采购时间" align="center" />
<el-table-column prop="responsiblePerson" label="负责人" align="center" />
<el-table-column label="操作" align="center" width="120">
<el-table-column label="操作" align="center" width="100">
<template #default="scope">
<el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button>
</template>
@ -54,40 +49,95 @@
</div>
<!-- 查看详情对话框 -->
<el-dialog
v-model="dialogVisible"
title="物资详情"
width="50%"
:before-close="handleDialogClose"
>
<div class="detail-container">
<div class="detail-item">
<span class="detail-label">物资名称</span>
<span class="detail-value">{{ currentRow.materialName || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">物资数量</span>
<span class="detail-value">{{ currentRow.materialNumber || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">物资类型</span>
<span class="detail-value">{{ currentRow.materialType || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">采购时间</span>
<span class="detail-value">{{ currentRow.purchaseTime || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">负责人</span>
<span class="detail-value">{{ currentRow.responsiblePerson || '--' }}</span>
<Teleport to="body">
<Transition name="dialog-fade">
<div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
<div class="modern-dialog-container" @click.stop>
<div class="modern-dialog-header">
<div class="modern-dialog-title">
<div class="title-icon">
<i class="el-icon-document"></i>
</div>
<h3>防汛物资详情</h3>
</div>
<button class="modern-dialog-close" @click="dialogVisible = false">
<svg viewBox="0 0 24 24" width="24" height="24">
<path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</svg>
</button>
</div>
<div class="modern-dialog-content">
<div class="detail-card">
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">物资名称</span>
<span class="detail-value">{{ currentRow.materialName || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">负责人</span>
<span class="detail-value">{{ currentRow.personName || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">负责人电话</span>
<span class="detail-value">{{ currentRow.personPhone || '--' }}</span>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">负责人职务</span>
<div class="detail-value">{{ currentRow.personLevel || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">物资数量</span>
<div class="detail-value">{{ currentRow.materialNumber || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">采购时间</span>
<div class="detail-value">{{ currentRow.procurementTime || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">物资种类</span>
<div class="detail-value">{{ projTypeFormat(currentRow.materialType) || '--' }}</div>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">保质期</span>
<div class="detail-value">{{ currentRow.shelfLife || '--' }}</div>
</div>
</div>
</div>
</div>
<div class="modern-dialog-footer">
<el-button class="close-button" @click="dialogVisible = false">关闭</el-button>
</div>
</div>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
</div>
</template>
</el-dialog>
</Transition>
</Teleport>
</div>
</template>
@ -95,6 +145,8 @@
import { ref, onMounted, watch, reactive } from 'vue';
import type { PropType } from 'vue';
import {listFzwz} from "~/api/sluice";
import {getDicts} from "~/api/common";
import {getDictLabel} from "~/utils/dictUtils";
const props = defineProps({
resCode: {
@ -113,15 +165,23 @@ const responsiblePerson = ref('');
// Dialog visibility
const dialogVisible = ref(false);
const typesMaterials=ref([])
// Current row being viewed
const currentRow = reactive({
materialName: '',
materialNumber: '',
personLevel:'',
personPhone:'',
shelfLife:'',
materialType: '',
purchaseTime: '',
responsiblePerson: ''
procurementTime: '',
personName: ''
});
function getType() {
getDicts("types_materials").then((res) => {
typesMaterials.value = res || [];
});
}
// View function
const handleView = (row: any) => {
@ -131,9 +191,11 @@ const handleView = (row: any) => {
currentRow.materialName = row.materialName || '';
currentRow.materialNumber = row.materialNumber || '';
currentRow.materialType = row.materialType || '';
currentRow.purchaseTime = row.purchaseTime || '';
currentRow.responsiblePerson = row.responsiblePerson || '';
currentRow.procurementTime = row.procurementTime || '';
currentRow.personName = row.personName || '';
currentRow.personPhone=row.personPhone||'',
currentRow.personLevel=row.personLevel||'',
currentRow.shelfLife=row.shelfLife||''
// Show dialog
dialogVisible.value = true;
};
@ -142,7 +204,9 @@ const handleView = (row: any) => {
const handleDialogClose = () => {
dialogVisible.value = false;
};
const handleOverlayClick = (e: MouseEvent) => {
dialogVisible.value = false;
};
// Search function
const handleSearch = () => {
initFxwz();
@ -150,7 +214,7 @@ const handleSearch = () => {
// Reset function
const handleReset = () => {
dateRange.value = [];
procurementTime.value = null;
materialName.value = '';
responsiblePerson.value = '';
initFxwz();
@ -166,13 +230,16 @@ watch(
},
{ immediate: true }
);
const procurementTime=ref(null)
function initFxwz() {
// Prepare request data
const requestData: any = {
wagaCode: props.resCode,
};
if (procurementTime.value){
requestData.procurementTime=procurementTime.value;
}
// Add search parameters if they exist
if (materialName.value) {
requestData.materialName = materialName.value;
@ -183,10 +250,6 @@ function initFxwz() {
}
// Add date range if selected
if (dateRange.value && dateRange.value.length === 2) {
requestData.startTime = dateRange.value[0];
requestData.endTime = dateRange.value[1];
}
listFzwz({
page: 1,
@ -200,8 +263,13 @@ function initFxwz() {
console.error("API error:", error);
});
}
function projTypeFormat(key: string) {
if (!key) return '--';
return getDictLabel(typesMaterials.value, key) || key;
}
onMounted(() => {
getType()
initFxwz();
});
</script>
@ -227,7 +295,7 @@ onMounted(() => {
align-items: center;
.option-label {
margin-right: 8px;
padding: 15px;
white-space: nowrap;
}
}
@ -283,4 +351,204 @@ onMounted(() => {
text-align: right;
margin-top: 20px;
}
.dialog-fade-enter-active,
.dialog-fade-leave-active {
transition: opacity 0.3s ease, transform 0.3s ease;
}
.dialog-fade-enter-from,
.dialog-fade-leave-to {
opacity: 0;
transform: scale(0.9);
}
.modern-dialog-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
}
.modern-dialog-container {
width: 550px;
max-width: 90%;
background: #fff;
border-radius: 12px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
overflow: hidden;
display: flex;
flex-direction: column;
animation: dialog-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialog-slide-in {
0% {
opacity: 0;
transform: translateY(30px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.modern-dialog-header {
padding: 20px 24px;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
color: #fff;
.modern-dialog-title {
display: flex;
align-items: center;
.title-icon {
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
}
h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
}
}
.modern-dialog-close {
background: transparent;
border: none;
cursor: pointer;
color: #fff;
width: 32px;
height: 22px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
&:hover {
background-color: rgba(255, 255, 255, 0.2);
}
}
}
.modern-dialog-content {
padding: 24px;
flex: 1;
overflow-y: auto;
.detail-card {
background: #f8f9fa;
border-radius: 8px;
padding: 20px;
}
.detail-item {
display: flex;
align-items: flex-start;
margin-bottom: 5px;
padding-bottom: 5px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
transition: transform 0.2s, box-shadow 0.2s;
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
&:hover {
transform: translateX(5px);
}
.detail-icon {
flex-shrink: 0;
width: 40px;
height: 40px;
border-radius: 8px;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
margin-right: 16px;
}
.detail-content {
flex: 1;
display: flex;
flex-direction: column;
}
.detail-label {
font-size: 14px;
color: #666;
margin-bottom: 6px;
}
.detail-value {
font-size: 16px;
font-weight: 500;
color: #333;
}
&.conclusion-item {
.conclusion-value {
font-size: 16px;
font-weight: 500;
color: #333;
padding: 12px;
background: #fff;
border-radius: 6px;
border-left: 4px solid #0acccc;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
}
}
}
.modern-dialog-footer {
padding: 16px 24px;
display: flex;
justify-content: flex-end;
background: #f8f9fa;
border-top: 1px solid #e9ecef;
.close-button {
background: linear-gradient(135deg, #2C7EF8 0%, #2C5EF8 100%);
border: none;
color: white;
padding: 10px 24px;
border-radius: 6px;
font-weight: 500;
cursor: pointer;
transition: transform 0.15s, box-shadow 0.15s;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(44, 126, 248, 0.3);
}
&:active {
transform: translateY(0);
}
}
}
</style>

295
src/views/Main/Sluice/components/safetyAppraisal.vue

@ -34,36 +34,67 @@
</div>
<!-- 查看详情对话框 -->
<el-dialog
v-model="dialogVisible"
title="安全评定详情"
width="50%"
:before-close="handleDialogClose"
>
<div class="detail-container">
<div class="detail-item">
<span class="detail-label">安全评定时间</span>
<span class="detail-value">{{ currentRow.identifyTime || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">安全评的单位</span>
<span class="detail-value">{{ currentRow.safetyEvaluationUnit || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">评价单位资质</span>
<span class="detail-value">{{ currentRow.unitQualification || '--' }}</span>
</div>
<div class="detail-item">
<span class="detail-label">安全评价结论</span>
<span class="detail-value">{{ currentRow.mainIssues || '--' }}</span>
</div>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
<Teleport to="body">
<Transition name="dialog-fade">
<div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
<div class="modern-dialog-container" @click.stop>
<div class="modern-dialog-header">
<div class="modern-dialog-title">
<div class="title-icon">
<i class="el-icon-document"></i>
</div>
<h3>安全评定详情</h3>
</div>
<button class="modern-dialog-close" @click="dialogVisible = false">
<svg viewBox="0 0 24 24" width="24" height="24">
<path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
</svg>
</button>
</div>
<div class="modern-dialog-content">
<div class="detail-card">
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">安全评定时间</span>
<span class="detail-value">{{ currentRow.identifyTime || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">安全评的单位</span>
<span class="detail-value">{{ currentRow.safetyEvaluationUnit || '--' }}</span>
</div>
</div>
<div class="detail-item">
<div class="detail-content">
<span class="detail-label">评价单位资质</span>
<span class="detail-value">{{ currentRow.unitQualification || '--' }}</span>
</div>
</div>
<div class="detail-item conclusion-item">
<div class="detail-content">
<span class="detail-label">安全评价结论</span>
<div class="conclusion-value">{{ currentRow.mainIssues || '--' }}</div>
</div>
</div>
</div>
</div>
<div class="modern-dialog-footer">
<el-button class="close-button" @click="dialogVisible = false">关闭</el-button>
</div>
</div>
</div>
</template>
</el-dialog>
</Transition>
</Teleport>
</div>
</template>
@ -76,7 +107,7 @@ import { isDate } from "lodash-es";
const props = defineProps({
resCode: {
type: String as PropType<string>,
default: '1900034196855689218',
default: '',
}
});
@ -126,7 +157,7 @@ function initSafe() {
// Build request data object
const requestData: any = {
szrwId: props.resCode
wagaCode: props.resCode
};
// Only add identifyTime if it has a value
@ -182,9 +213,9 @@ onMounted(() => {
}
.reset-button {
background-color: #666;
border-color: #666;
color: black;
background-color: #3a89fe;
border-color: #3a89fe;
color: white;
}
}
}
@ -202,29 +233,203 @@ onMounted(() => {
}
}
/* 详情对话框样式 */
.detail-container {
padding: 10px;
.dialog-fade-enter-active,
.dialog-fade-leave-active {
transition: opacity 0.3s ease, transform 0.3s ease;
}
.dialog-fade-enter-from,
.dialog-fade-leave-to {
opacity: 0;
transform: scale(0.9);
}
.modern-dialog-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
backdrop-filter: blur(4px);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
}
.modern-dialog-container {
width: 550px;
max-width: 90%;
background: #fff;
border-radius: 12px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
overflow: hidden;
display: flex;
flex-direction: column;
animation: dialog-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes dialog-slide-in {
0% {
opacity: 0;
transform: translateY(30px);
}
100% {
opacity: 1;
transform: translateY(0);
}
}
.modern-dialog-header {
padding: 20px 24px;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
color: #fff;
.modern-dialog-title {
display: flex;
align-items: center;
.title-icon {
margin-right: 12px;
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.2);
}
h3 {
margin: 0;
font-size: 18px;
font-weight: 600;
}
}
.modern-dialog-close {
background: transparent;
border: none;
cursor: pointer;
color: #fff;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: background-color 0.2s;
&:hover {
background-color: rgba(255, 255, 255, 0.2);
}
}
}
.modern-dialog-content {
padding: 24px;
flex: 1;
overflow-y: auto;
.detail-card {
background: #f8f9fa;
border-radius: 8px;
padding: 20px;
}
.detail-item {
margin-bottom: 15px;
display: flex;
align-items: flex-start;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
transition: transform 0.2s, box-shadow 0.2s;
&:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
&:hover {
transform: translateX(5px);
}
.detail-icon {
flex-shrink: 0;
width: 40px;
height: 40px;
border-radius: 8px;
background: linear-gradient(135deg, #0acccc 0%, #0acccc 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
margin-right: 16px;
}
.detail-content {
flex: 1;
display: flex;
flex-direction: column;
}
.detail-label {
width: 120px;
font-weight: 500;
color: #606266;
font-size: 14px;
color: #666;
margin-bottom: 6px;
}
.detail-value {
flex: 1;
font-size: 16px;
font-weight: 500;
color: #333;
}
&.conclusion-item {
.conclusion-value {
font-size: 16px;
font-weight: 500;
color: #333;
padding: 12px;
background: #fff;
border-radius: 6px;
border-left: 4px solid #0acccc;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
}
}
}
.dialog-footer {
text-align: right;
margin-top: 20px;
.modern-dialog-footer {
padding: 16px 24px;
display: flex;
justify-content: flex-end;
background: #f8f9fa;
border-top: 1px solid #e9ecef;
.close-button {
background: linear-gradient(135deg, #2C7EF8 0%, #2C5EF8 100%);
border: none;
color: white;
padding: 10px 24px;
border-radius: 6px;
font-weight: 500;
cursor: pointer;
transition: transform 0.15s, box-shadow 0.15s;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(44, 126, 248, 0.3);
}
&:active {
transform: translateY(0);
}
}
}
</style>

4
src/views/Main/index.vue

@ -60,9 +60,9 @@ const showBottomPanel = ref(true);
const showLayerTree = ref(false);
const showReservoir = ref(false); //
const reservoirData = ref({});
const showSluice = ref(false); //
const showSluice = ref(true); //
const sluiceData = ref({});
const showDike = ref(true); //
const showDike = ref(false); //
const dikeData = ref({});
function layerTreeChange(val: boolean) {
showLayerTree.value = val;

2
vite.config.ts

@ -92,7 +92,7 @@ export default defineConfig(({ mode }) => {
rewrite: (path) => path.replace(/^\/api/, "/tianhui-admin-web"),
},
"/api": {
target: "http://shuili.product.dev.com:30115/", // 'http://172.16.34.59:18083'
target: "http://127.0.0.1:18082", // 'http://172.16.34.59:18083'
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, "/tianhui-admin-web"),
},

Loading…
Cancel
Save