增加重试按钮及业务参数
parent
8920f41cb0
commit
1729fb026e
|
@ -1,5 +1,5 @@
|
||||||
VITE_BASE=/
|
VITE_BASE=/
|
||||||
VITE_BASE_URL=http://192.168.0.104:8059/docking/
|
VITE_BASE_URL=http://127.0.0.1:8059/docking/
|
||||||
|
|
||||||
#VITE_BASE=/
|
#VITE_BASE=/
|
||||||
#VITE_BASE_URL=http://39.100.115.58:7100/docking/
|
#VITE_BASE_URL=http://39.100.115.58:7100/docking/
|
||||||
|
|
|
@ -72,6 +72,24 @@ export function postRequest(url, params = {}) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
export function postListRequest(url, params = {}) {
|
||||||
|
// const userStore = useUserStore(pinia);
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
axios
|
||||||
|
.post(url, params)
|
||||||
|
.then((res) => {
|
||||||
|
if (res.data.result === "success") {
|
||||||
|
resolve(res.data);
|
||||||
|
} else {
|
||||||
|
ElMessage.error(res.data.msg || "系统开小差了");
|
||||||
|
reject(res.data);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
reject(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
export function getRequest(url, params = {}) {
|
export function getRequest(url, params = {}) {
|
||||||
const userStore = useUserStore(pinia);
|
const userStore = useUserStore(pinia);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { postRequest } from "./axios";
|
import {postListRequest, postRequest} from "./axios";
|
||||||
|
|
||||||
// 获取企业信息-分页
|
// 获取企业信息-分页
|
||||||
export const getDataList = (params) =>
|
export const getDataList = (params) =>
|
||||||
|
@ -15,3 +15,7 @@ export const setRecordDelete = (params) =>
|
||||||
// 记录信息 - 详情
|
// 记录信息 - 详情
|
||||||
export const getRecordDetail = (params) =>
|
export const getRecordDetail = (params) =>
|
||||||
postRequest("/data/info/record/detail", params);
|
postRequest("/data/info/record/detail", params);
|
||||||
|
|
||||||
|
// 记录信息 - 重新推送
|
||||||
|
export const setRecordDataPush = (params) =>
|
||||||
|
postListRequest("/data/info/record/data/push", params);
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
>
|
>
|
||||||
详情信息
|
详情信息
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button type="primary" text link @click="fnPush(row.id)">
|
||||||
|
重新推送
|
||||||
|
</el-button>
|
||||||
<el-button type="danger" text link @click="fnDelete(row.id)">
|
<el-button type="danger" text link @click="fnDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -54,7 +57,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { getRecordList, setRecordDelete } from "@/request/data_directory.js";
|
import {getRecordList, setRecordDataPush, setRecordDelete} from "@/request/data_directory.js";
|
||||||
import useListData from "@/hooks/useListData.js";
|
import useListData from "@/hooks/useListData.js";
|
||||||
import AppSearch from "@/components/search/index.vue";
|
import AppSearch from "@/components/search/index.vue";
|
||||||
import AppTable from "@/components/table/index.vue";
|
import AppTable from "@/components/table/index.vue";
|
||||||
|
@ -133,6 +136,16 @@ const fnDelete = async (id) => {
|
||||||
ElMessage.success("删除成功");
|
ElMessage.success("删除成功");
|
||||||
resetPagination();
|
resetPagination();
|
||||||
};
|
};
|
||||||
|
const fnPush = async (id) => {
|
||||||
|
// 检查参数类型,如果是字符串或数字,则转换为单元素数组
|
||||||
|
const records =[{ id: id, dataType: Number(route.query.dataType) }];
|
||||||
|
await ElMessageBox.confirm("确定要重新推送吗?", {
|
||||||
|
type: "warning",
|
||||||
|
});
|
||||||
|
await setRecordDataPush(records);
|
||||||
|
ElMessage.success("重新推送成功");
|
||||||
|
resetPagination();
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
@ -47,17 +47,19 @@ export const reqMapArr = [
|
||||||
dataType: ["6"],
|
dataType: ["6"],
|
||||||
options: [
|
options: [
|
||||||
{ key: "checkRiskName", label: "排查风险名称" },
|
{ key: "checkRiskName", label: "排查风险名称" },
|
||||||
{ key: "checkDep", label: "排查部门" },
|
|
||||||
{ key: "checker", label: "排查人" },
|
{ key: "checker", label: "排查人" },
|
||||||
{ key: "taskName", label: "任务名称" },
|
{ key: "taskName", label: "任务名称" },
|
||||||
|
{ key: "planId", label: "清单ID" },
|
||||||
{ key: "dataId", label: "数据ID" },
|
{ key: "dataId", label: "数据ID" },
|
||||||
|
|
||||||
],
|
],
|
||||||
reqMap: {
|
reqMap: {
|
||||||
checkRiskName: "",
|
checkRiskName: "",
|
||||||
checkDep: "",
|
|
||||||
checker: "",
|
checker: "",
|
||||||
taskName: "",
|
taskName: "",
|
||||||
|
planId: "",
|
||||||
dataId: "",
|
dataId: "",
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue