Browse Source

去掉没用的文件

V1.0
dai 3 years ago
parent
commit
4be87f00d0
  1. 36
      src/assets/scss/main-shuju.scss
  2. 36
      src/router/index.js
  3. 151
      src/views/main-shuju/main-navbar.vue
  4. 14
      src/views/modules/HomeWork.vue
  5. 36
      src/views/modules/home.vue
  6. 947
      src/views/pages/caiji.vue
  7. 125
      src/views/pages/caijisuccess.vue
  8. 509
      src/views/pages/staffRegister.vue
  9. 147
      src/views/pages/staffRegisterSuccess.vue

36
src/assets/scss/main-shuju.scss

@ -110,4 +110,40 @@
}
}
}
.msg {
position: absolute;
display: flex;
align-items: center;
top: 40px;
right: 40px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 22px;
.weather {
display: flex;
align-items: center;
img {
position: relative;
width: 16px;
}
div {
margin-left: 3px;
}
}
.date {
margin-left: 24px;
display: flex;
align-items: center;
.date-div {
margin: 0 10px;
height: 22px;
width: 1px;
background-color: #fff;
opacity: 0.8;
}
}
}
}

36
src/router/index.js

@ -25,42 +25,6 @@ export const pageRoutes = [
path: "/main/home",
},
},
{
path: "/caiji/:id",
props: true,
name: "caiji",
component: () => import("@/views/pages/caiji"),
meta: {
title: "居民信息填报",
},
},
{
path: "/caijisuccess",
props: true,
name: "caijisuccess",
component: () => import("@/views/pages/caijisuccess"),
meta: {
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: "员工登记",
},
},
{
path: "/404",
component: () => import("@/views/pages/404"),

151
src/views/main-shuju/main-navbar.vue

@ -3,22 +3,49 @@
<div class="title">{{ customerName }}综合服务平台数据看板</div>
<div class="nav-list z-left">
<div class="nav-item" @click="toPage('/')">
<span>人房总览</span>
<span>人房统计</span>
</div>
<div class="nav-item z-on" @click="toPage('/')">
<span>房总览</span>
<span>口分析</span>
</div>
<div class="nav-item" @click="toPage('/')">
<span>房总览</span>
<span>口变化</span>
</div>
<div class="nav-item" @click="toPage('/')">
<span>房总览</span>
<span>口预警</span>
</div>
</div>
<div class="nav-list z-right">
<div class="nav-item z-on" @click="toPage('/')">
<span>人房总览</span>
<div class="nav-item" @click="toPage('/')">
<span>回首页</span>
</div>
</div>
<div class="msg">
<div class="weather">
<img
v-if="weather.weather == '雨'"
src="~@/assets/images/shuju/main/corner-left-top.png"
/>
<img
v-else-if="weather.weather == '雪'"
src="~@/assets/images/shuju/main/corner-left-top.png"
/>
<img
v-else-if="weather.weather == '多云'"
src="~@/assets/images/shuju/main/corner-left-top.png"
/>
<img v-else src="~@/assets/images/shuju/main/corner-left-top.png" />
<div>{{ weather.temperature }}</div>
<div>{{ weather.weather }}</div>
</div>
<div class="date">
<div class="date-time">{{ showTime }}</div>
<div class="date-div"></div>
<div class="date-week">{{ showWeek }}</div>
</div>
</div>
@ -158,10 +185,11 @@
<script>
import { messages } from "@/i18n";
import { mapGetters } from "vuex";
import screenfull from "screenfull";
import UpdatePasswordWork from "@/views/main-navbar-update-password-work";
import { clearLoginInfo } from "@/utils";
import dateFormat from "dai-js/tools/dateFormat";
import nextTick from "dai-js/tools/nextTick";
import { requestGet } from "@/js/dai/request";
export default {
inject: ["refresh"],
data() {
@ -170,20 +198,20 @@ export default {
i18nMessages: messages,
updatePassowrdVisible: false,
customerName: "",
showWeek: "",
showTime: "",
weather: {
weather: "晴",
temperature: "--",
},
};
},
components: {
UpdatePasswordWork,
},
created() {
// let platformToken = localStorage.getItem("showHeader") || "";
// if (
// typeof platformToken !== "undefined" &&
// platformToken !== "undefined" &&
// platformToken !== ""
// ) {
// this.showHeader = false;
// }
this.changeCustomerName();
const customerId = localStorage.getItem("customerId");
let siteconfigElement = window.SITE_CONFIG["menuShujuList"];
@ -202,9 +230,33 @@ export default {
}
}
this.$store.state.mainShuju.menuList = siteconfigElement;
const pollTime = async () => {
this.computeCurrentTime();
await nextTick(1000);
pollTime();
};
pollTime();
this.getWeatherData();
},
computed: {},
methods: {
computeCurrentTime() {
let now = new Date();
let wk = now.getDay();
this.showWeek = [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
][wk];
this.showTime = dateFormat(now, "yyyy-MM-dd hh:mm:ss");
},
toPage(path) {
this.$router.push({ path });
},
@ -222,63 +274,24 @@ export default {
this.$store.state.mainShuju.activeName = menuId;
}
},
changeCustomerName() {
this.customerName =
localStorage.getItem("customerName") || "数据分析可视化平台";
},
//
fullscreenHandle() {
if (!screenfull.enabled) {
return this.$message({
message: this.$t("fullscreen.prompt"),
type: "warning",
duration: 500,
});
}
screenfull.toggle();
},
//
updatePasswordHandle() {
this.updatePassowrdVisible = true;
this.$nextTick(() => {
this.$refs.updatePassowrd.init();
});
},
// 退
logoutHandle() {
this.$confirm(
this.$t("prompt.info", { handle: this.$t("logout") }),
this.$t("prompt.title"),
{
confirmButtonText: this.$t("confirm"),
cancelButtonText: this.$t("cancel"),
type: "warning",
}
)
.then(() => {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name === "home2"
);
this.$http
.post("/auth/login/logout")
.then(({ data: res }) => {
if (res.code !== 0) {
// 退
if (res.code !== 10007) {
this.$message.error(res.msg);
}
}
clearLoginInfo();
this.$router.push({ name: "login" });
})
.catch(() => {});
})
.catch(() => {});
async getWeatherData() {
const url =
"https://restapi.amap.com/v3/weather/weatherInfo?key=8c87678f34ce9e8e23245c5161991c4e";
const { data, code, msg } = await requestGet(url, {
city: this.$store.state.user.areaCode,
});
if (code === 0) {
console.log("---------------weather", data);
this.weather = data.lives[0];
} else {
// return this.$message.error("");
}
},
},
};

14
src/views/modules/HomeWork.vue

@ -1,14 +0,0 @@
<template>
<div>
<customer-info></customer-info>
</div>
</template>
<script>
import CustomerInfo from './customer/manage/CustomerInfo'
export default {
components: {
CustomerInfo
}
}
</script>

36
src/views/modules/home.vue

@ -1,36 +0,0 @@
<template>
<div>
<customer-info @changeCustomerName="changeCustomerName"
v-if="userType==='work'"></customer-info>
</div>
</template>
<script>
import CustomerInfo from './customer/manage/CustomerInfo'
export default {
data () {
return {
// i18nMessages: messages,
updatePassowrdVisible: false,
customerName: localStorage.getItem('customerName'),
userType: localStorage.getItem('userType')
}
},
components: {
CustomerInfo
},
mounted () {
//
// tabs,
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home')
},
methods: {
changeCustomerName (customerName) {
this.$emit('changeCustomerName', customerName)
},
}
}
</script>

947
src/views/pages/caiji.vue

@ -1,947 +0,0 @@
<template>
<div class="bg-caiji">
<div class="title">
居民信息填报
</div>
<div class="main">
<div class="content">
<mt-cell title="所属社区">
<span style="margin-right:20px">{{shequName}}</span>
</mt-cell>
<div class="line"></div>
<div v-if="formData.origin === 'internal'">
<div @click="handelSel('community')">
<mt-cell title="小区"
is-link>
<span class="picker_content"
v-if="selVillage">{{selVillage.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<div @click="handelSel('building')">
<mt-cell title="楼栋"
is-link>
<span class="picker_content"
v-if="selBuild">{{selBuild.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<div @click="handelSel('unit')">
<mt-cell title="单元"
is-link>
<span class="picker_content"
v-if="selUnit">{{selUnit.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<mt-field v-if="selUnit && selUnit.value==='other'"
class="my-field"
:disableClear="true"
label="单元号"
placeholder="请输入"
v-model="unitContent"></mt-field>
<div class="line"></div>
<div v-if="!selUnit || selUnit.value!=='other'"
@click="handelSel('room')">
<mt-cell title="房屋"
is-link>
<span class="picker_content"
v-if="selHome">{{selHome.label}}</span>
<span v-else>请选择</span>
</mt-cell>
<div class="line"></div>
</div>
<mt-field v-if="(selUnit&&selUnit.value==='other')||(selHome&&selHome.value==='other')"
class="my-field"
:disableClear="true"
label="房屋"
placeholder="请输入"
v-model="homeContent"></mt-field>
</div>
<div v-if="formData.origin === 'external'">
<mt-field class="my-field"
:disableClear="true"
label="详细地址"
placeholder="xx小区(号)x号楼x单元x户"
v-model="formData.address"></mt-field>
<div class="line"></div>
</div>
</div>
<div class="content content1">
<div @click="handelSel('roomType')">
<mt-cell title="房屋类型"
is-link>
<span class="picker_content"
v-if="selHomeType">{{selHomeType.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<mt-field class="my-field"
label="户主姓名"
:disableClear="true"
placeholder="请输入"
v-model="formData.houseHolderName"></mt-field>
<div class="line"></div>
<div @click="handelSel('totalResi')">
<mt-cell :title="'居住成员人数'"
is-link>
<span class="picker_content"
v-if="selTotalResi">{{selTotalResi.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<!-- <mt-field class="my-field"
label="居住成员人数"
:disableClear="true"
placeholder="请输入"
type="number"
@blur.native.capture="bluraa"
v-model="formData.totalResi"></mt-field>
<div class="line"></div> -->
</div>
<div v-for="(item,index) in memberList"
:key="index">
<div class="content content1">
<div class="member_title">{{'成员'+(index+1)}}</div>
<mt-field class="my-field"
:disableClear="true"
:label="'姓名'"
placeholder="请输入"
v-model="item.name"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'身份证'"
placeholder="请输入"
v-model="item.idNum"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'手机号'"
placeholder="请输入"
type="tel"
v-model="item.mobile"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'户籍所在地'"
placeholder="请输入"
v-model="item.domicilePlace"></mt-field>
<div class="line"></div>
<mt-field class="my-field"
:disableClear="true"
:label="'学校或单位'"
placeholder="请输入"
v-model="item.workPlace"></mt-field>
<div class="line"></div>
<div @click="handelSel('detNum',index)">
<mt-cell :title="'参加核酸检测次数'"
is-link>
<span class="picker_content"
v-if="item.selDetNum.value">{{item.selDetNum.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
<div @click="handelSel('detCondition',index)">
<mt-cell :title="'新冠疫苗接种情况'"
is-link>
<span class="picker_content"
v-if="item.selDetCondition.value">{{item.selDetCondition.label}}</span>
<span v-else>请选择</span>
</mt-cell>
</div>
<div class="line"></div>
</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"
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>
</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 {
btnDisabled: false,
popupVisible: false,
//
shequId: '',//id 6e511da6816e53af4cda952365a26eb9 1202807601961984002
shequName: '',//
customerId: '',//id 45687aa479955f9d06204d415238f7cc
communityList: [],
buildingList: [],
unitList: [],
roomList: [],
selType: 'community',//communitybuildingunitroom
pickerData: [],
selObj: {},
selVillage: null,
selBuild: null,
selUnit: null,
selHome: null,
selHomeType: null,
selTotalResi: {
label: '4人',
value: 4
},
unitContent: '',
homeContent: '',////
formData: {
origin: '',//internal;external
villageId: '',//id
buildId: '',//id
unitId: '',//id
homeId: '',//id
address: '',//绿10101
houseType: '',//10
houseHolderName: '',//
totalResi: 4,//
customerId: '',//customerId
villageName: '',//
buildName: '',//
unitName: '',//
homeName: '',//
},
showMessagsBox: false,//
selMemberIndex: null,
memberList: [
{
name: '',
mobile: '',
domicilePlace: '',
workPlace: '',
idNum: '',
customerId: '',
heSuanCount: null,
ymjz: '',
selDetNum: {},
selDetCondition: {}
},
],
roomTypeList: [
{
value: '1',
label: '自有'
},
{
value: '0',
label: '租住'
},
],
totalResiList: [],
detNumList: [],//list
detConditionList: [//list
{
// label: '',
label: '已全程接种',
value: '1'
},
{
label: '未全程接种',
value: '2'
},
{
label: '未接种',
value: '0'
},
],
popupSlots: [//
{
values: []
}
],
}
},
components: {},
computed: {
},
created () {
console.log(this.$route)
this.shequId = this.$route.params.id
this.customerId = this.$route.query.customerId
this.shequName = this.$route.query.name
document.title = this.shequName + '信息管理平台'
},
mounted () {
let envShow = process.env.VUE_APP_NODE_ENV
console.log('环境', envShow)
let internalShequId = ['1202807601961984002', '6e511da6816e53af4cda952365a26eb9', 'b058eb82d65d922fec9dc84f0348fc6a', '630c3c2dd1cd7a4d198c8558bce88324']
// let internalShequId = ['1202807601961984002',]
// if (envShow === 'dev' || envShow === 'prod:sit') { //
// internalShequId = '6e511da6816e53af4cda952365a26eb9'
// } else if (envShow === 'prod:uat') { //
// internalShequId = '6e511da6816e53af4cda952365a26eb9'
// } else if (envShow === 'prod') { //
// b058eb82d65d922fec9dc84f0348fc6a
// 亿亿630c3c2dd1cd7a4d198c8558bce88324
// internalShequId = '1202807601961984002'
// } else if (envShow === 'shibei_prod') { //
// internalShequId = '1202807601961984002'
// }
this.formData.customerId = this.customerId
if (internalShequId.indexOf(this.shequId) > -1) {
this.formData.origin = 'internal'
} else {
this.formData.origin = 'external'
}
this.loadVillage()
this.detNumList = []
for (let i = 0; i < 11; i++) {
let obj = {
value: i + '',
label: i + '次',
}
this.detNumList.push(obj)
}
for (let i = 1; i < 9; i++) {
let obj = {
value: i,
label: i + '人',
}
this.totalResiList.push(obj)
}
this.bluraa()
},
methods: {
//id
async loadVillage () {
const url = "/gov/org/icneighborhood/open/list"
let params = {
agencyId: this.shequId,
isPage: false
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
data.list.forEach(element => {
element.label = element.neighborHoodName
element.value = element.id
});
this.communityList = data.list
let obj = {
values: this.communityList
}
this.popupSlots = []
this.popupSlots.push(obj)
} else {
Toast({
message: msg,
duration: 3000
});
}
},
//
async loadBuild () {
const url = "/gov/org/icbuilding/buildingoption"
let params = {
neighborHoodId: this.selVillage.value
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// data.forEach(element => {
// element.label = element.buildingName
// element.value = element.buildingId
// });
this.buildingList = data
let obj = {
values: this.buildingList
}
this.popupSlots = []
this.popupSlots.push(obj)
} else {
Toast({
message: msg,
duration: 3000
});
}
},
//
async loadUnit () {
const url = '/gov/org/icbuildingunit/unitoption'
let params = {
buildingId: this.selBuild.value
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// data.forEach(element => {
// element.label = element.unitName
// element.value = element.id
// });
this.unitList = data
this.unitList.push({
label: '其他',
value: 'other'
})
let obj = {
values: this.unitList
}
this.popupSlots = []
this.popupSlots.push(obj)
} else {
Toast({
message: msg,
duration: 3000
});
}
},
//
async loadHome () {
const url = "/gov/org/ichouse/houseoption"
let params = {
buildingId: this.selBuild.value,
unitId: this.selUnit.value
}
const { data, code, msg } = await requestPost(url, params)
if (code === 0) {
// data.forEach(element => {
// element.label = element.unitName
// element.value = element.id
// });
this.roomList = data
this.roomList.push({
label: '其他',
value: 'other'
})
let obj = {
values: this.roomList
}
this.popupSlots = []
this.popupSlots.push(obj)
} else {
Toast({
message: msg,
duration: 3000
});
}
},
handelSel (selType, index) {
this.selType = selType
if (selType === 'community') {
this.pickerData = this.communityList
}
if (selType === 'building') {
if (!this.selVillage) {
Toast({
message: '请先选择小区',
duration: 3000
});
return false
} else {
this.pickerData = this.buildingList
}
}
if (selType === 'unit') {
if (!this.selBuild) {
Toast({
message: '请先选择楼栋',
duration: 3000
});
return false
} else {
this.pickerData = this.unitList
}
}
if (selType === 'room') {
if (!this.selUnit) {
Toast({
message: '请先选择单元',
duration: 3000
});
return false
} else {
this.pickerData = this.roomList
}
}
if (selType === 'totalResi') {
this.pickerData = this.totalResiList
}
if (selType === 'roomType') {
this.pickerData = this.roomTypeList
}
if (selType === 'detNum') {
this.selMemberIndex = index
this.pickerData = this.detNumList
}
if (selType === 'detCondition') {
this.selMemberIndex = index
this.pickerData = this.detConditionList
}
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 () {
if (this.formData.origin === 'internal') {
if (this.selUnit.value === 'other') {
this.formData.homeId = 'other'
this.formData.unitName = this.unitContent
this.formData.homeName = this.homeContent//
} else {
this.unitContent = this.selUnit.label
this.formData.unitName = this.unitContent
if (this.selHome.value === 'other') {
this.formData.homeName = this.homeContent
} else {
this.homeContent = this.selHome.label
this.formData.homeName = this.homeContent
}
}
this.formData.address = this.selVillage.label + this.selBuild.label + this.unitContent + this.homeContent
}
this.formData.houseType = this.selHomeType.value
let memberListTemp = []
this.memberList.forEach(element => {
if (element.name && element.name !== '' && element.idNum && element.idNum !== '') {
element.customerId = this.customerId
if (element.selDetNum && element.selDetNum.value) {
element.heSuanCount = element.selDetNum.value
}
if (element.selDetCondition && element.selDetCondition.value) {
element.ymjz = element.selDetCondition.value
}
memberListTemp.push(element)
}
});
this.formData.memberList = memberListTemp
console.log(this.formData)
this.btnDisabled = true
this.startLoading()
const url = "/epmetuser/icresicollect/save"
const { data, code, msg } = await requestPost(url, this.formData)
this.endLoading()
this.btnDisabled = false
if (code === 0) {
this.formData.shequName = this.shequName
this.$router.replace({
name: 'caijisuccess',
query: {
formData: this.formData
}
})
// Toast({
// message: '',
// duration: 3000
// });
} else {
Toast({
message: msg,
duration: 3000
});
}
},
//
validataFormData () {
let aletMessage = ''
this.showMessagsBox = false
if (this.formData.origin === 'internal') {//
if (!this.selVillage) {
aletMessage = '请选择小区'
return aletMessage
}
if (!this.selBuild) {
aletMessage = '请选择楼栋'
return aletMessage
}
if (!this.selUnit) {//
aletMessage = '请选择单元'
return aletMessage
} else {//
if (this.selUnit.value === 'other') {//
if (!this.unitContent) {
aletMessage = '请填写单元号'
return aletMessage
}
if (!this.homeContent) {//
aletMessage = '请填写房屋'
return aletMessage
}
} else {//
if (!this.selHome) {
aletMessage = '请选择房屋'
return aletMessage
} else if (this.selHome.value === 'other' && !this.homeContent) {
aletMessage = '请填写房屋'
return aletMessage
}
}
}
} else {
if (!this.formData.address) {
aletMessage = '请填写地址'
return aletMessage
}
}
if (!this.selHomeType) {
aletMessage = '请选择房屋类型'
return aletMessage
}
if (!this.formData.houseHolderName) {
aletMessage = '请填写户主姓名'
return aletMessage
}
let member1 = this.memberList[0]
if (!member1.name || !member1.mobile || !member1.domicilePlace || !member1.workPlace || !member1.idNum || !member1.selDetNum.value || !member1.selDetCondition.value) {
aletMessage = '请完整填写用户1信息'
return aletMessage
}
if (this.memberList.length > 1) {
for (let i = 1; i < this.memberList.length; i++) {
let item = this.memberList[i]
if (item.name || item.mobile || item.domicilePlace || item.workPlace || item.idNum || item.selDetNum.value || item.selDetCondition.value) {//
if (!item.name || !item.idNum) {
aletMessage = '请完整填写用户' + (i + 1) + '的姓名和身份证信息'
return aletMessage
}
} else {
aletMessage = '用户' + (i + 1) + '的信息没有填写,是否继续'
this.showMessagsBox = true
return aletMessage
}
}
}
},
popupOk () {
if (this.selType === 'community') {
this.selVillage = this.selObj
this.formData.villageId = this.selObj.value
this.formData.villageName = this.selObj.label
this.selBuild = null
this.selUnit = null
this.selHome = null
this.unitContent = ''
this.homeContent = ''
this.loadBuild()
}
if (this.selType === 'building') {
this.selBuild = this.selObj
this.formData.buildId = this.selObj.value
this.formData.buildName = this.selObj.label
this.selUnit = null
this.selHome = null
this.unitContent = ''
this.homeContent = ''
this.loadUnit()
}
if (this.selType === 'unit') {
this.selUnit = this.selObj
this.formData.unitId = this.selObj.value
this.selHome = null
this.unitContent = ''
this.homeContent = ''
this.loadHome()
}
if (this.selType === 'room') {
this.selHome = this.selObj
this.formData.homeId = this.selObj.value
this.homeContent = ''
}
if (this.selType === 'totalResi') {
this.selTotalResi = this.selObj
this.formData.totalResi = this.selObj.value
this.bluraa()
}
if (this.selType === 'roomType') {
this.selHomeType = this.selObj
}
if (this.selType === 'detNum') {
let change = this.memberList[this.selMemberIndex]
change.selDetNum = this.selObj
this.$set(this.memberList, this.selMemberIndex, change)
}
if (this.selType === 'detCondition') {
let change = this.memberList[this.selMemberIndex]
change.selDetCondition = this.selObj
this.$set(this.memberList, this.selMemberIndex, change)
}
this.popupVisible = false
},
bluraa () {
let objTemp = {
name: '',
mobile: '',
domicilePlace: '',
workPlace: '',
idNum: '',
heSuanCount: null,
ymjz: '',
selDetNum: {},
customerId: '',
selDetCondition: {}
}
if (this.memberList.length > this.formData.totalResi) {//
let differ = this.memberList.length - this.formData.totalResi
this.memberList.splice(this.formData.totalResi, differ)
} else if (this.memberList.length < this.formData.totalResi) {////
let differ = this.formData.totalResi - this.memberList.length
for (let i = 0; i < differ; i++) {
let temp = JSON.parse(JSON.stringify(objTemp))
this.memberList.push(temp)
}
}
console.log(this.memberList)
},
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/caiji.scss";
.my-field /deep/ .mint-field-core {
text-align: right;
margin-right: 20px;
}
/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%;
}
.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>

125
src/views/pages/caijisuccess.vue

@ -1,125 +0,0 @@
<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 class="div_content marginT10">
<div class="content_long">
<div class="content_title">所属社区</div>
<div>{{formData.shequName}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">所属房屋</div>
<div>{{formData.address}}</div>
<!-- <div>所属房屋所属房屋所属房屋所属房屋</div> -->
</div>
<div class="content_long marginT10">
<div class="content_title">房主姓名</div>
<div>{{formData.houseHolderName}}</div>
</div>
<div v-for="(item,index) in formData.memberList"
:key="index">
<div class="content_long marginT10">
<div class="content_title">成员{{index+1}}</div>
<div>{{item.name}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">身份证号</div>
<div>{{item.idNum}}</div>
</div>
<div class="content_long marginT10">
<div class="content_title">手机号</div>
<div>{{item.mobile}}</div>
</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 {
formData: {},
}
},
components: {},
computed: {
},
created () { },
mounted () {
let query = this.$route.query
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/caiji.scss";
</style>

509
src/views/pages/staffRegister.vue

@ -1,509 +0,0 @@
<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">
<div class="content-title">
<mt-cell title="*企业名称">
<span style="margin-right:20px">{{placeOrgName}}</span>
</mt-cell>
</div>
<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">
<div class="content-title">
<mt-cell title="*企业名称">
<span style="margin-right:20px">{{placeOrgName}}</span>
</mt-cell>
</div>
<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;
}
.content-title {
/deep/ .mint-cell-value {
flex: 0 0 200px;
}
}
.my-field /deep/ .mint-field-core {
text-align: right;
margin-right: 20px;
}
// .my-field {
// /deep/
// }
/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

@ -1,147 +0,0 @@
<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