diff --git a/src/views/category/fieldManage/index.vue b/src/views/category/fieldManage/index.vue
index 8d67e43..fa38b99 100644
--- a/src/views/category/fieldManage/index.vue
+++ b/src/views/category/fieldManage/index.vue
@@ -158,9 +158,8 @@ export default {
return false
},
[CRUD.HOOK.beforeSubmit]() {
- this.crud.form.isType = this.isType
if (!this.crud.form.isSequence) {
- this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }) + 1
+ this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }).isSequence + 1
}
},
[CRUD.HOOK.beforeToCU]() {
diff --git a/src/views/category/fieldManage/module/form.vue b/src/views/category/fieldManage/module/form.vue
index 6ae71e1..00e27c1 100644
--- a/src/views/category/fieldManage/module/form.vue
+++ b/src/views/category/fieldManage/module/form.vue
@@ -26,7 +26,7 @@ const defaultForm = {
isDataType: null,
isDataTypeDetails: null,
isColumnLength: null,
- isColumnType: 2,
+ isColumnType: 1,
isSequence: null,
isType: 2,
isSystem: true,
diff --git a/src/views/category/orderingRule/index.vue b/src/views/category/orderingRule/index.vue
index 9de567b..d2b2158 100644
--- a/src/views/category/orderingRule/index.vue
+++ b/src/views/category/orderingRule/index.vue
@@ -138,8 +138,10 @@ export default {
this.table[tableName].selections = val
},
toAdd() {
- this.table.left.selections.forEach((item) => {
+ const maxQueue = this.table.right.data.reduce((prev, cur) => { return { queue: Math.max(prev.queue, cur.queue) } }, { queue: 0 }).queue + 1
+ this.table.left.selections.forEach((item, index) => {
Vue.set(item, 'displayOrderBy', 'asc')
+ Vue.set(item, 'queue', maxQueue + index)
})
this.$refs.cuform.title = '新增字段'
Vue.set(this.$refs.cuform.formData, 'fields', JSON.parse(JSON.stringify(this.table.left.selections)))
diff --git a/src/views/components/BindingTagDlg.vue b/src/views/components/BindingTagDlg.vue
index 938a42f..e28a99d 100644
--- a/src/views/components/BindingTagDlg.vue
+++ b/src/views/components/BindingTagDlg.vue
@@ -60,7 +60,7 @@
5
第五步绑定成功
-
{{ step5Message }}
+
{{ step5Message }}
@@ -193,6 +193,7 @@ export default {
} else if (res.code && res.code === '-2') {
this.errorStep = 2
this.step2Message = '未读取到标签,请重新放入'
+ this.step = 2
clearTimeout(this.timer)
this.timer = setTimeout(() => {
resolve(this.readEpc(param))
@@ -277,8 +278,7 @@ export default {
if (res === '当前标签已被绑定') {
this.coverBindingVisible = true
resolve()
- // else if() {} else {reject()}
- } else {
+ } else if (res === 1) {
let writeRes = await RFID.writeEPC({ op: 'RFID_WriteEPC', sDevID: 'D001', EAS: '1', Type: this.bindingType, Code: this.bindingId, Tid: this.readData.tid })
writeRes = JSON.parse(writeRes)
if (writeRes.code === '0') {
@@ -299,6 +299,10 @@ export default {
})
reject()
}
+ } else {
+ this.step5Message = '绑定失败'
+ this.errorStep = 5
+ reject()
}
})
},
diff --git a/src/views/components/category/SettingForm.vue b/src/views/components/category/SettingForm.vue
index 3b72c40..6c054de 100644
--- a/src/views/components/category/SettingForm.vue
+++ b/src/views/components/category/SettingForm.vue
@@ -20,7 +20,7 @@
-
+
diff --git a/src/views/components/field/index.vue b/src/views/components/field/index.vue
index e5d1bb8..130e926 100644
--- a/src/views/components/field/index.vue
+++ b/src/views/components/field/index.vue
@@ -130,7 +130,7 @@ export default {
[CRUD.HOOK.beforeSubmit]() {
this.crud.form.isType = this.isType
if (!this.crud.form.isSequence) {
- this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }) + 1
+ this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }).isSequence + 1
}
},
handleConfirm() {
diff --git a/src/views/storeManage/deviceManage/index.vue b/src/views/storeManage/deviceManage/index.vue
index 2eec295..8655b8b 100644
--- a/src/views/storeManage/deviceManage/index.vue
+++ b/src/views/storeManage/deviceManage/index.vue
@@ -142,6 +142,7 @@ export default {
},
[CRUD.HOOK.beforeSubmit]() {
this.crud.form.pid = this.defaultExpandedKeys[0]
+ this.crud.form.remark = this.crud.form.name
if (!this.crud.form.sort) {
this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1
}
diff --git a/vue.config.js b/vue.config.js
index 35a2cae..90f8e30 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -10,8 +10,8 @@ const port = 8013 // 端口配置
// All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = {
// hash 模式下可使用
- // publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
- publicPath: '/',
+ publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
+ // publicPath: '/',
outputDir: 'dist',
assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development',