提交 8edfdb01 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 fc5e3333
...@@ -10,8 +10,17 @@ export function useChatImage() { ...@@ -10,8 +10,17 @@ export function useChatImage() {
// 聊天功能 // 聊天功能
const sendMessage = async (content, params = {}) => { const sendMessage = async (content, params = {}) => {
messages.value.push({ role: 'user', content, timestamp: new Date() }) messages.value.push({ role: 'user', content, timestamp: new Date() })
if (!params.size) {
if (content.includes('1:1') || content.includes('正方形')) params.size = '2048x2048'
if (content.includes('4:3') || content.includes('横屏')) params.size = '2304x1728'
if (content.includes('3:4') || content.includes('竖屏')) params.size = '1728x2304'
if (content.includes('16:9')) params.size = '2560x1440'
if (content.includes('9:16')) params.size = '1440x2560'
if (content.includes('3:2')) params.size = '2496x1664'
if (content.includes('2:3')) params.size = '1664x2496'
}
// 所有聊天都生成图片 // 所有聊天都生成图片
await handleImageGeneration({ prompt: content, ...params }) await handleImageGeneration({ prompt: content, size: '3:4', ...params })
} }
// 处理图片生成 // 处理图片生成
......
...@@ -4,6 +4,7 @@ import { getAttrList, deleteAttr } from '../api' ...@@ -4,6 +4,7 @@ import { getAttrList, deleteAttr } from '../api'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { getNameByValue, importType, requiredType } from '@/utils/dictionary' import { getNameByValue, importType, requiredType } from '@/utils/dictionary'
import LiveProductCategory from '@/components/LiveProductCategory.vue' import LiveProductCategory from '@/components/LiveProductCategory.vue'
import { getOperatorName } from '@/utils/utils'
const FormDialog = defineAsyncComponent(() => import('../components/FormDialog.vue')) const FormDialog = defineAsyncComponent(() => import('../components/FormDialog.vue'))
...@@ -58,6 +59,7 @@ const listOptions = computed(() => { ...@@ -58,6 +59,7 @@ const listOptions = computed(() => {
return `<span style="color: ${color}">${getNameByValue(row.status, statusList)}</span>` return `<span style="color: ${color}">${getNameByValue(row.status, statusList)}</span>`
}, },
}, },
{ label: '创建人', prop: 'created_operator', computed: ({ row }) => getOperatorName(row.created_operator) },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 160 }, { label: '操作', slots: 'table-x', width: 160 },
], ],
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import LiveProductCategory from '@/components/LiveProductCategory.vue' import LiveProductCategory from '@/components/LiveProductCategory.vue'
import { getProductList, deleteProduct } from '../api' import { getProductList, deleteProduct } from '../api'
import { getOperatorName } from '@/utils/utils'
const appList = ref(null) const appList = ref(null)
// 刷新 // 刷新
...@@ -41,6 +42,7 @@ const listOptions = computed(() => { ...@@ -41,6 +42,7 @@ const listOptions = computed(() => {
{ label: '商品主图', prop: 'picture_addreses', slots: 'table-picture', width: 140 }, { label: '商品主图', prop: 'picture_addreses', slots: 'table-picture', width: 140 },
{ label: '商品标题', prop: 'title' }, { label: '商品标题', prop: 'title' },
{ label: '所属商品品类', prop: 'live_commodity_type_full_name' }, { label: '所属商品品类', prop: 'live_commodity_type_full_name' },
{ label: '创建人', prop: 'created_operator', computed: ({ row }) => getOperatorName(row.created_operator) },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 200 }, { label: '操作', slots: 'table-x', width: 200 },
], ],
......
...@@ -30,11 +30,11 @@ const listOptions = computed(() => { ...@@ -30,11 +30,11 @@ const listOptions = computed(() => {
], ],
columns: [ columns: [
{ label: '序号', type: 'index', width: 60 }, { label: '序号', type: 'index', width: 60 },
{ label: '创建人', prop: 'created_operator_name' },
{ label: '直播主题标题', prop: 'live_commodity_title' }, { label: '直播主题标题', prop: 'live_commodity_title' },
{ label: '直播话术名称', prop: 'live_speech_name' }, { label: '直播话术名称', prop: 'live_speech_name' },
{ label: '所属直播主题品类', prop: 'live_commodity_type_full_name' }, { label: '所属直播主题品类', prop: 'live_commodity_type_full_name' },
{ label: '报告名称', prop: 'report_name' }, { label: '报告名称', prop: 'report_name' },
{ label: '创建人', prop: 'created_operator_name' },
{ label: '上传时间', prop: 'created_time' }, { label: '上传时间', prop: 'created_time' },
{ label: '操作', slots: 'table-x', width: 200 }, { label: '操作', slots: 'table-x', width: 200 },
], ],
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { ElMessageBox, ElMessage } from 'element-plus' import { ElMessageBox, ElMessage } from 'element-plus'
import LiveProductCategory from '@/components/LiveProductCategory.vue' import LiveProductCategory from '@/components/LiveProductCategory.vue'
import { getTalkList, deleteTalk } from '../api' import { getTalkList, deleteTalk } from '../api'
import { getOperatorName } from '@/utils/utils'
const FormDialog = defineAsyncComponent(() => import('../components/FormDialog.vue')) const FormDialog = defineAsyncComponent(() => import('../components/FormDialog.vue'))
...@@ -34,6 +35,7 @@ const listOptions = computed(() => { ...@@ -34,6 +35,7 @@ const listOptions = computed(() => {
{ label: '直播话术名称', prop: 'name' }, { label: '直播话术名称', prop: 'name' },
{ label: '直播主题标题', prop: 'title' }, { label: '直播主题标题', prop: 'title' },
{ label: '所属直播主题品类', prop: 'live_commodity_type_full_name' }, { label: '所属直播主题品类', prop: 'live_commodity_type_full_name' },
{ label: '创建人', prop: 'created_operator', computed: ({ row }) => getOperatorName(row.created_operator) },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 200 }, { label: '操作', slots: 'table-x', width: 200 },
], ],
......
...@@ -4,6 +4,7 @@ import LiveProductCategory from '@/components/LiveProductCategory.vue' ...@@ -4,6 +4,7 @@ import LiveProductCategory from '@/components/LiveProductCategory.vue'
import { getTestList, deleteTest } from '../api' import { getTestList, deleteTest } from '../api'
import { getNameByValue } from '@/utils/dictionary' import { getNameByValue } from '@/utils/dictionary'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { getOperatorName } from '@/utils/utils'
const liveUploadWay = useMapStore().getMapValuesByKey('live_upload_way') const liveUploadWay = useMapStore().getMapValuesByKey('live_upload_way')
...@@ -47,6 +48,7 @@ const listOptions = computed(() => { ...@@ -47,6 +48,7 @@ const listOptions = computed(() => {
return getNameByValue(row.upload_way, liveUploadWay) return getNameByValue(row.upload_way, liveUploadWay)
}, },
}, },
{ label: '创建人', prop: 'created_operator', computed: ({ row }) => getOperatorName(row.created_operator) },
{ label: '更新时间', prop: 'updated_time' }, { label: '更新时间', prop: 'updated_time' },
{ label: '操作', slots: 'table-x', width: 200 }, { label: '操作', slots: 'table-x', width: 200 },
], ],
......
export interface Operator {
id: string
avatar: string
real_name: string
nickname: string
username: string
}
export function getOperatorName(data: Operator) {
return data.real_name || data.nickname || data.username
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论