This commit is contained in:
2019-03-06 20:09:04 +00:00
parent 0aa3c29a87
commit 0242b5ba03
3 changed files with 72 additions and 36 deletions

View File

@@ -89,37 +89,13 @@
/* eslint-disable */
// type="checkbox"
//import store from "../store";
import locale from "../api/locale";
//import locale from "../api/locale";
import api from "../api/apiutil";
//import dayjs from "dayjs";
//import _ from "../utils/libs/lodash.js";
export default {
components: {},
data() {
return {
obj: {},
lc: locale,
// dayjsLib: dayjs,
theDate: new Date(),
date: new Date().toISOString().substr(0, 10),
menu: false,
modal: false,
menu2: false
};
},
computed: {
// dateFormatted() {
// // var value = this.obj.startDate;
// // if (!value) return "";
// // var dj = dayjs(value);
// // return dj.format("YYYY-MM-DD hh:mm:ss A");
// return this.obj.startDate
// ? dayjs(this.obj.startDate).format("YYYY-MM-DD hh:mm:ss A")
// : "";
// //return this.obj.startDate ? moment(this.date).format("dddd, MMMM Do YYYY") : "";
// }
},
beforeRouteEnter(to, from, next) {
beforeCreate() {
//debugger;
//Cache all required lt keys
var ltKeysRequired = [
"Widget",
@@ -147,13 +123,71 @@ export default {
"WidgetCustom14",
"WidgetCustom15",
"WidgetCustom16"
].concat(locale.commonKeysEditForm);
locale.fetch(ltKeysRequired).then(() => {
next();
});
].concat(this.$gzlocale.commonKeysEditForm);
this.$gzlocale.fetch(ltKeysRequired);
},
components: {},
data() {
return {
obj: {},
lc: this.$gzlocale,
// dayjsLib: dayjs,
theDate: new Date(),
date: new Date().toISOString().substr(0, 10),
menu: false,
modal: false,
menu2: false
};
},
computed: {
// dateFormatted() {
// // var value = this.obj.startDate;
// // if (!value) return "";
// // var dj = dayjs(value);
// // return dj.format("YYYY-MM-DD hh:mm:ss A");
// return this.obj.startDate
// ? dayjs(this.obj.startDate).format("YYYY-MM-DD hh:mm:ss A")
// : "";
// //return this.obj.startDate ? moment(this.date).format("dddd, MMMM Do YYYY") : "";
// }
}
,
// beforeRouteEnter(to, from, next) {
// // debugger;
// //Cache all required lt keys
// var ltKeysRequired = [
// "Widget",
// "WidgetName",
// "WidgetSerial",
// "WidgetDollarAmount",
// "WidgetCount",
// "WidgetRoles",
// "WidgetStartDate",
// "WidgetEndDate",
// "WidgetNotes",
// "WidgetCustom1",
// "WidgetCustom2",
// "WidgetCustom3",
// "WidgetCustom4",
// "WidgetCustom5",
// "WidgetCustom6",
// "WidgetCustom7",
// "WidgetCustom8",
// "WidgetCustom9",
// "WidgetCustom10",
// "WidgetCustom11",
// "WidgetCustom12",
// "WidgetCustom13",
// "WidgetCustom14",
// "WidgetCustom15",
// "WidgetCustom16"
// ].concat(this.$gzlocale.commonKeysEditForm);
// this.$gzlocale.fetch(ltKeysRequired).then(() => {
// next();
// });
// },
mounted() {
//debugger;
// debugger;
// this.getDataFromApi();
},
methods: {
@@ -184,7 +218,7 @@ export default {
test() {
// debugger;
console.log(this.lc.decimalParse(this.obj.dollarAmount));
//console.log(this.lc.decimalParse(this.obj.dollarAmount));
}
},
created() {