zet-lib 1.5.11 → 1.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/zRoute.js +5 -12
- package/package.json +1 -1
package/lib/zRoute.js
CHANGED
|
@@ -1922,11 +1922,7 @@ zRoute.excel = async (req, res, MYMODEL, fields, rows, callback, fileName) => {
|
|
|
1922
1922
|
tableObj[key] = widget.fields;
|
|
1923
1923
|
} else if (widget.name == "switch") {
|
|
1924
1924
|
tableObj[key] = widget.fields;
|
|
1925
|
-
} else if (
|
|
1926
|
-
widget.name == "relation" ||
|
|
1927
|
-
widget.name == "typeahead" ||
|
|
1928
|
-
widget.name == "dropdown_multi"
|
|
1929
|
-
) {
|
|
1925
|
+
} else if (widget.name == "relation" || widget.name == "typeahead" || widget.name == "dropdown_multi") {
|
|
1930
1926
|
var rowsarr = await connection.results({
|
|
1931
1927
|
table: widget.table,
|
|
1932
1928
|
select: widget.fields[0] + "," + widget.fields[1] + " as zname ",
|
|
@@ -2056,10 +2052,7 @@ zRoute.excel = async (req, res, MYMODEL, fields, rows, callback, fileName) => {
|
|
|
2056
2052
|
widgets[field].name == "dropdown_multi")
|
|
2057
2053
|
) {
|
|
2058
2054
|
let myvalue = "";
|
|
2059
|
-
if (
|
|
2060
|
-
widgets[field].import_field &&
|
|
2061
|
-
widgets[field].import_field != "id"
|
|
2062
|
-
) {
|
|
2055
|
+
if (widgets[field].import_field && widgets[field].import_field != "id") {
|
|
2063
2056
|
if (widgets[field].name == "dropdown_multi") {
|
|
2064
2057
|
if (Array.isArray(result[field])) {
|
|
2065
2058
|
let dropdownmultivalue = [];
|
|
@@ -2089,10 +2082,10 @@ zRoute.excel = async (req, res, MYMODEL, fields, rows, callback, fileName) => {
|
|
|
2089
2082
|
} else {
|
|
2090
2083
|
if (widgets[field].name == "dropdown_multi") {
|
|
2091
2084
|
myvalue = result[field] ? result[field] : "";
|
|
2085
|
+
} else if(widgets[field].name == "typeahead"){
|
|
2086
|
+
myvalue = result[field] ? result[field] : "";
|
|
2092
2087
|
} else {
|
|
2093
|
-
myvalue = result[field]
|
|
2094
|
-
? relations[field][result[field]].zname
|
|
2095
|
-
: "";
|
|
2088
|
+
myvalue = result[field] ? relations[field][result[field]].zname : "";
|
|
2096
2089
|
}
|
|
2097
2090
|
}
|
|
2098
2091
|
if (isRaws) {
|