Commit 5f3f16f2 authored by 皮倩雯's avatar 皮倩雯

fix: '巡维保前端界面优化'

parent 4ff2023e
Pipeline #54018 waiting for manual action with stages
...@@ -88,6 +88,7 @@ const ChangeAdd = props => { ...@@ -88,6 +88,7 @@ const ChangeAdd = props => {
console.log(indeterminate); console.log(indeterminate);
if (type == 'edit') { if (type == 'edit') {
if (isType != '' && isType === 'add') { if (isType != '' && isType === 'add') {
// 反馈名称
let checkArr = []; let checkArr = [];
console.log(newCheckedList); console.log(newCheckedList);
newCheckedList.map(checkItem => { newCheckedList.map(checkItem => {
...@@ -96,11 +97,12 @@ const ChangeAdd = props => { ...@@ -96,11 +97,12 @@ const ChangeAdd = props => {
} }
}); });
setCheckedList(checkArr); setCheckedList(checkArr);
setIndeterminate(!!newCheckedList.length && newCheckedList.length < filed.length); setIndeterminate(!!checkArr.length && checkArr.length < filed.length);
setCheckAll(newCheckedList.length === filed.length); setCheckAll(checkArr.length === filed.length);
let newArr = characterValue.length ? characterValue.split(',') : []; let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr); setSelectData(newArr);
} else if (isType === 'app') { } else if (isType === 'app') {
// 执行角色
let checkArr = []; let checkArr = [];
console.log(newCheckedList); console.log(newCheckedList);
newCheckedList.map(checkItem => { newCheckedList.map(checkItem => {
...@@ -109,26 +111,30 @@ const ChangeAdd = props => { ...@@ -109,26 +111,30 @@ const ChangeAdd = props => {
} }
}); });
setCheckedList(checkArr); setCheckedList(checkArr);
setIndeterminate(!!newCheckedList.length && newCheckedList.length < ff.length); setIndeterminate(!!checkArr.length && checkArr.length < ff.length);
setCheckAll(newCheckedList.length === ff.length); setCheckAll(checkArr.length === ff.length);
let newArr = characterValue.length ? characterValue.split(',') : []; let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr); setSelectData(newArr);
} }
} else { } else {
if (isType != '' && isType === 'add') { if (isType != '' && isType === 'add') {
// 反馈名称
let checkArr = []; let checkArr = [];
console.log(filed);
console.log(newCheckedList); console.log(newCheckedList);
newCheckedList.map(checkItem => { newCheckedList.map(checkItem => {
if (filed.includes(checkItem)) { if (filed.includes(checkItem)) {
checkArr.push(checkItem); checkArr.push(checkItem);
} }
}); });
console.log(checkArr);
setCheckedList(checkArr); setCheckedList(checkArr);
setIndeterminate(false); setIndeterminate(!!checkArr.length && checkArr.length < filed.length);
setCheckAll(false); setCheckAll(checkArr.length === filed.length);
let newArr = characterValue.length ? characterValue.split(',') : []; let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr); setSelectData(newArr);
} else if (isType === 'app') { } else if (isType === 'app') {
// 执行角色
let checkArr = []; let checkArr = [];
console.log(newCheckedList); console.log(newCheckedList);
newCheckedList.map(checkItem => { newCheckedList.map(checkItem => {
...@@ -137,8 +143,8 @@ const ChangeAdd = props => { ...@@ -137,8 +143,8 @@ const ChangeAdd = props => {
} }
}); });
setCheckedList(checkArr); setCheckedList(checkArr);
setIndeterminate(false); setIndeterminate(!!checkArr.length && checkArr.length < ff.length);
setCheckAll(false); setCheckAll(checkArr.length === ff.length);
let newArr = characterValue.length ? characterValue.split(',') : []; let newArr = characterValue.length ? characterValue.split(',') : [];
setSelectData(newArr); setSelectData(newArr);
} }
......
...@@ -48,7 +48,7 @@ const maintenance = () => { ...@@ -48,7 +48,7 @@ const maintenance = () => {
title: '业务类型', title: '业务类型',
dataIndex: 'businessType', dataIndex: 'businessType',
key: 'businessType', key: 'businessType',
// width: 100, width: 100,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 100, maxWidth: 100,
...@@ -69,26 +69,17 @@ const maintenance = () => { ...@@ -69,26 +69,17 @@ const maintenance = () => {
title: '执行周期', title: '执行周期',
dataIndex: 'docycle', dataIndex: 'docycle',
key: 'docycle', key: 'docycle',
// width: 100, width: 100,
onCell: () => ({
style: {
maxWidth: 100,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center', align: 'center',
}, },
{ {
title: '台账名称', title: '台账名称',
dataIndex: 'accountName', dataIndex: 'accountName',
key: 'accountName', key: 'accountName',
// width: 100, width: 200,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 100, maxWidth: 200,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
...@@ -106,10 +97,9 @@ const maintenance = () => { ...@@ -106,10 +97,9 @@ const maintenance = () => {
title: '反馈名称', title: '反馈名称',
dataIndex: 'feedbackName', dataIndex: 'feedbackName',
key: 'feedbackName', key: 'feedbackName',
width: 200,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 200,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
...@@ -127,10 +117,10 @@ const maintenance = () => { ...@@ -127,10 +117,10 @@ const maintenance = () => {
title: '台账过滤条件', title: '台账过滤条件',
dataIndex: 'filterCondition', dataIndex: 'filterCondition',
key: 'filterCondition', key: 'filterCondition',
// width: 150, width: 150,
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 200, maxWidth: 150,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
...@@ -149,32 +139,22 @@ const maintenance = () => { ...@@ -149,32 +139,22 @@ const maintenance = () => {
dataIndex: 'isSubmit', dataIndex: 'isSubmit',
key: 'isSubmit', key: 'isSubmit',
width: 80, width: 80,
onCell: () => ({
style: {
maxWidth: 100,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center', align: 'center',
}, },
{ {
title: '执行角色', title: '执行角色',
dataIndex: 'doRole', dataIndex: 'doRole',
key: 'doRole', key: 'doRole',
width: 300, align: 'center',
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 350,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
cursor: 'pointer', cursor: 'pointer',
}, },
}), }),
align: 'center',
render: record => ( render: record => (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
...@@ -186,32 +166,32 @@ const maintenance = () => { ...@@ -186,32 +166,32 @@ const maintenance = () => {
dataIndex: 'produceDays', dataIndex: 'produceDays',
key: 'produceDays', key: 'produceDays',
width: 80, width: 80,
align: 'center',
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 100, maxWidth: 80,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
cursor: 'pointer', cursor: 'pointer',
}, },
}), }),
align: 'center',
}, },
{ {
title: '在线任务量', title: '在线任务量',
dataIndex: 'onLines', dataIndex: 'onLines',
key: 'onLines', key: 'onLines',
width: 80, width: 80,
align: 'center',
onCell: () => ({ onCell: () => ({
style: { style: {
maxWidth: 100, maxWidth: 80,
overflow: 'hidden', overflow: 'hidden',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
textOverflow: 'ellipsis', textOverflow: 'ellipsis',
cursor: 'pointer', cursor: 'pointer',
}, },
}), }),
align: 'center',
render: record => ( render: record => (
<Tooltip placement="topLeft" title={record}> <Tooltip placement="topLeft" title={record}>
{record} {record}
...@@ -222,16 +202,7 @@ const maintenance = () => { ...@@ -222,16 +202,7 @@ const maintenance = () => {
title: '启停', title: '启停',
dataIndex: 'doNot', dataIndex: 'doNot',
key: 'doNot', key: 'doNot',
// width: 100, width: 80,
onCell: () => ({
style: {
maxWidth: 100,
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
cursor: 'pointer',
},
}),
align: 'center', align: 'center',
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment