检查记录添加操作人首页微调刷脸签到
This commit is contained in:
parent
c435659368
commit
c2d2e2405b
|
@ -0,0 +1,15 @@
|
|||
import request from '@/utils/request'
|
||||
export function faceLogin(data) {
|
||||
return request({
|
||||
url: '/hrm/facelogin/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function clockRecord(data) {
|
||||
return request({
|
||||
url: '/hrm/clock_record/',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
|
@ -10,8 +10,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {faceLogin} from "@/api/testModel";
|
||||
import { getTickets } from "@/api/workflow";
|
||||
import { clockRecord } from '@/api/hrm'
|
||||
import tracking from '@/assets/tracking/build/tracking-min.js';
|
||||
import '@/assets/tracking/build/data/face-min.js';
|
||||
|
||||
|
@ -62,7 +61,7 @@
|
|||
// 避免在新的浏览器中使用它,因为它正在被弃用。
|
||||
_this.video.src = window.URL.createObjectURL(stream)
|
||||
}
|
||||
_this.video.onloadedmetadata = function (e) {
|
||||
_this.video.onloadedmetadata = function () {
|
||||
_this.video.play();
|
||||
};
|
||||
_this.init();
|
||||
|
@ -117,33 +116,12 @@
|
|||
let base64Img = canvas.toDataURL('image/jpeg');
|
||||
let img = base64Img.split(',')[1];
|
||||
let imgData = {base64:img};
|
||||
faceLogin(imgData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
/* debugger;
|
||||
console.log(res.data);
|
||||
getTickets( {token:res.data.access,page:1,page_size:10}).then((resp)=>{
|
||||
if(resp.code>=200){
|
||||
debugger;
|
||||
console.log(resp.data);
|
||||
}
|
||||
})*/
|
||||
that.uploadLock = false;
|
||||
this.$message.success(res.data.username+'签到成功!');
|
||||
/*that.$confirm("是否提交?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}).then(async () => {
|
||||
// that.$emit('func',false);
|
||||
// 请求接口成功以后打开锁
|
||||
clockRecord(imgData).then((res) => {
|
||||
if (res.code === 200&&res.data.id) {
|
||||
this.$message.success(res.data.name+'签到成功!');
|
||||
setTimeout(()=>{
|
||||
that.uploadLock = false;
|
||||
}).catch((err) => {
|
||||
that.$message.success(err);
|
||||
// that.$emit('func',false);
|
||||
// 请求接口成功以后打开锁
|
||||
that.uploadLock = false;
|
||||
});*/
|
||||
// this.$message.success("成功");
|
||||
},3000)
|
||||
}else{
|
||||
// 打开锁
|
||||
that.uploadLock = false;
|
||||
|
|
|
@ -50,7 +50,7 @@ export const constantRoutes = [
|
|||
path: 'dashboard',
|
||||
name: 'Dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true }
|
||||
meta: { title: '首页', icon: 'dashboard', affix: true,keepAlive: false }
|
||||
}]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -141,12 +141,12 @@
|
|||
</el-row>
|
||||
</div>
|
||||
<el-row :gutter="5">
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<div class="dashboardBottomRow">
|
||||
<div class="dashboardCardHand">
|
||||
<div class="CardTitleWrap">
|
||||
<span class="verticalLine"></span><span class="dashboardCardTitle">库存列表</span>
|
||||
<span class="stockMore" @click="stockMore">更多>></span>
|
||||
<span class="verticalLine"></span><span class="dashboardCardTitle">生产设备</span>
|
||||
<!--<span class="stockMore" @click="stockMore">更多>></span>-->
|
||||
</div>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
|
@ -193,7 +193,59 @@
|
|||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="8">
|
||||
<div class="dashboardBottomRow">
|
||||
<div class="dashboardCardHand">
|
||||
<div class="CardTitleWrap">
|
||||
<span class="verticalLine"></span><span class="dashboardCardTitle">人员到岗</span>
|
||||
<!--<span class="stockMore" @click="stockMore">更多>></span>-->
|
||||
</div>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page.sync="stockPage"
|
||||
:page-size="stockPageSize"
|
||||
layout="prev, pager, next, jumper"
|
||||
:total="stockTotal"
|
||||
@size-change="handleStockSizeChange"
|
||||
@current-change="handleStockCurrentChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dashboardCardPadding">
|
||||
<el-table
|
||||
v-loading="listLoadingStock"
|
||||
:data="stockList"
|
||||
fit stripe
|
||||
size="mini"
|
||||
:height="cardTabelHeight"
|
||||
style="border-top: 1px solid #f5f5f5;"
|
||||
>
|
||||
<el-table-column label="物料编号" prop="material_">
|
||||
<template slot-scope="scope">{{ scope.row.material_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称" prop="material_" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格型号" prop="material_" show-overflow-tooltip>
|
||||
<template slot-scope="scope">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料类型" prop="material_">
|
||||
<template slot-scope="scope">{{options[scope.row.material_.type]}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="material_">
|
||||
<template slot-scope="scope">{{scope.row.material_.unit}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库" prop="warehouse_">
|
||||
<template slot-scope="scope">{{ scope.row.warehouse_.name }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="dashboardBottomRow">
|
||||
<div class="dashboardCardHand">
|
||||
<div class="CardTitleWrap">
|
||||
|
@ -342,6 +394,18 @@
|
|||
'count'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
"$route":{
|
||||
handler(route){
|
||||
debugger;
|
||||
let that = this;
|
||||
if(route.name==='dashboard'){
|
||||
location. reload();
|
||||
// that.handlerCheckList(this.list);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getNoticeData() {
|
||||
this.ScrollUp();
|
||||
|
@ -473,7 +537,12 @@
|
|||
//图标渲染
|
||||
drawChart() {
|
||||
let that = this;
|
||||
debugger;
|
||||
console.log(document.getElementById('chartColumn'));
|
||||
debugger;
|
||||
this.chartColumn = echarts.init(document.getElementById('chartColumn'));
|
||||
console.log(this.chartColumn );
|
||||
|
||||
this.chartColumn.setOption({
|
||||
// title: { text: '成品率' },
|
||||
grid: {
|
||||
|
@ -811,8 +880,8 @@
|
|||
mounted() {
|
||||
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
|
||||
let heig = document.getElementsByClassName('dashboardTopCard')[0].clientHeight;
|
||||
this.cardTabelHeight = ((hei - heig - 130) / 2);
|
||||
this.ganttHeight = this.cardTabelHeight - 50;
|
||||
this.cardTabelHeight = ((hei - heig - 140) / 2);
|
||||
this.ganttHeight = this.cardTabelHeight - 45;
|
||||
document.getElementById('chartColumn').style.height = this.cardTabelHeight - 35 + 'px';
|
||||
this.getPlanList();
|
||||
this.getStockList();
|
||||
|
@ -820,9 +889,6 @@
|
|||
this.getStatisticsData();
|
||||
this.getNoticeData();
|
||||
},
|
||||
updated() {
|
||||
this.drawChart()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -96,6 +96,14 @@
|
|||
<el-table-column label="检查类型">
|
||||
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人">
|
||||
<template slot-scope="scope">{{ scope.row.create_by_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.update_time.substring(0,scope.row.update_time.length-3)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_submited">已提交</span>
|
||||
|
@ -121,30 +129,48 @@
|
|||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">操作人:</span>
|
||||
<span>{{create_by_}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">操作时间:</span>
|
||||
<span>{{update_time}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
<div class="items" v-if="item.field_type!=='draw'&&item.field_value!==null&&item.field_value!==''">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<span>{{item.field_value}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="24">
|
||||
<div class="items" v-if="item.field_type==='draw'" style="height: 400px">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<img style="width: 45%;vertical-align: text-top;" :src="'http://47.95.0.242:2222'+item.field_value"/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getfifodetailList } from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { mtest,getwproductList } from "@/api/wpm";
|
||||
import { getrecordformList, getrffieldList} from "@/api/mtm";
|
||||
import {getTestRecord,getTestRecordItem} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
import {getfifodetailList} from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {mtest, getwproductList} from "@/api/wpm";
|
||||
import {getrecordformList, getrffieldList} from "@/api/mtm";
|
||||
import {getTestRecord, getTestRecordItem} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
wproductList: {
|
||||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
wproductList: {
|
||||
count: 0,
|
||||
},
|
||||
listQuery: {
|
||||
|
@ -176,6 +202,8 @@ export default {
|
|||
mtestform: {
|
||||
is_mtestok: false,
|
||||
},
|
||||
create_by_: '',
|
||||
update_time: '',
|
||||
wproduct: null,
|
||||
recordList: [],
|
||||
fieldList: [],
|
||||
|
@ -244,6 +272,8 @@ export default {
|
|||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
that.create_by_ = scope.row.create_by_.name;
|
||||
that.update_time = scope.row.update_time;
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
debugger;
|
||||
|
|
|
@ -29,6 +29,16 @@
|
|||
{{checkTypes[scope.row.type]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.create_by_.name }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.update_time.substring(0,scope.row.update_time.length-3)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_submited">已提交</span>
|
||||
|
@ -48,8 +58,20 @@
|
|||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">操作人:</span>
|
||||
<span>{{create_by_}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">操作时间:</span>
|
||||
<span>{{update_time}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
<div class="items" v-if="item.field_type!=='draw'">
|
||||
<div class="items" v-if="item.field_type!=='draw'&&item.field_value!==null&&item.field_value!==''">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<span>{{item.field_value}}</span>
|
||||
</div>
|
||||
|
@ -89,6 +111,8 @@
|
|||
50: '已完成',
|
||||
60: '军检完成'
|
||||
},
|
||||
create_by_:'',
|
||||
update_time:'',
|
||||
recordVisible: false,
|
||||
customfieldList: [],
|
||||
recordform: null,
|
||||
|
@ -140,6 +164,8 @@
|
|||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
that.create_by_ = scope.row.create_by_.name;
|
||||
that.update_time = scope.row.update_time;
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
debugger;
|
||||
|
|
|
@ -474,6 +474,14 @@
|
|||
<el-table-column label="检查类型">
|
||||
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人">
|
||||
<template slot-scope="scope">{{ scope.row.create_by_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作时间">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.update_time.substring(0,scope.row.update_time.length-3)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否提交">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.is_submited">已提交</span>
|
||||
|
@ -620,8 +628,20 @@
|
|||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">操作人:</span>
|
||||
<span>{{create_by_}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div class="items">
|
||||
<span class="itemLabel">操作时间:</span>
|
||||
<span>{{update_time}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
<div class="items" v-if="item.field_type!=='draw'">
|
||||
<div class="items" v-if="item.field_type!=='draw'&&item.field_value!==null&&item.field_value!==''">
|
||||
<span class="itemLabel">{{item.field_name}}:</span>
|
||||
<span>{{item.field_value}}</span>
|
||||
</div>
|
||||
|
@ -693,6 +713,8 @@
|
|||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
create_by_: '',
|
||||
update_time: '',
|
||||
formLabelWidth: '',
|
||||
formLabelWidthL: '',
|
||||
actstate_: {
|
||||
|
@ -1109,6 +1131,8 @@
|
|||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
that.create_by_ = scope.row.create_by_.name;
|
||||
that.update_time = scope.row.update_time;
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.recordFinishedVisible = true;
|
||||
|
|
Loading…
Reference in New Issue