|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<el-table :data="treeDataList" height="490px" row-key="id" :key="'1'" show-overflow-tooltip :cell-style="TableCellStyle" size="mini" :span-method="arraySpanMethod" style="width: 100%;margin-bottom: 20px;" border default-expand-all :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
|
|
|
- <el-table-column prop="text" label="姓名" width="240" fixed="left" v-if="stafforpro != '按项目查看'">
|
|
|
+ <el-table-column prop="text" :label="$t('lable.name')" width="240" fixed="left" v-if="stafforpro != $t('an-xiang-mu-cha-kan')">
|
|
|
<template slot-scope="scope">
|
|
|
<!-- user.userNameNeedTranslate == 1 -->
|
|
|
<span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'department'"><TranslationOpenDataText type='departmentName' :openid='scope.row.text'></TranslationOpenDataText></span>
|
|
@@ -10,7 +10,7 @@
|
|
|
<span v-if="user.userNameNeedTranslate != 1">{{scope.row.text}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="text" label="项目" width="240" fixed="left" v-if="stafforpro == '按项目查看'">
|
|
|
+ <el-table-column prop="text" :label="$t('other.project')" width="240" fixed="left" v-if="stafforpro == $t('an-xiang-mu-cha-kan')">
|
|
|
<template slot-scope="scope">
|
|
|
<span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'">
|
|
|
<span v-for="(item, index) in scope.row.userNameList" :key="index">
|
|
@@ -31,12 +31,12 @@
|
|
|
<!-- <span v-if="scope.row.translationType == 'user' && scope.column.label.indexof(scope.row.end_date) != '-1'">
|
|
|
<TranslationOpenDataText type='userName' :openid='scope.row.text'></TranslationOpenDataText>
|
|
|
</span> -->
|
|
|
- <span v-if="scope.row.translationType != 'user' && stafforpro != '按项目查看'">
|
|
|
+ <span v-if="scope.row.translationType != 'user' && stafforpro != $t('an-xiang-mu-cha-kan')">
|
|
|
<!-- {{scope.row.end_date | dataValue(scope.column, scope.row)}} -->
|
|
|
<!-- {{scope.row.start_date | dataValue(scope.column, scope.row)}} -->
|
|
|
{{scope.row.con_data | dataValue(scope.column, scope.row)}}
|
|
|
</span>
|
|
|
- <span v-if="stafforpro == '按项目查看'">
|
|
|
+ <span v-if="stafforpro == $t('an-xiang-mu-cha-kan')">
|
|
|
<!-- {{scope.row.end_date | dataValue(scope.column, scope.row)}} -->
|
|
|
<!-- {{scope.row.start_date | dataValue(scope.column, scope.row)}} -->
|
|
|
{{scope.row.con_data | dataValue(scope.column, scope.row)}}
|
|
@@ -154,7 +154,7 @@ export default {
|
|
|
// 递归加颜色以及存储需要合并的数据
|
|
|
recursive(data) {
|
|
|
for (let i in data) {
|
|
|
- if(this.stafforpro == '按项目查看') {
|
|
|
+ if(this.stafforpro == this.$t('an-xiang-mu-cha-kan')) {
|
|
|
data[i].color = '#409EFF'
|
|
|
if(data[i].translationType == 'user' && data[i].text) {
|
|
|
let arr = []
|
|
@@ -237,7 +237,7 @@ export default {
|
|
|
if(data[i].id.indexOf(this.$t('other.AskForLeave')) != '-1') {
|
|
|
data[i].color = '#F56C6C'
|
|
|
}
|
|
|
- if(data[i].id.indexOf('任务') != '-1') {
|
|
|
+ if(data[i].id.indexOf(this.$t('other.task')) != '-1') {
|
|
|
if(data[i].level == 0) {
|
|
|
data[i].color = '#409EFF'
|
|
|
}
|
|
@@ -304,7 +304,7 @@ export default {
|
|
|
combination(month, data) {
|
|
|
let monthStr = [this.initialMonth, ...month]
|
|
|
let arrList = []
|
|
|
- let weekArrayList = ['周日', '周一', '周二', '周三', '周四', '周五', '周六',]
|
|
|
+ let weekArrayList = [this.$t('weekDay.sunday'), this.$t('weekDay.monday'), this.$t('weekDay.tuesday'), this.$t('weekDay.wednesday'), this.$t('weekDay.thursday'), this.$t('weekDay.friday'), this.$t('weekDay.saturday'),]
|
|
|
for(let i in monthStr) {
|
|
|
let obj = {}
|
|
|
obj.name = monthStr[i]
|