提交监督考核
parent
f8931a9518
commit
cbc06063f0
|
|
@ -40,12 +40,12 @@ async function send(url, options) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { code } = res.data;
|
const { code } = res.data;
|
||||||
if (code === 401) {
|
// if (code === 401) {
|
||||||
//debugger;
|
// // debugger;
|
||||||
//window.location.href = '/mgr/home';// /mgr/home /login
|
// //window.location.href = '/mgr/home';// /mgr/home /login
|
||||||
window.location.href = '/tsg/#/login';
|
// window.location.href = '/tsg/#/login';
|
||||||
// window.location.hash = '#/login';
|
// // window.location.hash = '#/login';
|
||||||
}
|
// }
|
||||||
return res.data;
|
return res.data;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//message.error(e);
|
//message.error(e);
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,23 @@ const EditableRow = ({ index, ...props }) => {
|
||||||
})
|
})
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleTableData2 = (obj) => {
|
||||||
|
const names = Object.values(obj)?.[0]?.map(o=>o.teamUserName)
|
||||||
|
const obj2 = {}
|
||||||
|
for(let key in obj){
|
||||||
|
const arr = []
|
||||||
|
names?.map((name)=>{
|
||||||
|
obj?.[key]?.map((item)=>{
|
||||||
|
if(name===item.teamUserName){
|
||||||
|
arr.push(item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
obj2[key] = arr
|
||||||
|
}
|
||||||
|
return obj2
|
||||||
|
}
|
||||||
// 获取清单查看数据
|
// 获取清单查看数据
|
||||||
const [qdColumns, setQdColumns] = useState(newcolumns)
|
const [qdColumns, setQdColumns] = useState(newcolumns)
|
||||||
const [qdWidth, setQdWidth] = useState()
|
const [qdWidth, setQdWidth] = useState()
|
||||||
|
|
@ -248,7 +265,8 @@ const EditableRow = ({ index, ...props }) => {
|
||||||
try {
|
try {
|
||||||
const res = await httpget2(apiurl.rcgl.jdkh.khrwgl.qdView + `/${id}`)
|
const res = await httpget2(apiurl.rcgl.jdkh.khrwgl.qdView + `/${id}`)
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
const result = handleTableData(res.data);
|
const linshi = handleTableData2(res.data)//将接口里用户的顺序统一
|
||||||
|
const result = handleTableData(linshi);
|
||||||
const insertCols = [];
|
const insertCols = [];
|
||||||
result.forEach((item, index, arr) => {
|
result.forEach((item, index, arr) => {
|
||||||
const total = arr?.reduce((total, cur) => total + (cur["assessScore" + index] || 0), 0)
|
const total = arr?.reduce((total, cur) => total + (cur["assessScore" + index] || 0), 0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue