0329
This commit is contained in:
parent
194b0f9731
commit
ad16a963e4
|
@ -153,13 +153,14 @@
|
||||||
debugger;
|
debugger;
|
||||||
let video = document.getElementById('video');
|
let video = document.getElementById('video');
|
||||||
let stream = video.srcObject;
|
let stream = video.srcObject;
|
||||||
console.log(stream);
|
|
||||||
let tracks = stream.getTracks();
|
let tracks = stream.getTracks();
|
||||||
|
this.$emit('close');
|
||||||
tracks.forEach(track => {
|
tracks.forEach(track => {
|
||||||
track.stop()
|
track.stop()
|
||||||
});
|
});
|
||||||
video.srcObject = null;
|
video.srcObject = null;
|
||||||
this.video.srcObject.getTracks()[0].stop();
|
this.video.srcObject.getTracks()[0].stop();
|
||||||
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
@ -177,10 +178,6 @@
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.faceLoginWrap{
|
.faceLoginWrap{
|
||||||
/*padding: 50px;*/
|
|
||||||
/*width: 600px;*/
|
|
||||||
/*height: 600px;*/
|
|
||||||
/*background: #000000;*/
|
|
||||||
margin:50px auto 0 auto;
|
margin:50px auto 0 auto;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
@ -194,7 +191,6 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
/*background: #000000;*/
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,9 @@ const getDefaultState = () => {
|
||||||
count: {},
|
count: {},
|
||||||
perms: []
|
perms: []
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const state = getDefaultState()
|
const state = getDefaultState();
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
RESET_STATE: (state) => {
|
RESET_STATE: (state) => {
|
||||||
|
@ -34,17 +34,17 @@ const mutations = {
|
||||||
SET_COUNT: (state, count) => {
|
SET_COUNT: (state, count) => {
|
||||||
state.count = count
|
state.count = count
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
// user login
|
// user login
|
||||||
login({ commit }, userInfo) {
|
login({ commit }, userInfo) {
|
||||||
const { username, password } = userInfo
|
const { username, password } = userInfo;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login({ username: username.trim(), password: password }).then(response => {
|
login({ username: username.trim(), password: password }).then(response => {
|
||||||
const { data } = response
|
const { data } = response;
|
||||||
commit('SET_TOKEN', data.access)
|
commit('SET_TOKEN', data.access);
|
||||||
setToken(data.access)
|
setToken(data.access);
|
||||||
resolve()
|
resolve()
|
||||||
|
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -57,22 +57,23 @@ const actions = {
|
||||||
getInfo({ commit, state }) {
|
getInfo({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo(state.token).then(response => {
|
getInfo(state.token).then(response => {
|
||||||
const { data } = response
|
const { data } = response;
|
||||||
sessionStorage.setItem('userId',data.id);
|
sessionStorage.setItem('userId',data.id);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
reject('验证失败,重新登陆.')
|
this.$router.push({name:'login',params:{}});
|
||||||
|
reject('验证失败,重新登陆.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const { perms, name, avatar } = data
|
const { perms, name, avatar } = data;
|
||||||
|
|
||||||
// perms must be a non-empty array
|
// perms must be a non-empty array
|
||||||
if (!perms || perms.length <= 0) {
|
if (!perms || perms.length <= 0) {
|
||||||
reject('没有任何权限!')
|
reject('没有任何权限!')
|
||||||
}
|
}
|
||||||
|
|
||||||
commit('SET_PERMS', perms)
|
commit('SET_PERMS', perms);
|
||||||
commit('SET_NAME', name)
|
commit('SET_NAME', name);
|
||||||
commit('SET_AVATAR', avatar)
|
commit('SET_AVATAR', avatar);
|
||||||
resolve(data)
|
resolve(data)
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
@ -84,9 +85,9 @@ const actions = {
|
||||||
logout({ commit, state }) {
|
logout({ commit, state }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
logout(state.token).then(() => {
|
logout(state.token).then(() => {
|
||||||
removeToken() // must remove token first
|
removeToken();// must remove token first
|
||||||
resetRouter()
|
resetRouter();
|
||||||
commit('RESET_STATE')
|
commit('RESET_STATE');
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
|
|
|
@ -117,7 +117,21 @@
|
||||||
<el-input v-model="vendor.address" placeholder="地址"/>
|
<el-input v-model="vendor.address" placeholder="地址"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="供应物料" prop="material">
|
<el-form-item label="供应物料" prop="material">
|
||||||
<el-input v-model="vendor.material" placeholder="供应物料"/>
|
<el-select
|
||||||
|
v-model="vendor.material"
|
||||||
|
style="width: 100%"
|
||||||
|
filterable
|
||||||
|
placeholder="请选择供应物料"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in materialList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!--<el-input v-model="vendor.material" placeholder="供应物料"/>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" prop="description">
|
<el-form-item label="备注" prop="description">
|
||||||
<el-input
|
<el-input
|
||||||
|
@ -136,6 +150,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {getMaterialList} from "@/api/mtm";
|
||||||
import {getpVendorList, createVendor, updateVendor, deleteVendor} from "@/api/vendor";
|
import {getpVendorList, createVendor, updateVendor, deleteVendor} from "@/api/vendor";
|
||||||
// import {getUserList} from "@/api/user";
|
// import {getUserList} from "@/api/user";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
|
@ -167,6 +182,7 @@
|
||||||
page: 1,
|
page: 1,
|
||||||
page_size: 20,
|
page_size: 20,
|
||||||
},
|
},
|
||||||
|
materialList: [],
|
||||||
keeperOptions: [],
|
keeperOptions: [],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
@ -183,6 +199,7 @@
|
||||||
watch: {},
|
watch: {},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getMaterial();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
@ -197,6 +214,15 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getMaterial(){
|
||||||
|
this.listLoading = true;
|
||||||
|
getMaterialList({page:0}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.materialList = response.data;
|
||||||
|
}
|
||||||
|
this.listLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
handleFilter() {
|
handleFilter() {
|
||||||
this.listQuery.page = 1;
|
this.listQuery.page = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
|
@ -266,6 +266,9 @@
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="检验员">
|
||||||
|
<!--<template slot-scope="scope">{{}}</template>-->
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
@ -356,6 +359,9 @@
|
||||||
<el-table-column label="子计划编号">
|
<el-table-column label="子计划编号">
|
||||||
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
|
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="检验员">
|
||||||
|
<!--<template slot-scope="scope">{{}}</template>-->
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="操作" width="220px">
|
<el-table-column align="center" label="操作" width="220px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-link
|
<el-link
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
<el-span v-else>否</el-span>
|
<el-span v-else>否</el-span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建人">
|
<el-table-column label="操作人">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.create_by_.username}}
|
{{scope.row.create_by_.username}}
|
||||||
</template>
|
</template>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,11 @@
|
||||||
{{ actstate_[scope.row.act_state] }}
|
{{ actstate_[scope.row.act_state] }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="检验员">
|
||||||
|
<!--<template slot-scope="scope">-->
|
||||||
|
<!--{{ actstate_[scope.row.act_state] }}-->
|
||||||
|
<!--</template>-->
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="所在子工序">
|
<el-table-column label="所在子工序">
|
||||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
Loading…
Reference in New Issue