Browse Source

bug27修改

master
z_yu 3 years ago
parent
commit
c1baecb812
  1. 2
      src/views/category/fieldManage/index.vue
  2. 2
      src/views/components/field/index.vue
  3. 4
      src/views/storeManage/deviceManage/index.vue

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

@ -160,7 +160,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 Math.max(prev.isSequence, cur.isSequence) })
this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }) + 1
} }
}, },
[CRUD.HOOK.beforeToCU]() { [CRUD.HOOK.beforeToCU]() {

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 Math.max(prev.isSequence, cur.isSequence) })
this.crud.form.isSequence = this.crud.data.reduce((prev, cur) => { return { isSequence: Math.max(prev.isSequence, cur.isSequence) } }) + 1
} }
}, },
handleConfirm() { handleConfirm() {

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

@ -143,7 +143,7 @@ export default {
[CRUD.HOOK.beforeSubmit]() { [CRUD.HOOK.beforeSubmit]() {
this.crud.form.pid = this.defaultExpandedKeys[0] this.crud.form.pid = this.defaultExpandedKeys[0]
if (!this.crud.form.sort) { if (!this.crud.form.sort) {
this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return Math.max(prev.sort, cur.sort) })
this.crud.form.sort = this.crud.data[0].children.reduce((prev, cur) => { return { sort: Math.max(prev.sort, cur.sort) } }).sort + 1
} }
}, },
toDelete(data) { toDelete(data) {
@ -165,7 +165,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.tree-scroll{
.tree-scroll {
height: calc(100vh - 275px); height: calc(100vh - 275px);
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;

Loading…
Cancel
Save