全局列表顶部按钮点击完成操作后,将按钮颜色重置为初始配色
1、全局列表顶部按钮点击完成操作后,将按钮颜色重置为初始配色 2、优化批量复制功能的提示信息 3、完善并优化批量更新agent功能中版本判断的逻辑
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<template v-if="config && config.tableButton && config.tableButton.top">
|
||||
<el-col :span="1.5" v-for="item of config.tableButton.top">
|
||||
<!-- <el-button :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" :hasPermi="[item.hasPermi]">{{item.content}}</el-button>-->
|
||||
<el-button :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" v-if="checkPermi([item.hasPermi])">{{item.content}}</el-button>
|
||||
<el-button :ref="`${item.content}`" :type="item.type" plain size="mini" :icon="item.icon" @click="handleClick(item,{})" v-if="checkPermi([item.hasPermi])">{{item.content}}</el-button>
|
||||
</el-col>
|
||||
</template>
|
||||
<right-toolbar v-if="!(config && config.colTopHiddenIcon)" :modelIdent="this.modelIdent" :showSearch.sync="showSearch" @queryTable="renderList" @columnsChange="columnsChange" :columns="columns"></right-toolbar>
|
||||
@@ -323,7 +323,7 @@
|
||||
default:
|
||||
this.$emit("fnClick", result, row, this.ids, this.selectList);
|
||||
}
|
||||
// 点击按钮后,通过设置失去焦点使其按钮恢复点击前状态
|
||||
// 列表行内按钮 点击按钮后,通过设置失去焦点使其按钮恢复点击前状态
|
||||
if (row && this.$refs && this.$refs[result.content +'_'+row.id]) {
|
||||
if (Array.isArray(this.$refs[result.content +'_'+row.id])) {
|
||||
this.$refs[result.content +'_'+row.id].forEach(refItem => {
|
||||
@@ -332,6 +332,15 @@
|
||||
} else {
|
||||
this.$refs[result.content +'_'+row.id].$el.blur();
|
||||
}
|
||||
} else if (this.$refs && this.$refs[result.content]) {
|
||||
// 列表顶部的按钮
|
||||
if (Array.isArray(this.$refs[result.content])) {
|
||||
this.$refs[result.content].forEach(refItem => {
|
||||
refItem.$el.blur();
|
||||
});
|
||||
} else {
|
||||
this.$refs[result.content].$el.blur();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -616,7 +616,6 @@
|
||||
copyText += `${fieldLabel}:${row[field]};`
|
||||
});
|
||||
});
|
||||
|
||||
// 复制到剪贴板
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = copyText;
|
||||
@@ -624,14 +623,12 @@
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
|
||||
// 提示成功
|
||||
this.$message.success('复制成功!');
|
||||
// 关闭弹窗
|
||||
this.copyDialogVisible = false;
|
||||
} catch (error) {
|
||||
this.$message.error('复制失败,请手动复制');
|
||||
console.error('复制失败:', error);
|
||||
this.$message.error('复制失败!');
|
||||
}
|
||||
},
|
||||
//agent版本是否为最新版本
|
||||
@@ -953,9 +950,9 @@
|
||||
}
|
||||
},
|
||||
// 判断版本是否相同
|
||||
compareVersions(targetVer, version2) {
|
||||
compareVersions(targetVer, agentVer) {
|
||||
const v1 = targetVer.split('.').map(Number);
|
||||
const v2 = version2.split('.').map(Number);
|
||||
const v2 = agentVer.split('.').map(Number);
|
||||
const maxLength = Math.max(v1.length, v2.length);
|
||||
for (let i = 0; i < maxLength; i++) {
|
||||
const num1 = v1[i] || 0;
|
||||
|
||||
Reference in New Issue
Block a user