提交 cfdcd3da 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

Merge remote-tracking branch 'origin/gin-vue-admin_v2_dev' into gin-vue-admin_v2_dev

......@@ -1039,4 +1039,4 @@ li {
width: 10px;
}
}
}
\ No newline at end of file
}
......@@ -2,24 +2,24 @@
<div class="hello">
<el-divider content-position="left">大文件上传</el-divider>
<form id="fromCont" method="post" >
<div class="fileUpload">
选择文件<input @change="choseFile" id="file" multiple="multiple" type="file" />
<div class="fileUpload" @click="inputChange">
选择文件
<input v-show="false" @change="choseFile" id="file" multiple="multiple" type="file" ref="Input" />
</div>
</form>
<el-button @click="getFile" :disabled="limitFileSize" type="primary" size="medium" class="uploadBtn">上传文件</el-button>
<div class="el-upload__tip">请上传不超过5MB的文件</div>
<div class="list">
<transition-group name="list" tag="p">
<div class="list-item" v-for="item in uploadList" :key="item.name" >
<transition name="list" tag="p">
<div class="list-item" v-if="file" >
<i class="el-icon-document"></i>
<span>{{ item.name }}</span>
<span v-if="file" class="percentage" >{{percentage}}%</span>
<span>{{ file.name }}</span>
<span class="percentage" >{{percentage}}%</span>
<el-progress :show-text='false' :text-inside="false" :stroke-width="2" :percentage="percentage"></el-progress>
</div>
</transition-group>
</transition>
</div>
<!-- <span
<!-- <span
v-if="this.file"
>{{Math.floor(((this.formDataList.length-this.waitNum)/this.formDataList.length)*100)}}%</span> -->
<div class="tips">此版本为先行体验功能测试版,样式美化和性能优化正在进行中,上传切片文件和合成的完整文件分别再QMPlusserver目录的breakpointDir文件夹和fileDir文件夹</div>
......@@ -45,8 +45,7 @@ export default {
limitFileSize: false,
percentage:0,
percentageFlage: true,
customColor: '#409eff',
uploadList:[]
customColor: '#409eff'
}
},
created(){
......@@ -59,6 +58,7 @@ export default {
const file = e.target.files[0] // 获取当前文件
const maxSize = 5*1024*1024
this.file = file // file 丢全局方便后面用 可以改进为func传参形式
this.percentage = 0
if(file.size<maxSize){
fileR.readAsArrayBuffer(file) // 把文件读成ArrayBuffer 主要为了保持跟后端的流一致
fileR.onload = async e => {
......@@ -123,9 +123,6 @@ export default {
this.percentageFlage = false
}
this.sliceFile() // 上传切片
if(this.percentage == 100){
this.uploadList.push(this.file)
}
},
sliceFile() {
this.waitUpLoad &&
......@@ -164,6 +161,9 @@ export default {
await removeChunk(params)
}
}
},
inputChange(){
this.$refs.Input.dispatchEvent(new MouseEvent('click'))
}
}
}
......@@ -198,15 +198,14 @@ a {
border-radius: 4px;
overflow: hidden;
display: inline-block;
input{
position: absolute;
font-size: 100px;
right: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
input{
position: absolute;
font-size: 100px;
right: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
}
.fileName{
display: inline-block;
......
......@@ -22,7 +22,7 @@
<el-table-column label="姓名" prop="customerName" width="120"></el-table-column>
<el-table-column label="电话" prop="customerPhoneData" width="120"></el-table-column>
<el-table-column label="接入人ID" prop="sysUserId" width="120"></el-table-column>
<el-table-column label="按钮组">
<el-table-column label="按钮组" min-width="160">
<template slot-scope="scope">
<el-button @click="updateCustomer(scope.row)" size="small" type="text">变更</el-button>
<el-popover placement="top" width="160" v-model="scope.row.visible">
......
......@@ -16,14 +16,14 @@
</el-table-column>
<el-table-column label="姓名" prop="name" width="120"></el-table-column>
<el-table-column label="年龄" prop="age" width="120"></el-table-column>
<el-table-column label="住址" prop="address" show-overflow-tooltip></el-table-column>
<el-table-column label="是否禁用" prop="switch">
<el-table-column label="住址" prop="address" min-width="200" show-overflow-tooltip></el-table-column>
<el-table-column label="是否禁用" prop="switch" width="180">
<template slot-scope="scope">
<el-switch active-text="开启" inactive-text="禁用" v-model="scope.row.switch"></el-switch>
</template>
</el-table-column>
<el-table-column label="按钮组">
<template slot-scope="scope">
<el-table-column label="按钮组" width="200">
<template slot-scope="scope" >
<el-button type="text" size="small" @click="toggleSelection([scope.row])">按钮1</el-button>
<el-button type="text" size="small" @click="toggleSelection([scope.row])">按钮2</el-button>
<el-button type="text" size="small" @click="toggleSelection([scope.row])">按钮3</el-button>
......
......@@ -35,7 +35,7 @@
prop="name"
width="180"
></el-table-column>
<el-table-column label="链接" prop="url"></el-table-column>
<el-table-column label="链接" prop="url" min-width="300"></el-table-column>
<el-table-column label="标签" prop="tag" width="100">
<template slot-scope="scope">
<el-tag
......@@ -45,7 +45,7 @@
>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<el-table-column label="操作" width="160">
<template slot-scope="scope">
<el-button @click="downloadFile(scope.row)" size="small" type="text"
>下载</el-button
......
......@@ -13,7 +13,7 @@
>
<el-table-column label="角色id" min-width="180" prop="authorityId"></el-table-column>
<el-table-column label="角色名称" min-width="180" prop="authorityName"></el-table-column>
<el-table-column fixed="right" label="操作" min-width="300">
<el-table-column fixed="right" label="操作" width="460">
<template slot-scope="scope">
<el-button @click="opdendrawer(scope.row)" size="small" type="text">设置权限</el-button>
<el-button @click="addAuthority(scope.row.authorityId)" size="small" type="text">新增子角色</el-button>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册