Commit 96afec15 authored by 皮倩雯's avatar 皮倩雯

修改数据字典拖拽问题

parent 168c023b
Pipeline #38765 skipped with stages
......@@ -319,26 +319,26 @@ const WebDic = () => {
}, [flag]);
const setOd = e => {
setOrderTable(e)
setFgg(fgg + 1)
}
// const setOd = e => {
// setOrderTable(e)
// setFgg(fgg + 1)
// }
const setOd1 = e => {
setOrderTable1(e)
setFgg(fgg + 1)
}
// const setOd1 = e => {
// setOrderTable1(e)
// setFgg(fgg + 1)
// }
useEffect(() => {
setOrderTable(data);
setOrderTable1(subData);
}, [fgg]);
// useEffect(() => {
// setOrderTable(data);
// setOrderTable1(subData);
// }, [fgg]);
// 根据orderTable值改变flowIDs
useEffect(() => {
let ids = '';
console.log(orderTable)
orderTable.forEach((item, index) => {
if (index === orderTable.length - 1) {
console.log(data)
data.forEach((item, index) => {
if (index === data.length - 1) {
ids += `${item.nodeID}`;
} else {
ids += `${item.nodeID},`;
......@@ -352,13 +352,13 @@ const WebDic = () => {
setLoading(false)
})
}, [orderTable]);
}, [data]);
useEffect(() => {
let ids = '';
console.log(orderTable1)
if(orderTable1 != ''){
orderTable1.forEach((item, index) => {
if (index === orderTable1.length - 1) {
console.log(subData)
if(subData != ''){
subData.forEach((item, index) => {
if (index === subData.length - 1) {
ids += `${item.nodeID}`;
} else {
ids += `${item.nodeID},`;
......@@ -372,7 +372,7 @@ const WebDic = () => {
DataDictionaryChangeOrder(bb).then(res => {
setIsloading(false)
})
}, [orderTable1]);
}, [subData]);
// 根据父节点nodeID(即parentID)获取子节点数据,一级条目parentID = -1
const getData = value => {
console.log(value);
......@@ -391,7 +391,7 @@ const WebDic = () => {
//是否首次加载
if (value === null || value === '-1') {
setData(res);
setOd(res)
// setOd(res)
console.log(res)
console.log(first)
......@@ -405,7 +405,7 @@ const WebDic = () => {
} else if (value) {
console.log(res);
setSubData(res);//设置二级条目,res为空[]时也要设置
setOd1(res)
// setOd1(res)
}
isLoadingShow(value, false)
// } else {
......@@ -760,17 +760,17 @@ const WebDic = () => {
// 拖拽回调函数
const dragCallBack = value => {
console.log(value)
console.log(orderTable)
// console.log(value)
// console.log(orderTable)
if (value) {
setOrderTable(value)
setData(value)
}
};
const dragCallBack1 = e => {
console.log(e)
console.log(orderTable1)
// console.log(e)
// console.log(orderTable1)
if (e) {
setOrderTable1(e);
setSubData(e);
}
};
......@@ -809,7 +809,7 @@ const WebDic = () => {
size="small"
rowKey={record => record.nodeID}
columns={columns}
dataSource={orderTable}
dataSource={data}
scroll={{ y: 'calc(100vh - 370px)' }}
bordered
dragCallBack={dragCallBack}
......@@ -852,7 +852,7 @@ const WebDic = () => {
columns={columns1}
dragCallBack={dragCallBack1}
className={styles.tab}
dataSource={orderTable1}
dataSource={subData}
scroll={{ x: 'max-content', y: 'calc(100vh - 340px)' }}
rowClassName={setRowClassName1}
onClick={record => {
......
......@@ -77,6 +77,22 @@ const EditModal = props => {
)
}, [])
useEffect(() => {
let ab=[]
GetMessageTemplate().then(
res => {
console.log(2121212)
if (res.code === 0) {
res.data.map((item, index) => {
if (item.Type === "企业微信") {
console.log(index)
ab.push(item)
}
})
}
}
)
console.log(ab)
console.log()
console.log('template', template);
console.log(template.WorkWeiXinTemplateId)
let aa
......
......@@ -600,12 +600,12 @@ const SiteManageV2 = () => {
)}
<div className={styles.switcher}>
{treeVisible && (
<Tooltip title="隐藏机构列表">
<Tooltip title="隐藏站点列表">
<DoubleLeftOutlined onClick={() => setTreeVisible(false)} />
</Tooltip>
)}
{!treeVisible && (
<Tooltip title="显示机构列表">
<Tooltip title="显示站点列表">
<DoubleRightOutlined onClick={() => setTreeVisible(true)} />
</Tooltip>
)}
......
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