Browse Source

2022.9.24 h5企业微信通讯录转译

ggooalice 2 years ago
parent
commit
76958c0658

+ 10 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -119,6 +119,7 @@
                                     <!-- 未填写 -->
                                     {{$t('state.DidNotFillIn')}}
                                     <el-link :underline="false" @click="showMembList(0)"><span style="margin-left:5px;margin-right:5px;color:red;">{{(depData == null?data[0].membCount:(depData.isUser == 1?1:depData.membCount))-reportList.length | numbers}}</span></el-link>{{$t('other.people')}}
+                                    <span>{{'(全天请假' + leaveAllNum + '人)'}}</span>
                                     </span>
                                     </span>
                                 </span>
@@ -167,7 +168,7 @@
                                         <el-timeline>
                                             <el-timeline-item v-for="(item2,index2) in item1.data" :key="index2">
                                                 <el-card shadow="never">
-                                                    <p><!-- 项目 -->{{$t('other.project')}}:<b>{{item2.project}}</b><span v-if="item2.subProjectName != null"> / {{item2.subProjectName}}</span>
+                                                    <p><!-- 项目 -->{{$t('other.project')}}:<b v-if="item2.projectCode">{{item2.projectCode + '/'}}</b><b>{{item2.project}}</b><span v-if="item2.subProjectName != null"> / {{item2.subProjectName}}</span>
                                                     
                                                     <span v-if="user.company.packageEngineering == 0">
                                                     <span style="margin-left:15px;color:#DAA520;"  v-if="item2.state == 0">[ 
@@ -1690,7 +1691,8 @@
                 weeklyFilledTimeLoading: false,
                 workReportStateString: [this.$t('state.WaitingAudit'),this.$t('state.alreadyPassed'),this.$t('state.rejected'),this.$t('state.waitingsubmit')],
                 weeklyFilledTimeCanDelete: false,
-                weeklyFilledTimeDate: null
+                weeklyFilledTimeDate: null,
+                leaveAllNum: 0
             };
         },
         watch: {
@@ -3475,6 +3477,12 @@
                                 this.fillMembList = this.unFillList;
                             }
                         }
+                        this.leaveAllNum = 0
+                        for(let i in this.unFillList){
+                            if(this.unFillList[i].leaveDays >= 1 || this.unFillList[i].leaveTimes >= this.user.timeType.allday){
+                                leaveAllNum += 1
+                            }
+                        }
                         this.stateChange()
                     } else {
                         this.$message({

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet_h5/public/index.html

@@ -14,6 +14,9 @@
     <!-- <script src="../src/assets/axios.min.js"></script> -->
     <!-- <script src="https://unpkg.com/axios/dist/axios.min.js"></script> -->
     <script src="./axios.min.js"></script> 
+    <!-- 引入企业微信js -->
+    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js" referrerpolicy="origin"></script>
+    <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js" referrerpolicy="origin"></script>
     <script>
         window.onerror = function(err) {
             return true

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/main.js

@@ -27,6 +27,8 @@ Vue.use(Form).use(Toast).use(Grid).use(GridItem).use(DatetimePicker)
 // rem
 import "amfe-flexible";
 
+import wx from 'weixin-js-sdk'
+Vue.prototype.wx = wx
 // 把变量挂载到vue的原型上
 axios.defaults.baseURL="http://localhost:10010"
 Vue.prototype.$axios = $axios;

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/audit/audit.vue

@@ -4,7 +4,11 @@
         <div style="height: 46px"></div>
         <div class="lis" v-for="item in list" :key="item.id">
             <div class="lis_til">
-                <p>{{item.name}}<span style="margin-left:30px;">{{item.date}}</span></p>
+                <p>
+                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                    <span v-else>{{item.name}}</span>
+                    <span style="margin-left:30px;">{{item.date}}</span>
+                </p>
                 <p style="color: #C03131">待审核</p>
             </div>
             <div class="lis_con">

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/count/count.vue

@@ -94,7 +94,8 @@
                     <div style="text-align:left;margin-left:0.42667rem;" v-else>{{item.name}}</div>
                 </template>
                 <template #default>
-                    <div style="text-align:right;margin-right:0.42667rem;">{{item.department}}</div>
+                    <div style="text-align:right;margin-right:0.42667rem;" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item.department'></ww-open-data></div>
+                    <div style="text-align:right;margin-right:0.42667rem;" v-else>{{item.department}}</div>
                 </template>
             </van-cell>
         </template>

+ 12 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -77,10 +77,20 @@
                     <!-- 审核人 -->
                     <van-field  readonly  name="projectAuditorId" v-if="item.auditUserList != null && item.auditUserList.length > 0" clickable
                         :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人" 
-                    @click="clickPickAuditor(index, item)" />
+                    @click="clickPickAuditor(index, item)">
+                        <template #input>
+                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                            <span v-else>{{item.projectAuditorName}}</span>
+                        </template>
+                    </van-field>
                     <van-popup v-model="item.showPickerAuditor" position="bottom">
                         <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor" 
-                            @cancel="item.showPickerAuditor = false;$forceUpdate();" />
+                        @cancel="item.showPickerAuditor = false;$forceUpdate();">
+                            <template #option="item">
+                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                <span v-else>{{item.auditorName}}</span>
+                            </template>
+                        </van-picker>
                     </van-popup>
 
 
@@ -320,9 +330,7 @@
         </van-popup> 
     </div>
 </template>
-<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
 <script>
-    import wx from 'weixin-js-sdk'
 import timetoolVue from '../timetool/timetool.vue';
     // Vue.prototype.$wx = wx
     export default {

+ 12 - 4
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -82,10 +82,20 @@
                     <!-- 审核人 -->
                     <van-field  readonly  name="projectAuditorId" v-if="item.auditUserList != null && item.auditUserList.length > 0" clickable
                         :value="item.projectAuditorName" :label="user.companyId==781?'审核人':'项目审核人'" placeholder="请选择审核人" 
-                    @click="clickPickAuditor(index, item)" />
+                    @click="clickPickAuditor(index, item)">
+                        <template #input>
+                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.projectAuditorName'></ww-open-data></span>
+                            <span v-else>{{item.projectAuditorName}}</span>
+                        </template>
+                    </van-field>
                     <van-popup v-model="item.showPickerAuditor" position="bottom">
                         <van-picker show-toolbar :columns="item.auditUserList" value-key="auditorName" @confirm="choseAuditor" 
-                            @cancel="item.showPickerAuditor = false;$forceUpdate();" />
+                        @cancel="item.showPickerAuditor = false;$forceUpdate();">
+                            <template #option="item">
+                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                <span v-else>{{item.auditorName}}</span>
+                            </template>
+                        </van-picker>
                     </van-popup>
 
 
@@ -296,9 +306,7 @@
         </van-popup> 
     </div>
 </template>
-<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
 <script>
-    import wx from 'weixin-js-sdk'
     // Vue.prototype.$wx = wx
     export default {
         data() {

+ 59 - 61
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -21,10 +21,8 @@
         <Footer page="index"></Footer>
     </div>
 </template>
-
 <script>
     import Footer from "@/components/Footer";
-
     export default {
         data() {
             return {
@@ -43,6 +41,18 @@
         created() {
         },
         mounted() {
+            // if(this.user.companyName == '比基尼小镇'){
+            //     let consoleScript = document.createElement("script");
+            //     consoleScript.src = "https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js";
+            //     consoleScript.onload = function () {
+            //         new VConsole()
+            //     }
+            //     document.head.appendChild(consoleScript);
+            // }
+            // console.log('userNameNeedTranslate',window.location.href);
+            if(this.user.userNameNeedTranslate == '1'){
+                this.agentConfig()
+            }
             var ua = navigator.userAgent.toLowerCase();
             if (ua.indexOf("wxwork") > 0) {
                 this.isCorpWX = true;
@@ -97,29 +107,14 @@
             if (localStorage.userInfo != null) {
                 this.getAccountInfo();
             }
-            // this.routers.push({
-            //                     name: '自动计时',
-            //                     url: '/timetool',
-            //                     icon: 'clock-o',
-            //                     info: this.unreadNum
-            //                 });
-            // if (this.user.companyId==634 || this.user.companyId==7 || this.user.companyId==431) {
-                // this.routers.push({
-                //                 name: '请假审批',
-                //                 url: '/exaLeave',
-                //                 icon: 'todo-list-o',
-                //             });
-            // }
             
             this.getMessage();
             this.bindIfNessary();
             if (localStorage.userInfo != null) {
                 this.getAccountInfo();
             }
-            console.log('userNameNeedTranslate',window.location.href);
-            if(this.user.userNameNeedTranslate == '1'){
-                this.agentConfig()
-            }
+            
+            
         },
         components: {
             Footer
@@ -132,49 +127,52 @@
                     url: curUrl,
                     token: this.user.id
                 }).then(res => {
-                    wx.config({
-                        beta: true,
-                        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
-                        appId: res.data.appid, // 必填,公众号的唯一标识 
-                        timestamp: res.data.timestamp, // 必填,生成签名的时间戳 
-                        nonceStr: res.data.noncestr, // 必填,生成签名的随机串 
-                        signature: res.data.sign, // 必填,签名,见附录1 
-                        jsApiList: ['chooseImage','previewImage','uploadImage','downloadImage','previewFile','getLocation','agentConfig'] 
-                    })
-                    let that = this
-                    wx.ready(function(){
-                    // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
-                        that.http.post("/wxcorp/getCorpWXAgentConfig", {url: curUrl, token: that.user.id}, (res) => {
-                            if (res.code == "ok") {
-                            console.log()
-                                wx.agentConfig({
-                                    corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
-                                    agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
-                                    timestamp: res.data.timestamp, // 必填,生成签名的时间戳
-                                    nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
-                                    signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
-                                    jsApiList: ['selectExternalContact'], //必填,传入需要使用的接口名称
-                                    success: function (result) {
-                                        // console.log(result, '请求微信成功')
-                                        // console.log(window, 'window')
-                                        //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
-                                        window.WWOpenData.bind(document.querySelector('ww-open-data'))
-                                    },
-                                    fail: function (res) {
-                                        // console.log('查看错误信息', res)
-                                        if (res.errMsg.indexOf('function not exist') > -1) {
-                                            alert('版本过低请升级')
-                                        }
-                                    },
-                                })
-                            }
-                        }, (error) => {
-                            console.log('查看错误信息' + res)
-                            if (error.errMsg.indexOf('function not exist') > -1) {
-                                alert('版本过低请升级')
-                            }
+                    if(res.code == 'ok'){
+                        wx.config({
+                            beta: true,
+                            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                            appId: res.data.appid, // 必填,公众号的唯一标识 
+                            timestamp: res.data.timestamp, // 必填,生成签名的时间戳 
+                            nonceStr: res.data.noncestr, // 必填,生成签名的随机串 
+                            signature: res.data.sign, // 必填,签名,见附录1 
+                            jsApiList: ['chooseImage','previewImage','uploadImage','downloadImage','previewFile','getLocation','agentConfig'] 
                         })
-                    });
+                        let that = this
+                        wx.ready(function(){
+                        // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
+                            that.$axios.post('/wxcorp/getCorpWXAgentConfig', {
+                                url: curUrl,
+                                token: that.user.id
+                            }).then(res => {
+                                if(res.code == 'ok'){
+                                    wx.agentConfig({
+                                        corpid: res.data.corpid, // 必填,企业微信的corpid,必须与当前登录的企业一致
+                                        agentid: res.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
+                                        timestamp: res.data.timestamp, // 必填,生成签名的时间戳
+                                        nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
+                                        signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
+                                        jsApiList: ['selectExternalContact'], //必填,传入需要使用的接口名称
+                                        success: function (result) {
+                                            // console.log(result, '请求微信成功')
+                                            // console.log(window, 'window')
+                                            //  wx.agentConfig成功回调后,WWOpenData 才会注入到 window 对象上面
+                                            window.WWOpenData.bind(document.querySelector('ww-open-data'))
+                                        },
+                                        fail: function (res) {
+                                            // console.log('查看错误信息', res)
+                                            if (res.errMsg.indexOf('function not exist') > -1) {
+                                                alert('版本过低请升级')
+                                            }
+                                        },
+                                    })
+                                }
+                            }).catch(err => {
+                                if (err.errMsg.indexOf('function not exist') > -1) {
+                                    alert('版本过低请升级')
+                                }
+                            })
+                        });
+                    }
                 }).catch(err => {
 
                 })

+ 37 - 10
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -58,24 +58,49 @@
                 <van-form style="margin: 0.4rem 0;">
                     <van-field v-model="form.projectCode" name="项目编号" label="项目编号" placeholder="请填写项目编号" />
                     <van-field v-model="form.projectName" name="项目名称" label="项目名称" placeholder="请填写项目名称" :rules="[{ required: true, message: '请填写项目名称' }]"/>
-                    <van-field readonly clickable name="userNames" v-model="form.userNames"  label="参与人" 
-                    placeholder="请选择参与人" @click="clickPicker()" />
+                    <van-field readonly clickable v-model="form.userNames"  label="参与人" 
+                    placeholder="请选择参与人" @click="clickPicker()">
+                        <template #input>
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-for="item,index in form.userNames.split(',')" :key="item">
+                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <span v-if="index != (form.userNames.split(',').length - 1)">,</span>
+                                </span>
+                            </span>
+                            <span v-else>{{form.userNames}}</span>
+                        </template>
+                    </van-field>
                     <van-field readonly clickable  v-model="form.inchargerName"  label="项目经理" 
-                    placeholder="请选择项目经理" @click="showPickerIncharger = true" />
+                    placeholder="请选择项目经理" @click="showPickerIncharger = true">
+                        <template #input>
+                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='form.inchargerName'></ww-open-data></span>
+                            <span v-else></span>
+                        </template>
+                    </van-field>
                     <!-- 研究中心 -->
                     <van-field v-if="user.timeType.customDegreeActive == 1" readonly clickable name="userNames" v-model="form.associateDegreeNames"  label="研究中心" 
                     placeholder="请选择" @click="clikls()"/>
                 </van-form>
             </van-dialog>
             <van-popup v-model="showPickerUser" position="bottom" ref="usersPopup">
-                <van-search v-model="userName" placeholder="输入员工姓名搜索" @search="onSearch"></van-search>
+                <van-search v-model="userName" placeholder="输入员工姓名搜索" @search="onSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
                 <div style="minHeight:300px;">
-                <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
+                <template v-if="user.userNameNeedTranslate == '1'">
+                    <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" ><ww-open-data type='userName' :openid='item.name'></ww-open-data></van-checkbox>
+                </template>
+                <template v-else>
+                    <van-checkbox class="userCheckbox" v-for="(item) in userList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
+                </template>
                 <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="refreshParticipate();showPickerUser=false">确定</van-button>
                 </div>
             </van-popup>
             <van-popup v-model="showPickerIncharger" position="bottom">
-                <van-picker show-toolbar :columns="inchargerUserList" value-key="name" @confirm="choseIncharger" @cancel="showPickerIncharger = false" />
+                <van-picker show-toolbar :columns="inchargerUserList" value-key="name" @confirm="choseIncharger" @cancel="showPickerIncharger = false">
+                    <template #option="item">
+                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-else>{{item.name}}</span>
+                    </template>
+                </van-picker>
             </van-popup>
             <!-- 研究中心 -->
             <van-popup v-model="cliklss" position="bottom">
@@ -190,18 +215,20 @@
             },
             //刷新参与人
             refreshParticipate() {
-                this.form.userNames = '';
                 var that = this;
                 that.inchargerUserList = [];
                 that.form.userId = [];
+                let userNames = ''
                 this.userList.filter(u=>u.isChecked).forEach(u=>{
-                    that.form.userNames+=(u.name+',');
+                    userNames+=(u.name+',');
                     that.form.userId.push(u.id);
                     that.inchargerUserList.push(u);
                 });
-                if (this.form.userNames.length > 0) {
-                    this.form.userNames = this.form.userNames.substring(0, this.form.userNames.length-1);
+                // this.form.userNames = userNames
+                if (userNames.length > 0) {
+                    userNames = userNames.substring(0, userNames.length-1);
                 }
+                this.$set(this.form,'userNames',userNames)
             },
             // 刷新研究中心
             refreshParticipatess() {

+ 6 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/department_list.vue

@@ -4,6 +4,10 @@
         <div class="login_form">
             <van-skeleton  v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
                 <van-panel class="one_report" :title="item.name" status="待部门审核">
+                    <template #header>
+                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-else>{{item.name}}</span>
+                    </template>
                     <div class="form_text">
                         <span style="margin-left:5px;">工作日期: {{item.dateStr}}</span>
                         <span style="float:right;">
@@ -15,9 +19,9 @@
                     </div>
                     <div v-for="(item1,index1) in item.data" :key="index1" class="one_report_data">
                         <div class="project_title">项目:{{item1.project}}
-                        <span v-if="user.company.packageEngineering == 1" 
-                            style="color:#DAA520;">{{item1.departmentAuditState==-1?'待专业审核':'待部门审核'}}</span>
+                        <span v-if="user.company.packageEngineering == 1" style="color:#DAA520;">{{item1.departmentAuditState==-1?'待专业审核':'待部门审核'}}</span>
                         </div>
+                        <div class="project_title" v-if="item1.projectCode != null" >子项目:{{item1.projectCode}}</div>
                         <div class="project_title" v-if="item1.subProjectName != null" >子项目:{{item1.subProjectName}}</div>
                         <div class="project_title" v-if="user.company.packageProject==1&&item1.groupName != null" >任务分组:{{item1.groupName}}</div>
                         <div class="project_title" v-if="user.company.packageProject==1&&item1.stage != '-'" >投入阶段:{{item1.stage}}</div>

+ 36 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -14,11 +14,29 @@
                     <template #extra>
                         <van-icon v-if="userNameValue" name="close" style="line-height:0.64rem;position:relative;left:5px;" @click.stop="selectUserClear"/>
                     </template>
+                    <template #default>
+                        <span v-if="user.userNameNeedTranslate == '1'">
+                            <span v-for="item,index in userNameValue.split(',')" :key="item">
+                                <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                <span v-if="index != (userNameValue.split(',').length - 1)">,</span>
+                            </span>
+                        </span>
+                        <span v-else>{{userNameValue}}</span>
+                    </template>
                 </van-cell>
                 <van-popup v-model="selectUserShow" position="bottom">
-                    <van-search v-model="searchInputValue" placeholder="输入员工姓名搜索" @search="userListSearch"></van-search>
+                    <van-search v-model="searchInputValue" placeholder="输入员工姓名搜索" @search="userListSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
                     <div style="minHeight:300px;">
-                        <van-checkbox class="userCheckbox" v-for="(item) in showUserList" :key="item.id" v-model="item.isChecked" >{{item.name}}</van-checkbox>
+                        <template v-if="user.userNameNeedTranslate == '1'">
+                            <van-checkbox class="userCheckbox" v-for="(item) in showUserList" :key="item.id" v-model="item.isChecked" >
+                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                            </van-checkbox>
+                        </template>
+                        <template v-else>
+                            <van-checkbox class="userCheckbox" v-for="(item) in showUserList" :key="item.id" v-model="item.isChecked" >
+                                <span>{{item.name}}</span>
+                            </van-checkbox>
+                        </template>
                         <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="selectUserConfirm()">确定</van-button>
                     </div>
                 </van-popup>
@@ -37,7 +55,8 @@
                         <div class="van-cell van-panel__header">
                             <div class="van-cell__title" style="display:flex;algin-items:center">
                                 <van-checkbox v-model="item.checked" @click="itemChecked" shape="square" style="margin-right:2vw"></van-checkbox>
-                                <span>{{item.name}}</span>
+                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                <span v-else>{{item.name}}</span>
                             </div>
                             <div class="van-cell__value van-panel__header-value">{{item.state==0?(user.company.packageEngineering == 1 ? (item.data[0].departmentAuditState==-1?'待专业审核': (item.data[0].departmentAuditState==0?'待部门审核': '待项目经理审核')) : '待审核'):item.state==1?'已通过':'已驳回'}}</div>
                         </div>
@@ -56,18 +75,28 @@
                             [
                             <span v-if="item1.isDeptAudit==0">
                                 <span v-if="item1.projectAuditState==0">
-                                    待项目审核人<span v-if="item1.projectAuditorName != null">({{item1.projectAuditorName}})</span>审核
+                                    待项目审核人<span v-if="item1.projectAuditorName != null">(
+                                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item1.projectAuditorName'></ww-open-data></span>
+                                        <span v-else>{{item1.projectAuditorName}}</span>
+                                    )</span>审核
                                 </span>
                                 <span style="color:#32CD32;" v-else-if="item1.projectAuditState==1">
-                                    项目审核人<span v-if="item1.projectAuditorName != null">({{item1.projectAuditorName}})</span>审核通过
+                                    项目审核人<span v-if="item1.projectAuditorName != null">(
+                                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item1.projectAuditorName'></ww-open-data></span>
+                                        <span v-else>{{item1.projectAuditorName}}</span>
+                                    )</span>审核通过
                                 </span>
                             </span>
                             <span v-else-if="item1.isDeptAudit==1">
-                                {{('待'+item1.auditDeptName+'审核')}}
+                                待
+                                <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item1.auditDeptName'></ww-open-data></span>
+                                <span v-else>{{item1.auditDeptName}}</span>
+                                审核
                             </span>
                             ]
 
                         </div>
+                        <div class="project_title" v-if="item1.projectCode != null" >项目编号:{{item1.projectCode}}</div>
                         <div class="project_title" v-if="item1.subProjectName != null" >子项目:{{item1.subProjectName}}</div>
                         <div class="project_title" v-if="user.company.packageProject==1&&item1.groupName != null" >任务分组:{{item1.groupName}}</div>
                         <div class="project_title" v-if="user.company.packageProject==1&&item1.stage != '-'" >投入阶段:{{item1.stage}}</div>
@@ -224,6 +253,7 @@
                     this.userNameValue = this.userNameValue.substring(0, this.userNameValue.length-1);
                     this.userIdList = this.userIdList.substring(0, this.userIdList.length-1);
                 }
+                this.$forceUpdate()
                 this.selectUserShow = false
                 this.getReport()
                 

+ 5 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/profession_list.vue

@@ -5,6 +5,10 @@
         <div class="login_form">
             <van-skeleton  v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
                 <van-panel class="one_report" :title="item.name" status="待专业审核">
+                    <template #header>
+                        <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-else>{{item.name}}</span>
+                    </template>
                     <div class="form_text">
                         <span style="margin-left:5px;">工作日期: {{item.dateStr}}</span>
                         <span style="float:right;">
@@ -16,6 +20,7 @@
                     </div>
                     <div v-for="(item1,index1) in item.data" :key="index1" class="one_report_data">
                         <div class="project_title">项目:{{item1.project}}</div>
+                        <div class="project_title" v-if="item1.projectCode != null">项目:{{item1.projectCode}}</div>
                         <div class="project_title" v-if="item1.subProjectName != null" >子项目:{{item1.subProjectName}}</div>
                         <div class="project_title" v-if="user.company.packageProject==1&&item1.groupName != null" >任务分组:{{item1.groupName}}</div>
                         <div class="project_title" v-if="user.company.packageProject==1&&item1.stage != '-'" >投入阶段:{{item1.stage}}</div>

+ 0 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/test/list.vue

@@ -283,9 +283,7 @@
         </van-popup> 
     </div>
 </template>
-<script src="//res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
 <script>
-    import wx from 'weixin-js-sdk'
     // Vue.prototype.$wx = wx
     export default {
         data() {