|
@@ -24,18 +24,18 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item divided command="zh">中文</el-dropdown-item>
|
|
|
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
|
|
- </el-dropdown-menu>
|
|
|
+ </el-dropdown-menu>
|
|
|
</el-dropdown> -->
|
|
|
|
|
|
<el-dropdown trigger="hover" style="margin-right:30px;">
|
|
|
<span class="el-dropdown-link userinfo-inner">
|
|
|
<i class="el-icon-user" style="font-size:18px" ></i>
|
|
|
- 咨询客服
|
|
|
+ {{$t('other.customerService')}}
|
|
|
</span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item >
|
|
|
<div>
|
|
|
- <div>微信扫码</div>
|
|
|
+ <div>{{$t('other.sweepWeChatYards')}}</div>
|
|
|
<img
|
|
|
style="width: 120px; height: 120px"
|
|
|
src="../assets/image/code.jpg" />
|
|
@@ -44,26 +44,26 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- 到期日期:{{remainingTime}}
|
|
|
+ {{$t('time.dueDate')}}:{{remainingTime}}
|
|
|
<el-badge class="itemNew" :value="num" :hidden="num == 0">
|
|
|
<i class="el-icon-message-solid" style="font-size:24px" v-popover:popover1 @click="drawer = true"></i>
|
|
|
</el-badge>
|
|
|
- <el-drawer title="消息中心" :visible.sync="drawer" direction="rtl" :with-header="false" size="35%">
|
|
|
+ <el-drawer :title="$t('other.messageCenter')" :visible.sync="drawer" direction="rtl" :with-header="false" size="35%">
|
|
|
<el-table :data="popoverData" :height="tableHeight" size="small">
|
|
|
- <el-table-column property="type" label="消息内容" align="left">
|
|
|
+ <el-table-column property="type" :label="$t('other.messageContent')" align="left">
|
|
|
<template slot-scope="scope">
|
|
|
<el-link type="primary" :underline="false" @click="locationHerf(scope.row.id,scope.row.content, scope.row.type)">
|
|
|
<span style="font-size:13px;">{{scope.row.msg==null?msgTypeTxt[scope.row.type]:scope.row.msg}}</span>
|
|
|
</el-link>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column property="type" label="状态" align="center" width="60">
|
|
|
+ <el-table-column property="type" :label="$t('state.states')" align="center" width="60">
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.checked == 0" style="color:red">未读</span>
|
|
|
- <span v-else style="color:green">已读</span>
|
|
|
+ <span v-if="scope.row.checked == 0" style="color:red">{{$t('other.unread')}}</span>
|
|
|
+ <span v-else style="color:green">{{$t('other.read')}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column property="time" label="时间" align="center" width="120"></el-table-column>
|
|
|
+ <el-table-column property="time" :label="$t('time.times')" align="center" width="120"></el-table-column>
|
|
|
</el-table>
|
|
|
</el-drawer>
|
|
|
<el-dropdown trigger="hover" style="margin-left:10px;">
|
|
@@ -74,9 +74,9 @@
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<!-- <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{roleArray[user.role]}}</span></el-dropdown-item> -->
|
|
|
<el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{user.roleName}}</span></el-dropdown-item>
|
|
|
- <el-dropdown-item @click.native="reset">修改密码</el-dropdown-item>
|
|
|
+ <el-dropdown-item @click.native="reset">{{$t('other.changeThePassword')}}</el-dropdown-item>
|
|
|
<!-- <el-dropdown-item @click.native="editInfoOpen">修改信息</el-dropdown-item> -->
|
|
|
- <el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>
|
|
|
+ <el-dropdown-item divided @click.native="logout">{{$t('other.launchTheLogin')}}</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</el-col>
|
|
@@ -92,17 +92,26 @@
|
|
|
<template slot="title">
|
|
|
<i :class="item.iconCls"></i>
|
|
|
<!-- <span class="itemName">{{item.name}}</span> -->
|
|
|
- <span class="itemName">{{$t(item.meta.text)}}</span>
|
|
|
+ <span class="itemName bosx" v-if="$t(item.meta.text).length < 16">{{$t(item.meta.text)}}</span>
|
|
|
+ <el-tooltip class="itemName bosx" v-if="$t(item.meta.text).length > 16" effect="dark" :content="$t(item.meta.text)" placement="top">
|
|
|
+ <span>{{$t(item.meta.text)}}</span>
|
|
|
+ </el-tooltip>
|
|
|
</template>
|
|
|
<el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden"><i :class="child.iconCls"></i>
|
|
|
<!-- {{child.name}} -->
|
|
|
- {{$t(child.meta.text)}}
|
|
|
+ <span class="bosx" v-if="$t(child.meta.text).length < 16">{{$t(child.meta.text)}}</span>
|
|
|
+ <el-tooltip class="bosx" v-if="$t(child.meta.text).length > 16" effect="dark" :content="$t(child.meta.text)" placement="top">
|
|
|
+ <span>{{$t(child.meta.text)}}</span>
|
|
|
+ </el-tooltip>
|
|
|
</el-menu-item>
|
|
|
</el-submenu>
|
|
|
<el-menu-item v-if="item.leaf && item.children.length > 0" :index="item.children[0].path">
|
|
|
<i :class="item.iconCls"></i>
|
|
|
<!-- {{item.children[0].name}} -->
|
|
|
- {{$t(item.meta.text)}}
|
|
|
+ <span class="bosx" v-if="$t(item.meta.text).length < 16">{{$t(item.meta.text)}}</span>
|
|
|
+ <el-tooltip class="itemName bosx" v-if="$t(item.meta.text).length > 16" effect="dark" :content="$t(item.meta.text)" placement="top">
|
|
|
+ <span>{{$t(item.meta.text)}}</span>
|
|
|
+ </el-tooltip>
|
|
|
<!-- {{$t('navigation.reports')}} -->
|
|
|
<!-- this.$t('navigation.reports') // js-->
|
|
|
</el-menu-item>
|
|
@@ -145,36 +154,36 @@
|
|
|
</div>
|
|
|
|
|
|
<!--修改密码-->
|
|
|
- <el-dialog title="修改密码" width='450px' v-if="editPassWord" :visible.sync="editPassWord" :close-on-click-modal="false" customClass="customWidth">
|
|
|
- <el-form :model="addForm" label-width="80px" :rules="passRule" ref="addForm">
|
|
|
- <el-form-item label="原密码" prop="originPassword">
|
|
|
- <el-input v-model="addForm.originPassword" autocomplete="off" placeholder="请输入原密码" show-password></el-input>
|
|
|
+ <el-dialog :title="$t('other.changeThePassword')" width='450px' v-if="editPassWord" :visible.sync="editPassWord" :close-on-click-modal="false" customClass="customWidth">
|
|
|
+ <el-form :model="addForm" label-width="auto" :rules="passRule" ref="addForm">
|
|
|
+ <el-form-item :label="$t('lable.originalPassword')" prop="originPassword">
|
|
|
+ <el-input v-model="addForm.originPassword" autocomplete="off" :placeholder="$t('defaultText.pleaseEnterTheOldPassword')" show-password></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="新密码" prop="newPassword">
|
|
|
- <el-input v-model="addForm.newPassword" autocomplete="off" placeholder="请输入新密码" show-password></el-input>
|
|
|
+ <el-form-item :label="$t('lable.newPassword')" prop="newPassword">
|
|
|
+ <el-input v-model="addForm.newPassword" autocomplete="off" :placeholder="$t('defaultText.pleaseEnterTheNewPassword')" show-password></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click.native="editPassWord = false">取消</el-button>
|
|
|
- <el-button type="primary" @click.native="resetPwd" :loading="editLoading">提交</el-button>
|
|
|
+ <el-button @click.native="editPassWord = false">{{$t('btn.cancel')}}</el-button>
|
|
|
+ <el-button type="primary" @click.native="resetPwd" :loading="editLoading">{{$t('btn.submit')}}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
|
|
|
<!--修改信息-->
|
|
|
- <el-dialog title="修改信息" width='450px' v-if="editInformation" :visible.sync="editInformation" :close-on-click-modal="false" customClass="customWidth">
|
|
|
- <el-form :model="editInfoForm" label-width="80px" :rules="passRule" ref="editInfoForm">
|
|
|
- <el-form-item label="姓名" prop="username">
|
|
|
- <el-input v-model="editInfoForm.username" autocomplete="off" placeholder="请输入姓名"></el-input>
|
|
|
+ <el-dialog :title="$t('lable.modifyTheInformation')" width='450px' v-if="editInformation" :visible.sync="editInformation" :close-on-click-modal="false" customClass="customWidth">
|
|
|
+ <el-form :model="editInfoForm" label-width="auto" :rules="passRule" ref="editInfoForm">
|
|
|
+ <el-form-item :label="$t('lable.name')" prop="username">
|
|
|
+ <el-input v-model="editInfoForm.username" autocomplete="off" :placeholder="$t('defaultText.PleaseEnterYourName')"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-form :model="editInfoForm" label-width="80px" :rules="passRule" ref="editInfoForm">
|
|
|
- <el-form-item label="手机号" prop="mobile">
|
|
|
- <el-input v-model="editInfoForm.mobile" autocomplete="off" placeholder="请输入手机号" :disabled="true"></el-input>
|
|
|
+ <el-form :model="editInfoForm" label-width="auto" :rules="passRule" ref="editInfoForm">
|
|
|
+ <el-form-item :label="$t('lable.phone')" prop="mobile">
|
|
|
+ <el-input v-model="editInfoForm.mobile" autocomplete="off" :placeholder="$t('defaultText.PleaseEnterYourPhone')" :disabled="true"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click.native="editInformation = false">取消</el-button>
|
|
|
- <el-button type="primary" @click.native="editInfo" :loading="editLoading2">提交</el-button>
|
|
|
+ <el-button @click.native="editInformation = false">{{$t('btn.cancel')}}</el-button>
|
|
|
+ <el-button type="primary" @click.native="editInfo" :loading="editLoading2">{{$t('btn.submit')}}</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</section>
|
|
@@ -185,15 +194,19 @@
|
|
|
<script>
|
|
|
import util from "../common/js/util";
|
|
|
export default {
|
|
|
+ // 引用 app.vue reloads 方法
|
|
|
+ inject:['reloads'],
|
|
|
data() {
|
|
|
return {
|
|
|
- roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员","公司领导"],
|
|
|
+ // roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员","公司领导"],
|
|
|
+ roleArray:[this.$t('role.ordinaryEmployees'),this.$t('role.superAdministrator'),this.$t('role.systemAdministrator'),this.$t('role.companyTop'),this.$t('role.financialAdministrator'),this.$t('role.projectManager'),this.$t('role.companyLeadership')],
|
|
|
helpImg: '../assets/image/userHead.png',
|
|
|
user: sessionStorage.getItem("user"),
|
|
|
collapsed: sessionStorage.collapsed!=null?(sessionStorage.collapsed=='true'?true:false):false,
|
|
|
sysUserName: "",
|
|
|
menu: [],
|
|
|
- msgTypeTxt:["审批未通过","有新任务啦","任务有新进展","项目日报审核通过"],
|
|
|
+ // msgTypeTxt:["审批未通过","有新任务啦","任务有新进展","项目日报审核通过"],
|
|
|
+ msgTypeTxt:[this.$t('state.notApproved'),this.$t('state.ThereIsAnewTask'),this.$t('state.TheresBeen'),this.$t('state.approvedProject')],
|
|
|
editInformation: false,
|
|
|
editPassWord: false,
|
|
|
editLoading: false,
|
|
@@ -210,9 +223,9 @@
|
|
|
companyName: ""
|
|
|
},
|
|
|
passRule: {
|
|
|
- originPassword: [{ required: true, message: "请输入原密码", trigger: "blur" }],
|
|
|
- newPassword: [{ required: true, message: "请输入新密码", trigger: "blur" }],
|
|
|
- username: [{ required: true, message: "请输入姓名", trigger: "blur" }]
|
|
|
+ originPassword: [{ required: true, message: this.$t('defaultText.pleaseEnterTheOldPassword'), trigger: "blur" }],
|
|
|
+ newPassword: [{ required: true, message: this.$t('defaultText.pleaseEnterTheNewPassword'), trigger: "blur" }],
|
|
|
+ username: [{ required: true, message: this.$t('defaultText.PleaseEnterYourName'), trigger: "blur" }]
|
|
|
},
|
|
|
|
|
|
//时间
|
|
@@ -233,6 +246,7 @@
|
|
|
|
|
|
// 中英文切换
|
|
|
langChange(command) {
|
|
|
+ let flg = this.language
|
|
|
this.$i18n.locale = command
|
|
|
localStorage.setItem("lang", command)
|
|
|
if(command == 'en') {
|
|
@@ -240,15 +254,18 @@
|
|
|
} else if (command == 'zh') {
|
|
|
this.language = '中文'
|
|
|
}
|
|
|
+ if(flg != this.language) {
|
|
|
+ this.reloads()
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
//退出登录
|
|
|
logout: function() {
|
|
|
var _this = this;
|
|
|
- this.$confirm("确认退出吗?", "提示", {
|
|
|
+ this.$confirm(this.$t('other.confirmExit') + '?', this.$t('other.prompts'), {
|
|
|
//type: 'warning'
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
+ confirmButtonText: this.$t('btn.submit'),
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
|
}).then(() => {
|
|
|
sessionStorage.removeItem("user");
|
|
|
location.reload();
|
|
@@ -296,7 +313,7 @@
|
|
|
this.editInformation = false;
|
|
|
if (res.code == "ok") {
|
|
|
this.$message({
|
|
|
- message: "修改成功",
|
|
|
+ message: this.$t('message.modifyTheSuccess'),
|
|
|
type: "success"
|
|
|
});
|
|
|
//读取并覆盖session storage
|
|
@@ -340,7 +357,8 @@
|
|
|
this.editPassWord = false;
|
|
|
if (res.code == "ok") {
|
|
|
this.$message({
|
|
|
- message: "修改成功,请重新登录",
|
|
|
+ // message: "修改成功,请重新登录",
|
|
|
+ message: this.$t('message.logAganin'),
|
|
|
type: "success"
|
|
|
});
|
|
|
this.$router.push("/login");
|
|
@@ -470,7 +488,7 @@
|
|
|
if(this.user.remainingTime != "" && this.user.remainingTime != 0) {
|
|
|
this.remainingTime = util.formatDate.format(new Date(new Date().getTime() + this.user.remainingTime), "yyyy-MM-dd")
|
|
|
} else {
|
|
|
- this.remainingTime = "已过期";
|
|
|
+ this.remainingTime = this.$t('other.expired');
|
|
|
clearInterval(this.timer);
|
|
|
}
|
|
|
} else {
|
|
@@ -664,4 +682,11 @@
|
|
|
.isRead {
|
|
|
color: #999 !important;
|
|
|
}
|
|
|
+ .bosx {
|
|
|
+ width: 110px;
|
|
|
+ display: inline-block;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
</style>
|