diff --git a/src/component/contractManagement/contractList/add/addMain.vue b/src/component/contractManagement/contractList/add/addMain.vue index 303474b89193abe2965e7ca9b258158249781a1d..694c3d69b75f8076d1bf7786f19855dfdfd01bfc 100644 --- a/src/component/contractManagement/contractList/add/addMain.vue +++ b/src/component/contractManagement/contractList/add/addMain.vue @@ -69,8 +69,7 @@ - @@ -167,7 +166,7 @@ export default { field118: undefined, field119: undefined, field120: undefined, - field135: null, + field135: [], field122: undefined, field124: 2, field123: undefined, diff --git a/src/util/toTree.js b/src/util/toTree.js index d183bfcdc79b7ed42f4f27e607b8a9382be24a18..1b5558c493353879ebbd7af94136a4e2f7939726 100644 --- a/src/util/toTree.js +++ b/src/util/toTree.js @@ -1,30 +1,30 @@ -// const treeData = [ -// { -// id: 1, -// title: "课程1", -// children: [ -// { id: 4, title: "课程1-1" }, -// { -// id: 5, -// title: "课程1-2", -// children: [ -// { id: 6, title: "课程1-2-1" }, -// { id: 7, title: "课程1-2-2" }, -// ], -// }, -// ], -// }, -// { id: 2, title: "课程2" }, -// { id: 3, title: "课程3" }, -// ]; +const treeData = [ + { + id: '1', + title: "课程1", + children: [ + { id: '4', title: "课程1-1" }, + { + id: '5', + title: "课程1-2", + children: [ + { id: '6', title: "课程1-2-1" }, + { id: '7', title: "课程1-2-2" }, + ], + }, + ], + }, + { id: '2', title: "课程2" }, + { id: '3', title: "课程3" }, +]; const flatData = [ - { id: 1, parentID: 0, title: "课程1" }, - { id: 4, parentID: 1, title: "课程1-1" }, - { id: 5, parentID: 1, title: "课程1-2" }, - { id: 6, parentID: 5, title: "课程1-2-1" }, - { id: 7, parentID: 5, title: "课程1-2-2" }, - { id: 2, parentID: 0, title: "课程2" }, - { id: 3, parentID: 0, title: "课程3" }, + { id: '1', parentID: '0', title: "课程1" }, + { id: '4', parentID: '1', title: "课程1-1" }, + { id: '5', parentID: '1', title: "课程1-2" }, + { id: '6', parentID: '5', title: "课程1-2-1" }, + { id: '7', parentID: '5', title: "课程1-2-2" }, + { id: '2', parentID: '0', title: "课程2" }, + { id: '3', parentID: '0', title: "课程3" }, ] export function TreeToFlat(data) {