Ver Fonte

待办任务优先级体现、米莱的工号登陆

Lijy há 2 anos atrás
pai
commit
cdf1e6ab93

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -102,6 +102,13 @@
                     </el-table-column>
                     <el-table-column prop="stagesName" :label="$t('taskstage')" sortable width="180" @mouseover="mouseOver">
                     </el-table-column>
+                    <el-table-column prop="taskLevel" label="优先级" sortable width="180">
+                        <template slot-scope="scope">
+                            <div>
+                                {{scope.row.taskLevel == 0 ? '一般' : scope.row.taskLevel == 1 ? '重要' : '紧急'}}
+                            </div>
+                        </template>
+                    </el-table-column>
                     <el-table-column prop="name" :label="$t('nameofthetask')" sortable width="330">
                         <template slot-scope="scope">
                             <div v-if="scope.row.name.length > 20">

+ 24 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue

@@ -195,11 +195,35 @@
                         alert('err=' + err);
                     });
             },
+            automaticLogin(jobNumber, token) {
+                this.$axios.post("/user/loginAdminByThirdParty", {jobNumber:jobNumber, token:token})
+                .then(res => {
+                    if(res.code == "ok") {
+                        if(res.data.moduleList.length == 0){
+                            this.$toast.fail(`请联系管理员 ${res.data.roleName} 分配权限`);
+                            return
+                        }
+                        var user = res.data;
+                        localStorage.userInfo = JSON.stringify(res.data);
+                        this.$router.push("/index")
+                    } else {
+                        this.$toast.fail(res.msg);
+                    }
+                }).catch(err=> {this.$toast.clear();});
+            }
         },
         created() {
             if (localStorage.userInfo != null) {
                 this.$router.push("/index").catch(err => { console.log(err, '错误4')});
             }
+
+            // 米莱的用工号登录
+            let windowHerf = window.location.href
+            if(windowHerf.indexOf('?jobNumber') != '-1') {
+                let jobNumber = windowHerf.split('jobNumber=')[1].split('&token=')[0]
+                let token = windowHerf.split('&token=')[1]
+                this.automaticLogin(jobNumber, token)
+            }
         },
         mounted() {
             var ua = navigator.userAgent.toLowerCase();