|
@@ -6,19 +6,22 @@
|
|
:preview-src-list="showSrcList" fit="cover" />
|
|
:preview-src-list="showSrcList" fit="cover" />
|
|
</div> -->
|
|
</div> -->
|
|
<div class="imgView">
|
|
<div class="imgView">
|
|
- <el-scrollbar>
|
|
|
|
- <PDFView :need-to-show-pdf="true" :show-pdf-number="3" :is-link="true"
|
|
|
|
- pdf-source="http://192.168.101.4:9000/jgfile/2024/04/20/%E7%AC%AC08%E7%AB%A0_%E8%81%9A%E5%90%88%E5%87%BD%E6%95%B0.pdf" />
|
|
|
|
|
|
+ <el-scrollbar ref="scrollbarRef" class="pdmView">
|
|
|
|
+ <!-- <PDFView :need-to-show-pdf="true" :show-pdf-number="3" :is-link="true"
|
|
|
|
+ pdf-source="http://192.168.101.4:9000/jgfile/2024/04/20/%E7%AC%AC08%E7%AB%A0_%E8%81%9A%E5%90%88%E5%87%BD%E6%95%B0.pdf" /> -->
|
|
|
|
+ <PDFView :need-to-show-pdf="true" :pageNumber="srcList[selectImgIndex]?.showAppointPageNum" :is-link="true"
|
|
|
|
+ :pdf-source="baseUrl + srcList[selectImgIndex]?.filePath" />
|
|
|
|
+ <Empty v-if="srcList.length < 1" />
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
</div>
|
|
</div>
|
|
- <div class="textBox">
|
|
|
|
|
|
+ <!-- <div class="textBox">
|
|
<el-scrollbar :max-height="scrollbarHeight">
|
|
<el-scrollbar :max-height="scrollbarHeight">
|
|
<div class="title">{{ srcList[selectImgIndex]?.title }}</div>
|
|
<div class="title">{{ srcList[selectImgIndex]?.title }}</div>
|
|
<div class="describe">
|
|
<div class="describe">
|
|
{{ srcList[selectImgIndex]?.content }}
|
|
{{ srcList[selectImgIndex]?.content }}
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="footer">
|
|
<div class="footer">
|
|
@@ -28,7 +31,7 @@
|
|
? 'scrollbar-demo-item '
|
|
? 'scrollbar-demo-item '
|
|
: 'scrollbar-demo-item unScrollbarItemBorder'
|
|
: 'scrollbar-demo-item unScrollbarItemBorder'
|
|
" v-for="(item, index) in srcList" @click="setImgIndex(index)">
|
|
" v-for="(item, index) in srcList" @click="setImgIndex(index)">
|
|
- <el-image class="bottomImgBox" :src="getImgurl(item.imgUrl)" fit="fill" />
|
|
|
|
|
|
+ <span>{{ item.title }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
@@ -37,48 +40,42 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import { getImgList } from "@/api/prosteps/espo";
|
|
|
|
|
|
+import { esopData } from "@/api/prosteps/espo";
|
|
import { useProcessStore } from "@/store";
|
|
import { useProcessStore } from "@/store";
|
|
import PDFView from "@/components/PDFView/index.vue";
|
|
import PDFView from "@/components/PDFView/index.vue";
|
|
const store = useProcessStore();
|
|
const store = useProcessStore();
|
|
|
|
+const baseUrl = import.meta.env.VITE_APP_UPLOAD_URL;
|
|
defineOptions({
|
|
defineOptions({
|
|
name: "Esop",
|
|
name: "Esop",
|
|
});
|
|
});
|
|
-const getImgurl = (item: any) => {
|
|
|
|
- let url = import.meta.env.VITE_APP_UPLOAD_URL + item;
|
|
|
|
- return url;
|
|
|
|
-};
|
|
|
|
//配置当前div高度
|
|
//配置当前div高度
|
|
const scrollbarHeight = ref(0);
|
|
const scrollbarHeight = ref(0);
|
|
|
|
+const scrollbarRef = ref(null);
|
|
//选取的图片索引
|
|
//选取的图片索引
|
|
const selectImgIndex = ref(0);
|
|
const selectImgIndex = ref(0);
|
|
-const setImgIndex = (index: number) => (selectImgIndex.value = index);
|
|
|
|
|
|
+const setImgIndex = (index: number) => {
|
|
|
|
+ selectImgIndex.value = index;
|
|
|
|
+ toTop();
|
|
|
|
+};
|
|
const setScrollbarHeight = () => {
|
|
const setScrollbarHeight = () => {
|
|
const viewportHeight = window.innerHeight;
|
|
const viewportHeight = window.innerHeight;
|
|
scrollbarHeight.value = viewportHeight - 300;
|
|
scrollbarHeight.value = viewportHeight - 300;
|
|
};
|
|
};
|
|
const srcList = ref([]);
|
|
const srcList = ref([]);
|
|
-const showSrcList = ref([]);
|
|
|
|
-const setShowSrcList = () => {
|
|
|
|
- let array = JSON.parse(JSON.stringify(srcList.value));
|
|
|
|
- let resArray = [];
|
|
|
|
- array.forEach((item) => {
|
|
|
|
- resArray.push(getImgurl(item.imgUrl));
|
|
|
|
- });
|
|
|
|
- showSrcList.value = resArray;
|
|
|
|
-};
|
|
|
|
-const getImgListData = async () => {
|
|
|
|
- const { data } = await getImgList({
|
|
|
|
|
|
+const getPdfListData = async () => {
|
|
|
|
+ const { data } = await esopData({
|
|
operationId: store.odersData.operationId,
|
|
operationId: store.odersData.operationId,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
pageSize: 999,
|
|
pageSize: 999,
|
|
});
|
|
});
|
|
srcList.value = data.records;
|
|
srcList.value = data.records;
|
|
};
|
|
};
|
|
|
|
+const toTop = () => {
|
|
|
|
+ scrollbarRef.value!.setScrollTop(0);
|
|
|
|
+};
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
setScrollbarHeight();
|
|
setScrollbarHeight();
|
|
- await getImgListData();
|
|
|
|
- setShowSrcList();
|
|
|
|
|
|
+ await getPdfListData();
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -100,9 +97,13 @@ onMounted(async () => {
|
|
height: calc(100vh - 318px);
|
|
height: calc(100vh - 318px);
|
|
@include flex;
|
|
@include flex;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
-
|
|
|
|
padding: $p10 0;
|
|
padding: $p10 0;
|
|
|
|
|
|
|
|
+ .pdmView {
|
|
|
|
+ width: 100%;
|
|
|
|
+ padding: $p20;
|
|
|
|
+ }
|
|
|
|
+
|
|
.img {
|
|
.img {
|
|
height: 100%;
|
|
height: 100%;
|
|
border: 0px solid;
|
|
border: 0px solid;
|
|
@@ -148,18 +149,28 @@ onMounted(async () => {
|
|
border: 2px solid #0a59f7;
|
|
border: 2px solid #0a59f7;
|
|
border-radius: 16px;
|
|
border-radius: 16px;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
+ color: #0a59f7;
|
|
|
|
+
|
|
|
|
+ span {
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ padding: 5px;
|
|
|
|
+ }
|
|
|
|
|
|
.bottomImgBox {
|
|
.bottomImgBox {
|
|
width: 90px;
|
|
width: 90px;
|
|
height: 90px;
|
|
height: 90px;
|
|
border-radius: 16px;
|
|
border-radius: 16px;
|
|
-
|
|
|
|
|
|
+ background-color: white;
|
|
@include flex;
|
|
@include flex;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.unScrollbarItemBorder {
|
|
.unScrollbarItemBorder {
|
|
- border: 0px;
|
|
|
|
|
|
+ border: 2px solid black;
|
|
|
|
+ color: black;
|
|
|
|
+ background-color: transparent;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|