Skip to content

Commit 7f02c51

Browse files
author
zhangyuanlj
committed
表单流程编辑器v1.0.0
0 parents  commit 7f02c51

File tree

361 files changed

+33916
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

361 files changed

+33916
-0
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.DS_Store
2+
node_modules
3+
/dist
4+
5+
# local env files
6+
.env.local
7+
.env.*.local
8+
9+
# Log files
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
14+
# Editor directories and files
15+
.idea
16+
.vscode
17+
*.suo
18+
*.ntvs*
19+
*.njsproj
20+
*.sln
21+
*.sw?

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# approval
2+
3+
## Project setup
4+
```
5+
npm install
6+
```
7+
8+
### Compiles and hot-reloads for development
9+
```
10+
npm run serve
11+
```
12+
13+
### Compiles and minifies for production
14+
```
15+
npm run build
16+
```
17+
18+
### Lints and fixes files
19+
```
20+
npm run lint
21+
```
22+
23+
### Customize configuration
24+
See [Configuration Reference](https://cli.vuejs.org/config/).

babel.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
presets: [
3+
'@vue/cli-plugin-babel/preset'
4+
],
5+
"plugins": [
6+
["import", {
7+
"libraryName": "view-design",
8+
"libraryDirectory": "src/components"
9+
}, "view-design"],
10+
["import", {
11+
"libraryName": "vant",
12+
"libraryDirectory": "es"
13+
}, "vant"]
14+
]
15+
}

mock/api/Approval.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//获取审批信息
2+
const response = require("../response");
3+
const formDesign = require("../formDesign");
4+
const resBody = {
5+
basicSetting: {
6+
approvalName: "",
7+
approvalGroup: {},
8+
approvalUser: {
9+
text: "",
10+
value: []
11+
},
12+
templateManageUser: {
13+
text: "",
14+
value: []
15+
},
16+
templateIcon: "",
17+
approvalStatement: ""
18+
},
19+
formDesign: formDesign,
20+
processList: [],
21+
processDesign: []
22+
};
23+
const resData = response(1, resBody, "数据获取成功");
24+
module.exports = {
25+
resData: resData
26+
};

mock/api/Rpc_Approval/Create.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const response = require("../../response");
2+
const resBody = null;
3+
//创建一个审批单Rpc_Approval/Create,请求体为对象
4+
const resData = response(1, resBody, "审批单创建成功!");
5+
module.exports = {
6+
method: "POST",
7+
resData: resData
8+
};

mock/api/Rpc_Approval/GetList.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
//获取审批信息
2+
const response = require("../../response");
3+
const formDesign = require("../../formDesign");
4+
const personList = require("../../personList");
5+
const resBody = {
6+
//基础设置
7+
basicSetting: {
8+
approvalName: "测试数据名称",
9+
approvalGroup: {
10+
name: "测试分组1",
11+
value: "1"
12+
},
13+
approvalUser: {
14+
text: "",
15+
value: []
16+
},
17+
templateManageUser: {
18+
text: "",
19+
value: []
20+
},
21+
templateIcon: "",
22+
approvalStatement: ""
23+
},
24+
//表单
25+
formDesign: formDesign,
26+
//审批人、抄送人列表
27+
personList: personList,
28+
//流程
29+
processDesign: [],
30+
//高级设置
31+
advancedSetting: {
32+
approverDuplication: "1",
33+
autoPass: true,
34+
approvalComments: "",
35+
approvalOpinion: ["1"]
36+
}
37+
};
38+
//参数id会附加到地址栏,例如Rpc_Approval/GetList?id=1024
39+
//直接访问http://127.0.0.1:3000/Rpc_Approval/GetList可以看到返回结果
40+
const resData = response(1, resBody, "数据获取成功");
41+
module.exports = {
42+
resData: resData
43+
};

mock/api/Rpc_Approval/Update.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const response = require("../../response");
2+
const resBody = null;
3+
//更新一个审批单Rpc_Approval/Update
4+
//参数为id、approval审批数据
5+
const resData = response(1, resBody, "审批单更新成功!");
6+
module.exports = {
7+
method: "POST",
8+
resData: resData
9+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//获取表单模板
2+
const response = require("../../response");
3+
const formDesign = require("../../formDesign");
4+
const personList = require("../../personList");
5+
const resData = response(1, {
6+
formDesign,
7+
personList
8+
}, "数据获取成功");
9+
//参数id会附加到地址栏,例如Rpc_ApprovalFormTemplate/GetList?id=1024
10+
//直接访问http://127.0.0.1:3000/Rpc_ApprovalFormTemplate/GetList可以看到返回结果
11+
module.exports = {
12+
resData: resData
13+
};

mock/api/test-api.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const Mock = require("mockjs");
2+
const resBody = [];
3+
const response = (code, resBody, message) => {
4+
// return resBody;
5+
return {
6+
code: code,
7+
body: resBody,
8+
message: message
9+
};
10+
};
11+
for (let i = 0; i < 50; i++) {
12+
const title = Mock.mock({
13+
"array|1": ["iPhone 12要涨价?5G组件使其成本增加80美元", "一亿像素加持 卢伟冰暗示小米10将屠榜DxOMark", "荣耀与小米互怼错杀 OV韬光养晦才是大敌"]
14+
});
15+
const publishTime = Mock.mock({
16+
"array|1": [
17+
"2020-01-15 09:30:00",
18+
"2020-01-16 09:30:00",
19+
"2020-01-17 09:30:00"
20+
]
21+
});
22+
const item = {
23+
id: i + 1,
24+
title: title.array,
25+
publishTime: publishTime.array
26+
};
27+
resBody.push(item);
28+
}
29+
const resData = response(200, resBody, "数据获取成功");
30+
module.exports = {
31+
resData: resData
32+
};

mock/api/user-info/create.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
rewriteFunc: (req, res) => {
3+
const resBody = {
4+
name: "Geralt Zhang",
5+
age: "保密"
6+
};
7+
res.status(200).send(resBody);
8+
}
9+
};

0 commit comments

Comments
 (0)