From 15c5eedb840d280b36cdfccbe8437fde24f00807 Mon Sep 17 00:00:00 2001
From: caill <815519168@qq.com>
Date: Fri, 22 Jul 2022 09:26:01 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BE=93=E9=80=81=E7=BA=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/config/getData2.js | 3 +--
src/pages/login/Home.vue | 8 ++++----
src/pages/proj/ConveyorLine.vue | 21 +++++++++++----------
3 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/config/getData2.js b/src/config/getData2.js
index 22b9641..1798c9b 100644
--- a/src/config/getData2.js
+++ b/src/config/getData2.js
@@ -74,8 +74,7 @@ export const queryStructCode = (uuid) => post('api/pda/check/queryStructCode', {
export const queryInfo = (mode) => post('api/pda/ruleSetting/queryInfo', {
mode: mode
})
-export const ruleSettingConfirm = (obj, mode, is, JSONArray) => post('api/pda/ruleSetting/confirm', {
- data: obj,
+export const ruleSettingConfirm = (mode, is, JSONArray) => post('api/pda/ruleSetting/confirm', {
mode: mode,
is_used: is,
JSONArray: JSONArray
diff --git a/src/pages/login/Home.vue b/src/pages/login/Home.vue
index 3dd2052..3bd92ca 100644
--- a/src/pages/login/Home.vue
+++ b/src/pages/login/Home.vue
@@ -16,17 +16,17 @@
@@ -53,7 +53,7 @@ export default {
methods: {
toPage (e) {
let name = e.path.substr(2)
- if (name === 'CheckManage') {
+ if (name === 'CheckManage' || name === 'ConveyorLine') {
this.$store.dispatch('setKeepAlive', [name])
}
this.$router.push(e.path.substr(2))
diff --git a/src/pages/proj/ConveyorLine.vue b/src/pages/proj/ConveyorLine.vue
index e829022..7b6cc06 100644
--- a/src/pages/proj/ConveyorLine.vue
+++ b/src/pages/proj/ConveyorLine.vue
@@ -52,7 +52,6 @@
@@ -74,13 +73,12 @@ export default {
data () {
return {
option1: [{value: '1', label: '入'}, {value: '2', label: '出'}],
- active1: '',
+ active1: '0',
open1: false,
option2: [{value: '1', label: '启用'}, {value: '0', label: '停用'}],
active2: '',
open2: false,
drag: false,
- result: {},
dataList: [],
disabled: false
}
@@ -101,6 +99,9 @@ export default {
})
}
},
+ mounted () {
+ this._queryInfo()
+ },
methods: {
onStart () {
this.drag = true
@@ -118,6 +119,7 @@ export default {
dropdownMenu1 (i) {
this.active1 = i + ''
this.open1 = false
+ this._queryInfo()
},
toggleItem2 () {
if (!this.open2) {
@@ -136,13 +138,12 @@ export default {
}
let res = await queryInfo(this.option1[this.active1].value)
if (res.code === '1') {
- this.result = res.result
this.option2.map((el, i) => {
- if (el.value === res.is_used) {
- this.active2 = `i`
+ if (el.value === res.result.is_used) {
+ this.active2 = i + ''
}
})
- this.dataList = [...res.JSONArray]
+ this.dataList = [...res.result.JSONArray]
} else {
this.Dialog(res.desc)
}
@@ -154,7 +155,7 @@ export default {
return
}
try {
- let res = await ruleSettingConfirm(this.result, this.option1[this.active1].value, this.option2[this.active2].value, this.dataList)
+ let res = await ruleSettingConfirm(this.option1[this.active1].value, this.option2[this.active2].value, this.dataList)
if (res.code === '1') {
this.toast(res.desc)
this._queryInfo()
@@ -167,8 +168,8 @@ export default {
}
},
cancle () {
- console.log(this.dataList)
- // Object.assign(this.$data, this.$options.data())
+ Object.assign(this.$data, this.$options.data())
+ this._queryInfo()
},
searchMater (e) {
this.$router.push({