浏览代码

转译第一版完成,待测试

Lijy 2 年之前
父节点
当前提交
99f437d1a2

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue

@@ -3,7 +3,10 @@
     <div class="child">
         <ul class="transitionBoxUl">
             <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClick(item)"> 
-                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">{{item.label}}</span>
+                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
+                    <!-- {{item.label}} -->
+                    <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                </span>
                 <span v-if="radios" style="margin-left: -15px">
                     <el-radio v-model="departmentId" :label="item.value">
                         <span class="idxspan" style="margin-left: -10px"> 

+ 220 - 44
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -3,26 +3,57 @@
     <!-- <div :style="'width:' + selectWidth + 'px;height:' + selectHeight + 'px'" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'"> -->
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'">
-            <div :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+            <div v-if="!multiSelect" :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
                 <ww-open-data type='userName' :openid='selectName'></ww-open-data>
                 <!-- {{selectName}} -->
             </div>
+            <div v-if="multiSelect" :style="'line-height: '+selectHeight+'px;margin-left: -10px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+                <span v-if="multiSelectList.length > 0">
+                    <span v-if="!tile">
+                        <span class="all">
+                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <!-- {{multiSelectList[0].name}} -->
+                            <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-1')"></i>
+                        </span>
+                        <span class="all" v-if="multiSelectList.length > 1"> + {{multiSelectList.length - 1}}</span>
+                    </span>
+                    <span v-if="tile">
+                        <span class="all" style="margin-right: 6px" v-for="(items, indexs) in multiSelectList" :key="indexs">
+                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <!-- {{items.name}} -->
+                            <i class="el-icon-error" @click.stop="deleteMultiSelectList(indexs)" v-if="!disabled"></i>
+                        </span>
+                    </span>
+                </span>
+                <span v-else class="allTwo">{{$t('defaultText.pleaseChoose')}}</span>
+            </div>
             <i :class=" move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
-            <i v-if="moveIon" class="el-icon-circle-close iostu" @click="clearDelete"></i>
+            <i v-if="moveIon" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
         </div>
     </div>
     <transition name="el-zoom-in-top">
       <div v-show="show" style="position: relative;z-index: 99;">
         <div class="transitionBox">
             <ul class="transitionBoxUl">
-                <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item)"> 
-                    <span v-if="item.name">
-                        <ww-open-data type='userName' :openid='item.name'></ww-open-data>
-                    </span> 
-                    <span v-if="item.auditorName">
-                        <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item, index)"> 
+                    <span v-if="!multiSelect">
+                        <span v-if="item.name">
+                            <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                        </span> 
+                        <span v-if="item.auditorName">
+                            <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                        </span>
+                    </span>
+
+                    <span v-if="multiSelect">
+                        <span :class="item.flg ? 'hoverSpan hoverSpanHover' : 'hoverSpan'">
+                            <span>
+                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                <!-- {{item.name}} -->
+                            </span>
+                            <span v-if="item.flg"><i class="el-icon-check"></i></span>
+                        </span>
                     </span>
-                    <!-- {{item.name || item.auditorName}} -->
                 </li>
             </ul>
         </div>
@@ -41,7 +72,17 @@ export default {
             type: String,
         },
         subjectId: {
-            type: [String, Number]
+            type: [String, Number, Array]
+        },
+        // 是否支持多选
+        multiSelect: {
+            type: Boolean,
+            default: false
+        },
+        // 是否平铺 (需要 multiSelect 为 true)
+        tile: {
+            type: Boolean,
+            default: false
         },
         // 当前页面用到的第几个
         distinction: {
@@ -56,6 +97,11 @@ export default {
             type: Boolean,
             default: false, // 默认值,不是填写日报
         },
+        // 宽度
+        widthStr: {
+            type: String,
+            default: false
+        },
         // 剩下统一索引
         index: {
             type: String
@@ -89,6 +135,7 @@ export default {
         return {
             selectWidth: '150',
             selectHeight: '28',
+            selectFontSize: '12',
             show: false, // 下拉框
             options: [], // 列表数据
             transitionBoxLiIdx: '', // hover 背景色
@@ -98,7 +145,8 @@ export default {
             dailyListObj: null, // 填写日报的数据
             dailyListIndex: null, // 日报点的索引
             move: false,
-            moveIon: false
+            moveIon: false,
+            multiSelectList: []
         };
     },
     computed: {},
@@ -125,14 +173,32 @@ export default {
             handler(newValue, oldValue) {
                 console.log(newValue, oldValue)
                 this.optionsOId = newValue
-                if(this.optionsOId) {
-                    for(let i in this.options) {
-                        if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
-                            this.selectName = this.options[i].name || this.options[i].auditorName
+                this.multiSelectList = []
+                if(!this.multiSelect) {
+                    if(this.optionsOId) {
+                        for(let i in this.options) {
+                            if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                                this.selectName = this.options[i].name || this.options[i].auditorName
+                            }
+                        }
+                    }
+                }
+                if(this.multiSelect) {
+                    for(var i in this.options) {
+                        for(var j in this.optionsOId) {
+                            if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                                this.multiSelectList.push(this.options[i])
+                                this.options[i].flg = true
+                            }
                         }
                     }
                 }
             },
+        },
+        widthStr: {
+            handler(newValue, oldValue) {
+                this.selectWidth = newValue
+            },
         }
     },
     created() {},
@@ -143,21 +209,41 @@ export default {
         } else if(this.size == 'small') {
             this.selectWidth = '191'
             this.selectHeight = '32'
-        } 
+        } else if(this.size == 'medium') {
+            this.selectWidth = '205'
+            this.selectHeight = '40'
+            this.selectFontSize = '14'
+        }
+        if(this.widthStr) {
+            this.selectWidth = this.widthStr
+        }
+        
         if(this.subject) {
             this.options = JSON.parse(JSON.stringify(this.subject))
         }
         if(this.subjectId) {
-            this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
-            for(let i in this.options) {
-                if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
-                     this.selectName = this.options[i].name || this.options[i].auditorName
+            this.multiSelectList = []
+            if(!this.multiSelect) {
+                this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
+                for(let i in this.options) {
+                    if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                        this.selectName = this.options[i].name || this.options[i].auditorName
+                    }
+                }
+            }
+            if(this.multiSelect) {
+                for(var i in this.options) {
+                    for(var j in this.optionsOId) {
+                        if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                            this.multiSelectList.push(this.options[i])
+                            this.options[i].flg = true
+                        }
+                    }
                 }
             }
         }
-        console.log(this.subjectId)
+        console.log(this.subject)
         this.dailyListIndex = this.idx
-        // this.moveIon = JSON.parse(JSON.stringify(this.clearable))
     },
     methods: {
         selectCli() {
@@ -174,33 +260,59 @@ export default {
                 this.show = !this.show
                 this.classDiv = false
                 this.move = false
+                if(this.multiSelect) {
+                    let obj = {
+                        // id: nameId,
+                        distinction: this.distinction,
+                        index: this.index, // 选中的索引
+                        other: this.other,
+                        arrUserList: this.multiSelectList
+                    }
+                    this.$emit("selectCal", obj)
+                }
             }
         },
         liMouseOver(index) {
             this.transitionBoxLiIdx = index
         },
-        liClick(item) {
+        liClick(item, itemIndex) {
             let nameId = item.id || item.auditorId
-            if(this.flg) {
-                let obj = {
-                    id: nameId,
-                    idx: this.dailyListIndex
+            if(!this.multiSelect) {
+                if(this.flg) {
+                    let obj = {
+                        id: nameId,
+                        idx: this.dailyListIndex
+                    }
+                    this.$emit("selectCatCli", obj);
+                } else {
+                    let obj = {
+                        id: nameId,
+                        distinction: this.distinction,
+                        index: this.index, // 选中的索引
+                        other: this.other
+                    }
+                    this.$emit("selectCal", obj)
                 }
-                this.$emit("selectCatCli", obj);
-            } else {
-                let obj = {
-                    id: nameId,
-                    distinction: this.distinction,
-                    index: this.index, // 选中的索引
-                    other: this.other
+                this.selectName = item.name || item.auditorName
+                this.transitionBoxLiIdx = ''
+                this.show = false
+                this.classDiv = false
+                this.move = false
+            }
+            if(this.multiSelect) {
+                if(this.options[itemIndex].flg) {
+                    this.options[itemIndex].flg = !this.options[itemIndex].flg
+                    for(var i in this.multiSelectList) {
+                        if(this.multiSelectList[i].id == item.id) {
+                            this.multiSelectList.splice(i, 1)
+                        }
+                    }
+                } else {
+                    this.options[itemIndex].flg = false
+                    this.options[itemIndex].flg = !this.options[itemIndex].flg
+                    this.multiSelectList.push(item)
                 }
-                this.$emit("selectCal", obj)
             }
-            this.selectName = item.name || item.auditorName
-            this.transitionBoxLiIdx = ''
-            this.show = !this.show
-            this.classDiv = false
-            this.move = false
         },
         moveIonDiv() {
             if(this.clearable) {
@@ -213,12 +325,54 @@ export default {
             }
         },
         clearDelete() {
-            this.selectName = this.$t('defaultText.pleaseChoose')
+            if(!this.multiSelect) {
+                this.selectName = this.$t('defaultText.pleaseChoose')
+                let obj = {
+                    name: this.$t('defaultText.pleaseChoose'),
+                    id: ''
+                }
+                this.liClick(obj)
+            }
+            if(this.multiSelect) {
+                this.multiSelectList = []
+                let obj = {
+                    distinction: this.distinction,
+                    index: this.index, // 选中的索引
+                    other: this.other,
+                    arrUserList: []
+                }
+                for(var i in this.options) {
+                    if(this.options[i].flg) {
+                        this.options[i].flg = false
+                    }
+                }
+                this.$emit("selectCal", obj)
+            }
+        },
+        deleteMultiSelectList(str) {
+            let userId
+            if(str == '-1') {
+                userId = this.multiSelectList[0].id
+                this.multiSelectList.splice(0, 1)
+            } else {
+                userId = this.multiSelectList[str].id
+                this.multiSelectList.splice(str, 1)
+            }
+            for(var i in this.options) {
+                if(this.options[i].id == userId) {
+                    if(this.options[i].flg) {
+                        this.options[i].flg = false
+                    }
+                }
+            }
+            
             let obj = {
-                name: this.$t('defaultText.pleaseChoose'),
-                id: ''
+                distinction: this.distinction,
+                index: this.index, // 选中的索引
+                other: this.other,
+                arrUserList: this.multiSelectList
             }
-            this.liClick(obj)
+            this.$emit("selectCal", obj)
         }
     },
     triggerOption(){
@@ -325,4 +479,26 @@ export default {
     .selecttexXuan {
         color: #C0C4CC;;
     }
+    .all {
+        display: inline-block;
+        font-size: 10px;
+        background: #f4f4f5;
+        height: 20px;
+        line-height: 24px;
+        padding: 0px 8px;
+        color: #909399;
+    }
+    .allTwo {
+        display: inline-block;
+        margin-left: 10px;
+    }
+    .hoverSpan {
+        display: flex;
+        width: 100%;
+        justify-content: space-between;
+    }
+    .hoverSpanHover {
+        color: #409eff;
+        font-weight: 700;
+    }
 </style>

+ 61 - 36
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -437,10 +437,25 @@
                         // 
                         this.personnelAll = res.data
                         this.allListData = res.data
-                        this.gtff()
+
+                        if(this.user.userNameNeedTranslate == '1') {
+                            let list = res.data.list
+                            let dealWithList = []
+                            for(var i in list) {
+                                let obj = {}
+                                obj.type = list[i].type
+                                obj.id = list[i].name
+                                dealWithList.push(obj)
+                            }
+                            this.dealWithTranslationPlone(dealWithList, res.data.list)
+                        } else {
+                            this.personnelAll = res.data
+                            this.allListData = res.data
+                            this.gtff()
+                        }
                     } else {
                         this.$message({
-                        message: res.msg,
+                        message: res.msg + '里面',
                         type: "error"
                         });
                     }
@@ -448,7 +463,7 @@
                 error => {
                     this.listLoading = false;
                     this.$message({
-                        message: error,
+                        message: error + '外面',
                         type: "error"
                     });
                 });
@@ -742,7 +757,14 @@
                 this.http.post(url, param,
                 res => {
                     if (res.code == "ok") {
+                        // additionName // 未转译的数据另外存储一份,用作 DOM 上渲染
+                        if(this.user.userNameNeedTranslate == '1') {
+                            for(var i in res.data.costList) {
+                                res.data.costList[i].additionName = res.data.costList[i].departmentName
+                            }
+                        }
                         this.allListData = res.data
+                        console.log(this.allListData, '部门数据')
                         this.page = 1
                         if(this.user.userNameNeedTranslate == '1' && this.radio == this.$t('lable.department')) {
                             console.log('进入我处理的方法')
@@ -772,18 +794,11 @@
                 });
             },
             dealWithTranslation(items) {
-                console.log('进来的值', items)
-
                     if (WWOpenData.initCanvas) {
                         WWOpenData.initCanvas()
-                        console.log('成功了吧')
                     }
-                    
                     const myFunOne = async () => {
                         const result = await new Promise((resolve, reject) => {
-                            console.log('我触发了')
-                            console.log(WWOpenData)
-                            console.log(WWOpenData.prefetch)
                             if(WWOpenData.prefetch) {
                                  WWOpenData.prefetch({ items }, (err, data) => {
                                     console.log(items)
@@ -795,22 +810,34 @@
                             }
                            
                         })
-                        console.log(result, '取到的数据')
-                        // result.items.map((v)=>{
-                        //     console.log(v,'返回数据 Echar 图标')
-                        //     this.dep_name.push(v.data)
-                        // })
-                        // this.on_analysis() // ECharts 渲染函数
-                        let arrList = []
-                        for(var i in result) {
-                            this.allListData.costList[i].departmentName = result[i].data
+                        for(var i in this.allListData.costList) {
+                            this.allListData.costList[i].departmentName = result.items[i].data
                         }
-                        console.log(this.allListData, '最终的数据')
                         this.jieliu_echarts()
                     }
                     
                     myFunOne()
             },
+            dealWithTranslationPlone(items, dataList) {
+                    if (WWOpenData.initCanvas) {
+                        WWOpenData.initCanvas()
+                    }
+                    const myFunOne = async () => {
+                        const result = await new Promise((resolve, reject) => {
+                            if(WWOpenData.prefetch) {
+                                 WWOpenData.prefetch({ items }, (err, data) => {
+                                    if (err) { return reject(err) }
+                                    resolve(data)
+                                })
+                            }
+                        })
+                        for(var i in this.allListData.list) {
+                            this.allListData.list[i].name = result.items[i].data
+                        }
+                        this.gtff()
+                    }
+                    myFunOne()
+            },
             jieliu_echarts(){
                 var _this = this;
                 // 更具数据的长度去加每个柱子的间距
@@ -945,7 +972,7 @@
                             }
                         }
                         totalHours = totalHours.toFixed(1);
-                var myChart = echarts.init(document.getElementById("container"));
+                        var myChart = echarts.init(document.getElementById("container"));
                         myChart.resize({
                             width: this.widthHtval
                         })
@@ -972,23 +999,21 @@
                                     trigger:'axis',
                                     formatter: function (params,ticket,callback) {
                                         _this.params = params;
-                                        var res = params[0].name + "<br/>" + 
-                                        ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
-                                        + _this.$t('yuan')+"<br/>" : '') + 
-                                        ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
-                                        // console.log(res, '将要渲染的数据')
+                                        var res 
+                                        if(_this.user.userNameNeedTranslate != '1') {
+                                            var res = params[0].name + "<br/>" + 
+                                            ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
+                                            + _this.$t('yuan')+"<br/>" : '') + 
+                                            ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
+                                        } else {
+                                            var res = "<ww-open-data type='departmentName' :openid='"+ _this.allListData.costList[params[0].dataIndex].additionName +"'></ww-open-data>" + "<br/>" + 
+                                            ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
+                                            + _this.$t('yuan')+"<br/>" : '') + 
+                                            ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
+                                        }
+                                        
                                         return res;
                                     }
-                                    // trigger:'axis',
-                                    //  formatter: function (params,ticket,callback) {
-                                    //      _this.params = params;
-                                    //      var res = params[0].name + "<br/>" + 
-                                    //      ((_this.permissions.countCost) ? "工作成本"+" : " + params[0].data.money 
-                                    //      + "元 <br/>" : '') + 
-                                    //      ((_this.permissions.countHours) ? "工作时长"+" : " + params[0].data.cost + "小时" : '');
-                                    //      return res;
-                                    //  }
-
                                 },
                                 xAxis: {
                                     data: xList,

+ 30 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -512,9 +512,10 @@
 
                 </el-form-item>
                 <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType==0">
-                    <el-select v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" >
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" >
                         <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'"  :multiSelect="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
                 <!--专业项目协作版本功能 -->
                 <el-form-item :label="$t('ji-bie')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.company.packageProject==1">
@@ -1147,11 +1148,26 @@
                     <el-scrollbar style="height:100%">
                         <el-input
                         :placeholder="$t('keywordfiltering')"
-                        v-model="filterText2">
+                        v-model="filterText2"
+                        v-if="user.userNameNeedTranslate != 1">
                         </el-input>
                     <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                         ref="chooseMembTree2" @check-change="addPersonCheck"
-                        highlight-current  :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person"></el-tree>
+                        highlight-current  :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person">
+                        <span class="custom-tree-node" slot-scope="{ node, data }">
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-if="node.data.children">
+                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                </span>
+                                <span v-else>
+                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                </span>
+                            </span>
+                            <span v-if="user.userNameNeedTranslate != '1'">
+                                {{ node.label }}
+                            </span>
+                        </span>
+                        </el-tree>
                     </el-scrollbar>
                 </div>
                 <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
@@ -1171,7 +1187,7 @@
                             <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
                         </el-option>
                     </el-select>
-                    <!-- <selectCat :size="'small'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat> -->
+                    <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -3405,6 +3421,7 @@ a {
             handleAdd(i, item) {
                 // console.log('handleadd',i,item);
                 this.contractAmountReasonShow = false
+                console.log(this.levelList, '看看打印出来的值')
                 if(i == -1) {
                     this.title = this.$t('newproject');
                     this.addForm = {
@@ -3414,7 +3431,7 @@ a {
                         userNames:'',
                         code:'',
                         inchargerId:null,
-                        level: this.user.timeType.projectLevelState == 1 ? this.levelList[0].id : 1,
+                        level: this.user.timeType.projectLevelState == 1 ? (this.levelList.length > 0 ? this.levelList[0].id : null) : 1,
                         customerId:null,
                         notifyUserNames:'',
                         chosenLeaders:[],
@@ -3613,6 +3630,7 @@ a {
                                this.addForm.auditUserIds = res.data.map(function(item) {
                                    return item.auditorId;
                                });
+                               this.$forceUpdate()
                             } else {
                                 this.$message({
                                     message: res.msg,
@@ -4057,6 +4075,13 @@ a {
                     this.projectProfessionList[obj.index].inchargerId == obj.id
                 } else if(obj.distinction =='5') {
                     this.paramInchargerId = obj.id
+                } else if(obj.distinction == '10') {
+                    let userList = obj.arrUserList
+                    let arr = []
+                    for(var i in userList) {
+                        arr.push(userList[i].id)
+                    }
+                    this.addForm.auditUserIds = arr
                 }
             }
         },

+ 12 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -135,7 +135,12 @@
                     <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable width="130">
                         <template slot-scope="scope">
                             <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.departmentName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-for="(item, index) in scope.row.executorNameList" :key="index">
+                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <span v-if="index < scope.row.executorNameList.length - 1">,</span>
+                                </span>
+                            </span>
                             <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.executorName}}</span>
                         </template>
                     </el-table-column>
@@ -974,6 +979,12 @@ import { error } from 'dingtalk-jsapi';
                 res => {
                     this.listLoading = false;
                     if(res.code == 'ok') {
+                        if(this.user.userNameNeedTranslate == 1) {
+                            for(var i in res.data.records) {
+                                let arr = res.data.records[i].executorName.split(',')
+                                res.data.records[i].executorNameList = arr
+                            }
+                        }
                         this.list = res.data.records
                         this.total = res.data.total
                     } else {

+ 15 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -12,12 +12,14 @@
                 </el-form-item>
 
                 <el-form-item :label="$t('ren-yuan')" style="width: 210px">
-                    <el-select v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
                         <el-option v-for="item in searchUsersList" :key="item.id" :label="item.name" :value="item.id">
                             <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
                             <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.name}}</span>
                         </el-option>
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'size'" :subject="searchUsersList" :clearable="true" :multiSelect="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
 
                 <el-form-item :label="$t('other.project')" style="width: 215px">
@@ -913,6 +915,18 @@
                     }
                     this.getList(1)
                 }
+            },
+            selectCal(obj) {
+                console.log(obj, '过来的数据')
+                // search.userIdArray
+                let userListId = obj.arrUserList
+                let arr = []
+                for(var i in userListId) {
+                    arr.push(userListId[i].id)
+                }
+                this.search.userIdArray = arr
+                console.log(this.search.userIdArray, '数据看看')
+                this.usersSearch(false)
             }
         },
         created() {