This commit is contained in:
@@ -74,27 +74,6 @@
|
||||
></v-radio>
|
||||
</v-radio-group>
|
||||
|
||||
<gz-tag-picker
|
||||
v-model="localSettings.woitemtags"
|
||||
class="mt-4"
|
||||
:label="$ay.t('Tags') + ' - ' + $ay.t('WorkOrderItem')"
|
||||
></gz-tag-picker>
|
||||
<v-radio-group
|
||||
v-if="localSettings.woitemtags.length > 1"
|
||||
v-model="localSettings.woitemtagsany"
|
||||
row
|
||||
class="mt-n3"
|
||||
>
|
||||
<v-radio
|
||||
:label="$ay.t('GridFilterDialogAndRadioText')"
|
||||
:value="false"
|
||||
></v-radio>
|
||||
<v-radio
|
||||
:label="$ay.t('GridFilterDialogOrRadioText')"
|
||||
:value="true"
|
||||
></v-radio>
|
||||
</v-radio-group>
|
||||
|
||||
<v-text-field
|
||||
v-model="localSettings.customTitle"
|
||||
class="mt-4"
|
||||
@@ -141,7 +120,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
obj: {},
|
||||
obj: [],
|
||||
context: false,
|
||||
localSettings: {},
|
||||
selectLists: {
|
||||
@@ -151,6 +130,9 @@ export default {
|
||||
chartOptions: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
xAxes: [
|
||||
{
|
||||
@@ -170,7 +152,9 @@ export default {
|
||||
drawOnChartArea: false
|
||||
},
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
beginAtZero: true,
|
||||
min: 0,
|
||||
max: 100
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -180,15 +164,37 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
chartData() {
|
||||
return {
|
||||
datasets: [
|
||||
{
|
||||
label: this.$ay.t("WorkOrderList"),
|
||||
backgroundColor: this.settings.color ?? "#000000",
|
||||
data: this.obj
|
||||
}
|
||||
]
|
||||
// let onTime = {
|
||||
// lable: "Ontime",
|
||||
// backgroundColor: "#00ff00",
|
||||
// data: []
|
||||
// };
|
||||
// let notOnTime = {
|
||||
// lable: "Not on time",
|
||||
// backgroundColor: "#ff0000",
|
||||
// data: []
|
||||
// };
|
||||
// this.obj.forEach(z => {
|
||||
// if (z.z) {
|
||||
// notOnTime.data.push({ x: z.x, y: z.y });
|
||||
// } else {
|
||||
// onTime.data.push({ x: z.x, y: z.y });
|
||||
// }
|
||||
// });
|
||||
|
||||
// return { datasets: [onTime, notOnTime] };
|
||||
let onTime = {
|
||||
backgroundColor: this.settings.color,
|
||||
data: []
|
||||
};
|
||||
|
||||
this.obj.forEach(z => {
|
||||
if (z.z == false) {
|
||||
onTime.data.push({ x: z.x, y: z.y });
|
||||
}
|
||||
});
|
||||
|
||||
return { datasets: [onTime] };
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
@@ -212,8 +218,6 @@ export default {
|
||||
this.settings.color = this.localSettings.color;
|
||||
this.settings.wotags = this.localSettings.wotags;
|
||||
this.settings.wotagsany = this.localSettings.wotagsany;
|
||||
this.settings.woitemtags = this.localSettings.woitemtags;
|
||||
this.settings.woitemtagsany = this.localSettings.woitemtagsany;
|
||||
|
||||
this.$emit("dash-change"); //trigger save to server
|
||||
this.context = false;
|
||||
@@ -224,14 +228,12 @@ export default {
|
||||
try {
|
||||
this.errorMessage = null;
|
||||
const res = await window.$gz.api.post("kpi", {
|
||||
KPIName: "WorkOrderCreatedCount",
|
||||
KPIName: "WorkOrderCompletedOnTimePct",
|
||||
criteria: {
|
||||
timeSpan: this.settings.timeSpan,
|
||||
interval: this.settings.interval,
|
||||
wotags: this.settings.wotags,
|
||||
wotagsany: this.settings.wotagsany,
|
||||
woitemtags: this.settings.woitemtags,
|
||||
woitemtagsany: this.settings.woitemtagsany
|
||||
wotagsany: this.settings.wotagsany
|
||||
},
|
||||
clientTimeStamp: window.$gz.locale.clientLocalZoneTimeStamp()
|
||||
});
|
||||
@@ -311,7 +313,6 @@ async function fetchTranslatedText() {
|
||||
"TimeSpan",
|
||||
"Interval",
|
||||
"WorkOrder",
|
||||
"WorkOrderItem",
|
||||
"GridFilterDialogAndRadioText",
|
||||
"GridFilterDialogOrRadioText"
|
||||
]);
|
||||
|
||||
@@ -96,6 +96,7 @@ import GzDashWorkorderOverduePersonalList from "../components/dash-workorder-ove
|
||||
import GzDashWorkorderOverdueAllList from "../components/dash-workorder-overdue-all-list.vue";
|
||||
import GzDashWorkOrderCreatedCountLine from "../components/dash-work-order-created-count-line.vue";
|
||||
import GzDashWorkOrderCreatedCountBar from "../components/dash-work-order-created-count-bar.vue";
|
||||
import GzDashPctWorkOrderCompletedOnTimeBar from "../components/dash-work-order-completed-on-time-pct-bar.vue";
|
||||
export default {
|
||||
components: {
|
||||
GzDashLaborHoursPersonalLine,
|
||||
@@ -110,7 +111,8 @@ export default {
|
||||
GzDashWorkorderOverduePersonalList,
|
||||
GzDashWorkorderOverdueAllList,
|
||||
GzDashWorkOrderCreatedCountLine,
|
||||
GzDashWorkOrderCreatedCountBar
|
||||
GzDashWorkOrderCreatedCountBar,
|
||||
GzDashPctWorkOrderCompletedOnTimeBar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user