Explorar o código

修改用户管理

plg hai 5 meses
pai
achega
42afc20104

+ 1 - 1
src/components/ChannelRegister.vue

@@ -309,7 +309,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle()
+      // this.cancle()
       this.dialogVisible = true;
       this.isView = val;
 

+ 1 - 1
src/components/ContractChannelRegister.vue

@@ -271,7 +271,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 

+ 1 - 1
src/components/ContractRegister.vue

@@ -359,7 +359,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 

+ 3 - 43
src/components/EditHomeRegister.vue

@@ -11,42 +11,12 @@
         :model="ruleForm"
         :rules="rules"
         ref="ruleForm"
-        label-width="150px"
+        label-width="200px"
         class="demo-ruleForm"
       >
-        <!-- <el-row>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <el-form-item label="头像" prop="avatar">
-              <el-upload
-                accept=".png, .jpg, .jpeg"
-                class="avatar-uploader"
-                name="file"
-                :action="action"
-                :show-file-list="false"
-                :on-success="handleAvatarSuccess"
-                :before-upload="beforeAvatarUpload"
-              >
-                <img v-if="ruleForm.avatar" :src="ruleForm.avatar" class="avatar" />
-                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
-                <div class="el-upload__tip" slot="tip">
-                  建议上传jpg/png/jpeg文件,且不超过500kb
-                </div>
-              </el-upload>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <el-form-item label="姓名" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                class="inputCom"
-                placeholder="请输入姓名"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row> -->
         <el-row>
           <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <el-form-item label="报告来源" prop="description">
+            <el-form-item label="报告来源" prop="reportSource">
               <el-input
                 v-model="ruleForm.reportSource"
                 class="inputCom"
@@ -57,7 +27,7 @@
           <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
             <el-form-item label="公司名称" prop="companyName">
               <el-input
-                v-model="ruleForm.job"
+                v-model="ruleForm.companyName"
                 class="inputCom"
                 placeholder="请输入公司名称"
               ></el-input>
@@ -202,15 +172,6 @@
               </el-upload>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
-            <el-form-item label="姓名" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                class="inputCom"
-                placeholder="请输入姓名"
-              ></el-input>
-            </el-form-item>
-          </el-col>
         </el-row>
         </el-row>
       </el-form>
@@ -430,7 +391,6 @@ export default {
       }
     },
     open(val) {
-      debugger;
       this.dialogVisible = true;
       this.isView = val;
 

+ 1 - 1
src/components/PriceRegister.vue

@@ -244,7 +244,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 

+ 1 - 1
src/components/ProductRegister.vue

@@ -261,7 +261,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 

+ 23 - 7
src/components/Register.vue

@@ -194,7 +194,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 
@@ -215,7 +215,7 @@ export default {
       this.ruleForm.phone = val.phone;
       this.ruleForm.photoPath = val.photoPath;
       this.ruleForm.state = val.state;
-      this.ruleForm.type = val.tyep;
+      this.ruleForm.type = val.type;
     },
     cancle() {
       this.$refs["ruleForm"].clearValidate();
@@ -238,19 +238,35 @@ export default {
         return;
       }
       this.disableFlag = true;
-      this.$refs["ruleForm"].validate((valid) => {
-        if (valid) {
+      let validSp = [];
+      if (this.isView) {
+        validSp = ["name", "userName", "channel", "password"];
+      } else {
+        validSp = ["name", "userName", "channel"];
+      }
+      let aa = [];
+      this.$refs["ruleForm"].validateField(validSp, (valid) => {
+        if (!valid) {
+          aa.push(valid);
           //判断是编辑还是新增
           if (this.isView) {
-            this.register();
+            if (aa.length == 4) {
+              this.register();
+            }else{
+              this.disableFlagStatus();
+            }
           } else {
-            this.editUserFun();
+            if (aa.length == 3) {
+              this.editUserFun();
+            }else{
+              this.disableFlagStatus();
+            }
           }
 
           //都校验通过后可以触发注册接口了
           //调用方法进行入参
         } else {
-          this.disableFlagStatus()
+          this.disableFlagStatus();
         }
       });
     },

+ 1 - 1
src/components/ReportRegister.vue

@@ -282,7 +282,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 

+ 1 - 1
src/components/StaffRegister.vue

@@ -266,7 +266,7 @@ export default {
       }
     },
     open(val) {
-      this.cancle();
+      // this.cancle();
       this.dialogVisible = true;
       this.isView = val;
 

+ 2 - 0
src/views/manage/userManage.vue

@@ -142,6 +142,7 @@ export default {
         name: '',
         userName: '',
         channelId: '',
+        channelName:'',
         role: ''
       },
       channel:'',
@@ -201,6 +202,7 @@ export default {
       this.view.name = row.name
       this.view.userName = row.userName
       this.view.channelId = row.channelId
+      this.view.channelName = row.channelName
       this.view.role = row.type == '0' ? '渠道用户' : ''
       this.centerDialogVisible = true;
     },