new
This commit is contained in:
@@ -311,6 +311,10 @@
|
||||
</template>
|
||||
<script>
|
||||
import { getNames, getMachines, getGroups, getTable, getTable2, getExport } from '@/api/ManufacturingCenter/ProcessingStatus'
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
import Cookie from 'js-cookie'
|
||||
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -380,10 +384,27 @@ export default {
|
||||
pageCurrent: 1
|
||||
}
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
created() {
|
||||
this.getMachine()
|
||||
this.getTableData()
|
||||
},
|
||||
=======
|
||||
watch: {
|
||||
// 如果路由有变化,会再次执行该方法
|
||||
'$route': {
|
||||
handler(route) {
|
||||
const _this = this
|
||||
if (route.name === 'ProcessingStatus') {
|
||||
_this.getMachine()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// created() {
|
||||
// this.getMachine()
|
||||
// },
|
||||
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
|
||||
methods: {
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
@@ -412,7 +433,10 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
// 查询供应商名称
|
||||
=======
|
||||
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
|
||||
fetchData() {
|
||||
this.projects = []
|
||||
getNames().then(response => {
|
||||
@@ -426,6 +450,7 @@ export default {
|
||||
this.part = 1
|
||||
},
|
||||
getMachine() {
|
||||
<<<<<<< HEAD
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
@@ -439,6 +464,45 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
=======
|
||||
if (Cookie.get('machineValue') !== undefined) {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
}).then(() => {
|
||||
this.Machine = parseInt(Cookie.get('machineValue'))
|
||||
this.getGroup()
|
||||
this.Group = parseInt(Cookie.get('group'))
|
||||
this.getTableData()
|
||||
Cookie.remove('machineValue')
|
||||
Cookie.remove('group')
|
||||
})
|
||||
} else {
|
||||
this.Machine = ''
|
||||
this.Machines = []
|
||||
this.Group = ''
|
||||
this.Groups = []
|
||||
getMachines().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.Machines.push({
|
||||
label: response.data[i].机床图号,
|
||||
value: response.data[i].机床流水号,
|
||||
value2: response.data[i].项目名称
|
||||
})
|
||||
}
|
||||
})
|
||||
this.getTableData()
|
||||
}
|
||||
>>>>>>> 4a39ba8190d04cdcdea962794e7d7df3408bfd2d
|
||||
},
|
||||
getGroup() {
|
||||
this.Group = ''
|
||||
|
||||
Reference in New Issue
Block a user