zhengpz
2021-08-25 52144c0d86047fbf1b2302b28399d4e77628ce1c
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/zhba_regulatory
11 files modified
684 ■■■■ changed files
src/router/views/index.js 4 ●●●● patch | view | raw | blame | history
src/styles/element-ui.scss 7 ●●●●● patch | view | raw | blame | history
src/views/management/peopleDetails.vue 15 ●●●●● patch | view | raw | blame | history
src/views/securityCompany/companyDetails.vue 30 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/enclosure.vue 8 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/equipment.vue 6 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/punish.vue 8 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/service.vue 6 ●●●● patch | view | raw | blame | history
src/views/securityCompany/computents/staff.vue 6 ●●●● patch | view | raw | blame | history
src/views/securityCompany/security.vue 18 ●●●●● patch | view | raw | blame | history
src/views/securityGuardManagement/register.vue 576 ●●●●● patch | view | raw | blame | history
src/router/views/index.js
@@ -262,7 +262,7 @@
        component: Layout,
        children: [{
            path: 'index',
            name: '保安详细资料',
            name: '保安公司详细资料',
            meta: {
                i18n: 'index',
            },
@@ -327,7 +327,7 @@
            component: () =>
                import( /* webpackChunkName: "views" */ '@/views/securityUnitOperation/operationTable')
        }]
    },
    },
    // {
    //     path: '/securityUnitOperation/economicTable',
    //     redirect: '/securityUnitOperation/economicTable/index',
src/styles/element-ui.scss
@@ -592,3 +592,10 @@
.el-drawer__open .el-drawer.rtl {
  background-color: $mainB !important;
}
// .registersss .avue-form__menu {
//   position: relative;
//   width: 100%;
//   display: flex;
//   flex-direction: row-reverse;
// }
src/views/management/peopleDetails.vue
@@ -399,6 +399,21 @@
  },
  mounted() {
    // this.$store.state.tags.tag.label = '保安详细资料'
    var flag = false,
      i = 0,
      ind = null;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "保安详细资料") {
        if (flag == false) {
          ind = index;
          flag = true;
        }
        i++;
      }
    });
    if (i > 1) {
      this.$store.state.tags.tagList.splice(ind, 1);
    }
  },
  methods: {
    handleClick(tab) {
src/views/securityCompany/companyDetails.vue
@@ -234,6 +234,9 @@
import punish from "./computents/punish.vue"; //处罚信息
import service from "./computents/service.vue"; //服务对象
import enclosure from "./computents/enclosure.vue"; //其他附件
import { getList } from "@/api/securityCompany/security"; //保安公司
export default {
  components: {
    equipment: equipment,
@@ -394,10 +397,11 @@
  created() {
    var flag = false,
      i = 0,
      ind = null;
      ind = null,
      that = this;
    this.$store.state.tags.tagList.forEach((item, index) => {
      if (item.label == "保安详细资料") {
      if (item.label == "保安公司详细信息") {
        if (flag == false) {
          ind = index;
          flag = true;
@@ -408,10 +412,24 @@
    if (i > 1) {
      this.$store.state.tags.tagList.splice(ind, 1);
    }
    this.form = this.$route.query;
    console.log(this.form, 1);
    if (this.$route.query.fromSecunityGuardId) {
      console.log(this.$route.query.fromSecunityGuardId, "fromSecunityGuardId");
      // getList().then(res=>{
      //   console.log
      var page = {
          currentPage: 1,
          pageSize: 10,
        },
        params = { departmentid: this.$route.query.fromSecunityGuardId };
      getList(page.currentPage, page.pageSize, params).then((res) => {
        console.log(res.data.data.records[0]);
        that.form = res.data.data.records[0];
      });
      // })
    } else {
      this.form = this.$route.query;
      console.log(this.form, "obj1");
    }
  },
  mounted() {
    // this.$store.state.tags.tag.label = '保安详细资料'
src/views/securityCompany/computents/enclosure.vue
@@ -17,8 +17,8 @@
      @current-change="currentChange"
      @size-change="sizeChange"
      @refresh-change="refreshChange"
      @on-load="onLoad"
    >
      <!-- @on-load="onLoad" -->
      <template slot="menuLeft">
        <!--        <el-button type="primary"-->
        <!--                   size="small"-->
@@ -281,6 +281,10 @@
      return ids.join(",");
    },
  },
  mounted() {
    console.log(this.form, "getListeenclosure");
    this.onLoad(this.page);
  },
  methods: {
    rowClick(row) {
      var that = this;
@@ -385,7 +389,7 @@
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data, getListeenclosure);
        console.log(this.data, "getListeenclosure");
        this.loading = false;
        this.selectionClear();
      });
src/views/securityCompany/computents/equipment.vue
@@ -7,7 +7,6 @@
    :data="equipmentData"
    ref="equipmentCrud"
    :page.sync="equipmentPage"
    @on-load="equipmentOnLoad"
    @selection-change="equipmentSelectionChange"
    @search-change="equipmentSearchChange"
    @search-reset="equipmentSearchReset"
@@ -15,6 +14,7 @@
    @size-change="equipmentSizeChange"
  >
  </avue-crud>
  <!-- @on-load="equipmentOnLoad" -->
</template>
<script>
@@ -232,6 +232,10 @@
      equipmentSelectionList: [],
    };
  },
  mounted() {
    console.log(this.form, "equipmentData");
    this.equipmentOnLoad(this.equipmentPage);
  },
  methods: {
    equipmentOnLoad(page, params = {}) {
      this.equipmentLoading = true;
src/views/securityCompany/computents/punish.vue
@@ -7,7 +7,6 @@
    :data="punishData"
    ref="punishCrud"
    :page.sync="punishPage"
    @on-load="punishOnLoad"
    @selection-change="punishSelectionChange"
    @search-change="punishSearchChange"
    @search-reset="punishSearchReset"
@@ -15,6 +14,7 @@
    @size-change="punishSizeChange"
  >
  </avue-crud>
  <!-- @on-load="punishOnLoad" -->
</template>
<script>
@@ -97,6 +97,10 @@
      punishSelectionList: [],
    };
  },
  mounted() {
    console.log(this.form, "pu");
    this.punishOnLoad(this.punishPage);
  },
  methods: {
    punishOnLoad(page, params = {}) {
      this.punishLoading = true;
@@ -111,7 +115,7 @@
        this.punishPage.total = data.total;
        this.punishData = data.records;
        console.log(this.punishData);
        console.log(this.punishData, "pu");
        this.punishLoading = false;
        this.$refs.punishCrud.refreshTable();
        this.$refs.punishCrud.doLayout();
src/views/securityCompany/computents/service.vue
@@ -7,7 +7,6 @@
    :data="serviceData"
    ref="serviceCrud"
    :page.sync="servicePage"
    @on-load="serviceOnLoad"
    @selection-change="serviceSelectionChange"
    @search-change="serviceSearchChange"
    @search-reset="serviceSearchReset"
@@ -15,6 +14,7 @@
    @size-change="serviceSizeChange"
  >
  </avue-crud>
  <!-- @on-load="serviceOnLoad" -->
</template>
<script>
@@ -212,6 +212,10 @@
      serviceSelectionList: [],
    };
  },
  mounted() {
    console.log(this.form, "serviceData");
    this.serviceOnLoad(this.servicePage);
  },
  methods: {
    serviceOnLoad(page, params = {}) {
      this.serviceLoading = true;
src/views/securityCompany/computents/staff.vue
@@ -7,13 +7,13 @@
    :data="staffData"
    ref="staffCrud"
    :page.sync="staffPage"
    @on-load="staffOnLoad"
    @selection-change="staffSelectionChange"
    @search-change="staffSearchChange"
    @search-reset="staffSearchReset"
    @current-change="staffCurrentChange"
    @size-change="staffSizeChange"
  >
    <!-- @on-load="staffOnLoad" -->
  </avue-crud>
</template>
@@ -253,6 +253,10 @@
      staffSelectionList: [],
    };
  },
  mounted() {
    console.log(this.form, "staff");
    this.staffOnLoad(this.staffPage);
  },
  methods: {
    staffOnLoad(page, params = {}) {
      this.staffLoading = true;
src/views/securityCompany/security.vue
@@ -468,27 +468,11 @@
      // delete (row["name"]);
      var obj = row;
      obj["name"] = "保安公司详细信息";
      console.log(obj, "obj");
      this.$router.push({
        path: `/securityCompany/index`,
        query: obj,
      });
      var flag = false,
        i = 0,
        ind = null;
      this.$store.state.tags.tagList.forEach((item, index) => {
        if (item.label == "保安公司详细信息") {
          if (flag == false) {
            ind = index;
            flag = true;
          }
          i++;
        }
      });
      if (i > 1) {
        this.$store.state.tags.tagList.splice(ind, 1);
      }
    },
  },
};
src/views/securityGuardManagement/register.vue
@@ -40,9 +40,9 @@
            @current-change="currentChange"
            @size-change="sizeChange"
            @refresh-change="refreshChange"
            @row-click="handleRowClick"
            @on-load="onLoad"
          >
            <!-- @row-click="handleRowClick" -->
            <!-- <template slot-scope="{row}"
                              slot="tenantName">
                        <el-tag>{{row.tenantName}}</el-tag>
@@ -59,7 +59,22 @@
                              slot="userTypeName">
                        <el-tag>{{row.userTypeName}}</el-tag>
                    </template> -->
            <template slot-scope="{ row }" slot="deptId">
              <el-tag
                class="rowClickSelf"
                title="点击查看所属公司情况"
                @click="rowClickSelf(row.deptId)"
                >{{ row.$deptId }}</el-tag
              >
            </template>
            <template slot-scope="{ type, size, row }" slot="menu">
              <el-button
                :size="size"
                :type="type"
                class="zhengJian-icon"
                @click.stop="handleRowClick(row)"
                >详情</el-button
              >
              <el-button
                :size="size"
                :type="type"
@@ -321,388 +336,246 @@
        tip: false,
        searchShowBtn: false,
        searchShow: true,
        border: true,
        searchMenuSpan: 4,
        index: true,
        viewBtn: false,
        //dialogType: 'drawer',
        dialogClickModal: false,
        // 操作栏宽度
        menuWidth: 280,
        menuWidth: 310,
        column: [
          {
            label: "保安姓名",
            label: "姓名",
            prop: "realName",
            search: true,
            searchSpan: 4,
            searchSpan: 3,
            width: 60,
            searchLabelWidth: 50,
            display: false,
            width: 78,
          },
          {
            label: "所属保安公司",
            searchLabelWidth: "110",
            // prop: "deptName",
            prop: "deptId",
            type: "tree",
            dicUrl:
              "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
            props: {
              label: "title",
              value: "id",
            },
            slot: true,
            searchSpan: 5,
            display: false,
            overHidden: true,
            search: true,
            width: 198,
          },
          {
            label: "性别",
            prop: "sex",
            width: 55,
            type: "select",
            // search: true,
            searchSpan: 4,
            searchLabelWidth: 50,
            dicData: [
              {
                label: "男",
                value: 1,
              },
              {
                label: "女",
                value: 2,
              },
              {
                label: "男",
                value: 1,
                label: "未知",
                value: 3,
              },
            ],
            slot: true,
            display: false,
            width: 48,
          },
          {
            label: "保安公司",
            prop: "deptName",
            // width: 120,
            label: "身份证号码",
            prop: "cardid",
            search: true,
            searchLabelWidth: 90,
            searchSpan: 4,
            overHidden: true,
            slot: true,
            minWidth: 140,
            display: false,
          },
          {
            label: "籍贯",
            prop: "nativeplace",
            hide: true,
            display: false,
          },
          {
            label: "民族",
            prop: "nation",
            hide: true,
            width: 55,
            display: false,
          },
          {
            label: "出生日期",
            prop: "birthday",
            type: "date",
            format: "yyyy-MM-dd",
            valueFormat: "yyyy-MM-dd",
            display: false,
            hide: true,
          },
          {
            label: "年龄",
            prop: "age",
            width: 55,
            display: false,
          },
          {
            label: "学历",
            prop: "education",
            display: false,
            width: 90,
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            // hide: true,
            rules: [
              {
                required: true,
                message: "请选择学历",
                trigger: "blur",
              },
            ],
          },
          {
            label: "联系电话",
            prop: "phone",
            minWidth: 95,
            display: false,
          },
          {
            label: "健康状态",
            prop: "healstats",
            hide: true,
            display: false,
          },
          {
            label: "保安证编号",
            prop: "securitynumber",
            display: false,
            searchSpan: 5,
            searchLabelWidth: 110,
            // search: true,
          },
          {
            label: "身份证号",
            prop: "cardid",
            slot: true,
            display: false,
            width: 145,
          },
          {
            label: "联系方式",
            prop: "phone",
            slot: true,
            display: false,
            width: 100,
          },
          {
            label: "联系地址",
            prop: "address",
            slot: true,
            display: false,
            hide: true,
            search: true,
            searchLabelWidth: 90,
            minWidth: 105,
            searchSpan: 4,
            addDisplay: false,
            editDisplay: false,
            // hide: true,
          },
          {
            label: "入职时间",
            prop: "rtime",
            slot: true,
            display: false,
            width: 82,
          },
          {
            label: "所属角色",
            prop: "roleName",
            slot: true,
            display: false,
            width: 78,
            hide: true,
            display: false,
          },
          // {
          //   label: "所属辖区",
          //   prop: "jurisdiction",
          //   // multiple: true,
          //   minWidth: 60,
          //   type: "tree",
          //   dicUrl: "/api/jurisdiction/lazy-tree?parentId=0",
          //   props: {
          //     label: "title",
          //     value: "id",
          //   },
          //   checkStrictly: true,
          //   slot: true,
          //   rules: [
          //     {
          //       required: true,
          //       message: "请选择所属辖区",
          //       trigger: "click",
          //     },
          //   ],
          //     label: "是否派遣",
          //     prop: "dispatch",
          //     // hide: true,
          //     type: 'select',
          //     // display: false,
          //     dicData: [
          //         {
          //             label: '未派遣',
          //             value: 1
          //         }, {
          //             label: '已派遣',
          //             value: 0
          //         }
          //     ]
          // },
          {
            label: "是否在职",
            prop: "status",
            label: "是否派遣",
            prop: "dispatch",
            type: "select",
            search: true,
            searchSpan: 4,
            dicData: [
              {
                label: "否",
                value: 0,
                label: "未派遣",
                value: "1",
              },
              {
                label: "是",
                value: 1,
                label: "已派遣",
                value: "0",
              },
            ],
            slot: true,
            display: false,
            width: 70,
          },
          {
            label: "是否持证",
            prop: "hold",
            type: "select",
            search: true,
            searchSpan: 4,
            dicData: [
              {
                label: "是",
                value: "0",
              },
              {
                label: "否",
                value: "1",
              },
              {
                label: "已吊销",
                value: "2",
              },
            ],
            slot: true,
            search: true,
            searchSpan: 3,
            width: 72,
            display: false,
            width: 70,
          },
        ],
        group: [
          {
            label: "基础信息",
            prop: "baseInfo",
            icon: "el-icon-user-solid",
            column: [
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            type: "select",
            rules: [
              {
                label: "所属机构",
                prop: "tenantId",
                type: "tree",
                dicUrl: "/api/blade-system/tenant/select",
                props: {
                  label: "tenantName",
                  value: "tenantId",
                },
                hide: !website.tenantMode,
                addDisplay: website.tenantMode,
                editDisplay: website.tenantMode,
                viewDisplay: website.tenantMode,
                rules: [
                  {
                    required: true,
                    message: "请输入所属机构",
                    trigger: "click",
                  },
                ],
                span: 24,
              },
              {
                label: "登录账号",
                prop: "account",
                rules: [
                  {
                    required: true,
                    message: "请输入登录账号",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "用户平台",
                type: "select",
                dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
                props: {
                  label: "dictValue",
                  value: "dictKey",
                },
                dataType: "number",
                slot: true,
                prop: "userType",
                rules: [
                  {
                    required: true,
                    message: "请选择用户平台",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "密码",
                prop: "password",
                hide: true,
                editDisplay: false,
                viewDisplay: false,
                rules: [
                  { required: true, validator: validatePass, trigger: "blur" },
                ],
              },
              {
                label: "确认密码",
                prop: "password2",
                hide: true,
                editDisplay: false,
                viewDisplay: false,
                rules: [
                  { required: true, validator: validatePass2, trigger: "blur" },
                ],
                required: true,
                message: "请选择",
                trigger: "blur",
              },
            ],
          },
          // {
          //     label: "入职时间",
          //     prop: "rtime",
          //     type: "datetime",
          //     format: "yyyy-MM-dd",
          //     valueFormat: "yyyy-MM-dd",
          //     searchRange: true,
          //     searchSpan: 6,
          //     hide: true,
          //     addDisplay: false,
          //     editDisplay: false,
          //     viewDisplay: false,
          //     search: true,
          //     rules: [{
          //         required: true,
          //         message: "请输入时间",
          //         trigger: "blur"
          //     }]
          // },
          {
            label: "详细信息",
            prop: "detailInfo",
            icon: "el-icon-s-order",
            column: [
            label: "在职状态",
            prop: "status",
            type: "select",
            dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
            props: {
              label: "dictValue",
              value: "dictKey",
            },
            dataType: "number",
            display: false,
            hide: true,
            searchSpan: 3,
            width: 80,
            search: false,
            rules: [
              {
                label: "用户昵称",
                prop: "name",
                hide: true,
                rules: [
                  {
                    required: true,
                    message: "请输入用户昵称",
                    trigger: "blur",
                  },
                ],
              },
              {
                label: "用户姓名",
                prop: "realName",
                rules: [
                  {
                    required: true,
                    message: "请输入用户姓名",
                    trigger: "blur",
                  },
                  {
                    min: 2,
                    max: 5,
                    message: "姓名长度在2到5个字符",
                  },
                ],
              },
              {
                label: "手机号码",
                prop: "phone",
                overHidden: true,
              },
              {
                label: "电子邮箱",
                prop: "email",
                hide: true,
                overHidden: true,
              },
              {
                label: "用户性别",
                prop: "sex",
                type: "select",
                dicData: [
                  {
                    label: "男",
                    value: 1,
                  },
                  {
                    label: "女",
                    value: 2,
                  },
                  {
                    label: "未知",
                    value: 3,
                  },
                ],
                hide: true,
              },
              {
                label: "用户生日",
                type: "date",
                prop: "birthday",
                format: "yyyy-MM-dd hh:mm:ss",
                valueFormat: "yyyy-MM-dd hh:mm:ss",
                hide: true,
              },
              {
                label: "账号状态",
                prop: "statusName",
                hide: true,
                display: false,
              },
            ],
          },
          {
            label: "职责信息",
            prop: "dutyInfo",
            icon: "el-icon-s-custom",
            column: [
              {
                label: "用户编号",
                prop: "code",
              },
              {
                label: "所属角色",
                prop: "roleId",
                multiple: true,
                type: "tree",
                dicData: [],
                props: {
                  label: "title",
                },
                checkStrictly: true,
                slot: true,
                rules: [
                  {
                    required: true,
                    message: "请选择所属角色",
                    trigger: "click",
                  },
                ],
              },
              {
                label: "所属单位",
                prop: "deptId",
                type: "tree",
                multiple: true,
                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",
                  },
                ],
                required: true,
                message: "请选择在职状态",
                trigger: "blur",
              },
            ],
          },
@@ -805,6 +678,13 @@
    }
  },
  methods: {
    rowClickSelf(row) {
      console.log(row, "baoan");
      this.$router.push({
        path: "/securityCompany/index",
        query: { fromSecunityGuardId: row },
      });
    },
    Print() {
      this.$Print(this.$refs.baoanzheng);
    },
@@ -899,7 +779,11 @@
    searchChange(params, done) {
      this.query = params;
      this.page.currentPage = 1;
      this.onLoad(this.page, params);
      var deptId;
      if (params.deptId) {
        deptId = params.deptId;
      }
      this.onLoad(this.page, params, deptId);
      done();
    },
    selectionChange(list) {
@@ -950,16 +834,25 @@
    refreshChange() {
      this.onLoad(this.page, this.query);
    },
    onLoad(page, params = {}) {
    onLoad(page, params = {}, deptId) {
      this.loading = true;
      params["jurisdiction"] = this.jurisdiction;
      getListSecurity(
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
        Object.assign(params, this.query),
        deptId
      ).then((res) => {
        const data = res.data.data;
        this.page.total = data.total;
        var d = data.records;
        var date = new Date();
        var datayear = date.getFullYear();
        for (const key in d) {
          var year = d[key].cardid.slice(6, 10);
          d[key]["age"] = +datayear - +year;
          // d[key].securitynumber = "赣洪202100009";
        }
        this.data = data.records;
        console.log(this.data);
        this.loading = false;
@@ -982,22 +875,22 @@
        query: obj,
      });
      var flag = false,
        i = 0,
        ind = null;
      // var flag = false,
      //   i = 0,
      //   ind = null;
      this.$store.state.tags.tagList.forEach((item, index) => {
        if (item.label == "保安详细信息") {
          if (flag == false) {
            ind = index;
            flag = true;
          }
          i++;
        }
      });
      if (i > 1) {
        this.$store.state.tags.tagList.splice(ind, 1);
      }
      // this.$store.state.tags.tagList.forEach((item, index) => {
      //   if (item.label == "保安详细信息") {
      //     if (flag == false) {
      //       ind = index;
      //       flag = true;
      //     }
      //     i++;
      //   }
      // });
      // if (i > 1) {
      //   this.$store.state.tags.tagList.splice(ind, 1);
      // }
    },
    //证件查看
    handleViewCredentials(row) {
@@ -1146,4 +1039,9 @@
.PrintBut {
  margin-top: 15px;
}
.rowClickSelf {
  &:hover {
    cursor: pointer;
  }
}
</style>