fangyuan
2022-12-27 9ca0e9dc50759f4c00498e68c0155bcc3db2be2f
src/views/manager/User.vue
@@ -78,33 +78,28 @@
     <el-dialog title="编辑" :visible.sync="detailsVisible" width="50%" :append-to-body="true"
          :before-close="detailsVisibleclose">
          <el-row :gutter="15">
            <el-form ref="detailsRow" :model="detailsRow" size="medium"
              label-width="100px">
        <el-form ref="detailsRow" :model="detailsRow" size="medium" label-width="100px">
              <el-col :span="12">
                <el-form-item label="用户名" prop="nickName">
                  <el-input v-model="detailsRow.nickName" placeholder="请输入用户名" clearable
                    :style="{ width: '100%' }">
              <el-input v-model="detailsRow.nickName" placeholder="请输入用户名" clearable :style="{ width: '100%' }">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="用户姓名" prop="realName">
                  <el-input v-model="detailsRow.realName" placeholder="请输入用户姓名" clearable
                    :style="{ width: '100%' }">
              <el-input v-model="detailsRow.realName" placeholder="请输入用户姓名" clearable :style="{ width: '100%' }">
                  </el-input>
                </el-form-item>
              </el-col>
               <el-col :span="12">
                <el-form-item label="手机号码" prop="userMobile">
                  <el-input v-model="detailsRow.userMobile" placeholder="请输入手机号码" clearable
                    :style="{ width: '100%' }">
              <el-input v-model="detailsRow.userMobile" placeholder="请输入手机号码" clearable :style="{ width: '100%' }">
                  </el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="身份证号" prop="userIdcard">
                  <el-input v-model="detailsRow.userIdcard" placeholder="请输入身份证号" clearable
                    :style="{ width: '100%' }">
              <el-input v-model="detailsRow.userIdcard" placeholder="请输入身份证号" clearable :style="{ width: '100%' }">
                  </el-input>
                </el-form-item>
              </el-col>
@@ -209,14 +204,18 @@
  {
    //删除
    remove(val) {
      this.$http.delete('/api/user', { params: { id: val } }).then(res => {
        this.$message({
      var _this = this;
      this.$confirm('确认删除?').then(() => {
        _this.$http.delete('/api/user', { params: { id: val } }).then(res => {
          _this.$message({
          message: '删除成功',
          type: 'success'
        })
        this.search();
      })
      }
      )
    },
    // //发布/下架
    // punlish(val, val2) {
@@ -249,11 +248,14 @@
            this.detailsRow = Object.assign({}, val);
    },
    update(){
          this.$http.put('/api/user',this.detailsRow).then(res => {this.$message({
      this.$http.put('/api/user', this.detailsRow).then(res => {
        this.$message({
        message: '编辑成功',
        type: 'success'}
          type: 'success'
        }
        )
         this.search();}
        this.search();
      }
        );
          this.detailsVisible =false;
    },