修改代码合并异常

main
姜玉琦 2024-07-14 23:52:30 +08:00
parent 78a072a2a1
commit 9a6cecac19
4 changed files with 18 additions and 42 deletions

View File

@ -74,7 +74,7 @@ function closeBack() {
} }
/** 初始化数据 */ /** 初始化数据 */
funcrouter.push) { function initData() {
let id = route.query.id; let id = route.query.id;
loading.value = true; loading.value = true;
OperatorApi.findOne(id) OperatorApi.findOne(id)

View File

@ -206,7 +206,7 @@ const handleSubmit = useThrottleFn(() => {
}, 3000); }, 3000);
// //
furouter.pushileExceed() { function handleFileExceed() {
uploadRef.value.clearFiles(); uploadRef.value.clearFiles();
ElMessage.warning("已清空文件列表,请重新上传!"); ElMessage.warning("已清空文件列表,请重新上传!");
} }

View File

@ -137,5 +137,4 @@ onMounted(() => {
} }
} }
} }
</style> </style>
router.push

View File

@ -112,32 +112,6 @@ const queryParams = reactive({
}); });
defineOptions({
name: "calculateIndex",
inheritAttrs: false,
});
import { UserQuery } from "@/api/user/model";
const queryFormRef = ref(ElForm); //
const router = useRouter();
const loading = ref(false); //
const removeIds = ref([]); // ID
const queryParams = reactive<UserQuery>({
pageNum: 1,
pageSize: 10,
});
const dateTimeRange = ref("");
const total = ref(0); //
watch(dateTimeRange, (newVal) => {
if (newVal) {
queryParams.startTime = newVal[0];
queryParams.endTime = newVal[1];
}
});
const tableData = [ const tableData = [
{ {
id: 1, id: 1,
@ -201,42 +175,45 @@ function resetQuery() {
/** 行选中 */ /** 行选中 */
function handleSelectionChange(selection: any) { function handleSelectionChange(selection: any) {
removeIds.value = selection.map((item: any) => item.id); removeIds.value = selection.map((item: any) => item.id);
}router.push }
/** 删除数据 */ /** 删除数据 */
furouter.pushelete(row: { [key: string]: any }) { function handleDelete(row: { [key: string]: any }) {
ElMessageBox.confirm("确认删除计算设备信息?", "警告", { ElMessageBox.confirm("确认删除计算设备信息?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
router.pushText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(function () { }).then(function () {
router.pushccess("删除成功"); // ToolChainshApi.deleteTool(row.tool_id).then((res) => {
ElMessage.success("删除成功");
// resetQuery();
// });
}); });
} }
/**router.push /**
* 打开弹窗 * 打开弹窗
*router.push *
* @param type 弹窗类型 用户表单user-form | 用户导入user-import * @param type 弹窗类型 用户表单user-form | 用户导入user-import
* @param id 用户ID * @param id 用户ID
*/ */
async function openDialog(type: string, id?: number) { async function openDialog(type: string, id?: number) {
router.replace({ path: "/tester/equipmentEdit" }); router.push({ path: "/tester/equipmentEdit" });
} }
async function openDialog1(type: string, id?: number) { async function openDialog1(type: string, id?: number) {
router.replace({ path: "/tester/equipmentEditPcie" }); router.push({ path: "/tester/equipmentEditPcie" });
} }
async function openDialog2(type: string, id?: number) { async function openDialog2(type: string, id?: number) {
router.replace({ path: "/tester/equipmentEditNet" }); router.push({ path: "/tester/equipmentEditNet" });
} }
async function openDialog3(type: string, id?: number) { async function openDialog3(type: string, id?: number) {
router.replace({ path: "/tester/equipmentView" }); router.push({ path: "/tester/equipmentView" });
} }
async function openDialog4(type: string, row) { async function openDialog4(type: string, row) {
if(row.sblx=='网络设备'){ if(row.sblx=='网络设备'){
router.replace({ path: "/tester/equipmentEditNet" }); router.push({ path: "/tester/equipmentEditNet" });
}else{ }else{
router.replace({ path: "/tester/equipmentEditPcie" }); router.push({ path: "/tester/equipmentEditPcie" });
} }
} }
/** 下载导入模板 */ /** 下载导入模板 */