Browse Source

代码提交

lzm_web
Linzm 8 months ago
parent
commit
416b85e11a
  1. 37
      src/views/badge/preview.vue

37
src/views/badge/preview.vue

@ -172,7 +172,11 @@ const showBgCompare = ref(false)
const currentIndex = ref(0) const currentIndex = ref(0)
const imageList = ref([]) const imageList = ref([])
function compare() { function compare() {
getCompareImage() if (extend_value == -1) {
showCompare.value = true
} else {
showBgCompare.value = true
}
} }
const kindList = ref([]) const kindList = ref([])
const checkId = ref(0) const checkId = ref(0)
@ -195,6 +199,25 @@ function sureReload() {
console.log('sureReload') console.log('sureReload')
imageUrl.value = ''; imageUrl.value = '';
group.value = newGroup.value group.value = newGroup.value
const params = {
pid: pid.value,
kind_id: checkId.value,
extend_value: extend_value.value,
group: group.value,
}
badgeApi.putMOdeling(params).then((res: any) => {
console.log('putModeling', res)
createLog()
}).catch((err) => {
console.log('putModeling', err)
showReload.value = false
}).finally(() => {
showReload.value = false
})
}
const createLog = () => {
badgeApi.createLog({ badgeApi.createLog({
pid: pid.value, pid: pid.value,
kind_id: checkId.value, kind_id: checkId.value,
@ -214,6 +237,7 @@ function sureReload() {
showReload.value = false showReload.value = false
}) })
} }
function save() { function save() {
// //
const downloadImage = (url: string) => { const downloadImage = (url: string) => {
@ -232,19 +256,15 @@ function save() {
} }
} }
const compareList = ref({}) const compareList = ref({})
const extend_value = ref(0)
function getCompareImage() { function getCompareImage() {
badgeApi.getCompareImage({ badgeApi.getCompareImage({
pid: pid.value, pid: pid.value,
group: group.value, group: group.value,
}).then((res: any) => { }).then((res: any) => {
console.log('getCompareImage', res) console.log('getCompareImage', res)
if (res.extend_value == -1) { extend_value.value = res.extend_value
showCompare.value = true compareList.value = res
compareList.value = res
} else {
showBgCompare.value = true
compareList.value = res
}
}).catch((err) => { }).catch((err) => {
console.log('getCompareImage', err) console.log('getCompareImage', err)
}).finally((err) => { }).finally((err) => {
@ -353,6 +373,7 @@ onMounted(() => {
getImageList() getImageList()
progressList() progressList()
getSizeList() getSizeList()
getCompareImage()
timer.value = setInterval(() => { timer.value = setInterval(() => {
getImageList() getImageList()
}, 10000) }, 10000)

Loading…
Cancel
Save