Merge remote-tracking branch 'origin/main'

This commit is contained in:
hekaiyu 2025-06-04 23:16:43 +08:00
commit ada34b806a
7 changed files with 46 additions and 37 deletions

View File

@ -58,7 +58,7 @@
<div class="linese"></div>
</a-col>
</a-row>
<tablelist ref="modalForm" @ok="getTableDataList"></tablelist>
<tablelist ref="modalForm" ></tablelist>
</a-card>
</template>
<script>

View File

@ -213,20 +213,38 @@ export default {
// 0
currentRow.percentage = 0
const _20M = 20 * 1024 * 1024 //
if (file.size > _20M) { // 20M
this.uploadByPieces({ //
file, //
currentRow,
success: (data) => {
currentRow.percentage = 100
},
error: (e) => {
currentRow.percentage = 0
let that =this;
this.getMd5(file)
.then((res) => {
let fileMD5Value = res
verifyFileExist({ fileMD5Value: fileMD5Value })
.then((res) => {
if (res.result.exist) { //
that.$message.warning(file.name+'文件已存在');
} 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) {
@ -293,6 +311,7 @@ export default {
currentRow.percentage = 100
currentRow.uploadStatus = 2
currentRow.result = res
this.$message.warning(file.name+'文件已存在');
} else { //
const formData = this.buildFileFormData(file.name, file.size, fileMD5Value, 0, 0, file, false,fileMD5Value)
const url = '/fileDataLink/uploadFile'
@ -341,16 +360,6 @@ export default {
const sumSlicingCount = Math.ceil(file.size / slicingSize) //
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
getSlicingInfo (file, currentIndex, slicingSize) {
@ -376,11 +385,11 @@ export default {
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, shareIndex + 1, success, error)
}
} else { // 0
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, 0, success, error)
this.uploadSliceFile(file, currentRow, slicingSize, sumSlicingCount, 0, success, error)
}
})
.catch((e) => {
error && error(e)
this.$message.warning(e);
})
},
/**

View File

@ -231,6 +231,7 @@ import { datasyncqueryPage,
this.selectDataBase = true;
this.createSchemaboll = true;
let model = {};
this.datamodel.database=null
model.ip = "";
model.port = 0;
model.username = '';
@ -253,6 +254,7 @@ import { datasyncqueryPage,
this.selectDataBase = true;
this.createSchemaboll = true;
this.testConnBool = false;
this.datamodel.database=null;
datasyncqueryById({id:record.id}).then((res) => {
if (res.success) {
let model = {};
@ -285,7 +287,7 @@ import { datasyncqueryPage,
this.form.validateFields((err, values) => {
console.log('values',values)
this.datamodel = values;
if(this.datamodel.database==null){
if(this.datamodel.database==null || this.datamodel.database==""){
this.$message.warning("源数据库未选择");
return false;
}

View File

@ -31,10 +31,10 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<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-button type="primary" icon="import">导入</a-button>
</a-upload>
</a-upload> -->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">

View File

@ -34,10 +34,10 @@
<div class="table-operator" style="margin: 5px 0 10px 2px">
<a-button @click="handleAdd" 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-upload>
<a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button> -->
</div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
@ -75,9 +75,7 @@
<a @click="handleEdit(record)">编辑</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete1(record.id)">
<a>删除</a>
</a-popconfirm>
<a @click="handleDelete1(record.id)">删除</a>
</a-menu-item>
</a-menu>
</a-dropdown>

View File

@ -66,10 +66,10 @@
<!-- 操作按钮区域 -->
<div class="table-operator" style="border-top: 5px">
<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-button type="primary" icon="import">导入</a-button>
</a-upload>
</a-upload> -->
<a-button type="primary" icon="hdd" @click="recycleBinVisible=true">回收站</a-button>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay" @click="handleMenuClick">

View File

@ -9,7 +9,7 @@
:visible="visible"
style="overflow: auto;padding-bottom: 53px;" class="userrolemodel">
<a-form>
<a-form style="height:calc(100vh - 58px);">
<a-form-item label='所拥有的权限'>
<a-tree
checkable