修改bug

This commit is contained in:
yangjun 2026-03-03 11:01:29 +08:00
parent ae3b66495a
commit 40aa256c6e
7 changed files with 70 additions and 23 deletions

View File

@ -34,8 +34,9 @@
<div class="custom-upload-list" v-if="fileList.length > 0">
<div v-for="(file, index) in fileList" :key="file.uid">
<div style="margin-top: 20px;">
<audio ref="audioPlayer" controls v-if="!!file?.response?.message" :src="opeMediaAddress + file?.response?.message" ></audio>
<audio ref="audioPlayer" controls v-else :src="file.url ? opeMediaAddress + file.url : file.r" ></audio>
<audio ref="audioPlayer" controls v-if="!!file?.response?.message"
:src="opeMediaAddress + file?.response?.message"></audio>
<audio ref="audioPlayer" controls v-else :src="file.url ? opeMediaAddress + file.url : file.r"></audio>
</div>
<!-- <div style="margin-top: 20px;">
{{ file.name }}
@ -53,6 +54,7 @@ import { ref, reactive, computed, watch, nextTick, createApp, unref } from 'vue'
import { Icon } from '/@/components/Icon';
import { getToken } from '/@/utils/auth';
import { uploadUrl, uploadPre } from '/@/api/common/api';
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
import { propTypes } from '/@/utils/propTypes';
import { useMessage } from '/@/hooks/web/useMessage';
import { createImgPreview } from '/@/components/Preview/index';
@ -102,7 +104,8 @@ const props = defineProps({
default: false,
}
});
const emitData = ref<any[]>([]);
const [state] = useRuleFormItem(props, 'value', 'change', emitData);
const headers = getHeaders();
const fileList = ref<any[]>([]);
const uploadGoOn = ref<boolean>(true);
@ -151,6 +154,24 @@ const bindProps = computed(() => {
});
function removeFile(index) {
fileList.value.splice(index, 1);
const newUrls = fileList.value
.filter(file => file.status === 'done')
.map(file => {
// response
if (file.response && file.response.message) {
return file.response.message;
}
// url
return file.url ? file.url.replace(opeMediaAddress, '') : '';
})
.filter(url => url && url.trim() !== '');
// 3.
const newValue = newUrls.join(',');
state.value = newValue;
emit('update:value', newValue);
emit('change', newValue);
}
watch(

View File

@ -57,6 +57,7 @@ import { Icon } from '/@/components/Icon';
import { getToken } from '/@/utils/auth';
import { uploadUrl, uploadPre } from '/@/api/common/api';
import { propTypes } from '/@/utils/propTypes';
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
import { useMessage } from '/@/hooks/web/useMessage';
import { createImgPreview } from '/@/components/Preview/index';
import { useAttrs } from '/@/hooks/core/useAttrs';
@ -106,6 +107,8 @@ const props = defineProps({
}
});
const emitData = ref<any[]>([]);
const [state] = useRuleFormItem(props, 'value', 'change', emitData);
const headers = getHeaders();
const fileList = ref<any[]>([]);
const uploadGoOn = ref<boolean>(true);
@ -154,6 +157,24 @@ const bindProps = computed(() => {
});
function removeFile(index) {
fileList.value.splice(index, 1);
const newUrls = fileList.value
.filter(file => file.status === 'done')
.map(file => {
// response
if (file.response && file.response.message) {
return file.response.message;
}
// url
return file.url ? file.url.replace(opeMediaAddress, '') : '';
})
.filter(url => url && url.trim() !== '');
// 3.
const newValue = newUrls.join(',');
state.value = newValue;
emit('update:value', newValue);
emit('change', newValue);
}
watch(

View File

@ -75,7 +75,7 @@ const render = {
avatarList.map((item) => {
return h(Image, {
src: getFileAccessHttpUrl(item),
width: 'auto',
width: 30,
height: 30,
style: { marginRight: '5px' },
preview: false,
@ -107,7 +107,7 @@ const render = {
avatarList.map((item) => {
return h(Image, {
src: getFileAccessHttpUrl(item),
width: 'auto',
width: 30,
height: 30,
style: { marginRight: '5px' },
previewMask: () => {

View File

@ -11,6 +11,7 @@ export const columns: BasicColumn[] = [
title: '标签类型',
align: 'center',
dataIndex: 'type_dictText',
width: 120,
},
{
title: '标签名称',
@ -26,6 +27,7 @@ export const columns: BasicColumn[] = [
title: '价格(元)',
align: 'center',
dataIndex: 'price',
width: 120,
},
{
title: '默认图标',
@ -40,6 +42,7 @@ export const columns: BasicColumn[] = [
: opeMediaAddress + import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC;
return render.renderImage({ text: imageUrl });
},
width: 120,
// customRender: render.renderImage,
},
{
@ -55,6 +58,7 @@ export const columns: BasicColumn[] = [
: opeMediaAddress + import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC;
return render.renderImage({ text: imageUrl });
},
width: 120,
// customRender: render.renderImage,
},
// {
@ -66,6 +70,7 @@ export const columns: BasicColumn[] = [
title: '是否启用',
align: 'center',
dataIndex: 'izEnabled_dictText',
width: 120,
},
];

View File

@ -11,9 +11,9 @@
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-col :lg="8" >
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
<a-col :lg="6">
<a-col :lg="6" >
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
@ -25,7 +25,7 @@
</div>
<div>
<div
style="width:350px;float: left;height:80vh; background: white; overflow:auto;position: relative;margin-right: 14px;border-radius: 8px;">
style="width:350px;float: left;height:87vh; background: white; overflow:auto;position: relative;margin-right: 14px;border-radius: 8px;">
<div
style="position: absolute; top: 8px; right: 8px; z-index: 1; background: white; padding: 0px; border-radius: 4px;">
<a-radio-group v-model:value="filterIzEnabled" @change="searchQuery">
@ -250,7 +250,7 @@
</a-menu>
</div>
<div style="width:calc(100% - 370px);float: left; background-color: white;border-radius: 8px;"
<div style="width:calc(100% - 364px);float: left; background-color: white;border-radius: 8px;"
class="container-height">
<!--引用表格-->
<BasicTable @register="registerTable">
@ -538,7 +538,7 @@ const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDat
const labelCol = reactive({
xs: 24,
sm: 4,
xl: 6,
xl: 4,
xxl: 4
});
const wrapperCol = reactive({
@ -1261,12 +1261,12 @@ audio::-webkit-media-controls-time-remaining-display {
}
.container-height {
height: 77vh;
height: 87vh;
}
@media screen and (min-width: 1600px) and (min-height: 900px) {
.container-height {
height: 81.5vh;
height: 87vh;
}
}

View File

@ -132,7 +132,7 @@
<a-col :span="24" v-show="directiveMediaBtnValue == 0">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.previewFile ? formData.previewFile : defaultPrePic" maxCount="1" :disabled="disabled" />
<JImageUploadtz v-else v-model:value="formData.previewFile" maxCount="1" :toOpe="true"
<JImageUploadtz v-else v-model:value="formData.previewFile" maxCount="1" :toOpe="true" :disabled="disabled"
:bizPath="formComputedData.mediaFileSavePath" />
</a-col>
<!-- <a-col :span="24" v-show="directiveMediaBtnValue == 1">
@ -142,26 +142,26 @@
:bizPath="formComputedData.mediaFileSavePath" />
</a-col> -->
<a-col :span="24" v-show="directiveMediaBtnValue == 1">
<JUploadMP3 v-if="opeType == 'dmlook'" :value="formData.mp3File" maxCount="1" />
<JUploadMP3 v-else v-model:value="formData.mp3File" :toOpe="true"
<JUploadMP3 v-if="opeType == 'dmlook'" :value="formData.mp3File" maxCount="1" :disabled="disabled"/>
<JUploadMP3 v-else v-model:value="formData.mp3File" :toOpe="true" :disabled="disabled"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
<JUploadMP4 v-if="opeType == 'dmlook'" :value="formData.mp4File" maxCount="1" fileType="mp4" />
<JUploadMP4 v-else v-model:value="formData.mp4File" :toOpe="true"
<JUploadMP4 v-if="opeType == 'dmlook'" :value="formData.mp4File" maxCount="1" fileType="mp4" :disabled="disabled"/>
<JUploadMP4 v-else v-model:value="formData.mp4File" :toOpe="true" :disabled="disabled"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" fileType="mp4" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 3">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic" maxCount="1" />
<JImageUploadtz v-else v-model:value="formData.immediateFile" :toOpe="true"
:value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic" maxCount="1" :disabled="disabled" />
<JImageUploadtz v-else v-model:value="formData.immediateFile" :toOpe="true" :disabled="disabled"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
</a-col>
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
<JImageUploadtz v-if="opeType == 'dmlook'"
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic"
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic" :disabled="disabled"
maxCount="1" />
<JImageUploadtz v-else v-model:value="formData.immediateFileFocus" :toOpe="true"
<JImageUploadtz v-else v-model:value="formData.immediateFileFocus" :toOpe="true" :disabled="disabled"
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
</a-col>
</a-row>

View File

@ -25,7 +25,7 @@
<a-row style="margin-top: -5px;">
<a-col v-for="directive of tableData.records" :key="directive.id" style="padding: 7px 14px 3px 0;height: 235px;" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" >
<a-row style="padding: 5px;background-color: white;border-radius: 8px;height: 220px;">
<a-col :span="4">
<a-col :span="4" style="padding-left:10px;">
<div class="bjclass">
<img src="/src/assets/images/logo.png" style="width: 40px;height:40px;margin-top: 10px;" />
</div>
@ -40,7 +40,7 @@
<div style="color: #857f7f;">
<span style="float:left;"><Icon icon="ant-design:user-add-outlined" :size="18" /><span style="margin-left:5px;">{{ directive.createBy_dictText }}</span></span>
<span style="margin-left: 15px;float:left;"><Icon icon="ant-design:field-time-outlined" :size="20" /><span style="margin-left:5px;font-size:16px;">{{ directive.createTime.substring(0,10) }}</span></span>
<span style="margin-right: 15px;float:right;">
<span style="margin-right: -10px;float:right;">
<a-dropdown :trigger="['hover']" placement="topRight">
<a-button type="link"><Icon icon="ant-design:more-outlined" :size="20" /></a-button>
<template #overlay>