fix:解决bug

This commit is contained in:
xiongchengqiang 2020-05-20 15:57:51 +08:00
parent 063965287b
commit 66d2716924
5 changed files with 142 additions and 155 deletions

View File

@ -7,21 +7,26 @@
</div>
<div class="login-main">
<h3 class="login-title">用户登录</h3>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="handleLogin()" status-icon>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="handleLogin()"
status-icon
>
<el-form-item prop="username">
<el-input v-model="dataForm.username" placeholder="帐号"></el-input>
<el-input clearable v-model="dataForm.username" placeholder="帐号"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input>
<el-input clearable v-model="dataForm.password" type="password" placeholder="密码"></el-input>
</el-form-item>
<el-form-item prop="captcha">
<el-row :gutter="20">
<el-col :span="14">
<el-input v-model="dataForm.captcha" placeholder="验证码">
</el-input>
<el-input clearable v-model="dataForm.captcha" placeholder="验证码"></el-input>
</el-col>
<el-col :span="10" class="login-captcha">
<img :src="captchaPath" @click="handleGetImgCaptcha()">
<img :src="captchaPath" @click="handleGetImgCaptcha" />
</el-col>
</el-row>
</el-form-item>
@ -36,10 +41,10 @@
</template>
<script>
import { getUUID } from '@/utils'
import { apiLogin } from '@/api/api_sys'
import { getUUID } from '@/utils'
import { apiLogin } from '@/api/api_sys'
export default {
export default {
data () {
return {
dataForm: {
@ -74,21 +79,22 @@
this.$router.replace({ name: 'home' })
} else {
this.$message.error(res.msg)
this.handleGetImgCaptcha()
}
})
}
}
}
}
</script>
<style lang="scss">
.site-wrapper.site-page--login {
.site-wrapper.site-page--login {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: rgba(38, 50, 56, .6);
background-color: rgba(38, 50, 56, 0.6);
overflow: hidden;
&:before {
position: fixed;
@ -125,13 +131,13 @@
margin: 0 0 22px 0;
font-size: 48px;
font-weight: 400;
text-transform : uppercase;
text-transform: uppercase;
}
.brand-info__intro {
margin: 10px 0;
font-size: 16px;
line-height: 1.58;
opacity: .6;
opacity: 0.6;
}
.login-main {
position: absolute;
@ -156,5 +162,5 @@
width: 100%;
margin-top: 38px;
}
}
}
</style>

View File

@ -23,12 +23,12 @@
<span class="contant-name">{{info.staffStatus==1?"离职":"在职"}}</span>
</div>
<div class="contant" v-if="info.resignationTime">
<div class="contant" v-if="info.resignationTime && info.staffStatus===1">
<span class="contant-label">离职时间</span>
<span class="contant-name">{{info.resignationTime}}</span>
</div>
<div class="contant" v-if="info.signingCompany">
<div class="contant" v-if="info.signingCompany && info.staffStatus===1">
<span class="contant-label">离职原因</span>
<span class="contant-name">{{info.signingCompany}}</span>
</div>

View File

@ -14,11 +14,10 @@
<el-form-item :label="`选择时间段\n(仅对员工数量生效)`">
<el-date-picker
v-model="formInline.value2"
v-model="value2"
type="daterange"
align="right"
value-format="yyyy-mm-dd"
unlink-panels
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -52,6 +51,7 @@ import { apiOrganizationList } from '@/api/api_staff'
export default {
data () {
return {
value2: [],
isChooseObj: {},
isChoose: false,
menuList: [],
@ -60,17 +60,10 @@ export default {
label: 'name'
},
formInline: {
value2: []
},
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick (picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', [start, end])
}
}, {
text: '最近一个月',
onClick (picker) {
const end = new Date()
@ -86,6 +79,22 @@ export default {
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90)
picker.$emit('pick', [start, end])
}
}, {
text: '最近半年',
onClick (picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 180)
picker.$emit('pick', [start, end])
}
}, {
text: '最近一年',
onClick (picker) {
const end = new Date()
const start = new Date()
start.setTime(start.getTime() - 3600 * 1000 * 24 * 360)
picker.$emit('pick', [start, end])
}
}]
}
}
@ -99,8 +108,8 @@ export default {
methods: {
changeData (data) {
console.log('data: ', data)
this.formInline.beginDate = data[0]
this.formInline.endDate = data[1]
// this.formInline.beginDate = data[0]
// this.formInline.endDate = data[1]
},
//
async handleGetMenuList () {

View File

@ -60,35 +60,6 @@ export default {
//
async initData () {
this.handleGetEmployeessItuation()
// const dataInfo = {
// beginDate: '2020-03-03',
// endDate: '2020-05-16',
// departmentName: '',
// totalStaffCount: '300',
// managementCount: '24',
// managementRate: '25%',
// newStaffCount: '20',
// leaveStaffCount: '2',
// leaveRate: '15%',
// genderDistribution: {
// columns: ['', '', ''],
// rows: [{ '': '', '': 153, '': '60%' }, { '': '', '': 100, '': '40%' }]
// },
// ageDistribution: {
// columns: ['', '', ''],
// rows: [{ '': '10-20', '': 153, '': '60%' }, { '': '20-30', '': 60, '': '40%' }, { '': '30-40', '': 10, '': '40%' }]
// },
// jobSeniorityDistribution: {
// columns: ['', '', ''],
// rows: [{ '': '', '': 153, '': '60%' }, { '': '', '': 60, '': '40%' }]
// },
// educationDistribution: {
// columns: ['', '', ''],
// rows: [{ '': '', '': 13, '': '60%' }, { '': '', '': 100, '': '40%' }, { '': '', '': 60, '': '40%' }, { '': '', '': 10, '': '40%' }]
// }
// }
// this.dataInfo = dataInfo
},
submit (data) {
this.handleGetEmployeessItuation(data)

View File

@ -64,6 +64,7 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper"
></el-pagination>
<!-- 弹窗, 新增 / 编辑 -->
<add-or-update
v-if="addOrUpdateVisible"