Compare commits
8 Commits
d290da2b80
...
zjl
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e7ba1f519 | ||
|
|
4d87bcbd5b | ||
| 9f45efb1de | |||
| 890f9f4fb7 | |||
| d0ee6eb354 | |||
| 292b795bd1 | |||
| 0769e77c53 | |||
| 4ece565d5a |
14
package-lock.json
generated
@@ -11,7 +11,7 @@
|
|||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"element-ui": "^2.15.14",
|
"element-ui": "^2.15.14",
|
||||||
"simple-keyboard": "^3.7.45",
|
"simple-keyboard": "^3.7.47",
|
||||||
"simple-keyboard-layouts": "^3.3.55",
|
"simple-keyboard-layouts": "^3.3.55",
|
||||||
"vant": "^2.13.2",
|
"vant": "^2.13.2",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
@@ -10891,9 +10891,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/simple-keyboard": {
|
"node_modules/simple-keyboard": {
|
||||||
"version": "3.7.45",
|
"version": "3.7.47",
|
||||||
"resolved": "https://registry.npmmirror.com/simple-keyboard/-/simple-keyboard-3.7.45.tgz",
|
"resolved": "https://registry.npmmirror.com/simple-keyboard/-/simple-keyboard-3.7.47.tgz",
|
||||||
"integrity": "sha512-53BSay9h99V8GuHvBmiUiNesG4oFwTJpMcE/nf3VXWYX95njPJeLdhDzgFljIITjZ6nKXe8E2Lp7OMArI+R/Cw=="
|
"integrity": "sha512-NwtNAJF0OEjT6Qyn22AgybJPkxEJVHL56NYA8z/4lyrDQAyC2SoNLHdFK1ugsmL27AS80Jk473rboC31roj/fQ=="
|
||||||
},
|
},
|
||||||
"node_modules/simple-keyboard-layouts": {
|
"node_modules/simple-keyboard-layouts": {
|
||||||
"version": "3.3.55",
|
"version": "3.3.55",
|
||||||
@@ -21253,9 +21253,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"simple-keyboard": {
|
"simple-keyboard": {
|
||||||
"version": "3.7.45",
|
"version": "3.7.47",
|
||||||
"resolved": "https://registry.npmmirror.com/simple-keyboard/-/simple-keyboard-3.7.45.tgz",
|
"resolved": "https://registry.npmmirror.com/simple-keyboard/-/simple-keyboard-3.7.47.tgz",
|
||||||
"integrity": "sha512-53BSay9h99V8GuHvBmiUiNesG4oFwTJpMcE/nf3VXWYX95njPJeLdhDzgFljIITjZ6nKXe8E2Lp7OMArI+R/Cw=="
|
"integrity": "sha512-NwtNAJF0OEjT6Qyn22AgybJPkxEJVHL56NYA8z/4lyrDQAyC2SoNLHdFK1ugsmL27AS80Jk473rboC31roj/fQ=="
|
||||||
},
|
},
|
||||||
"simple-keyboard-layouts": {
|
"simple-keyboard-layouts": {
|
||||||
"version": "3.3.55",
|
"version": "3.3.55",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"axios": "^1.6.5",
|
"axios": "^1.6.5",
|
||||||
"core-js": "^3.8.3",
|
"core-js": "^3.8.3",
|
||||||
"element-ui": "^2.15.14",
|
"element-ui": "^2.15.14",
|
||||||
"simple-keyboard": "^3.7.45",
|
"simple-keyboard": "^3.7.47",
|
||||||
"simple-keyboard-layouts": "^3.3.55",
|
"simple-keyboard-layouts": "^3.3.55",
|
||||||
"vant": "^2.13.2",
|
"vant": "^2.13.2",
|
||||||
"vue": "^2.6.14",
|
"vue": "^2.6.14",
|
||||||
|
|||||||
16
src/App.vue
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-27 16:41:40
|
* @Date: 2023-12-27 16:41:40
|
||||||
* @LastEditTime: 2024-01-07 22:29:50
|
* @LastEditTime: 2024-02-18 09:26:27
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -31,18 +31,6 @@ export default {
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
}
|
margin: 0;
|
||||||
|
|
||||||
nav {
|
|
||||||
padding: 30px;
|
|
||||||
|
|
||||||
a {
|
|
||||||
font-weight: bold;
|
|
||||||
color: #2c3e50;
|
|
||||||
|
|
||||||
&.router-link-exact-active {
|
|
||||||
color: #42b983;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-20 11:05:00
|
* @Date: 2023-11-20 11:05:00
|
||||||
* @LastEditTime: 2024-01-29 16:51:45
|
* @LastEditTime: 2024-04-22 09:03:11
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description: 质量和报废
|
* @Description: 质量和报废
|
||||||
*/
|
*/
|
||||||
@@ -70,6 +70,15 @@ export function createInspection (data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 撤销质量检查信息
|
||||||
|
export function deleteByCancel (query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-inspection-record/deleteByCancel',
|
||||||
|
method: 'delete',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 获得所有报废日志列表
|
// 获得所有报废日志列表
|
||||||
export function scrapLogList (data) {
|
export function scrapLogList (data) {
|
||||||
return request({
|
return request({
|
||||||
@@ -87,3 +96,12 @@ export function authList (data) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重置按钮
|
||||||
|
export function resetBtn (data) {
|
||||||
|
return request({
|
||||||
|
url: '/base/quality-inspection-record/resetBtn',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
BIN
src/assets/1.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/2.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/assets/cancel.png
Normal file
|
After Width: | Height: | Size: 374 B |
BIN
src/assets/cancel1.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/cancel2.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/assets/form1.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
src/assets/form2.png
Normal file
|
After Width: | Height: | Size: 914 B |
BIN
src/assets/form3.png
Normal file
|
After Width: | Height: | Size: 673 B |
BIN
src/assets/form4.png
Normal file
|
After Width: | Height: | Size: 793 B |
BIN
src/assets/form5.png
Normal file
|
After Width: | Height: | Size: 692 B |
BIN
src/assets/form6.png
Normal file
|
After Width: | Height: | Size: 918 B |
BIN
src/assets/form7.png
Normal file
|
After Width: | Height: | Size: 595 B |
BIN
src/assets/refresh.png
Normal file
|
After Width: | Height: | Size: 336 B |
BIN
src/assets/reset.png
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
src/assets/sub-right.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-27 16:41:40
|
* @Date: 2023-12-27 16:41:40
|
||||||
* @LastEditTime: 2024-01-09 17:50:38
|
* @LastEditTime: 2024-03-28 10:45:26
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-11-20 11:02:29
|
* @Date: 2023-11-20 11:02:29
|
||||||
* @LastEditTime: 2024-01-30 14:45:55
|
* @LastEditTime: 2024-04-22 09:39:49
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@@ -13,9 +13,9 @@ import { MessageBox } from 'element-ui'
|
|||||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
|
||||||
|
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
// baseURL: 'http://192.168.1.20:48080',
|
|
||||||
// baseURL: 'http://192.168.1.78:48082/admin-api',
|
|
||||||
baseURL: 'http://192.168.0.33:48082/admin-api',
|
baseURL: 'http://192.168.0.33:48082/admin-api',
|
||||||
|
// baseURL: 'http://192.168.1.104:48082/admin-api',
|
||||||
|
// baseURL: 'http://192.168.1.78:48082/admin-api',
|
||||||
timeout: 30000,
|
timeout: 30000,
|
||||||
withCredentials: false
|
withCredentials: false
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-28 11:21:53
|
* @Date: 2023-12-28 11:21:53
|
||||||
* @LastEditTime: 2024-01-29 17:57:32
|
* @LastEditTime: 2024-04-10 11:10:56
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description: 登陆
|
* @Description: 登陆
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<van-row style="width: 100%; height: 40px; padding-top: 5px" type="flex" justify="space-between">
|
<van-row style="width: 100%; height: 15px; padding-top: 5px" type="flex" justify="space-between">
|
||||||
<van-col span="20"></van-col>
|
<van-col span="20"></van-col>
|
||||||
<van-col span="4" style="text-align: right">
|
<van-col span="4" style="text-align: right">
|
||||||
<img class="homeIcon" @click="goback" src="./../assets/back.png" alt="">
|
<img class="homeIcon" @click="goback" src="./../assets/back.png" alt="">
|
||||||
@@ -195,6 +195,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: 'home'
|
path: 'home'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.data.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-01-09 13:48:42
|
* @Date: 2024-01-09 13:48:42
|
||||||
* @LastEditTime: 2024-01-30 16:23:17
|
* @LastEditTime: 2024-04-22 09:33:28
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<img class="homeIcon" @click="toHome" src="./../assets/home.png" alt="">
|
<img class="homeIcon" @click="toHome" src="./../assets/home.png" alt="">
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
<van-row gutter="20" style="margin-top: -20px;">
|
<van-row gutter="10" style="margin-top: -20px;">
|
||||||
<van-col span="12">
|
<van-col span="12">
|
||||||
<van-dropdown-menu >
|
<van-dropdown-menu >
|
||||||
<van-dropdown-item v-model="listQuery.productionLineId" :options="lineArray" @change="getSection" />
|
<van-dropdown-item v-model="listQuery.productionLineId" :options="lineArray" @change="getSection" />
|
||||||
@@ -27,9 +27,38 @@
|
|||||||
</van-dropdown-menu>
|
</van-dropdown-menu>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
<div class="count">
|
<!-- <div class="count"> -->
|
||||||
本班次合计数量:{{ count }}
|
<van-row gutter="10">
|
||||||
|
<van-col span="12">
|
||||||
|
<div class="count">本班次合计数量:{{ count }}</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="12">
|
||||||
|
<van-row gutter="10" style="font-size: 9px">
|
||||||
|
<van-col span="8">
|
||||||
|
<div class="count" @click="getQuality">
|
||||||
|
<img style="width: 15px; height: 15px" src="./../assets/refresh.png" alt="">
|
||||||
|
<span style="margin-left: 10px">刷 新</span>
|
||||||
</div>
|
</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="8">
|
||||||
|
<div class="count" :style="[{ background: isCancel ? '#FFA927' : '#FFFFFF' }]" @click="isCancel = !isCancel">
|
||||||
|
<img style="width: 15px; height: 15px" src="./../assets/cancel.png" alt="">
|
||||||
|
<span style="margin-left: 10px">撤 销</span>
|
||||||
|
</div>
|
||||||
|
</van-col>
|
||||||
|
<van-col span="8">
|
||||||
|
<div v-show="showReset" class="count" @click="reset">
|
||||||
|
<img style="width: 15px; height: 15px" src="./../assets/reset.png" alt="">
|
||||||
|
<span style="margin-left: 10px">重 置</span>
|
||||||
|
</div>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
<el-scrollbar class="scollbar" ref="scrollbar" style="height: 100%" >
|
||||||
|
<el-backtop target=".scollbar .el-scrollbar__wrap" :visibility-height="10" :bottom="20">
|
||||||
|
<i class="el-icon-caret-top" />
|
||||||
|
</el-backtop>
|
||||||
<div class="content" v-for="(item, index) in typeList" :key="index">
|
<div class="content" v-for="(item, index) in typeList" :key="index">
|
||||||
<van-row type="flex" align="center" style="margin-left: -20px">
|
<van-row type="flex" align="center" style="margin-left: -20px">
|
||||||
<van-col span="1">
|
<van-col span="1">
|
||||||
@@ -41,7 +70,8 @@
|
|||||||
</van-row>
|
</van-row>
|
||||||
<van-row type="flex">
|
<van-row type="flex">
|
||||||
<van-col span="6" v-for="it in item" :key="it.id">
|
<van-col span="6" v-for="it in item" :key="it.id">
|
||||||
<div :class=" it.active ? 'flexActive' : 'flexItem'">
|
<div :class=" isCancel ? 'flexCancelItem' : 'flexItem'">
|
||||||
|
<!-- <div class="flexItem"> -->
|
||||||
<!-- <div> -->
|
<!-- <div> -->
|
||||||
<div class="contain">
|
<div class="contain">
|
||||||
<div class="leftDiv">{{ it.count }}</div>
|
<div class="leftDiv">{{ it.count }}</div>
|
||||||
@@ -54,17 +84,23 @@
|
|||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</div>
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
|
<!-- <div class="ext"></div> -->
|
||||||
|
<!-- <el-backtop target=".quality" :visibility-height="10" :bottom="10">
|
||||||
|
<i class="el-icon-caret-top" />
|
||||||
|
</el-backtop> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { qualityManage, createInspection, authList } from '@/api/quality'
|
import { qualityManage, createInspection, deleteByCancel, authList, resetBtn } from '@/api/quality'
|
||||||
import { getUserId } from '@/utils/auth'
|
import { getUserId } from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Quality',
|
name: 'Quality',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
isCancel: false,
|
||||||
lineArray: [],
|
lineArray: [],
|
||||||
sectionArray: [],
|
sectionArray: [],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
@@ -72,28 +108,75 @@ export default {
|
|||||||
sectionId: ''
|
sectionId: ''
|
||||||
},
|
},
|
||||||
count: 0,
|
count: 0,
|
||||||
typeList: []
|
typeList: [],
|
||||||
|
showReset: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
this.getLine()
|
this.getLine()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
reset () {
|
||||||
|
resetBtn(this.listQuery).then(res => {
|
||||||
|
if (res.data.data === true) {
|
||||||
|
this.typeList.forEach(item => {
|
||||||
|
item.forEach(it => {
|
||||||
|
it.count = 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
this.count = 0
|
||||||
|
this.$message.success('重置完成!')
|
||||||
|
} else {
|
||||||
|
this.typeList = []
|
||||||
|
this.count = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
addRecord (value) {
|
addRecord (value) {
|
||||||
const now = new Date() // 创建一个表示当前时间的Date对象
|
const now = new Date() // 创建一个表示当前时间的Date对象
|
||||||
const formattedTime = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')} ${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`
|
const formattedTime = `${now.getFullYear()}-${(now.getMonth() + 1).toString().padStart(2, '0')}-${now.getDate().toString().padStart(2, '0')} ${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}:${now.getSeconds().toString().padStart(2, '0')}`
|
||||||
// console.log(formattedTime)
|
// console.log(formattedTime)
|
||||||
|
if (!this.isCancel) {
|
||||||
createInspection({
|
createInspection({
|
||||||
...this.listQuery,
|
...this.listQuery,
|
||||||
inspectionDetId: value.detId,
|
inspectionDetId: value.detId,
|
||||||
checkTime: formattedTime
|
checkTime: formattedTime
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
this.$set(value, 'active', true)
|
// this.typeList.forEach(element => {
|
||||||
|
// element.forEach(el => {
|
||||||
|
// el.active = false
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// value.active = true
|
||||||
|
// this.$set(value, 'active', true)
|
||||||
value.count++
|
value.count++
|
||||||
this.count++
|
this.count++
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
if (value.count > 0) {
|
||||||
|
deleteByCancel({
|
||||||
|
...this.listQuery,
|
||||||
|
inspectionDetId: value.detId,
|
||||||
|
checkTime: formattedTime
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
// this.typeList.forEach(element => {
|
||||||
|
// element.forEach(el => {
|
||||||
|
// el.active = false
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// value.active = true
|
||||||
|
// this.$set(value, 'active', true)
|
||||||
|
value.count--
|
||||||
|
this.count--
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.warning('数量小于0,不可操作')
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toHome () {
|
toHome () {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
@@ -101,10 +184,14 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getQuality () {
|
getQuality () {
|
||||||
|
// qualityManage().then(res => {
|
||||||
qualityManage(this.listQuery).then(res => {
|
qualityManage(this.listQuery).then(res => {
|
||||||
if (JSON.stringify(res.data.data) !== '{}') {
|
if (JSON.stringify(res.data.data) !== '{}') {
|
||||||
this.typeList = Object.values(res.data.data)
|
this.typeList = Object.values(res.data.data)
|
||||||
this.count = this.typeList[0][0].sunCount
|
this.count = this.typeList[0][0].sunCount
|
||||||
|
if (this.typeList[0][0]?.resetMethod === 1) {
|
||||||
|
this.resetMethod = true
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.typeList = []
|
this.typeList = []
|
||||||
this.count = 0
|
this.count = 0
|
||||||
@@ -113,8 +200,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getLine () {
|
getLine () {
|
||||||
authList({ userId: getUserId() }).then(res => {
|
authList({ userId: getUserId() }).then(res => {
|
||||||
console.log('res', res.data.data)
|
if (res && res?.data?.data?.datas?.length > 0) {
|
||||||
if (res && res.data.data.datas.length > 0) {
|
|
||||||
this.lineArray = res.data.data.datas.map(item => {
|
this.lineArray = res.data.data.datas.map(item => {
|
||||||
item.text = item.name
|
item.text = item.name
|
||||||
item.value = item.id
|
item.value = item.id
|
||||||
@@ -164,7 +250,27 @@ export default {
|
|||||||
width: 226px;
|
width: 226px;
|
||||||
line-height: 72px;
|
line-height: 72px;
|
||||||
box-shadow: 5px 6px 8px 0px rgba(206,212,226,0.72), inset 6px 0px 6px 0px #FFFFFF;
|
box-shadow: 5px 6px 8px 0px rgba(206,212,226,0.72), inset 6px 0px 6px 0px #FFFFFF;
|
||||||
background-color: #FFFFFF;
|
/* background-color: #FFFFFF; */
|
||||||
|
background-image: url('./../assets/2.png');
|
||||||
|
background-size: 100%;
|
||||||
|
}
|
||||||
|
.flexItem:active {
|
||||||
|
background-image: url('./../assets/1.png');
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
.flexCancelItem {
|
||||||
|
display: flex;
|
||||||
|
margin-right: 20px;
|
||||||
|
width: 226px;
|
||||||
|
line-height: 72px;
|
||||||
|
box-shadow: 5px 6px 8px 0px rgba(206,212,226,0.72), inset 6px 0px 6px 0px #FFFFFF;
|
||||||
|
/* background-color: #FFFFFF; */
|
||||||
|
background-image: url('./../assets/cancel1.png');
|
||||||
|
background-size: 100%;
|
||||||
|
}
|
||||||
|
.flexCancelItem:active {
|
||||||
|
background-image: url('./../assets/cancel2.png');
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.flexActive {
|
.flexActive {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -172,18 +278,22 @@ export default {
|
|||||||
width: 226px;
|
width: 226px;
|
||||||
line-height: 72px;
|
line-height: 72px;
|
||||||
box-shadow: 5px 6px 8px 0px rgba(206,212,226,0.72), inset 6px 0px 6px 0px #FFFFFF;
|
box-shadow: 5px 6px 8px 0px rgba(206,212,226,0.72), inset 6px 0px 6px 0px #FFFFFF;
|
||||||
background-color: #276BFF;
|
/* background-color: #456DFF; */
|
||||||
|
background-image: url('./../assets/1.png');
|
||||||
|
background-size: cover;
|
||||||
}
|
}
|
||||||
.rightDiv {
|
.rightDiv {
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
height: 72px;
|
/* height: 72px; */
|
||||||
line-height: 36px;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 24px;
|
||||||
width: 140px;
|
width: 140px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
display: -webkit-box;
|
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
-webkit-box-pack: center;
|
-webkit-box-pack: center;
|
||||||
/* text-align: justify; */
|
/* text-align: justify; */
|
||||||
@@ -198,14 +308,15 @@ export default {
|
|||||||
height: 72px;
|
height: 72px;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
line-height: 72px;
|
line-height: 72px;
|
||||||
background-color: #FFFFFF;
|
/* background-color: #FFFFFF; */
|
||||||
/* margin: 5px 0 5px 0; */
|
/* margin: 5px 0 5px 0; */
|
||||||
}
|
}
|
||||||
.leftDiv {
|
.leftDiv {
|
||||||
border-radius: 7px 36px 36px 7px;
|
border-radius: 7px 36px 36px 7px;
|
||||||
background-color: #276BFF;
|
/* background-color: #456DFF; */
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 77px;
|
width: 77px;
|
||||||
|
color: white;
|
||||||
line-height: 72px;
|
line-height: 72px;
|
||||||
/* margin: 5px 0 5px 0; */
|
/* margin: 5px 0 5px 0; */
|
||||||
}
|
}
|
||||||
@@ -228,6 +339,8 @@ export default {
|
|||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
padding: 0 20px 20px 20px;
|
padding: 0 20px 20px 20px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
/* overflow: scroll;
|
||||||
|
height: 100%; */
|
||||||
}
|
}
|
||||||
.count {
|
.count {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -249,9 +362,11 @@ export default {
|
|||||||
}
|
}
|
||||||
.quality {
|
.quality {
|
||||||
background-image: url('./../assets/quality-bg.png');
|
background-image: url('./../assets/quality-bg.png');
|
||||||
min-height: 100vh;
|
background-size: cover;
|
||||||
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
padding: 20px 20px;
|
padding: 20px 20px;
|
||||||
|
overflow: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-01-09 13:49:03
|
* @Date: 2024-01-09 13:49:03
|
||||||
* @LastEditTime: 2024-01-30 14:59:42
|
* @LastEditTime: 2024-04-22 09:36:10
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
<div style="height: 60px;">
|
<div style="height: 60px;">
|
||||||
<h2>报废管理</h2>
|
<h2>报废管理</h2>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
<!-- <van-row type="flex" class="search" justify="center">
|
||||||
|
<el-input v-model="form.data" @focus="onInputFocus('form.data',form.data)" ref="searchInput" placeholder="请输入关键词" >
|
||||||
|
</el-input>
|
||||||
|
</van-row> -->
|
||||||
<van-row type="flex" justify="space-between">
|
<van-row type="flex" justify="space-between">
|
||||||
<van-col span="5" style="text-align: left">
|
<van-col span="5" style="text-align: left">
|
||||||
<h2>报废管理</h2>
|
<h2>报废管理</h2>
|
||||||
@@ -26,6 +30,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="工单选择" prop="workOrderId">
|
<el-form-item label="工单选择" prop="workOrderId">
|
||||||
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form1.png" alt="">
|
||||||
|
工单选择
|
||||||
|
</div>
|
||||||
<el-select v-model="ruleForm.workOrderId" filterable clearable @focus="focusInput($event)" placeholder="请选择工单" style="width: 100%; display: block">
|
<el-select v-model="ruleForm.workOrderId" filterable clearable @focus="focusInput($event)" placeholder="请选择工单" style="width: 100%; display: block">
|
||||||
<el-option v-for="(item, index) in workOrderList" :key="index" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="(item, index) in workOrderList" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -35,7 +43,11 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="报废数量" prop="num">
|
<el-form-item label="报废数量" prop="num">
|
||||||
<el-input v-model="ruleForm.num" @focus="show = true" controls-position="right" :min="0" style="width: 100%; display: block"></el-input>
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form2.png" alt="">
|
||||||
|
报废数量
|
||||||
|
</div>
|
||||||
|
<el-input v-model="ruleForm.num" @focus="showNumber" clearable controls-position="right" :min="0" placeholder="请输入报废数量" style="width: 100%; display: block"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -48,6 +60,10 @@
|
|||||||
@delete="onDelete"
|
@delete="onDelete"
|
||||||
/>
|
/>
|
||||||
<el-form-item label="报废原因" prop="detName" class="reson">
|
<el-form-item label="报废原因" prop="detName" class="reson">
|
||||||
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form3.png" alt="">
|
||||||
|
报废原因
|
||||||
|
</div>
|
||||||
<br>
|
<br>
|
||||||
<div class="resonDiv">
|
<div class="resonDiv">
|
||||||
<el-checkbox-group v-model="ruleForm.detName" style="width: 100%; display: block; text-align: left">
|
<el-checkbox-group v-model="ruleForm.detName" style="width: 100%; display: block; text-align: left">
|
||||||
@@ -59,6 +75,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="产线" prop="lineId">
|
<el-form-item label="产线" prop="lineId">
|
||||||
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form4.png" alt="">
|
||||||
|
产线
|
||||||
|
</div>
|
||||||
<el-select v-model="ruleForm.lineId" filterable clearable placeholder="请选择产线" @focus="focusInput1($event)" style="width: 100%; display: block" @change="getSection">
|
<el-select v-model="ruleForm.lineId" filterable clearable placeholder="请选择产线" @focus="focusInput1($event)" style="width: 100%; display: block" @change="getSection">
|
||||||
<el-option v-for="(item, index) in lineArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="(item, index) in lineArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -68,6 +88,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="工段" prop="sectionId">
|
<el-form-item label="工段" prop="sectionId">
|
||||||
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form5.png" alt="">
|
||||||
|
工段
|
||||||
|
</div>
|
||||||
<el-select v-model="ruleForm.sectionId" filterable clearable placeholder="请选择产线" @focus="focusInput2($event)" style="width: 100%; display: block">
|
<el-select v-model="ruleForm.sectionId" filterable clearable placeholder="请选择产线" @focus="focusInput2($event)" style="width: 100%; display: block">
|
||||||
<el-option v-for="(item, index) in sectionArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
<el-option v-for="(item, index) in sectionArray" :key="index" :label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -79,14 +103,28 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="时间" prop="logTime">
|
<el-form-item label="时间" prop="logTime">
|
||||||
<el-date-picker type="datetime" placeholder="选择日期" value-format="timestamp" v-model="ruleForm.logTime" style="width: 100%;"></el-date-picker>
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form6.png" alt="">
|
||||||
|
时间
|
||||||
|
</div>
|
||||||
|
<div class="timeDiv">
|
||||||
|
<el-date-picker type="datetime" placeholder="选择日期" value-format="timestamp" v-model="ruleForm.logTime" style="width: 100%;">
|
||||||
|
</el-date-picker>
|
||||||
|
<div style="margin-right: 10px" @click="refresh">
|
||||||
|
<i class="el-icon-refresh-right" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="whiteForm">
|
<div class="whiteForm">
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="ruleForm.remark" @focus="focusInput3($event)"></el-input>
|
<div slot="label" class="labelDiv">
|
||||||
|
<img class="formLabelIcon" src="./../assets/form7.png" alt="">
|
||||||
|
备注
|
||||||
|
</div>
|
||||||
|
<el-input v-model="ruleForm.remark" @focus="focusInput3($event)" placeholder="请输入备注"></el-input>
|
||||||
<!-- <el-date-picker type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.logTime" style="width: 100%;"></el-date-picker> -->
|
<!-- <el-date-picker type="datetime" placeholder="选择日期" value-format="yyyy-MM-dd HH:mm:ss" v-model="ruleForm.logTime" style="width: 100%;"></el-date-picker> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -95,7 +133,8 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<!-- <el-button @click="resetForm('ruleForm')">取消</el-button> -->
|
<!-- <el-button @click="resetForm('ruleForm')">取消</el-button> -->
|
||||||
<el-button class="subButton" :disabled="disabled" type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
<!-- <el-button :disabled="disabled" type="primary" @click="submitForm('ruleForm')"> <i class="el-icon-sub"></i>11</el-button> -->
|
||||||
|
<el-button class="subButton" icon="el-icon-circle-check" :disabled="disabled" type="primary" @click="submitForm('ruleForm')">提交</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -143,6 +182,7 @@
|
|||||||
:input="inputValue3"
|
:input="inputValue3"
|
||||||
:maxLength="30"
|
:maxLength="30"
|
||||||
/>
|
/>
|
||||||
|
<!-- <KeysInput ref="keysInput" @input="updateInputValue" /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -150,11 +190,15 @@
|
|||||||
import { workOrderList, scrapDetList, createScrap, authList } from '@/api/quality'
|
import { workOrderList, scrapDetList, createScrap, authList } from '@/api/quality'
|
||||||
import SimpleKeyboard from './components/simpleKeyboard.vue'
|
import SimpleKeyboard from './components/simpleKeyboard.vue'
|
||||||
import { getUserId } from '@/utils/auth'
|
import { getUserId } from '@/utils/auth'
|
||||||
|
// import KeysInput from './components/keyboard'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SimpleKeyboard },
|
components: { SimpleKeyboard },
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
// form: {
|
||||||
|
// data: '11'
|
||||||
|
// },
|
||||||
ruleForm: {
|
ruleForm: {
|
||||||
workOrderId: '',
|
workOrderId: '',
|
||||||
num: '',
|
num: '',
|
||||||
@@ -182,6 +226,7 @@ export default {
|
|||||||
scrapList: [],
|
scrapList: [],
|
||||||
sectionArray: [],
|
sectionArray: [],
|
||||||
disabled: true,
|
disabled: true,
|
||||||
|
subIconUrl: require('@/assets/sub-right.png'),
|
||||||
rules: {
|
rules: {
|
||||||
// workOrderId: [
|
// workOrderId: [
|
||||||
// { required: true, message: '请选择工单', trigger: 'change' }
|
// { required: true, message: '请选择工单', trigger: 'change' }
|
||||||
@@ -257,6 +302,31 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onInputFocus (event, value) {
|
||||||
|
// 当前input获取焦点时,显示键盘
|
||||||
|
console.log('122', event, value)
|
||||||
|
this.$refs.keysInput.showKeyboard = true
|
||||||
|
// 传入绑定值(字符串)
|
||||||
|
this.$refs.keysInput.key = event
|
||||||
|
// 传入当前值
|
||||||
|
this.$refs.keysInput.setKeyboardInput(value)
|
||||||
|
},
|
||||||
|
updateInputValue (value) {
|
||||||
|
console.log('123232', value)
|
||||||
|
// 根据key 回写input值
|
||||||
|
const parameter = value.key.split('.')
|
||||||
|
console.log('122', parameter)
|
||||||
|
if (parameter.length === 1) {
|
||||||
|
value.key = value.value
|
||||||
|
} else {
|
||||||
|
// let par0 = parameter[0]
|
||||||
|
// let par1 = parameter[1]
|
||||||
|
// par0.par1 = value.value
|
||||||
|
}
|
||||||
|
},
|
||||||
|
refresh () {
|
||||||
|
this.ruleForm.logTime = new Date().getTime()
|
||||||
|
},
|
||||||
getSection (value) {
|
getSection (value) {
|
||||||
const temp = this.lineArray.filter(item => {
|
const temp = this.lineArray.filter(item => {
|
||||||
return item.id === value
|
return item.id === value
|
||||||
@@ -274,6 +344,13 @@ export default {
|
|||||||
inputFun () {
|
inputFun () {
|
||||||
this.$emit('input')
|
this.$emit('input')
|
||||||
},
|
},
|
||||||
|
showNumber () {
|
||||||
|
this.show = true
|
||||||
|
this.simpleShow = false
|
||||||
|
this.simpleShow1 = false
|
||||||
|
this.simpleShow2 = false
|
||||||
|
this.simpleShow3 = false
|
||||||
|
},
|
||||||
focusInput (e) {
|
focusInput (e) {
|
||||||
this.inputEle = e.srcElement
|
this.inputEle = e.srcElement
|
||||||
// 关闭所有keyboard
|
// 关闭所有keyboard
|
||||||
@@ -288,6 +365,7 @@ export default {
|
|||||||
this.simpleShow1 = false
|
this.simpleShow1 = false
|
||||||
this.simpleShow2 = false
|
this.simpleShow2 = false
|
||||||
this.simpleShow3 = false
|
this.simpleShow3 = false
|
||||||
|
this.show = false
|
||||||
// this.$emit('focus')
|
// this.$emit('focus')
|
||||||
},
|
},
|
||||||
focusInput1 (e) {
|
focusInput1 (e) {
|
||||||
@@ -296,6 +374,7 @@ export default {
|
|||||||
this.simpleShow = false
|
this.simpleShow = false
|
||||||
this.simpleShow2 = false
|
this.simpleShow2 = false
|
||||||
this.simpleShow3 = false
|
this.simpleShow3 = false
|
||||||
|
this.show = false
|
||||||
},
|
},
|
||||||
focusInput2 (e) {
|
focusInput2 (e) {
|
||||||
this.inputEle2 = e.srcElement
|
this.inputEle2 = e.srcElement
|
||||||
@@ -303,6 +382,7 @@ export default {
|
|||||||
this.simpleShow1 = false
|
this.simpleShow1 = false
|
||||||
this.simpleShow = false
|
this.simpleShow = false
|
||||||
this.simpleShow3 = false
|
this.simpleShow3 = false
|
||||||
|
this.show = false
|
||||||
},
|
},
|
||||||
focusInput3 (e) {
|
focusInput3 (e) {
|
||||||
this.inputEle3 = e.srcElement
|
this.inputEle3 = e.srcElement
|
||||||
@@ -310,6 +390,7 @@ export default {
|
|||||||
this.simpleShow2 = false
|
this.simpleShow2 = false
|
||||||
this.simpleShow1 = false
|
this.simpleShow1 = false
|
||||||
this.simpleShow = false
|
this.simpleShow = false
|
||||||
|
this.show = false
|
||||||
},
|
},
|
||||||
onChange1 (input) {
|
onChange1 (input) {
|
||||||
this.inputValue1 = input
|
this.inputValue1 = input
|
||||||
@@ -349,7 +430,6 @@ export default {
|
|||||||
console.log('onKeyPress', button)
|
console.log('onKeyPress', button)
|
||||||
},
|
},
|
||||||
onInput (value) {
|
onInput (value) {
|
||||||
// Toast(value);
|
|
||||||
console.log('value', value, this.ruleForm.num)
|
console.log('value', value, this.ruleForm.num)
|
||||||
},
|
},
|
||||||
onDelete () {
|
onDelete () {
|
||||||
@@ -373,8 +453,8 @@ export default {
|
|||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
await authList({ userId: getUserId() }).then(res => {
|
await authList({ userId: getUserId() }).then(res => {
|
||||||
console.log('res', res.data.data)
|
// console.log('res', res.data.data)
|
||||||
if (res && res.data.data.datas.length > 0) {
|
if (res && res?.data?.data?.datas.length > 0) {
|
||||||
this.lineArray = res.data.data.datas
|
this.lineArray = res.data.data.datas
|
||||||
this.ruleForm.lineId = this.lineArray[0].id
|
this.ruleForm.lineId = this.lineArray[0].id
|
||||||
this.getSection(this.ruleForm.lineId)
|
this.getSection(this.ruleForm.lineId)
|
||||||
@@ -403,6 +483,8 @@ export default {
|
|||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: 'list'
|
path: 'list'
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.data.msg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -419,22 +501,42 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.labelDiv {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.formLabelIcon {
|
||||||
|
width: 17px;
|
||||||
|
height: 17px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
.timeDiv {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
.subButton {
|
.subButton {
|
||||||
background-color: #456DFF;
|
background-color: #456DFF;
|
||||||
width: 168px;
|
width: 168px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
box-shadow: 0px 16px 16px 0px rgba(25,70,170,0.31);
|
box-shadow: 0px 16px 16px 0px rgba(25,70,170,0.31);
|
||||||
border-radius: 31px;
|
border-radius: 31px;
|
||||||
|
font-size: 20px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
.el-checkbox {
|
.el-checkbox {
|
||||||
background: #EDF0FD;
|
background: #EDF0FD;
|
||||||
box-shadow: 0px 6px 8px 0px #D2D9E8, inset 0px 6px 6px 0px #FFFFFF;
|
box-shadow: 0px 6px 8px 0px #D2D9E8, inset 0px 6px 6px 0px #FFFFFF;
|
||||||
width: 216px;
|
width: 206px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
line-height: 56px;
|
line-height: 56px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.reson {
|
.reson {
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
@@ -484,6 +586,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.scrap {
|
.scrap {
|
||||||
background-image: url('./../assets/quality-bg.png');
|
background-image: url('./../assets/quality-bg.png');
|
||||||
|
background-size: cover;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
padding: 20px 24px;
|
padding: 20px 24px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-29 10:01:55
|
* @Date: 2023-12-29 10:01:55
|
||||||
* @LastEditTime: 2024-01-30 14:42:15
|
* @LastEditTime: 2024-03-28 09:07:41
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description: 报废列表
|
* @Description: 报废列表
|
||||||
-->
|
-->
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
border
|
border
|
||||||
:header-cell-style="{ background: 'rgba(210, 220, 242, 1)', color: '#000', height: '33px' }"
|
:header-cell-style="{ background: 'rgba(210, 220, 242, 1)', color: '#000', height: '33px' }"
|
||||||
show-header
|
show-header
|
||||||
|
max-height="600"
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="index" label="序号" width="60" />
|
type="index" label="序号" width="60" />
|
||||||
@@ -107,7 +108,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getList () {
|
getList () {
|
||||||
scrapLogList(this.listQuery).then(res => {
|
scrapLogList(this.listQuery).then(res => {
|
||||||
if (res.data.code === 0) {
|
if (res && res?.data?.code === 0) {
|
||||||
this.tableData = res.data.data.list.map(item => {
|
this.tableData = res.data.data.list.map(item => {
|
||||||
item.sources = item.source === 1 ? '平板端' : '网页端'
|
item.sources = item.source === 1 ? '平板端' : '网页端'
|
||||||
item.scrapTime = parseTime(item.logTime)
|
item.scrapTime = parseTime(item.logTime)
|
||||||
@@ -140,12 +141,14 @@ export default {
|
|||||||
background-color: #a76c6c; /* 奇数行背景颜色 */
|
background-color: #a76c6c; /* 奇数行背景颜色 */
|
||||||
}
|
}
|
||||||
.pagination {
|
.pagination {
|
||||||
margin-top: 10px;
|
margin-top: 15px;
|
||||||
float: right;
|
float: right;
|
||||||
}
|
}
|
||||||
.list {
|
.list {
|
||||||
background-image: url('./../assets/quality-bg.png');
|
background-image: url('./../assets/quality-bg.png');
|
||||||
height: 100vh;
|
background-repeat: no-repeat;
|
||||||
|
background-size: cover;
|
||||||
|
min-height: 100vh;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
padding: 20px 24px;
|
padding: 20px 24px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|||||||
176
src/views/components/SKeyboard.vue
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="keyboardClass"></div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import Keyboard from 'simple-keyboard'
|
||||||
|
import 'simple-keyboard/build/css/index.css'
|
||||||
|
import layout from 'simple-keyboard-layouts/build/layouts/chinese' // 中文字库
|
||||||
|
export default {
|
||||||
|
name: 'SimpleKeyboard',
|
||||||
|
props: {
|
||||||
|
keyboardClass: {
|
||||||
|
default: 'simple-keyboard',
|
||||||
|
type: String
|
||||||
|
},
|
||||||
|
maxLength: { default: '' }
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
keyboard: null,
|
||||||
|
displayDefault: {
|
||||||
|
'{bksp}': 'backspace',
|
||||||
|
'{lock}': '切换',
|
||||||
|
'{enter}': '> enter',
|
||||||
|
'{tab}': 'tab',
|
||||||
|
'{shift}': 'shift',
|
||||||
|
'{change}': '中文',
|
||||||
|
'{space}': ' ',
|
||||||
|
'{clear}': '清空',
|
||||||
|
'{close}': '关闭'
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
mounted () {
|
||||||
|
this.keyboard = new Keyboard(this.keyboardClass, {
|
||||||
|
onChange: this.onChange,
|
||||||
|
onKeyPress: this.onKeyPress,
|
||||||
|
layoutCandidates: layout.layoutCandidates,
|
||||||
|
layout: {
|
||||||
|
// 默认布局
|
||||||
|
default: [
|
||||||
|
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
|
||||||
|
'{tab} q w e r t y u i o p [ ] \\',
|
||||||
|
"{lock} a s d f g h j k l ; ' {enter}",
|
||||||
|
'{shift} z x c v b n m , . / {clear}',
|
||||||
|
'{change} {space} {close}'
|
||||||
|
],
|
||||||
|
// shift布局
|
||||||
|
shift: [
|
||||||
|
'~ ! @ # $ % ^ & * ( ) _ + {bksp}',
|
||||||
|
'{tab} Q W E R T Y U I O P { } |',
|
||||||
|
'{lock} A S D F G H J K L : " {enter}',
|
||||||
|
'{shift} Z X C V B N M < > ? {clear}',
|
||||||
|
'{change} {space} {close}'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// 按钮展示文字
|
||||||
|
display: this.displayDefault,
|
||||||
|
// 按钮样式
|
||||||
|
buttonTheme: [
|
||||||
|
{
|
||||||
|
class: 'hg-red close',
|
||||||
|
buttons: '{close}'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
class: 'change',
|
||||||
|
buttons: '{change}'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 输入限制长度
|
||||||
|
maxLength: this.maxLength
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChange (input) {
|
||||||
|
this.$emit('on-change', input) // 输入值向外传递
|
||||||
|
},
|
||||||
|
// 重写清空按钮
|
||||||
|
onChangeKey () {
|
||||||
|
this.keyboard.setInput('')
|
||||||
|
this.$emit('empty')
|
||||||
|
},
|
||||||
|
// @focus 触发时赋值 封装组件调用
|
||||||
|
onChangeFocus (value) {
|
||||||
|
this.keyboard.setInput(value)
|
||||||
|
},
|
||||||
|
// 点击键盘
|
||||||
|
onKeyPress (button, $event) {
|
||||||
|
// 点击关闭
|
||||||
|
if (button === '{close}') {
|
||||||
|
// 子组件调用父组件的关闭按钮方法
|
||||||
|
this.$parent.closekeyboard()
|
||||||
|
return false
|
||||||
|
} else if (button === '{change}') {
|
||||||
|
// 切换中英文输入法
|
||||||
|
if (this.keyboard.options.layoutCandidates !== null) {
|
||||||
|
this.$set(this.displayDefault, '{change}', '英文')
|
||||||
|
// 切换至英文
|
||||||
|
this.keyboard.setOptions({
|
||||||
|
layoutCandidates: null,
|
||||||
|
display: this.displayDefault
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 切换至中文
|
||||||
|
this.$set(this.displayDefault, '{change}', '中文')
|
||||||
|
this.keyboard.setOptions({
|
||||||
|
layoutCandidates: layout.layoutCandidates,
|
||||||
|
display: this.displayDefault
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (button === '{clear}') {
|
||||||
|
this.onChangeKey()
|
||||||
|
} else {
|
||||||
|
const value = $event.target.offsetParent.parentElement.children[0].children[0].value
|
||||||
|
// 输入框有默认值时,覆写
|
||||||
|
if (value) {
|
||||||
|
this.keyboard.setInput(value)
|
||||||
|
}
|
||||||
|
this.$emit('on-key-press', button)
|
||||||
|
}
|
||||||
|
if (button === '{shift}' || button === '{lock}') this.handleShift()
|
||||||
|
},
|
||||||
|
// 切换shift/默认布局
|
||||||
|
handleShift () {
|
||||||
|
const currentLayout = this.keyboard.options.layoutName
|
||||||
|
const shiftToggle = currentLayout === 'default' ? 'shift' : 'default'
|
||||||
|
this.keyboard.setOptions({
|
||||||
|
layoutName: shiftToggle
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less"> //这块样式可以根据自己的需求调整
|
||||||
|
@deep: ~'>>>';
|
||||||
|
.hg-candidate-box{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 42px;
|
||||||
|
background: rgba(256, 256, 256);
|
||||||
|
z-index: 9999;
|
||||||
|
.hg-candidate-box-list{
|
||||||
|
.hg-candidate-box-list-item{
|
||||||
|
padding: 0 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.hg-rows{
|
||||||
|
width: 100% !important;
|
||||||
|
.hg-row {
|
||||||
|
height: 50px;
|
||||||
|
.hg-button{
|
||||||
|
height: 50px;
|
||||||
|
font-size: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.hg-theme-default {
|
||||||
|
width: 100%;
|
||||||
|
height: 400px;
|
||||||
|
left: 0;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 10px;
|
||||||
|
.hg-button {
|
||||||
|
&.hg-red {
|
||||||
|
background: #3e87db;
|
||||||
|
color: white;
|
||||||
|
&.close {
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.change {
|
||||||
|
max-width: 200px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
74
src/views/components/keyboard.vue
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: Do not edit
|
||||||
|
* @Date: 2024-04-03 15:01:04
|
||||||
|
* @LastEditTime: 2024-04-07 15:14:39
|
||||||
|
* @LastEditors: DY
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div v-show="showKeyboard" >
|
||||||
|
<SimpleKeyboard ref="refSimpleKeyboard" class="Keyboard" @onChange="onChangeKeyboard" @empty="empty" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import SimpleKeyboard from './SKeyboard.vue'
|
||||||
|
export default {
|
||||||
|
name: 'Keyboard',
|
||||||
|
components: {
|
||||||
|
SimpleKeyboard
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
showKeyboard: false, // 键盘默认隐藏
|
||||||
|
value: '',
|
||||||
|
key: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
key (val) {
|
||||||
|
this.key = val
|
||||||
|
if (this.showKeyboard) {
|
||||||
|
this.showKeyboard = false
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showKeyboard = true
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// inpuit获取焦点显示虚拟键盘
|
||||||
|
onInputFocus (res) {
|
||||||
|
this.showKeyboard = true
|
||||||
|
},
|
||||||
|
// 给输入框赋值
|
||||||
|
onChangeKeyboard (input) {
|
||||||
|
this.$emit('input', { value: input, key: this.key })
|
||||||
|
},
|
||||||
|
// 隐藏键盘 父组件调用
|
||||||
|
closeInputFocus () {
|
||||||
|
this.showKeyboard = false
|
||||||
|
},
|
||||||
|
// 隐藏键盘 子组件调用
|
||||||
|
closekeyboard () {
|
||||||
|
this.showKeyboard = false
|
||||||
|
},
|
||||||
|
// 清空输入框
|
||||||
|
empty () {
|
||||||
|
this.$emit('input', { value: '', key: this.key })
|
||||||
|
},
|
||||||
|
// 给虚拟键盘赋当前输入框的值
|
||||||
|
setKeyboardInput (input) {
|
||||||
|
console.log('给虚拟键盘赋当前输入框的值', input)
|
||||||
|
this.$refs.refSimpleKeyboard.onChangeFocus(input)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
// 键盘样式
|
||||||
|
.Keyboard{
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
const { defineConfig } = require('@vue/cli-service')
|
const { defineConfig } = require('@vue/cli-service')
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
transpileDependencies: true,
|
transpileDependencies: true,
|
||||||
|
publicPath: './',
|
||||||
// 配置代理服务器
|
// 配置代理服务器
|
||||||
devServer: {
|
devServer: {
|
||||||
// proxy: {
|
// proxy: {
|
||||||
|
|||||||