基础功能好用
@@ -28,7 +28,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
https: true,
|
||||
https: false,
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
compress: true,
|
||||
|
||||
BIN
favicon.ico
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
src/assets/img/logo1.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
@@ -2,10 +2,10 @@
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-col :span="7">
|
||||
<el-card style="margin-bottom: 10px">
|
||||
<el-button size="small" type="distribution" @click="addFisrtLevel">创建一级菜单</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<!-- <el-card style="margin-bottom: 10px">-->
|
||||
<!-- <el-button size="small" type="distribution" @click="addFisrtLevel">创建一级菜单</el-button>-->
|
||||
<!-- </el-card>-->
|
||||
<el-card style="height: 550px">
|
||||
<div slot="header">
|
||||
<el-input v-model="filterTextLeft" clearable placeholder="输入关键字进行过滤" size="small"/>
|
||||
</div>
|
||||
@@ -16,7 +16,6 @@
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="height:calc(100vh - 330px);"
|
||||
@selection-change="handleSelectionChangeLeft">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection" width="55"/>
|
||||
<el-table-column align="center" type="index" width="60"/>
|
||||
@@ -40,14 +39,18 @@
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card style="margin-bottom: 10px">
|
||||
<!-- <el-card style="margin-bottom: 10px">-->
|
||||
<!-- -->
|
||||
<!-- </el-card>-->
|
||||
<el-card style="height: 550px">
|
||||
<div slot="header">
|
||||
<span>角色:</span>
|
||||
<el-select
|
||||
v-model="roleName"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
size="small"
|
||||
style="width:200px;margin-left:10px"
|
||||
style="width:150px;margin-left:10px"
|
||||
@change="getModule">
|
||||
<el-option
|
||||
v-for="item in roleNames"
|
||||
@@ -55,10 +58,7 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-card>
|
||||
<el-card style="height: 550px;overflow: auto">
|
||||
<div slot="header">
|
||||
<el-input v-model="filterText" clearable placeholder="输入关键字进行过滤" size="small"/>
|
||||
<el-input v-model="filterText" clearable placeholder="输入关键字进行过滤" size="small" style="width:200px;margin-left:10px"/>
|
||||
</div>
|
||||
<el-tree
|
||||
ref="moduleTree"
|
||||
@@ -109,13 +109,13 @@
|
||||
</el-tooltip>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-card style="margin-bottom: 10px">
|
||||
<el-button size="small" type="distribution" @click="addSecondLevel">创建二级菜单</el-button>
|
||||
<el-button size="small" style="float: right" type="success" @click="RoleNameasdShow=!RoleNameasdShow">
|
||||
模块分配情况
|
||||
</el-button>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<!-- <el-card style="margin-bottom: 10px">-->
|
||||
<!-- <el-button size="small" type="distribution" @click="addSecondLevel">创建二级菜单</el-button>-->
|
||||
<!-- <el-button size="small" style="float: right" type="success" @click="RoleNameasdShow=!RoleNameasdShow">-->
|
||||
<!-- 模块分配情况-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </el-card>-->
|
||||
<el-card style="height: 550px;">
|
||||
<div slot="header">
|
||||
<el-input v-model="filterTextRight" clearable placeholder="输入关键字进行过滤" size="small"/>
|
||||
</div>
|
||||
@@ -126,7 +126,6 @@
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="height:calc(100vh - 330px);"
|
||||
@selection-change="handleSelectionChangeRight">
|
||||
<el-table-column :selectable="selectable" align="center" type="selection" width="55"/>
|
||||
<el-table-column align="center" type="index" width="60"/>
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
align="center"
|
||||
type="selection"
|
||||
width="50"/>
|
||||
<el-table-column align="center" type="index" label="序号" />
|
||||
<!--<el-table-column align="center" label="照片" width="200">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-popover-->
|
||||
@@ -170,11 +171,11 @@
|
||||
<!-- {{ scope.row.身份证号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="学历" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.学历名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="学历" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.学历名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="入职时间" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{-->
|
||||
@@ -189,16 +190,16 @@
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="联系方式" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="班组" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.班组名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="联系方式" width="110">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.联系电话 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="班组" width="110">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.班组名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="民族" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.民族 }}-->
|
||||
@@ -209,7 +210,7 @@
|
||||
<!-- {{ scope.row.家庭住址 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" fixed="right" label="操作" width="150">
|
||||
<el-table-column align="center" label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button-->
|
||||
<!-- :disabled="scope.row.文件标识 && scope.row.文件标识 !== 'null'"-->
|
||||
@@ -287,7 +288,7 @@
|
||||
:visible.sync="people_DFV"
|
||||
center
|
||||
style="min-height: 200px"
|
||||
width="800px">
|
||||
width="400px">
|
||||
<el-form
|
||||
ref="people_form"
|
||||
:model="people_form"
|
||||
@@ -296,90 +297,86 @@
|
||||
label-position="left"
|
||||
label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工号" prop="AccountNumber">
|
||||
<el-input v-model="people_form.AccountNumber" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="密码" prop="Password">
|
||||
<el-input v-model="people_form.Password" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" prop="Name">
|
||||
<el-input v-model="people_form.Name" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="Sex">
|
||||
<el-select v-model="people_form.Sex" clearable placeholder="请选择性别" size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in SexData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-form-item label="工号" prop="AccountNumber">
|
||||
<el-input v-model="people_form.AccountNumber" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出生日期" prop="Birthday">
|
||||
<el-date-picker
|
||||
v-model="people_form.Birthday"
|
||||
placeholder="请选择出生日期"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
<el-form-item label="密码" prop="Password">
|
||||
<el-input v-model="people_form.Password" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="身份证号" prop="IDcard">
|
||||
<el-input v-model="people_form.IDcard" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入职时间" prop="TimeOfEntry">
|
||||
<el-date-picker
|
||||
v-model="people_form.TimeOfEntry"
|
||||
placeholder="请选择入职时间"
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式" prop="ContactInformation">
|
||||
<el-input v-model="people_form.ContactInformation" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="学历" prop="Education">
|
||||
<el-select
|
||||
v-model="people_form.Education"
|
||||
clearable
|
||||
placeholder="请选择学历"
|
||||
size="small"
|
||||
style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in EducationDate"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="家庭住址" prop="Address">
|
||||
<el-input v-model="people_form.Address" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="民族" prop="Nation">
|
||||
<el-input v-model="people_form.Nation" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="性别" prop="Sex">-->
|
||||
<!-- <el-select v-model="people_form.Sex" clearable placeholder="请选择性别" size="small" style="width: 200px">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in SexData"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="出生日期" prop="Birthday">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="people_form.Birthday"-->
|
||||
<!-- placeholder="请选择出生日期"-->
|
||||
<!-- size="small"-->
|
||||
<!-- style="width: 200px"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="身份证号" prop="IDcard">-->
|
||||
<!-- <el-input v-model="people_form.IDcard" size="small" style="width:200px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="入职时间" prop="TimeOfEntry">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="people_form.TimeOfEntry"-->
|
||||
<!-- placeholder="请选择入职时间"-->
|
||||
<!-- size="small"-->
|
||||
<!-- style="width: 200px"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="联系方式" prop="ContactInformation">-->
|
||||
<!-- <el-input v-model="people_form.ContactInformation" size="small" style="width:200px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="学历" prop="Education">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="people_form.Education"-->
|
||||
<!-- clearable-->
|
||||
<!-- placeholder="请选择学历"-->
|
||||
<!-- size="small"-->
|
||||
<!-- style="width: 200px">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in EducationDate"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="家庭住址" prop="Address">-->
|
||||
<!-- <el-input v-model="people_form.Address" size="small" style="width:200px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="民族" prop="Nation">-->
|
||||
<!-- <el-input v-model="people_form.Nation" size="small" style="width:200px"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!--<el-col :span="12">-->
|
||||
<!-- <el-form-item label="职称" prop="Post">-->
|
||||
<!-- <el-select-->
|
||||
@@ -435,16 +432,17 @@
|
||||
center
|
||||
style="height: 800px"
|
||||
title="离职名单"
|
||||
width="80%">
|
||||
width="40%">
|
||||
<el-table
|
||||
:data="LeavingList"
|
||||
border
|
||||
height="500"
|
||||
height="420"
|
||||
highlight-current-row
|
||||
size="mini"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
tooltip-effect="dark">
|
||||
<el-table-column align="center" type="index" label="序号" />
|
||||
<el-table-column align="center" label="部门名称" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.节点名称 }}
|
||||
@@ -460,60 +458,60 @@
|
||||
{{ scope.row.密码 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="姓名" width="100">
|
||||
<el-table-column align="center" label="姓名" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="性别" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.性别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="身份证号" width="165">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.身份证号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="学历" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.学历名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="入职时间" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.入公司时间 !== '' && scope.row.入公司时间 !== null ? scope.row.入公司时间 = scope.row.入公司时间.split(' ')[0] : scope.row.入公司时间
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出生日期" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.出生日期 !== '' && scope.row.出生日期 !== null ? scope.row.出生日期 = scope.row.出生日期.split(' ')[0] : scope.row.出生日期
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="联系方式" width="110">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="性别" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.性别 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="身份证号" width="165">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.身份证号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="学历" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.学历名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="入职时间" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- scope.row.入公司时间 !== '' && scope.row.入公司时间 !== null ? scope.row.入公司时间 = scope.row.入公司时间.split(' ')[0] : scope.row.入公司时间-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="出生日期" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{-->
|
||||
<!-- scope.row.出生日期 !== '' && scope.row.出生日期 !== null ? scope.row.出生日期 = scope.row.出生日期.split(' ')[0] : scope.row.出生日期-->
|
||||
<!-- }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="联系方式" width="110">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.联系电话 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="岗位工种" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.岗位名称 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="民族" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.民族 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="家庭住址">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.家庭住址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="民族" width="100">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.民族 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column align="center" label="家庭住址">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.家庭住址 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
||||
@@ -41,16 +41,20 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工控机IP" width="110px" align="center">
|
||||
|
||||
<el-table-column label="工位MES功能" width="110px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<template>
|
||||
{{ scope.row.工控机IP }}
|
||||
</template>
|
||||
<el-tag v-if="scope.row.是否启用MES" size="mini" type="success">启用</el-tag>
|
||||
<el-tag v-else size="mini" type="warning">禁用</el-tag>
|
||||
<!-- <el-checkbox v-model="scope.row.是否启用MES" @change="updateUsedMes(scope.row)" />-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工位MES界面" width="110px" align="center">
|
||||
<el-table-column label="MES_DLL" width="110px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.是否启用MES" @change="updateUsedMes(scope.row)" />
|
||||
<template>
|
||||
<span v-if="scope.row.是否启用MES">{{ scope.row.MesDll }}</span>
|
||||
<span v-else ></span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="150" align="center">
|
||||
@@ -68,23 +72,26 @@
|
||||
</el-card>
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" :title="title" center style="min-height: 200px;" width="400px">
|
||||
<el-form ref="formData" :model="formData" :rules="rules" label-position="right" label-width="120px">
|
||||
<el-form-item label="MES工序号" prop="fileName">
|
||||
<el-input v-model="formData.fileName" readonly class="myReadOnly-input" size="small" placeholder="指南工位号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="MES资源号" prop="nameIndustrialComputer">
|
||||
<el-input v-model="formData.nameIndustrialComputer" readonly class="myReadOnly-input" size="small" placeholder="指南工位号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="PLCS工位号" prop="stationNumber">
|
||||
<!-- <el-form-item label="MES工序号" prop="fileName">-->
|
||||
<!-- <el-input v-model="formData.fileName" readonly class="myReadOnly-input" size="small" placeholder="指南工位号"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="MES资源号" prop="nameIndustrialComputer">-->
|
||||
<!-- <el-input v-model="formData.nameIndustrialComputer" readonly class="myReadOnly-input" size="small" placeholder="指南工位号"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="工位号" prop="stationNumber">
|
||||
<el-input v-model="formData.stationNumber" readonly class="myReadOnly-input" size="small" placeholder="工位号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工控机IP" prop="ipIndustrialComputer">
|
||||
<el-input v-model="formData.ipIndustrialComputer" readonly class="myReadOnly-input" size="small" placeholder="工控机IP"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="工位名称" prop="stationName">
|
||||
<el-input v-model="formData.stationName" clearable size="small" placeholder="工位名称"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工位MES界面" prop="enableMES">
|
||||
<el-checkbox v-model="formData.enableMES" />
|
||||
<el-form-item label="工位MES功能" prop="enableMES">
|
||||
<!-- <el-checkbox v-model="formData.enableMES" />-->
|
||||
<el-tag v-if="formData.enableMES" size="mini" type="success">启用</el-tag>
|
||||
<el-tag v-else size="mini" type="warning">禁用</el-tag>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="formData.enableMES" label="MES_DLL" prop="MesDll">
|
||||
<el-input v-model="formData.MesDll" readonly class="myReadOnly-input" size="small" placeholder="MES_DLL"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-card class="topCard">
|
||||
<div class="topDiv">
|
||||
<span style="margin-left: 10px">工位号:</span>
|
||||
<el-select v-model="stationNumberValue" placeholder="工位号" clearable size="small" style="width: 200px">
|
||||
<el-select v-model="stationNumberValue" clearable placeholder="请选择工位号" size="small" style="width: 250px" @change="searchOrder">
|
||||
<el-option
|
||||
v-for="item in stationNumber"
|
||||
:key="item.value"
|
||||
@@ -11,8 +11,8 @@
|
||||
:value="item.value"
|
||||
size="mini"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">产品图号:</span>
|
||||
<el-select v-model="engineTypeValue" placeholder="请选择产品图号" size="small" style="width: 250px" @change="searchOrder()">
|
||||
<span style="margin-left: 10px">产品型号:</span>
|
||||
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" size="small" style="width: 150px" @change="searchOrder">
|
||||
<el-option
|
||||
v-for="item in engineType"
|
||||
:key="item.value"
|
||||
@@ -20,60 +20,113 @@
|
||||
:value="item.value"
|
||||
size="mini"/>
|
||||
</el-select>
|
||||
<!-- <span style="margin-left: 10px">版本号:</span>-->
|
||||
<!-- <el-select v-model="version" placeholder="请选择版本号" size="small" style="width: 150px" @change="searchOrder">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in versionList"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- size="mini"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <span style="margin-left: 10px">物料号:</span>-->
|
||||
<!-- <el-input v-model="materialCode" style="width:170px;" clearable placeholder="物料号" size="small"/>-->
|
||||
<!-- <span style="margin-left: 10px">是否验证:</span>-->
|
||||
<!-- <el-select v-model="isVerification" placeholder="是否验证" size="small" clearable style="width: 140px" @change="searchOrder()">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in verification"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- size="mini"/>-->
|
||||
<!-- </el-select>-->
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchOrder()">查询物料</el-button>
|
||||
<el-button type="distribution" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">创建物料</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">创建物料</el-button>
|
||||
<!-- <el-button type="success" size="small" plain icon="el-icon-document-copy" @click="copyOrder('form4')">复制物料</el-button>-->
|
||||
<!-- <el-button type="info" plain size="small" icon="el-icon-upload2" @click="importOrder('form')">物料导入</el-button>-->
|
||||
<!-- <el-button type="info" plain size="small" icon="el-icon-download" @click="exportExcel()">物料导出</el-button>-->
|
||||
<el-button type="warning" plain size="small" icon="el-icon-download" @click="exportExcel()">物料导出</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
:header-cell-style="{background:'#eef1f6',color:'#606266'}"
|
||||
height="600px"
|
||||
:cell-class-name="tableRowClassName"
|
||||
element-loading-text="数据加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.2)"
|
||||
class="main"
|
||||
tooltip-effect="dark"
|
||||
style="width: 80%"
|
||||
height="640px"
|
||||
style="width: 100%"
|
||||
border
|
||||
size="mini">
|
||||
size="mini"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column type="index" width="60" label="序号" align="center"/>
|
||||
<!-- <el-table-column align="center" label="物料号">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.物料号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="工位号">
|
||||
<el-table-column align="center" label="工位号" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工位号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="产品图号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发动机型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料号">
|
||||
<!-- <el-table-column align="center" label="版本号" width="100px">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.版本号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="物料号" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="零件图号">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.零件图号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="零件名称" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="零件数量">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.零件数量 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="是否验证">
|
||||
<el-table-column align="center" label="物料数量" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否验证) === 1" size="mini" type="success">是</el-tag>
|
||||
<el-tag v-if="Number(scope.row.是否验证) === 0" size="mini" type="warning">否</el-tag>
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否验证" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.是否验证) === 1" size="mini" type="success">是</el-tag>
|
||||
<span v-else> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="是否批次" width="100px">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag v-if="Number(scope.row.是否批次) === 1" size="mini" type="success">是</el-tag>-->
|
||||
<!-- <span v-else> </span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="匹配规则" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="匹配长度" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.是否验证) === 1">{{ scope.row.条码长度 }}</span>
|
||||
<span v-else> </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="匹配排序" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="Number(scope.row.是否验证) === 1">{{ scope.row.零件排序 }}</span>
|
||||
<span v-else> </span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column align="center" label="是否主物料">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span v-if="Number(scope.row.是否主物料) === 1">是</span>-->
|
||||
@@ -97,8 +150,10 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="创建物料" center style="min-height: 200px;" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="110px">
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="创建物料" center style="min-height: 200px;" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
|
||||
<el-select v-model="form.stationNumberValue" size="small" placeholder="请选择工位号">
|
||||
<el-option
|
||||
@@ -108,118 +163,192 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品型号" prop="engineTypeValue" style="display: inline-block">
|
||||
<el-select v-model="form.engineTypeValue" size="small" placeholder="请选择产品型号">
|
||||
<el-option
|
||||
v-for="item in engineType"
|
||||
v-for="item in engineType1"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="物料号" prop="orderNumber" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.orderNumber"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入物料号"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="零件图号" prop="partDrawing" style="display: inline-block">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料号" prop="orderNumber" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form.partDrawing"
|
||||
v-model="form.orderNumber"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入零件图号"/>
|
||||
placeholder="请输入物料号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件名称" prop="partName" style="display: inline-block">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="partName" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form.partName"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="零件名称"/>
|
||||
placeholder="物料名称"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数量" prop="number" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.number"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入数量"/>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="number" style="display: inline-block">
|
||||
<el-input-number
|
||||
v-model="form.number"
|
||||
:min="1"
|
||||
:step="1"
|
||||
size="small"
|
||||
placeholder="请输入数量"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否验证" prop="verificationValue" style="display: inline-block">
|
||||
<el-select v-model="form.verificationValue" size="small" placeholder="请选择产品型号" @change="changeIsVerification">
|
||||
<el-option
|
||||
v-for="item in verification"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="物料版本" prop="version" style="display: inline-block">-->
|
||||
<!-- <el-select v-model="form.version" size="small" placeholder="请选择物料版本">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in versionList"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="生产厂家" prop="manufactor" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form.manufactor"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入生产厂家"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!--<el-form-item label="是否验证" prop="verificationValue" style="display: inline-block">-->
|
||||
<!-- <el-select v-model="form.verificationValue" size="small" placeholder="请选择产品型号">-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="是否批次" prop="batchValue" style="display: inline-block">-->
|
||||
<!-- <el-select v-model="form.batchValue" size="small" placeholder="请选择是否批次">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in verification"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!--</el-form-item>-->;
|
||||
<!-- <el-form-item label="是否主物料" prop="mainMaterialValue" style="display: inline-block">-->
|
||||
<!-- <el-select v-model="form.mainMaterialValue" size="small" placeholder="请选择产品型号">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in mainMaterial"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row v-if="form.verificationValue === 1" style="margin: 10px 0">
|
||||
<el-divider>验证规则设定</el-divider>
|
||||
</el-row>
|
||||
<el-row v-if="form.verificationValue === 1">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="规则" prop="verificationCode" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form.verificationCode"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入匹配规则"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="长度" prop="verificationLength" style="display: inline-block">
|
||||
<el-input-number
|
||||
v-model="form.verificationLength"
|
||||
:min="1"
|
||||
:step="1"
|
||||
size="small"
|
||||
placeholder="请输入匹配长度"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="7">
|
||||
<el-form-item label="排序" prop="verificationOrder" style="display: inline-block">
|
||||
<el-input-number
|
||||
v-model="form.verificationOrder"
|
||||
:min="0"
|
||||
:step="1"
|
||||
size="small"
|
||||
placeholder="请输入匹配排序"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff('form')">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="dialogFormVisible1" title="编辑物料" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-position="right" label-width="110px">
|
||||
<el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form1.stationNumberValue"
|
||||
readonly
|
||||
size="small"
|
||||
placeholder="工位号"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="零件图号" prop="partDrawing" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form1.partDrawing"
|
||||
readonly
|
||||
size="small"
|
||||
placeholder="请输入零件图号"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="物料号" prop="orderNumber" style="display: inline-block">-->
|
||||
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="编辑物料" center style="min-height: 200px;" width="800px">
|
||||
<el-form ref="form" :model="form1" :rules="rules1" label-position="right" label-width="80px">
|
||||
<!-- <el-row>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="工位号" prop="stationNumberValue" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form1.orderNumber"-->
|
||||
<!-- clearable-->
|
||||
<!-- v-model="form1.stationNumberValue"-->
|
||||
<!-- readonly-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入物料号"/>-->
|
||||
<!-- placeholder="工位号"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="零件名称" prop="partName" style="display: inline-block">
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12">-->
|
||||
<!-- <el-form-item label="产品型号" prop="engineTypeValue" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form1.engineTypeValue"-->
|
||||
<!-- readonly-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="工位号"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料号" prop="orderNumber" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form1.orderNumber"
|
||||
readonly
|
||||
size="small"
|
||||
placeholder="请输入物料号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="版本号" prop="version" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form1.version"
|
||||
readonly
|
||||
size="small"
|
||||
placeholder="请选择版本号"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="物料名称" prop="partName" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form1.partName"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="零件名称"/>
|
||||
placeholder="物料名称"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数量" prop="number" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form1.number"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入数量"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="生产厂家" prop="manufactor" style="display: inline-block">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="form1.manufactor"-->
|
||||
<!-- clearable-->
|
||||
<!-- size="small"-->
|
||||
<!-- placeholder="请输入生产厂家"/>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="数量" prop="number" style="display: inline-block">
|
||||
<el-input-number
|
||||
v-model="form1.number"
|
||||
:min="1"
|
||||
:step="1"
|
||||
size="small"
|
||||
placeholder="请输入数量"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否验证" prop="verificationValue" style="display: inline-block">
|
||||
<el-select v-model="form1.verificationValue" size="small" placeholder="请选择产品型号">
|
||||
<el-option
|
||||
@@ -229,31 +358,128 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="是否主物料" prop="mainMaterialValue" style="display: inline-block">-->
|
||||
<!-- <el-select v-model="form1.mainMaterialValue" size="small" placeholder="请选择产品型号">-->
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-form-item label="是否批次" prop="batchValue" style="display: inline-block">-->
|
||||
<!-- <el-select v-model="form1.batchValue" size="small" placeholder="请选择是否批次">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in mainMaterial"-->
|
||||
<!-- v-for="item in verification"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form1.verificationValue === 1" style="margin: 10px 0">
|
||||
<el-divider>验证规则设定</el-divider>
|
||||
</el-row>
|
||||
<el-row v-if="form1.verificationValue === 1">
|
||||
<el-col :span="10">
|
||||
<el-form-item label="规则" prop="verificationCode" style="display: inline-block">
|
||||
<el-input
|
||||
v-model="form1.verificationCode"
|
||||
clearable
|
||||
size="small"
|
||||
placeholder="请输入匹配规则"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="长度" prop="verificationLength" style="display: inline-block">
|
||||
<el-input-number
|
||||
v-model="form1.verificationLength"
|
||||
:min="1"
|
||||
:step="1"
|
||||
size="small"
|
||||
placeholder="请输入匹配长度"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="7">
|
||||
<el-form-item label="排序" prop="verificationOrder" style="display: inline-block">
|
||||
<el-input-number
|
||||
v-model="form1.verificationOrder"
|
||||
:min="0"
|
||||
:step="1"
|
||||
size="small"
|
||||
placeholder="请输入匹配排序"/>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff1()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd1()">确定</el-button>
|
||||
<el-button size="small" @click="callOff1('form')">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="submitAdd1('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="物料导入" center style="min-height: 200px" width="900px">
|
||||
<el-dialog :visible.sync="dialogFormVisible3" title="物料导入" center style="min-height: 200px" width="1000px">
|
||||
<div class="app-container">
|
||||
<upload-excel-component style="margin-left: 15%" @on-selected-file="selected"/>
|
||||
<div style="margin-left: 395px">
|
||||
<span v-show="worksheet.length > 1" style="cursor: pointer;width: 50px;" @click="removeAll"><i class="el-icon-close"/></span>
|
||||
<el-upload :on-remove="handleRemove" :file-list="itemFile" style="width: 220px" action=""/>
|
||||
<upload-excel-component :on-success="handleSuccess" :before-upload="beforeUpload" />
|
||||
<div style="margin-top: 5px">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
ref="multipleTable"
|
||||
:data="tableDataListAll"
|
||||
:header-cell-style="{ background: '#F5F5F5', fontSize: '16px' }"
|
||||
element-loading-text="数据加载中"
|
||||
element-loading-spinner="el-icon-loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.2)"
|
||||
height="300px"
|
||||
style="width: 100%"
|
||||
border
|
||||
>
|
||||
<el-table-column type="index" width="60" label="序号" align="center"/>
|
||||
<el-table-column align="center" label="工位号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工位号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="产品型号" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.产品型号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料号" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.物料号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="零件名称" min-width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="物料数量" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="是否验证" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.是否验证 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="匹配规则" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.匹配规则 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="匹配长度" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.条码长度 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="匹配排序" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.匹配排序 }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div v-if="worksheet.length !== 0" style="margin: 3px 0 0 395px">
|
||||
<el-button icon="el-icon-upload2" type="primary" size="small" @click="basicPartsToSQL">导入到数据库</el-button>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="materialAddAllCancel()">取消</el-button>
|
||||
<el-button type="primary" icon="el-icon-upload" size="small" @click="materialAddAllSubmit()">确认导入</el-button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="dialogFormVisible4" title="数据复制" center style="min-height: 200px" width="400px">
|
||||
@@ -280,7 +506,6 @@
|
||||
<script>
|
||||
import UploadExcelComponent from './UploadExcel.vue'
|
||||
import { sleep } from '../../../utils/tool'
|
||||
|
||||
export default {
|
||||
name: 'UploadExcel',
|
||||
components: { UploadExcelComponent },
|
||||
@@ -288,6 +513,7 @@ export default {
|
||||
return {
|
||||
stationNumber: [],
|
||||
stationNumberValue: '',
|
||||
materialCode: '',
|
||||
stationName: '',
|
||||
worksheet: [],
|
||||
itemFile: [],
|
||||
@@ -303,7 +529,11 @@ export default {
|
||||
orderNumber: [],
|
||||
orderNumberValue: '',
|
||||
engineTypeValue: '',
|
||||
version: '',
|
||||
versionList: [],
|
||||
engineType: [],
|
||||
engineType1: [],
|
||||
isVerification: '',
|
||||
OKWarehouseValue: '',
|
||||
OKWarehouse: [],
|
||||
NGWarehouseValue: '',
|
||||
@@ -334,38 +564,56 @@ export default {
|
||||
partDrawing: '',
|
||||
number: '',
|
||||
manufactor: '',
|
||||
verificationValue: 0,
|
||||
mainMaterialValue: 0
|
||||
verificationValue: 1,
|
||||
version: '',
|
||||
verificationCode: '',
|
||||
verificationLength: 0,
|
||||
verificationOrder: 0,
|
||||
mainMaterialValue: 0,
|
||||
batchValue: 0
|
||||
},
|
||||
rules: { // 创建订单验证
|
||||
partName: [{ required: true, message: '请输入零件名称', trigger: 'blur' }],
|
||||
partName: [{ required: true, message: '请输入物料名称', trigger: 'blur' }],
|
||||
stationNumberValue: [{ required: true, message: '请选择工位号', trigger: 'change' }],
|
||||
// orderNumber: [{ required: true, message: '请输入物料号', trigger: 'blur' }],
|
||||
orderNumber: [{ required: true, message: '请输入物料号', trigger: 'blur' }],
|
||||
engineTypeValue: [{ required: true, message: '请选择机型', trigger: 'blur' }],
|
||||
partDrawing: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
|
||||
// number: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
// partDrawing: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
|
||||
number: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
// manufactor: [{ required: true, message: '请输入生产厂家', trigger: 'blur' }],
|
||||
verificationValue: [{ required: true, message: '请选择是否验证', trigger: 'change' }]
|
||||
verificationValue: [{ required: true, message: '请选择是否验证', trigger: 'change' }],
|
||||
version: [{ required: true, message: '请选择物料版本', trigger: 'change' }],
|
||||
verificationLength: [{ required: true, message: '请输入验证长度', trigger: 'blur' }],
|
||||
verificationOrder: [{ required: true, message: '请输入验证顺序', trigger: 'blur' }],
|
||||
verificationCode: [{ required: true, message: '请输入验证规则', trigger: 'blur' }]
|
||||
// mainMaterialValue: [{ required: true, message: '请选择是否主物料', trigger: 'change' }]
|
||||
},
|
||||
form1: { // 修改订单
|
||||
partName: '',
|
||||
stationNumberValue: '',
|
||||
engineTypeValue: '',
|
||||
orderNumber: '',
|
||||
partDrawing: '',
|
||||
number: '',
|
||||
manufactor: '',
|
||||
verificationValue: 0,
|
||||
version: '',
|
||||
verificationValue: 1,
|
||||
verificationCode: '',
|
||||
verificationLength: 0,
|
||||
verificationOrder: 0,
|
||||
mainMaterialValue: 0,
|
||||
batchValue: 0,
|
||||
ID: ''
|
||||
},
|
||||
rules1: { // 修改订单验证
|
||||
partName: [{ required: true, message: '请输入零件名称', trigger: 'blur' }],
|
||||
// orderNumber: [{ required: true, message: '请输入物料号', trigger: 'blur' }],
|
||||
// partDrawing: [{ required: true, message: '请输入零件图号', trigger: 'blur' }],
|
||||
// number: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
number: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
||||
// manufactor: [{ required: true, message: '请输入生产厂家', trigger: 'blur' }],
|
||||
verificationValue: [{ required: true, message: '请选择是否验证', trigger: 'change' }]
|
||||
verificationValue: [{ required: true, message: '请选择是否验证', trigger: 'change' }],
|
||||
verificationLength: [{ required: true, message: '请输入验证长度', trigger: 'blur' }],
|
||||
verificationOrder: [{ required: true, message: '请输入验证顺序', trigger: 'blur' }],
|
||||
verificationCode: [{ required: true, message: '请输入验证规则', trigger: 'blur' }]
|
||||
// stationNumberValue: [{ required: true, message: '请选择工位号', trigger: 'change' }]
|
||||
// mainMaterialValue: [{ required: true, message: '请选择是否主物料', trigger: 'change' }]
|
||||
},
|
||||
@@ -384,6 +632,7 @@ export default {
|
||||
},
|
||||
// planTime: [new Date(new Date().getTime() - 3600 * 1000 * 24 * 3000), new Date(new Date().getTime())],
|
||||
planTime: [],
|
||||
tableDataListAll: [],
|
||||
tableData: [],
|
||||
importData: [],
|
||||
dialogFormVisible: false, // 创建订单
|
||||
@@ -403,6 +652,10 @@ export default {
|
||||
created() {
|
||||
this.getStationNumber()
|
||||
this.getEndStation()
|
||||
this.getVersion()
|
||||
setTimeout(() => {
|
||||
this.searchOrder()
|
||||
}, 1000)
|
||||
},
|
||||
methods: {
|
||||
removeAll() {
|
||||
@@ -410,7 +663,6 @@ export default {
|
||||
this.itemFile = []
|
||||
},
|
||||
async selected(data) { // 选择需要导入的文件
|
||||
console.log(data, 1111)
|
||||
this.worksheet = data.worksheet // 获取每个多选文件的表格坐标及值
|
||||
this.itemFile = data.itemFile
|
||||
},
|
||||
@@ -441,17 +693,35 @@ export default {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', 'MES_基本变量_机型代码_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data.length > 0) this.engineTypeValue = response.data[0].发动机机型标志
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data.length) this.engineTypeValue = response.data[0].发动机机型标志
|
||||
this.engineType.push({
|
||||
label: response.data[i].发动机型号 + '-' + response.data[i].标识字符,
|
||||
label: response.data[i].发动机型号,
|
||||
value: response.data[i].发动机机型标志
|
||||
})
|
||||
this.engineType1.push({
|
||||
label: response.data[i].发动机型号,
|
||||
value: response.data[i].发动机机型标志
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.searchOrder()
|
||||
})
|
||||
},
|
||||
// 获取版本号
|
||||
getVersion() {
|
||||
this.versionList = []
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '电子看板_装配零件_版本_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data.length > 0) this.version = response.data[0].版本号
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.versionList.push({
|
||||
label: response.data[i].是否启用 === 1 ? `${response.data[i].版本号}【启用】` : response.data[i].版本号,
|
||||
value: response.data[i].版本号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 初始化获取订单号
|
||||
getStationNumber() {
|
||||
this.stationNumber = []
|
||||
@@ -468,17 +738,28 @@ export default {
|
||||
},
|
||||
// 查询订单
|
||||
searchOrder() {
|
||||
this.tableData = []
|
||||
var param = []
|
||||
const isVerification = this.isVerification === '' ? 9999 : this.isVerification
|
||||
param[0] = ['工位号', this.stationNumberValue]
|
||||
param[1] = ['产品型号代码', this.engineTypeValue]
|
||||
param[2] = ['是否验证', isVerification]
|
||||
param[3] = ['物料号', this.materialCode]
|
||||
param[4] = ['版本号', this.version]
|
||||
var Data = this.CreateData('11', '电子看板_装配零件_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.tableData = []
|
||||
if (response.data.length !== 0) {
|
||||
this.tableData = response.data
|
||||
}
|
||||
})
|
||||
},
|
||||
changeIsVerification(value) {
|
||||
if (value === 1) {
|
||||
this.form.verificationCode = this.form.orderNumber
|
||||
} else {
|
||||
this.form.verificationCode = '****'
|
||||
}
|
||||
},
|
||||
// 创建订单
|
||||
creatOrder(formName) {
|
||||
if (this.$refs[formName] !== undefined) {
|
||||
@@ -492,7 +773,11 @@ export default {
|
||||
this.form.number = ''
|
||||
this.form.manufactor = ''
|
||||
this.form.verificationValue = 0
|
||||
this.form.verificationCode = '****'
|
||||
this.form.verificationLength = 1
|
||||
this.form.verificationOrder = 0
|
||||
this.form.mainMaterialValue = 0
|
||||
this.form.batchValue = 0
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 提交新增订单
|
||||
@@ -501,24 +786,29 @@ export default {
|
||||
if (valid) {
|
||||
var param = []
|
||||
param[0] = ['工位号', this.form.stationNumberValue]
|
||||
param[1] = ['发动机型号', this.form.engineTypeValue]
|
||||
param[2] = ['物料号', this.form.partDrawing]
|
||||
param[1] = ['产品型号代码', this.form.engineTypeValue]
|
||||
param[2] = ['物料号', this.form.orderNumber]
|
||||
param[3] = ['零件名称', this.form.partName]
|
||||
param[4] = ['零件图号', this.form.partDrawing]
|
||||
param[5] = ['生产厂家', this.form.manufactor]
|
||||
param[6] = ['是否验证', this.form.verificationValue]
|
||||
param[7] = ['是否主物料', this.form.mainMaterialValue]
|
||||
param[8] = ['零件数量', this.form.number]
|
||||
var Data = this.CreateData('11', '电子看板_装配零件_SPC_增加', param)
|
||||
param[9] = ['验证规则', this.form.verificationCode]
|
||||
param[10] = ['验证长度', this.form.verificationLength]
|
||||
param[11] = ['验证顺序', this.form.verificationOrder]
|
||||
param[12] = ['版本号', this.form.version]
|
||||
param[13] = ['批次追溯', this.form.batchValue]
|
||||
var Data = this.CreateData('12', '电子看板_装配零件_SPC_增加', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0]['result'] === '1') {
|
||||
this.$message({
|
||||
message: response.data[0]['msg'],
|
||||
message: '物料增加成功!',
|
||||
type: 'success'
|
||||
})
|
||||
this.searchOrder()
|
||||
} else {
|
||||
this.$message.error(response.data[0]['msg'])
|
||||
this.$message.error('物料增加失败!')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -548,7 +838,7 @@ export default {
|
||||
this.dialogFormVisible4 = false
|
||||
},
|
||||
async submitAdd4() {
|
||||
let stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number
|
||||
let stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number, batchValue
|
||||
for (let i = 0; i < this.tableData.length; i++) {
|
||||
stationNumberValue = this.tableData[i].工位号
|
||||
orderNumber = this.tableData[i].物料号
|
||||
@@ -558,7 +848,8 @@ export default {
|
||||
verificationValue = this.tableData[i].是否验证
|
||||
mainMaterialValue = this.tableData[i].是否主物料
|
||||
number = this.tableData[i].零件数量
|
||||
await this.submitAdd5(stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number)
|
||||
batchValue = this.tableData[i].是否批次
|
||||
await this.submitAdd5(stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number, batchValue)
|
||||
}
|
||||
this.$message({
|
||||
message: '增加成功',
|
||||
@@ -568,7 +859,7 @@ export default {
|
||||
this.engineTypeValue = this.form4.engineTypeValue
|
||||
this.searchOrder()
|
||||
},
|
||||
async submitAdd5(stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number) {
|
||||
async submitAdd5(stationNumberValue, orderNumber, partName, partDrawing, manufactor, verificationValue, mainMaterialValue, number, batchValue) {
|
||||
var param = []
|
||||
param[0] = ['工位号', stationNumberValue]
|
||||
param[1] = ['发动机型号', this.form4.engineTypeValue]
|
||||
@@ -579,14 +870,13 @@ export default {
|
||||
param[6] = ['是否验证', verificationValue]
|
||||
param[7] = ['是否主物料', mainMaterialValue]
|
||||
param[8] = ['零件数量', number]
|
||||
param[9] = ['批次追溯', batchValue]
|
||||
var Data = this.CreateData('12', '电子看板_装配零件_SPC_增加', param)
|
||||
return new Promise((resolve, reject) => {
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
console.log('1')
|
||||
resolve(1)
|
||||
} else {
|
||||
console.log('0')
|
||||
reject(2)
|
||||
}
|
||||
})
|
||||
@@ -604,7 +894,7 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
var param = []
|
||||
param[0] = ['ID', row.id]
|
||||
param[0] = ['ID', row.ID]
|
||||
var Data = this.CreateData('12', '电子看板_装配零件_SPC_删除', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
@@ -626,26 +916,44 @@ export default {
|
||||
if (this.$refs['form1'] !== undefined) {
|
||||
this.$refs['form1'].resetFields()
|
||||
}
|
||||
console.log(row)
|
||||
this.form1.partName = row.零件名称
|
||||
this.form1.stationNumberValue = row.工位号
|
||||
// this.form1.orderNumber = row.物料号
|
||||
this.form1.partDrawing = row.物料号
|
||||
// this.form1.number = row.零件数量
|
||||
this.form1.engineTypeValue = row.工位号
|
||||
this.form1.orderNumber = row.物料号
|
||||
// this.form1.partDrawing = row.零件图号
|
||||
this.form1.number = row.零件数量
|
||||
// this.form1.manufactor = row.生产厂家
|
||||
this.form1.verificationValue = Number(row.是否验证)
|
||||
this.form1.verificationCode = row.零件图号
|
||||
this.form1.verificationLength = row.条码长度
|
||||
this.form1.verificationOrder = row.零件排序
|
||||
this.form1.version = row.版本号
|
||||
// this.form1.mainMaterialValue = Number(row.是否主物料)
|
||||
this.form1.batchValue = Number(row.是否批次)
|
||||
this.form1.ID = row.ID
|
||||
this.dialogFormVisible1 = true
|
||||
},
|
||||
// 提交修改订单
|
||||
submitAdd1() {
|
||||
this.$refs['form1'].validate((valid) => {
|
||||
submitAdd1(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
var param = []
|
||||
param[0] = ['ID', this.form1.ID]
|
||||
param[1] = ['零件名称', this.form1.partName]
|
||||
param[2] = ['是否验证', this.form1.verificationValue]
|
||||
var Data = this.CreateData('12', '电子看板_装配零件_修改', param)
|
||||
param[1] = ['物料号', this.form1.orderNumber]
|
||||
param[2] = ['零件名称', this.form1.partName]
|
||||
param[3] = ['零件图号', this.form1.partDrawing]
|
||||
param[4] = ['生产厂家', this.form1.manufactor]
|
||||
param[5] = ['是否验证', this.form1.verificationValue]
|
||||
param[6] = ['是否主物料', this.form1.mainMaterialValue]
|
||||
param[7] = ['零件数量', this.form1.number]
|
||||
param[8] = ['工位号', this.form1.stationNumberValue]
|
||||
param[9] = ['发动机型号', this.engineTypeValue]
|
||||
param[10] = ['验证规则', this.form1.verificationCode]
|
||||
param[11] = ['验证长度', this.form1.verificationLength]
|
||||
param[12] = ['验证顺序', this.form1.verificationOrder]
|
||||
param[13] = ['批次追溯', this.form1.batchValue]
|
||||
var Data = this.CreateData('12', '电子看板_装配零件_SPC_修改', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message({
|
||||
@@ -664,9 +972,9 @@ export default {
|
||||
})
|
||||
},
|
||||
// 取消修改订单
|
||||
callOff1() {
|
||||
callOff1(formName) {
|
||||
this.$refs[formName].resetFields()
|
||||
this.dialogFormVisible1 = false
|
||||
this.$refs['form1'].resetFields()
|
||||
},
|
||||
// 多选
|
||||
handleSelectionChange(val) {
|
||||
@@ -708,7 +1016,6 @@ export default {
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '生产计划导入_确认导入前临时表_查询', param, this.pageSize, this.pageList)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
console.log(response.data)
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
this.loading = false
|
||||
@@ -716,7 +1023,6 @@ export default {
|
||||
},
|
||||
// 表格颜色变化
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
// console.log(row, rowIndex)
|
||||
if (rowIndex % 2 === 0) {
|
||||
return 'black'
|
||||
} else {
|
||||
@@ -838,6 +1144,7 @@ export default {
|
||||
param[9] = ['是否主物料', mainMaterialValue]
|
||||
param[10] = ['是否保存', isPreservation]
|
||||
param[11] = ['物料号', orderNumber]
|
||||
param[12] = ['是否批次', 0] // 导入时默认设置为否
|
||||
var Data = this.CreateData('12', '物料数据_导入Excel', param)
|
||||
const response = await this.ExecDatabase(Data)
|
||||
const res = response.data
|
||||
@@ -855,7 +1162,7 @@ export default {
|
||||
exportExcel() {
|
||||
if (this.tableData.length !== 0) {
|
||||
var param = []
|
||||
param[0] = ['发动机型号', this.engineTypeValue]
|
||||
param[0] = ['产品型号代码', this.engineTypeValue]
|
||||
param[1] = ['工位号', this.stationNumberValue]
|
||||
var Data = this.CreateData('2001', '电子看板_装配零件_总物料表_导出新', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
@@ -863,6 +1170,51 @@ export default {
|
||||
this.$message.warning('暂无数据')
|
||||
}
|
||||
},
|
||||
beforeUpload(file) {
|
||||
return true
|
||||
},
|
||||
handleSuccess({ results, header }) {
|
||||
const tableName = `基础数据_物料bom_导入临时表`
|
||||
console.log(tableName)
|
||||
var Data = this.CreateData('7', tableName, results, header)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
this.selectDate2()
|
||||
})
|
||||
},
|
||||
selectDate2() {
|
||||
this.tableDataListAll = []
|
||||
var param = []
|
||||
var Data = this.CreateData('11', '电子看板_装配零件_物料bom_导入临时表_查询', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data.length !== 0) {
|
||||
this.tableDataListAll = response.data
|
||||
}
|
||||
})
|
||||
},
|
||||
materialAddAllSubmit() {
|
||||
if (this.tableDataListAll.length === 0) {
|
||||
this.$message.error('内容为空')
|
||||
} else {
|
||||
var param = []
|
||||
var Data = this.CreateData('12', '电子看板_装配零件_物料BOM_导入临时表_确认导入', param)
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
if (response.data.length > 0) {
|
||||
if (response.data[0]['result'] === '1') {
|
||||
this.$message.success('导入成功!')
|
||||
this.dialogFormVisible3 = false
|
||||
this.searchOrder()
|
||||
} else {
|
||||
this.$message.error('导入失败!')
|
||||
}
|
||||
} else {
|
||||
this.$message.error('导入失败!')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
materialAddAllCancel() {
|
||||
this.dialogFormVisible3 = false
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">订单号:</span>
|
||||
<el-input v-model="orderNumberValue" placeholder="订单号" clearable size="small" style="width: 150px; "/>
|
||||
<span style="margin-left: 10px">产品图号:</span>
|
||||
<el-select v-model="engineTypeValue" placeholder="请选择产品图号" filterable clearable size="small" style="width: 250px">
|
||||
<span style="margin-left: 10px">产品型号:</span>
|
||||
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" filterable clearable size="small" style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in engineType"
|
||||
:key="item.value"
|
||||
@@ -35,17 +35,17 @@
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">生产时间:</span>
|
||||
<el-date-picker
|
||||
:clearable = "false"
|
||||
v-model="dateTime"
|
||||
size="small"
|
||||
type="daterange"
|
||||
:clearable="false"
|
||||
align="center"
|
||||
style="width: 250px;"
|
||||
value-format="yyyy-MM-dd"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
size="small"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
style="width: 240px;"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"/>
|
||||
<!--<span style="margin-left: 10px">批次条码:</span>-->
|
||||
<!--<el-input v-model="traceabilityCode" placeholder="请输入批次条码" clearable size="small" style="width: 200px; margin-left: 13px"/>-->
|
||||
<!--<span style="margin-left: 10px">精确追溯码:</span>-->
|
||||
@@ -150,7 +150,7 @@
|
||||
{{ scope.row.工位号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="产品图号">
|
||||
<el-table-column align="center" label="产品型号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发动机型号 }}
|
||||
</template>
|
||||
@@ -287,7 +287,7 @@ export default {
|
||||
}
|
||||
], // 是否合格
|
||||
isQualifiedValue: 2, // 是否合格
|
||||
dateTime: '', // 时间
|
||||
dateTime: [], // 时间
|
||||
loading: false, // 时间
|
||||
tableData: [], // 时间
|
||||
date: new Date(),
|
||||
@@ -299,7 +299,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.dateTime = [getNowShotTime(), getNowShotTime]
|
||||
this.dateTime = [getNowShotTime(), getNowShotTime()]
|
||||
this.getStationNumber()
|
||||
this.getEngineType()
|
||||
},
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
<!-- </el-select>-->
|
||||
<span style="margin-left: 10px">订单号:</span>
|
||||
<el-input v-model="orderNumberValue" placeholder="订单号" clearable size="small" style="width: 150px; margin-left: 5px"/>
|
||||
<span style="margin-left: 10px">产品图号:</span>
|
||||
<el-select v-model="engineTypeValue" placeholder="请选择产品图号" filterable clearable size="small" style="width: 250px">
|
||||
<span style="margin-left: 10px">产品型号:</span>
|
||||
<el-select v-model="engineTypeValue" placeholder="请选择产品型号" filterable clearable size="small" style="width: 150px">
|
||||
<el-option
|
||||
v-for="item in engineType"
|
||||
:key="item.value"
|
||||
@@ -130,7 +130,7 @@
|
||||
{{ scope.row.工位号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="产品图号">
|
||||
<el-table-column align="center" label="产品型号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.机型 }}
|
||||
</template>
|
||||
@@ -209,6 +209,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNowShotTime } from '../../../utils/tool'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -247,7 +249,7 @@ export default {
|
||||
}
|
||||
], // 是否合格
|
||||
isQualifiedValue: 1, // 是否合格
|
||||
dateTime: '', // 时间
|
||||
dateTime: [], // 时间
|
||||
loading: false, // 时间
|
||||
tableData: [], // 时间
|
||||
date: new Date(),
|
||||
@@ -259,13 +261,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
var year, month, day, audiTime
|
||||
this.date = new Date() // 修改数据date
|
||||
year = new Date().getFullYear()
|
||||
month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
|
||||
day = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
|
||||
audiTime = year + '-' + month + '-' + day
|
||||
this.dateTime = [audiTime, audiTime]
|
||||
this.dateTime = [getNowShotTime(), getNowShotTime()]
|
||||
this.getStationNumber()
|
||||
this.getEngineType()
|
||||
this.getStationNumberN()
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
</el-select>
|
||||
<span style="margin-left: 10px;letter-spacing: 3px">订单号:</span>
|
||||
<el-input v-model="orderNumberValue" placeholder="订单号" clearable size="small" style="width: 250px;"/>
|
||||
<span style="margin-left: 10px;">产品图号:</span>
|
||||
<span style="margin-left: 10px;">产品型号:</span>
|
||||
<el-select
|
||||
v-model="engineTypeValue"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择产品图号"
|
||||
placeholder="请选择产品型号"
|
||||
size="small"
|
||||
style="width: 250px">
|
||||
<el-option
|
||||
@@ -144,7 +144,7 @@
|
||||
{{ scope.row.工位号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="产品图号" width="120px">
|
||||
<el-table-column align="center" label="产品型号" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发动机型号 }}
|
||||
</template>
|
||||
@@ -214,6 +214,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getNowShotTime } from '../../../utils/tool'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -248,7 +250,7 @@ export default {
|
||||
}
|
||||
], // 是否合格
|
||||
isQualifiedValue: 1, // 是否合格
|
||||
dateTime: '', // 时间
|
||||
dateTime: [], // 时间
|
||||
loading: false, // 时间
|
||||
tableData: [], // 时间
|
||||
date: new Date(),
|
||||
@@ -260,14 +262,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
var year, month, day, audiTime
|
||||
this.date = new Date() // 修改数据date
|
||||
year = new Date().getFullYear()
|
||||
month = new Date().getMonth() + 1 < 10 ? '0' + (new Date().getMonth() + 1) : new Date().getMonth() + 1
|
||||
day = new Date().getDate() < 10 ? '0' + new Date().getDate() : new Date().getDate()
|
||||
audiTime = year + '-' + month + '-' + day
|
||||
console.log(audiTime, 'audiTime')
|
||||
this.dateTime = [audiTime, audiTime]
|
||||
this.dateTime = [getNowShotTime(), getNowShotTime()]
|
||||
this.getStationNumber()
|
||||
this.getEngineType()
|
||||
},
|
||||
@@ -296,7 +291,7 @@ export default {
|
||||
this.ExecDatabase(Data).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.stationNumber.push({
|
||||
label: response.data[i].工位号,
|
||||
label: `【${response.data[i].工位号}】${response.data[i].工位名称}`,
|
||||
value: response.data[i].工位号
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div class="app-container">
|
||||
<el-card class="topCard">
|
||||
<div class="topDiv">
|
||||
<span style="margin-left: 10px">产品图号:</span>
|
||||
<el-input v-model="equipmentType" style="width:150px;" clearable placeholder="产品图号" size="small"/>
|
||||
<span style="margin-left: 10px">产品型号:</span>
|
||||
<el-input v-model="equipmentType" style="width:150px;" clearable placeholder="产品型号" size="small"/>
|
||||
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchOrder()">查询</el-button>
|
||||
<!-- <el-button type="distribution" size="small" icon="el-icon-circle-plus" @click="creatOrder('form')">增加</el-button>-->
|
||||
</div>
|
||||
@@ -21,12 +21,12 @@
|
||||
style="width: 60%;"
|
||||
border
|
||||
size="mini">
|
||||
<el-table-column align="center" label="图号代码" width="100px">
|
||||
<el-table-column align="center" label="产品型号代码" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发动机机型标志 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="产品图号">
|
||||
<el-table-column align="center" label="产品型号">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发动机型号 }}
|
||||
</template>
|
||||
@@ -36,7 +36,7 @@
|
||||
<!-- {{ scope.row.配方号 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column align="center" label="结构">
|
||||
<el-table-column align="center" label="大机型">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.标识字符 }}
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<el-menu class="navbar" mode="horizontal" style="background: #1576e8!important;">
|
||||
<hamburger :toggle-click="toggleSideBar" :is-active="sidebar.opened" class="hamburger-container"/>
|
||||
<breadcrumb />
|
||||
<span style="display: inline-block;position: absolute;right: 100px;font-size: 16px;color: #fff">550KV GIS隔离开关信息管理系统</span>
|
||||
<el-dropdown class="avatar-container" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="require('@/assets/img/leftPic.png')" class="user-avatar">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<div v-show="isShow" class="img-wrapper">
|
||||
<img :src="require('@/assets/img/LOGO.png')" width="165px" height="49px">
|
||||
<img :src="require('@/assets/img/LOGO1.png')" height="49px">
|
||||
<!-- <span style="font-size: 18px; font-weight: bold; color: white;margin-top: 7px">迈思信息<br>-->
|
||||
<!-- <span style="font-size: 13px; color: white;margin-top: 0px!important;">MESWORK</span>-->
|
||||
<!-- </span>-->
|
||||
|
||||
@@ -1,338 +1,394 @@
|
||||
<template>
|
||||
<div class="scanner-container">
|
||||
<div class="scanner-header">
|
||||
<h1>平板摄像头扫码器</h1>
|
||||
<p>将二维码对准扫描框即可自动识别</p>
|
||||
<div>
|
||||
<div class="login-container">
|
||||
<!-- <i class="login-img"/>-->
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
auto-complete="on"
|
||||
label-position="left"
|
||||
label-width="0px"
|
||||
class="card-box login-form">
|
||||
<h1 class="title">
|
||||
<img :src="require('@/assets/img/LOGO.png')" alt="" style="height: 50px;align-items: center;">
|
||||
<div style="margin-left: 65px">
|
||||
<!-- <div>550KV GIS隔离开关</div> -->
|
||||
<div>智能装配线信息管理系统</div>
|
||||
</div>
|
||||
<div class="scanner-content">
|
||||
<div class="video-container">
|
||||
<video id="video" autoplay playsinline></video>
|
||||
<div class="scan-area">
|
||||
<div class="scan-line"></div>
|
||||
</h1>
|
||||
<div class="line"/>
|
||||
<div class="content">
|
||||
<el-form-item prop="username">
|
||||
<span class="svg-container svg-container_login">
|
||||
<svg-icon icon-class="username" />
|
||||
</span>
|
||||
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="off" placeholder="请输入用户名" @input.native="changeUser" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="password"/>
|
||||
</span>
|
||||
<el-input
|
||||
:type="pwdType"
|
||||
v-model="loginForm.password"
|
||||
name="password"
|
||||
auto-complete="on"
|
||||
placeholder="请输入密码"
|
||||
@keyup.enter.native="handleLogin"/>
|
||||
<span class="show-pwd" @click="showPwd"><svg-icon icon-class="eye" /></span>
|
||||
</el-form-item>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-checkbox v-model="loginForm.checked" class="remeberPassword">记住密码</el-checkbox>
|
||||
<el-button type="text" style="margin-left: 190px;color: #1576e8" @click="handleEdit('form')">修改密码</el-button>
|
||||
</div>
|
||||
<el-button :loading="loading" class="signIn" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||
<span style="font-size: 20px!important;">登录</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="status" :class="statusClass" v-if="statusMessage">
|
||||
{{ statusMessage }}
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="修改密码" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="考勤编号" prop="Account" style="display: inline-block">
|
||||
<el-input v-model="form.Account" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始密码" prop="beforPassword" style="display: inline-block">
|
||||
<el-input v-model="form.beforPassword" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword" style="display: inline-block">
|
||||
<el-input v-model="form.newPassword" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="againPassword" style="display: inline-block">
|
||||
<el-input v-model="form.againPassword" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="EditPassword('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<div class="controls">
|
||||
<button class="btn-primary" @click="startScanning" :disabled="isScanning">
|
||||
<svg class="icon" viewBox="0 0 24 24" fill="white">
|
||||
<path d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" />
|
||||
</svg>
|
||||
开始扫描
|
||||
</button>
|
||||
<button class="btn-secondary" @click="stopScanning">
|
||||
<svg class="icon" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M12,2C17.52,2 22,6.48 22,12C22,17.52 17.52,22 12,22C6.48,22 2,17.52 2,12C2,6.48 6.48,2 12,2M12,4C7.58,4 4,7.58 4,12C4,16.42 7.58,20 12,20C16.42,20 20,16.42 20,12C20,7.58 16.42,4 12,4M12,10.5C11.17,10.5 10.5,11.17 10.5,12C10.5,12.83 11.17,13.5 12,13.5C12.83,13.5 13.5,12.83 13.5,12C13.5,11.17 12.83,10.5 12,10.5Z" />
|
||||
</svg>
|
||||
停止扫描
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="result-container" v-if="scanResult">
|
||||
<div class="result-title">扫描结果:</div>
|
||||
<div class="result-content">{{ scanResult }}</div>
|
||||
</div>
|
||||
|
||||
<div class="performance-info" v-if="showPerformanceWarning">
|
||||
<strong>性能提示:</strong> 已启用性能优化模式,降低扫描频率以避免浏览器警告。
|
||||
</div>
|
||||
|
||||
<div class="instructions">
|
||||
<h3>使用说明sad:</h3>
|
||||
<ul>
|
||||
<li>点击"开始扫描"按钮启用摄像头</li>
|
||||
<li>将二维码置于扫描框内,系统会自动识别</li>
|
||||
<li>确保环境光线充足,二维码清晰可见</li>
|
||||
<li>扫描完成后可点击"停止扫描"关闭摄像头</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { cloudEditPassword, editPassword } from '@/api/login'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
const validateValue = (rules, value, callback) => {
|
||||
if (this.form.newPassword !== this.form.againPassword) {
|
||||
callback(new Error('两次输入密码不同'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
// if (!isvalidUsername(value)) {
|
||||
// callback(new Error('请输入4-5位工号'))
|
||||
// } else {
|
||||
// callback()
|
||||
// }
|
||||
callback()
|
||||
}
|
||||
// const validatePass = (rule, value, callback) => {
|
||||
// if (value.length < 5) {
|
||||
// callback(new Error('密码不能小于5位'))
|
||||
// } else {
|
||||
// callback()
|
||||
// }
|
||||
// }
|
||||
return {
|
||||
video: null,
|
||||
canvas: null,
|
||||
context: null,
|
||||
isScanning: false,
|
||||
scanResult: '',
|
||||
statusMessage: '',
|
||||
statusClass: 'info',
|
||||
stream: null,
|
||||
scanInterval: null,
|
||||
lastScanTime: 0,
|
||||
scanDelay: 300, // 扫描间隔(毫秒)
|
||||
showPerformanceWarning: false
|
||||
rules: {
|
||||
againPassword: [
|
||||
{ required: true, message: '请输入确认密码', trigger: 'blur' },
|
||||
{ required: true, trigger: 'blur', validator: validateValue }],
|
||||
Account: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
beforPassword: [{ required: true, message: '请输入原始密码', trigger: 'blur' }],
|
||||
newPassword: [{ required: true, message: '请输入新密码', trigger: 'blur' }]
|
||||
},
|
||||
list: [],
|
||||
form: {
|
||||
againPassword: '',
|
||||
Account: '',
|
||||
beforPassword: '',
|
||||
newPassword: ''
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: '',
|
||||
checked: false
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }]
|
||||
// password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
||||
},
|
||||
loading: false,
|
||||
pwdType: 'password'
|
||||
}
|
||||
},
|
||||
// 页面加载调用获取cookie值
|
||||
mounted() {
|
||||
this.video = document.getElementById('video');
|
||||
this.canvas = document.createElement('canvas');
|
||||
this.context = this.canvas.getContext('2d');
|
||||
this.statusMessage = '点击"开始扫描"按钮启用摄像头';
|
||||
|
||||
// 检测设备性能并调整扫描频率
|
||||
this.adjustPerformance();
|
||||
this.getCookie()
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.stopScanning()
|
||||
},
|
||||
|
||||
methods: {
|
||||
async startScanning() {
|
||||
this.statusMessage = '正在请求摄像头权限...'
|
||||
this.statusClass = 'info'
|
||||
|
||||
try {
|
||||
// 请求摄像头访问权限
|
||||
this.stream = await navigator.mediaDevices.getUserMedia({
|
||||
video: {
|
||||
facingMode: 'environment', // 优先使用后置摄像头
|
||||
width: { ideal: 1280 },
|
||||
height: { ideal: 720 }
|
||||
showPwd() {
|
||||
if (this.pwdType === 'password') {
|
||||
this.pwdType = ''
|
||||
} else {
|
||||
this.pwdType = 'password'
|
||||
}
|
||||
},
|
||||
changeUser() {
|
||||
this.loginForm.password = ''
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
||||
this.loading = false
|
||||
this.$router.push({ path: '/' })
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
if (this.loginForm.checked === true) { // 传入账号名,密码,和保存天数3个参数
|
||||
this.setCookie(this.loginForm.username, this.loginForm.password, this.loginForm.checked)
|
||||
} else {
|
||||
this.clearCookie()
|
||||
}
|
||||
})
|
||||
|
||||
this.video.srcObject = this.stream
|
||||
this.isScanning = true
|
||||
this.statusMessage = '摄像头已启用,请将二维码对准扫描框'
|
||||
this.statusClass = 'info'
|
||||
this.scanResult = ''
|
||||
|
||||
// 使用setInterval替代requestAnimationFrame,控制扫描频率
|
||||
this.scanInterval = setInterval(() => {
|
||||
this.scanQRCode()
|
||||
}, this.scanDelay)
|
||||
} catch (error) {
|
||||
console.error('无法访问摄像头:', error)
|
||||
this.statusMessage = '无法访问摄像头: ' + error.message
|
||||
this.statusClass = 'error'
|
||||
}
|
||||
},
|
||||
|
||||
stopScanning() {
|
||||
this.isScanning = false
|
||||
if (this.scanInterval) {
|
||||
clearInterval(this.scanInterval)
|
||||
this.scanInterval = null
|
||||
}
|
||||
if (this.stream) {
|
||||
this.stream.getTracks().forEach(track => track.stop())
|
||||
this.stream = null
|
||||
}
|
||||
this.statusMessage = '扫描已停止'
|
||||
this.statusClass = 'info'
|
||||
// 设置cookie
|
||||
setCookie(username, password, checked) {
|
||||
Cookie.set('username', username, { expires: 7 })
|
||||
Cookie.set('password', password, { expires: 7 })
|
||||
Cookie.set('checked', checked, { expires: 7 })
|
||||
},
|
||||
|
||||
scanQRCode() {
|
||||
if (!this.isScanning || !this.video.readyState === this.video.HAVE_ENOUGH_DATA) return
|
||||
|
||||
// 设置canvas尺寸与视频一致
|
||||
this.canvas.width = this.video.videoWidth
|
||||
this.canvas.height = this.video.videoHeight
|
||||
|
||||
// 绘制当前视频帧到canvas
|
||||
this.context.drawImage(this.video, 0, 0, this.canvas.width, this.canvas.height)
|
||||
|
||||
// 获取图像数据
|
||||
const imageData = this.context.getImageData(0, 0, this.canvas.width, this.canvas.height)
|
||||
|
||||
// 使用jsQR库识别二维码
|
||||
try {
|
||||
const code = jsQR(imageData.data, imageData.width, imageData.height, {
|
||||
inversionAttempts: 'dontInvert'
|
||||
// 读取 cookie
|
||||
getCookie() {
|
||||
this.loginForm.username = Cookie.get('username')
|
||||
this.loginForm.password = Cookie.get('password')
|
||||
this.loginForm.checked = Boolean(Cookie.get('checked'))
|
||||
},
|
||||
// 清除cookie
|
||||
clearCookie() {
|
||||
Cookie.remove('username')
|
||||
Cookie.remove('password')
|
||||
Cookie.remove('checked')
|
||||
},
|
||||
handleEdit() {
|
||||
this.addForm('form', [this.dialogFormVisible = true])
|
||||
},
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
EditPassword(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editPassword(this.form.Account, this.form.beforPassword, this.form.newPassword, 5).then(response => {
|
||||
if (response.data.result[0].result === '1') {
|
||||
if (response.data.output[0].返回 === '1') {
|
||||
cloudEditPassword(this.form.Account, this.form.newPassword).then(response => {
|
||||
console.log(response, 333)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogFormVisible = false
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
|
||||
if (code) {
|
||||
this.scanResult = code.data
|
||||
this.statusMessage = '二维码识别成功!'
|
||||
this.statusClass = 'success'
|
||||
|
||||
// 识别成功后可以继续扫描或停止扫描
|
||||
// this.stopScanning();
|
||||
} else {
|
||||
this.$message.error('用户名或密码不正确')
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('二维码识别出错:', error)
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
},
|
||||
|
||||
adjustPerformance() {
|
||||
// 根据设备性能调整扫描频率
|
||||
const isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
|
||||
if (isMobile) {
|
||||
this.scanDelay = 500 // 移动设备上降低扫描频率
|
||||
this.showPerformanceWarning = true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.scanner-container {
|
||||
$bg:#2d3a4b;
|
||||
$dark_gray:#889aa4;
|
||||
$light_gray:#eee;
|
||||
|
||||
.login-container {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width:100%;
|
||||
max-width: 800px;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
background-color: #ebebeb;
|
||||
background-image:url("../../../static/login.png");background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;
|
||||
input:-webkit-autofill {
|
||||
-webkit-box-shadow: 0 0 0 1000px #293444 inset !important;
|
||||
-webkit-text-fill-color: #fff !important;
|
||||
}
|
||||
/*.login-img{*/
|
||||
/* position: absolute;*/
|
||||
/* width: 100%;*/
|
||||
/* height: 100%;*/
|
||||
/* background: url("../../../static/login.png") no-repeat;*/
|
||||
/*}*/
|
||||
input {
|
||||
background: transparent;
|
||||
border: 1px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
height: 47px;
|
||||
}
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
width: 85%;
|
||||
}
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: #1576e8;
|
||||
font-size: 20px!important;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
&_login {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 22px;
|
||||
line-height: 30px;
|
||||
color: #1576e8;
|
||||
margin: 0 auto 20px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-family: 微软雅黑Regular&Bold;
|
||||
display: flex;
|
||||
}
|
||||
.content{
|
||||
width: 330px;
|
||||
margin: 30px auto 0 auto;
|
||||
}
|
||||
.line{
|
||||
width: 100%;
|
||||
margin: 0 auto 25px auto;
|
||||
background-color: #1576e8;
|
||||
height: 1px;
|
||||
}
|
||||
.login-form {
|
||||
height: 500px;
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 400px;
|
||||
padding: 35px 15px 15px 15px;
|
||||
margin: 120px auto;
|
||||
}
|
||||
.scanner-header {
|
||||
background: linear-gradient(to right, #4a00e0, #8e2de2);
|
||||
color: white;
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.scanner-header h1 {
|
||||
font-size: 1.8rem;
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
.scanner-header p {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.scanner-content {
|
||||
padding: 30px;
|
||||
}
|
||||
.video-container {
|
||||
position: relative;
|
||||
.el-input__inner{
|
||||
border: none!important;
|
||||
font-size: 18px!important;
|
||||
color: #29335b!important;
|
||||
}
|
||||
.el-form-item {
|
||||
border: 1px solid #1576e8;
|
||||
background: #ffffff;
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
/*登录button*/
|
||||
.signIn{
|
||||
width: 100%;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
#video {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
background-color: #000;
|
||||
}
|
||||
.scan-area {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 70%;
|
||||
height: 200px;
|
||||
border: 2px solid #4a00e0;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.3);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.scan-line {
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #4a00e0;
|
||||
position: absolute;
|
||||
animation: scan 2s linear infinite;
|
||||
}
|
||||
@keyframes scan {
|
||||
0% { top: 0; }
|
||||
50% { top: calc(100% - 2px); }
|
||||
100% { top: 0; }
|
||||
}
|
||||
.controls {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 15px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
button {
|
||||
padding: 12px 25px;
|
||||
border: none;
|
||||
border-radius: 50px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.btn-primary {
|
||||
background: linear-gradient(to right, #4a00e0, #8e2de2);
|
||||
margin-top: 20px;
|
||||
border-radius: 5px;
|
||||
font-size: 18px;
|
||||
color:white;
|
||||
background: -webkit-linear-gradient(left, #1576e8 , #9fd2ab); /* Safari 5.1 - 6.0 */
|
||||
background: -o-linear-gradient(right, #1576e8, #9fd2ab); /* Opera 11.1 - 12.0 */
|
||||
background: -moz-linear-gradient(right, #1576e8, #9fd2ab); /* Firefox 3.6 - 15 */
|
||||
background: linear-gradient(to right, #1576e8 , #9fd2ab); /* 标准的语法(必须放在最后) */
|
||||
}
|
||||
.btn-primary:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 5px 15px rgba(142, 45, 226, 0.4);
|
||||
.remeberPassword{
|
||||
color: #1576e8;
|
||||
}
|
||||
.btn-secondary {
|
||||
background: #f0f0f0;
|
||||
color: #333;
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: #1576e8;
|
||||
cursor: pointer;
|
||||
user-select:none;
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
background: #e0e0e0;
|
||||
@media (min-width: 1024px) {
|
||||
/*根据屏幕大小确定显示的位置*/
|
||||
.login-form{
|
||||
position: absolute;
|
||||
left: 40%;
|
||||
top: 0;
|
||||
width: 600px;
|
||||
}
|
||||
.result-container {
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
border-left: 4px solid #4a00e0;
|
||||
.title{
|
||||
font-size: 32px!important;
|
||||
line-height: 32px;
|
||||
}
|
||||
.result-title {
|
||||
font-weight: 600;
|
||||
margin-bottom: 10px;
|
||||
color: #4a00e0;
|
||||
.el-form-item{
|
||||
width: 400px;
|
||||
height: 48px;
|
||||
}
|
||||
.result-content {
|
||||
word-break: break-all;
|
||||
background: white;
|
||||
padding: 15px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid #e0e0e0;
|
||||
.content{
|
||||
width: 400px;
|
||||
}
|
||||
.status {
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
.status.success {
|
||||
background-color: #d4edda;
|
||||
color: #155724;
|
||||
border: 1px solid #c3e6cb;
|
||||
@media (min-width: 1281px) {
|
||||
.login-form{
|
||||
position: absolute;
|
||||
left: 30%;
|
||||
top: 6%;
|
||||
width: 600px;
|
||||
}
|
||||
.status.error {
|
||||
background-color: #f8d7da;
|
||||
color: #721c24;
|
||||
border: 1px solid #f5c6cb;
|
||||
}
|
||||
.status.info {
|
||||
background-color: #d1ecf1;
|
||||
color: #0c5460;
|
||||
border: 1px solid #bee5eb;
|
||||
}
|
||||
.instructions {
|
||||
background-color: #e8f4fd;
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
margin-top: 20px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.instructions h3 {
|
||||
color: #4a00e0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.instructions ul {
|
||||
padding-left: 20px;
|
||||
}
|
||||
.instructions li {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.remeberPassword .el-checkbox__inner:hover{
|
||||
border: 1px solid #1576e8;
|
||||
}
|
||||
.remeberPassword .el-checkbox__input.is-checked .el-checkbox__inner{
|
||||
background-color: #1576e8;
|
||||
border-color: #1576e8;
|
||||
}
|
||||
.remeberPassword .el-checkbox__input.is-checked+.el-checkbox__label{
|
||||
color: #1576e8;
|
||||
}
|
||||
.remeberPassword .el-checkbox__input.is-focus .el-checkbox__inner{
|
||||
border-color: #1576e8;
|
||||
}
|
||||
.login-container input:-webkit-autofill{
|
||||
-webkit-box-shadow:0 0 0 1000px #fff inset !important;
|
||||
-webkit-text-fill-color: #29335b !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,394 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="login-container">
|
||||
<!-- <i class="login-img"/>-->
|
||||
<el-form
|
||||
ref="loginForm"
|
||||
:model="loginForm"
|
||||
:rules="loginRules"
|
||||
auto-complete="on"
|
||||
label-position="left"
|
||||
label-width="0px"
|
||||
class="card-box login-form">
|
||||
<h1 class="title">
|
||||
<img :src="require('@/assets/img/LOGO.png')" alt="" style="height: 50px;align-items: center;">
|
||||
<div style="margin-left: 30px">
|
||||
<div>550KV GIS隔离开关</div>
|
||||
<div>信息管理系统</div>
|
||||
</div>
|
||||
</h1>
|
||||
<div class="line"/>
|
||||
<div class="content">
|
||||
<el-form-item prop="username">
|
||||
<span class="svg-container svg-container_login">
|
||||
<svg-icon icon-class="username" />
|
||||
</span>
|
||||
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="off" placeholder="请输入用户名" @input.native="changeUser" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span class="svg-container">
|
||||
<svg-icon icon-class="password"/>
|
||||
</span>
|
||||
<el-input
|
||||
:type="pwdType"
|
||||
v-model="loginForm.password"
|
||||
name="password"
|
||||
auto-complete="on"
|
||||
placeholder="请输入密码"
|
||||
@keyup.enter.native="handleLogin"/>
|
||||
<span class="show-pwd" @click="showPwd"><svg-icon icon-class="eye" /></span>
|
||||
</el-form-item>
|
||||
<div style="display: flex;align-items: center;">
|
||||
<el-checkbox v-model="loginForm.checked" class="remeberPassword">记住密码</el-checkbox>
|
||||
<el-button type="text" style="margin-left: 190px;color: #1576e8" @click="handleEdit('form')">修改密码</el-button>
|
||||
</div>
|
||||
<el-button :loading="loading" class="signIn" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||
<span style="font-size: 20px!important;">登录</span>
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<el-dialog :visible.sync="dialogFormVisible" title="修改密码" center style="min-height: 200px" width="400px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px">
|
||||
<el-form-item label="考勤编号" prop="Account" style="display: inline-block">
|
||||
<el-input v-model="form.Account" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="原始密码" prop="beforPassword" style="display: inline-block">
|
||||
<el-input v-model="form.beforPassword" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="newPassword" style="display: inline-block">
|
||||
<el-input v-model="form.newPassword" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码" prop="againPassword" style="display: inline-block">
|
||||
<el-input v-model="form.againPassword" size="small" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="callOff()">取消</el-button>
|
||||
<el-button type="primary" size="small" @click="EditPassword('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { cloudEditPassword, editPassword } from '@/api/login'
|
||||
import Cookie from 'js-cookie'
|
||||
|
||||
export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
const validateValue = (rules, value, callback) => {
|
||||
if (this.form.newPassword !== this.form.againPassword) {
|
||||
callback(new Error('两次输入密码不同'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
// if (!isvalidUsername(value)) {
|
||||
// callback(new Error('请输入4-5位工号'))
|
||||
// } else {
|
||||
// callback()
|
||||
// }
|
||||
callback()
|
||||
}
|
||||
// const validatePass = (rule, value, callback) => {
|
||||
// if (value.length < 5) {
|
||||
// callback(new Error('密码不能小于5位'))
|
||||
// } else {
|
||||
// callback()
|
||||
// }
|
||||
// }
|
||||
return {
|
||||
rules: {
|
||||
againPassword: [
|
||||
{ required: true, message: '请输入确认密码', trigger: 'blur' },
|
||||
{ required: true, trigger: 'blur', validator: validateValue }],
|
||||
Account: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
||||
beforPassword: [{ required: true, message: '请输入原始密码', trigger: 'blur' }],
|
||||
newPassword: [{ required: true, message: '请输入新密码', trigger: 'blur' }]
|
||||
},
|
||||
list: [],
|
||||
form: {
|
||||
againPassword: '',
|
||||
Account: '',
|
||||
beforPassword: '',
|
||||
newPassword: ''
|
||||
},
|
||||
dialogFormVisible: false,
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: '',
|
||||
checked: false
|
||||
},
|
||||
loginRules: {
|
||||
username: [{ required: true, trigger: 'blur', validator: validateUsername }]
|
||||
// password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
||||
},
|
||||
loading: false,
|
||||
pwdType: 'password'
|
||||
}
|
||||
},
|
||||
// 页面加载调用获取cookie值
|
||||
mounted() {
|
||||
this.getCookie()
|
||||
},
|
||||
methods: {
|
||||
showPwd() {
|
||||
if (this.pwdType === 'password') {
|
||||
this.pwdType = ''
|
||||
} else {
|
||||
this.pwdType = 'password'
|
||||
}
|
||||
},
|
||||
changeUser() {
|
||||
this.loginForm.password = ''
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.$store.dispatch('Login', this.loginForm).then(() => {
|
||||
this.loading = false
|
||||
this.$router.push({ path: '/' })
|
||||
}).catch(() => {
|
||||
this.loading = false
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
return false
|
||||
}
|
||||
if (this.loginForm.checked === true) { // 传入账号名,密码,和保存天数3个参数
|
||||
this.setCookie(this.loginForm.username, this.loginForm.password, this.loginForm.checked)
|
||||
} else {
|
||||
this.clearCookie()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置cookie
|
||||
setCookie(username, password, checked) {
|
||||
Cookie.set('username', username, { expires: 7 })
|
||||
Cookie.set('password', password, { expires: 7 })
|
||||
Cookie.set('checked', checked, { expires: 7 })
|
||||
},
|
||||
// 读取 cookie
|
||||
getCookie() {
|
||||
this.loginForm.username = Cookie.get('username')
|
||||
this.loginForm.password = Cookie.get('password')
|
||||
this.loginForm.checked = Boolean(Cookie.get('checked'))
|
||||
},
|
||||
// 清除cookie
|
||||
clearCookie() {
|
||||
Cookie.remove('username')
|
||||
Cookie.remove('password')
|
||||
Cookie.remove('checked')
|
||||
},
|
||||
handleEdit() {
|
||||
this.addForm('form', [this.dialogFormVisible = true])
|
||||
},
|
||||
callOff() {
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
EditPassword(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editPassword(this.form.Account, this.form.beforPassword, this.form.newPassword, 5).then(response => {
|
||||
if (response.data.result[0].result === '1') {
|
||||
if (response.data.output[0].返回 === '1') {
|
||||
cloudEditPassword(this.form.Account, this.form.newPassword).then(response => {
|
||||
console.log(response, 333)
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('修改成功')
|
||||
this.dialogFormVisible = false
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$message.error('用户名或密码不正确')
|
||||
}
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
$bg:#2d3a4b;
|
||||
$dark_gray:#889aa4;
|
||||
$light_gray:#eee;
|
||||
|
||||
.login-container {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width:100%;
|
||||
background-color: #ebebeb;
|
||||
background-image:url("../../../static/login.png");background-repeat:no-repeat; background-size:100% 100%;-moz-background-size:100% 100%;
|
||||
input:-webkit-autofill {
|
||||
-webkit-box-shadow: 0 0 0 1000px #293444 inset !important;
|
||||
-webkit-text-fill-color: #fff !important;
|
||||
}
|
||||
/*.login-img{*/
|
||||
/* position: absolute;*/
|
||||
/* width: 100%;*/
|
||||
/* height: 100%;*/
|
||||
/* background: url("../../../static/login.png") no-repeat;*/
|
||||
/*}*/
|
||||
input {
|
||||
background: transparent;
|
||||
border: 1px;
|
||||
-webkit-appearance: none;
|
||||
border-radius: 0;
|
||||
padding: 12px 5px 12px 15px;
|
||||
color: $light_gray;
|
||||
height: 47px;
|
||||
}
|
||||
.el-input {
|
||||
display: inline-block;
|
||||
height: 47px;
|
||||
width: 85%;
|
||||
}
|
||||
.svg-container {
|
||||
padding: 6px 5px 6px 15px;
|
||||
color: #1576e8;
|
||||
font-size: 20px!important;
|
||||
vertical-align: middle;
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
&_login {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.title {
|
||||
font-size: 22px;
|
||||
line-height: 30px;
|
||||
color: #1576e8;
|
||||
margin: 0 auto 20px auto;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-family: 微软雅黑Regular&Bold;
|
||||
display: flex;
|
||||
}
|
||||
.content{
|
||||
width: 330px;
|
||||
margin: 30px auto 0 auto;
|
||||
}
|
||||
.line{
|
||||
width: 100%;
|
||||
margin: 0 auto 25px auto;
|
||||
background-color: #1576e8;
|
||||
height: 1px;
|
||||
}
|
||||
.login-form {
|
||||
height: 500px;
|
||||
border-radius: 20px;
|
||||
background-color: white;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 400px;
|
||||
padding: 35px 15px 15px 15px;
|
||||
margin: 120px auto;
|
||||
}
|
||||
.tips {
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
span {
|
||||
&:first-of-type {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-input__inner{
|
||||
border: none!important;
|
||||
font-size: 18px!important;
|
||||
color: #29335b!important;
|
||||
}
|
||||
.el-form-item {
|
||||
border: 1px solid #1576e8;
|
||||
background: #ffffff;
|
||||
border-radius: 5px;
|
||||
color: #454545;
|
||||
}
|
||||
/*登录button*/
|
||||
.signIn{
|
||||
width: 100%;
|
||||
border: none;
|
||||
margin-top: 20px;
|
||||
border-radius: 5px;
|
||||
font-size: 18px;
|
||||
color:white;
|
||||
background: -webkit-linear-gradient(left, #1576e8 , #9fd2ab); /* Safari 5.1 - 6.0 */
|
||||
background: -o-linear-gradient(right, #1576e8, #9fd2ab); /* Opera 11.1 - 12.0 */
|
||||
background: -moz-linear-gradient(right, #1576e8, #9fd2ab); /* Firefox 3.6 - 15 */
|
||||
background: linear-gradient(to right, #1576e8 , #9fd2ab); /* 标准的语法(必须放在最后) */
|
||||
}
|
||||
.remeberPassword{
|
||||
color: #1576e8;
|
||||
}
|
||||
.show-pwd {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 7px;
|
||||
font-size: 16px;
|
||||
color: #1576e8;
|
||||
cursor: pointer;
|
||||
user-select:none;
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
/*根据屏幕大小确定显示的位置*/
|
||||
.login-form{
|
||||
position: absolute;
|
||||
left: 40%;
|
||||
top: 0;
|
||||
width: 600px;
|
||||
}
|
||||
.title{
|
||||
font-size: 32px!important;
|
||||
line-height: 32px;
|
||||
}
|
||||
.el-form-item{
|
||||
width: 400px;
|
||||
height: 48px;
|
||||
}
|
||||
.content{
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
@media (min-width: 1281px) {
|
||||
.login-form{
|
||||
position: absolute;
|
||||
left: 30%;
|
||||
top: 6%;
|
||||
width: 600px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.remeberPassword .el-checkbox__inner:hover{
|
||||
border: 1px solid #1576e8;
|
||||
}
|
||||
.remeberPassword .el-checkbox__input.is-checked .el-checkbox__inner{
|
||||
background-color: #1576e8;
|
||||
border-color: #1576e8;
|
||||
}
|
||||
.remeberPassword .el-checkbox__input.is-checked+.el-checkbox__label{
|
||||
color: #1576e8;
|
||||
}
|
||||
.remeberPassword .el-checkbox__input.is-focus .el-checkbox__inner{
|
||||
border-color: #1576e8;
|
||||
}
|
||||
.login-container input:-webkit-autofill{
|
||||
-webkit-box-shadow:0 0 0 1000px #fff inset !important;
|
||||
-webkit-text-fill-color: #29335b !important;
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@ window.g = {
|
||||
mqttIP: '192.168.0.80',
|
||||
mqttPortNumber: '8083',
|
||||
printTemplate: 'BQFT_BarCode_001',
|
||||
baseURL: 'http://127.0.0.1:10040',
|
||||
baseURL: 'http://127.0.0.1:10026',
|
||||
requestConfig_baseURL: 'http://127.0.0.1:9981/mes'
|
||||
// requestConfig_baseURL: 'http://10.89.33.67:6867/mes'
|
||||
}
|
||||
|
||||