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

修改数据字典拖拽问题

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