Administrator
2022-04-11 79d9fc857559982b00b68b2d709807bdc4cd286f
src/views/securityGuard/securityGuardRegistration.vue
@@ -1,18 +1,18 @@
<template>
    <el-dialog
      :title="!form.id?'新增':'修改'"
      width="60%"
      modal-append-to-body='false'
      append-to-body='true'
      :close-on-click-model="true"
      :visible.sync="visible"
    >
        <avue-form :option="option" v-model="form" @submit="update">
          <template slot-scope="{ row }" slot="input">
            <el-tag>{{ row }}</el-tag>
          </template>
        </avue-form>
    </el-dialog>
  <el-dialog
    :title="!form1.id ? '新增' : '修改'"
    width="60%"
    modal-append-to-body="false"
    append-to-body="true"
    :close-on-click-model="true"
    :visible.sync="visible"
  >
    <avue-form :option="option" v-model="form1" @submit="update">
      <template slot-scope="{ row }" slot="input">
        <el-tag>{{ row }}</el-tag>
      </template>
    </avue-form>
  </el-dialog>
</template>
<script>
@@ -42,7 +42,7 @@
      roleTreeObj: [],
      treeDeptId: "",
      treeData: [],
      form: {
      form1: {
        UserPractitionersInfo: [],
        title: "标题",
      },
@@ -78,7 +78,7 @@
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
        border: false,
        border: true, //liu
        stripe: true,
        index: true,
        selection: true,
@@ -104,18 +104,33 @@
                label: "所属组织机构",
                prop: "deptId",
                type: "tree",
                dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
                dicUrl:
                  "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
                props: {
                  label: "title",
                  value: "id",
                },
                disabled: true,
                // disabled: true,
                span: 24,
                rules: [
                  {
                    required: true,
                    message: "请选择组织机构",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "登录账号",
                prop: "account",
                disabled: true,
                rules: [
                  {
                    required: true,
                    message: "请输入登录账号",
                    trigger: "blur",
                  },
                ],
                // disabled: true,
              },
              {
                label: "用户姓名",
@@ -134,8 +149,69 @@
                ],
              },
              {
                label: "用户编号",
                prop: "code",
              },
              {
                label: "用户昵称",
                prop: "name",
              },
              {
                label: "所属行政区",
                prop: "jurisdiction",
                // multiple: true,
                type: "tree",
                dicUrl: "/api/jurisdiction/lazy-tree",
                props: {
                  label: "title",
                  value: "id",
                },
                checkStrictly: true,
                slot: true,
                rules: [
                  {
                    required: true,
                    message: "请选择所属行政区",
                    trigger: "click",
                  },
                ],
              },
              {
                label: "所属角色",
                prop: "roleId",
                multiple: true,
                type: "tree",
                dicData: [],
                props: {
                  label: "title",
                },
                checkStrictly: true,
                slot: true,
                rules: [
                  {
                    required: true,
                    message: "请选择所属角色",
                    trigger: "click",
                  },
                ],
              },
              {
                label: "所属岗位",
                prop: "postId",
                type: "tree",
                multiple: true,
                dicData: [],
                props: {
                  label: "postName",
                  value: "id",
                },
                rules: [
                  {
                    required: true,
                    message: "请选择所属岗位",
                    trigger: "click",
                  },
                ],
              },
              {
                label: "手机号码",
@@ -185,7 +261,7 @@
                  value: "dictKey",
                },
                dataType: "number",
                slot: true
                slot: true,
              },
              {
                label: "政治面貌",
@@ -233,6 +309,8 @@
                label: "用户生日",
                type: "date",
                prop: "birthday",
                format: "yyyy-MM-dd",
                valueFormat: "yyyy-MM-dd",
              },
            ],
          },
@@ -244,7 +322,7 @@
              {
                prop: "UserPractitionersInfo",
                type: "dynamic",
                border: false,
                border: true, //liu
                span: 24,
                children: {
                  align: "left",
@@ -263,7 +341,7 @@
                  column: [
                    {
                      width: 200,
                      label: "单位名称",
                      label: "企业名称",
                      prop: "companyname",
                      formslot: true,
                    },
@@ -316,7 +394,7 @@
          },
        ],
      },
      data: [],
      datachild: [],
    };
  },
  watch: {
@@ -343,7 +421,7 @@
  },
  methods: {
    inits(id) {
      this.form.id = id || 0;
      this.form1.id = id || 0;
      this.visible = true;
    },
    //获取用户信息
@@ -351,17 +429,17 @@
      var that = this;
      //获取用户基本信息
      getUser(this.userId).then((res) => {
        this.form = res.data.data;
        this.form1 = res.data.data;
        var userInfo = res.data.data;
        //获取用户从业信息
        getUserPractitionersInfo(userInfo.cardid).then((res1) => {
          that.form.UserPractitionersInfo = res1.data.data;
          that.form1.UserPractitionersInfo = res1.data.data;
        });
        if (this.form.hasOwnProperty("deptId")) {
          this.form.deptId = this.form.deptId.split(",");
          this.form1.deptId = this.form.deptId.split(",");
        }
        if (this.form.hasOwnProperty("postId")) {
          this.form.postId = this.form.postId.split(",");
          this.form1.postId = this.form.postId.split(",");
        }
      });
    },
@@ -402,6 +480,7 @@
            });
          });
          this.loading = false;
          //debugger;
          done();
        },
        (error) => {
@@ -416,27 +495,26 @@
<style scope>
.box {
  height: 850px;
  height: 800px;
}
.el-card__body {
  margin-bottom: 30px !important;
}
/* .el-card__body {
  margin-bottom: 0px !important;
} */
.el-scrollbar {
/* .el-scrollbar {
  height: 100%;
}
} */
.box .el-scrollbar__wrap {
/* .box .el-scrollbar__wrap {
  overflow: scroll;
}
} */
/* .el-form-item__content{
      margin-left: 0px !important;
  } */
.addorupdatetitle{
.addorupdatetitle {
  position: absolute;
  left: 10px;
  top: 70px;
@@ -444,7 +522,6 @@
  height: 10px;
  font-size: 10px;
  cursor: pointer;
}
.xx {
  position: absolute;