diff --git a/src/application/mk/basic-pages/list.vue b/src/application/mk/basic-pages/list.vue
index aacb96c..5b5795b 100644
--- a/src/application/mk/basic-pages/list.vue
+++ b/src/application/mk/basic-pages/list.vue
@@ -147,9 +147,11 @@ export default {
headerCells.push(item.title);
}
-
+
+
+
let details = JSON.parse(JSON.stringify(this.$refs.xGrid.getTableData().fullData));
-
+
details.forEach(row => {
let jsonRow = {
@@ -157,16 +159,19 @@ export default {
for (let i = 0; i < this.options.exportColumns.length; i++) {
let item = this.options.exportColumns[i];
var v = "";
- if(item.dataField){
- v = row[item.dataField];
- if(item.textField && v){
+ if (item.valueGetter) {
+ v = item.valueGetter({ row: row,column:item });
+ }
+ else if (item.dataField) {
+ v = row[item.dataField];
+ if (item.textField && v) {
v = v[item.textField]
}
- }else{
+ } else {
v = row[item.field] || '';
}
-
- jsonRow[item.title] = v;
+
+ jsonRow[item.title] = v;
}
jsonRows.push(jsonRow);
});
@@ -178,7 +183,7 @@ export default {
/* get binary string as output */
var wbout = XLSX.write(workbook, { bookType: 'xlsx', bookSST: true, type: 'array' })
try {
- FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), (this.options.exportFileTitle || '导出数据' )+ '.xlsx')
+ FileSaver.saveAs(new Blob([wbout], { type: 'application/octet-stream' }), (this.options.exportFileTitle || '导出数据') + '.xlsx')
} catch (e) {
if (typeof console !== 'undefined') {
console.log(e, wbout)
@@ -289,7 +294,7 @@ export default {
if (mode == "like") { // 如果是模糊搜索
value = "%" + value + "%"; // 如果是模糊搜索就在两边加上%
}
- if(typeof(value) == "object" && value.id){
+ if (typeof (value) == "object" && value.id) {
value = value.id;
}
rules.push({ // 添加搜索参数
@@ -498,6 +503,10 @@ export default {
this.bindSearchData = arg;
this.$refs.xGrid.commitProxy('query') // 提交搜索
},
+
+ gridReload(){
+ this.$refs.xGrid.commitProxy('query')
+ }
},
// 监听属性
watch: {
diff --git a/src/pages/Middle/Mes/MesBom/MesBom/List.vue b/src/pages/Middle/Mes/MesBom/MesBom/List.vue
index 2aacd8f..006eb68 100644
--- a/src/pages/Middle/Mes/MesBom/MesBom/List.vue
+++ b/src/pages/Middle/Mes/MesBom/MesBom/List.vue
@@ -1,5 +1,5 @@
-
+