

{
        template: '${tmpl}',
                data: function() {
                        return {
                                popupVisible: false,
                                email: null,
                                phoneNum: null,
                                companyName: null,
                                tipsShow: false,
                                searchList: [],
                                diagnoseList: [
                                        {
                                                title: '专利价值评估',
                                                text: '根据企业专利现在的价值和未来专利效益价值进行综合评估',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807456.png',
                                        },
                                        {
                                                title: '专利增长',
                                                text: '企业近10年专利申请授权数据趋势分析',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_20190904180656.png',
                                        },
                                        {
                                                title: '专利产业布局',
                                                text: '准确地把握产业的技术现状和发展趋势,有助于提升知识产权资源储备能力',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807451.png',
                                        },
                                        {
                                                title: '专利技术构成',
                                                text: '通过分析不同技术分支内专利数量的分布情况,挖掘专利中较为重要的技术分支',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807452.png',
                                        },
                                        {
                                                title: '专利法律状态',
                                                text: '企业专利的当前法律效力的分布情况',
                                                imgUrl: 'http://gsb-zc.oss-cn-beijing.aliyuncs.com/zqqh5_201909041807453.png',
                                        },


                                ]
                        }
                },
        mounted: function() {
                console.log("this.$root.entcode-----------------------------");
                console.log(this.$root.entcode);
                console.log(this.$root.openid);
                /**先请求数据 */
                this.$root.hidemenu();
                $('.mobilereport input').on('blur', () => {
                        console.log(`111`);
                        window.scroll(0, 0);
                        /*
                        let top = document.documentElement.scrollTop;
                        */

                });
                $('.mobilereport input').on('focus', () => {
                        console.log(`vvv`);
                        window.scroll(0, 0);
                        /*
                        let top = document.documentElement.scrollTop;
                        */
                });
        },
        created: function() {

        },
        computed: {

        },
        methods: {
                sendMsg(){
                        var obj={ companyname: this.companyName, phonenum: this.phoneNum, email: this.email };
                        var entcode = this.$root.entcode;
                        var wxuser = this.$root.currentWxUser;
                        if(entcode){
                          obj["entcode"]=entcode;
                        }
                        if(wxuser && wxuser.id){
                          obj["wxuser_id"]=wxuser.id;
                        }
                        this.popupVisible = false;
                        let emailReg = /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/;
                        let phoneReg = /(13|14|15|17|18|19)[0-9]{9}/;

                        if (emailReg.test(this.email)) {
                                if (this.email && this.companyName) {
                                        if (!phoneReg.test(this.phoneNum) && this.phoneNum != "") {

                                                this.$confirm('确定要继续发送吗?', '提示', {
                                                        confirmButtonText: '确定',
                                                        cancelButtonText: '取消',
                                                        type: 'warning'
                                                }).then(() => {
                                                        this.$root.getReq("/web/toolCtl/createPatentReportH5", obj).then(d => {
                                                                console.log("ddddddddd");
                                                                console.log(d);
                                                                if (d && d.code == 1) {
                                                                        this.$toast({
                                                                                message: '报告生成后将发至您的邮箱',
                                                                                duration: 3000
                                                                        });
                                                                        this.email = '';
                                                                        this.phoneNum = '';
                                                                } else {
                                                                        this.$toast({
                                                                                message: '操作失败',
                                                                                duration: 3000
                                                                        });
                                                                }

                                                        });
                                                }).catch((e) => {

                                                })

                                        } else {
                                                this.$root.getReq("/web/toolCtl/createPatentReportH5", obj).then(d => {
                                                        console.log("ddddddddd");
                                                        console.log(d);
                                                        if (d && d.code == 1) {
                                                                this.$toast({
                                                                        message: '报告生成后将发至您的邮箱',
                                                                        duration: 3000
                                                                });
                                                                this.email = '';
                                                                this.phoneNum = '';
                                                        } else {
                                                                this.$toast({
                                                                        message: '操作失败',
                                                                        duration: 3000
                                                                });
                                                        }

                                                });
                                        }



                                } else {
                                        this.$toast({
                                                message: '您有未填写的信息',
                                                duration: 3000
                                        });
                                }
                        } else {
                                this.$toast({
                                        message: '邮箱格式错误',
                                        duration: 3000
                                });
                        }


                },
                closePop(){
                        this.popupVisible = false;
                },
                popShow(){
                        this.popupVisible = true;
                },
                tips(){
                        if (this.companyName) {
                                this.tipsShow = true;
                        } else {
                                this.tipsShow = false;
                        }
                        this.$root.postReq("/web/toolCtl/getCompanyInfoByLikeName", { likestr: this.companyName }).then((res) => {
                                console.log(res);

                                this.searchList = res.data.slice(0, 5);
                                console.log(this.searchList, "////////////////////////");
                        });
                },
                companyModifiy(item){
                        this.tipsShow = false;
                        this.companyName = item.entName;
                }
        },
        vname: "gsb-mobilepatent"
}
