当前位置: 首页 > news >正文

玉环专业做网站重庆的做网站公司

玉环专业做网站,重庆的做网站公司,网站标题logo制作,设计公司推荐文章目录 一、文档&#xff1a;二、使用(以Jeecg为例)&#xff1a;【1】template&#xff1a;【2】script&#xff1a; 三、效果图&#xff1a; 一、文档&#xff1a; Upload 上传–Ant Design Vue 二、使用(以Jeecg为例)&#xff1a; 【1】template&#xff1a; <a-uploa…

文章目录

        • 一、文档:
        • 二、使用(以Jeecg为例):
            • 【1】template:
            • 【2】script:
        • 三、效果图:


一、文档:

Upload 上传–Ant Design Vue

image.png

二、使用(以Jeecg为例):
【1】template:
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader":data="{ 'orderId': record.id }" :action="importExcelUrlDispatchCar"@change="handleImportExcel">导入
</a-upload>
【2】script:
<script>export default {data() {return {url:{importExcelUrlDispatchCar:"/kd/xxx/importTemplate"}}},computed: {//拼接上传的地址importExcelUrlDispatchCar: function () {return `${window._CONFIG['domianURL']}/${this.url.importExcelUrlDispatchCar}`;},// 设置上传的Header参数tokenHeader() {let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }let tenantid = Vue.ls.get(TENANT_ID)if (tenantid) {head['tenant-id'] = tenantid}return head;},},methods:{handleImportExcel(info){this.loading = true;if (info.file.status !==  'uploading') {console.log(info.file,  info.fileList);}if (info.file.status === 'done') {this.loading = false;if (info.file.response.success){if (info.file.response.code === 201) {let { message, result:{ msg, fileUrl, fileName } }= info.file.responselet href = window._CONFIG['domianURL'] + fileUrlthis.$warning({title: message,content: (<div><span>{msg}</span><span>具体详情请 <a href={href}target="_blank" download={fileName}>点击下载</a> </span></div>)})} else {this.$message.success(info.file.response.message ||`${info.file.name} 文件上传成功`)}this.loadData()} else {this.$message.error(`${info.file.name} ${info.file.response.message}.`);}}else if (info.file.status === 'error') {this.loading = false;if (info.file.response.status === 500) {let data = info.file.responseconst token = Vue.ls.get(ACCESS_TOKEN)if (token && data.message.includes("Token失效")) {this.$error({title: '登录已过期',content: '很抱歉,登录已过期,请重新登录',okText: '重新登录',mask: false,onOk: () => {store.dispatch('Logout').then(() => {Vue.ls.remove(ACCESS_TOKEN)window.location.reload();})}})}}}else{this.$message.error(`文件上传失败: ${info.file.msg} `);}},}}
</script>
三、效果图:

image.png
image.png
image.png

http://www.15wanjia.com/news/188153.html

相关文章:

  • 惠州城乡建设部网站wordpress当前分类id
  • 阜阳网站建设阜阳大丰专业做网站
  • 烟台做网站海东高端网站建设价格
  • vs2017 网站开发网络服务器分为哪几种
  • 杭州公司网站建设哪家好博艺园 网站建设
  • 太原论坛网站开发公司视频制作和剪辑教程
  • 网站导航设计模板源码工作纪律生活纪律研讨发言
  • 将网站加入小程序网站着陆页怎么做
  • 网站建设项目的实训报告企网
  • 厦门百度整站优化服务深圳贸易网站开发
  • 大丰专业做网站的公司温州网站设计案例
  • 在社保网站上怎么做员工的退费注册网站
  • 盆景网站建设swot分析本单位门户网站是什么意思
  • 有没有做专利导航运营的网站免费二维码制作
  • 计算机培训包就业做seo推广公司
  • 专做蓝领的网站企业查询app
  • 怎么在网站上做抽奖企业宣传册怎么制作
  • 深圳网站建设公司联系专门学设计的网站
  • 自己做网站页面影城网站设计
  • 平台建设上线网站美的集团网站建设
  • 做电影网站需要空间吗免费做自我介绍网站
  • 刚刚建设的网站如何放图片php网站模板免费下载
  • 网络营销网站推广方法cnzz站长统计工具
  • 搭建本地环境做网站wordpress page post
  • 如何看网站的ftp第三方平台做网站网站
  • 建网站平台哪家好信息最全的网站
  • 学校网站登录入口建议网站的方案
  • 长丰县建设局网站seo培训优化课程
  • 互助网站开发做电影下载网站还赚钱吗
  • 有做任务赚赏金的网站吗浅谈阿里企业的电子网站建设