dengjunjie
2025-02-17 2bdad959bc30a7c24bf08ca81fb52fff63e79f52
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/views/system/UserInfo.vue
@@ -1,6 +1,6 @@
<template>
  <VolBox :width="500" :height="270" v-model="modifyOptions.model" title="修改密码">
    <div style="padding:10px;20px;">
    <div style="padding:20px;">
      <VolForm ref="pwd" :formRules="modifyOptions.data" :formFields="modifyOptions.fields"></VolForm>
    </div>
    <template #footer>
@@ -21,7 +21,7 @@
            <span>注册日期:{{ userInfo.createDate }}</span>
          </p>
          <p>
            <el-button type="error" @click="modifyPwd" size="small" long>修改密码</el-button>
            <el-button type="error" @click="modifyPwd" size="small" icon="md-lock" long>修改密码</el-button>
            <!-- <el-button
              style="padding: 3px 16px"
              @click="modifyImg"
@@ -37,14 +37,15 @@
    <div class="right">
      <vol-form ref="form" :load-key="true" :width="500" :formRules="editFormOptions" :formFields="editFormFields">
        <div class="footer">
          <el-button
          <!-- <el-button
            style="margin-top: 2px"
            type="primary"
            size="small"
            icon="md-checkmark-circle"
            long
            @click="modifyInfo"
            >保存</el-button
          >
          > -->
        </div>
      </vol-form>
    </div>
@@ -80,7 +81,7 @@
        return this.$message.error("两次密码不一致");
      }
      let url =
        "/api/Sys_user/modifyPwd?oldPwd=" +
        "/api/User/modifyPwd?oldPwd=" +
        this.modifyOptions.fields.oldPwd +
        "&newPwd=" +
        this.modifyOptions.fields.newPwd;
@@ -94,33 +95,11 @@
      });
    },
    modifyInfo() {
      // this.$message.info("修改个人信息");
      let url =
        "/api/Sys_user/UpdateInfo?roleName=" +
        this.editFormFields.roleName +
        "&userName=" +
        this.editFormFields.userName +
        "&userTrueName=" +
        this.editFormFields.userTrueName +
        "&address=" +
        this.editFormFields.address +
        "&gender=" +
        this.editFormFields.gender +
        "&remark=" +
        this.editFormFields.remark +
      this.http.post(url, {}, true).then((x) => {
        if (!x.status) {
          return this.$message.error(x.message);
        }
        // this.modifyOptions.model = false;
        // this.$Message.success(x.message);
        // this.$refs.pwd.reset();
      });
      console.log(this.editFormFields.roleName)
      this.$message.info("修改个人信息");
    },
  },
  created() {
    this.http.post("/api/Sys_user/getCurrentUserInfo", {}, true).then((x) => {
    this.http.post("/api/User/getCurrentUserInfo", {}, true).then((x) => {
      if (!x.status) {
        return this.$message(x.message);
      }
@@ -143,7 +122,7 @@
      errorImg: 'this.src="' + require("@/assets/imgs/error-img.png") + '"',
      modifyOptions: {
        model: false,
        fields: { oldPwd: "", newPwd: "", newPwd1: ""},
        fields: { oldPwd: "", newPwd: "", newPwd1: "" },
        data: [
          [
            {
@@ -151,7 +130,6 @@
              required: true,
              title: "旧密码",
              field: "oldPwd",
            },
          ],
          [
@@ -181,7 +159,6 @@
        phoneNo: "",
      },
      editFormFields: {
        user_Id:"",
        roleName: "",
        userName: "",
        userTrueName: "",
@@ -190,34 +167,40 @@
        remark: "",
      },
      editFormOptions: [
      [
          {
            columnType: "int",
            title: "ID",
            field: "user_Id",
          },
        ],
        [
          {
            columnType: "string",
            title: "用户名",
            field: "userName",
            disabled: true,
          },
        ],
        [
          {
            columnType: "string",
            dataKey: "tree_roles",
            title: "角色",
            field: "roleName",
            type: "text",
            field: "role_Id",
            disabled: true,
            data: [],
            type: "select",
          },
        ],
        // [
        //   {
        //     columnType: "string",
        //     title: "角色",
        //     field: "roleName",
        //     disabled: true,
        //     type: "text",
        //   },
        // ],
        [
          {
            columnType: "string",
            title: "真实姓名",
            field: "userTrueName",
            required: true,
            disabled: true,
            type: "text",
          },
        ],
@@ -226,6 +209,7 @@
            columnType: "string",
            title: "地址",
            field: "address",
            disabled: true,
            type: "text",
          },
        ],
@@ -234,6 +218,7 @@
            dataKey: "gender",
            title: "性别",
            field: "gender",
            disabled: true,
            data: [],
            type: "select",
          },
@@ -243,6 +228,7 @@
            columnType: "string",
            title: "备注",
            field: "remark",
            disabled: true,
            colSize: 12,
            type: "textarea",
          },