liuyg
2021-09-16 1483993876540a4d6be5663d8470463d0e3ea6d7
保安员字段
2 files modified
130 ■■■■■ changed files
src/views/securityGuard/data.js 29 ●●●● patch | view | raw | blame | history
src/views/securityGuard/securityGuard.vue 101 ●●●●● patch | view | raw | blame | history
src/views/securityGuard/data.js
@@ -398,7 +398,6 @@
    formslot: true,
}]
//表现
export var trackRecordColumn = [{
        label: "id",
@@ -407,15 +406,24 @@
        editDisplay: false,
        addDisplay: false
    }, {
        label: '工作态度',
        prop: "workingattitude",
    label: '时间',
    type: 'date',
    format: "yyyy-MM-dd",
    valueFormat: "yyyy-MM-dd",
    prop: "time",
        formslot: true,
    }, {
        label: '工作成效',
},
// {
//     label: '工作态度',
//     prop: "workingattitude",
//     formslot: true,
// },
{
    label: '工作表现',
        prop: "achievements",
        formslot: true,
    }, {
        label: '表现',
    label: '表现评定',
        prop: "score",
        type: "select",
        // dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
@@ -447,14 +455,7 @@
            message: "请选择表现",
            trigger: "blur"
        }]
    }, {
        label: '时间',
        type: 'date',
        format: "yyyy-MM-dd",
        valueFormat: "yyyy-MM-dd",
        prop: "time",
        formslot: true,
    },
}
    // {
    //     label: '服务公司',
    //     prop: "departmentName",
src/views/securityGuard/securityGuard.vue
@@ -130,9 +130,17 @@
              icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="permission.securityGuard_delete"
              v-if="permission.securityGuard_delete && row.status != 2"
              @click.stop="rowDel(row)"
              >离职登记
            </el-button>
            <el-button
              icon="el-icon-edit"
              :size="size"
              :type="type"
              v-if="row.status == 2"
              @click.stop="rowDellook(row)"
              >离职查询
            </el-button>
            <el-button
              icon="el-icon-edit"
@@ -367,12 +375,11 @@
            },
            tip: "请上传 zip 压缩文件",
            action: "/api/blade-resource/oss/endpoint/put-file-zip",
          }
          },
        ],
      },
      form: {
      },
      form: {},
      search: {},
      roleBox: false,
      excelBox: false,
@@ -497,7 +504,7 @@
              {
                label: "密码",
                prop: "password",
                type:'password',
                type: "password",
                hide: true,
                editDisplay: false,
                viewDisplay: false,
@@ -508,7 +515,7 @@
              {
                label: "确认密码",
                prop: "password2",
                type:'password',
                type: "password",
                hide: true,
                editDisplay: false,
                viewDisplay: false,
@@ -516,7 +523,6 @@
                  { required: true, validator: validatePass2, trigger: "blur" },
                ],
              },
            ],
          },
          {
@@ -551,17 +557,35 @@
                listType: "picture-img",
                propsHttp: {
                  res: "data",
                  url: "link",
                  url: "url",
                },
                canvasOption: {
                  text: " ",
                  ratio: 0.1,
                },
                action: "/api/blade-resource/oss/endpoint/put-file",
                action: "/api/blade-resource/oss/endpoint/put-files",
                tip: "只能上传jpg/png个人头像,且不超过500kb",
                span: 12,
                row: true,
                span: 10,
                // row: true,
                prop: "avatar",
              },
              {
                label: "指纹信息",
                type: "upload",
                listType: "picture-img",
                propsHttp: {
                  res: "data",
                  url: "url",
                },
                canvasOption: {
                  text: " ",
                  ratio: 0.1,
                },
                action: "/api/blade-resource/oss/endpoint/put-files",
                tip: "只能上传jpg/png指纹信息,且不超过500kb",
                span: 10,
                // row: true,
                prop: "fingerprint",
              },
              {
                label: "是否持证",
@@ -895,7 +919,7 @@
      this.initData(website.tenantId);
    }
    console.log(this.search,111);
    this.search['status'] = 1;
    this.search["status"] = 1;
  },
  methods: {
    handleImport1() {
@@ -976,13 +1000,17 @@
        row.postId = row.postId.join(",");
      }
      const user = {
      const userMap = {
        user: {
        account: row.account,
          avatar: row.avatar,
          fingerprint: row.fingerprint,
          healstats: row.healstats,
        address: row.address,
        birthday: row.birthday,
        cardid: row.cardid,
        deptId: row.deptId,
        education: row.education,
          education: row.education1,
        email: row.email,
        height: row.height,
        hold: row.hold,
@@ -1000,9 +1028,7 @@
        rtime: row.rtime,
        securitynumber: row.securitynumber,
        sex: row.sex,
      };
      const userMap = {
        user: user
        },
      };
      securitySave(userMap).then(
        () => {
@@ -1026,7 +1052,8 @@
      row.postId = row.postId.join(",");
      //值替换,education 放在页面会卡死
      row.education = row.education1;
      update(row).then(() => {
      update(row).then(
        () => {
          this.initFlag = false;
          this.onLoad(this.page);
          this.$message({
@@ -1041,23 +1068,38 @@
        }
      );
    },
    rowDel(row) {
      this.$confirm("确定将选择保安登记离职?", {
    rowDellook(row) {
      // console.log(row.reasonForLeav);
      this.$alert(
        row.reasonForLeav == "" ? "未填写" : row.reasonForLeav,
        "离职原因",
        {
        confirmButtonText: "确定",
          callback: (action) => {},
        }
      );
    },
    rowDel(row) {
      this.$prompt("离职原因", "提示", {
        confirmButtonText: "确定离职",
        cancelButtonText: "取消",
        type: "warning",
        inputErrorMessage: "",
      })
        .then(() => {
        .then(({ value }) => {
          console.log(value);
          row.reasonForLeav = value;
          row.status = "2";
          return update(row);
        })
        .then(() => {
          this.onLoad(this.page);
          // console.log(update);
          // return;
          update(row).then((res) => {
          this.$message({
            type: "success",
            message: "操作成功!",
              message: "操作成功",
          });
        });
          this.refreshChange();
        })
        .catch(() => {});
    },
    rowCheck(row) {
      this.$confirm("确定审查异常标记?", {
@@ -1243,10 +1285,7 @@
      roleIds.forEach((roleId) => {
        getRoleDetail(roleId).then((res) => {
          var roleAlias = res.data.data.roleAlias;
          if (
            roleAlias == "保安公司管理员" ||
            roleAlias == "保安"
          ) {
          if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
            //去除保安公司查询
            const column = that.findObject(that.option.column, "deptId");
            column.search = false;