lin
2024-03-15 f2e3fa177265637d9cbc9ce7049f701e39c4d131
src/views/place/practitioner.vue
@@ -1,580 +1,586 @@
<template>
    <basic-container>
  <basic-container>
    <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
      :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>
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
            :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">{{
      <template slot-scope="{row, size}" slot="confirmFlag">
        <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">{{
            showConfirmFlag(row.confirmFlag).text
        }}</el-tag>
            </template>
      </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="source">
        <el-tag :size="size" :type="showSource(row.source).type">{{ showSource(row.source).text
                    }}</el-tag>
            </template>
      </template>
            <template slot="menuLeft">
                <!-- <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
      <template slot="menuLeft">
        <!-- <el-button size="small" icon="el-icon-delete" plain v-if="permission.place_delete" @click="handleDelete">删 除
                </el-button> -->
                <el-button type="primary" size="small"  @click="handleQueryAlarm(1)">未成年人 ({{countInfo.minors}}) 人
                </el-button>
                <el-button type="primary" size="small"  @click="handleQueryAlarm(2)">少数民族 ({{countInfo.nationalMinority}}) 人
                </el-button>
            </template>
        <el-button type="primary" size="small" @click="handleQueryAlarm(1)">未成年人 ({{countInfo.minors}}) 人
        </el-button>
        <el-button type="primary" size="small" @click="handleQueryAlarm(2)">少数民族 ({{countInfo.nationalMinority}}) 人
        </el-button>
      </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"
                    @click="auditCur({ ...row, confirmFlag: 1 })">审核
                </el-button>
      <template slot-scope="{row, size}" slot="menu">
        <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>
            </template>
        <el-button :size="size" type="text" icon="el-icon-edit" v-if="permission.place_manage_tenants"
          @click="ManageTenants(row)">场所维护
        </el-button>
      </template>
            <template slot-scope="{row, size}" slot="principalPhone">
                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
                    v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
                </el-button>
            </template>
            <template slot-scope="{row, size}" slot="principalIdCard">
                <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"
                    v-text="textDispose(row, 'principalIdCardflag', 'principalIdCard')">
                </el-button>
            </template>
        </avue-crud>
      <template slot-scope="{row, size}" slot="principalPhone">
        <el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
          v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')">
        </el-button>
      </template>
      <template slot-scope="{row, size}" slot="principalIdCard">
        <el-button :size="size" type="text" @click="showStringDispose(row, 'principalIdCardflag')"
          v-text="textDispose(row, 'principalIdCardflag', 'principalIdCard')">
        </el-button>
      </template>
    </avue-crud>
        <baseAllInfo ref="BaseAllInfo"></baseAllInfo>
    <baseAllInfo ref="BaseAllInfo"></baseAllInfo>
        <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
            width="30%">
            <auditBase></auditBase>
        </el-dialog>
    </basic-container>
    <el-dialog class="place-info-box audit-info-box" title="审核" append-to-body :visible.sync="auditBasePopup"
      width="30%">
      <auditBase></auditBase>
    </el-dialog>
  </basic-container>
</template>
<script>
import {
  import {
    getPractitionerList as getList,
    remove,
    update,
    add,
    getPlace,
    getWarningPersonnelCount as getCount
} from "@/api/place/place"
  } from "@/api/place/place"
import {
  import {
    mapGetters
} from "vuex"
  } from "vuex"
import website from '@/config/website'
  import website from '@/config/website'
import auditBase from './components/auditBase'
import baseAllInfo from './components/baseAllInfo'
  import auditBase from './components/auditBase'
  import baseAllInfo from './components/baseAllInfo'
export default {
  export default {
    data() {
        //手机号格式校验
        let validatorPhone = function (rule, value, callback) {
            if (value) {
                if (!/^1[3456789]\d{9}$/.test(value)) {
                    callback(new Error('手机号格式有误!'))
                } else {
                    callback()
                }
            }
      //手机号格式校验
      let validatorPhone = function(rule, value, callback) {
        if (value) {
          if (!/^1[3456789]\d{9}$/.test(value)) {
            callback(new Error('手机号格式有误!'))
          } else {
            callback()
          }
        }
        callback()
      }
        return {
            form: {},
            query: {},
            loading: true,
      return {
        form: {},
        query: {},
        loading: true,
            page: {
                pageSize: 10,
                currentPage: 1,
                total: 0,
        page: {
          pageSize: 10,
          currentPage: 1,
          total: 0,
        },
        datetime: "",
        selectionList: [],
        option: {
          // header:true,
          labelWidth: 120,
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          // menuWidth: 280,
          menu: false,
          height: "auto",
          calcHeight: 54,
          dialogWidth: 950,
          tip: false,
          border: true,
          //stripe:true,
          addBtn: false,
          index: true,
          viewBtn: false,
          editBtn: false,
          // selection: true,
          dialogClickModal: false,
          // menuFixed: 'right',
          delBtn: false,
          column: [{
              overHidden: true,
              label: "姓名",
              span: 12,
              prop: "name",
              searchSpan: 4,
              search: true,
              searchLabelWidth: 76,
            },
            datetime: "",
            selectionList: [],
            option: {
                // header:true,
                labelWidth: 120,
                searchLabelWidth: 96,
                searchShow: true,
                searchMenuSpan: 3,
                // menuWidth: 280,
                menu: false,
                height: "auto",
                calcHeight: 54,
                dialogWidth: 950,
                tip: false,
                border: true,
                //stripe:true,
                addBtn: false,
                index: true,
                viewBtn: false,
                editBtn: false,
                // selection: true,
                dialogClickModal: false,
                // menuFixed: 'right',
                delBtn: false,
                column: [
                    {
                        overHidden: true,
                        label: "姓名",
                        span: 12,
                        prop: "name",
                        searchSpan: 4,
                        search: true,
                        searchLabelWidth: 76,
                    },
                    {
                        label: "电话号码",
                        prop: "telephone",
                        searchSpan: 4,
                        searchLabelWidth: 110,
                        search: true,
                    },
                    {
                        overHidden: true,
                        label: "微信号",
                        prop: "wxAccount",
                        searchSpan: 4,
                        slot: true,
                    },
                    {
                        overHidden: true,
                        label: "身份证号",
                        prop: "idCard",
                        // search: true,
                        width:160,
                        searchSpan: 4,
                        slot: true,
                    },
                    {
                        label: "年龄",
                        width:80,
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "age",
                        searchSpan: 4
                    },
                    {
                        width: 160,
                        label: "工作单位",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "employer",
                        searchSpan: 4
                    },
                    {
                        label: "岗位性质",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "jobNature",
                        searchSpan: 4
                    },
                    {
                        minWidth: 160,
                        label: "现居住地",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "tempAddress",
                        searchSpan: 4
                    },
                    {
                        minWidth: 160,
                        label: "户籍地址",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "registeredAddress",
                        searchSpan: 4
                    },
                    {
                        label: "预警人员",
                        addDisplay: false,
                        editDisplay: false,
                        viewDisplay: false,
                        prop: "type",
                        searchSpan: 4,
                        hide: true,
                        type: "select",
                        search: true,
                        dicData: [{
                            label: "未成年人",
                            value: 1
                        },
                        {
                            label: "少数民族",
                            value: 2
                        },
                        {
                            label: "以上都有",
                            value: 3
                        }
                        ],
                    }
                ],
            {
              label: "电话号码",
              prop: "telephone",
              searchSpan: 4,
              searchLabelWidth: 110,
              search: true,
            },
            data: [],
            {
              overHidden: true,
              label: "微信号",
              prop: "wxAccount",
              searchSpan: 4,
              slot: true,
            },
            {
              overHidden: true,
              label: "身份证号",
              prop: "idCard",
              // search: true,
              width: 160,
              searchSpan: 4,
              slot: true,
            auditBasePopup: false,
            },
            {
              label: "民族",
              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: "employer",
            //   searchSpan: 4
            // },
            {
              label: "岗位性质",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "jobNature",
              searchSpan: 4
            },
            {
              minWidth: 160,
              label: "现居住地",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "tempAddress",
              searchSpan: 4
            },
            {
              minWidth: 160,
              label: "户籍地址",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "registeredAddress",
              searchSpan: 4
            },
            {
              label: "预警人员",
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
              prop: "type",
              searchSpan: 4,
              hide: true,
              type: "select",
              search: true,
              dicData: [{
                  label: "未成年人",
                  value: 1
                },
                {
                  label: "少数民族",
                  value: 2
                },
                {
                  label: "以上都有",
                  value: 3
                }
              ],
            }
          ],
        },
        data: [],
            countInfo:{}
        }
        auditBasePopup: false,
        countInfo: {}
      }
    },
    provide() {
        return {
            placeElement: this,
        }
      return {
        placeElement: this,
      }
    },
    components: { auditBase, baseAllInfo },
    components: {
      auditBase,
      baseAllInfo
    },
    computed: {
        ...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),
            }
        },
        ids() {
            let ids = []
            this.selectionList.forEach((ele) => {
                ids.push(ele.id)
            })
            return ids.join(",")
        },
        showConfirmFlag() {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '待审核',
                        type: 'warning'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '已审核',
                        type: 'success'
                    }
                } else if (data == 3) {
                    tags = {
                        text: '未通过',
                        type: 'danger'
                    }
                } else if (data == 4) {
                    tags = {
                        text: '待完善',
                        type: 'info'
                    }
                }
                return tags
            }
        },
        showSource() {
            return (data) => {
                let tags = {
                    text: '',
                    type: ''
                }
                if (data == 1) {
                    tags = {
                        text: '是',
                        type: 'success'
                    }
                } else if (data == 2) {
                    tags = {
                        text: '否',
                        type: 'info'
                    }
                }
                return tags
            }
        },
        showLocation() {
            return (data) => {
                if (data != null && data.indexOf(',') != -1) {
                    data = data.split(',')
                    return data[2]
                } else {
                    return data || ''
                }
            }
        },
        decimalProcessing() {
            return (data) => {
                if (data != null) {
                    return Number(data).toFixed(6)
                } else {
                    return ''
                }
            }
        },
        textDispose() {
            return (row, flag, type) => {
                if (row[flag] || row[type] == null) {
                    return row[type]
                } else {
                    if (type == 'principalIdCard') {
                        return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
                    } else {
                        return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
                    }
                }
            }
      ...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),
        }
    },
    methods: {
        handleQueryAlarm(type){
            this.onLoad(this.page,{type:type})
        },
        showStringDispose(row, type) {
            row[type] = !row[type]
        },
      },
      ids() {
        let ids = []
        this.selectionList.forEach((ele) => {
          ids.push(ele.id)
        })
        return ids.join(",")
      },
        locationDispose(data) {
      showConfirmFlag() {
        return (data) => {
          let tags = {
            text: '',
            type: ''
          }
          if (data == 1) {
            tags = {
              text: '待审核',
              type: 'warning'
            }
          } else if (data == 2) {
            tags = {
              text: '已审核',
              type: 'success'
            }
          } else if (data == 3) {
            tags = {
              text: '未通过',
              type: 'danger'
            }
          } else if (data == 4) {
            tags = {
              text: '待完善',
              type: 'info'
            }
          }
          return tags
        }
      },
      showSource() {
        return (data) => {
          let tags = {
            text: '',
            type: ''
          }
          if (data == 1) {
            tags = {
              text: '是',
              type: 'success'
            }
          } else if (data == 2) {
            tags = {
              text: '否',
              type: 'info'
            }
          }
          return tags
        }
      },
      showLocation() {
        return (data) => {
          if (data != null && data.indexOf(',') != -1) {
            data = data.split(',')
            return {
                longitude: data[0],
                latitude: data[1],
                location: data[2]
            }
        },
            return data[2]
          } else {
            return data || ''
          }
        }
      },
        auditCur(row) {
            this.curAuditRow = row
            this.auditBasePopup = true
        },
      decimalProcessing() {
        return (data) => {
          if (data != null) {
            return Number(data).toFixed(6)
          } else {
            return ''
          }
        }
      },
        ManageTenants(item) {
            this.$refs.BaseAllInfo.initOpen(item)
        },
        rowSave(row, done, loading) {
            if (row.imageUrls.length > 0) {
                var urls = []
                var split = row.imageUrls.split(",").filter(item => item != '')
                split.forEach(url => {
                    var names = url.split("jczz/")
                    urls.push(names[1])
                })
                row.imageUrls = urls.join(",")
            }
            let label = row.label
            if (row.smallLabel != '') {
                label = label + ',' + row.smallLabel
            }
            delete row.smallLabel
            add({
                ...row,
                label,
                ...this.locationDispose(row.location)
            }).then(
                () => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    done()
                },
                (error) => {
                    window.console.log(error)
                    loading()
                }
            )
        },
        searchReset() {
            this.query = {}
            this.onLoad(this.page)
        },
        searchChange(params, done) {
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
        },
        selectionChange(list) {
            this.selectionList = list
        },
        selectionClear() {
            this.selectionList = []
            this.$nextTick(() => {
                this.$refs.crud && this.$refs.crud.toggleSelection()
            })
        },
        handleDelete() {
            if (this.selectionList.length === 0) {
                this.$message.warning("请选择至少一条数据")
                return
            }
            this.$confirm("确定将选择数据删除?", {
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "warning",
            })
                .then(() => {
                    return remove(this.ids)
                })
                .then(() => {
                    this.onLoad(this.page)
                    this.$message({
                        type: "success",
                        message: "操作成功!",
                    })
                    this.$refs.crud.toggleSelection()
                })
        },
        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()
                })
      textDispose() {
        return (row, flag, type) => {
          if (row[flag] || row[type] == null) {
            return row[type]
          } else {
            if (type == 'principalIdCard') {
              return row[type].replace(/^(.{6})(?:\d+)(.{4})$/, "$1******$2")
            } else {
                done()
              return row[type].replace(/^(.{3})(?:\d+)(.{4})$/, "$1****$2")
            }
        },
          }
        }
      }
    },
    methods: {
      handleQueryAlarm(type) {
        this.onLoad(this.page, {
          type: type
        })
      },
      showStringDispose(row, type) {
        row[type] = !row[type]
      },
        currentChange(currentPage) {
            this.page.currentPage = currentPage
        },
        sizeChange(pageSize) {
            this.page.pageSize = pageSize
        },
        refreshChange() {
            this.onLoad(this.page, this.query)
        },
        onLoad(page, params = {}) {
            this.loading = true
      locationDispose(data) {
        data = data.split(',')
            getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
                const data = res.data.data
        return {
          longitude: data[0],
          latitude: data[1],
          location: data[2]
        }
      },
                this.page.total = data.total
      auditCur(row) {
        this.curAuditRow = row
        this.auditBasePopup = true
      },
                this.data = data.records
                this.getPeopleCount();
      ManageTenants(item) {
        this.$refs.BaseAllInfo.initOpen(item)
      },
                this.data.forEach(item => {
                    this.$set(item, 'principalPhoneflag', false)
                    this.$set(item, 'principalIdCardflag', false)
                    // if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
                    //     var urls = []
                    //     var names = item.imageUrls.split(",").filter(item => item != '')
                    //     names.forEach(name => {
                    //         urls.push(website.minioUrl + name)
                    //     })
                    //     item.imageUrls = urls.join(",")
                    // }
                })
                this.loading = false
                this.selectionClear()
            })
        },
        getPeopleCount(){
            getCount().then(res=>{
                   this.countInfo = res.data.data;
            })
      rowSave(row, done, loading) {
        if (row.imageUrls.length > 0) {
          var urls = []
          var split = row.imageUrls.split(",").filter(item => item != '')
          split.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          row.imageUrls = urls.join(",")
        }
        let label = row.label
        if (row.smallLabel != '') {
          label = label + ',' + row.smallLabel
        }
        delete row.smallLabel
        add({
          ...row,
          label,
          ...this.locationDispose(row.location)
        }).then(
          () => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            done()
          },
          (error) => {
            window.console.log(error)
            loading()
          }
        )
      },
      searchReset() {
        this.query = {}
        this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params
        this.page.currentPage = 1
        this.onLoad(this.page, params)
        done()
      },
      selectionChange(list) {
        this.selectionList = list
      },
      selectionClear() {
        this.selectionList = []
        this.$nextTick(() => {
          this.$refs.crud && this.$refs.crud.toggleSelection()
        })
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据")
          return
        }
        this.$confirm("确定将选择数据删除?", {
            confirmButtonText: "确定",
            cancelButtonText: "取消",
            type: "warning",
          })
          .then(() => {
            return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!",
            })
            this.$refs.crud.toggleSelection()
          })
      },
      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 {
          done()
        }
      },
      currentChange(currentPage) {
        this.page.currentPage = currentPage
      },
      sizeChange(pageSize) {
        this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => {
          const data = res.data.data
          this.page.total = data.total
          this.data = data.records
          this.getPeopleCount();
          this.data.forEach(item => {
            this.$set(item, 'principalPhoneflag', false)
            this.$set(item, 'principalIdCardflag', false)
            // if (item.imageUrls && item.imageUrls != '' && item.imageUrls != null && item.imageUrls.length) {
            //     var urls = []
            //     var names = item.imageUrls.split(",").filter(item => item != '')
            //     names.forEach(name => {
            //         urls.push(website.minioUrl + name)
            //     })
            //     item.imageUrls = urls.join(",")
            // }
          })
          this.loading = false
          this.selectionClear()
        })
      },
      getPeopleCount() {
        getCount().then(res => {
          this.countInfo = res.data.data;
        })
      }
    }
}
  }
</script>
<style>
.avue-upload__icon {
  .avue-upload__icon {
    line-height: 6;
}
.type-row{
    display: flex;
    padding:  0 0 20px;
}
  }
.type-item{
    padding:12px 12px;
  .type-row {
    display: flex;
    padding: 0 0 20px;
  }
  .type-item {
    padding: 12px 12px;
    background-color: #429FFF;
    color:#fff;
    font-size:14px;
    margin-right:30px;
    color: #fff;
    font-size: 14px;
    margin-right: 30px;
    border-radius: 6px;
    text-align: center;
}
  }
</style>