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) { export function getSwtz(id: any) {

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

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

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

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

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

@ -5,16 +5,15 @@
<div class="search-item"> <div class="search-item">
<span class="option-label">采购时间</span> <span class="option-label">采购时间</span>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="procurementTime"
type="daterange" type="date"
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
start-placeholder="开始日期" placeholder="选择日期"
end-placeholder="结束日期"
style="width: 240px" style="width: 240px"
/> />
</div> </div>
<div class="search-item"> <div class="search-item" style="margin-left: 10px">
<span class="option-label">物资名称</span> <span class="option-label">物资名称</span>
<el-input <el-input
v-model="materialName" v-model="materialName"
@ -22,14 +21,7 @@
style="width: 200px" style="width: 200px"
/> />
</div> </div>
<div class="search-item">
<span class="option-label">负责人姓名</span>
<el-input
v-model="responsiblePerson"
placeholder="请输入负责人姓名"
style="width: 200px"
/>
</div>
</div> </div>
<div class="right-options"> <div class="right-options">
<el-button type="primary" class="add-button" @click="handleSearch">查询</el-button> <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 type="index" label="序号" width="120" align="center" />
<el-table-column prop="materialName" label="物资名称" width="180" align="center" /> <el-table-column prop="materialName" label="物资名称" width="180" align="center" />
<el-table-column prop="materialNumber" label="物资数量" align="center" /> <el-table-column prop="materialNumber" label="物资数量" align="center" />
<el-table-column prop="materialType" label="物资类型" align="center" /> <el-table-column prop="materialType" label="物资类型" align="center" >
<el-table-column prop="materialNumber" 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"> <el-table-column label="操作" align="center" width="120">
<template #default="scope"> <template #default="scope">
<el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button> <el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button>
@ -52,40 +49,129 @@
</el-table> </el-table>
</div> </div>
<el-dialog <Teleport to="body">
v-model="dialogVisible" <Transition name="dialog-fade">
title="物资详情" <div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
width="50%" <div class="modern-dialog-container" @click.stop>
:before-close="handleDialogClose" <div class="modern-dialog-header">
> <div class="modern-dialog-title">
<div class="detail-container"> <div class="title-icon">
<div class="detail-item"> <i class="el-icon-document"></i>
<span class="detail-label">物资名称</span> </div>
<span class="detail-value">{{ currentRow.materialName || '--' }}</span> <h3>防汛物资详情</h3>
</div> </div>
<div class="detail-item"> <button class="modern-dialog-close" @click="dialogVisible = false">
<span class="detail-label">物资数量</span> <svg viewBox="0 0 24 24" width="24" height="24">
<span class="detail-value">{{ currentRow.materialNumber || '--' }}</span> <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"/>
</div> </svg>
<div class="detail-item"> </button>
<span class="detail-label">物资类型</span> </div>
<span class="detail-value">{{ currentRow.materialType || '--' }}</span>
</div> <div class="modern-dialog-content">
<div class="detail-item"> <div class="detail-card">
<span class="detail-label">采购时间</span> <div class="detail-item">
<span class="detail-value">{{ currentRow.purchaseTime || '--' }}</span>
</div> <div class="detail-content">
<div class="detail-item"> <span class="detail-label">物资名称</span>
<span class="detail-label">负责人</span> <span class="detail-value">{{ currentRow.materialName || '--' }}</span>
<span class="detail-value">{{ currentRow.responsiblePerson || '--' }}</span> </div>
</div> </div>
</div>
<template #footer> <div class="detail-item">
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button> <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> </Transition>
</el-dialog> </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> </div>
</template> </template>
@ -93,7 +179,11 @@
import {ref, onMounted, watch, reactive} from 'vue'; import {ref, onMounted, watch, reactive} from 'vue';
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import {listAqjdxx, listFzwz} from "~/api/dike"; 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({ const props = defineProps({
resCode: { resCode: {
type: String as PropType<string>, type: String as PropType<string>,
@ -103,7 +193,7 @@ const props = defineProps({
const dateRange = ref([]); const dateRange = ref([]);
const materialName = ref(''); const materialName = ref('');
const responsiblePerson = ref(''); const responsiblePerson = ref('');
const procurementTime=ref(null)
// Dialog visibility // Dialog visibility
const dialogVisible = ref(false); const dialogVisible = ref(false);
@ -111,11 +201,22 @@ const dialogVisible = ref(false);
const currentRow = reactive({ const currentRow = reactive({
materialName: '', materialName: '',
materialNumber: '', materialNumber: '',
personLevel:'',
personPhone:'',
shelfLife:'',
materialType: '', materialType: '',
purchaseTime: '', procurementTime: '',
responsiblePerson: '' personName: ''
}); });
const handleReset = () => {
procurementTime.value = null;
materialName.value = '';
responsiblePerson.value = '';
initFxwz();
};
// View function // View function
const handleView = (row: any) => { const handleView = (row: any) => {
console.log('View row:', row); console.log('View row:', row);
@ -124,17 +225,31 @@ const handleView = (row: any) => {
currentRow.materialName = row.materialName || ''; currentRow.materialName = row.materialName || '';
currentRow.materialNumber = row.materialNumber || ''; currentRow.materialNumber = row.materialNumber || '';
currentRow.materialType = row.materialType || ''; currentRow.materialType = row.materialType || '';
currentRow.purchaseTime = row.purchaseTime || ''; currentRow.procurementTime = row.procurementTime || '';
currentRow.responsiblePerson = row.responsiblePerson || ''; currentRow.personName = row.personName || '';
currentRow.personPhone=row.personPhone||'',
currentRow.personLevel=row.personLevel||'',
currentRow.shelfLife=row.shelfLife||''
// Show dialog // Show dialog
dialogVisible.value = true; dialogVisible.value = true;
}; };
const typesMaterials=ref([])
// Handle dialog close // Handle dialog close
const handleDialogClose = () => { const handleDialogClose = () => {
dialogVisible.value = false; 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 // Search function
const handleSearch = () => { const handleSearch = () => {
@ -171,24 +286,25 @@ function initFxwz() {
dikeCode: props.resCode, dikeCode: props.resCode,
}; };
if (procurementTime.value){
requestData.procurementTime=procurementTime.value;
}
// Add search parameters if they exist // Add search parameters if they exist
if (materialName.value) { if (materialName.value) {
requestData.materialName = materialName.value; requestData.materialName = materialName.value;
} }
if (responsiblePerson.value) { if (responsiblePerson.value) {
requestData.responsiblePerson = responsiblePerson.value; requestData.personName = responsiblePerson.value;
} }
// Add date range if selected // Add date range if selected
if (dateRange.value && dateRange.value.length === 2) {
requestData.startTime = dateRange.value[0];
requestData.endTime = dateRange.value[1];
}
listFzwz({ listFzwz({
page: 1, page: 1,
pageSize: 10, pageSize: 10,
data:requestData data:requestData
}).then((res) => { }).then((res) => {
if (res) { if (res) {
tableData.value=res.records || []; tableData.value=res.records || [];
@ -197,6 +313,7 @@ function initFxwz() {
} }
onMounted(() => { onMounted(() => {
getType();
initFxwz(); initFxwz();
}); });
</script> </script>
@ -214,13 +331,24 @@ onMounted(() => {
.left-options { .left-options {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap;
gap: 15px;
.option-label { .search-item {
margin-right: 8px; display: flex;
align-items: center;
.option-label {
padding: 15px;
white-space: nowrap;
}
} }
} }
.right-options { .right-options {
display: flex;
align-items: center;
.add-button { .add-button {
background-color: #4cd964; background-color: #4cd964;
border-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> </style>

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

@ -33,36 +33,68 @@
</el-table> </el-table>
</div> </div>
<el-dialog
v-model="dialogVisible" <Teleport to="body">
title="安全评定详情" <Transition name="dialog-fade">
width="50%" <div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
:before-close="handleDialogClose" <div class="modern-dialog-container" @click.stop>
> <div class="modern-dialog-header">
<div class="detail-container"> <div class="modern-dialog-title">
<div class="detail-item"> <div class="title-icon">
<span class="detail-label">安全评定时间</span> <i class="el-icon-document"></i>
<span class="detail-value">{{ currentRow.identifyTime || '--' }}</span> </div>
</div> <h3>安全评定详情</h3>
<div class="detail-item"> </div>
<span class="detail-label">安全评的单位</span> <button class="modern-dialog-close" @click="dialogVisible = false">
<span class="detail-value">{{ currentRow.safetyEvaluationUnit || '--' }}</span> <svg viewBox="0 0 24 24" width="24" height="24">
</div> <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"/>
<div class="detail-item"> </svg>
<span class="detail-label">评价单位资质</span> </button>
<span class="detail-value">{{ currentRow.unitQualification || '--' }}</span> </div>
</div>
<div class="detail-item"> <div class="modern-dialog-content">
<span class="detail-label">安全评价结论</span> <div class="detail-card">
<span class="detail-value">{{ currentRow.mainIssues || '--' }}</span> <div class="detail-item">
</div>
</div> <div class="detail-content">
<template #footer> <span class="detail-label">安全评定时间</span>
<div class="dialog-footer"> <span class="detail-value">{{ currentRow.identifyTime || '--' }}</span>
<el-button @click="dialogVisible = false">关闭</el-button> </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> </div>
</template> </Transition>
</el-dialog> </Teleport>
</div> </div>
</template> </template>
@ -74,7 +106,7 @@ import {listAqjdxx, listJyjl} from "~/api/dike";
const props = defineProps({ const props = defineProps({
resCode: { resCode: {
type: String as PropType<string>, type: String as PropType<string>,
default: '', default: 'HP017440705000067X',
}, },
}); });
@ -85,33 +117,34 @@ const identifyTime = ref(null);
// Search parameters // Search parameters
const searchDate = ref([]); const searchDate = ref([]);
// View function // Watch for resCode changes
// const handleView = (row: any) => { // watch(
// console.log('View row:', row); // () => props.resCode,
// }; // (newVal) => {
// if (newVal) {
// Fetch data based on resCode changes // fetchSafetyData();
watch( // }
() => props.resCode, // },
(newVal) => { // { immediate: true }
if (newVal) { // );
fetchSafetyData();
}
},
{ immediate: true }
);
// Fetch safety appraisal data // Fetch safety appraisal data
const fetchSafetyData = async () => { // const fetchSafetyData = async () => {
//
// };
}; // Current row data for dialog
const currentRow = reactive({ const currentRow = reactive({
identifyTime: '', identifyTime: '',
safetyEvaluationUnit: '', safetyEvaluationUnit: '',
unitQualification: '', unitQualification: '',
mainIssues: '' mainIssues: ''
}); });
// Dialog visibility
const dialogVisible = ref(false);
// Handle viewing a row
const handleView = (row: any) => { const handleView = (row: any) => {
console.log('View row:', row); console.log('View row:', row);
// Copy row data to currentRow // Copy row data to currentRow
@ -120,26 +153,33 @@ const handleView = (row: any) => {
currentRow.unitQualification = row.unitQualification || ''; currentRow.unitQualification = row.unitQualification || '';
currentRow.mainIssues = row.mainIssues || ''; currentRow.mainIssues = row.mainIssues || '';
// Show dialog // Show dialog with animation
dialogVisible.value = true; dialogVisible.value = true;
}; };
// Handle dialog overlay click
const handleOverlayClick = (e: MouseEvent) => {
dialogVisible.value = false;
};
// Reset filter
const resetFilter = () => { const resetFilter = () => {
identifyTime.value = null; identifyTime.value = null;
initSafe(); initSafe();
}; };
const dialogVisible = ref(false);
// Initialize safety data
function initSafe() { function initSafe() {
console.log("Selected date:", identifyTime.value); console.log("Selected date:", identifyTime.value);
// Build request data object // Build request data object
const requestData: any = { const requestData: any = {
dfrwId: props.resCode dikeCode: props.resCode
}; };
// Only add identifyTime if it has a value // Only add identifyTime if it has a value
if (identifyTime.value) { if (identifyTime.value) {
requestData.identifyTime = identifyTime.value; requestData.identifyTime= identifyTime.value;
} }
listAqjdxx({ listAqjdxx({
page: 1, page: 1,
@ -152,7 +192,6 @@ function initSafe() {
}); });
} }
onMounted(() => { onMounted(() => {
initSafe(); initSafe();
}); });
@ -162,7 +201,7 @@ onMounted(() => {
.safety-appraisal-container { .safety-appraisal-container {
padding: 16px; padding: 16px;
height: 100%; height: 100%;
color: #333; // color: #333;
.top-options { .top-options {
display: flex; display: flex;
@ -195,8 +234,8 @@ onMounted(() => {
.table-container { .table-container {
.custom-table { .custom-table {
.el-table__cell { .el-table__cell {
color: #333; // 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> </style>

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

@ -28,7 +28,7 @@
<div class="table-container"> <div class="table-container">
<el-table :data="tableData" border style="width: 100%;color: black"> <el-table :data="tableData" border style="width: 100%;color: black">
<el-table-column type="index" label="序号" width="120" align="center" /> <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 }"> <template #default="{ row }">
{{projTypeFormat(row.regulationsAttachment)}} {{projTypeFormat(row.regulationsAttachment)}}
</template> </template>
@ -43,17 +43,12 @@
{{ item.name }} {{ item.name }}
<i <i
class="el-icon-download" class="el-icon-download"
@click="downloadFile(item, index)"
style="cursor: pointer" style="cursor: pointer"
></i> ></i>
</div> </div>
</template> </template>
</el-table-column> </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> </el-table>
</div> </div>
</div> </div>
@ -105,7 +100,15 @@ const searchDate = ref([]);
const handleSearch = () => { const handleSearch = () => {
initDagl(); 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 = () => { const handleReset = () => {
selectedFileType.value = ''; selectedFileType.value = '';

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

@ -5,12 +5,11 @@
<div class="search-item"> <div class="search-item">
<span class="option-label">采购时间</span> <span class="option-label">采购时间</span>
<el-date-picker <el-date-picker
v-model="dateRange" v-model="procurementTime"
type="daterange" type="date"
format="YYYY-MM-DD" format="YYYY-MM-DD"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
start-placeholder="开始日期" placeholder="选择日期"
end-placeholder="结束日期"
style="width: 240px" style="width: 240px"
/> />
</div> </div>
@ -22,14 +21,7 @@
style="width: 200px" style="width: 200px"
/> />
</div> </div>
<div class="search-item">
<span class="option-label">负责人姓名</span>
<el-input
v-model="responsiblePerson"
placeholder="请输入负责人姓名"
style="width: 200px"
/>
</div>
</div> </div>
<div class="right-options"> <div class="right-options">
<el-button type="primary" class="add-button" @click="handleSearch">查询</el-button> <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 type="index" label="序号" width="120" align="center" />
<el-table-column prop="materialName" label="物资名称" width="180" align="center" /> <el-table-column prop="materialName" label="物资名称" width="180" align="center" />
<el-table-column prop="materialNumber" label="物资数量" align="center" /> <el-table-column prop="materialNumber" label="物资数量" align="center" />
<el-table-column prop="materialType" label="物资类型" align="center" /> <el-table-column prop="materialType" label="物资类型" align="center" >
<el-table-column prop="purchaseTime" 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 prop="responsiblePerson" label="负责人" align="center" />
<el-table-column label="操作" align="center" width="120"> <el-table-column label="操作" align="center" width="100">
<template #default="scope"> <template #default="scope">
<el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button> <el-button type="text" class="view-button" @click="handleView(scope.row)">查看</el-button>
</template> </template>
@ -54,40 +49,95 @@
</div> </div>
<!-- 查看详情对话框 --> <!-- 查看详情对话框 -->
<el-dialog <Teleport to="body">
v-model="dialogVisible" <Transition name="dialog-fade">
title="物资详情" <div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
width="50%" <div class="modern-dialog-container" @click.stop>
:before-close="handleDialogClose" <div class="modern-dialog-header">
> <div class="modern-dialog-title">
<div class="detail-container"> <div class="title-icon">
<div class="detail-item"> <i class="el-icon-document"></i>
<span class="detail-label">物资名称</span> </div>
<span class="detail-value">{{ currentRow.materialName || '--' }}</span> <h3>防汛物资详情</h3>
</div> </div>
<div class="detail-item"> <button class="modern-dialog-close" @click="dialogVisible = false">
<span class="detail-label">物资数量</span> <svg viewBox="0 0 24 24" width="24" height="24">
<span class="detail-value">{{ currentRow.materialNumber || '--' }}</span> <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"/>
</div> </svg>
<div class="detail-item"> </button>
<span class="detail-label">物资类型</span> </div>
<span class="detail-value">{{ currentRow.materialType || '--' }}</span>
</div> <div class="modern-dialog-content">
<div class="detail-item"> <div class="detail-card">
<span class="detail-label">采购时间</span> <div class="detail-item">
<span class="detail-value">{{ currentRow.purchaseTime || '--' }}</span>
</div> <div class="detail-content">
<div class="detail-item"> <span class="detail-label">物资名称</span>
<span class="detail-label">负责人</span> <span class="detail-value">{{ currentRow.materialName || '--' }}</span>
<span class="detail-value">{{ currentRow.responsiblePerson || '--' }}</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>
</div> </Transition>
<template #footer> </Teleport>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">关闭</el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
@ -95,6 +145,8 @@
import { ref, onMounted, watch, reactive } from 'vue'; import { ref, onMounted, watch, reactive } from 'vue';
import type { PropType } from 'vue'; import type { PropType } from 'vue';
import {listFzwz} from "~/api/sluice"; import {listFzwz} from "~/api/sluice";
import {getDicts} from "~/api/common";
import {getDictLabel} from "~/utils/dictUtils";
const props = defineProps({ const props = defineProps({
resCode: { resCode: {
@ -113,15 +165,23 @@ const responsiblePerson = ref('');
// Dialog visibility // Dialog visibility
const dialogVisible = ref(false); const dialogVisible = ref(false);
const typesMaterials=ref([])
// Current row being viewed // Current row being viewed
const currentRow = reactive({ const currentRow = reactive({
materialName: '', materialName: '',
materialNumber: '', materialNumber: '',
personLevel:'',
personPhone:'',
shelfLife:'',
materialType: '', materialType: '',
purchaseTime: '', procurementTime: '',
responsiblePerson: '' personName: ''
}); });
function getType() {
getDicts("types_materials").then((res) => {
typesMaterials.value = res || [];
});
}
// View function // View function
const handleView = (row: any) => { const handleView = (row: any) => {
@ -131,9 +191,11 @@ const handleView = (row: any) => {
currentRow.materialName = row.materialName || ''; currentRow.materialName = row.materialName || '';
currentRow.materialNumber = row.materialNumber || ''; currentRow.materialNumber = row.materialNumber || '';
currentRow.materialType = row.materialType || ''; currentRow.materialType = row.materialType || '';
currentRow.purchaseTime = row.purchaseTime || ''; currentRow.procurementTime = row.procurementTime || '';
currentRow.responsiblePerson = row.responsiblePerson || ''; currentRow.personName = row.personName || '';
currentRow.personPhone=row.personPhone||'',
currentRow.personLevel=row.personLevel||'',
currentRow.shelfLife=row.shelfLife||''
// Show dialog // Show dialog
dialogVisible.value = true; dialogVisible.value = true;
}; };
@ -142,7 +204,9 @@ const handleView = (row: any) => {
const handleDialogClose = () => { const handleDialogClose = () => {
dialogVisible.value = false; dialogVisible.value = false;
}; };
const handleOverlayClick = (e: MouseEvent) => {
dialogVisible.value = false;
};
// Search function // Search function
const handleSearch = () => { const handleSearch = () => {
initFxwz(); initFxwz();
@ -150,7 +214,7 @@ const handleSearch = () => {
// Reset function // Reset function
const handleReset = () => { const handleReset = () => {
dateRange.value = []; procurementTime.value = null;
materialName.value = ''; materialName.value = '';
responsiblePerson.value = ''; responsiblePerson.value = '';
initFxwz(); initFxwz();
@ -166,13 +230,16 @@ watch(
}, },
{ immediate: true } { immediate: true }
); );
const procurementTime=ref(null)
function initFxwz() { function initFxwz() {
// Prepare request data // Prepare request data
const requestData: any = { const requestData: any = {
wagaCode: props.resCode, wagaCode: props.resCode,
}; };
if (procurementTime.value){
requestData.procurementTime=procurementTime.value;
}
// Add search parameters if they exist // Add search parameters if they exist
if (materialName.value) { if (materialName.value) {
requestData.materialName = materialName.value; requestData.materialName = materialName.value;
@ -183,10 +250,6 @@ function initFxwz() {
} }
// Add date range if selected // Add date range if selected
if (dateRange.value && dateRange.value.length === 2) {
requestData.startTime = dateRange.value[0];
requestData.endTime = dateRange.value[1];
}
listFzwz({ listFzwz({
page: 1, page: 1,
@ -200,8 +263,13 @@ function initFxwz() {
console.error("API error:", error); console.error("API error:", error);
}); });
} }
function projTypeFormat(key: string) {
if (!key) return '--';
return getDictLabel(typesMaterials.value, key) || key;
}
onMounted(() => { onMounted(() => {
getType()
initFxwz(); initFxwz();
}); });
</script> </script>
@ -227,7 +295,7 @@ onMounted(() => {
align-items: center; align-items: center;
.option-label { .option-label {
margin-right: 8px; padding: 15px;
white-space: nowrap; white-space: nowrap;
} }
} }
@ -283,4 +351,204 @@ onMounted(() => {
text-align: right; text-align: right;
margin-top: 20px; 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> </style>

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

@ -34,36 +34,67 @@
</div> </div>
<!-- 查看详情对话框 --> <!-- 查看详情对话框 -->
<el-dialog <Teleport to="body">
v-model="dialogVisible" <Transition name="dialog-fade">
title="安全评定详情" <div v-if="dialogVisible" class="modern-dialog-overlay" @click="handleOverlayClick">
width="50%" <div class="modern-dialog-container" @click.stop>
:before-close="handleDialogClose" <div class="modern-dialog-header">
> <div class="modern-dialog-title">
<div class="detail-container"> <div class="title-icon">
<div class="detail-item"> <i class="el-icon-document"></i>
<span class="detail-label">安全评定时间</span> </div>
<span class="detail-value">{{ currentRow.identifyTime || '--' }}</span> <h3>安全评定详情</h3>
</div> </div>
<div class="detail-item"> <button class="modern-dialog-close" @click="dialogVisible = false">
<span class="detail-label">安全评的单位</span> <svg viewBox="0 0 24 24" width="24" height="24">
<span class="detail-value">{{ currentRow.safetyEvaluationUnit || '--' }}</span> <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"/>
</div> </svg>
<div class="detail-item"> </button>
<span class="detail-label">评价单位资质</span> </div>
<span class="detail-value">{{ currentRow.unitQualification || '--' }}</span>
</div> <div class="modern-dialog-content">
<div class="detail-item"> <div class="detail-card">
<span class="detail-label">安全评价结论</span> <div class="detail-item">
<span class="detail-value">{{ currentRow.mainIssues || '--' }}</span>
</div> <div class="detail-content">
</div> <span class="detail-label">安全评定时间</span>
<template #footer> <span class="detail-value">{{ currentRow.identifyTime || '--' }}</span>
<div class="dialog-footer"> </div>
<el-button @click="dialogVisible = false">关闭</el-button> </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> </div>
</template> </Transition>
</el-dialog> </Teleport>
</div> </div>
</template> </template>
@ -76,7 +107,7 @@ import { isDate } from "lodash-es";
const props = defineProps({ const props = defineProps({
resCode: { resCode: {
type: String as PropType<string>, type: String as PropType<string>,
default: '1900034196855689218', default: '',
} }
}); });
@ -126,7 +157,7 @@ function initSafe() {
// Build request data object // Build request data object
const requestData: any = { const requestData: any = {
szrwId: props.resCode wagaCode: props.resCode
}; };
// Only add identifyTime if it has a value // Only add identifyTime if it has a value
@ -182,9 +213,9 @@ onMounted(() => {
} }
.reset-button { .reset-button {
background-color: #666; background-color: #3a89fe;
border-color: #666; border-color: #3a89fe;
color: black; color: white;
} }
} }
} }
@ -202,29 +233,203 @@ onMounted(() => {
} }
} }
/* 详情对话框样式 */ .dialog-fade-enter-active,
.detail-container { .dialog-fade-leave-active {
padding: 10px; 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 { .detail-item {
margin-bottom: 15px;
display: flex; 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 { .detail-label {
width: 120px; font-size: 14px;
font-weight: 500; color: #666;
color: #606266; margin-bottom: 6px;
} }
.detail-value { .detail-value {
flex: 1; font-size: 16px;
font-weight: 500;
color: #333; 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 { .modern-dialog-footer {
text-align: right; padding: 16px 24px;
margin-top: 20px; 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> </style>

4
src/views/Main/index.vue

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

2
vite.config.ts

@ -92,7 +92,7 @@ export default defineConfig(({ mode }) => {
rewrite: (path) => path.replace(/^\/api/, "/tianhui-admin-web"), rewrite: (path) => path.replace(/^\/api/, "/tianhui-admin-web"),
}, },
"/api": { "/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, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, "/tianhui-admin-web"), rewrite: (path) => path.replace(/^\/api/, "/tianhui-admin-web"),
}, },

Loading…
Cancel
Save