Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2021-10-27 13:17:09 +08:00
commit 39179e0cb6
10 changed files with 72 additions and 39 deletions

View File

@ -19,7 +19,7 @@ export default {
} }
}, },
mounted(){ mounted(){
// this.$store.dispatch("user/getCount", {}) this.$store.dispatch("user/getCount", {});
this.timer = window.setInterval(() => { this.timer = window.setInterval(() => {
setTimeout(() => { setTimeout(() => {
this.$store.dispatch("user/getCount", {}) this.$store.dispatch("user/getCount", {})

View File

@ -6,7 +6,7 @@
<div class="right-menu"> <div class="right-menu">
<template> <template>
<el-badge v-if="count.total_count>0" :value="count.total_count" class="item right-menu-item navbarBadge" @click.native="gotoTicketPage"> <el-badge :value="count.total_count" class="item right-menu-item navbarBadge" @click.native="gotoTicketPage">
<el-icon class="el-icon-s-management" style="font-size: 25px;color: #409EFF;padding-top: 12px;cursor: pointer;"></el-icon> <el-icon class="el-icon-s-management" style="font-size: 25px;color: #409EFF;padding-top: 12px;cursor: pointer;"></el-icon>
</el-badge> </el-badge>
<search id="header-search" class="right-menu-item" /> <search id="header-search" class="right-menu-item" />

View File

@ -17,14 +17,13 @@
</router-link> </router-link>
</scroll-pane> </scroll-pane>
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
<li @click="refreshSelectedTag(selectedTag)">Refresh</li> <li @click="refreshSelectedTag(selectedTag)">刷新</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">Close</li> <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭</li>
<li @click="closeOthersTags">Close Others</li> <li @click="closeOthersTags">关闭其他</li>
<li @click="closeAllTags(selectedTag)">Close All</li> <li @click="closeAllTags(selectedTag)">关闭多有</li>
</ul> </ul>
</div> </div>
</template> </template>
<script> <script>
import ScrollPane from './ScrollPane' import ScrollPane from './ScrollPane'
import path from 'path' import path from 'path'
@ -62,7 +61,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.initTags() this.initTags();
this.addTags() this.addTags()
}, },
methods: { methods: {
@ -73,10 +72,10 @@ export default {
return tag.meta && tag.meta.affix return tag.meta && tag.meta.affix
}, },
filterAffixTags(routes, basePath = '/') { filterAffixTags(routes, basePath = '/') {
let tags = [] let tags = [];
routes.forEach(route => { routes.forEach(route => {
if (route.meta && route.meta.affix) { if (route.meta && route.meta.affix) {
const tagPath = path.resolve(basePath, route.path) const tagPath = path.resolve(basePath, route.path);
tags.push({ tags.push({
fullPath: tagPath, fullPath: tagPath,
path: tagPath, path: tagPath,
@ -85,16 +84,16 @@ export default {
}) })
} }
if (route.children) { if (route.children) {
const tempTags = this.filterAffixTags(route.children, route.path) const tempTags = this.filterAffixTags(route.children, route.path);
if (tempTags.length >= 1) { if (tempTags.length >= 1) {
tags = [...tags, ...tempTags] tags = [...tags, ...tempTags]
} }
} }
}) });
return tags return tags
}, },
initTags() { initTags() {
const affixTags = this.affixTags = this.filterAffixTags(this.routes) const affixTags = this.affixTags = this.filterAffixTags(this.routes);
for (const tag of affixTags) { for (const tag of affixTags) {
// Must have tag name // Must have tag name
if (tag.name) { if (tag.name) {
@ -103,18 +102,18 @@ export default {
} }
}, },
addTags() { addTags() {
const { name } = this.$route const { name } = this.$route;
if (name) { if (name) {
this.$store.dispatch('tagsView/addView', this.$route) this.$store.dispatch('tagsView/addView', this.$route)
} }
return false return false
}, },
moveToCurrentTag() { moveToCurrentTag() {
const tags = this.$refs.tag const tags = this.$refs.tag;
this.$nextTick(() => { this.$nextTick(() => {
for (const tag of tags) { for (const tag of tags) {
if (tag.to.path === this.$route.path) { if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag) this.$refs.scrollPane.moveToTarget(tag);
// when query is different then update // when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) { if (tag.to.fullPath !== this.$route.fullPath) {
this.$store.dispatch('tagsView/updateVisitedView', this.$route) this.$store.dispatch('tagsView/updateVisitedView', this.$route)
@ -126,7 +125,7 @@ export default {
}, },
refreshSelectedTag(view) { refreshSelectedTag(view) {
this.$store.dispatch('tagsView/delCachedView', view).then(() => { this.$store.dispatch('tagsView/delCachedView', view).then(() => {
const { fullPath } = view const { fullPath } = view;
this.$nextTick(() => { this.$nextTick(() => {
this.$router.replace({ this.$router.replace({
path: '/redirect' + fullPath path: '/redirect' + fullPath
@ -142,7 +141,7 @@ export default {
}) })
}, },
closeOthersTags() { closeOthersTags() {
this.$router.push(this.selectedTag) this.$router.push(this.selectedTag);
this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => { this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {
this.moveToCurrentTag() this.moveToCurrentTag()
}) })

View File

@ -80,7 +80,17 @@ export const constantRoutes = [
* the routes that need to be dynamically loaded based on user perms * the routes that need to be dynamically loaded based on user perms
*/ */
export const asyncRoutes = [ export const asyncRoutes = [
{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/redirect/index')
}
]
},
{ {
path: '/mtm', path: '/mtm',
component: Layout, component: Layout,

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="dashboard-container"> <div class="dashboard-container">
<el-badge v-if="count.total_count>0" :value="count.total_count" class="item" @click.native="gotoTicketPage"> <el-badge :value="count.total_count" class="item" @click.native="gotoTicketPage">
<el-icon class="el-icon-s-management" style="font-size: 70px;color: #d29898"></el-icon> <el-icon class="el-icon-s-management" style="font-size: 70px;color: #d29898"></el-icon>
</el-badge> </el-badge>
<div></div> <div></div>

View File

@ -0,0 +1,12 @@
<script>
export default {
created() {
const { params, query } = this.$route;
const { path } = params;
this.$router.replace({ path: '/' + path, query })
},
render: function(h) {
return h() // avoid warning message
}
}
</script>

View File

@ -12,9 +12,8 @@
</template> </template>
<script> <script>
import { getToken } from '@/utils/auth'
import {faceLogin} from "@/api/testModel"; import {faceLogin} from "@/api/testModel";
import { setToken, removeToken } from '@/utils/auth'
import { login, getInfo } from '@/api/user'
// import "tracking/build/data/face-min.js"; // import "tracking/build/data/face-min.js";
// import "tracking/build/data/mouth-min.js"; // import "tracking/build/data/mouth-min.js";
// import "tracking/build/data/tracking-min.js"; // import "tracking/build/data/tracking-min.js";
@ -75,8 +74,6 @@
let imgData = {base64:img}; let imgData = {base64:img};
faceLogin(imgData).then((res) => { faceLogin(imgData).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
debugger;
console.log(res);
let data = res.data; let data = res.data;
this.$confirm("是否切换登陆人?", "提示", { this.$confirm("是否切换登陆人?", "提示", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -85,7 +82,11 @@
}).then(async () => { }).then(async () => {
await this.$store.dispatch("user/resetToken",data); await this.$store.dispatch("user/resetToken",data);
await this.$store.dispatch("user/getInfo",data.access); await this.$store.dispatch("user/getInfo",data.access);
window.location.reload(); // window.location.reload();
this.$emit('func',false);
debugger;
console.log(getToken());
debugger;
}) })
.catch((err) => { .catch((err) => {
console.error(err); console.error(err);
@ -104,8 +105,6 @@
}); });
this.$refs['video'].srcObject = null this.$refs['video'].srcObject = null
}, },
//切换本地摄像头 //切换本地摄像头
changePhoto(){ changePhoto(){
/**得到所有的设备*/ /**得到所有的设备*/
@ -146,8 +145,6 @@
navigator.getUserMedia(constraints, success, error); navigator.getUserMedia(constraints, success, error);
} }
}, },
/** /**
* 检查取景框是否有人脸 * 检查取景框是否有人脸
* */ * */
@ -181,9 +178,6 @@
setFace(data){ setFace(data){
this.isHasFace = data; this.isHasFace = data;
} }
}, },
beforeDestroy () { beforeDestroy () {

View File

@ -8,19 +8,27 @@
<hr> <hr>
<img id="canvasImg" src="./../../assets/404_images/404.png" style="display: none"> <img id="canvasImg" src="./../../assets/404_images/404.png" style="display: none">
<div style="position: relative;"> <div style="position: relative;">
<canvas id="canvas" width="700" height="500" > <canvas id="canvas" width="700" height="500">
您的浏览器不支持绘图请升级或更换浏览器 您的浏览器不支持绘图请升级或更换浏览器
</canvas> </canvas>
<input type="text" value="" class="hide" id="txt" placeholder="请输入文字"> <input type="text" value="" class="hide" id="txt" placeholder="请输入文字">
<textarea class="hide" id="word" cols="30" rows="10" placeholder="请输入文字" autofocus></textarea> <textarea class="hide" id="word" cols="30" rows="10" placeholder="请输入文字" autofocus></textarea>
<input id="inputV" type="hidden" value="1"> <input id="inputV" type="hidden" value="1">
<span>保存的图片</span> <span>保存的图片</span>
<div id="res"></div> <div id="res"></div>
</div> </div>
<button @click="takePhoto()">拍照</button> <button @click="takePhoto()">拍照</button>
<el-form
style="width: 700px;"
label-width="100px"
>
<el-form-item label="名称" prop="name">
<el-input v-model="test" placeholder="名称"/>
</el-form-item>
</el-form>
<el-dialog :visible.sync="limitedPhoto" title="人脸登录"> <el-dialog :visible.sync="limitedPhoto" title="人脸登录">
<div class="testTracking"> <div class="testTracking">
<faceLogin name="faceLogin"></faceLogin> <faceLogin name="faceLogin" @func="getMsgFormSon"></faceLogin>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
@ -46,6 +54,7 @@
colorF:"#e42343", colorF:"#e42343",
imgData:'', imgData:'',
limitedPhoto:false, limitedPhoto:false,
test:''
} }
}, },
mounted(){ mounted(){
@ -64,6 +73,9 @@
},1000) },1000)
}, },
methods: { methods: {
getMsgFormSon(data){
this.limitedPhoto = data;
},
takePhoto(){ takePhoto(){
this.limitedPhoto = true; this.limitedPhoto = true;
}, },

View File

@ -139,7 +139,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="角色" prop="participant" v-if="wfstate.participant_type==4"> <el-form-item label="角色" prop="participant" v-if="wfstate.participant_type==4">
<el-select style="width: 100%" v-model="participants" placeholder="请选择角色"> <el-select style="width: 100%" v-model="participants" multiple placeholder="请选择角色">
<el-option v-for="item in roles" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in roles" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -158,6 +158,12 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="抄送给" prop="participant">
<el-select style="width: 100%" v-model="wfstate.participant_cc" multiple placeholder="请选择抄送给谁">
<el-option v-for="item in staffs" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="字段状态"> <el-form-item label="字段状态">
<el-button @click="addWordStatusChange">添加修改</el-button> <el-button @click="addWordStatusChange">添加修改</el-button>
<el-row v-for="(item,$index) in statusChange" :key="item+$index" style="margin-top: 10px"> <el-row v-for="(item,$index) in statusChange" :key="item+$index" style="margin-top: 10px">
@ -210,6 +216,7 @@
is_hidden: '', is_hidden: '',
sort: '', sort: '',
type: '', type: '',
participant_cc: [],
enable_retreat: '', enable_retreat: '',
participant_type: '', participant_type: '',
filter_policy: '', filter_policy: '',
@ -291,7 +298,6 @@
}, },
created() { created() {
this.getList(); this.getList();
this.getUser(); this.getUser();
this.getDepartment(); this.getDepartment();

View File

@ -176,7 +176,7 @@
@pagination="getList" @pagination="getList"
/> />
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="抄送我" name="relation"> <el-tab-pane label="抄送我" name="cc">
<el-table :data="tickets" <el-table :data="tickets"
border fit stripe border fit stripe
style="width: 100%" style="width: 100%"