修改2、5、6、22、26
This commit is contained in:
parent
d0a2e3d94b
commit
a164ff10dc
|
@ -58,7 +58,7 @@
|
||||||
<div class="linese"></div>
|
<div class="linese"></div>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<tablelist ref="modalForm" @ok="getTableDataList"></tablelist>
|
<tablelist ref="modalForm" ></tablelist>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -213,20 +213,38 @@ export default {
|
||||||
// 当前上传进度归0
|
// 当前上传进度归0
|
||||||
currentRow.percentage = 0
|
currentRow.percentage = 0
|
||||||
const _20M = 20 * 1024 * 1024 //设置超大文件判断关闭分片
|
const _20M = 20 * 1024 * 1024 //设置超大文件判断关闭分片
|
||||||
if (file.size > _20M) { // 20M 以上分片上传
|
let that =this;
|
||||||
this.uploadByPieces({ // 这里走分片上传逻辑
|
this.getMd5(file)
|
||||||
file, // 文件信息
|
.then((res) => {
|
||||||
currentRow,
|
let fileMD5Value = res
|
||||||
success: (data) => {
|
verifyFileExist({ fileMD5Value: fileMD5Value })
|
||||||
currentRow.percentage = 100
|
.then((res) => {
|
||||||
},
|
if (res.result.exist) { // 跳过文件验证逻辑
|
||||||
error: (e) => {
|
that.$message.warning(file.name+'文件已存在');
|
||||||
currentRow.percentage = 0
|
} else { // 未存在,走上传逻辑
|
||||||
|
if (file.size > _20M) { // 20M 以上分片上传
|
||||||
|
that.uploadByPieces({ // 这里走分片上传逻辑
|
||||||
|
file, // 文件信息
|
||||||
|
currentRow,
|
||||||
|
success: (data) => {
|
||||||
|
currentRow.percentage = 100
|
||||||
|
},
|
||||||
|
error: (e) => {
|
||||||
|
currentRow.percentage = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else { // 20M 以下直接上传
|
||||||
|
that.uploadDirectly(currentRow, file)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
} else { // 20M 以下直接上传
|
})
|
||||||
this.uploadDirectly(currentRow, file)
|
.catch((e) => {
|
||||||
}
|
this.$message.warning(e);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
console.error('MD5计算错误', e)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getMd5 (file, chunkSize) {
|
getMd5 (file, chunkSize) {
|
||||||
|
@ -293,6 +311,7 @@ export default {
|
||||||
currentRow.percentage = 100
|
currentRow.percentage = 100
|
||||||
currentRow.uploadStatus = 2
|
currentRow.uploadStatus = 2
|
||||||
currentRow.result = res
|
currentRow.result = res
|
||||||
|
this.$message.warning(file.name+'文件已存在');
|
||||||
} else { // 未存在,走上传逻辑
|
} else { // 未存在,走上传逻辑
|
||||||
const formData = this.buildFileFormData(file.name, file.size, fileMD5Value, 0, 0, file, false,fileMD5Value)
|
const formData = this.buildFileFormData(file.name, file.size, fileMD5Value, 0, 0, file, false,fileMD5Value)
|
||||||
const url = '/fileDataLink/uploadFile'
|
const url = '/fileDataLink/uploadFile'
|
||||||
|
@ -341,16 +360,6 @@ export default {
|
||||||
const sumSlicingCount = Math.ceil(file.size / slicingSize) // 总片数
|
const sumSlicingCount = Math.ceil(file.size / slicingSize) // 总片数
|
||||||
|
|
||||||
currentRow.remarks = '正在获取hash值...'
|
currentRow.remarks = '正在获取hash值...'
|
||||||
this.getMd5(file, slicingSize)
|
|
||||||
.then((res) => {
|
|
||||||
this.fileMD5[file.uid] = res
|
|
||||||
|
|
||||||
currentRow.remarks = ''
|
|
||||||
this.readFileMD5(file, currentRow, slicingSize, sumSlicingCount, success, error)
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.error('MD5计算错误', e)
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 得到某一片的分片 file 总文件; currentIndex 当前切片数,按索引计算; slicingSize 切片大小
|
// 得到某一片的分片 file 总文件; currentIndex 当前切片数,按索引计算; slicingSize 切片大小
|
||||||
getSlicingInfo (file, currentIndex, slicingSize) {
|
getSlicingInfo (file, currentIndex, slicingSize) {
|
||||||
|
@ -376,11 +385,11 @@ export default {
|
||||||
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, shareIndex + 1, success, error)
|
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, shareIndex + 1, success, error)
|
||||||
}
|
}
|
||||||
} else { // 没有传过就从第0个分片开始上传
|
} else { // 没有传过就从第0个分片开始上传
|
||||||
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, 0, success, error)
|
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, 0, success, error)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
error && error(e)
|
this.$message.warning(e);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -231,6 +231,7 @@ import { datasyncqueryPage,
|
||||||
this.selectDataBase = true;
|
this.selectDataBase = true;
|
||||||
this.createSchemaboll = true;
|
this.createSchemaboll = true;
|
||||||
let model = {};
|
let model = {};
|
||||||
|
this.datamodel.database=null
|
||||||
model.ip = "";
|
model.ip = "";
|
||||||
model.port = 0;
|
model.port = 0;
|
||||||
model.username = '';
|
model.username = '';
|
||||||
|
@ -253,6 +254,7 @@ import { datasyncqueryPage,
|
||||||
this.selectDataBase = true;
|
this.selectDataBase = true;
|
||||||
this.createSchemaboll = true;
|
this.createSchemaboll = true;
|
||||||
this.testConnBool = false;
|
this.testConnBool = false;
|
||||||
|
this.datamodel.database=null;
|
||||||
datasyncqueryById({id:record.id}).then((res) => {
|
datasyncqueryById({id:record.id}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let model = {};
|
let model = {};
|
||||||
|
@ -285,7 +287,7 @@ import { datasyncqueryPage,
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
console.log('values',values)
|
console.log('values',values)
|
||||||
this.datamodel = values;
|
this.datamodel = values;
|
||||||
if(this.datamodel.database==null){
|
if(this.datamodel.database==null || this.datamodel.database==""){
|
||||||
this.$message.warning("源数据库未选择");
|
this.$message.warning("源数据库未选择");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" style="margin-top: 5px">
|
<div class="table-operator" style="margin-top: 5px">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload> -->
|
||||||
|
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<a-menu slot="overlay">
|
<a-menu slot="overlay">
|
||||||
|
|
|
@ -34,10 +34,10 @@
|
||||||
<div class="table-operator" style="margin: 5px 0 10px 2px">
|
<div class="table-operator" style="margin: 5px 0 10px 2px">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">新建角色</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">新建角色</a-button>
|
||||||
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
|
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>
|
<a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
|
||||||
|
@ -75,9 +75,7 @@
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<a-menu-item>
|
||||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
|
<a @click="handleDelete1(record.id)">删除</a>
|
||||||
<a>删除</a>
|
|
||||||
</a-popconfirm>
|
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-menu>
|
</a-menu>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
|
|
|
@ -66,10 +66,10 @@
|
||||||
<!-- 操作按钮区域 -->
|
<!-- 操作按钮区域 -->
|
||||||
<div class="table-operator" style="border-top: 5px">
|
<div class="table-operator" style="border-top: 5px">
|
||||||
<a-button @click="handleAdd" type="primary" icon="plus">添加用户</a-button>
|
<a-button @click="handleAdd" type="primary" icon="plus">添加用户</a-button>
|
||||||
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
||||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||||
<a-button type="primary" icon="import">导入</a-button>
|
<a-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload> -->
|
||||||
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
|
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
|
||||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||||
<a-menu slot="overlay" @click="handleMenuClick">
|
<a-menu slot="overlay" @click="handleMenuClick">
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
style="overflow: auto;padding-bottom: 53px;" class="userrolemodel">
|
style="overflow: auto;padding-bottom: 53px;" class="userrolemodel">
|
||||||
|
|
||||||
<a-form>
|
<a-form style="height:calc(100vh - 58px);">
|
||||||
<a-form-item label='所拥有的权限'>
|
<a-form-item label='所拥有的权限'>
|
||||||
<a-tree
|
<a-tree
|
||||||
checkable
|
checkable
|
||||||
|
|
Loading…
Reference in New Issue
Block a user