修改bug
This commit is contained in:
parent
ae3b66495a
commit
40aa256c6e
|
|
@ -34,8 +34,9 @@
|
||||||
<div class="custom-upload-list" v-if="fileList.length > 0">
|
<div class="custom-upload-list" v-if="fileList.length > 0">
|
||||||
<div v-for="(file, index) in fileList" :key="file.uid">
|
<div v-for="(file, index) in fileList" :key="file.uid">
|
||||||
<div style="margin-top: 20px;">
|
<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-if="!!file?.response?.message"
|
||||||
<audio ref="audioPlayer" controls v-else :src="file.url ? opeMediaAddress + file.url : file.r" ></audio>
|
:src="opeMediaAddress + file?.response?.message"></audio>
|
||||||
|
<audio ref="audioPlayer" controls v-else :src="file.url ? opeMediaAddress + file.url : file.r"></audio>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="margin-top: 20px;">
|
<!-- <div style="margin-top: 20px;">
|
||||||
{{ file.name }}
|
{{ file.name }}
|
||||||
|
|
@ -53,6 +54,7 @@ import { ref, reactive, computed, watch, nextTick, createApp, unref } from 'vue'
|
||||||
import { Icon } from '/@/components/Icon';
|
import { Icon } from '/@/components/Icon';
|
||||||
import { getToken } from '/@/utils/auth';
|
import { getToken } from '/@/utils/auth';
|
||||||
import { uploadUrl, uploadPre } from '/@/api/common/api';
|
import { uploadUrl, uploadPre } from '/@/api/common/api';
|
||||||
|
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { createImgPreview } from '/@/components/Preview/index';
|
import { createImgPreview } from '/@/components/Preview/index';
|
||||||
|
|
@ -102,7 +104,8 @@ const props = defineProps({
|
||||||
default: false,
|
default: false,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
const emitData = ref<any[]>([]);
|
||||||
|
const [state] = useRuleFormItem(props, 'value', 'change', emitData);
|
||||||
const headers = getHeaders();
|
const headers = getHeaders();
|
||||||
const fileList = ref<any[]>([]);
|
const fileList = ref<any[]>([]);
|
||||||
const uploadGoOn = ref<boolean>(true);
|
const uploadGoOn = ref<boolean>(true);
|
||||||
|
|
@ -151,6 +154,24 @@ const bindProps = computed(() => {
|
||||||
});
|
});
|
||||||
function removeFile(index) {
|
function removeFile(index) {
|
||||||
fileList.value.splice(index, 1);
|
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(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ import { Icon } from '/@/components/Icon';
|
||||||
import { getToken } from '/@/utils/auth';
|
import { getToken } from '/@/utils/auth';
|
||||||
import { uploadUrl, uploadPre } from '/@/api/common/api';
|
import { uploadUrl, uploadPre } from '/@/api/common/api';
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
|
import { useRuleFormItem } from '/@/hooks/component/useFormItem';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { createImgPreview } from '/@/components/Preview/index';
|
import { createImgPreview } from '/@/components/Preview/index';
|
||||||
import { useAttrs } from '/@/hooks/core/useAttrs';
|
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 headers = getHeaders();
|
||||||
const fileList = ref<any[]>([]);
|
const fileList = ref<any[]>([]);
|
||||||
const uploadGoOn = ref<boolean>(true);
|
const uploadGoOn = ref<boolean>(true);
|
||||||
|
|
@ -154,6 +157,24 @@ const bindProps = computed(() => {
|
||||||
});
|
});
|
||||||
function removeFile(index) {
|
function removeFile(index) {
|
||||||
fileList.value.splice(index, 1);
|
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(
|
watch(
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ const render = {
|
||||||
avatarList.map((item) => {
|
avatarList.map((item) => {
|
||||||
return h(Image, {
|
return h(Image, {
|
||||||
src: getFileAccessHttpUrl(item),
|
src: getFileAccessHttpUrl(item),
|
||||||
width: 'auto',
|
width: 30,
|
||||||
height: 30,
|
height: 30,
|
||||||
style: { marginRight: '5px' },
|
style: { marginRight: '5px' },
|
||||||
preview: false,
|
preview: false,
|
||||||
|
|
@ -107,7 +107,7 @@ const render = {
|
||||||
avatarList.map((item) => {
|
avatarList.map((item) => {
|
||||||
return h(Image, {
|
return h(Image, {
|
||||||
src: getFileAccessHttpUrl(item),
|
src: getFileAccessHttpUrl(item),
|
||||||
width: 'auto',
|
width: 30,
|
||||||
height: 30,
|
height: 30,
|
||||||
style: { marginRight: '5px' },
|
style: { marginRight: '5px' },
|
||||||
previewMask: () => {
|
previewMask: () => {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ export const columns: BasicColumn[] = [
|
||||||
title: '标签类型',
|
title: '标签类型',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'type_dictText',
|
dataIndex: 'type_dictText',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '标签名称',
|
title: '标签名称',
|
||||||
|
|
@ -26,6 +27,7 @@ export const columns: BasicColumn[] = [
|
||||||
title: '价格(元)',
|
title: '价格(元)',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'price',
|
dataIndex: 'price',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '默认图标',
|
title: '默认图标',
|
||||||
|
|
@ -40,6 +42,7 @@ export const columns: BasicColumn[] = [
|
||||||
: opeMediaAddress + import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC;
|
: opeMediaAddress + import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC;
|
||||||
return render.renderImage({ text: imageUrl });
|
return render.renderImage({ text: imageUrl });
|
||||||
},
|
},
|
||||||
|
width: 120,
|
||||||
// customRender: render.renderImage,
|
// customRender: render.renderImage,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -55,6 +58,7 @@ export const columns: BasicColumn[] = [
|
||||||
: opeMediaAddress + import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC;
|
: opeMediaAddress + import.meta.env.VITE_DEFAULT_ELDER_TAG_EMO_PIC;
|
||||||
return render.renderImage({ text: imageUrl });
|
return render.renderImage({ text: imageUrl });
|
||||||
},
|
},
|
||||||
|
width: 120,
|
||||||
// customRender: render.renderImage,
|
// customRender: render.renderImage,
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
|
@ -66,6 +70,7 @@ export const columns: BasicColumn[] = [
|
||||||
title: '是否启用',
|
title: '是否启用',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'izEnabled_dictText',
|
dataIndex: 'izEnabled_dictText',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@
|
||||||
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
|
<JInput v-model:value="queryParam.directiveName" placeholder="请输入服务指令名称" allowClear />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</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">
|
<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:search-outlined" @click="searchQuery">查询</a-button>
|
||||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||||
style="margin-left: 8px">重置</a-button>
|
style="margin-left: 8px">重置</a-button>
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<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
|
<div
|
||||||
style="position: absolute; top: 8px; right: 8px; z-index: 1; background: white; padding: 0px; border-radius: 4px;">
|
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">
|
<a-radio-group v-model:value="filterIzEnabled" @change="searchQuery">
|
||||||
|
|
@ -250,7 +250,7 @@
|
||||||
</a-menu>
|
</a-menu>
|
||||||
|
|
||||||
</div>
|
</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">
|
class="container-height">
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable">
|
<BasicTable @register="registerTable">
|
||||||
|
|
@ -538,7 +538,7 @@ const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDat
|
||||||
const labelCol = reactive({
|
const labelCol = reactive({
|
||||||
xs: 24,
|
xs: 24,
|
||||||
sm: 4,
|
sm: 4,
|
||||||
xl: 6,
|
xl: 4,
|
||||||
xxl: 4
|
xxl: 4
|
||||||
});
|
});
|
||||||
const wrapperCol = reactive({
|
const wrapperCol = reactive({
|
||||||
|
|
@ -1261,12 +1261,12 @@ audio::-webkit-media-controls-time-remaining-display {
|
||||||
}
|
}
|
||||||
|
|
||||||
.container-height {
|
.container-height {
|
||||||
height: 77vh;
|
height: 87vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1600px) and (min-height: 900px) {
|
@media screen and (min-width: 1600px) and (min-height: 900px) {
|
||||||
.container-height {
|
.container-height {
|
||||||
height: 81.5vh;
|
height: 87vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 0">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 0">
|
||||||
<JImageUploadtz v-if="opeType == 'dmlook'"
|
<JImageUploadtz v-if="opeType == 'dmlook'"
|
||||||
:value="!!formData.previewFile ? formData.previewFile : defaultPrePic" maxCount="1" :disabled="disabled" />
|
: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" />
|
:bizPath="formComputedData.mediaFileSavePath" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<!-- <a-col :span="24" v-show="directiveMediaBtnValue == 1">
|
<!-- <a-col :span="24" v-show="directiveMediaBtnValue == 1">
|
||||||
|
|
@ -142,26 +142,26 @@
|
||||||
:bizPath="formComputedData.mediaFileSavePath" />
|
:bizPath="formComputedData.mediaFileSavePath" />
|
||||||
</a-col> -->
|
</a-col> -->
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 1">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 1">
|
||||||
<JUploadMP3 v-if="opeType == 'dmlook'" :value="formData.mp3File" maxCount="1" />
|
<JUploadMP3 v-if="opeType == 'dmlook'" :value="formData.mp3File" maxCount="1" :disabled="disabled"/>
|
||||||
<JUploadMP3 v-else v-model:value="formData.mp3File" :toOpe="true"
|
<JUploadMP3 v-else v-model:value="formData.mp3File" :toOpe="true" :disabled="disabled"
|
||||||
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
|
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 2">
|
||||||
<JUploadMP4 v-if="opeType == 'dmlook'" :value="formData.mp4File" maxCount="1" fileType="mp4" />
|
<JUploadMP4 v-if="opeType == 'dmlook'" :value="formData.mp4File" maxCount="1" fileType="mp4" :disabled="disabled"/>
|
||||||
<JUploadMP4 v-else v-model:value="formData.mp4File" :toOpe="true"
|
<JUploadMP4 v-else v-model:value="formData.mp4File" :toOpe="true" :disabled="disabled"
|
||||||
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" fileType="mp4" />
|
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" fileType="mp4" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 3">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 3">
|
||||||
<JImageUploadtz v-if="opeType == 'dmlook'"
|
<JImageUploadtz v-if="opeType == 'dmlook'"
|
||||||
:value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic" maxCount="1" />
|
:value="!!formData.immediateFile ? formData.immediateFile : defaultImmediatePic" maxCount="1" :disabled="disabled" />
|
||||||
<JImageUploadtz v-else v-model:value="formData.immediateFile" :toOpe="true"
|
<JImageUploadtz v-else v-model:value="formData.immediateFile" :toOpe="true" :disabled="disabled"
|
||||||
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
|
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
|
<a-col :span="24" v-show="directiveMediaBtnValue == 4">
|
||||||
<JImageUploadtz v-if="opeType == 'dmlook'"
|
<JImageUploadtz v-if="opeType == 'dmlook'"
|
||||||
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic"
|
:value="!!formData.immediateFileFocus ? formData.immediateFileFocus : defaultImmediatePic" :disabled="disabled"
|
||||||
maxCount="1" />
|
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" />
|
:bizPath="formComputedData.mediaFileSavePath" maxCount="1" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<a-row style="margin-top: -5px;">
|
<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-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-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">
|
<div class="bjclass">
|
||||||
<img src="/src/assets/images/logo.png" style="width: 40px;height:40px;margin-top: 10px;" />
|
<img src="/src/assets/images/logo.png" style="width: 40px;height:40px;margin-top: 10px;" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
<div style="color: #857f7f;">
|
<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="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-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-dropdown :trigger="['hover']" placement="topRight">
|
||||||
<a-button type="link"><Icon icon="ant-design:more-outlined" :size="20" /></a-button>
|
<a-button type="link"><Icon icon="ant-design:more-outlined" :size="20" /></a-button>
|
||||||
<template #overlay>
|
<template #overlay>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue