labels e progress
This commit is contained in:
Vendored
+2
@@ -15,6 +15,7 @@ declare module scada {
|
||||
images: imageControl[],
|
||||
progressBars: progressControl[],
|
||||
inputs: inputControl[],
|
||||
labels: labelControl[],
|
||||
}
|
||||
|
||||
interface status {
|
||||
@@ -33,6 +34,7 @@ declare module scada {
|
||||
}
|
||||
|
||||
interface label {
|
||||
id?: number,
|
||||
backgroundColor: string,
|
||||
textAlign: string,
|
||||
textColor: string,
|
||||
|
||||
@@ -56,13 +56,11 @@ export default class AlarmDetail extends Vue {
|
||||
}
|
||||
|
||||
async mounted() {
|
||||
debugger
|
||||
this.attaches = await alarmsService.getAttachments(this.alarm.id, this.sources.indexOf(this.alarm.source));
|
||||
this.notes = await alarmsService.getNote(this.alarm.id, this.sources.indexOf(this.alarm.source));
|
||||
}
|
||||
|
||||
async onChange(e) {
|
||||
debugger
|
||||
this.newAttach = e.target.files[0];
|
||||
let result = await alarmsService.postAttachment(this.alarm.id, this.sources.indexOf(this.alarm.source), this.newAttach);
|
||||
this.attaches.push(result.data);
|
||||
@@ -148,7 +146,6 @@ export default class AlarmDetail extends Vue {
|
||||
}
|
||||
}
|
||||
async saveNote(note) {
|
||||
debugger
|
||||
if (!note) return;
|
||||
|
||||
let result = await alarmsService.postNote(this.alarm.id, this.sources.indexOf(this.alarm.source), note.message);
|
||||
@@ -157,7 +154,6 @@ export default class AlarmDetail extends Vue {
|
||||
|
||||
}
|
||||
async saveModifyNoteMaintenance(note){
|
||||
debugger
|
||||
if(!note){
|
||||
this.enableModifyNote = true;
|
||||
return;
|
||||
@@ -175,7 +171,6 @@ export default class AlarmDetail extends Vue {
|
||||
}
|
||||
}
|
||||
async onClickDeleteNote(note){
|
||||
debugger
|
||||
let $this = this;
|
||||
if(note){
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
|
||||
|
||||
@@ -88,7 +88,6 @@ export default class AlarmHistory extends Vue {
|
||||
|
||||
@Watch("filter", { deep: true })
|
||||
async filterChanged(n, o) {
|
||||
debugger
|
||||
let $this = this;
|
||||
let from = this.filter.interval && this.filter.interval.length ? this.filter.interval[0] : null;
|
||||
let to = this.filter.interval && this.filter.interval.length ? this.filter.interval[1] : null;
|
||||
@@ -135,14 +134,12 @@ export default class AlarmHistory extends Vue {
|
||||
}
|
||||
|
||||
async selectAlarm(alarm){
|
||||
debugger
|
||||
this.selectedAlarm = alarm;
|
||||
this.attaches = await alarmsService.getAttachments(this.selectedAlarm.alarmId, this.selectedAlarm.source);
|
||||
this.notes = await alarmsService.getNote(this.selectedAlarm.alarmId, this.selectedAlarm.source);
|
||||
}
|
||||
|
||||
updateLimitation() {
|
||||
debugger
|
||||
if (this.limitationList > 3)
|
||||
this.limitationList = 3;
|
||||
else
|
||||
@@ -193,7 +190,6 @@ export default class AlarmHistory extends Vue {
|
||||
}
|
||||
|
||||
async onClickDeleteNote(note){
|
||||
debugger
|
||||
let $this = this;
|
||||
if(note){
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
|
||||
@@ -223,7 +219,6 @@ export default class AlarmHistory extends Vue {
|
||||
}
|
||||
|
||||
async saveModifyNoteMaintenance(note){
|
||||
debugger
|
||||
if(!note){
|
||||
this.enableModifyNote = true;
|
||||
return;
|
||||
@@ -242,7 +237,6 @@ export default class AlarmHistory extends Vue {
|
||||
}
|
||||
|
||||
async saveNote(note) {
|
||||
debugger
|
||||
if (!note) return;
|
||||
|
||||
let result = await alarmsService.postNote(this.selectedAlarm.alarmId, this.selectedAlarm.source, note.message);
|
||||
|
||||
@@ -49,6 +49,14 @@
|
||||
width: `${item.size.x}px`,
|
||||
height: `${item.size.y}px`
|
||||
}">
|
||||
<progress v-for="(item, idx) in progressBars"
|
||||
:key="'pro_' + idx"
|
||||
:style="{ top: `${item.position.y}px`,
|
||||
left: `${item.position.x}px`,
|
||||
width: `${item.size.x}px`,
|
||||
height: `${item.size.y}px`,
|
||||
}"
|
||||
:value="item.memValueIndex" max="1000"></progress>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -48,7 +48,6 @@ export class AlarmsService extends baseRestService {
|
||||
// "language": "en"
|
||||
// }
|
||||
, true);
|
||||
debugger
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { store } from "../store";
|
||||
export class ScadaService extends baseRestService {
|
||||
|
||||
async ListScada(): Promise<scada.ScadaInterface[]> {
|
||||
debugger
|
||||
let result = await this.Get<scada.ScadaInterface[]>('/api/scada/list');
|
||||
|
||||
scadaActions.setScada(store, result);
|
||||
|
||||
@@ -50,6 +50,12 @@ export const scadaStore = {
|
||||
state.layerItems.push({ scadaId: element.id, layerId: layer.id, id: input.id, item: input });
|
||||
}
|
||||
|
||||
for (const idx in layer.labels) {
|
||||
const label = layer.labels[idx];
|
||||
label.type = "labelControl";
|
||||
state.layerItems.push({ scadaId: element.id, layerId: layer.id, id: label.id, item: label });
|
||||
}
|
||||
|
||||
for (const idx in layer.images) {
|
||||
const img = layer.images[idx];
|
||||
img.type = "imageControl";
|
||||
|
||||
Reference in New Issue
Block a user