大件运输联网系统前端代码
guoshilong
2023-01-02 29bf5936bf1da2eea81f3abe07dc738f5267c42c
src/views/enterprise/enterprise.vue
@@ -79,13 +79,13 @@
        return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false
      }
    },
    created() {
      if (this.permit){
    mounted() {
      if (!this.permit){
        this.getEnterpriseDetailByUserId()
      }
    },
    methods: {
      handleSubmit(){
      handleSubmit(row,done){
        if (this.form.id){
          update(this.form).then(res=>{
            if (res.data.code == 200){
@@ -93,14 +93,17 @@
            }else {
              this.$message.error(res.data.msg)
            }
            done()
          })
        }else {
          this.form.userId = this.userInfo.user_id
          add(this.form).then(res=>{
            if (res.data.code == 200){
              this.$message.success(res.data.msg)
            }else {
              this.$message.error(res.data.msg)
            }
            done()
          })
        }
      },
@@ -219,8 +222,8 @@
          if (res.data.code == 200){
            this.form = res.data.data
            this.form.account = this.userInfo.account
            const group = this.findObject(this.option.group,"account");
            group.disabled = true
            const account = this.findObject(this.option.group,"account");
            account.disabled = true
          }
        })
      }