Browse Source

bug修改

master
z_yu 3 years ago
parent
commit
72369941b8
  1. 3
      src/views/category/fieldManage/index.vue
  2. 2
      src/views/category/fieldManage/module/form.vue
  3. 4
      src/views/category/orderingRule/index.vue
  4. 10
      src/views/components/BindingTagDlg.vue
  5. 2
      src/views/components/category/SettingForm.vue
  6. 2
      src/views/components/field/index.vue
  7. 1
      src/views/storeManage/deviceManage/index.vue
  8. 4
      vue.config.js

3
src/views/category/fieldManage/index.vue

@ -158,9 +158,8 @@ export default {
return false return false
}, },
[CRUD.HOOK.beforeSubmit]() { [CRUD.HOOK.beforeSubmit]() {
this.crud.form.isType = this.isType
if (!this.crud.form.isSequence) { 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]() { [CRUD.HOOK.beforeToCU]() {

2
src/views/category/fieldManage/module/form.vue

@ -26,7 +26,7 @@ const defaultForm = {
isDataType: null, isDataType: null,
isDataTypeDetails: null, isDataTypeDetails: null,
isColumnLength: null, isColumnLength: null,
isColumnType: 2,
isColumnType: 1,
isSequence: null, isSequence: null,
isType: 2, isType: 2,
isSystem: true, isSystem: true,

4
src/views/category/orderingRule/index.vue

@ -138,8 +138,10 @@ export default {
this.table[tableName].selections = val this.table[tableName].selections = val
}, },
toAdd() { 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, 'displayOrderBy', 'asc')
Vue.set(item, 'queue', maxQueue + index)
}) })
this.$refs.cuform.title = '新增字段' this.$refs.cuform.title = '新增字段'
Vue.set(this.$refs.cuform.formData, 'fields', JSON.parse(JSON.stringify(this.table.left.selections))) Vue.set(this.$refs.cuform.formData, 'fields', JSON.parse(JSON.stringify(this.table.left.selections)))

10
src/views/components/BindingTagDlg.vue

@ -60,7 +60,7 @@
<span class="step-left-num" :class="{ 'step-active': 5 === step }">5</span> <span class="step-left-num" :class="{ 'step-active': 5 === step }">5</span>
<div class="step-right-cont"> <div class="step-right-cont">
<p class="step-title">第五步<span>绑定成功</span></p> <p class="step-title">第五步<span>绑定成功</span></p>
<p class="step-tip" :class="{ 'tip-active': 5 === step }">{{ step5Message }}</p>
<p class="step-tip" :class="{ 'tip-error': 5 === errorStep,'tip-active': 5 === step }">{{ step5Message }}</p>
<!-- tip: 当前标签与档案绑定成功 --> <!-- tip: 当前标签与档案绑定成功 -->
<!-- tip: 绑定成功 --> <!-- tip: 绑定成功 -->
</div> </div>
@ -193,6 +193,7 @@ export default {
} else if (res.code && res.code === '-2') { } else if (res.code && res.code === '-2') {
this.errorStep = 2 this.errorStep = 2
this.step2Message = '未读取到标签,请重新放入' this.step2Message = '未读取到标签,请重新放入'
this.step = 2
clearTimeout(this.timer) clearTimeout(this.timer)
this.timer = setTimeout(() => { this.timer = setTimeout(() => {
resolve(this.readEpc(param)) resolve(this.readEpc(param))
@ -277,8 +278,7 @@ export default {
if (res === '当前标签已被绑定') { if (res === '当前标签已被绑定') {
this.coverBindingVisible = true this.coverBindingVisible = true
resolve() 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 }) 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) writeRes = JSON.parse(writeRes)
if (writeRes.code === '0') { if (writeRes.code === '0') {
@ -299,6 +299,10 @@ export default {
}) })
reject() reject()
} }
} else {
this.step5Message = '绑定失败'
this.errorStep = 5
reject()
} }
}) })
}, },

2
src/views/components/category/SettingForm.vue

@ -20,7 +20,7 @@
</el-form-item> </el-form-item>
<el-form-item label="字段长度" prop="isColumnLength"> <el-form-item label="字段长度" prop="isColumnLength">
<el-input v-if="isDisabled" v-model="form.isColumnLength" type="number" placeholder="" readonly />
<el-input v-if="isDisabled" v-model="form.isColumnLength" type="number" placeholder="" readonly :hide-required-asterisk="true" />
<el-input v-else v-model.number="form.isColumnLength" type="number" placeholder="" :disabled="!isAdd" /> <el-input v-else v-model.number="form.isColumnLength" type="number" placeholder="" :disabled="!isAdd" />
</el-form-item> </el-form-item>

2
src/views/components/field/index.vue

@ -130,7 +130,7 @@ export default {
[CRUD.HOOK.beforeSubmit]() { [CRUD.HOOK.beforeSubmit]() {
this.crud.form.isType = this.isType this.crud.form.isType = this.isType
if (!this.crud.form.isSequence) { 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() { handleConfirm() {

1
src/views/storeManage/deviceManage/index.vue

@ -142,6 +142,7 @@ export default {
}, },
[CRUD.HOOK.beforeSubmit]() { [CRUD.HOOK.beforeSubmit]() {
this.crud.form.pid = this.defaultExpandedKeys[0] this.crud.form.pid = this.defaultExpandedKeys[0]
this.crud.form.remark = this.crud.form.name
if (!this.crud.form.sort) { 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 this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1
} }

4
vue.config.js

@ -10,8 +10,8 @@ const port = 8013 // 端口配置
// All configuration item explanations can be find in https://cli.vuejs.org/config/ // All configuration item explanations can be find in https://cli.vuejs.org/config/
module.exports = { module.exports = {
// hash 模式下可使用 // hash 模式下可使用
// publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
publicPath: '/',
publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
// publicPath: '/',
outputDir: 'dist', outputDir: 'dist',
assetsDir: 'static', assetsDir: 'static',
lintOnSave: process.env.NODE_ENV === 'development', lintOnSave: process.env.NODE_ENV === 'development',

Loading…
Cancel
Save