Browse Source

Merge branch 'dev-九小场所1026'

dev-烟台中转登录
jiangyy 3 years ago
parent
commit
35a80e269b
  1. 168
      src/assets/scss/pages/staffRegister.scss
  2. 18
      src/router/index.js
  3. 342
      src/views/modules/base/epidemic/unitEpid/crowdEpidList.vue
  4. 254
      src/views/modules/base/epidemic/unitEpid/staffEpidDetail.vue
  5. 476
      src/views/modules/base/epidemic/unitEpid/staffEpidList.vue
  6. 4
      src/views/modules/communityService/ninePlaces/places/placesForm.vue
  7. 462
      src/views/modules/cpts/base/cpts/edit.vue
  8. 550
      src/views/modules/cpts/base/index.vue
  9. 138
      src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue
  10. 501
      src/views/pages/staffRegister.vue
  11. 147
      src/views/pages/staffRegisterSuccess.vue

168
src/assets/scss/pages/staffRegister.scss

@ -0,0 +1,168 @@
.bg-caiji {
// background-color: rgba(189, 214, 255, 0.89);
height: 100%;
width: 100vw;
padding: 20px;
.title {
text-align: center;
font-size: 20px;
}
.main {
padding-top: 20px;
// font-size: 40px;
.div_tab{
display: flex;
justify-content: center;
.div_option{
text-align: center;
color:#3e8ef7;
height:35px;
width:150px;
line-height: 35px;
padding:0 0;
border:1px solid #3e8ef7 ;
}
.option_left{
border-radius: 5px 0 0 5px;
}
.option_right{
border-radius: 0 5px 5px 0;
}
.option_select{
color:#ffffff;
background-color:#3e8ef7 ;
}
}
.content {
margin-top:10px;
border-radius: 5px;
background-color: rgba(255, 255, 255, 0.787);
.member_title {
padding: 10px;
font-size: 14px;
}
}
.content1 {
margin-top: 20px;
}
.line {
border: 1px solid #e4e4e48e;
}
}
.div-btn {
margin-top: 30px;
padding-bottom: 20px;
display: flex;
justify-content: center;
.btn {
width: 150px;
font-size: 16px;
}
}
}
.picker_content {
color: rgb(59, 59, 59);
}
.bg-caiji-success {
background: url("../../assets/img/caiji-bc.png") no-repeat;
background-size: 100% 100%;
height: 100vh;
width: 100vw;
text-align: center;
.title {
// background-color: rgba(189, 214, 255, 0.89);
padding-top:30px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 800;
color: #333333;
display: flex;
height:25px;
align-items: center;
justify-content: center;
>img{
width:27px;
height:25px;
}
.title_name{
margin-left:5px;
margin-top:5px;
}
}
.div_tip{
text-align: center;
margin-top:35px;
font-size: 18px;
font-family: PingFang SC;
font-weight: 800;
color: #2E78E2;
line-height: 26px;
}
.div_content{
margin:20px 10px 30px 10px;
padding:20px 16px;
background: #FFFFFF;
border-radius: 10px;
font-size: 16px;
font-family: Source Han Serif SC;
font-weight: 400;
color: #333333;
text-align: left;
.content_long{
display: flex;
justify-content: left;
align-items: flex-start;
.content_title{
// min-width: 85px;
flex:0 0 125px;
flex-shrink: 0;
text-align: right;
}
}
.marginT10{
margin-top:10px;
}
}
.main {
margin-top: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon-success {
font-size: 40px;
// width: 20px;
// height: 20px;
}
.success-content {
margin-top: 10px;
font-size: 25px;
}
}
}

18
src/router/index.js

@ -63,6 +63,24 @@ export const pageRoutes = [
title: "居民信息填报",
},
},
{
path: "/staffRegister",
props: true,
name: "staffRegister",
component: () => import("@/views/pages/staffRegister"),
meta: {
title: "员工登记",
},
},
{
path: "/staffRegisterSuccess",
props: true,
name: "staffRegisterSuccess",
component: () => import("@/views/pages/staffRegisterSuccess"),
meta: {
title: "员工登记",
},
},
];
// 模块路由(基于主入口布局页面)

342
src/views/modules/base/epidemic/unitEpid/crowdEpidList.vue

@ -0,0 +1,342 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'110px'">
<div>
<el-form-item label="核酸检测时间"
label-width="110px"
prop="natStartDate">
<el-date-picker v-model="timeRange"
size="small"
type="daterange"
@change="handleTimeChange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="场所名称"
prop="placeOrgName">
<el-input v-model="formData.placeOrgName"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入场所名称">
</el-input>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<el-table class="table"
ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="placeOrgName"
header-align="center"
align="center"
label="场所名称"
min-width="200">
</el-table-column>
<el-table-column prop="natTime"
header-align="center"
align="center"
label="检测时间"
width="200">
</el-table-column>
<el-table-column prop="szTotal"
header-align="center"
align="center"
label="受众人数"
min-width="150">
</el-table-column>
<el-table-column prop="hsjcTotal"
header-align="center"
align="center"
show-overflow-tooltip
label="核酸检测人数"
min-width="150">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="160"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button v-if="scope.row.agencyId===agencyId "
type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
<!-- <el-button type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button> -->
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
loading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: false,
agencyId: '',
timeRange: [],
formData: {
placeOrgName: '',//10
natStartDate: '',//eg2022-02-02
natEndDate: '',//eg2022-02-02
},
tableData: [],
//form
detailShow: false,
formTitle: '新增',
// btnAuths: {
// group_people_reg_del : false, //
// },
}
},
components: {
},
async created () {
},
async mounted () {
// this.updateBtnAuths();
const { user } = this.$store.state
this.agencyId = user.agencyId
await this.loadTable()
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
async handleSearch () {
await this.loadTable()
this.$nextTick(() => {
this.$refs.ref_table.doLayout() //
})
},
async loadTable () {
this.tableLoading = true
const url = "/gov/org/icGroupPeopleRegister/list"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/natlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
...this.formData
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.tableData.forEach(item => {
});
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
handleTimeChange (time) {
if (time) {
this.formData.natStartDate = time[0]
this.formData.natEndDate = time[1]
} else {
this.formData.natStartDate = ''
this.formData.natEndDate = ''
}
},
diaDetailClose () {
this.detailShow = false
},
async handleDelete (row) {
let message = '确认删除?'
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteStaff(row)
})
.catch(err => {
});
},
async deleteStaff (row) {
const url = "/gov/org/icGroupPeopleRegister/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/del"
let params = [row.id]
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "操作成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
//
resetSearch () {
this.formData = {
placeOrgName: '',//10
natStartDate: '',//eg2022-02-02
natEndDate: '',//eg2022-02-02
}
this.timeRange = []
this.pageNo = 0
// this.loadTable()
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 320 + this.iframeHeight : this.clientHeight - 320
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
</style>

254
src/views/modules/base/epidemic/unitEpid/staffEpidDetail.vue

@ -0,0 +1,254 @@
<template>
<div class="epidemic-form">
<div class="dialog-h-content scroll-h">
<div v-if="view_real_data"
class="div_tuomin">
<el-button size="mini"
class="diy-button--search"
@click="handleTuomin">显示脱敏信息</el-button>
</div>
<div v-if="initLoading"
class="m-row"
style="margin-top:40px">
<div class="div_table">
<el-table class="table"
ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="name"
header-align="center"
align="center"
label="姓名"
min-width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
label="手机号"
min-width="110">
</el-table-column>
<el-table-column prop="idCard"
header-align="center"
align="center"
label="身份证号"
min-width="170">
</el-table-column>
<el-table-column prop="ymjzCount"
header-align="center"
align="center"
label="疫苗接种次数"
width="150">
</el-table-column>
<el-table-column prop="latestNatTime"
header-align="center"
align="center"
show-overflow-tooltip
label="最后一次核酸检测时间"
min-width="230">
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
</div>
<div class="div-btn">
<el-button size="small"
@click="handleCancle"> </el-button>
<!-- <el-button v-if="formType != 'detail'"
size="small"
type="primary"
:disabled="btnDisable"
@click="handleComfirm"> </el-button> -->
</div>
</div>
</template>
<script>
import { Loading } from 'element-ui' // Loading
import { requestPost } from '@/js/dai/request'
import { mapGetters } from 'vuex'
let loading //
export default {
data () {
return {
initLoading: false,
loading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: false,
tableData: [],
registerId: '',
}
},
components: {},
async mounted () {
const { user } = this.$store.state
this.agencyId = user.agencyId
},
methods: {
async initForm (registerId) {
this.startLoading()
this.registerId = registerId
await this.loadTable()
this.initLoading = true
this.endLoading()
},
async loadTable () {
this.tableLoading = true
const url = "/gov/org/icEmployeeRegister/detailList"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/natlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
registerId: this.registerId
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.tableData.forEach(item => {
});
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
async handleTuomin () {
const url = "/data/aggregator/epmetuser/detailByType";
const { data, code, msg } = await requestPost(url, {
id: this.registerId,
type: "employeeEpidemicManageDetail",
});
if (code === 0) {
this.tableData.forEach(element => {
element.mobile = data.mobile
element.idCard = data.idCard
// this.$set(this.formData, 'showMobile', data.mobile)
// this.$set(this.formData, 'showIdCard', data.idCard)
});
} else {
this.$message.error(msg);
}
},
handleCancle () {
// this.resetData()
this.$emit('dialogCancle')
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
resetData () {
this.formData = {}
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 420 + this.iframeHeight : this.clientHeight - 420
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
props: {
view_real_data: {//
type: Boolean,
default: true,
}
}
}
</script>
<style lang="scss" scoped>
@import "@/assets/scss/modules/management/detail-main.scss";
.div_tuomin {
position: absolute;
top: 0;
right: 70px;
z-index: 1000;
}
</style>

476
src/views/modules/base/epidemic/unitEpid/staffEpidList.vue

@ -0,0 +1,476 @@
<template>
<div class="div_main">
<div class="div_search">
<el-form :inline="true"
:model="formData"
ref="ref_searchform"
:label-width="'110px'">
<div>
<el-form-item label="核酸检测时间"
label-width="110px"
prop="natStartDate">
<el-date-picker v-model="timeRange"
size="small"
type="daterange"
@change="handleTimeChange"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="检测状态">
<el-select class="list_item_width_1"
size="small"
v-model.trim="formData.checkStatus"
placeholder="请选择">
<el-option v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="场所名称"
prop="placeOrgName">
<el-input v-model="formData.placeOrgName"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入场所名称">
</el-input>
</el-form-item>
<el-form-item label="场所类型"
prop="placeCategory">
<el-select class="item_width_1"
size="small"
v-model="formData.placeCategory"
placeholder="请选择"
clearable>
<el-option v-for="item in placeCategoryList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="姓名"
prop="name">
<el-input v-model="formData.name"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入姓名">
</el-input>
</el-form-item>
<el-form-item label="手机号"
prop="mobile">
<el-input v-model="formData.mobile"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入手机号">
</el-input>
</el-form-item>
<el-form-item label="证件号"
prop="idCard">
<el-input v-model="formData.idCard"
size="small"
class="list_item_width_1"
clearable
placeholder="请输入身份证号或护照号">
</el-input>
</el-form-item>
<el-button style="margin-left:30px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left:10px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table">
<el-table class="table"
ref="ref_table"
:data="tableData"
border
:height="tableHeight"
v-loading="tableLoading"
:header-cell-style="{background:'#2195FE',color:'#FFFFFF'}"
style="width: 100%">
<el-table-column label="序号"
header-align="center"
align="center"
type="index"
width="50"></el-table-column>
<el-table-column prop="placeOrgName"
header-align="center"
align="center"
label="场所名称"
min-width="120">
</el-table-column>
<el-table-column prop="name"
header-align="center"
align="center"
label="姓名"
min-width="100">
</el-table-column>
<el-table-column prop="mobile"
header-align="center"
align="center"
label="手机号"
min-width="110">
</el-table-column>
<el-table-column prop="idCard"
header-align="center"
align="center"
label="证件号"
min-width="170">
</el-table-column>
<el-table-column prop="ymjzCount"
header-align="center"
align="center"
label="疫苗接种次数"
width="150">
</el-table-column>
<el-table-column prop="latestNatTime"
header-align="center"
align="center"
show-overflow-tooltip
label="最后一次核酸检测时间"
min-width="230">
</el-table-column>
<el-table-column label="操作"
fixed="right"
width="160"
header-align="center"
align="center"
class="operate">
<template slot-scope="scope">
<el-button type="text"
class="div-table-button--detail"
size="small"
@click="handleDetail(scope.row)">查看</el-button>
<el-button v-if="scope.row.agencyId===agencyId "
type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button>
<!-- <el-button type="text"
class="div-table-button--delete "
size="small"
@click="handleDelete(scope.row)">删除</el-button> -->
</template>
</el-table-column>
</el-table>
<div>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="pageSize"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
<!-- 详情弹出框 -->
<el-dialog :visible.sync="detailShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="'详情'"
width="1350px"
top="5vh"
class="dialog-h"
@closed="diaDetailClose">
<staff-epid-detail ref="ref_detail"
@dialogCancle="diaDetailClose"></staff-epid-detail>
</el-dialog>
</div>
</template>
<script>
import staffEpidDetail from './staffEpidDetail'
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading
let loading //
export default {
data () {
return {
loading: false,
total: 0,
pageSize: 20,
pageNo: 0,
tableLoading: false,
agencyId: '',
placeCategoryList: [
{
value: '0',
label: '九小场所'
},
{
value: '1',
label: '企事业单位'
}
],//list
statusList: [
{
value: '1',
label: '已检测'
},
{
value: '0',
label: '未检测'
}
],
timeRange: [],
formData: {
checkStatus: '',//10
name: '',//
mobile: '',//
idCard: '',//
natStartDate: '',//eg2022-02-02
natEndDate: '',//eg2022-02-02
placeOrgName: '',//
placeCategory: '',//01
},
tableData: [],
//form
detailShow: false,
// btnAuths: {
// employee_register_del : false, //
// employee_register_view_real_data: false, //
// },
}
},
components: {
staffEpidDetail
},
async created () {
},
async mounted () {
// this.updateBtnAuths();
const { user } = this.$store.state
this.agencyId = user.agencyId
await this.loadTable()
},
activated () {
this.$refs['ref_table'].doLayout()
},
methods: {
async handleSearch () {
await this.loadTable()
this.$nextTick(() => {
this.$refs.ref_table.doLayout() //
})
},
async loadTable () {
this.tableLoading = true
const url = "/gov/org/icEmployeeRegister/list"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/natlist"
let params = {
pageSize: this.pageSize,
pageNo: this.pageNo,
...this.formData
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.total = data.total
this.tableData = data.list
this.tableData.forEach(item => {
});
} else {
this.$message.error(msg)
}
this.tableLoading = false
},
handleTimeChange (time) {
if (time) {
this.formData.natStartDate = time[0]
this.formData.natEndDate = time[1]
} else {
this.formData.natStartDate = ''
this.formData.natEndDate = ''
}
},
async handleDetail (row) {
this.detailShow = true
this.$nextTick(() => {
this.$refs.ref_detail.initForm(row.registerId)
})
},
diaDetailClose () {
this.detailShow = false
},
async handleDelete (row) {
let message = '确认删除?'
this.$confirm(message, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.deleteStaff(row)
})
.catch(err => {
});
},
async deleteStaff (row) {
const url = "/gov/org/icEmployeeRegister/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/epmetuser/icNat/del"
let params = [row.registerId]
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
this.$message({
type: "success",
message: "操作成功"
});
this.loadTable()
} else {
this.$message.error(msg)
}
},
//
resetSearch () {
this.formData = {
checkStatus: '',//10
name: '',//
mobile: '',//
idCard: '',//
natStartDate: '',//eg2022-02-02
natEndDate: '',//eg2022-02-02
placeOrgName: '',//
placeCategory: '',//01
}
this.timeRange = []
this.pageNo = 0
// this.loadTable()
},
handleSizeChange (val) {
this.pageSize = val
this.pageNo = 1
this.loadTable()
},
handleCurrentChange (val) {
this.pageNo = val
this.loadTable()
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
computed: {
tableHeight () {
return this.$store.state.inIframe ? this.clientHeight - 370 + this.iframeHeight : this.clientHeight - 370
},
...mapGetters(['clientHeight', 'iframeHeight'])
},
watch: {
},
props: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/modules/management/epidemic.scss";
</style>

4
src/views/modules/communityService/ninePlaces/places/placesForm.vue

@ -159,12 +159,12 @@ export default {
},
async loadGrid () {
async loadGrid () {
const url = "/gov/org/customergrid/gridoption"
let params = {
agencyId: this.agencyId,
purpose:"addorupdate"
purpose: "addorupdate"
}
const { data, code, msg } = await requestPost(url, params)

462
src/views/modules/cpts/base/cpts/edit.vue

@ -1,273 +1,237 @@
<template>
<div>
<div class="dialog-h-content scroll-h">
<el-form
v-if="iniLoaded"
ref="ref_form"
:model="fmData"
:inline="true"
:disabled="formType === 'watch'"
class="m-fm"
:class="{ 'z-div': editParamsDiv, 'z-watch': formType === 'watch' }"
>
<el-form v-if="iniLoaded"
ref="ref_form"
:model="fmData"
:inline="true"
:disabled="formType === 'watch'"
class="m-fm"
:class="{ 'z-div': editParamsDiv, 'z-watch': formType === 'watch' }">
<div class="list">
<el-form-item
v-for="item in editParams"
class="item"
label-width="140px"
style="display: block"
:key="'edit' + item.keyName"
:label="item.field"
:prop="item.keyName"
:rules="item.rules || []"
>
<el-form-item v-for="item in editParams"
class="item"
label-width="140px"
style="display: block"
:key="'edit' + item.keyName"
:label="item.field"
:prop="item.keyName"
:rules="item.rules || []">
<template v-if="item.type == 'switch'">
<el-switch
v-model="fmData[item.keyName]"
size="small"
:active-text="item.activeText || ''"
:inactive-text="item.inactiveText || ''"
:active-value="item.activeValue || true"
:inactive-value="item.inactiveValue || false"
>
<el-switch v-model="fmData[item.keyName]"
size="small"
:active-text="item.activeText || ''"
:inactive-text="item.inactiveText || ''"
:active-value="item.activeValue || true"
:inactive-value="item.inactiveValue || false">
</el-switch>
</template>
<template v-if="item.type == 'input'">
<el-input
v-if="
<el-input v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
class="item-input"
size="small"
clearable
show-word-limit
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'"
>
v-model="fmData[item.keyName]"
class="item-input"
size="small"
clearable
show-word-limit
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'">
</el-input>
<div class="item-show" v-else>
<div class="item-show"
v-else>
{{ fmData[item.keyName] || "--" }}
<span v-if="item.attach">{{item.attach}}</span>
</div>
</template>
<template v-if="item.type == 'textarea'">
<el-input
v-if="
<el-input v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
type="textarea"
class="item-input"
size="small"
clearable
show-word-limit
:rows="3"
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'"
>
v-model="fmData[item.keyName]"
type="textarea"
class="item-input"
size="small"
clearable
show-word-limit
:rows="3"
:maxlength="item.maxlength || ''"
:placeholder="item.placeholder || '请输入'">
</el-input>
<div class="item-show" v-else>
<div class="item-show"
v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template>
<template v-if="item.type == 'date'">
<el-date-picker
v-if="
<el-date-picker v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
:picker-options="item.pickerOptions"
class="item-input"
size="small"
clearable
show-word-limit
:value-format="item.format || 'yyyy-MM-dd'"
:placeholder="item.placeholder || '请输入'"
>
v-model="fmData[item.keyName]"
:picker-options="item.pickerOptions"
class="item-input"
size="small"
clearable
show-word-limit
:value-format="item.format || 'yyyy-MM-dd'"
:placeholder="item.placeholder || '请输入'">
</el-date-picker>
<div class="item-show" v-else>
<div class="item-show"
v-else>
{{ fmData[item.keyName] || "--" }}
</div>
</template>
<template v-if="item.type == 'number'">
<el-input-number
v-if="
<el-input-number v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
v-model="fmData[item.keyName]"
class="item-number"
size="small"
clearable
:precision="item.precision || 0"
:step="item.step || 1"
:min="item.min || 0"
:max="item.max || 999999999999"
:placeholder="item.placeholder || '请输入'"
>
v-model="fmData[item.keyName]"
class="item-number"
size="small"
clearable
:precision="item.precision || 0"
:step="item.step || 1"
:min="item.min || 0"
:max="item.max || 999999999999"
:placeholder="item.placeholder || '请输入'">
</el-input-number>
<span class="item-show" v-else>
<span class="item-show"
v-else>
{{ fmData[item.keyName] || "--" }}
</span>
<span v-if="item.unitName">{{ item.unitName }}</span>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item-select"
:multiple="item.multiple || false"
:filterable="item.filterable || false"
:allowCreate="item.allowCreate || false"
:collapse-tags="item.collapseTags || false"
default-first-option
@change="(e) => handleChangeSelect(e, item)"
>
<el-select v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
class="item-select"
:multiple="item.multiple || false"
:filterable="item.filterable || false"
:allowCreate="item.allowCreate || false"
:collapse-tags="item.collapseTags || false"
default-first-option
@change="(e) => handleChangeSelect(e, item)">
<template v-if="item.optionType == 'group'">
<el-option-group
v-for="group in item.optionList"
:key="group.label"
:label="group.label"
>
<el-option
v-for="subItem in group.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value"
>
<el-option-group v-for="group in item.optionList"
:key="group.label"
:label="group.label">
<el-option v-for="subItem in group.optionList"
:key="subItem.value"
:label="subItem.label"
:value="subItem.value">
</el-option>
</el-option-group>
</template>
<template v-else>
<el-option
v-for="(subItem, subIndex) in item.optionList"
:key="subItem.value + subIndex"
:label="subItem.label"
:value="subItem.value"
>
<el-option v-for="(subItem, subIndex) in item.optionList"
:key="subItem.value + subIndex"
:label="subItem.label"
:value="subItem.value">
</el-option>
</template>
</el-select>
</template>
<template v-else-if="item.type == 'rich-text'">
<div
v-if="
<div v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
class="item-rich-text"
>
<Tinymce
:ref="'richText' + item.keyName"
v-model="fmData[item.keyName]"
:customerId="customerId"
:placeholder="item.placeholder || '请输入'"
:height="500"
/>
class="item-rich-text">
<Tinymce :ref="'richText' + item.keyName"
v-model="fmData[item.keyName]"
:customerId="customerId"
:placeholder="item.placeholder || '请输入'"
:height="500" />
</div>
<div
v-else
class="item-rich-text z-show"
@click="handleClickHtmlNode"
>
<div v-else
class="item-rich-text z-show"
@click="handleClickHtmlNode">
<div v-html="fmData[item.keyName]"></div>
</div>
</template>
<template v-else-if="item.type == 'cascader'">
<el-cascader
v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
:options="item.optionList"
:props="item.optionProps || {}"
:show-all-levels="false"
:collapse-tags="item.collapseTags || false"
size="small"
clearable
class="item-select"
@change="(e) => handleChangeCascader(e, item)"
>
<el-cascader v-model="fmData[item.keyName]"
:placeholder="item.placeholder || '请选择'"
:options="item.optionList"
:props="item.optionProps || {}"
:show-all-levels="false"
:collapse-tags="item.collapseTags || false"
size="small"
clearable
class="item-select"
@change="(e) => handleChangeCascader(e, item)">
</el-cascader>
</template>
<template v-else-if="item.type == 'upload'">
<el-upload
:headers="$getElUploadHeaders()"
v-if="
<el-upload :headers="$getElUploadHeaders()"
v-if="
formType == 'add' || (formType == 'edit' && !item.editDisable)
"
ref="upload"
class="avatar-uploader"
:class="{ 'z-full': fmData[item.keyName].length >= item.limit }"
:action="item.uploadUrl || uploadUrl"
:data="{ customerId: customerId }"
:show-file-list="true"
:list-type="item.listType || 'picture'"
:limit="item.limit || 100"
:file-list="fmData[item.keyName]"
:on-success="(res, file) => handleImgSuccess(res, file, item)"
:on-error="(res, file) => handleImgError(res, file, item)"
:on-remove="(res) => handleImgRemove(res, item)"
:on-exceed="(res) => handleImgExceed(res, item)"
:before-upload="(file) => beforeImgUpload(file, item)"
>
ref="upload"
class="avatar-uploader"
:class="{ 'z-full': fmData[item.keyName].length >= item.limit }"
:action="item.uploadUrl || uploadUrl"
:data="{ customerId: customerId }"
:show-file-list="true"
:list-type="item.listType || 'picture'"
:limit="item.limit || 100"
:file-list="fmData[item.keyName]"
:on-success="(res, file) => handleImgSuccess(res, file, item)"
:on-error="(res, file) => handleImgError(res, file, item)"
:on-remove="(res) => handleImgRemove(res, item)"
:on-exceed="(res) => handleImgExceed(res, item)"
:before-upload="(file) => beforeImgUpload(file, item)">
<a><i class="el-icon-plus"></i> 点击上传</a>
</el-upload>
<el-image
v-else-if="fmData[item.keyName].length > 0"
style="width: 100px; height: 100px"
:src="fmData[item.keyName][0].url"
fit="cover"
:preview-src-list="fmData[item.keyName].map((item) => item.url)"
></el-image>
<el-image v-else-if="fmData[item.keyName].length > 0"
style="width: 100px; height: 100px"
:src="fmData[item.keyName][0].url"
fit="cover"
:preview-src-list="fmData[item.keyName].map((item) => item.url)"></el-image>
<span v-else>--</span>
</template>
<template v-else-if="item.type == 'address'">
<div class="address-item">
<el-input
class="address-item-input"
:placeholder="item.placeholder || '请输入所在地址'"
v-model="fmData[item.keyName]"
:maxlength="item.maxlength || ''"
show-word-limit
size="small"
>
<el-input class="address-item-input"
:placeholder="item.placeholder || '请输入所在地址'"
v-model="fmData[item.keyName]"
:maxlength="item.maxlength || ''"
show-word-limit
size="small">
</el-input>
<el-button
style="margin-left: 10px"
type="default"
size="small"
ref="mapSearch"
@click="handleSearchMap(item)"
>查询</el-button
>
<div id="app" class="div_map"></div>
<div style="margin-top: 10px" v-show="false">
<el-button style="margin-left: 10px"
type="default"
size="small"
ref="mapSearch"
@click="handleSearchMap(item)">查询</el-button>
<div id="app"
class="div_map"></div>
<div style="margin-top: 10px"
v-show="false">
<span>经度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入经度"
v-model="fmData[item.supKeys[0]]"
>
<el-input class="address-item-input2"
maxlength="50"
placeholder="请输入经度"
v-model="fmData[item.supKeys[0]]">
</el-input>
<span style="margin-left: 20px">纬度</span>
<el-input
class="address-item-input2"
maxlength="50"
placeholder="请输入纬度"
v-model="fmData[item.supKeys[1]]"
>
<el-input class="address-item-input2"
maxlength="50"
placeholder="请输入纬度"
v-model="fmData[item.supKeys[1]]">
</el-input>
</div>
</div>
@ -276,52 +240,44 @@
</div>
</el-form>
<div class="div_btn resi-btns" v-if="!formBtnFixed">
<el-button size="small" @click="handleCancle">{{
<div class="div_btn resi-btns"
v-if="!formBtnFixed">
<el-button size="small"
@click="handleCancle">{{
editConfig.cancelBtnName || "取消"
}}</el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
<el-button v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm">{{ editConfig.confirmBtnName || "确定" }}</el-button>
<slot name="operateSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"></slot>
</div>
<slot
name="bottomSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
<slot name="bottomSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"></slot>
</div>
<div class="div_btn resi-btns" v-if="formBtnFixed">
<el-button size="small" @click="handleCancle">{{
<div class="div_btn resi-btns"
v-if="formBtnFixed">
<el-button size="small"
@click="handleCancle">{{
editConfig.cancelBtnName || "取消"
}}</el-button>
<el-button
v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm"
>{{ editConfig.confirmBtnName || "确定" }}</el-button
>
<slot
name="operateSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"
></slot>
<el-button v-if="formType != 'watch'"
type="primary"
size="small"
:disabled="btnDisable"
@click="handleComfirm">{{ editConfig.confirmBtnName || "确定" }}</el-button>
<slot name="operateSup"
v-bind:id="formId"
v-bind:info="fmData"
v-bind:formType="formType"></slot>
</div>
</div>
</template>
@ -397,7 +353,7 @@ export default {
},
},
data() {
data () {
return {
iniLoaded: false,
@ -415,19 +371,19 @@ export default {
computed: {},
watch: {
editParams: {
handler() {
handler () {
this.computeFmData();
},
deep: true,
},
},
async mounted() {
async mounted () {
this.initForm();
},
methods: {
async initForm() {
async initForm () {
this.iniFmData();
if (this.formId && this.formType != "add") {
@ -435,11 +391,11 @@ export default {
}
},
computeFmData() {
computeFmData () {
console.log(this.fmData);
},
iniFmData() {
iniFmData () {
const { editParams, fmData, editParamsDiv } = this;
editParams.forEach((item, index) => {
if (typeof item.value == "function") {
@ -510,7 +466,7 @@ export default {
this.iniLoaded = true;
},
handleClickHtmlNode(e) {
handleClickHtmlNode (e) {
//
if (e.target.localName.toLowerCase() === "a") {
//
@ -519,7 +475,7 @@ export default {
}
},
async getFmOptions(index, url, params, cookFn) {
async getFmOptions (index, url, params, cookFn) {
const { data, code, msg } = await requestPost(url, {
...params,
});
@ -532,13 +488,13 @@ export default {
}
},
handleChangeCascader(vals, item) {
handleChangeCascader (vals, item) {
this.fmData[item["keyName"]] = vals;
if (typeof item.handleChangeFn == "function") {
item.handleChangeFn(vals, item, this);
}
},
handleChangeSelect(vals, item) {
handleChangeSelect (vals, item) {
console.log(vals, item);
this.fmData[item["keyName"]] = vals;
if (typeof item.handleChangeFn == "function") {
@ -546,14 +502,14 @@ export default {
}
},
beforeImgUpload(file, item) {
beforeImgUpload (file, item) {
if (typeof item.beforeImgUpload == "function") {
if (!item.beforeImgUpload(file, item, this)) return false;
}
return true;
},
handleImgRemove(file, item) {
handleImgRemove (file, item) {
console.log("handleImgRemove", file);
let url = file.response ? file.response.data.url : file.url;
if (url) {
@ -575,7 +531,7 @@ export default {
}
},
handleImgExceed(res, item) {
handleImgExceed (res, item) {
console.log(res);
// this.$message({
// type: "warning",
@ -583,7 +539,7 @@ export default {
// });
},
handleImgSuccess(res, file, item) {
handleImgSuccess (res, file, item) {
console.log("handleImgSuccess", res);
if (res.code === 0 && res.msg === "success") {
let { fmData } = this;
@ -619,12 +575,12 @@ export default {
}
},
handleImgError(res, file, item) {
handleImgError (res, file, item) {
console.log(res);
},
// init
initMap(item) {
initMap (item) {
let { latitude, longitude } = this.$store.state.user;
if (!latitude || latitude == "" || latitude == "0") {
latitude = 39.9088810666821;
@ -657,7 +613,7 @@ export default {
// this.handleMoveCenter(item);
},
setMarker(lat, lng) {
setMarker (lat, lng) {
markers.setGeometries([]);
markers.add([
{
@ -671,7 +627,7 @@ export default {
]);
},
handleSearchMap(item) {
handleSearchMap (item) {
infoWindowList.forEach((infoWindow) => {
infoWindow.close();
});
@ -703,7 +659,7 @@ export default {
});
},
handleMoveCenter(item, e) {
handleMoveCenter (item, e) {
console.log(e);
//
const center = map.getCenter();
@ -724,7 +680,7 @@ export default {
}
},
async getInfo() {
async getInfo () {
let url = this.infoUrl;
if (!url) return;
const { idName, formId } = this;
@ -764,12 +720,12 @@ export default {
}
},
watchImg(src) {
watchImg (src) {
window.open(src);
},
//
dormatHtml(content) {
dormatHtml (content) {
if (
content.startsWith(
"<!DOCTYPE html>\n<html>\n<head>\n</head>\n<body>\n"
@ -781,7 +737,7 @@ export default {
return content;
},
cookBeforeSubmit(data) {
cookBeforeSubmit (data) {
Object.keys(data).forEach((k) => {
if (typeof data[k] == "string") {
data[k] = this.dormatHtml(data[k]);
@ -790,7 +746,7 @@ export default {
return data;
},
async handleComfirm() {
async handleComfirm () {
this.btnDisable = true;
setTimeout(() => {
this.btnDisable = false;
@ -822,7 +778,7 @@ export default {
});
},
async submit() {
async submit () {
const { editConfig, fmData, formType, editFixedParams } = this;
if (
typeof editConfig.beforeSubmit == "function" &&
@ -862,7 +818,7 @@ export default {
}
},
handleCancle() {
handleCancle () {
this.$emit("close");
},
},

550
src/views/modules/cpts/base/index.vue

@ -1,315 +1,256 @@
<template>
<div class="div_main">
<div v-show="true">
<div class="div_search" ref="ref_search">
<el-form :inline="true" ref="ref_searchform" label-width="100px">
<div class="div_search"
ref="ref_search">
<el-form :inline="true"
ref="ref_searchform"
label-width="100px">
<div>
<el-form-item
v-for="item in searchParams"
:key="'serach' + item.keyName"
:label="item.field"
:prop="item.keyName"
>
<el-form-item v-for="item in searchParams"
:key="'serach' + item.keyName"
:label="item.field"
:prop="item.keyName">
<template v-if="item.type == 'input'">
<el-input
v-model="item.value"
style="width: 240px"
size="small"
clearable
:placeholder="item.placeholder || '请输入'"
>
<el-input v-model="item.value"
style="width: 240px"
size="small"
clearable
:placeholder="item.placeholder || '请输入'">
</el-input>
</template>
<template v-else-if="item.type == 'select'">
<el-select
v-model="item.value"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
style="width: 240px"
:multiple="item.multiple || false"
>
<el-option
v-for="item in item.optionList"
:key="'serach' + item.keyName + item.value"
:label="item.label"
:value="item.value"
>
<el-select v-model="item.value"
:placeholder="item.placeholder || '请选择'"
size="small"
clearable
style="width: 240px"
:multiple="item.multiple || false">
<el-option v-for="item in item.optionList"
:key="'serach' + item.keyName + item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
<template v-else-if="item.type == 'cascader'">
<el-cascader
v-model="item.value"
:placeholder="item.placeholder || '请选择'"
:options="item.optionList"
:props="item.optionProps"
:show-all-levels="false"
size="small"
clearable
style="width: 240px"
@change="(e) => handleChangeCascader(e, item)"
>
<el-cascader v-model="item.value"
:placeholder="item.placeholder || '请选择'"
:options="item.optionList"
:props="item.optionProps"
:show-all-levels="false"
size="small"
clearable
style="width: 240px"
@change="(e) => handleChangeCascader(e, item)">
</el-cascader>
</template>
<template v-if="item.type == 'date-range'">
<el-date-picker
v-model="item.supValues[0]"
type="date"
placeholder="开始时间"
style="width: 150px"
value-format="yyyy-MM-dd"
clearable
>
<el-date-picker v-model="item.supValues[0]"
type="date"
placeholder="开始时间"
style="width: 150px"
value-format="yyyy-MM-dd"
clearable>
</el-date-picker>
<span style="display: inline-block; margin: 0 10px"></span>
<el-date-picker
v-model="item.supValues[1]"
type="date"
placeholder="结束时间"
style="width: 150px"
value-format="yyyy-MM-dd"
clearable
>
<el-date-picker v-model="item.supValues[1]"
type="date"
placeholder="结束时间"
style="width: 150px"
value-format="yyyy-MM-dd"
clearable>
</el-date-picker>
</template>
</el-form-item>
<el-button
style="margin-left: 30px; margin-bottom: 20px"
size="small"
class="diy-button--search"
@click="handleSearch"
>查询</el-button
>
<el-button
style="margin-left: 10px; margin-bottom: 20px"
size="small"
class="diy-button--reset"
@click="resetSearch"
>重置</el-button
>
<el-button style="margin-left: 30px; margin-bottom: 20px"
size="small"
class="diy-button--search"
@click="handleSearch">查询</el-button>
<el-button style="margin-left: 10px; margin-bottom: 20px"
size="small"
class="diy-button--reset"
@click="resetSearch">重置</el-button>
</div>
</el-form>
</div>
<div class="div_table" :style="{ height: maxTableHeight + 130 + 'px' }">
<div class="div_table"
:style="{ height: maxTableHeight + 130 + 'px' }">
<div class="div_btn">
<el-button
class="diy-button--add"
v-if="addUrl"
size="small"
@click="handleAdd"
>新增</el-button
>
<el-button
v-if="mubanUrl"
class="btn_upload diy-button--export"
size="small"
@click="handleExportModule('room')"
>下载模板</el-button
>
<el-upload
:headers="$getElUploadHeaders()"
v-if="importUrl"
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest"
>
<el-button size="small" class="btn_upload diy-button--delete"
>导入</el-button
>
<el-button class="diy-button--add"
v-if="addUrl"
size="small"
@click="handleAdd">新增</el-button>
<el-button v-if="mubanUrl"
class="btn_upload diy-button--export"
size="small"
@click="handleExportModule('room')">下载模板</el-button>
<el-upload :headers="$getElUploadHeaders()"
v-if="importUrl"
ref="upload"
class="upload-btn"
action="uploadUlr"
:limit="1"
:accept="'.xls,.xlsx'"
:with-credentials="true"
:show-file-list="false"
:auto-upload="true"
:before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
<el-button size="small"
class="btn_upload diy-button--delete">导入</el-button>
</el-upload>
<el-button
v-if="exportUrl"
@click="handleExport"
class="btn_upload diy-button--reset"
size="small"
>导出</el-button
>
<el-button
v-if="delMultipleUrl"
size="small"
@click="handleDeleteMultiple"
>批量删除</el-button
>
<slot
name="listBtn"
v-bind:multipleSelection="multipleSelection"
></slot>
<el-button v-if="exportUrl"
@click="handleExport"
class="btn_upload diy-button--reset"
size="small">导出</el-button>
<el-button v-if="qrCodeExportUrl"
@click="handleExportQrcode"
class="btn_upload diy-button--reset"
size="small">导出员工登记码</el-button>
<el-button v-if="delMultipleUrl"
size="small"
@click="handleDeleteMultiple">批量删除</el-button>
<slot name="listBtn"
v-bind:multipleSelection="multipleSelection"></slot>
</div>
<el-table
ref="ref_table"
:data="tableData"
border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table"
style="width: 100%"
:height="maxTableHeight"
@selection-change="handleSelectionChange"
>
<template v-for="(item, index) in tableParams" :prop="item.keyName">
<el-table-column
v-if="item.type == 'selection'"
:key="'table-selection' + index"
type="selection"
align="center"
width="50"
/>
<el-table-column
v-if="item.type == 'no'"
:key="'table-no' + item.keyName"
:label="item.field"
fixed="left"
type="index"
align="center"
width="50"
/>
<el-table-column
v-else-if="item.type == 'text'"
:key="'table' + item.keyName"
:prop="item.keyName"
:label="item.field"
align="center"
:width="item.width || ''"
:show-overflow-tooltip="true"
>
<el-table ref="ref_table"
:data="tableData"
border
:header-cell-style="{ background: '#2195FE', color: '#FFFFFF' }"
class="table"
style="width: 100%"
:height="maxTableHeight"
@selection-change="handleSelectionChange">
<template v-for="(item, index) in tableParams"
:prop="item.keyName">
<el-table-column v-if="item.type == 'selection'"
:key="'table-selection' + index"
type="selection"
align="center"
width="50" />
<el-table-column v-if="item.type == 'no'"
:key="'table-no' + item.keyName"
:label="item.field"
fixed="left"
type="index"
align="center"
width="50" />
<el-table-column v-else-if="item.type == 'text'"
:key="'table' + item.keyName"
:prop="item.keyName"
:label="item.field"
align="center"
:width="item.width || ''"
:show-overflow-tooltip="true">
</el-table-column>
<el-table-column
v-else-if="item.type == 'array'"
:key="'table-array' + item.keyName"
:prop="item.keyName"
:label="item.field"
align="center"
:width="item.width || ''"
:show-overflow-tooltip="true"
>
<el-table-column v-else-if="item.type == 'array'"
:key="'table-array' + item.keyName"
:prop="item.keyName"
:label="item.field"
align="center"
:width="item.width || ''"
:show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row[item.keyName].join(item.arrayDiv || ",") }}
</template>
</el-table-column>
</template>
<el-table-column
v-if="operateCol"
fixed="right"
label="操作"
align="center"
width="200"
>
<el-table-column v-if="operateCol"
fixed="right"
label="操作"
align="center"
width="200">
<template slot-scope="scope">
<slot name="listBtnbefore" v-bind:item="scope.row"></slot>
<el-button
v-if="infoUrl && infoAuth(scope.row)"
@click="handleWatch(scope.row)"
type="text"
size="small"
class=".div-table-button--detail"
>查看</el-button
>
<el-button
v-if="editUrl && editAuth(scope.row)"
@click="handleEdit(scope.row)"
type="text"
size="small"
class="div-table-button--edit"
>{{ editBtnName(scope.row) }}</el-button
>
<el-popconfirm
v-if="delUrl && delAuth(scope.row)"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDelete(scope.row, scope.$index)"
@confirm="handleDelete(scope.row, scope.$index)"
>
<el-button
slot="reference"
type="text"
size="small"
style="margin-left: 10px"
class="div-table-button--delete"
>删除</el-button
>
<slot name="listBtnbefore"
v-bind:item="scope.row"></slot>
<el-button v-if="infoUrl && infoAuth(scope.row)"
@click="handleWatch(scope.row)"
type="text"
size="small"
class=".div-table-button--detail">查看</el-button>
<el-button v-if="editUrl && editAuth(scope.row)"
@click="handleEdit(scope.row)"
type="text"
size="small"
class="div-table-button--edit">{{ editBtnName(scope.row) }}</el-button>
<el-popconfirm v-if="delUrl && delAuth(scope.row)"
title="删除之后无法回复,确认删除?"
@onConfirm="handleDelete(scope.row, scope.$index)"
@confirm="handleDelete(scope.row, scope.$index)">
<el-button slot="reference"
type="text"
size="small"
style="margin-left: 10px"
class="div-table-button--delete">删除</el-button>
</el-popconfirm>
<slot name="listBtnSup" v-bind:item="scope.row"></slot>
<slot name="listBtnSup"
v-bind:item="scope.row"></slot>
</template>
</el-table-column>
</el-table>
<div>
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total"
>
<el-pagination @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next, total"
:total="total">
</el-pagination>
</div>
</div>
</div>
<!-- 修改弹出框 -->
<el-dialog
v-if="formShow"
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
:width="editParamsDiv ? '1100px' : '850px'"
top="5vh"
class="dialog-h"
@closed="handleClose"
>
<edit-form
v-if="formShow"
ref="editForm"
:idName="idName"
:formId="formId"
:formType="formType"
:infoUrl="infoUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:editParams="editParams"
:editParamsDiv="editParamsDiv"
:editElseRules="editElseRules"
:editFixedParams="editFixedParams"
:formBtnFixed="formBtnFixed"
:editConfig="editConfig"
@close="handleClose"
@afterEdit="handleEditSuccess"
>
<el-dialog v-if="formShow"
:visible.sync="formShow"
:close-on-click-modal="false"
:close-on-press-escape="false"
:title="formTitle"
:width="editParamsDiv ? '1100px' : '850px'"
top="5vh"
class="dialog-h"
@closed="handleClose">
<edit-form v-if="formShow"
ref="editForm"
:idName="idName"
:formId="formId"
:formType="formType"
:infoUrl="infoUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:editParams="editParams"
:editParamsDiv="editParamsDiv"
:editElseRules="editElseRules"
:editFixedParams="editFixedParams"
:formBtnFixed="formBtnFixed"
:editConfig="editConfig"
@close="handleClose"
@afterEdit="handleEditSuccess">
<template v-slot:bottomSup="{ id, formType, info }">
<slot
name="editBottomSup"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"
></slot>
<slot name="editBottomSup"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"></slot>
</template>
<template v-slot:operateSup="{ id, formType, info }">
<slot
name="editOperateSup"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"
></slot>
<slot name="editOperateSup"
v-bind:id="id"
v-bind:formType="formType"
v-bind:info="info"></slot>
</template>
</edit-form>
</el-dialog>
@ -370,6 +311,10 @@ export default {
type: String,
default: "",
},
qrCodeExportUrl: {
type: String,
default: "",
},
importUrl: {
type: String,
default: "",
@ -438,7 +383,7 @@ export default {
},
},
data() {
data () {
return {
tableData: [],
@ -458,7 +403,7 @@ export default {
},
computed: {
maxTableHeight() {
maxTableHeight () {
const { ref_search_height } = this;
return this.$store.state.inIframe
? this.clientHeight - ref_search_height - 265 + this.iframeHeight
@ -469,7 +414,7 @@ export default {
watch: {},
async mounted() {
async mounted () {
console.log(this.$store.state);
this.user = this.$store.state.user;
@ -483,24 +428,24 @@ export default {
this.computeSearchHeight();
},
activated() {
activated () {
console.log("-------------activated");
this.$refs["ref_table"].doLayout();
},
methods: {
handleSelectionChange(val) {
handleSelectionChange (val) {
console.log(val);
this.multipleSelection = val;
},
computeSearchHeight() {
computeSearchHeight () {
this.ref_search_height = this.$refs["ref_search"].clientHeight;
console.log(this.$refs["ref_search"]);
console.log(this.ref_search_height);
},
iniSearchData() {
iniSearchData () {
const { searchParams } = this;
searchParams.forEach((item, index) => {
if (item.type == "select" || item.type == "cascader") {
@ -516,7 +461,7 @@ export default {
});
},
async getFmOptions(index, url, params, cookFn) {
async getFmOptions (index, url, params, cookFn) {
const { data, code, msg } = await requestPost(url, {
...params,
});
@ -529,19 +474,19 @@ export default {
}
},
handleChangeCascader(vals, item) {
handleChangeCascader (vals, item) {
if (typeof item.handleChangeFn == "function") {
item.handleChangeFn(vals, item);
}
},
handleSearch(val) {
handleSearch (val) {
this.pageNo = 1;
this.getTableData();
},
beforeExcelUpload(file) {
beforeExcelUpload (file) {
console.log("file", file);
const isType = file.type === "application/vnd.ms-excel";
const isTypeComputer =
@ -559,7 +504,7 @@ export default {
return fileType && isLt1M;
},
async uploadHttpRequest(file) {
async uploadHttpRequest (file) {
let { importUrl: url } = this;
if (!url) return;
@ -588,7 +533,7 @@ export default {
});
},
async handleExportModule() {
async handleExportModule () {
let { mubanUrl: url } = this;
if (!url) return;
@ -625,7 +570,7 @@ export default {
});
},
async handleExport() {
async handleExport () {
const { exportUrl: url } = this;
if (!url) return;
@ -662,14 +607,51 @@ export default {
return this.$message.error("网络错误");
});
},
async handleExportQrcode () {
const { qrCodeExportUrl: url } = this;
if (!url) return;
const { pageSize, pageNo } = this;
axios({
url: window.SITE_CONFIG["apiURL"] + url,
method: "post",
data: {
pageSize,
pageNo,
...this.computeFmData(),
},
responseType: "blob",
})
.then((res) => {
let fileName = window.decodeURI(
res.headers["content-disposition"].split(";")[1].split("=")[1]
);
console.log("filename", fileName);
let blob = new Blob([res.data], { type: "application/vnd.ms-excel" });
var url = window.URL.createObjectURL(blob);
var aLink = document.createElement("a");
aLink.style.display = "none";
aLink.href = url;
aLink.setAttribute("download", fileName);
document.body.appendChild(aLink);
aLink.click();
document.body.removeChild(aLink); //
window.URL.revokeObjectURL(url); //blob
})
.catch((err) => {
console.log("获取导出情失败", err);
return this.$message.error("网络错误");
});
},
handleAdd() {
handleAdd () {
this.formType = "add";
this.formTitle = "新增";
this.formShow = true;
},
handleWatch(row) {
handleWatch (row) {
const { idName } = this;
this.formType = "watch";
this.formId = row[idName];
@ -677,7 +659,7 @@ export default {
this.formShow = true;
},
handleEdit(row) {
handleEdit (row) {
const { idName } = this;
this.formType = "edit";
this.formId = row[idName];
@ -685,17 +667,17 @@ export default {
this.formShow = true;
},
handleClose() {
handleClose () {
this.formShow = false;
this.getTableData();
},
handleEditSuccess() {
handleEditSuccess () {
this.handleClose();
// this.getTableData();
},
async handleDeleteMultiple() {
async handleDeleteMultiple () {
let { delMultipleUrl: url } = this;
if (!url) return;
@ -713,7 +695,7 @@ export default {
}
},
async handleDelete(rowData, rowIndex) {
async handleDelete (rowData, rowIndex) {
console.log(rowData, rowIndex);
let { delUrl: url } = this;
if (!url) return;
@ -741,7 +723,7 @@ export default {
}
},
computeFmData() {
computeFmData () {
let fmData = {};
this.searchParams.forEach((item) => {
fmData[item.keyName] = item.value;
@ -754,11 +736,11 @@ export default {
return fmData;
},
refresh() {
refresh () {
this.getTableData();
},
async getTableData() {
async getTableData () {
const { tableUrl: url } = this;
if (!url) return;
@ -777,17 +759,17 @@ export default {
}
},
handleSizeChange(val) {
handleSizeChange (val) {
this.pageSize = val;
window.localStorage.setItem("pageSize", val);
this.getTableData();
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.getTableData();
},
resetSearch() {
resetSearch () {
console.log("----------------resetSearch", this.searchParams);
this.searchParams.forEach((item) => {
if (typeof item.value == "string") {

138
src/views/modules/shequzhili/tuceng/anquan/xuncha/index.vue

@ -1,33 +1,30 @@
<template>
<div>
<base-page
:searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:infoUrl="infoUrl"
:editAuth="editAuth"
:delAuth="delAuth"
:exportUrl="exportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
:editElseRules="editElseRules"
:editFixedParams="editFixedParams"
:editParamsDiv="5"
:editBtnName="(item) => (!item.latitude ? '待完善' : '修改')"
:formBtnFixed="false"
idName="enterpriseId"
>
<base-page :searchParams="searchParams"
:tableParams="tableParams"
:tableUrl="tableUrl"
:addUrl="addUrl"
:editUrl="editUrl"
:delUrl="delUrl"
:infoUrl="infoUrl"
:editAuth="editAuth"
:delAuth="delAuth"
:exportUrl="exportUrl"
:qrCodeExportUrl="qrCodeExportUrl"
:importUrl="importUrl"
:mubanUrl="mubanUrl"
:editParams="editParams"
:editElseRules="editElseRules"
:editFixedParams="editFixedParams"
:editParamsDiv="5"
:editBtnName="(item) => (!item.latitude ? '待完善' : '修改')"
:formBtnFixed="false"
idName="enterpriseId">
<template v-slot:editBottomSup="{ id, formType, info }">
<record
v-if="formType != 'add' && id"
:formType="formType"
:enterpriseId="id"
:enterpriseInfo="info"
></record>
<record v-if="formType != 'add' && id"
:formType="formType"
:enterpriseId="id"
:enterpriseInfo="info"></record>
</template>
</base-page>
</div>
@ -41,7 +38,7 @@ export default {
components: { basePage, record },
props: {},
data() {
data () {
return {
searchParams: [
{ field: "场所名称", keyName: "placeOrgName", type: "input" },
@ -57,6 +54,24 @@ export default {
},
optionList: [],
},
{
field: "场所类别",
keyName: "placeCategory",
type: "select",
optionUrl: "",
optionUrlParams: {},
optionList: [
{
value: '0',
label: '九小场所'
},
{
value: '1',
label: '企事业单位'
}
],
},
{
field: "场所类型",
keyName: "placeType",
@ -99,6 +114,7 @@ export default {
{ field: "序号", keyName: "", type: "no" },
{ field: "场所名称", keyName: "placeOrgName", type: "text" },
{ field: "场所地址", keyName: "address", type: "text" },
{ field: "场所类别", keyName: "placeCategoryName", type: "text" },
{ field: "场所类型", keyName: "placeTypeName", type: "text" },
{ field: "规模", keyName: "scaleName", type: "text" },
{ field: "负责人", keyName: "personInCharge", type: "text" },
@ -110,19 +126,41 @@ export default {
mubanUrl: "/gov/org/enterprise/download-tem",
importUrl: "/gov/org/enterprise/import",
exportUrl: "/gov/org/enterprise/export",
qrCodeExportUrl: "/gov/org/enterprise/qrCodeExport",
addUrl: "/gov/org/enterprise/addOrUpdate",
editUrl: "/gov/org/enterprise/addOrUpdate",
infoUrl: "/gov/org/enterprise/detail/",
delUrl: "/gov/org/enterprise/delete/",
editAuth(item) {
editAuth (item) {
return item.agencyId == this.$store.state.user.agencyId;
},
delAuth(item) {
delAuth (item) {
return item.agencyId == this.$store.state.user.agencyId;
},
editParams: [
{
field: "场所类别",
keyName: "placeCategory",
type: "select",
optionUrl: "",
optionUrlParams: {
// dictType: "ic_service_type",
},
optionList: [{
value: '0',
label: '九小场所'
},
{
value: '1',
label: '企事业单位'
}],
editDisabled: true,
rules: [
{ required: true, message: "场所类别不能为空", trigger: "blur" },
],
},
{
field: "场所类型",
keyName: "placeType",
@ -166,16 +204,30 @@ export default {
},
],
},
// {
// field: "",
// keyName: "scale",
// type: "select",
// optionUrl: "/sys/dict/data/dictlist",
// optionUrlParams: {
// dictType: "scale",
// },
// optionList: [],
// editDisabled: false,
// rules: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
// },
{
field: "规模",
keyName: "scale",
type: "select",
optionUrl: "/sys/dict/data/dictlist",
optionUrlParams: {
dictType: "scale",
},
optionList: [],
editDisabled: false,
keyName: "scaleTotal",
type: "input",
attach: '人',
rules: [
{
required: true,
@ -241,7 +293,15 @@ export default {
computed: {},
watch: {},
async mounted() {},
async mounted () {
//45687aa479955f9d06204d415238f7cc
// 3fdd0380deff5b30f45376cdf995d1c1
// 1535072605621841922
let customerId = localStorage.getItem("customerId");
this.qrCodeExportUrl = ''
if (customerId === '45687aa479955f9d06204d415238f7cc' || customerId === '3fdd0380deff5b30f45376cdf995d1c1' || customerId === '1535072605621841922')
this.qrCodeExportUrl = '/gov/org/enterprise/qrCodeExport'
},
methods: {},
};

501
src/views/pages/staffRegister.vue

@ -0,0 +1,501 @@
<template>
<div class="bg-caiji">
<div class="title">
员工登记
</div>
<div class="main">
<div class="div_tab">
<div :class="['div_option','option_left',{'option_select':selectTab==='1'}]"
@click="handleChangeTab('1')"> 员工登记</div>
<div :class="['div_option','option_right',{'option_select':selectTab==='2'}]"
@click="handleChangeTab('2')">受众群体登记</div>
</div>
<div v-if="selectTab==='1'"
class="content">
<mt-cell title="*企业名称">
<span style="margin-right:20px">{{placeOrgName}}</span>
</mt-cell>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'*姓名'"
placeholder="请输入"
v-model="formData.name"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'*手机号'"
placeholder="请输入"
type="tel"
v-model="formData.mobile"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
type="url"
:disableClear="true"
:label="'*证件号'"
placeholder="请输入"
v-model="formData.idCard"></mt-field>
<div class="line"></div>
<div @click="handelSel('ymjzCount')">
<mt-cell :title="'*疫苗接种次数'"
is-link>
<span class="picker_content"
v-if="formData.ymjzCount">{{formData.ymjzCountName}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<div @click="handelSelData()">
<mt-cell :title="'*最近一次核酸检测时间'"
is-link>
<span class="picker_content"
v-if="formData.latestNatTime">{{formData.latestNatTime}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
</div>
<div v-if="selectTab==='2'"
class="content">
<mt-cell title="*企业名称">
<span style="margin-right:20px">{{placeOrgName}}</span>
</mt-cell>
<div class="line"></div>
<div @click="handelSelData()">
<mt-cell :title="'*核酸检测时间'"
is-link>
<span class="picker_content"
v-if="formData2.natTime">{{formData2.natTime}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'*受众人数'"
placeholder="请输入"
type="number"
v-model="formData2.szTotal"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'*核酸检测人数'"
placeholder="请输入"
type="number"
v-model="formData2.hsjcTotal"></mt-field>
<div class="line"></div>
</div>
</div>
<div class="div-btn">
<mt-button @click="handleSubmit"
type="primary"
class="btn"
:disabled="btnDisabled"
size="small">提交</mt-button>
</div>
<mt-popup v-model="popupVisible"
popup-transition="popup-fade"
closeOnClickModal="true"
position="bottom">
<mt-picker :slots="popupSlots"
class="div_picker"
value-key="label"
@change="onPickerChange"
showToolbar>
<div class="picker-toolbar-title">
<div class="usi-btn-cancel"
@click="popupVisible = !popupVisible">取消</div>
<div class="">请选择</div>
<div class="usi-btn-sure"
@click="popupOk()">确定</div>
</div>
</mt-picker>
</mt-popup>
<mt-datetime-picker v-model="pickerVisible"
ref="pickerData"
type="date"
class="picker_data"
:startDate="startDate"
year-format="{value} 年"
month-format="{value} 月"
date-format="{value} 日"
@confirm="handleConfirm">
</mt-datetime-picker>
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { Toast } from "mint-ui";
import { MessageBox } from 'mint-ui';
import { Loading } from 'element-ui' // Loading
import { messages } from '@/i18n'
let loading //
export default {
data () {
return {
selectTab: '1',
pickerVisible: new Date(),
startDate: new Date(2021, 0, 1),
//
enterpriseId: '',//Id
customerId: '',//Id
placeOrgName: '',//
formData: {
enterpriseId: '',//ID
customerId: '',//id
name: '',
idCard: '',
mobile: '',
ymjzCount: null,
ymjzCountName: '',
latestNatTime: '',
},
formData2: {
enterpriseId: '',//ID
customerId: '',//id
natTime: '',//
szTotal: '',//
hsjcTotal: '',//ID
},
btnDisabled: false,
popupVisible: false,
shequName: '',//
selType: 'community',//communitybuildingunitroom
pickerData: [],
selObj: {},
showMessagsBox: false,//
detNumList: [],//list
popupSlots: [//
{
values: []
}
],
}
},
components: {},
computed: {
},
created () {
console.log(this.$route)
this.customerId = this.$route.query.customerId
this.enterpriseId = this.$route.query.enterpriseId
this.placeOrgName = this.$route.query.placeOrgName
document.title = this.placeOrgName + '员工登记'
},
mounted () {
let envShow = process.env.VUE_APP_NODE_ENV
console.log('环境', envShow)
this.formData.customerId = this.customerId
this.formData.enterpriseId = this.enterpriseId
this.formData2.customerId = this.customerId
this.formData2.enterpriseId = this.enterpriseId
this.detNumList = []
for (let i = 0; i < 4; i++) {
let obj = {
value: i + '',
label: i + '次',
}
this.detNumList.push(obj)
}
},
methods: {
handleChangeTab (val) {
this.selectTab = val
},
handelSelData () {
this.$refs.pickerData.open(); //
// this.$refs.pickerData.close() ; //
},
handleConfirm (val) {
let time = new Date(val);
let year = time.getFullYear()
let month = time.getMonth() + 1
let day = time.getDate()
if (this.selectTab === '1') {
this.formData.latestNatTime = year + '-' + month + '-' + day
} else if (this.selectTab === '2') {
this.formData2.natTime = year + '-' + month + '-' + day
}
},
handelSel (selType) {
this.selType = selType
if (selType === 'ymjzCount') {
this.pickerData = this.detNumList
}
let obj = {
values: this.pickerData
}
this.popupSlots = []
this.popupSlots.push(obj)
this.popupVisible = !this.popupVisible
},
async handleSubmit () {
let message = this.validataFormData()
if (message) {
if (this.showMessagsBox) {
MessageBox.confirm(message).then(action => {
this.submit()
});
} else {
Toast({
message: message,
duration: 3000
});
}
} else {
this.submit()
}
},
async submit () {
let url = "/gov/org/icEmployeeRegister/add"
let params = {}
if (this.selectTab === '1') {
url = '/gov/org/icEmployeeRegister/add'
params = this.formData
} else if (this.selectTab === '2') {
url = '/gov/org/icGroupPeopleRegister/add'
params = this.formData2
}
console.log(params)
// return false
this.btnDisabled = true
this.startLoading()
const { data, code, msg } = await requestPost(url, params)
this.endLoading()
this.btnDisabled = false
if (code === 0) {
this.$router.replace({
name: 'staffRegisterSuccess',
query: {
selectTab: this.selectTab,
placeOrgName: this.placeOrgName,
formData: this.selectTab === '1' ? this.formData : this.formData2
}
})
// Toast({
// message: '',
// duration: 3000
// });
} else {
Toast({
message: msg,
duration: 3000
});
}
},
//
validataFormData () {
let aletMessage = ''
this.showMessagsBox = false
if (this.selectTab === '1') {//
if (!this.formData.name) {
aletMessage = '请填写姓名'
return aletMessage
}
if (!this.formData.mobile) {
aletMessage = '请填写手机号'
return aletMessage
}
if (!this.formData.idCard) {//
aletMessage = '请填写证件号'
return aletMessage
} else {
let reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
if (escape(this.formData.idCard).indexOf("%u") > 0 || escape(this.formData.idCard).indexOf("%u") == 0) {
aletMessage = '请输入正确的身份证号或者护照号'
return aletMessage
}
if (this.formData.idCard.length > 18) {
aletMessage = '请输入正确的身份证号或者护照号'
return aletMessage
}
}
if (!this.formData.ymjzCount) {//
aletMessage = '请选择疫苗接种次数'
return aletMessage
}
if (!this.formData.latestNatTime) {//
aletMessage = '请选择最近一次核酸检测时间'
return aletMessage
}
} else if (this.selectTab === '2') {//
if (!this.formData2.natTime) {
aletMessage = '请选择核酸检测时间'
return aletMessage
}
if (!this.formData2.szTotal) {
aletMessage = '请填写受众人数'
return aletMessage
}
if (!this.formData2.hsjcTotal) {//
aletMessage = '核酸检测人数'
return aletMessage
}
}
},
popupOk () {
if (this.selType === 'ymjzCount') {
this.formData.ymjzCount = this.selObj.value
this.formData.ymjzCountName = this.selObj.label
}
this.popupVisible = false
},
onPickerChange (picker, values) {
this.selObj = values[0]
},
//
startLoading () {
loading = Loading.service({
lock: true, //
text: '正在加载……', //
background: 'rgba(0,0,0,.7)' //
})
},
//
endLoading () {
// clearTimeout(timer);
if (loading) {
loading.close()
}
}
},
beforeDestroy () {
// document.title = messages[val].brand.lg
},
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/pages/staffRegister.scss";
/deep/ .mint-cell-wrapper {
padding: 0 5px 0 0;
}
.my-field /deep/ .mint-field-core {
text-align: right;
margin-right: 20px;
}
.my-field /deep/ .mint-cell-title {
width: 110px;
}
/deep/ .mint-popup-bottom {
height: 300px;
width: 100vw;
}
// /deep/ .picker {
// height: 300px;
// }
/deep/ .picker-items {
height: 250px;
width: 100vw;
}
/deep/ .picker-slot-center {
width: 100vw;
}
// /deep/ .picker-center-highlight {
// top: 35%;
// }
.div_picker {
/deep/ .picker-center-highlight {
top: 35%;
}
}
.picker-toolbar-title {
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
background-color: #eee;
height: 44px;
line-height: 44px;
font-size: 16px;
.usi-btn-cancel,
.usi-btn-sure {
color: #26a2ff;
font-size: 16px;
}
}
</style>

147
src/views/pages/staffRegisterSuccess.vue

@ -0,0 +1,147 @@
<template>
<div class="bg-caiji-success">
<div class="title">
<img src="@/assets/img/logo.png">
<div class="title_name">员工信息登记</div>
</div>
<div class="div_tip">
<div>提交成功</div>
<div>请截图保存方便核验人员查看</div>
</div>
<div v-if="selectTab==='1'"
class="div_content marginT10">
<div class="content_long">
<div class="content_title">企业名称</div>
<div>{{placeOrgName}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">姓名</div>
<div>{{formData.name}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">手机号</div>
<div>{{formData.mobile}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">证件号</div>
<div>{{formData.idCard}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">疫苗接种次数</div>
<div>{{formData.ymjzCountName}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">核酸检测时间</div>
<div>{{formData.latestNatTime}}</div>
</div>
</div>
<div v-if="selectTab==='2'"
class="div_content marginT10">
<div class="content_long">
<div class="content_title">企业名称</div>
<div>{{placeOrgName}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">核酸检测时间</div>
<div>{{formData.natTime}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">受众人数</div>
<div>{{formData.szTotal}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">核酸检测人数</div>
<div>{{formData.hsjcTotal}}</div>
</div>
</div>
<!-- <div class="main">
<div class="icon-success">
<i class="el-icon-circle-check "></i>
</div>
<div class="success-content"> 提交成功</div>
</div> -->
</div>
</template>
<script>
import { requestPost } from "@/js/dai/request";
import { Toast } from "mint-ui";
import { MessageBox } from 'mint-ui';
let loading //
export default {
data () {
return {
selectTab: '',
placeOrgName: '',
formData: {},
}
},
components: {},
computed: {
},
created () { },
mounted () {
let query = this.$route.query
this.selectTab = query.selectTab
this.placeOrgName = query.placeOrgName
this.formData = query.formData
// this.formData = {
// shequName: '',
// address: "113123123113123123",
// buildId: "1494482424728395778",
// buildName: "",
// customerId: "45687aa479955f9d06204d415238f7cc",
// homeId: "other",
// homeName: "3123123",
// houseHolderName: "",
// houseType: "1",
// memberList: [
// {
// customerId: "45687aa479955f9d06204d415238f7cc",
// domicilePlace: "23123",
// heSuanCount: "2",
// idNum: "312312",
// mobile: "15111111111",
// name: "",
// },
// {
// customerId: "45687aa479955f9d06204d415238f7cc",
// domicilePlace: "123123",
// heSuanCount: null,
// idNum: "",
// mobile: "3123123123",
// name: "",
// }
// ]
// }
// console.log(this.formData)
},
methods: {
}
}
</script>
<style lang="scss" scoped >
@import "@/assets/scss/pages/staffRegister.scss";
</style>
Loading…
Cancel
Save