H5/Js/Cpbdsj.js
@@ -29,7 +29,8 @@
            DAA001: [],
            show: false,//列表展示
            actions: [],//列表的值
            xt:"",
            xtName: "",//线体名称
            xtNum: "",//线体编号
        }
    },
    mounted() {
@@ -349,17 +350,52 @@
        },
        onSelect(item) {
            // 默认情况下点击选项时不会自动收起
            // 可以通过 close-on-click-action 属性开启自动收起
            this.show = false;
            console.log(item);
            // 正则匹配第一个方括号内容
            const regex = /\[([^\]]+)\]/;
            const matchResult = item.name.match(regex);
            this.xt = item.name;
            //this.$toast(item.name);
            this.modeInfo.Xt = item;
        },
        //获取可呼叫AGV的线体
        selectXt() {
            this.show = true;
            var that = this;
            that.actions = [];
            that.isLoading = true;
            that.AxiosHttp("post", 'Womdaa/GetAgvXt', {
                selectKey: that.selectKey,
            }, false)
                .then(function (res) {
                    var json = res;
                    if (json.status == 0) {
                        if (json.data.tbBillList.length <= 0) {
                            that.$toast.fail("没有可用的数据");
                            that.$playSound('error');
                        } else {
                            that.itemInfo = json.data.tbBillList;
                            that.actions = json.data.tbBillList.map(item => {
                                return {
                                    name: item.daaInfo,  // 拼接字段
                                    subname:"[线体名称][]"
                                };
                            });
                        }
                    }
                    else {
                        that.$toast.fail(json.message);
                        that.$playSound('error');
                    }
                    that.isLoading = false;
                })
                .catch(function (error) {
                    that.isLoading = false;
                    that.$toast.fail("网络错误,请重试!");
                    that.$playSound('error');
                    console.log(error);
                });
        },
    }