{
    template:'${tmpl}',
    data:function(){
      return {
        fromObj:{
          name:'',
          site:'',
          type:'',
          trade:'文化传媒类',
          sign:'',
          remarks:'',
          checkboxType: []
        },
        navKey: 0,
        tradeArr: [
          '文化传媒类','科技类','影业类','贸易类','咨询类','广告类','管理类','租赁类','代理类','培训类','设计类','服务类','工程类'
        ],
        options: [{
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项2',
          label: '双皮奶'
        }, {
          value: '选项3',
          label: '蚵仔煎'
        }, {
          value: '选项4',
          label: '龙须面'
        }, {
          value: '选项5',
          label: '北京烤鸭'
        }],
      }
    },
    watch: {
      fromObj:{
            handler(val, oldVal){
              if (oldVal.name != '' && oldVal.site != '' && oldVal.type != '' && oldVal.remarks != '' && oldVal.checkboxType.indexOf('protocol') != -1) {
                $('.buy').css('background-color','#409EFF')
              }else {
                $('.buy').css('background-color','')
              }
          },
      deep:true
      }
    },
    mounted:function(){
      $("#footer").show();
    },
    created:function(){

    },
    methods:{
      inputName (value) {
        if (value != '') {
          $('#name').css('border','');
        }
      },
      selectSite (value) {
        if (value != '') {
          $('#site').css('border','');
        }
      },
      selectType (value) {
        if (value != '') {
          $('#type').css('border','');
        }
      },
      inputRemarks (value) {
        if (value != '') {
          $('#remarks').css('border','');
        }
      },
      purchase() {
        var bol = true;
        if (this.fromObj.name == '') {
          $('#name').css('border','1px solid red');
          bol = false;
        };
        if (this.fromObj.site == '') {
          $('#site').css('border','1px solid red');
          bol = false;
        };
        if (this.fromObj.type == '') {
          $('#type').css('border','1px solid red');
          bol = false;
        };
        if (this.fromObj.remarks == '') {
          $('#remarks').css('border','1px solid red');
          bol = false;
        };
        if (this.fromObj.checkboxType.indexOf('protocol') == -1) {
          bol = false;
        }
        if (bol) {
          this.$message({
            message: '恭喜你，这是一条成功消息',
            type: 'success'
          });
        }else {
          this.$message({
            message: '警告哦，这是一条警告消息',
            type: 'warning'
          });
        }
      }
    },
    vname:"gsb-icnameresult"
}
