-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(src\views\cloudoc\modeling\index.vue): add factory modeling
- Loading branch information
1 parent
946ad83
commit b0cf77a
Showing
4 changed files
with
251 additions
and
5 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
function handleRandomImage(/* width = 50, height = 50 */) { | ||
//return `https://picsum.photos/${width}/${height}?random=${Random.guid()}` | ||
return `https://gitee.com/chu1204505056/image/raw/master/table/dgiot-image-${Mock.Random.integer( | ||
1, | ||
38 | ||
)}.jpg` | ||
} | ||
|
||
const List = [] | ||
const count = 5 | ||
for (let i = 0; i < count; i++) { | ||
List.push( | ||
Mock.mock({ | ||
id: '@id', | ||
title: '@ctitle(2, 5)', | ||
description: '@csentence', | ||
datetime: '@datetime', | ||
percent: '@integer(80,99)', | ||
percentage: '@integer(0,100)', | ||
}) | ||
) | ||
} | ||
|
||
export function getList() { | ||
// const { title, pageNo = 1, pageSize = 20 } = params | ||
// const mockList = List.filter( | ||
// (item) => !(title && item.title.indexOf(title) < 0) | ||
// ) | ||
// const list = mockList.filter( | ||
// (item, index) => | ||
// index < pageSize * pageNo && index >= pageSize * (pageNo - 1) | ||
// ) | ||
return { | ||
code: 200, | ||
msg: 'success', | ||
data: { List }, | ||
} | ||
} | ||
export function doEdit() { | ||
return { | ||
code: 200, | ||
msg: '模拟保存成功', | ||
} | ||
} | ||
|
||
export function doDelete() { | ||
return { | ||
code: 200, | ||
msg: '模拟删除成功', | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters