From f3617593bf3a08eb88b29637332a863bc0eec0f2 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期日, 28 四月 2024 10:28:25 +0800 Subject: [PATCH] 图片预览组件 --- src/views/system/contract/index.vue | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/system/contract/index.vue b/src/views/system/contract/index.vue index ec6f212..b1da0d2 100644 --- a/src/views/system/contract/index.vue +++ b/src/views/system/contract/index.vue @@ -4,9 +4,8 @@ <el-row v-loading="loading"> <el-col :span="8" v-for="(item, index) in contractList" :key="index" style="margin: 10px;width: 30%;"> <el-card :body-style="{ padding: '0px' }"> - <el-image style="width: 420px;height: 187px;" - :preview-src-list="['https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357']" - fit="cover" src="https://img2.baidu.com/it/u=68398439,1553004927&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=357" + <ImagePreview style="width: 420px;height: 187px;" + fit="cover" :src="item.attachment" class="image" /> <div style="padding: 14px;"> <span>{{ item.name }}</span> @@ -34,7 +33,7 @@ <el-collapse-item v-for="(item, index) in ruleData" :key="index" :title="item.ruleName" :name="index"> <div class="inline-input-container" v-for="(item, index) in item.children" :key="index"> <b>{{ item.ruleDesc }}</b> <br v-if="item.ruleDesc"/> - <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory + ' ' + item.calcFraction + (item.calcUnit ? '/' + item.calcUnit : '')" placement="top"> + <el-tooltip class="item" v-for="(item, index) in item.children" :key="index" effect="dark" :content="item.deductCategory == '鍒嗘暟涔樹互鏁伴噺' ? '鎵�' + item.calcFraction + '涔樹互鏁伴噺 ' : item.deductCategory == '闄や互鏁伴噺鍚庝箻浠ュ垎鏁�' ? '鎵�' + item.calcFraction + '鍒�/' + item.calcUnit + '灏忔椂' : item.deductCategory + ' ' + item.calcFraction" placement="top"> <span>{{ item.ruleCondition }}<br/></span> <!-- {{ item.deductCategory }} {{ item.calcFraction }}{{ item.calcUnit ? "/" + item.calcUnit : '' }} --> </el-tooltip> @@ -146,9 +145,11 @@ import { unitSelect } from "../../../api/platform/unit"; import { deptSelect } from "../../../api/system/dept"; import { getToken } from "@/utils/auth"; +import { ImagePreview } from "@/components/ImagePreview"; export default { name: "Contract", + comments: { ImagePreview }, data() { return { loading: false, -- Gitblit v1.8.0