list1 图片路径方法

main
significative 4 months ago
parent 838ee2836a
commit de2a695edc
  1. 40
      jeecgboot-vue3-master/src/views/awardpersion/AwardPersionList1.vue

@ -2,11 +2,13 @@
<div>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24">
<a-col :lg="8">
<a-form-item label="年度" name="annualid">
<j-dict-select-tag placeholder="请选择年度" v-model:value="queryParam.annualid" dictCode="annual,annual_name,id"/>
<j-dict-select-tag placeholder="请选择年度" v-model:value="queryParam.annualid"
dictCode="annual,annual_name,id" />
</a-form-item>
</a-col>
<a-col :lg="8">
@ -18,7 +20,8 @@
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
@ -61,7 +64,23 @@
</template>
<template #fileSlot="{ text }">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small"
@click="downloadFile(text)">下载</a-button>
</template>
<!--图标查看---->-->
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'sczs'">
<Avatar :size="25" shape="square">
<template #icon>
<div style="width: 20px;height: 20px;position: relative;">
<Icon icon="mainHome-awPictureOutlined|svg" :size="25" v-if="!record.sczs"
style="position: absolute;inset: 0;z-index:8;" />
<ImagePreview :imageList="[{ src: getImgView(record.sczs), width: 25 }]"
style="position: absolute;inset: 0px;z-index:9;" />
</div>
</template>
</Avatar>
</template>
</template>
</BasicTable>
<!-- 表单区域 -->
@ -72,6 +91,17 @@
</template>
<script lang="ts" name="awardpersion-awardPersion" setup>
// ===========================================
import { Avatar } from 'ant-design-vue';
import { ImagePreview } from '/@/components/Preview/index';
import { getFileAccessHttpUrlzs } from '/@/utils/common/compUtils';
function getImgView(text) {
if (text && text.indexOf(',') > 0) {
text = text.substring(0, text.indexOf(','));
}
return getFileAccessHttpUrlzs(text)
}
// ===========================================^
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
@ -271,10 +301,12 @@
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
width: calc(50% - 15px);
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;

Loading…
Cancel
Save