增加了自动化视频以及修复了一些已知漏洞 (#1554)

* 解决bug:为角色添加权限时,如果有重复api权限,该角色所有权限均添加失败(包括登录)

* 支持视频上传和选用。视频首帧作为封面预览。

* 增加自动化代码视频选项

* 媒体库可上传视频
SelectImage组件增加参数file-type="image|video" 方便用户对媒体库可选内容做限制

* 自动化代码bug修复

---------

Co-authored-by: liuyahui <liuyahui@wjacloud.com>
Co-authored-by: Alan <alan.cd@qq.com>
This commit is contained in:
奇淼(piexlmax
2023-09-24 15:49:58 +08:00
committed by GitHub
co-authored by liuyahui Alan
parent c1c37901b5
commit 809e2496c0
12 changed files with 248 additions and 50 deletions
+21 -24
View File
@@ -1,5 +1,5 @@
<template>
<div class="office border border-solid border-gray-100 h-full">
<div class="border border-solid border-gray-100 h-full w-full">
<el-row>
<div v-if="ext==='docx'">
<Docx v-model="fullFileURL" />
@@ -11,7 +11,10 @@
<Excel v-model="fullFileURL" />
</div>
<div v-else-if="ext==='image'">
<el-image :src="fullFileURL" lazy/>
<el-image
:src="fullFileURL"
lazy
/>
</div>
</el-row>
@@ -19,42 +22,36 @@
</template>
<script>
export default {
name: "Office"
name: 'Office'
}
</script>
<script setup>
import {ref, watch, computed} from "vue"
import Docx from "@/components/office/docx.vue";
import Pdf from "@/components/office/pdf.vue";
import Excel from "@/components/office/excel.vue";
import { ref, watch, computed } from 'vue'
import Docx from '@/components/office/docx.vue'
import Pdf from '@/components/office/pdf.vue'
import Excel from '@/components/office/excel.vue'
const path = ref(import.meta.env.VITE_BASE_API)
const props = defineProps({
modelValue: {
type: String,
default: () => ""
default: () => ''
}
})
const fileUrl = ref("")
const ext = ref("")
const fileUrl = ref('')
const ext = ref('')
watch(
() => props.modelValue,
val => {
fileUrl.value = val
const fileExt = val.split(".")[1] || ''
const image = ['png', 'jpg', 'jpge', 'gif']
ext.value = image.includes(fileExt) ? 'image' : fileExt
},
{immediate: true}
() => props.modelValue,
val => {
fileUrl.value = val
const fileExt = val.split('.')[1] || ''
const image = ['png', 'jpg', 'jpge', 'gif']
ext.value = image.includes(fileExt) ? 'image' : fileExt
},
{ immediate: true }
)
const fullFileURL = computed(() => {
return path.value + '/' + fileUrl.value
})
</script>
<style lang="scss" scoped>
.office {
height: 400px;
width: 100%;
}
</style>