|
|
@ -126,6 +126,7 @@ function InformationMgm() { |
|
|
|
|
|
|
|
//区域的下拉数据 |
|
|
|
const [areaList, setAreaList] = useState([]); |
|
|
|
const [areaListEdit, setAreaListEdit] = useState([]); |
|
|
|
// 所有下拉菜单 |
|
|
|
const [allSelect, setAllSelect] = useState({ |
|
|
|
release: [], // 发布渠道 |
|
|
@ -137,7 +138,7 @@ function InformationMgm() { |
|
|
|
const [checkId, setCheckId] = useState(""); |
|
|
|
// 折叠树节点 |
|
|
|
const [foldIds, setFoldIds] = useState([]); |
|
|
|
|
|
|
|
const [cascaderKey, setCascaderKey] = useState("1"); |
|
|
|
// 访问接口,获取下拉 |
|
|
|
useEffect(() => { |
|
|
|
getSelectList(); |
|
|
@ -492,7 +493,12 @@ function InformationMgm() { |
|
|
|
ajaxCom.getAreaTree().then( |
|
|
|
(res) => { |
|
|
|
if (parseInt(res?.status) === 20000) { |
|
|
|
let arr = [] |
|
|
|
setAreaList(res?.data || []); |
|
|
|
if(res?.data?.length) { |
|
|
|
arr = res?.data?.filter((value) => value?.name != "全部") |
|
|
|
} |
|
|
|
setAreaListEdit(arr || []) |
|
|
|
} else { |
|
|
|
message.error(res?.message); |
|
|
|
} |
|
|
@ -1102,6 +1108,7 @@ function InformationMgm() { |
|
|
|
<Button |
|
|
|
type="primary" |
|
|
|
onClick={() => { |
|
|
|
getTypeList(); |
|
|
|
setCheckId(""); |
|
|
|
setFoldIds([]); |
|
|
|
setPageType("4"); |
|
|
@ -1255,6 +1262,7 @@ function InformationMgm() { |
|
|
|
<div className="r-con"> |
|
|
|
<Cascader |
|
|
|
className="row-sm" |
|
|
|
key={cascaderKey} |
|
|
|
allowClear |
|
|
|
placeholder="请选择" |
|
|
|
multiple |
|
|
@ -1264,9 +1272,14 @@ function InformationMgm() { |
|
|
|
value: "id", |
|
|
|
children: "children", |
|
|
|
}} |
|
|
|
options={areaList || []} |
|
|
|
options={areaListEdit || []} |
|
|
|
value={rowData?.areaId || []} |
|
|
|
onChange={(e) => handleForm("areaId", e)} |
|
|
|
onDropdownVisibleChange={(e) => { |
|
|
|
if(!e) { |
|
|
|
setCascaderKey(Math.ceil(Math.random()*1000)); |
|
|
|
} |
|
|
|
}} |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|