lin
2024-03-18 1eb41f8ed8830c96097d218b7894278e451c5321
Merge remote-tracking branch 'origin/master'
5 files modified
2 files added
498 ■■■■ changed files
src/api/place/place.js 4 ●●● patch | view | raw | blame | history
src/api/place/practitioner.js 28 ●●●●● patch | view | raw | blame | history
src/page/index/top/index.vue 3 ●●●● patch | view | raw | blame | history
src/page/login/govern.vue 150 ●●●●● patch | view | raw | blame | history
src/router/page/index.js 15 ●●●●● patch | view | raw | blame | history
src/views/place/practitioner.vue 297 ●●●● patch | view | raw | blame | history
src/views/publicSecurity/positionManage/TransactRegist.vue 1 ●●●● patch | view | raw | blame | history
src/api/place/place.js
@@ -154,9 +154,7 @@
    return request({
      url: "/api/blade-placePractitioner/placePractitioner/countByType",
      method: "get",
      params: {
        ...params,
      },
      params: params
    });
  };
src/api/place/practitioner.js
New file
@@ -0,0 +1,28 @@
import request from "@/router/axios";
export const getList = (current, size, params) => {
  return request({
    url: "/api/blade-place/place/page",
    method: "get",
    params: {
      ...params,
      current,
      size,
    },
  });
};
export const remove = (ids) => {
  return request({
    url: "/api/blade-practitioner/practitioner/remove",
    method: "post",
    params: {
      ids,
    },
  });
};
src/page/index/top/index.vue
@@ -246,9 +246,10 @@
                this.$store.dispatch("LogOut").then(() => {
                    resetRouter()
                    if (this.webType == 'default') {
                        this.$router.push({ path: "/login" })
                    } else if (this.webType == 'govern') {
                        this.$router.push({ path: "/governLogin" })
                    } else {
                        this.$router.push({ path: "/tenementLogin" })
                    }
src/page/login/govern.vue
New file
@@ -0,0 +1,150 @@
<template>
    <div class="login-container" ref="login" @keyup.enter.native="handleLogin">
        <top-color v-show="false"></top-color>
        <div class="login-weaper animated bounceInDown">
            <div class="login-left">
                <div class="login-time">
                    {{ time }}
                </div>
                <!-- <img class="img" src="/img/logo.png" alt=""> -->
                <!-- <p class="title">{{ $t('login.info') }}</p> -->
                <p class="title">社区网格治理平台</p>
            </div>
            <div class="login-border">
                <div class="login-main">
                    <h4 class="login-title">
                        {{ $t('login.title') }}
                        <!-- <top-lang></top-lang> -->
                    </h4>
                    <userLogin v-if="activeName === 'user'"></userLogin>
                    <!-- <codeLogin v-else-if="activeName==='code'"></codeLogin> -->
                    <!-- <thirdLogin v-else-if="activeName==='third'"></thirdLogin> -->
                    <div class="login-menu">
                        <!-- <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a> -->
                        <!--<a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>-->
                        <!-- <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a> -->
                        <!-- <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a> -->
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import { setStore, getStore } from "@/util/store"
import Watermark from "@/warterMarkVUE"
import userLogin from "./userlogin"
import codeLogin from "./codelogin"
import thirdLogin from "./thirdlogin"
import { mapGetters } from "vuex"
import { dateFormat } from "@/util/date"
import { validatenull } from "@/util/validate"
import topLang from "@/page/index/top/top-lang"
import topColor from "@/page/index/top/top-color"
import { getQueryString, getTopUrl } from "@/util/util"
export default {
    name: "login",
    components: {
        userLogin,
        codeLogin,
        thirdLogin,
        topLang,
        topColor
    },
    data () {
        return {
            time: "",
            activeName: "user",
            socialForm: {
                tenantId: "000000",
                source: "",
                code: "",
                state: "",
            }
        }
    },
    watch: {
        $route () {
            this.handleLogin()
        }
    },
    created () {
        document.title = "社区网格治理平台"
        setStore({
            name: "webTitle",
            content: '社区网格治理平台',
        })
        setStore({
            name: "webType",
            content: 'govern',
        })
        Watermark.remove()
        this.handleLogin()
        this.getTime()
    },
    mounted () {
    },
    computed: {
        ...mapGetters(["website", "tagWel"])
    },
    props: [],
    methods: {
        getTime () {
            setInterval(() => {
                this.time = dateFormat(new Date())
            }, 1000)
        },
        handleLogin () {
            const topUrl = getTopUrl()
            const redirectUrl = "/oauth/redirect/"
            const ssoCode = "?code="
            this.socialForm.source = getQueryString("source")
            this.socialForm.code = getQueryString("code")
            this.socialForm.state = getQueryString("state")
            if (validatenull(this.socialForm.source) && topUrl.includes(redirectUrl)) {
                let source = topUrl.split("?")[0]
                source = source.split(redirectUrl)[1]
                this.socialForm.source = source
            }
            if (topUrl.includes(redirectUrl) && !validatenull(this.socialForm.source) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
                const loading = this.$loading({
                    lock: true,
                    text: '第三方系统登录中,请稍后。。。',
                    spinner: "el-icon-loading"
                })
                this.$store.dispatch("LoginBySocial", this.socialForm).then(() => {
                    window.location.href = topUrl.split(redirectUrl)[0]
                    this.$router.push({ path: this.tagWel.value })
                    loading.close()
                }).catch(() => {
                    loading.close()
                })
            } else if (!topUrl.includes(redirectUrl) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
                const loading = this.$loading({
                    lock: true,
                    text: '单点系统登录中,请稍后。。。',
                    spinner: "el-icon-loading"
                })
                this.$store.dispatch("LoginBySso", this.socialForm).then(() => {
                    window.location.href = topUrl.split(ssoCode)[0]
                    this.$router.push({ path: this.tagWel.value })
                    loading.close()
                }).catch(() => {
                    loading.close()
                })
            }
        }
    }
}
</script>
<style lang="scss">
@import "@/styles/login.scss";
</style>
src/router/page/index.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-12-14 17:10:00
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-01-22 12:40:01
 * @LastEditTime: 2024-03-16 15:32:17
 * @FilePath: \jczz_web\src\router\page\index.js
 * @Description:
 *
@@ -33,6 +33,19 @@
      isAuth: false,
    },
  },
  {
    path: "/governLogin",
    name: "登录页",
    component: () =>
      import(/* webpackChunkName: "page" */ "@/page/login/govern.vue"),
    meta: {
      keepAlive: true,
      isTab: false,
      isAuth: false,
    },
  },
  {
    path: "/lock",
    name: "锁屏页",
src/views/place/practitioner.vue
@@ -4,27 +4,33 @@
      :permission="permissionList" @row-save="rowSave" :before-open="beforeOpen" @search-change="searchChange"
      @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
      @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
      <template slot-scope="{row}" slot="location">
        <span v-text="showLocation(row.location)"></span>
      </template>
      <template slot-scope="{row}" slot="lng">
        <span v-text="decimalProcessing(row.lng)"></span>
      </template>
      <template slot-scope="{row}" slot="lat">
        <span v-text="decimalProcessing(row.lat)"></span>
      </template>
      <template slot-scope="{row, size}" slot="confirmFlag">
        <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{
            showConfirmFlag(row.confirmFlag).text
      <template slot-scope="{row, size}" slot="age">
        <el-tag :size="size">{{
      row.age
        }}</el-tag>
      </template>
      <template slot-scope="{row, size}" slot="source">
        <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text
      <template slot-scope="{row, size}" slot="gender">
        <el-tag :size="size" :type="showGender(row.gender).type">{{
      showGender(row.gender).text
                    }}</el-tag>
      </template>
      <template slot-scope="{row, size}" slot="resignationFlag">
        <el-tag :size="size" :type="showResignationFlag(row.resignationFlag).type">{{
      showResignationFlag(row.resignationFlag).text
    }}</el-tag>
      </template>
      <template slot-scope="{row, size}" slot="telephone">
                <el-button :size="size" type="text" @click="showStringDispose(row, 'telephoneflag')"
                    v-text="textDispose(row, 'telephoneflag', 'telephone')">
                </el-button>
            </template>
            <template slot-scope="{row, size}" slot="idCard">
                <el-button :size="size" type="text" @click="showStringDispose(row, 'idCardflag')"
                    v-text="textDispose(row, 'idCardflag', 'idCard')">
                </el-button>
      </template>
      <template slot="menuLeft">
@@ -37,13 +43,13 @@
      </template>
      <template slot-scope="{row, size}" slot="menu">
        <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
        <!-- <el-button :size="size" type="text" icon="el-icon-s-check" v-if="permission.place_audit_cur"
          @click="auditCur({ ...row, confirmFlag: 1 })">审核
        </el-button>
        <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
          @click="ManageTenants(row)">场所维护
        </el-button>
        </el-button> -->
      </template>
      <template slot-scope="{row, size}" slot="principalPhone">
@@ -70,13 +76,12 @@
<script>
  import {
    getPractitionerList as getList,
    remove,
    update,
    add,
    getPlace,
    getWarningPersonnelCount as getCount
  } from "@/api/place/place"
import {
  remove
} from "@/api/place/practitioner"
  import {
    mapGetters
  } from "vuex"
@@ -119,8 +124,8 @@
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          // menuWidth: 280,
          menu: false,
        menuWidth: 120,
        // menu: false,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
@@ -129,8 +134,9 @@
          //stripe:true,
          addBtn: false,
          index: true,
          viewBtn: false,
        viewBtn: true,
          editBtn: false,
        delBtn: true,
          // selection: true,
          dialogClickModal: false,
          // menuFixed: 'right',
@@ -146,18 +152,33 @@
            },
            {
              label: "电话号码",
              prop: "telephone",
              searchSpan: 4,
              searchLabelWidth: 110,
              search: true,
          label: "性别",
          prop: "gender",
          width: 80,
          align:"center",
          type: "select",
          dicData: [
            {
              label: "男",
              value: 1
            },
            {
              overHidden: true,
              label: "微信号",
              prop: "wxAccount",
              searchSpan: 4,
              slot: true,
              label: "女",
              value: 2
            }
          ]
        },
        {
          label: "民族",
          width: 80,
          dicUrl: "/api/blade-system/dict-biz/tree?code=nationType",
          props: {
            label: "title",
            value: "key",
          },
          prop: "ethnicity",
          type: "select",
          dataType: "number"
            },
            {
              overHidden: true,
@@ -167,63 +188,80 @@
              width: 160,
              searchSpan: 4,
              slot: true,
            },
            {
              label: "民族",
          label: "电话号码",
          prop: "telephone",
          searchSpan: 4,
          searchLabelWidth: 110,
          search: true,
        },
        {
              width: 80,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              dicUrl: "/api/blade-system/dict-biz/tree?code=nationType",
              props: {
                label: "title",
                value: "key",
              },
              prop: "ethnicity",
              searchSpan: 4
            },
            {
              width: 160,
              label: "年龄",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "age",
              searchSpan: 4
            },
            {
              label: "岗位性质",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "jobNature",
              searchSpan: 4
            }, {
              label: "工作单位",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "employer",
              searchSpan: 4
          align:"center"
            },
            {
              minWidth: 160,
              label: "现居住地",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "tempAddress",
        },
        {
          label: "岗位",
          prop: "jobNature",
        }, {
          width: 110,
          label: '从业人员照片',
          prop: 'employerImg',
          fileType: 'img',
          type: "upload",
          listType: "picture-card",
          dataType: "string",
          disabled: true,
          row: true,
          span: 12,
        }, {
          label: "工作单位",
          prop: "employer",
              searchSpan: 4
            },
            {
              minWidth: 160,
              label: "户籍地址",
          width: 160,
          label: "标签",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "registeredAddress",
          prop: "categoryName",
              searchSpan: 4
        },
        {
          label: "状态",
          prop: "resignationFlag",
          align: 'center',
          searchSpan: 4,
          search: true,
          type: "select",
          dicData: [
            {
              label: "在职",
              value: "1"
            },
            {
              label: "已离职",
              value: "2"
            }
          ]
        },
        {
          label: "入职时间",
          prop: "employmentTime",
          hide: true,
        },
        {
          label: "离职时间",
          prop: "resignationTime",
          hide: true,
            },
            {
              label: "预警人员",
@@ -248,25 +286,6 @@
                  value: 3
                }
              ],
            }, {
              width: 160,
              label: "标签",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "categoryName",
              searchSpan: 4
            }, {
              width: 110,
              label: '从业人员照片',
              prop: 'employerImg',
              fileType: 'img',
              type: "upload",
              listType: "picture-card",
              dataType: "string",
              disabled: true,
              span: 12,
              labelWidth: 110,
            },
          ],
        },
@@ -294,10 +313,10 @@
      ...mapGetters(["permission", "userInfo"]),
      permissionList() {
        return {
          addBtn: this.vaildData(this.permission.place_add, true),
          viewBtn: this.vaildData(this.permission.place_view, true),
          delBtn: this.vaildData(this.permission.place_delete, true),
          editBtn: this.vaildData(this.permission.place_edit, true),
        // addBtn: this.vaildData(this.permission.place_add, true),
        viewBtn: this.vaildData(this.permission.place_practitioner_view, true),
        delBtn: this.vaildData(this.permission.place_practitioner_delete, false),
        // editBtn: this.vaildData(this.permission.place_edit, true),
        }
      },
      ids() {
@@ -340,7 +359,7 @@
        }
      },
      showSource() {
    showResignationFlag() {
        return (data) => {
          let tags = {
            text: '',
@@ -349,13 +368,13 @@
          if (data == 1) {
            tags = {
              text: '是',
            text: '在职',
              type: 'success'
            }
          } else if (data == 2) {
            tags = {
              text: '否',
              type: 'info'
            text: '已离职',
            type: 'danger'
            }
          }
@@ -363,15 +382,26 @@
        }
      },
      showLocation() {
    showGender() {
        return (data) => {
          if (data != null && data.indexOf(',') != -1) {
            data = data.split(',')
            return data[2]
          } else {
            return data || ''
        let tags = {
          text: '',
          type: ''
          }
        if (data == 1) {
          tags = {
            text: '男',
            type: 'primary'
          }
        } else if (data == 2) {
          tags = {
            text: '女',
            type: 'primary'
          }
        }
        return tags
        }
      },
@@ -510,32 +540,15 @@
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getPlace(this.form.id).then((res) => {
            this.form = res.data.data
            this.form.location = [this.form.lng, this.form.lat, this.form.location].join(',')
            // if (this.form.imageUrls.length) {
            //     this.form.imageUrls = this.form.imageUrls.split(",").filter(item => item != '').map(item => website.minioUrl + item).join(',')
            // }
            // if (this.form.placePoiLabelVOList.length) {
            //     let lebelTwo = this.form.placePoiLabelVOList.find(item => {
            //         return item.type == 2
            //     })
            //     if (lebelTwo) this.form.label = String(lebelTwo.poiCode)
            //     let lebelThree = this.form.placePoiLabelVOList.find(item => {
            //         return item.type == 3
            //     })
            //     if (lebelThree) this.form.smallLabel = String(lebelThree.poiCode)
            // }
            done()
          })
        } else {
        if (this.form.resignationFlag) {
          if (this.form.resignationFlag == 1) {
            this.form.resignationFlag = '在职'
          }
          if (this.form.resignationFlag == 2) {
            this.form.resignationFlag = '已离职'
          }
          // this.form.employerImg = this.form.employerImg.split(",").filter(item => item != '').map(item => website.minioUrl + item).join(',')
        }
          done()
        }
      },
@@ -561,8 +574,8 @@
          this.getPeopleCount();
          this.data.forEach(item => {
            this.$set(item, 'principalPhoneflag', false)
            this.$set(item, 'principalIdCardflag', false)
          this.$set(item, 'telephoneflag', false)
          this.$set(item, 'idCardflag', false)
            if (item.employerImg && item.employerImg != '' && item.employerImg != null && item.employerImg
              .length) {
              var urls = []
@@ -580,8 +593,12 @@
      },
      getPeopleCount() {
        getCount().then(res => {
    getPeopleCount(params = {}) {
      // 在职的
      // params = {
      //   resignationFlag:1
      // }
      getCount(params).then(res => {
          this.countInfo = res.data.data;
        })
      }
src/views/publicSecurity/positionManage/TransactRegist.vue
@@ -199,6 +199,7 @@
              align: 'center',
              width: 120,
              labelWidth: 110,
              dataType:"number"
            },
            {
              width: 110,