|
@@ -85,7 +85,7 @@
|
|
|
<i
|
|
|
v-if="
|
|
|
(roleCode === '0' || roleCode === '1') &&
|
|
|
- (activeName === '2' || activeName === '3')
|
|
|
+ (activeName === '2' || activeName === '3')
|
|
|
"
|
|
|
@click="shareRow(scope.row)"
|
|
|
class="el-icon-share elIcon"
|
|
@@ -271,8 +271,41 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- delOne(row) {
|
|
|
- this.$confirm("确认是否删除?", "提示", {
|
|
|
+ async delOne(row) {
|
|
|
+ let str = "确认是否删除?";
|
|
|
+ if (this.activeName === "3") {
|
|
|
+ let isUsed = await this.$axios({
|
|
|
+ method: "post",
|
|
|
+ url: this.$api.algorithmsLibrary.deleteCheck,
|
|
|
+ data: {
|
|
|
+ id: row.id,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ if (res.info.substring) {
|
|
|
+ str = `该算法已经绑定ID:${res.info.substring} 自动化测试,删除后该项目将停止自动化测试,是否删除?`;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ this.$message.error(
|
|
|
+ res.message ||
|
|
|
+ "校验该算法是否已经绑定自动化测试失败"
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((e) => {
|
|
|
+ this.$message.error(
|
|
|
+ "校验该算法是否已经绑定自动化测试失败!"
|
|
|
+ );
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ if (!isUsed) return;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm(str, "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
@@ -337,7 +370,6 @@ export default {
|
|
|
}
|
|
|
|
|
|
.myTabsBox {
|
|
|
-
|
|
|
/deep/
|
|
|
.el-tabs--top.el-tabs--card
|
|
|
> .el-tabs__header
|