# base api | # base api | ||||
VITE_APP_GLOB_BASE_API = '' | VITE_APP_GLOB_BASE_API = '' | ||||
VITE_AUTHORITY = 'http://oidc.dev.t-aaron.com' | |||||
VITE_AUTHORITY = 'http://192.168.11.11:8090' | |||||
VITE_CLIENT_ID = 'tuoheng-pilot-admin' | VITE_CLIENT_ID = 'tuoheng-pilot-admin' | ||||
VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' | VITE_CLIENT_SECRET = 'WB0CZ1c6bZLiYP6jLtDFsA==' | ||||
VITE_REDIRECT_URI = 'http://192.168.11.11:7011/login' | VITE_REDIRECT_URI = 'http://192.168.11.11:7011/login' |
const emit = defineEmits(['uploadStatus']) | const emit = defineEmits(['uploadStatus']) | ||||
const client = ref(null) // 上传实例 | |||||
const data = reactive({ | const data = reactive({ | ||||
...props, | ...props, | ||||
client: null, | client: null, | ||||
if (props.defaultList) { | if (props.defaultList) { | ||||
const list = props.defaultList.split(',') | const list = props.defaultList.split(',') | ||||
data.fileList = list.map((item) => { | data.fileList = list.map((item) => { | ||||
// const objectName = item.split('/').slice(3).join('/') | |||||
const objectName = item | |||||
console.log('objectName-mounted', objectName) | |||||
const objectName = item.split('/').slice(3).join('/') | |||||
const obj = { | const obj = { | ||||
name: objectName, | name: objectName, | ||||
id: objectName, | id: objectName, | ||||
type: 'image/png', | |||||
// type: 'image/png', | |||||
url: item, | url: item, | ||||
objectName: objectName, | objectName: objectName, | ||||
status: 'finished' | status: 'finished' | ||||
if (value.length) { | if (value.length) { | ||||
const list = value.split(',') | const list = value.split(',') | ||||
const fileList = list.map((item) => { | const fileList = list.map((item) => { | ||||
// const objectName = item.split('/').slice(3).join('/') | |||||
const objectName = item | |||||
console.log('objectName-watch', objectName) | |||||
const objectName = item.split('/').slice(3).join('/') | |||||
const obj = { | const obj = { | ||||
name: objectName, | name: objectName, | ||||
id: objectName, | id: objectName, |
if (props.defaultList) { | if (props.defaultList) { | ||||
const list = props.defaultList.split(',') | const list = props.defaultList.split(',') | ||||
data.fileList = list.map((item) => { | data.fileList = list.map((item) => { | ||||
const objectName = item.split('/').slice(3).join('/') | |||||
const objectName = '/' + item.split('/').slice(3).join('/') | |||||
const obj = { | const obj = { | ||||
name: objectName, | name: objectName, | ||||
id: objectName, | id: objectName, | ||||
if (value.length) { | if (value.length) { | ||||
const list = value.split(',') | const list = value.split(',') | ||||
const fileList = list.map((item) => { | const fileList = list.map((item) => { | ||||
const objectName = item.split('/').slice(3).join('/') | |||||
const objectName = '/' + item.split('/').slice(3).join('/') | |||||
const obj = { | const obj = { | ||||
name: objectName, | name: objectName, | ||||
id: objectName, | id: objectName, |
// 只文件上传 | // 只文件上传 | ||||
const statusfile = async(status, list) => { | const statusfile = async(status, list) => { | ||||
console.log('list是啥', list) | |||||
if (status === 'success') { | if (status === 'success') { | ||||
const params = { | const params = { | ||||
id: data.id, | id: data.id, |