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