{
  template: '${tmpl}',
    data: function() {
      return {
        d: {},
        action: "",
        returnReceiptUrl: [],
        form: {},
        title: "",
        type: "",
        description: "",
        officialＴype: "1",
      }
    },
  computed: Vuex.mapState({
    count: state => state.count,
    headStyle: function () {
      return { "background-color": "white" };
    }
  }),
    created: function() {

    },
  mounted: function() {



  },
  methods: {
    uploadsuccess(results, fileList){
      this.title = "";
      this.type = "";
      this.description = "";
    },
    error(err){
      this.$message.warning(`上传失败，请重新上传`);
    },
    tohistory(){
      this.$router.push("/sysmag/alltrademark");
    },    
    updateTmStatus(){
      var that = this;
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      });
      if (that.returnReceiptUrl.length == 0) {
        loading.close();
        that.$message.warning(`请点击上传按钮进行文件上传!`);
        return;
      }
      that.$root.postReq("/web/tmflowCtl/putReturnReceip", { "officialＴype": this.officialＴype, "urlList": this.returnReceiptUrl }).then(function (d) {
        loading.close();
        if (d.code == "1") {
          if (d.failed.length > 0) {
            that.type = "error";
            that.title = d.failed.length + " 个文件更新商标状态错误，错误文件如下：";
            that.description = d.failed.join('，');
          } else {
            that.type = "success";
            that.title = that.returnReceiptUrl.length + " 个文件更新商标状态成功";
          }
        }
        else {
          that.$message.warning(d.msg);
        }
      }).catch(function (e) {
        loading.close();
        that.$message.warning(`操作失败，请刷新页面后重新操作`);
      });
    },
  },

  vname: "gsb-tmhzuploadlist"
}
