This commit is contained in:
@@ -50,11 +50,7 @@
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
<gz-date-time-picker
|
||||
label="Start"
|
||||
:locale="this.$gzlocale"
|
||||
v-model="obj.startDate"
|
||||
></gz-date-time-picker>
|
||||
<gz-date-time-picker label="Start" :locale="this.$gzlocale" v-model="obj.startDate"></gz-date-time-picker>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 lg4 xl3 px-2>
|
||||
@@ -71,10 +67,10 @@
|
||||
</v-layout>
|
||||
<v-layout align-center justify-space-around row wrap mt-5>
|
||||
<v-flex xs1>
|
||||
<v-btn @click="test">TEST</v-btn>
|
||||
<v-btn>one</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs1>
|
||||
<v-btn @click="clear">clear</v-btn>
|
||||
<v-btn>two</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs1>
|
||||
<v-btn @click="submit">submit</v-btn>
|
||||
@@ -87,15 +83,12 @@
|
||||
|
||||
<script>
|
||||
/* eslint-disable */
|
||||
// type="checkbox"
|
||||
//import store from "../store";
|
||||
//import locale from "../api/locale";
|
||||
|
||||
import api from "../api/apiutil";
|
||||
//import dayjs from "dayjs";
|
||||
//import _ from "../utils/libs/lodash.js";
|
||||
export default {
|
||||
beforeCreate() {
|
||||
//debugger;
|
||||
beforeCreate() {
|
||||
//Cache all required lt keys
|
||||
var ltKeysRequired = [
|
||||
"Widget",
|
||||
@@ -126,12 +119,13 @@ export default {
|
||||
].concat(this.$gzlocale.commonKeysEditForm);
|
||||
this.$gzlocale.fetch(ltKeysRequired);
|
||||
},
|
||||
created() {
|
||||
this.getDataFromApi();
|
||||
},
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
obj: {},
|
||||
//lc: this.$gzlocale,
|
||||
// dayjsLib: dayjs,
|
||||
theDate: new Date(),
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
menu: false,
|
||||
@@ -139,90 +133,16 @@ export default {
|
||||
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;
|
||||
// this.getDataFromApi();
|
||||
},
|
||||
methods: {
|
||||
getDataFromApi() {
|
||||
//debugger;
|
||||
|
||||
//debugger;
|
||||
var url = "Widget/" + this.$route.params.id;
|
||||
api.get(url).then(res => {
|
||||
// debugger;
|
||||
//this.loading = false;
|
||||
this.obj = res.data;
|
||||
//this.totalItems = res.paging.count;
|
||||
});
|
||||
},
|
||||
submit() {
|
||||
//alert("VALIDATING>>>");
|
||||
// debugger;
|
||||
console.log(obj.dollarAmount2);
|
||||
alert(obj.dollarAmount2);
|
||||
this.$validator.validateAll();
|
||||
},
|
||||
clear() {
|
||||
//debugger;
|
||||
console.log(this.data().obj.dollarAmount);
|
||||
alert(data().obj.dollarAmount);
|
||||
},
|
||||
test() {
|
||||
// debugger;
|
||||
|
||||
//console.log(this.lc.decimalParse(this.obj.dollarAmount));
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDataFromApi();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user