| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- export function filterTreeDatas(tree) {
- const accessedRouters = []
- let j = -1
- for (const i in tree) {
- j++
- const treeValue = tree[i].TypeId + '_' + tree[i].id
- accessedRouters.push({
- value: tree[i].id,
- text: tree[i].text,
- })
- if (tree[i].children) {
- accessedRouters[j].children = filterTreeDatas(tree[i].children)
- }
- }
- return accessedRouters
- }
- export function filterTreatData(data){
- const treatData = []
- for (const i in data) {
- treatData.push({
- cityCode:data[i].F_UserId,
- cityName:data[i].F_UserName
- })
- }
- return treatData
- }
- export function filterSelectData(data,keyValue1,keyValue2){
- const treatData = []
- console.log(keyValue1);
- console.log(keyValue2);
- for (let data of data) {
- treatData.push({
- text:data[keyValue1],
- value:data[keyValue2]
- })
- }
- return treatData
- }
- export function filterSelectDataSX(data,keyValue1,keyValue2){
- const treatData = []
- console.log(keyValue1);
- console.log(keyValue2);
- for (let data of data) {
- treatData.push({
- text:data[keyValue1],
- value:data[keyValue2]
- })
- }
- return treatData
- }
|