diff --git a/Thermo.Active/wwwroot/assets/styles/base/input.less b/Thermo.Active/wwwroot/assets/styles/base/input.less index e677d0bd..c25e2822 100644 --- a/Thermo.Active/wwwroot/assets/styles/base/input.less +++ b/Thermo.Active/wwwroot/assets/styles/base/input.less @@ -145,7 +145,7 @@ select:focus { display: flex; flex-flow: row; align-items: center; - justify-content: center; + justify-content: space-between; &.grid { display: grid; @@ -222,7 +222,7 @@ select:focus { color: #002680; font-size: 24px; font-weight: 500; - flex: 0.7; + // flex: 0.7; } .numeric { diff --git a/Thermo.Active/wwwroot/assets/styles/style.css b/Thermo.Active/wwwroot/assets/styles/style.css index 5ea1b6d6..1737dc9c 100644 --- a/Thermo.Active/wwwroot/assets/styles/style.css +++ b/Thermo.Active/wwwroot/assets/styles/style.css @@ -5343,7 +5343,7 @@ select:focus { display: flex; flex-flow: row; align-items: center; - justify-content: center; + justify-content: space-between; } .input-area.grid { display: grid; @@ -5405,7 +5405,6 @@ select:focus { color: #002680; font-size: 24px; font-weight: 500; - flex: 0.7; } .input-area .numeric { font-size: 18px; diff --git a/Thermo.Active/wwwroot/config.development.json b/Thermo.Active/wwwroot/config.development.json index 34bce964..9c5ab208 100644 --- a/Thermo.Active/wwwroot/config.development.json +++ b/Thermo.Active/wwwroot/config.development.json @@ -4,4 +4,5 @@ "enabled": true, "apiServerUrl": "http://localhost:9000/" } + "allUIVisible": true } \ No newline at end of file diff --git a/Thermo.Active/wwwroot/package-lock.json b/Thermo.Active/wwwroot/package-lock.json index 28c4bce8..db23e3fc 100644 --- a/Thermo.Active/wwwroot/package-lock.json +++ b/Thermo.Active/wwwroot/package-lock.json @@ -10831,6 +10831,11 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lottie-web": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.7.0.tgz", + "integrity": "sha512-mCj9KaVR1FdcaRuKB0oqKqC2R+awlqGgx38Sy4q3H0+aNPJ9Ut5LIvBNGyMHiZRpJlPcRQ1Mk//fp2bY3QYq1A==" + }, "lower-case": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", diff --git a/Thermo.Active/wwwroot/package.json b/Thermo.Active/wwwroot/package.json index b9cdc675..b29303c7 100644 --- a/Thermo.Active/wwwroot/package.json +++ b/Thermo.Active/wwwroot/package.json @@ -16,11 +16,13 @@ "chart.js": "^2.9.3", "core-js": "^3.4.4", "izitoast": "1.2.0", + "lottie-web": "^5.7.0", "moment": "2.24.0", "qrcode": "^1.4.4", "raphael": "^2.3.0", "sprintf-js": "1.1.2", "svg-gauge": "^1.0.6", + "svg-pan-zoom": "3.6.1", "v-tooltip": "^2.0.3", "vee-validate": "2.1.1", "vue": "^2.6.11", @@ -32,8 +34,7 @@ "vue-smooth-dnd": "0.8.1", "vue2-ace-editor": "0.0.15", "vue2-datepicker": "3.4.1", - "vuex": "3.1.3", - "svg-pan-zoom": "3.6.1" + "vuex": "3.1.3" }, "devDependencies": { "@babel/plugin-proposal-export-default-from": "7.8.3", diff --git a/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts b/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts index 1ee8b8d9..441ab663 100644 --- a/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts +++ b/Thermo.Active/wwwroot/src/@types/recipe-current.d.ts @@ -17,7 +17,8 @@ declare module Recipe { unitMeasure: string, setpointHMI: number, setpointPLC: number, - valueAct: number + valueAct: number, + enumVal: { [id: string]: { text: string, anim: string } } } interface IRecipe { diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/combo.ts b/Thermo.Active/wwwroot/src/app_modules_thermo/components/combo.ts new file mode 100644 index 00000000..7a418107 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/combo.ts @@ -0,0 +1,46 @@ +import Component from "vue-class-component"; +import Vue from "vue"; +import { Prop } from "vue-property-decorator"; +import lottie from "lottie-web"; +import { localizeString } from "@/filters/localizeFilter"; + +@Component({}) +export default class Combo extends Vue { + + @Prop() + value: Recipe.IValue; + + get options() { + let result: { id: number, text: string, anim: string }[] = []; + for (const key in this.value.enumVal) { + if (this.value.enumVal.hasOwnProperty(key)) { + const element = this.value.enumVal[key]; + + result.push({ id: parseInt(key), text: element.text, anim: element.anim }) + } + } + return result; + } + + get currentValue() { + let result = this.options.find(o => o.id == this.value.setpointHMI); + if (result) return localizeString(result.text, result.text); + return null; + } + + opened: boolean = false; + showList() { + this.opened = true; + this.$nextTick(() => lottie.searchAnimations()); + + } + + hideList() { + this.opened = false; + } + + mounted() { + + } + +} \ No newline at end of file diff --git a/Thermo.Active/wwwroot/src/app_modules_thermo/components/combo.vue b/Thermo.Active/wwwroot/src/app_modules_thermo/components/combo.vue new file mode 100644 index 00000000..11b7b271 --- /dev/null +++ b/Thermo.Active/wwwroot/src/app_modules_thermo/components/combo.vue @@ -0,0 +1,105 @@ + + +