版本1
This commit is contained in:
@@ -104,13 +104,13 @@ export default {
|
||||
name: 'firstFQC',
|
||||
data() {
|
||||
return {
|
||||
|
||||
paint: [{ inspectionModule: '' }],
|
||||
device: [{ inspectionModule: '' }],
|
||||
blank: [{ inspectionModule: '' }], // 毛坯
|
||||
program: [{ inspectionModule: '' }], // 程序
|
||||
team: [{ inspectionModule: '' }], //班组
|
||||
|
||||
checkItemTable: {
|
||||
paint: [{ inspectionModule: '' }],
|
||||
device: [{ inspectionModule: '' }],
|
||||
blank: [{ inspectionModule: '' }], // 毛坯
|
||||
program: [{ inspectionModule: '' }], // 程序
|
||||
team: [{ inspectionModule: '' }], //班组
|
||||
},
|
||||
ProductSituationForm: {
|
||||
name: '',
|
||||
},
|
||||
@@ -129,6 +129,21 @@ export default {
|
||||
.then((result) => {
|
||||
if (result.code == 200) {
|
||||
this.checkItemTable = result.data
|
||||
this.checkItemTable.paint.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
})
|
||||
this.checkItemTable.device.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
})
|
||||
this.checkItemTable.blank.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
})
|
||||
this.checkItemTable.program.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
})
|
||||
this.checkItemTable.team.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch((err) => {})
|
||||
@@ -18,52 +18,62 @@
|
||||
<div>
|
||||
<div class="grid">
|
||||
<div class="a">
|
||||
<div class="title_sub">{{ checkItemTable.paint[0].inspectionModule }}</div>
|
||||
<div class="title_sub">{{ paint[0].inspectionModule }}</div>
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of checkItemTable.paint" :key="index">
|
||||
<el-badge :value="item.Counter" type="primary"
|
||||
><div class="context" @click="Accumulator(item, index)">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
<div class="a_11" v-for="(item, index) of paint" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="b">
|
||||
<div class="title_sub">{{ checkItemTable.device[0].inspectionModule }}</div>
|
||||
<div class="title_sub">{{ device[0].inspectionModule }}</div>
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of checkItemTable.device" :key="index">
|
||||
<el-badge :value="item.Counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
<div class="a_11" v-for="(item, index) of device" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c">
|
||||
<div class="title_sub">{{ checkItemTable.blank[0].inspectionModule }}</div>
|
||||
<div class="title_sub">{{ blank[0].inspectionModule }}</div>
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of checkItemTable.blank" :key="index">
|
||||
<el-badge :value="item.Counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
<div class="a_11" v-for="(item, index) of blank" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d">
|
||||
<div class="title_sub">{{ checkItemTable.program[0].inspectionModule }}</div>
|
||||
<div class="title_sub">{{ program[0].inspectionModule }}</div>
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of checkItemTable.program" :key="index">
|
||||
<el-badge :value="item.Counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
<div class="a_11" v-for="(item, index) of program" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="e">
|
||||
<div class="title_sub">{{ checkItemTable.team[0].inspectionModule }}</div>
|
||||
<div class="title_sub">{{ team[0].inspectionModule }}</div>
|
||||
<div class="grid_sub">
|
||||
<div class="a_11" v-for="(item, index) of checkItemTable.team" :key="index">
|
||||
<el-badge :value="item.Counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
<div class="a_11" v-for="(item, index) of team" :key="index">
|
||||
<div @click="Accumulator(item, index)" class="button_">
|
||||
<el-badge :value="item.counter" type="primary"
|
||||
><div class="context">{{ item.inspectionName }}</div></el-badge
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,17 +110,17 @@
|
||||
|
||||
<script>
|
||||
import { GetcheckItemTable } from '@/api/qualityManagement/firstFQC.js'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'firstFQC',
|
||||
data() {
|
||||
return {
|
||||
checkItemTable: {
|
||||
paint: [{ inspectionModule: '' }],
|
||||
device: [{ inspectionModule: '' }],
|
||||
blank: [{ inspectionModule: '' }], // 毛坯
|
||||
program: [{ inspectionModule: '' }], // 程序
|
||||
team: [{ inspectionModule: '' }], //班组
|
||||
},
|
||||
paint: [{ inspectionModule: '' }],
|
||||
device: [{ inspectionModule: '' }],
|
||||
blank: [{ inspectionModule: '' }], // 毛坯
|
||||
program: [{ inspectionModule: '' }], // 程序
|
||||
team: [{ inspectionModule: '' }], //班组
|
||||
|
||||
ProductSituationForm: {
|
||||
name: '',
|
||||
},
|
||||
@@ -118,6 +128,12 @@ export default {
|
||||
data: null,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['counterList']),
|
||||
},
|
||||
created() {
|
||||
this.getCheckItemList()
|
||||
},
|
||||
@@ -128,21 +144,25 @@ export default {
|
||||
GetcheckItemTable()
|
||||
.then((result) => {
|
||||
if (result.code == 200) {
|
||||
this.checkItemTable = result.data
|
||||
this.checkItemTable.paint.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
this.paint = result.data.paint
|
||||
this.paint.forEach((item) => {
|
||||
if (item.counter == null) item.counter = 0
|
||||
})
|
||||
this.checkItemTable.device.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
this.device = result.data.device
|
||||
this.device.forEach((item) => {
|
||||
if (item.counter == null) item.counter = 0
|
||||
})
|
||||
this.checkItemTable.blank.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
this.blank = result.data.blank
|
||||
this.blank.forEach((item) => {
|
||||
if (item.counter == null) item.counter = 0
|
||||
})
|
||||
this.checkItemTable.program.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
this.program = result.data.program
|
||||
this.program.forEach((item) => {
|
||||
if (item.counter == null) item.counter = 0
|
||||
})
|
||||
this.checkItemTable.team.forEach((item, index) => {
|
||||
item.Counter = 0
|
||||
this.team = result.data.team
|
||||
this.team.forEach((item) => {
|
||||
if (item.counter == null) item.counter = 0
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -152,14 +172,37 @@ export default {
|
||||
Accumulator(item, index) {
|
||||
switch (item.inspectionModule) {
|
||||
case '油漆':
|
||||
this.checkItemTable.paint.filter((it) => it.id == item.id)[0].Counter++
|
||||
console.log(
|
||||
'this.checkItemTable.paint.filter((it) => it.id == item.id)[0].Counter',
|
||||
this.checkItemTable.paint.filter((it) => it.id == item.id)[0].Counter,
|
||||
// 把数据传递到redis
|
||||
this.signalr.SR.invoke('SaveCacheInformation', '工单号', 'id', this.paint.filter((it) => it.id == item.id)[0].counter + 1).catch(
|
||||
(err) => {
|
||||
console.log(err)
|
||||
},
|
||||
)
|
||||
// redis再将数据返回
|
||||
this.paint.filter((it) => it.id == item.id)[0].counter = this.counterList.sum
|
||||
break
|
||||
case '设备':
|
||||
this.device.filter((it) => it.id == item.id)[0].counter++
|
||||
break
|
||||
case '毛坯':
|
||||
this.blank.filter((it) => it.id == item.id)[0].counter++
|
||||
break
|
||||
case '程序':
|
||||
this.program.filter((it) => it.id == item.id)[0].counter++
|
||||
break
|
||||
case '班组操作':
|
||||
this.team.filter((it) => it.id == item.id)[0].counter++
|
||||
break
|
||||
default:
|
||||
this.$notify.warning('异常操作,警告')
|
||||
break
|
||||
}
|
||||
},
|
||||
//todo 数据同步
|
||||
/*
|
||||
1.从后台获取数据
|
||||
|
||||
*/
|
||||
|
||||
//todo 初始话 signalR
|
||||
/*initSignalR() {
|
||||
@@ -321,4 +364,8 @@ export default {
|
||||
.context {
|
||||
margin: 0.5em 1em;
|
||||
}
|
||||
.button_ {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user