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