恢复测试代码
This commit is contained in:
@ -241,39 +241,37 @@ export const getTreeDataOut = async (assessRoomId: any, turnSort: any) => {
|
|||||||
let data: any = [];
|
let data: any = [];
|
||||||
let rootT: any = [];
|
let rootT: any = [];
|
||||||
let childT: any = [];
|
let childT: any = [];
|
||||||
//TODO zyx假数据-start
|
await getTree({ assessRoomId: assessRoomId, turnSort: turnSort }).then((res) => {
|
||||||
// await getTree({ assessRoomId: assessRoomId, turnSort: turnSort }).then((res) => {
|
if (res.data != undefined) {
|
||||||
// if (res.data != undefined) {
|
res.data.map((item: any, index: any) => {
|
||||||
// res.data.map((item: any, index: any) => {
|
const title1 = item.name;
|
||||||
// const title1 = item.name;
|
const key1 = item.id;
|
||||||
// const key1 = item.id;
|
let children1: any = [];
|
||||||
// let children1: any = [];
|
if (item.children != undefined) {
|
||||||
// if (item.children != undefined) {
|
const children = item.children.map((item: any, index: any) => {
|
||||||
// const children = item.children.map((item: any, index: any) => {
|
const title2 = item.name;
|
||||||
// const title2 = item.name;
|
const key2 = item.id;
|
||||||
// const key2 = item.id;
|
let children2: any = [];
|
||||||
// let children2: any = [];
|
if (item.children != undefined) {
|
||||||
// if (item.children != undefined) {
|
const children = item.children.map((item: any, index: any) => {
|
||||||
// const children = item.children.map((item: any, index: any) => {
|
const title3 = item.name;
|
||||||
// const title3 = item.name;
|
const key3 = item.id;
|
||||||
// const key3 = item.id;
|
childT.push(key3)
|
||||||
// childT.push(key3)
|
return { title: title3, key: key3, pId: key2 }
|
||||||
// return { title: title3, key: key3, pId: key2 }
|
});
|
||||||
// });
|
children2 = children;
|
||||||
// children2 = children;
|
}
|
||||||
// }
|
childT.push(key2)
|
||||||
// childT.push(key2)
|
return { title: title2, key: key2, children: children2, pId: key1 }
|
||||||
// return { title: title2, key: key2, children: children2, pId: key1 }
|
});
|
||||||
// });
|
children1 = children;
|
||||||
// children1 = children;
|
}
|
||||||
// }
|
const first = { title: title1, key: key1, children: children1, pId: null }
|
||||||
// const first = { title: title1, key: key1, children: children1, pId: null }
|
rootT.push(key1)
|
||||||
// rootT.push(key1)
|
data.push(first);
|
||||||
// data.push(first);
|
});
|
||||||
// });
|
}
|
||||||
// }
|
})
|
||||||
// })
|
|
||||||
//TODO zyx假数据-end
|
|
||||||
return { roots: rootT, childs: childT, treeData: data }
|
return { roots: rootT, childs: childT, treeData: data }
|
||||||
}
|
}
|
||||||
export default FileTree;
|
export default FileTree;
|
||||||
|
@ -285,9 +285,16 @@ class manager extends PureComponent {
|
|||||||
const params = {
|
const params = {
|
||||||
id: record.id
|
id: record.id
|
||||||
}
|
}
|
||||||
//TODO zyx假数据-start
|
this.props.dispatch({
|
||||||
let methodDict = proMethod == null ? "procurement_mode_1" : proMethod
|
type: "bidev/checkOpenBidSupplier",
|
||||||
if (methodDict == "procurement_mode_5" && checkOpenList?.length < 2) {
|
payload: params.id,
|
||||||
|
callback: (response) => {
|
||||||
|
let checkOpenList = response.data
|
||||||
|
let methodDict = proMethod == null ? "procurement_mode_1" : proMethod
|
||||||
|
if (checkOpenList?.length == 0) {
|
||||||
|
message.error("应答的供应商为0家,不能开启评审!")
|
||||||
|
} else {
|
||||||
|
if (methodDict == "procurement_mode_5" && checkOpenList?.length < 2) {
|
||||||
confirm({
|
confirm({
|
||||||
title: '确认开启评审室?',
|
title: '确认开启评审室?',
|
||||||
icon: <ExclamationCircleOutlined />,
|
icon: <ExclamationCircleOutlined />,
|
||||||
@ -320,52 +327,9 @@ class manager extends PureComponent {
|
|||||||
onCancel() { },
|
onCancel() { },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// this.props.dispatch({
|
}
|
||||||
// type: "bidev/checkOpenBidSupplier",
|
}
|
||||||
// payload: params.id,
|
})
|
||||||
// callback: (response) => {
|
|
||||||
// let checkOpenList = response.data
|
|
||||||
// let methodDict = proMethod == null ? "procurement_mode_1" : proMethod
|
|
||||||
// if (checkOpenList?.length == 0) {
|
|
||||||
// message.error("应答的供应商为0家,不能开启评审!")
|
|
||||||
// } else {
|
|
||||||
// if (methodDict == "procurement_mode_5" && checkOpenList?.length < 2) {
|
|
||||||
// confirm({
|
|
||||||
// title: '确认开启评审室?',
|
|
||||||
// icon: <ExclamationCircleOutlined />,
|
|
||||||
// content: <span style={{ color: "#b30000" }}>注意:应答的供应商少于2家</span>,
|
|
||||||
// centered: true,
|
|
||||||
// onOk() {
|
|
||||||
// onOpenPreRoom(params)
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
// } else if (methodDict == "procurement_mode_3" && checkOpenList?.length < 3) {
|
|
||||||
// confirm({
|
|
||||||
// title: '确认开启评审室?',
|
|
||||||
// icon: <ExclamationCircleOutlined />,
|
|
||||||
// content: <span style={{ color: "#b30000" }}>注意:应答的供应商少于3家</span>,
|
|
||||||
// centered: true,
|
|
||||||
// onOk() {
|
|
||||||
// onOpenPreRoom(params)
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
// } else {
|
|
||||||
// confirm({
|
|
||||||
// title: '确认开启评审室?',
|
|
||||||
// icon: <ExclamationCircleOutlined />,
|
|
||||||
// centered: true,
|
|
||||||
// onOk() {
|
|
||||||
// onOpenPreRoom(params)
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
//TODO zyx假数据-end
|
|
||||||
}
|
}
|
||||||
onOpenRoom = (params) => {
|
onOpenRoom = (params) => {
|
||||||
const { defId } = this.state
|
const { defId } = this.state
|
||||||
@ -417,16 +381,6 @@ class manager extends PureComponent {
|
|||||||
const params = {
|
const params = {
|
||||||
id: record.id
|
id: record.id
|
||||||
}
|
}
|
||||||
//TODO zyx假数据-start
|
|
||||||
// confirm({
|
|
||||||
// title: '确认开启评审室?',
|
|
||||||
// icon: <ExclamationCircleOutlined />,
|
|
||||||
// centered: true,
|
|
||||||
// onOk() {
|
|
||||||
// onOpenOffRoom(params)
|
|
||||||
// },
|
|
||||||
// onCancel() { },
|
|
||||||
// });
|
|
||||||
this.props.dispatch({
|
this.props.dispatch({
|
||||||
type: "bidev/checkOpenBidSupplier",
|
type: "bidev/checkOpenBidSupplier",
|
||||||
payload: params.id,
|
payload: params.id,
|
||||||
@ -472,7 +426,6 @@ class manager extends PureComponent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//TODO zyx假数据-end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onOpenOffRoom = (params) => {
|
onOpenOffRoom = (params) => {
|
||||||
|
Reference in New Issue
Block a user