Commit cf9ca7dca694c59da96d7795119e007d4486377d

Authored by wuxw
1 parent 44c39a25

优化前段代码bug

src/components/index/index-dev.vue
1 <template> 1 <template>
2 - <div> 2 + <div class="padding">
3 <div class="vc-index-nav"> 3 <div class="vc-index-nav">
4 <span><i class="fa fa-home margin-right-sm"></i>首页</span><span 4 <span><i class="fa fa-home margin-right-sm"></i>首页</span><span
5 class="margin-left-sm margin-right-sm">/</span><span>开发中心</span> 5 class="margin-left-sm margin-right-sm">/</span><span>开发中心</span>
src/views/staff/aStaffList.vue
1 <template> 1 <template>
2 - <div> 2 + <div class="padding">
3 <el-card class="box-card margin-bottom"> 3 <el-card class="box-card margin-bottom">
4 <div slot="header" class="clearfix flex justify-between"> 4 <div slot="header" class="clearfix flex justify-between">
5 <span>{{ $t('staff.searchConditions') }}</span> 5 <span>{{ $t('staff.searchConditions') }}</span>
6 </div> 6 </div>
7 <el-row :gutter="20"> 7 <el-row :gutter="20">
8 <el-col :span="6"> 8 <el-col :span="6">
9 - <el-input :placeholder="$t('staff.staffIdPlaceholder')" v-model="searchConditions.staffId" clearable /> 9 + <el-input :placeholder="$t('staff.staffId')" v-model="searchConditions.staffId" clearable />
10 </el-col> 10 </el-col>
11 <el-col :span="6"> 11 <el-col :span="6">
12 - <el-input :placeholder="$t('staff.staffNamePlaceholder')" v-model="searchConditions.name" clearable /> 12 + <el-input :placeholder="$t('staff.staffName')" v-model="searchConditions.name" clearable />
13 </el-col> 13 </el-col>
14 <el-col :span="6"> 14 <el-col :span="6">
15 - <el-input :placeholder="$t('staff.phonePlaceholder')" v-model="searchConditions.tel" clearable /> 15 + <el-input :placeholder="$t('staff.phoneNumber')" v-model="searchConditions.tel" clearable />
16 </el-col> 16 </el-col>
17 <el-col :span="6"> 17 <el-col :span="6">
18 <el-button type="primary" @click="queryStaff"> 18 <el-button type="primary" @click="queryStaff">
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 24
25 <el-card class="box-card"> 25 <el-card class="box-card">
26 <div slot="header" class="clearfix flex justify-between"> 26 <div slot="header" class="clearfix flex justify-between">
27 - <span>{{ $t('staff.staffInfo') }}</span> 27 + <span>{{ $t('staff.staffManagement') }}</span>
28 <el-button v-if="hasPrivilege(['502022082992310001', '502022101889270183'])" type="primary" size="small" 28 <el-button v-if="hasPrivilege(['502022082992310001', '502022101889270183'])" type="primary" size="small"
29 class="float-right" @click="openAddStaffPage"> 29 class="float-right" @click="openAddStaffPage">
30 {{ $t('staff.add') }} 30 {{ $t('staff.add') }}
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 {{ $t('staff.edit') }} 51 {{ $t('staff.edit') }}
52 </el-button> 52 </el-button>
53 <el-button size="mini" @click="openResetPwd(scope.row)"> 53 <el-button size="mini" @click="openResetPwd(scope.row)">
54 - {{ $t('staff.resetPwd') }} 54 + {{ $t('staff.resetPassword') }}
55 </el-button> 55 </el-button>
56 <el-button 56 <el-button
57 v-if="scope.row.relCd !== '600311000001' && hasPrivilege(['502022082920350003', '502022101887680185'])" 57 v-if="scope.row.relCd !== '600311000001' && hasPrivilege(['502022082920350003', '502022101887680185'])"
src/views/staff/staffLang.js
@@ -13,6 +13,8 @@ export const messages = { @@ -13,6 +13,8 @@ export const messages = {
13 staffNumber: 'Staff Number', 13 staffNumber: 'Staff Number',
14 name: 'Name', 14 name: 'Name',
15 phone: 'Phone', 15 phone: 'Phone',
  16 + position: 'Position',
  17 + idCard: 'ID Card',
16 relatedOrg: 'Related Organization', 18 relatedOrg: 'Related Organization',
17 email: 'Email', 19 email: 'Email',
18 address: 'Address', 20 address: 'Address',
@@ -62,6 +64,8 @@ export const messages = { @@ -62,6 +64,8 @@ export const messages = {
62 staffNumber: '员工编号', 64 staffNumber: '员工编号',
63 name: '名称', 65 name: '名称',
64 phone: '手机号', 66 phone: '手机号',
  67 + position: '职位',
  68 + idCard: '身份证',
65 relatedOrg: '关联组织', 69 relatedOrg: '关联组织',
66 email: '邮箱', 70 email: '邮箱',
67 address: '地址', 71 address: '地址',
src/views/user/login/Login.vue
@@ -83,7 +83,11 @@ export default { @@ -83,7 +83,11 @@ export default {
83 if (valid) { 83 if (valid) {
84 this.loading = true; 84 this.loading = true;
85 try { 85 try {
86 - const { data } = await login(this.loginForm); 86 + const { data } = await login(this.loginForm).catch(error => {
  87 + this.$message.error(error.response.data);
  88 + this.refreshCaptcha();
  89 + return { data: [] };
  90 + });
87 91
88 if (data && data.length > 1) { 92 if (data && data.length > 1) {
89 this.$refs.selectLoginUserRef.openDialog(data); 93 this.$refs.selectLoginUserRef.openDialog(data);