odc.xiaohui
2023-12-20 f34f2fda119d271a9bd0c281c03464181988ea2a
互联网
4个文件已修改
19 ■■■■ 已修改文件
src/components/FileUpload/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/oss/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
vite.config.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FileUpload/index.vue
@@ -16,6 +16,7 @@
    >
      <!-- 上传按钮 -->
      <el-button type="primary">选取文件</el-button>
<!--      <el-progress :percentage="downloadProgress" />-->
    </el-upload>
    <!-- 上传提示 -->
    <div class="el-upload__tip" v-if="showTip">
@@ -62,7 +63,7 @@
);
const fileUploadRef = ref<ElUploadInstance>();
const downloadProgress = ref(0);
// watch(() => props.modelValue, async val => {
//   console.log(val,props.modelValue);
//     if (val) {
@@ -170,9 +171,9 @@
  }
}
const handleUploadProgress=(e: any) => {
    debounce(() =>{
      emit('closePopup','123123');
    },1500)
  // downloadProgress.value = downloadProgress.value + 50
  // emit('closePopup','123123');
  emit('openPopup','123123');
}
// 上传成功回调
const handleUploadSuccess = (res: any, file: UploadFile) => {
src/views/index.vue
@@ -66,7 +66,7 @@
    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
      <el-form ref="ossFormRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="文件名">
          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)"  v-model="form.file"  v-if="type === 0" />
          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)" @openPopup="lookPawsd($event)"  v-model="form.file"  v-if="type === 0" />
          <imageUpload v-model="form.file" v-if="type === 1" />
          <video-upload v-model="form.file" v-if="type === 2" />
        </el-form-item>
@@ -360,7 +360,7 @@
    dialogVisible.value = false;
    clearInterval(state.mytime);
    state.mytime = 0;
    testtxt.value = row.password;
    testtxt.value = row.msg;
      // testtxt.value = row.msg.slice(2);
      titleDownload.value = '查看提取码'
      pasTxt.value = ''
src/views/system/oss/index.vue
@@ -66,7 +66,7 @@
    <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
      <el-form ref="ossFormRef" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="文件名">
          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)"  v-model="form.file"  v-if="type === 0" />
          <fileUpload ref="childFile" @closePopup="getList();lookPawsd($event)" @openPopup="lookPawsd($event)"  v-model="form.file"  v-if="type === 0" />
          <imageUpload v-model="form.file" v-if="type === 1" />
          <video-upload v-model="form.file" v-if="type === 2" />
        </el-form-item>
vite.config.ts
@@ -38,8 +38,8 @@
      open: true,
      proxy: {
        [env.VITE_APP_BASE_API]: {
          // target: 'http://192.168.3.43:8080',
          target: 'http://172.35.50.34:8080',
          target: 'http://162.14.79.111:2023',
          // target: 'http://172.35.50.34:8080',
          // target: 'http://192.168.3.43:8080',
          changeOrigin: true,
          rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')