Commit df5972b5 by wuqian

Merge branch 'master' of http://47.99.244.21:9999/qinjianhui/factory_front into wq

parents c85f75d9 82c2eed0
......@@ -42,7 +42,6 @@
import { computed, ref, watch } from 'vue'
import { Plus, Close } from '@element-plus/icons-vue'
import { uploadImageApi, uploadFileApi } from '@/api/common'
import { getFilePath } from '@/api/axios'
const props = defineProps({
modelValue: String,
disabled: Boolean,
......@@ -87,7 +86,7 @@ const onChange = async (e: Event) => {
const files = (e.target as HTMLInputElement).files
if (!files) return
const file = files[0]
let isLtTenM = file.size / 1024 / 1024 < 100;
const isLtTenM = file.size / 1024 / 1024 < 200;
if (!isLtTenM) {
ElMessage.error("上传文件大小不能超过 200MB!");
return isLtTenM;
......@@ -146,7 +145,7 @@ const filename = (path: string) => {
}
const downloadFile = (item: FileItem) => {
window.open(getFilePath() + item.path)
window.open(item.path)
}
const removeFile = (i: number) => {
files.value.splice(i, 1)
......
......@@ -329,9 +329,9 @@ const submitReview = async (data: TypesettingListData, isDetail = false) => {
detailable.value = isDetail
try {
submitReviewModelRef.value?.getExamineInfo(data)
// if (data.state === '701' || data.state === '901') {
if (data.state === '601' ||data.state === '701' || data.state === '901') {
submitReviewModelRef.value?.getPriceDetail(data)
// }
}
const res = await getTypesettingDetail(data.id)
row.value = res.data
nextTick(() => {
......
......@@ -19,12 +19,17 @@
v-for="(item, index) of row?.imageList"
:key="index"
class="color-image-item"
@mouseover="onMouseover(item.imagePath)"
>
<img :src="item.imagePath" alt="" class="img-sign" />
</div>
</div>
<div class="modals-image-big">
<img :src="row?.mainImage" alt="" class="img-sign" />
<img
:src="mainImageUrl || row?.imageList[0]?.imagePath"
alt=""
class="img-sign"
/>
</div>
</div>
</div>
......@@ -113,6 +118,7 @@
v-for="(item, index) of versionImageList"
:key="index"
class="color-image-item"
@mousemove="onRightMouseover(item?.imagePath)"
>
<img :src="item.imagePath" alt="" class="img-sign" />
<span
......@@ -311,7 +317,7 @@
<ElCol :span="12">
<div class="detail-info-item">
<span class="label">样板要求</span>
<p v-dompurify-html="row?.remark"></p>
<p v-dompurify-html="row?.requirement"></p>
</div>
</ElCol>
</ElRow>
......@@ -429,6 +435,7 @@ watch(visible, (val) => {
} else {
activeName.value = 'first'
}
mainImageUrl.value = props.row?.mainImage
}
})
const opinion = ref('')
......@@ -547,12 +554,12 @@ const getExamineInfo = async (data: TypesettingListData) => {
const res = await getExamineInfoByIdApi(data.id)
if (!res.data) return
versionList.value = res.data
if (data?.state === '301' || data?.state === '401') {
versionList.value.push({
version: versionList.value.length + 1,
examineImages: [],
})
}
// if (data?.state === '301' || data?.state === '401') {
versionList.value.push({
version: versionList.value.length + 1,
examineImages: [],
})
// }
if (res.data.length > 0) {
version.value = res.data[res.data.length - 1].version ?? 1
lastVersion.value = res.data[res.data.length - 1].version ?? 1
......@@ -676,6 +683,13 @@ const getPriceDetail = async (data: TypesettingListData) => {
console.error(e)
}
}
const mainImageUrl = ref<string>('')
const onMouseover = (url: string) => {
mainImageUrl.value = url
}
const onRightMouseover = (url: string | undefined) => {
versionImageUrl.value = url || ''
}
defineExpose({ getExamineInfo, reset, getPriceDetail })
</script>
......@@ -696,6 +710,8 @@ defineExpose({ getExamineInfo, reset, getPriceDetail })
width: 60px;
height: 60px;
border: 1px solid #eee;
margin-bottom: 5px;
cursor: pointer;
img {
width: 100%;
height: 100%;
......@@ -775,6 +791,7 @@ defineExpose({ getExamineInfo, reset, getPriceDetail })
}
.detail-info {
height: 600px;
overflow-y: auto;
:deep(.el-row) {
height: 30px;
line-height: 30px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment