目的: V80202 – 設定按鈕 icon
{
xtype: 'button', text: '整機抽換紀錄匯出', id: 'Call_V80202I_Btn',
iconCls: 'icon-excel',
listeners: {
click: function () {
Call_V80202I();
}
}
},
},
目的: V80202 – 設定按鈕 icon
目的:V80202 – 工單查詢 - 畫面底部如何加一ToolBar
目的: V80202- 新增過濾欄位1,2,3
處理說明: 1>提供[過濾欄位]挑選 - 挑選要過濾的欄位 & 過濾欄位值 & 欄位值挑選([...])目的: Object 轉成 Array , Array 轉成Object
處理說明: 1>Object 轉成 Array - Object.entries(obj);
const obj = {
name: 'Luke Skywalker',
title: 'Jedi Knight',
age: 23
};
const Ary = Object.entries(obj);
2>Array 轉 Object - Object.fromEntries(Ary);
const Ary_filtered = Ary.filter( ([key, value]) => typeof value === 'string');
const obj_str = Object.fromEntries(Ary_filtered);
3>Sample:
const Obj_num = { 'BUF': 11, 'MIA': 9, 'NE': 6, 'NYJ': 1 };
const Ary_num= Object.entries(Obj_num );
Ary_num.filter( function(key,value){ return value>=9; } ); //正式函式寫法
Ary_num.filter( ([key,value]) => value>=9; ); //另一寫法
const Obj_num9=Object.fromEntries(Ary_num);
Object.entries()
直接取得所有 property 的 name 和 value,並以陣列回傳目的: V80202 - store - filterBy - 過濾欄位 -只顯示符合條件的資料
處理說明: 1> store.filterBy(function(cur_rec)) : 過濾 function 傳回值為 true 的資料
目的: Combobox 選項內容由 store(local) 提供
目的: V80202 Array 的函式用法 - filter , map , includes , forEach