-
{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).nick_name : ''}}
+{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).nickName : ''}}
欢迎进入永裕手持系统!
@@ -70,11 +70,7 @@ export default {
async _authority () {
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
let res = await authority(accountId)
- if (res.code === '1') {
- this.menuList = [...res.result.sonTree]
- } else {
- this.Dialog(res.desc)
- }
+ this.menuList = [...res.result.sonTree]
},
Quit () {
this.$store.dispatch('setSignOut')
diff --git a/src/pages/login/Login.vue b/src/pages/login/Login.vue
index f7689bc..9351e9d 100644
--- a/src/pages/login/Login.vue
+++ b/src/pages/login/Login.vue
@@ -35,36 +35,19 @@ export default {
},
mounted () {
document.getElementsByTagName('body')[0].className = 'login-bg'
- // window.getSystemInfoCallback = this.getSystemInfoCallback
- // window.location.href = 'getSystemInfo'
},
methods: {
- // getSystemInfoCallback (result) {
- // window.localStorage.setItem('hhtId', result)
- // },
- // handleTest () {
- // this.test = false
- // setTimeout(() => {
- // this.test = true
- // this.testNumber = this.testNumber === 1 ? 2 : 1
- // }, 200)
- // },
changeType () {
this.type = this.type === 'password' ? 'text' : 'password'
},
async loginApi () {
try {
let res = await loginApi(this.loginname, encrypt(this.password))
- if (res.code === '1') {
- this.$store.dispatch('userInfo', JSON.stringify(res.result))
- this.$router.push('/home')
- } else {
- this.Dialog(res.desc)
- }
+ this.$store.dispatch('userInfo', JSON.stringify(res))
+ this.$router.push('/home')
this.disabled = false
} catch (err) {
this.disabled = false
- this.Dialog(err)
}
},
_Login () {
diff --git a/src/pages/proj/CallEmptyPallet.vue b/src/pages/proj/CallEmptyPallet.vue
index 37122a6..c55fe24 100644
--- a/src/pages/proj/CallEmptyPallet.vue
+++ b/src/pages/proj/CallEmptyPallet.vue
@@ -71,15 +71,11 @@ export default {
/** 查询点位 */
async _callEmptyqueryPoint () {
let res = await callEmptyqueryPoint()
- if (res.code === '1') {
- this.option2 = [...res.result.regionja]
- this.option2.map(el => {
- this.$set(el, 'value', el.region_id)
- this.$set(el, 'label', el.region_name)
- })
- } else {
- this.Dialog(res.desc)
- }
+ this.option2 = [...res.result.regionja]
+ this.option2.map(el => {
+ this.$set(el, 'value', el.region_id)
+ this.$set(el, 'label', el.region_name)
+ })
},
/** 确认 */
async _callEmptyconfirm () {
@@ -90,12 +86,8 @@ export default {
}
try {
let res = await callEmptyconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val2)
- if (res.code === '1') {
- this.toast(res.desc)
- this.toCancle()
- } else {
- this.Dialog(res.desc)
- }
+ this.toast(res.desc)
+ this.toCancle()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
diff --git a/src/pages/proj/EquipCallMater.vue b/src/pages/proj/EquipCallMater.vue
index f888166..6d2fabf 100644
--- a/src/pages/proj/EquipCallMater.vue
+++ b/src/pages/proj/EquipCallMater.vue
@@ -64,15 +64,11 @@ export default {
/** 查询点位 */
async _callMaterialqueryPoint () {
let res = await callMaterialqueryPoint()
- if (res.code === '1') {
- this.option2 = [...res.result.regionja]
- this.option2.map(el => {
- this.$set(el, 'value', el.region_id)
- this.$set(el, 'label', el.region_name)
- })
- } else {
- this.Dialog(res.desc)
- }
+ this.option2 = [...res.result.regionja]
+ this.option2.map(el => {
+ this.$set(el, 'value', el.region_id)
+ this.$set(el, 'label', el.region_name)
+ })
},
/** 确认 */
async _callMaterialconfirm () {
@@ -83,12 +79,8 @@ export default {
}
try {
let res = await callMaterialconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code)
- if (res.code === '1') {
- this.toast(res.desc)
- this.toCancle()
- } else {
- this.Dialog(res.desc)
- }
+ this.toast(res.desc)
+ this.toCancle()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
diff --git a/src/pages/proj/GroupPallet.vue b/src/pages/proj/GroupPallet.vue
index a245725..fd487c7 100644
--- a/src/pages/proj/GroupPallet.vue
+++ b/src/pages/proj/GroupPallet.vue
@@ -50,12 +50,8 @@ export default {
}
try {
let res = await emptyAndQtyconfirm(this.val1, this.val2)
- if (res.code === '1') {
- this.toast(res.desc)
- this.toCancle()
- } else {
- this.Dialog(res.desc)
- }
+ this.toast(res.desc)
+ this.toCancle()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
diff --git a/src/pages/proj/Password.vue b/src/pages/proj/Password.vue
index ef2b48e..4926d57 100644
--- a/src/pages/proj/Password.vue
+++ b/src/pages/proj/Password.vue
@@ -98,14 +98,10 @@ export default {
async _updatePass () {
try {
let res = await updatePass(encrypt(this.val1), encrypt(this.val2))
- if (res.code === '1') {
- this.toast(res.desc)
- this.$store.dispatch('setSignOut')
- this.$router.push('/login')
- } else {
- this.Dialog(res.desc)
- this.disabled = false
- }
+ this.toast(res.desc)
+ this.$store.dispatch('setSignOut')
+ this.$router.push('/login')
+ this.disabled = false
} catch (e) {
this.disabled = false
}
diff --git a/src/pages/proj/SendEmptyPallet.vue b/src/pages/proj/SendEmptyPallet.vue
index 5b975ed..8203d20 100644
--- a/src/pages/proj/SendEmptyPallet.vue
+++ b/src/pages/proj/SendEmptyPallet.vue
@@ -81,15 +81,11 @@ export default {
/** 查询点位 */
async _sendEmptyqueryPoint () {
let res = await sendEmptyqueryPoint()
- if (res.code === '1') {
- this.option2 = [...res.result.regionja]
- this.option2.map(el => {
- this.$set(el, 'value', el.region_id)
- this.$set(el, 'label', el.region_name)
- })
- } else {
- this.Dialog(res.desc)
- }
+ this.option2 = [...res.result.regionja]
+ this.option2.map(el => {
+ this.$set(el, 'value', el.region_id)
+ this.$set(el, 'label', el.region_name)
+ })
},
/** 确认 */
async _sendEmptyconfirm () {
@@ -100,12 +96,8 @@ export default {
}
try {
let res = await sendEmptyconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val1, this.val2)
- if (res.code === '1') {
- this.toast(res.desc)
- this.toCancle()
- } else {
- this.Dialog(res.desc)
- }
+ this.toast(res.desc)
+ this.toCancle()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
diff --git a/src/pages/proj/SendMater.vue b/src/pages/proj/SendMater.vue
index 801aa7f..4ea242c 100644
--- a/src/pages/proj/SendMater.vue
+++ b/src/pages/proj/SendMater.vue
@@ -71,25 +71,11 @@ export default {
/** 查询点位 */
async _sendMaterialqueryPoint () {
let res = await sendMaterialqueryPoint()
- if (res.code === '1') {
- // this.option1 = [...res.result.workprocedureja]
- // this.option1.map(el => {
- // this.$set(el, 'value', el.workprocedure_id)
- // this.$set(el, 'label', el.workprocedure_name)
- // })
- this.option2 = [...res.result.regionja]
- this.option2.map(el => {
- this.$set(el, 'value', el.region_id)
- this.$set(el, 'label', el.region_name)
- })
- // this.option3 = [...res.result.workprocedureja.deviceja.pointArr]
- // this.option3.map(el => {
- // this.$set(el, 'value', el.point_id)
- // this.$set(el, 'label', el.point_name)
- // })
- } else {
- this.Dialog(res.desc)
- }
+ this.option2 = [...res.result.regionja]
+ this.option2.map(el => {
+ this.$set(el, 'value', el.region_id)
+ this.$set(el, 'label', el.region_name)
+ })
},
/** 确认 */
async _sendMaterialconfirm () {
@@ -100,12 +86,8 @@ export default {
}
try {
let res = await sendMaterialconfirm(this.option2[this.active2].value, this.option3[this.active3].value, this.option3[this.active3].point_code, this.val2)
- if (res.code === '1') {
- this.toast(res.desc)
- this.toCancle()
- } else {
- this.Dialog(res.desc)
- }
+ this.toast(res.desc)
+ this.toCancle()
this.disabled1 = false
} catch (e) {
this.disabled1 = false
diff --git a/src/pages/proj/TaskManage.vue b/src/pages/proj/TaskManage.vue
index 02fc3a1..3c4a33d 100644
--- a/src/pages/proj/TaskManage.vue
+++ b/src/pages/proj/TaskManage.vue
@@ -76,33 +76,20 @@ export default {
},
methods: {
async queryTask () {
- try {
- let res = await queryTask(this.keyword, this.startPoint, this.endPoint)
- if (res.code === '1') {
- this.dataList = res.result
- } else {
- this.Dialog(res.desc)
- }
- } catch (err) {
- this.Dialog(err)
- }
+ let res = await queryTask(this.keyword, this.startPoint, this.endPoint)
+ this.dataList = res.result
},
async taskOperation (type) {
try {
let res = await taskOperation(this.pkId, type)
- if (res.code === '1') {
- this.toast('操作成功')
- this.disabled = false
- this.pkId = ''
- this.btnred = false
- this.dataList = []
- this.queryTask()
- } else {
- this.Dialog(res.desc)
- this.disabled = false
- }
+ this.toast(res.desc)
+ this.disabled = false
+ this.pkId = ''
+ this.btnred = false
+ this.dataList = []
+ this.queryTask()
} catch (err) {
- console.log(err)
+ this.disabled = false
}
},
toSure (type) {
diff --git a/src/pages/proj/ZlManage.vue b/src/pages/proj/ZlManage.vue
index 800df65..45d1666 100644
--- a/src/pages/proj/ZlManage.vue
+++ b/src/pages/proj/ZlManage.vue
@@ -82,33 +82,20 @@ export default {
},
methods: {
async queryInstraction () {
- try {
- let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint)
- if (res.code === '1') {
- this.dataList = res.result
- } else {
- this.Dialog(res.desc)
- }
- } catch (err) {
- this.Dialog(err)
- }
+ let res = await queryInstraction(this.keyword, this.startPoint, this.endPoint)
+ this.dataList = res.result
},
async instOperation (type) {
try {
let res = await instOperation(this.pkId, type)
- if (res.code === '1') {
- this.toast('操作成功')
- this.disabled = false
- this.pkId = ''
- this.btnred = false
- this.dataList = []
- this.queryInstraction()
- } else {
- this.Dialog(res.desc)
- this.disabled = false
- }
+ this.toast(res.desc)
+ this.disabled = false
+ this.pkId = ''
+ this.btnred = false
+ this.dataList = []
+ this.queryInstraction()
} catch (err) {
- console.log(err)
+ this.disabled = false
}
},
toSure (type) {