1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <template>
- <view>
- <view style="height: 20px" />
- <basics ref="basics" />
- <pilotLamp ref="pilotLamp" itemW="21%" />
- <view class="control-title">设备参数</view>
- <preview ref="preview" />
- <control-panel ref="mpattern" />
- </view>
- </template>
- <script>
- import controlPanel from "../prodnum-YK01/modules/controlPanel.vue";
- import preview from "../prodnum-YK01/modules/preview.vue";
- import pilotLamp from "../prodnum-MT03/modules/pilotLamp.vue";
- import basics from "./modules/basics.vue";
- export default {
- name: "prodnum-FW01",
- components: { controlPanel, pilotLamp, preview, basics },
- props: {
- control: Object,
- },
- watch: {
- control: function (newVal) {
- if (newVal) {
- try {
- this.$refs.preview.list = [
- newVal.params["U002"],
- newVal.params["U003"],
- ];
- } catch (error) {
- console.error("FW01设备状态", error);
- }
- try {
- this.$refs.mpattern.itemList = this.__proto__.getControlItem(
- ["上传时间间隔", "开度变更提醒值"],
- newVal
- );
- } catch (error) {
- console.error("FW01控制面板", error);
- }
- try {
- this.$refs.pilotLamp.list = [
- {
- name: "开度变动提醒",
- value: getBoole("A005"),
- },
- {
- name: "低电量提醒",
- value: getBoole("A002"),
- },
- ];
- if (getBoole("A005")) {
- this.$refs.basics.ctrlModel = this.__proto__.getControlItem(
- ["开度提醒复位"],
- newVal
- )[0];
- console.log("ctrlModel",this.$refs.basics.ctrlModel);
- }
- function getBoole(name, expect = 1) {
- try {
- return newVal.paramvalues[name] == expect;
- } catch (error) {
- console.log("getBoole取值出错项", name);
- return false;
- }
- }
- } catch (error) {
- console.error("FW01指示灯", error);
- }
- try {
- this.$Http.openNetwork(newVal.params.U004.lastvalue);
- } catch (error) {
- setTimeout(this.$Http.openNetwork(newVal.params.U004.lastvalue), 100);
- console.error("06信号强度", error);
- }
- } else {
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- /deep/.pilotLamp .item {
- width: 21% !important;
- }
- </style>
|