qirong
2023-12-12 b19c888d4c5ff564e76d9cd1e5adddf6ed35c8ee
src/views/index.vue
@@ -22,7 +22,9 @@
      <template #header>
        <el-row  style="text-align: center">
          <el-col>
            <el-button type="primary" plain icon="Upload" @click="handleFile" v-if="isContains(useUserStore().permissions, 'system:oss:upload')">上传文件</el-button>
          <el-input v-model="input1" placeholder="请输入提取码" style="width: 150px">
    </el-input>
            <el-button type="primary" @click="downloadFile">下载</el-button>
          </el-col>
<!--          <el-col :span="1.5">-->
@@ -89,8 +91,7 @@
        <div class="dialog-footer">
          <el-button link type="primary"   v-show="titleDownload=='输入提取码'" icon="Download" @click="handleDownloadFile()" v-if="isContains(useUserStore().permissions, 'system:oss:download')">下载</el-button>
          <el-button link type="primary"   v-show="titleDownload=='请输入提取码'"  icon="Delete" @click="delFile()" >删除</el-button>
<!--          <el-button  type="primary" @click="visibleCode = false">确 定</el-button>-->
          <el-button @click="visibleCode = false">取 消</el-button>
          <el-button  type="primary" @click="visibleCode = false">确 定</el-button>
        </div>
      </template>
    </el-dialog>
@@ -132,6 +133,7 @@
const inputRef = ref<any>()
const inputSty =ref<any>()
const currentIp = ref('')
const input1 = ref('')
const childFile = ref<any>()
const figType = ref<any>()
// 默认排序
@@ -288,9 +290,10 @@
  await childFile.value.handleCilck()
  dialog.visible = false;
}
const lookPawsd = async (row: OssVO) => {
  console.log(row, row.ossId);
      testtxt.value = row.password;
const lookPawsd = async (row:any) => {
  console.log(row);
  // row.msg = ':/"123456'
      testtxt.value = row.msg.slice(2);
      titleDownload.value = '查看提取码'
      pasTxt.value = ''
      visibleCode.value = true
@@ -428,6 +431,18 @@
  // }
})
const downloadFile = ()=>{
  console.log(input1.value);
  if (input1.value){
    proxy?.$download.ossDown("12345678",input1.value)
  }else {
    inputSty.value ={
      border: '1px solid red'
    }
    // inputRef.value.style.border = '1px solid red'
  }
  visibleCode.value=false
}
onMounted(async () => {
  console.log('第二aaaaaaa',useUserStore().permissions);
  // 等待 useUserStore() 方法的 getInfo() 方法返回结果并赋值给 err 变量