xiaohaizhao 1 rok temu
rodzic
commit
a4008c25bd

+ 6 - 2
control/components/prodnum-MT02/modules/basics.vue

@@ -45,12 +45,16 @@ export default {
         return {
             ctrlModel: {},
             list: [],
-            subcontrol: null
+            subcontrol: null,
+            replenish: {
+                TimeConOFF: 0,
+                TimeConON: 0,
+            }
         }
     },
     methods: {
         onClick(item) {
-            this.$refs.MyInput.openInput(item)
+            this.$refs.MyInput.openInput(item, false, this.replenish)
         }
     }
 }

+ 17 - 1
control/components/prodnum-MT02/prodnum-MT02.vue

@@ -21,7 +21,23 @@ export default {
                 try {
                     this.$refs.basics.ctrlModel = this.__proto__.getControlItem(['Control'], newVal, { Control: "radioNum" })[0];
                     this.$refs.basics.list = ["MostBad", "FaWei", "NowFlow", "CumFlow"].map(v => newVal.params[v])
-                    switch (this.$refs.basics.ctrlModel.paramValue) {
+                    try {
+                        const replenish = {
+                            TimeConOFF: 0,
+                            TimeConON: 0,
+                        };
+                        let lastvalue = this.__proto__.getControlItem(["TimeCon"], JSON.parse(JSON.stringify(newVal)))[0].params.options.lastvalue
+                        if (lastvalue == 1) {
+                            replenish.TimeConON = 1;
+                        } else {
+                            replenish.TimeConOFF = 1;
+                        }
+                        this.$refs.basics.replenish = replenish;
+                    } catch (error) {
+                        console.log('获取分时补充字段失败', error)
+                    }
+                    console.log(this.$refs.basics.ctrlModel)
+                    switch (this.$refs.basics.ctrlModel.showValue) {
                         case '远程不利点模式':
                             this.$refs.basics.subcontrol = this.__proto__.getControlItem(['Tarb'], newVal)[0];
                             break;

+ 5 - 5
control/modules/My_input.vue

@@ -159,7 +159,8 @@ export default {
         /**
          * @param item.inputType int:数字 step:步进器 radio:单选 switch:开关 dayParting:分时段
          */
-        openInput(item, isSlot = false) {
+        openInput(item, isSlot = false, replenish = {}) {
+            this.replenish = replenish;
             try {
                 this.item = JSON.parse(JSON.stringify(item))
             } catch (error) {
@@ -296,10 +297,9 @@ export default {
             } else if (item.inputType == "radio") {
                 value = params.lastvalue;
             } else if (item.inputType == "radioNum") {
-                value = {};
-                params.options.forEach(v => {
-                    value[`${v.key}`] = v.value
-                });
+                value = { ...this.replenish };
+                params.options.forEach(v => value[`${v.key}`] = v.value);
+                return this.submit(item.w_functionid, value)
             }
             this.submit(item.w_functionid, {
                 [item.paramName]: value

+ 17 - 16
utils/tool.js

@@ -41,22 +41,22 @@ function mount() {
                     success: res => {
                         console.log("获取定位", res)
                         if (isReverseGeocoder) {
-                        /*     const QQMapWX = require("./qqmap-wx-jssdk.min");
-                            let qqmapsdk = new QQMapWX({
-                                key: 'UVVBZ-UOGWZ-ZUWXC-TJQMT-TUWLO-IVFTN'
-                            });
-                            qqmapsdk.reverseGeocoder({
-                                location: {
-                                    latitude: res.latitude,
-                                    longitude: res.longitude
-                                },
-                                success(s) {
-                                    console.log("逆解析结果", s.result)
-                                    res.result = s.result;
-                                    resolve(res)
-                                },
-                                fail: err => console.error(err)
-                            }); */
+                            /*     const QQMapWX = require("./qqmap-wx-jssdk.min");
+                                let qqmapsdk = new QQMapWX({
+                                    key: 'UVVBZ-UOGWZ-ZUWXC-TJQMT-TUWLO-IVFTN'
+                                });
+                                qqmapsdk.reverseGeocoder({
+                                    location: {
+                                        latitude: res.latitude,
+                                        longitude: res.longitude
+                                    },
+                                    success(s) {
+                                        console.log("逆解析结果", s.result)
+                                        res.result = s.result;
+                                        resolve(res)
+                                    },
+                                    fail: err => console.error(err)
+                                }); */
 
                             Vue.prototype.$Http.basic({
                                 "id": "10027201",
@@ -182,6 +182,7 @@ function mount() {
             } catch (error) {
                 console.log("出错项", key, list[key])
                 console.log("出错项funcname", list[key].funcname)
+                console.error(list[key].funcname, error)
             }
         }
         return list