fix:删除12个抽屉的console

This commit is contained in:
Ggysh-7
2022-11-18 07:16:59 +08:00
parent 0acb1f027d
commit c95540a401
19 changed files with 146 additions and 392 deletions

View File

@@ -87,32 +87,13 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs, ref } from "vue";
import { reactive, toRefs } from "vue";
import * as api from "../../api/indexExternalChain";
import * as apiTask from "../../api/indexTaskadd";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
//import { query } from "express";
const rowSelection = ref({
checkStrictly: false,
onChange: (selectedRowKeys, selectedRows) => {
console.log(
`selectedRowKeys: ${selectedRowKeys}`,
"selectedRows: ",
selectedRows
);
},
onSelect: (record, selected, selectedRows) => {
console.log(record, selected, selectedRows);
},
onSelectAll: (selected, selectedRows, changeRows) => {
console.log(selected, selectedRows, changeRows);
},
});
export default {
name: "AddRef",
// components: {
// },
props: {
addrefVisible: {
type: Boolean,
@@ -167,10 +148,8 @@ export default {
title: null,
});
const closeDrawer = () => {
console.log(props, 1111);
ctx.emit("update:addrefVisible", false);
ctx.emit("update:edit", false);
console.log("props", props.routerId);
state.inputV2 = "";
state.inputV1 = "";
state.textV1 = "";
@@ -179,8 +158,7 @@ export default {
localStorage.setItem("chapterId", props.isactive);
};
const afterVisibleChange = (bool) => {
console.log("state", bool);
const afterVisibleChange = () => {
if (props.edit) {
queryRef();
@@ -204,15 +182,14 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 7,
})
.then((res) => {
console.log(res, 11111);
.then(() => {
message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
closeDrawer();
state.addLoading = false;
})
.catch((err) => {
console.log(err, 1111);
.catch(() => {
message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask
@@ -224,13 +201,13 @@ export default {
stageId: props.chooseStageId,
type: 7,
})
.then((res) => {
console.log("调用项目添加接口后111", res.data, 11111);
.then(() => {
message.success(`${props.EditTestId ? "编辑" : "新增"}阶段任务成功`);
ctx.emit("changeData", false);
closeDrawer();
})
.catch((err) => {
console.log(err, 111111);
.catch(() => {
message.error(`${props.EditTestId ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
console.log("");
@@ -254,7 +231,6 @@ export default {
linkId: props.edit ? props.EditRefId : 0,
linkName: state.inputV1,
};
console.log("编辑的id========", props.EditRefId);
if (props.edit) {
api
.updateLinks(obj)
@@ -262,7 +238,9 @@ export default {
message.success("编辑成功");
updateTask(res);
})
.catch((err) => console.log(err));
.catch(() => {
});
} else {
api
.createExternalChain(obj)
@@ -270,7 +248,9 @@ export default {
message.success("提交成功");
updateTask(res);
})
.catch((err) => console.log(err));
.catch(() => {
});
}
};
// 查询任务
@@ -279,11 +259,9 @@ export default {
api
.getLink({ linkId: d })
.then((res) => {
// console.log(dayjs(res.data.data.submitStartTime).format("YYYY-MM-DD"));
state.inputV1 = res.data.data.linkName;
state.inputV2 = res.data.data.linkAddress;
state.textV1 = res.data.data.linkDescription;
console.log("查询成功=====inputv1", state.inputV1);
})
.catch(() => {
message.error(`查询失败`);
@@ -293,7 +271,6 @@ export default {
...toRefs(state),
afterVisibleChange,
closeDrawer,
rowSelection,
handleFinish,
handleFinishFailed,
updateRef,