fixed conflicts

This commit is contained in:
RockYang
2024-01-19 18:21:49 +08:00
20 changed files with 141 additions and 17 deletions

View File

@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4125778 */
src: url('iconfont.woff2?t=1705313263366') format('woff2'),
url('iconfont.woff?t=1705313263366') format('woff'),
url('iconfont.ttf?t=1705313263366') format('truetype');
src: url('iconfont.woff2?t=1705615887594') format('woff2'),
url('iconfont.woff?t=1705615887594') format('woff'),
url('iconfont.ttf?t=1705615887594') format('truetype');
}
.iconfont {
@@ -13,6 +13,14 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-share-bold:before {
content: "\e626";
}
.icon-cancel-share:before {
content: "\e682";
}
.icon-xls:before {
content: "\e678";
}

File diff suppressed because one or more lines are too long

View File

@@ -5,6 +5,20 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "1132455",
"name": "share-bold",
"font_class": "share-bold",
"unicode": "e626",
"unicode_decimal": 58918
},
{
"icon_id": "7567359",
"name": "cancel-share",
"font_class": "cancel-share",
"unicode": "e682",
"unicode_decimal": 59010
},
{
"icon_id": "12600976",
"name": "xls",

Binary file not shown.

View File

@@ -1,10 +1,12 @@
<template>
<el-container class="file-list-box">
<el-button class="file-upload-img" @click="fetchFiles">
<el-icon>
<PictureFilled/>
</el-icon>
</el-button>
<el-tooltip class="box-item" effect="dark" content="打开文件管理中心">
<el-button class="file-upload-img" @click="fetchFiles">
<el-icon>
<PictureFilled/>
</el-icon>
</el-button>
</el-tooltip>
<el-dialog
v-model="show"
@@ -30,7 +32,7 @@
</el-upload>
</div>
</el-col>
<el-col :span="3" v-for="file in fileList">
<el-col :span="3" v-for="file in fileList" :key="file.url">
<div class="grid-content">
<el-tooltip
class="box-item"

View File

@@ -424,6 +424,12 @@
<div class="remove">
<el-button type="danger" :icon="Delete" @click="removeImage(scope.item)" circle/>
<el-button type="warning" v-if="scope.item.publish" @click="publishImage(scope.item, false)" circle>
<i class="iconfont icon-cancel-share"></i>
</el-button>
<el-button type="success" v-else @click="publishImage(scope.item, true)" circle>
<i class="iconfont icon-share-bold"></i>
</el-button>
</div>
</div>
</template>
@@ -442,7 +448,8 @@
<script setup>
import {onMounted, ref} from "vue"
import {
ChromeFilled, Delete,
ChromeFilled,
Delete,
DeleteFilled,
DocumentCopy,
InfoFilled,
@@ -744,6 +751,20 @@ const removeImage = (item) => {
})
}
// 发布图片到作品墙
const publishImage = (item, action) => {
let text = "图片发布"
if (action === false) {
text = "取消发布"
}
httpPost("/api/mj/publish", {id: item.id, action: action}).then(() => {
ElMessage.success(text + "成功")
item.publish = action
}).catch(e => {
ElMessage.error(text + "失败:" + e.message)
})
}
</script>
<style lang="stylus">

View File

@@ -374,6 +374,13 @@
<div class="remove">
<el-button type="danger" :icon="Delete" @click="removeImage($event,scope.item)" circle/>
<el-button type="warning" v-if="scope.item.publish" @click="publishImage($event,scope.item, false)"
circle>
<i class="iconfont icon-cancel-share"></i>
</el-button>
<el-button type="success" v-else @click="publishImage($event,scope.item, true)" circle>
<i class="iconfont icon-share-bold"></i>
</el-button>
</div>
</div>
</template>
@@ -698,6 +705,21 @@ const removeImage = (event, item) => {
})
}
// 发布图片到作品墙
const publishImage = (event, item, action) => {
event.stopPropagation()
let text = "图片发布"
if (action === false) {
text = "取消发布"
}
httpPost("/api/sd/publish", {id: item.id, action: action}).then(() => {
ElMessage.success(text + "成功")
item.publish = action
}).catch(e => {
ElMessage.error(text + "失败:" + e.message)
})
}
</script>
<style lang="stylus">

View File

@@ -274,8 +274,7 @@ const getNext = () => {
loading.value = true
page.value = page.value + 1
const url = imgType.value === "mj" ? "/api/mj/jobs" : "/api/sd/jobs"
// 获取运行中的任务
httpGet(`${url}?status=1&page=${page.value}&page_size=${pageSize.value}`).then(res => {
httpGet(`${url}?status=1&page=${page.value}&page_size=${pageSize.value}&publish=true`).then(res => {
loading.value = false
if (res.data.length === 0) {
isOver.value = true

View File

@@ -60,7 +60,7 @@
<div class="info-line">
<span class="label">有效期</span>
<span class="expire" v-if="scope.item.days > 0">{{ scope.item.days }}</span>
<span class="expire" v-else>当月有效</span>
<span class="expire" v-else>长期有效</span>
</div>
<div class="pay-way">