Merge branch 'dev'
Showing
307 changed files
with
2229 additions
and
1248 deletions
1 | /* | ||
2 | * @Description: 定义Babel在转换JavaScript代码 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-20 15:12:44 | ||
5 | */ | ||
1 | module.exports = { | 6 | module.exports = { |
2 | presets: [ | 7 | presets: [ |
3 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app | 8 | // https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app | ... | ... |
... | @@ -83,4 +83,4 @@ | ... | @@ -83,4 +83,4 @@ |
83 | "type": "git", | 83 | "type": "git", |
84 | "url": "git+https://github.com/PanJiaChen/vue-element-admin.git" | 84 | "url": "git+https://github.com/PanJiaChen/vue-element-admin.git" |
85 | } | 85 | } |
86 | } | 86 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: 不动产权证 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-16 14:04:18 | 4 | * @LastEditTime: 2023-05-16 14:04:18 |
5 | */ | 5 | */ |
... | @@ -130,4 +130,4 @@ export function bdcqzPreview (data) { | ... | @@ -130,4 +130,4 @@ export function bdcqzPreview (data) { |
130 | data, | 130 | data, |
131 | responseType: 'blob' | 131 | responseType: 'blob' |
132 | }) | 132 | }) |
133 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
133 | } | ... | ... |
src/api/businessApply.js
0 → 100644
1 | /* | ||
2 | * @Description: 业务办理 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-19 14:53:41 | ||
5 | */ | ||
6 | |||
7 | import request from '@/utils/request' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
9 | |||
10 | /** | ||
11 | * @description: 业务办理-获取收藏业务集合 | ||
12 | * @author: renchao | ||
13 | */ | ||
14 | export function getCollectBiz () { | ||
15 | return request({ | ||
16 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getCollectBiz', | ||
17 | method: 'post' | ||
18 | }) | ||
19 | } | ||
20 | /** | ||
21 | * @description: 业务办理-获取左侧菜单 | ||
22 | * @author: renchao | ||
23 | */ | ||
24 | export function getleftMenu () { | ||
25 | return request({ | ||
26 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getleftMenu', | ||
27 | method: 'post' | ||
28 | }) | ||
29 | } | ||
30 | /** | ||
31 | * @description: 登记簿补录 | ||
32 | * @author: renchao | ||
33 | */ | ||
34 | export function getRepairBiz () { | ||
35 | return request({ | ||
36 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getRepairBiz', | ||
37 | method: 'post' | ||
38 | }) | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * @description: 一并申请业务 | ||
43 | * @author: renchao | ||
44 | */ | ||
45 | export function getTogetherBiz () { | ||
46 | return request({ | ||
47 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getTogetherBiz', | ||
48 | method: 'post' | ||
49 | }) | ||
50 | } | ||
51 | |||
52 | /** | ||
53 | * @description: 业务办理-获取下个节点内容 | ||
54 | * @param {*} bsmSqyw | ||
55 | * @author: renchao | ||
56 | */ | ||
57 | export function getNextNode (bsmSqyw) { | ||
58 | return request({ | ||
59 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/getNextNode?parentid=' + bsmSqyw, | ||
60 | method: 'post' | ||
61 | }) | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * @description: 业务办理-业务申请-添加收藏业务 | ||
66 | * @param {*} bsmSqyw | ||
67 | * @author: renchao | ||
68 | */ | ||
69 | export function addCollectBiz (bsmSqyw) { | ||
70 | return request({ | ||
71 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/addCollectBiz?bsmSqyw=' + bsmSqyw, | ||
72 | method: 'post' | ||
73 | }) | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * @description: 业务办理-业务申请-取消收藏业务 | ||
78 | * @param {*} bsmSqyw | ||
79 | * @author: renchao | ||
80 | */ | ||
81 | export function deleteCollectBiz (bsmSqyw) { | ||
82 | return request({ | ||
83 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/deleteCollectBiz?bsmSqyw=' + bsmSqyw, | ||
84 | method: 'post' | ||
85 | }) | ||
86 | } |
src/api/dict.js
0 → 100644
1 | /* | ||
2 | * @Description: 字典接口 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-16 16:06:51 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | |||
9 | |||
10 | /** | ||
11 | * @description: 获取全部字典数据 | ||
12 | * @author: renchao | ||
13 | */ | ||
14 | export function getAllDict () { | ||
15 | return request({ | ||
16 | url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict', | ||
17 | method: 'post' | ||
18 | }) | ||
19 | } | ||
20 | /** | ||
21 | * @description: getQlxxDictList | ||
22 | * @param {*} data | ||
23 | * @author: renchao | ||
24 | */ | ||
25 | export function getQlxxDictList (data) { | ||
26 | return request({ | ||
27 | url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList', | ||
28 | method: 'post', | ||
29 | data | ||
30 | }) | ||
31 | } | ||
32 | |||
33 | /** | ||
34 | * @description: 获取字典子级列表 | ||
35 | * @param {*} bsmDict | ||
36 | * @author: renchao | ||
37 | */ | ||
38 | export function getChildDictList (bsmDict) { | ||
39 | return request({ | ||
40 | url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList', | ||
41 | method: 'get', | ||
42 | params: { | ||
43 | bsmDict: bsmDict | ||
44 | } | ||
45 | }) | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * @description: 编辑字典数据 | ||
50 | * @param {*} data | ||
51 | * @author: renchao | ||
52 | */ | ||
53 | export function editDictNode (data) { | ||
54 | return request({ | ||
55 | url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode', | ||
56 | method: 'post', | ||
57 | data | ||
58 | }) | ||
59 | } | ||
60 | |||
61 | |||
62 | /** | ||
63 | * @description: 刷新字典缓存 | ||
64 | * @author: renchao | ||
65 | */ | ||
66 | export function refreshDictCache () { | ||
67 | return request({ | ||
68 | url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache', | ||
69 | method: 'get' | ||
70 | }) | ||
71 | } |
... | @@ -18,7 +18,18 @@ export function getDjbfm (data) { | ... | @@ -18,7 +18,18 @@ export function getDjbfm (data) { |
18 | params: data | 18 | params: data |
19 | }) | 19 | }) |
20 | } | 20 | } |
21 | 21 | /** | |
22 | * @description: 获取权利类型数组 | ||
23 | * @param {*} params | ||
24 | * @author: renchao | ||
25 | */ | ||
26 | export function getQllxByBdcdyid (params) { | ||
27 | return request({ | ||
28 | url: SERVER.SERVERAPI + '/rest/djbDetail/getQllxByBdcdyid', | ||
29 | method: 'get', | ||
30 | params | ||
31 | }) | ||
32 | } | ||
22 | /** | 33 | /** |
23 | * @description: 获取登记目录 | 34 | * @description: 获取登记目录 |
24 | * @param {*} data | 35 | * @param {*} data | ... | ... |
... | @@ -49,7 +49,7 @@ export function deleteRepairRecord (params) { | ... | @@ -49,7 +49,7 @@ export function deleteRepairRecord (params) { |
49 | */ | 49 | */ |
50 | export function init (params) { | 50 | export function init (params) { |
51 | return request({ | 51 | return request({ |
52 | url: SERVER.SERVERAPI + '/rest/djbRepair/init?bsmRepair='+params, | 52 | url: SERVER.SERVERAPI + '/rest/djbRepair/init?bsmRepair='+params.bsmRepair+'&isEdit='+params.isEdit, |
53 | method: 'get', | 53 | method: 'get', |
54 | }) | 54 | }) |
55 | } | 55 | } |
... | @@ -66,31 +66,45 @@ export function leftMenubl (params) { | ... | @@ -66,31 +66,45 @@ export function leftMenubl (params) { |
66 | params | 66 | params |
67 | }) | 67 | }) |
68 | } | 68 | } |
69 | |||
69 | /** | 70 | /** |
70 | * @description: 获取权利类型数组 | 71 | * @description: 保存数据 |
71 | * @param {*} params | 72 | * @param {*} data |
73 | * @author: renchao | ||
74 | */ | ||
75 | export function save (data) { | ||
76 | return request({ | ||
77 | url: SERVER.SERVERAPI + '/rest/djbRepair/save', | ||
78 | method: 'post', | ||
79 | data | ||
80 | }) | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * @description: 获取上手信息 | ||
85 | * @param {*} data | ||
72 | * @author: renchao | 86 | * @author: renchao |
73 | */ | 87 | */ |
74 | export function getQllxByBdcdyid (params) { | 88 | export function getSsQlxx (params) { |
75 | return request({ | 89 | return request({ |
76 | url: SERVER.SERVERAPI + '/rest/djbDetail/getQllxByBdcdyid', | 90 | url: SERVER.SERVERAPI + '/rest/djbRepair/getSsQlxx', |
77 | method: 'get', | 91 | method: 'get', |
78 | params | 92 | params |
79 | }) | 93 | }) |
80 | } | 94 | } |
95 | |||
81 | /** | 96 | /** |
82 | * @description: 保存数据 | 97 | * @description: 获取主体信息 |
83 | * @param {*} data | 98 | * @param {*} data |
84 | * @author: renchao | 99 | * @author: renchao |
85 | */ | 100 | */ |
86 | export function save (data) { | 101 | export function getZtQlxx (params) { |
87 | return request({ | 102 | return request({ |
88 | url: SERVER.SERVERAPI + '/rest/djbRepair/save', | 103 | url: SERVER.SERVERAPI + '/rest/djbRepair/getZtQlxx', |
89 | method: 'post', | 104 | method: 'get', |
90 | data | 105 | params |
91 | }) | 106 | }) |
92 | } | 107 | } |
93 | |||
94 | /** | 108 | /** |
95 | * @description: 发起业务申请流程 | 109 | * @description: 发起业务申请流程 |
96 | * @param {*} data | 110 | * @param {*} data |
... | @@ -103,3 +117,28 @@ export function save (data) { | ... | @@ -103,3 +117,28 @@ export function save (data) { |
103 | data | 117 | data |
104 | }) | 118 | }) |
105 | } | 119 | } |
120 | /** | ||
121 | * @description: 添加审核意见 | ||
122 | * @param {*} data | ||
123 | * @author: renchao | ||
124 | */ | ||
125 | export function addidea (data) { | ||
126 | return request({ | ||
127 | url: SERVER.SERVERAPI + '/rest/djbRepair/sh', | ||
128 | method: 'post', | ||
129 | data | ||
130 | }) | ||
131 | } | ||
132 | /** | ||
133 | * @description: 添加审核意见 | ||
134 | * @param {*} data | ||
135 | * @author: renchao | ||
136 | */ | ||
137 | export function getShList (data) { | ||
138 | console.log(data); | ||
139 | return request({ | ||
140 | url: SERVER.SERVERAPI + '/rest/djbRepair/getShList?bsmRepair='+data.bsmRepair, | ||
141 | method: 'post', | ||
142 | data | ||
143 | }) | ||
144 | } | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-16 13:36:44 | 4 | * @LastEditTime: 2023-05-16 13:36:44 |
5 | */ | 5 | */ |
... | @@ -8,3 +8,16 @@ let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('Ap | ... | @@ -8,3 +8,16 @@ let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('Ap |
8 | export function uploadUrl () { | 8 | export function uploadUrl () { |
9 | return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload' | 9 | return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload' |
10 | } | 10 | } |
11 | |||
12 | /** | ||
13 | * @description: 上传单个文件 | ||
14 | * @param {*} data | ||
15 | * @author: renchao | ||
16 | */ | ||
17 | export function upload (data) { | ||
18 | return request({ | ||
19 | url: SERVER.SERVERAPI + '/rest/file/upload', | ||
20 | method: 'post', | ||
21 | data | ||
22 | }) | ||
23 | } | ... | ... |
src/api/getusername.js
deleted
100644 → 0
1 | // 封装axios请求 | ||
2 | import axios from "axios"; | ||
3 | // 创建axios的对象 | ||
4 | const instance = axios.create({ | ||
5 | baseURL: "http://192.168.2.235/management/rest/users", | ||
6 | }) | ||
7 | |||
8 | |||
9 | |||
10 | export const getusername = (data) => instance({ | ||
11 | |||
12 | url: '', // 请求地址 | ||
13 | method: 'get', | ||
14 | params:{ | ||
15 | queryOptions: { | ||
16 | conditionGroup: { | ||
17 | conditions: [ | ||
18 | { | ||
19 | property: "loginName", | ||
20 | value:data, | ||
21 | operator: "IN", | ||
22 | }, | ||
23 | ], | ||
24 | queryRelation: "AND", | ||
25 | }, | ||
26 | orderBys:[{"property":"sort","direction":"desc"}] | ||
27 | }, | ||
28 | }, | ||
29 | |||
30 | }) |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: 楼盘表查询 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-06-16 16:06:39 | 4 | * @LastEditTime: 2023-07-19 15:00:43 |
5 | */ | 5 | */ |
6 | import request from "@/utils/request"; | 6 | import request from "@/utils/request"; |
7 | let SERVER = window.config | 7 | let SERVER = window.config |
8 | ? window.config | 8 | ? window.config |
9 | : JSON.parse(localStorage.getItem("ApiUrl")); | 9 | : JSON.parse(localStorage.getItem("ApiUrl")); |
10 | const url = SERVER.SERVERAPI + "/rest/zhcx/lpcx/"; | 10 | const url = SERVER.SERVERAPI + "/rest/zhcx/lpcx/"; |
11 | // | ||
12 | /** | 11 | /** |
13 | * @description:楼盘查询- 根据条件进行列表查询 | 12 | * @description:楼盘查询- 根据条件进行列表查询 |
14 | * @param {*} data | 13 | * @param {*} data |
15 | * @author: renchao | 14 | * @author: renchao |
16 | */ | 15 | */ |
17 | export function getLpZrz(data) { | 16 | export function getLpZrz (data) { |
18 | return request({ | 17 | return request({ |
19 | url: "service-lpb-zq/rest/zhcx/lpcx/getLpZrz", | 18 | url: "service-lpb/rest/zhcx/lpcx/getLpZrz", |
20 | method: "post", | 19 | method: "post", |
21 | data: data, | 20 | data: data, |
22 | }); | 21 | }); |
... | @@ -27,9 +26,9 @@ export function getLpZrz(data) { | ... | @@ -27,9 +26,9 @@ export function getLpZrz(data) { |
27 | * @param {*} zrzbsm | 26 | * @param {*} zrzbsm |
28 | * @author: renchao | 27 | * @author: renchao |
29 | */ | 28 | */ |
30 | export function getLpb(zrzbsm) { | 29 | export function getLpb (zrzbsm) { |
31 | return request({ | 30 | return request({ |
32 | url: "service-lpb-zq/rest/zhcx/lpcx/getLpb?scyclx=0&zrzbsm=" + zrzbsm, | 31 | url: "service-lpb/rest/zhcx/lpcx/getLpb?scyclx=0&zrzbsm=" + zrzbsm, |
33 | method: "get", | 32 | method: "get", |
34 | }); | 33 | }); |
35 | } | 34 | } |
... | @@ -38,10 +37,10 @@ export function getLpb(zrzbsm) { | ... | @@ -38,10 +37,10 @@ export function getLpb(zrzbsm) { |
38 | * @param {*} zrzbsm | 37 | * @param {*} zrzbsm |
39 | * @author: renchao | 38 | * @author: renchao |
40 | */ | 39 | */ |
41 | export function getLpbFwytAndQlxz(zrzbsm) { | 40 | export function getLpbFwytAndQlxz (zrzbsm) { |
42 | return request({ | 41 | return request({ |
43 | url: | 42 | url: |
44 | "service-lpb-zq/rest/zhcx/lpcx/getLpbFwytAndQlxz?scyclx=0&zrzbsm=" + | 43 | "service-lpb/rest/zhcx/lpcx/getLpbFwytAndQlxz?scyclx=0&zrzbsm=" + |
45 | zrzbsm, | 44 | zrzbsm, |
46 | method: "get", | 45 | method: "get", |
47 | }); | 46 | }); |
... | @@ -51,9 +50,9 @@ export function getLpbFwytAndQlxz(zrzbsm) { | ... | @@ -51,9 +50,9 @@ export function getLpbFwytAndQlxz(zrzbsm) { |
51 | * @param {*} zrzbsm | 50 | * @param {*} zrzbsm |
52 | * @author: renchao | 51 | * @author: renchao |
53 | */ | 52 | */ |
54 | export function getLpbQsxtj(zrzbsm) { | 53 | export function getLpbQsxtj (zrzbsm) { |
55 | return request({ | 54 | return request({ |
56 | url: "service-lpb-zq/rest/zhcx/lpcx/getLpbQsxtj?scyclx=0&zrzbsm=" + zrzbsm, | 55 | url: "service-lpb/rest/zhcx/lpcx/getLpbQsxtj?scyclx=0&zrzbsm=" + zrzbsm, |
57 | method: "get", | 56 | method: "get", |
58 | }); | 57 | }); |
59 | } | 58 | } |
... | @@ -65,9 +64,9 @@ export function getLpbQsxtj(zrzbsm) { | ... | @@ -65,9 +64,9 @@ export function getLpbQsxtj(zrzbsm) { |
65 | * scyclx 实测预测类型 0预测,1实测 | 64 | * scyclx 实测预测类型 0预测,1实测 |
66 | * @return {*} | 65 | * @return {*} |
67 | */ | 66 | */ |
68 | export function getLpbTj(zrzbsm) { | 67 | export function getLpbTj (zrzbsm) { |
69 | return request({ | 68 | return request({ |
70 | url: "service-lpb-zq/rest/zhcx/lpcx/getLpbTj?scyclx=0&zrzbsm=" + zrzbsm, | 69 | url: "service-lpb/rest/zhcx/lpcx/getLpbTj?scyclx=0&zrzbsm=" + zrzbsm, |
71 | method: "get", | 70 | method: "get", |
72 | }); | 71 | }); |
73 | } | 72 | } | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-16 13:49:57 | 4 | * @LastEditTime: 2023-05-16 14:01:26 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | |||
8 | /** | 9 | /** |
9 | * @description: 获取自然幢下其他户 | 10 | * @description: 获取审批意见 |
10 | * @param {*} data | 11 | * @param {*} data |
11 | * @author: renchao | 12 | * @author: renchao |
12 | */ | 13 | */ |
13 | export function selectOtherH (data) { | 14 | export function getSpyjList (data) { |
14 | return request({ | 15 | return request({ |
15 | url: 'ywbl/ywsq/selectOtherH', | 16 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getSpyjList', |
16 | method: 'post', | 17 | method: 'post', |
17 | data | 18 | data |
18 | }) | 19 | }) |
19 | } | 20 | } |
21 | |||
20 | /** | 22 | /** |
21 | * @description: 业务办理-选择抵押权信息-根据条件进行列表查询 | 23 | * @description: 保存审批意见 |
22 | * @param {*} data | 24 | * @param {*} data |
23 | * @author: renchao | 25 | * @author: renchao |
24 | */ | 26 | */ |
25 | export function selectDiyaq (data) { | 27 | export function saveSpyj (data) { |
26 | return request({ | 28 | return request({ |
27 | url: SERVER.SERVERAPI + '/rest/ywbl/ywsq/selectDiyaq', | 29 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyj', |
28 | method: 'post', | 30 | method: 'post', |
29 | data | 31 | data |
30 | }) | 32 | }) |
31 | } | 33 | } |
32 | /** | 34 | /** |
33 | * @description: 业务办理-选择查封信息-根据条件进行列表查询 | 35 | * @description: 根据受理申请保存审批意见 |
34 | * @param {*} data | 36 | * @param {*} data |
35 | * @author: renchao | 37 | * @author: renchao |
36 | */ | 38 | */ |
37 | export function selectCfdj (data) { | 39 | export function saveSpyjBySlsq (data) { |
38 | return request({ | 40 | return request({ |
39 | url: SERVER.SERVERAPI + '/rest/ywbl/ywsq/selectCfdj', | 41 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyjBySlsq', |
40 | method: 'post', | 42 | method: 'post', |
41 | data | 43 | data |
42 | }) | 44 | }) |
43 | } | 45 | } |
44 | 46 | ||
45 | /** | 47 | /** |
46 | * @description: 业务办理-业务申请-添加收藏业务 | 48 | * @description: 获取用户常用意见 |
47 | * @param {*} bsmSqyw | 49 | * @param {*} data |
48 | * @author: renchao | 50 | * @author: renchao |
49 | */ | 51 | */ |
50 | export function deleteCollectBiz (bsmSqyw) { | 52 | export function getUserCommonOpinion (data) { |
51 | return request({ | 53 | return request({ |
52 | url: SERVER.SERVERAPI + '/rest/ywbl/BusinessApply/deleteCollectBiz?bsmSqyw=' + bsmSqyw, | 54 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getUserCommonOpinion', |
53 | method: 'post' | 55 | method: 'post', |
56 | data | ||
54 | }) | 57 | }) |
55 | } | 58 | } |
59 | |||
56 | /** | 60 | /** |
57 | * @description: 国有建设用地使用权/房屋使用权 -选择不动产单元 | 61 | * @description: 新增用户常用意见 |
58 | * @param {*} data | 62 | * @param {*} params |
59 | * @author: renchao | 63 | * @author: renchao |
60 | */ | 64 | */ |
61 | export function choiceBdcdy (data) { | 65 | export function addUserCommonOpinion (params) { |
62 | return request({ | 66 | return request({ |
63 | url: SERVER.SERVERAPI + '/rest/business/workFlow/choiceBdcdy', | 67 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/addUserCommonOpinion', |
64 | method: 'post', | 68 | method: 'get', |
65 | data | 69 | params |
66 | }) | 70 | }) |
67 | } | 71 | } |
68 | 72 | ||
69 | /** | 73 | /** |
70 | * @description: 选择补录权利信息 | 74 | * @description: 删除常用意见 |
71 | * @param {*} data | 75 | * @param {*} params |
72 | * @author: renchao | 76 | * @author: renchao |
73 | */ | 77 | */ |
74 | export function selectRepairQlxx (data) { | 78 | export function delUserCommonOpinion (params) { |
75 | return request({ | 79 | return request({ |
76 | url: SERVER.SERVERAPI + '/rest/ywbl/ywsq/selectRepairQlxx', | 80 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/delUserCommonOpinion', |
77 | method: 'post', | 81 | method: 'get', |
78 | data | 82 | params |
79 | }) | 83 | }) |
80 | } | 84 | } | ... | ... |
src/api/print.js
0 → 100644
1 | /* | ||
2 | * @Description: 模板管理 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-16 16:02:32 | ||
5 | */ | ||
6 | |||
7 | import request from '@/utils/request' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
9 | |||
10 | /** | ||
11 | * @description: 获取打印模板列表 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function selectPrintTemplateList (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/system/print/selectPrintTemplateList', | ||
18 | method: 'post', | ||
19 | data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 新增打印模板列表 | ||
25 | * @param {*} data | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function addPrintTemplate (data) { | ||
29 | return request({ | ||
30 | url: SERVER.SERVERAPI + '/rest/system/print/addPrintTemplate', | ||
31 | method: 'post', | ||
32 | data | ||
33 | }) | ||
34 | } | ||
35 | |||
36 | /** | ||
37 | * @description: 编辑打印模板列表 | ||
38 | * @param {*} data | ||
39 | * @author: renchao | ||
40 | */ | ||
41 | export function editPrintTemplate (data) { | ||
42 | return request({ | ||
43 | url: SERVER.SERVERAPI + '/rest/system/print/editPrintTemplate', | ||
44 | method: 'post', | ||
45 | data | ||
46 | }) | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * @description: 删除打印模板列表 | ||
51 | * @param {*} params | ||
52 | * @author: renchao | ||
53 | */ | ||
54 | export function delPrintTemplate (params) { | ||
55 | return request({ | ||
56 | url: SERVER.SERVERAPI + '/rest/system/print/delPrintTemplate', | ||
57 | method: 'get', | ||
58 | params: params | ||
59 | }) | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * @description: 根据模板编号获取打印模板 | ||
64 | * @param {*} params | ||
65 | * @author: renchao | ||
66 | */ | ||
67 | export function getPrintTemplateByCode (params) { | ||
68 | return request({ | ||
69 | url: SERVER.SERVERAPI + '/rest/system/print/getPrintTemplateByCode', | ||
70 | method: 'get', | ||
71 | params: params | ||
72 | }) | ||
73 | } |
src/api/search.js
0 → 100644
1 | /* | ||
2 | * @Description: 综合查询 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:23:50 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | |||
9 | |||
10 | /** | ||
11 | * @description: 根据条件进行列表查询 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function getDjbBysearch (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/zhcx/search/qlxx/getDjbBysearch', | ||
18 | method: 'post', | ||
19 | data: data | ||
20 | }) | ||
21 | } | ||
22 | /** | ||
23 | * @description: 进度查询列表 | ||
24 | * @param {*} data | ||
25 | * @author: renchao | ||
26 | */ | ||
27 | export function getJdcxBysearch (data) { | ||
28 | return request({ | ||
29 | url: SERVER.SERVERAPI + '/rest/zhcx/search/getJdcxBysearch', | ||
30 | method: 'post', | ||
31 | data | ||
32 | }) | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * @description: 证书领取查询 | ||
37 | * @param {*} data | ||
38 | * @author: renchao | ||
39 | */ | ||
40 | export function getBdcqzReceiveList (data) { | ||
41 | return request({ | ||
42 | url: SERVER.SERVERAPI + '/rest/zhcx/search/getBdcqzReceiveList', | ||
43 | method: 'post', | ||
44 | data | ||
45 | }) | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * @description: 在建工程抵押查询 | ||
50 | * @param {*} data | ||
51 | * @author: renchao | ||
52 | */ | ||
53 | export function getZjgcdyList (data) { | ||
54 | return request({ | ||
55 | url: SERVER.SERVERAPI + '/rest/zhcx/search/getZjgcdyList', | ||
56 | method: 'post', | ||
57 | data | ||
58 | }) | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * @description:楼盘查询- 根据bsmSlsq查询自然幢标识码 | ||
63 | * @param {*} data | ||
64 | * @author: renchao | ||
65 | */ | ||
66 | export function getZrzbsmList(bsm) { | ||
67 | return request({ | ||
68 | url: SERVER.SERVERAPI + "/rest/zhcx/search/getZrzbsmList?bsmSlsq=" + bsm, | ||
69 | method: "post", | ||
70 | data: bsm, | ||
71 | }); | ||
72 | } | ||
73 | |||
74 | |||
75 |
src/api/sysNotice.js
0 → 100644
1 | /* | ||
2 | * @Description: 系统通知 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-16 16:02:32 | ||
5 | */ | ||
6 | |||
7 | import request from '@/utils/request' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
9 | |||
10 | /** | ||
11 | * @description: 新增系统通知 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function addSysNotice (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice', | ||
18 | method: 'post', | ||
19 | data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 编辑系统通知 | ||
25 | * @param {*} data | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function updateSysNotice (data) { | ||
29 | return request({ | ||
30 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice', | ||
31 | method: 'post', | ||
32 | data | ||
33 | }) | ||
34 | } | ||
35 | |||
36 | // 获取通知列表 | ||
37 | /** | ||
38 | * @description: | ||
39 | * @param {*} data | ||
40 | * @author: renchao | ||
41 | */ | ||
42 | export function getSysNoticeList (data) { | ||
43 | return request({ | ||
44 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList', | ||
45 | method: 'post', | ||
46 | data | ||
47 | }) | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * @description: 获取法律法规列表 | ||
52 | * @param {*} data | ||
53 | * @author: renchao | ||
54 | */ | ||
55 | export function getSysPolicyList (data) { | ||
56 | return request({ | ||
57 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList', | ||
58 | method: 'post', | ||
59 | data | ||
60 | }) | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * @description: 删除系统通知 | ||
65 | * @param {*} params | ||
66 | * @author: renchao | ||
67 | */ | ||
68 | export function deleteSysNotice (params) { | ||
69 | return request({ | ||
70 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice', | ||
71 | method: 'get', | ||
72 | params: params | ||
73 | }) | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * @description: 发布通知 | ||
78 | * @param {*} params | ||
79 | * @author: renchao | ||
80 | */ | ||
81 | export function publishNotice (params) { | ||
82 | return request({ | ||
83 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice', | ||
84 | method: 'get', | ||
85 | params: params | ||
86 | }) | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * @description: 取消发布通知 | ||
91 | * @param {*} params | ||
92 | * @author: renchao | ||
93 | */ | ||
94 | export function unPublishNotice (params) { | ||
95 | return request({ | ||
96 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice', | ||
97 | method: 'get', | ||
98 | params: params | ||
99 | }) | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * @description: 设置已读状态 | ||
104 | * @param {*} params | ||
105 | * @author: renchao | ||
106 | */ | ||
107 | export function setReadStatus (params) { | ||
108 | return request({ | ||
109 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus', | ||
110 | method: 'get', | ||
111 | params: params | ||
112 | }) | ||
113 | } | ||
114 | |||
115 | /** | ||
116 | * @description: 一键设置已读 | ||
117 | * @author: renchao | ||
118 | */ | ||
119 | export function setAllRead () { | ||
120 | return request({ | ||
121 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead', | ||
122 | method: 'get' | ||
123 | }) | ||
124 | } |
src/api/sysPushRecord.js
0 → 100644
1 | /* | ||
2 | * @Description: 数据推送 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:23:50 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | |||
9 | /** | ||
10 | * @description: 数据上报推送查询 | ||
11 | * @param {*} data | ||
12 | * @author: renchao | ||
13 | */ | ||
14 | export function list (data) { | ||
15 | return request({ | ||
16 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/list', | ||
17 | method: 'post', | ||
18 | data | ||
19 | }) | ||
20 | } | ||
21 | |||
22 | /** | ||
23 | * @description: 数据上报推送 | ||
24 | * @param {*} data | ||
25 | * @author: renchao | ||
26 | */ | ||
27 | export function push (data) { | ||
28 | return request({ | ||
29 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/push', | ||
30 | method: 'post', | ||
31 | data | ||
32 | }) | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * @description: 数据上报推送 | ||
37 | * @param {*} bsm | ||
38 | * @author: renchao | ||
39 | */ | ||
40 | export function detail (bsm) { | ||
41 | return request({ | ||
42 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/detail?bsm=' + bsm, | ||
43 | method: 'get' | ||
44 | }) | ||
45 | } | ||
46 | |||
47 | |||
48 |
src/api/sysSerial.js
0 → 100644
1 | /* | ||
2 | * @Description: 系统序列号设置 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:24:24 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | /** | ||
9 | * @description: 证书管理-获取序列号 | ||
10 | * @param {*} params | ||
11 | * @author: renchao | ||
12 | */ | ||
13 | export function getSysSerialSingle (params) { | ||
14 | return request({ | ||
15 | url: SERVER.SERVERAPI + '/rest/system/sysSerial/getSysSerialSingle', | ||
16 | method: 'get', | ||
17 | params: params | ||
18 | }) | ||
19 | } |
1 | /* | 1 | /* |
2 | * @Description: 系统管理 | 2 | * @Description: 申请登记业务规则 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-16 16:02:32 | 4 | * @LastEditTime: 2023-05-16 16:02:32 |
5 | */ | 5 | */ |
... | @@ -8,19 +8,6 @@ import request from '@/utils/request' | ... | @@ -8,19 +8,6 @@ import request from '@/utils/request' |
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
9 | 9 | ||
10 | /** | 10 | /** |
11 | * @description: 上传单个文件 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function upload (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/file/upload', | ||
18 | method: 'post', | ||
19 | data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 申请业务规则API-根据条件进行列表查询 | 11 | * @description: 申请业务规则API-根据条件进行列表查询 |
25 | * @param {*} data | 12 | * @param {*} data |
26 | * @author: renchao | 13 | * @author: renchao |
... | @@ -81,222 +68,3 @@ export function saveSqdjyw (data) { | ... | @@ -81,222 +68,3 @@ export function saveSqdjyw (data) { |
81 | data | 68 | data |
82 | }) | 69 | }) |
83 | } | 70 | } |
84 | |||
85 | |||
86 | /** | ||
87 | * @description: 其他及附记模板-列表详情 | ||
88 | * @param {*} data | ||
89 | * @author: renchao | ||
90 | */ | ||
91 | export function sysSqywmbszSearch (data) { | ||
92 | return request({ | ||
93 | url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/search', | ||
94 | method: 'post', | ||
95 | data | ||
96 | }) | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * @description: 其他及附记模板-读取明细 | ||
101 | * @param {*} id | ||
102 | * @author: renchao | ||
103 | */ | ||
104 | export function getSysSqywmbszDetailById (id) { | ||
105 | return request({ | ||
106 | url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/getSysSqywmbszDetailById?id=' + id, | ||
107 | method: 'get' | ||
108 | }) | ||
109 | } | ||
110 | /** | ||
111 | * @description: 其他及附记模板-修改申请业务模板设置 | ||
112 | * @param {*} data | ||
113 | * @author: renchao | ||
114 | */ | ||
115 | export function updateSysSqywmbsz (data) { | ||
116 | return request({ | ||
117 | url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/updateSysSqywmbsz', | ||
118 | method: 'put', | ||
119 | data | ||
120 | }) | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * @description: 新增系统通知 | ||
125 | * @param {*} data | ||
126 | * @author: renchao | ||
127 | */ | ||
128 | export function addSysNotice (data) { | ||
129 | return request({ | ||
130 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/addSysNotice', | ||
131 | method: 'post', | ||
132 | data | ||
133 | }) | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * @description: 编辑系统通知 | ||
138 | * @param {*} data | ||
139 | * @author: renchao | ||
140 | */ | ||
141 | export function updateSysNotice (data) { | ||
142 | return request({ | ||
143 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/updateSysNotice', | ||
144 | method: 'post', | ||
145 | data | ||
146 | }) | ||
147 | } | ||
148 | |||
149 | // 获取通知列表 | ||
150 | /** | ||
151 | * @description: | ||
152 | * @param {*} data | ||
153 | * @author: renchao | ||
154 | */ | ||
155 | export function getSysNoticeList (data) { | ||
156 | return request({ | ||
157 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysNoticeList', | ||
158 | method: 'post', | ||
159 | data | ||
160 | }) | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * @description: 获取法律法规列表 | ||
165 | * @param {*} data | ||
166 | * @author: renchao | ||
167 | */ | ||
168 | export function getSysPolicyList (data) { | ||
169 | return request({ | ||
170 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/getSysPolicyList', | ||
171 | method: 'post', | ||
172 | data | ||
173 | }) | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * @description: 删除系统通知 | ||
178 | * @param {*} params | ||
179 | * @author: renchao | ||
180 | */ | ||
181 | export function deleteSysNotice (params) { | ||
182 | return request({ | ||
183 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/deleteSysNotice', | ||
184 | method: 'get', | ||
185 | params: params | ||
186 | }) | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * @description: 发布通知 | ||
191 | * @param {*} params | ||
192 | * @author: renchao | ||
193 | */ | ||
194 | export function publishNotice (params) { | ||
195 | return request({ | ||
196 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/publishNotice', | ||
197 | method: 'get', | ||
198 | params: params | ||
199 | }) | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * @description: 取消发布通知 | ||
204 | * @param {*} params | ||
205 | * @author: renchao | ||
206 | */ | ||
207 | export function unPublishNotice (params) { | ||
208 | return request({ | ||
209 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/unPublishNotice', | ||
210 | method: 'get', | ||
211 | params: params | ||
212 | }) | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * @description: 设置已读状态 | ||
217 | * @param {*} params | ||
218 | * @author: renchao | ||
219 | */ | ||
220 | export function setReadStatus (params) { | ||
221 | return request({ | ||
222 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setReadStatus', | ||
223 | method: 'get', | ||
224 | params: params | ||
225 | }) | ||
226 | } | ||
227 | |||
228 | /** | ||
229 | * @description: 一键设置已读 | ||
230 | * @author: renchao | ||
231 | */ | ||
232 | export function setAllRead () { | ||
233 | return request({ | ||
234 | url: SERVER.SERVERAPI + '/rest/system/sysNotice/setAllRead', | ||
235 | method: 'get' | ||
236 | }) | ||
237 | } | ||
238 | |||
239 | /** | ||
240 | * @description: 获取打印模板列表 | ||
241 | * @param {*} data | ||
242 | * @author: renchao | ||
243 | */ | ||
244 | export function selectPrintTemplateList (data) { | ||
245 | return request({ | ||
246 | url: SERVER.SERVERAPI + '/rest/system/print/selectPrintTemplateList', | ||
247 | method: 'post', | ||
248 | data | ||
249 | }) | ||
250 | } | ||
251 | |||
252 | /** | ||
253 | * @description: 新增打印模板列表 | ||
254 | * @param {*} data | ||
255 | * @author: renchao | ||
256 | */ | ||
257 | export function addPrintTemplate (data) { | ||
258 | return request({ | ||
259 | url: SERVER.SERVERAPI + '/rest/system/print/addPrintTemplate', | ||
260 | method: 'post', | ||
261 | data | ||
262 | }) | ||
263 | } | ||
264 | |||
265 | /** | ||
266 | * @description: 编辑打印模板列表 | ||
267 | * @param {*} data | ||
268 | * @author: renchao | ||
269 | */ | ||
270 | export function editPrintTemplate (data) { | ||
271 | return request({ | ||
272 | url: SERVER.SERVERAPI + '/rest/system/print/editPrintTemplate', | ||
273 | method: 'post', | ||
274 | data | ||
275 | }) | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * @description: 删除打印模板列表 | ||
280 | * @param {*} params | ||
281 | * @author: renchao | ||
282 | */ | ||
283 | export function delPrintTemplate (params) { | ||
284 | return request({ | ||
285 | url: SERVER.SERVERAPI + '/rest/system/print/delPrintTemplate', | ||
286 | method: 'get', | ||
287 | params: params | ||
288 | }) | ||
289 | } | ||
290 | |||
291 | /** | ||
292 | * @description: 根据模板编号获取打印模板 | ||
293 | * @param {*} params | ||
294 | * @author: renchao | ||
295 | */ | ||
296 | export function getPrintTemplateByCode (params) { | ||
297 | return request({ | ||
298 | url: SERVER.SERVERAPI + '/rest/system/print/getPrintTemplateByCode', | ||
299 | method: 'get', | ||
300 | params: params | ||
301 | }) | ||
302 | } | ... | ... |
src/api/sysSqywmbsz.js
0 → 100644
1 | /* | ||
2 | * @Description: 申请业务模板设置 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-16 16:02:32 | ||
5 | */ | ||
6 | |||
7 | import request from '@/utils/request' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
9 | |||
10 | /** | ||
11 | * @description: 其他及附记模板-列表详情 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function sysSqywmbszSearch (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/search', | ||
18 | method: 'post', | ||
19 | data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 其他及附记模板-读取明细 | ||
25 | * @param {*} id | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function getSysSqywmbszDetailById (id) { | ||
29 | return request({ | ||
30 | url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/getSysSqywmbszDetailById?id=' + id, | ||
31 | method: 'get' | ||
32 | }) | ||
33 | } | ||
34 | /** | ||
35 | * @description: 其他及附记模板-修改申请业务模板设置 | ||
36 | * @param {*} data | ||
37 | * @author: renchao | ||
38 | */ | ||
39 | export function updateSysSqywmbsz (data) { | ||
40 | return request({ | ||
41 | url: SERVER.SERVERAPI + '/rest/system/sysSqywmbsz/updateSysSqywmbsz', | ||
42 | method: 'put', | ||
43 | data | ||
44 | }) | ||
45 | } |
... | @@ -28,61 +28,3 @@ export function getMenuInfo () { | ... | @@ -28,61 +28,3 @@ export function getMenuInfo () { |
28 | method: 'get', | 28 | method: 'get', |
29 | }) | 29 | }) |
30 | } | 30 | } |
31 | |||
32 | /** | ||
33 | * @description: 获取全部字典数据 | ||
34 | * @author: renchao | ||
35 | */ | ||
36 | export function getAllDict () { | ||
37 | return request({ | ||
38 | url: SERVER.SERVERAPI + '/rest/sys/dict/getAllDict', | ||
39 | method: 'post' | ||
40 | }) | ||
41 | } | ||
42 | export function getQlxxDictList (data) { | ||
43 | return request({ | ||
44 | url: SERVER.SERVERAPI + '/rest/sys/dict/getQlxxDictList', | ||
45 | method: 'post', | ||
46 | data | ||
47 | }) | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * @description: 获取字典子级列表 | ||
52 | * @param {*} bsmDict | ||
53 | * @author: renchao | ||
54 | */ | ||
55 | export function getChildDictList (bsmDict) { | ||
56 | return request({ | ||
57 | url: SERVER.SERVERAPI + '/rest/sys/dict/getChildDictList', | ||
58 | method: 'get', | ||
59 | params: { | ||
60 | bsmDict: bsmDict | ||
61 | } | ||
62 | }) | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * @description: 编辑字典数据 | ||
67 | * @param {*} data | ||
68 | * @author: renchao | ||
69 | */ | ||
70 | export function editDictNode (data) { | ||
71 | return request({ | ||
72 | url: SERVER.SERVERAPI + '/rest/sys/dict/editDictNode', | ||
73 | method: 'post', | ||
74 | data | ||
75 | }) | ||
76 | } | ||
77 | |||
78 | |||
79 | /** | ||
80 | * @description: 刷新字典缓存 | ||
81 | * @author: renchao | ||
82 | */ | ||
83 | export function refreshDictCache () { | ||
84 | return request({ | ||
85 | url: SERVER.SERVERAPI + '/rest/sys/dict/refreshDictCache', | ||
86 | method: 'get' | ||
87 | }) | ||
88 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: 系统监控 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-16 16:07:10 | 4 | * @LastEditTime: 2023-05-16 16:07:10 |
5 | */ | 5 | */ |
... | @@ -17,8 +17,6 @@ export function getErrorLogList (data) { | ... | @@ -17,8 +17,6 @@ export function getErrorLogList (data) { |
17 | data | 17 | data |
18 | }) | 18 | }) |
19 | } | 19 | } |
20 | |||
21 | |||
22 | /** | 20 | /** |
23 | * @description: 系统监控 -获取操作日志列表 | 21 | * @description: 系统监控 -获取操作日志列表 |
24 | * @param {*} data | 22 | * @param {*} data |
... | @@ -31,7 +29,6 @@ export function getOperationLogList (data) { | ... | @@ -31,7 +29,6 @@ export function getOperationLogList (data) { |
31 | data | 29 | data |
32 | }) | 30 | }) |
33 | } | 31 | } |
34 | |||
35 | /** | 32 | /** |
36 | * @description: 系统监控 -主机监控 | 33 | * @description: 系统监控 -主机监控 |
37 | * @author: renchao | 34 | * @author: renchao | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-16 14:01:26 | 4 | * @LastEditTime: 2023-05-17 10:24:24 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | /** | 8 | /** |
9 | * @description: 流程图 | ||
10 | * @param {*} bsmSlsq | ||
11 | * @param {*} bestepid | ||
12 | * @author: renchao | ||
13 | */ | ||
14 | export function getWorkFlowImage (bsmSlsq, bestepid) { | ||
15 | return request({ | ||
16 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage', | ||
17 | method: 'get', | ||
18 | params: { | ||
19 | bsmSlsq: bsmSlsq, | ||
20 | bestepid: bestepid | ||
21 | } | ||
22 | }) | ||
23 | } | ||
24 | /** | ||
9 | * @description: 转出 | 25 | * @description: 转出 |
10 | * @param {*} data | 26 | * @param {*} data |
11 | * @author: renchao | 27 | * @author: renchao |
12 | */ | 28 | */ |
13 | export function completeTask (data) { | 29 | export function completeTask (data) { |
14 | return request({ | 30 | return request({ |
15 | url: SERVER.SERVERAPI + '/rest/business/workFlow/completeTask', | 31 | url: SERVER.SERVERAPI + '/rest/business/workFlow/completeTask', |
16 | method: 'post', | 32 | method: 'post', |
17 | data | 33 | data |
18 | }) | 34 | }) |
19 | } | 35 | } |
20 | /** | 36 | /** |
21 | * @description: 回退表格数据 | 37 | * @description: 回退表格数据 |
... | @@ -23,11 +39,11 @@ export function completeTask (data) { | ... | @@ -23,11 +39,11 @@ export function completeTask (data) { |
23 | * @author: renchao | 39 | * @author: renchao |
24 | */ | 40 | */ |
25 | export function getTaskBackNode (params) { | 41 | export function getTaskBackNode (params) { |
26 | return request({ | 42 | return request({ |
27 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getTaskBackNode', | 43 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getTaskBackNode', |
28 | method: 'get', | 44 | method: 'get', |
29 | params: params | 45 | params: params |
30 | }) | 46 | }) |
31 | } | 47 | } |
32 | /** | 48 | /** |
33 | * @description: 退回确认接口 | 49 | * @description: 退回确认接口 |
... | @@ -35,11 +51,11 @@ export function getTaskBackNode (params) { | ... | @@ -35,11 +51,11 @@ export function getTaskBackNode (params) { |
35 | * @author: renchao | 51 | * @author: renchao |
36 | */ | 52 | */ |
37 | export function sendBackTask (data) { | 53 | export function sendBackTask (data) { |
38 | return request({ | 54 | return request({ |
39 | url: SERVER.SERVERAPI + '/rest/business/workFlow/sendBackTask', | 55 | url: SERVER.SERVERAPI + '/rest/business/workFlow/sendBackTask', |
40 | method: 'post', | 56 | method: 'post', |
41 | data | 57 | data |
42 | }) | 58 | }) |
43 | } | 59 | } |
44 | /** | 60 | /** |
45 | * @description: 获取左侧列表 | 61 | * @description: 获取左侧列表 |
... | @@ -47,11 +63,11 @@ export function sendBackTask (data) { | ... | @@ -47,11 +63,11 @@ export function sendBackTask (data) { |
47 | * @author: renchao | 63 | * @author: renchao |
48 | */ | 64 | */ |
49 | export function leftMenu (data) { | 65 | export function leftMenu (data) { |
50 | return request({ | 66 | return request({ |
51 | url: SERVER.SERVERAPI + '/rest/business/workFlow/leftMenu', | 67 | url: SERVER.SERVERAPI + '/rest/business/workFlow/leftMenu', |
52 | method: 'post', | 68 | method: 'post', |
53 | data | 69 | data |
54 | }) | 70 | }) |
55 | } | 71 | } |
56 | 72 | ||
57 | /** | 73 | /** |
... | @@ -60,11 +76,11 @@ export function leftMenu (data) { | ... | @@ -60,11 +76,11 @@ export function leftMenu (data) { |
60 | * @author: renchao | 76 | * @author: renchao |
61 | */ | 77 | */ |
62 | export function getNextLinkInfo (params) { | 78 | export function getNextLinkInfo (params) { |
63 | return request({ | 79 | return request({ |
64 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getNextLinkInfo', | 80 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getNextLinkInfo', |
65 | method: 'get', | 81 | method: 'get', |
66 | params: params | 82 | params: params |
67 | }); | 83 | }); |
68 | } | 84 | } |
69 | 85 | ||
70 | /** | 86 | /** |
... | @@ -73,11 +89,23 @@ export function getNextLinkInfo (params) { | ... | @@ -73,11 +89,23 @@ export function getNextLinkInfo (params) { |
73 | * @author: renchao | 89 | * @author: renchao |
74 | */ | 90 | */ |
75 | export function getStepFormInfo (data) { | 91 | export function getStepFormInfo (data) { |
76 | return request({ | 92 | return request({ |
77 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getStepFormInfo', | 93 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getStepFormInfo', |
78 | method: 'post', | 94 | method: 'post', |
79 | data | 95 | data |
80 | }); | 96 | }); |
97 | } | ||
98 | /** | ||
99 | * @description: 获取单元对应的环节表单信息 | ||
100 | * @param {*} data | ||
101 | * @author: renchao | ||
102 | */ | ||
103 | export function getBlYbxStepFormInfo (data) { | ||
104 | return request({ | ||
105 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getBlYbxStepFormInfo', | ||
106 | method: 'post', | ||
107 | data | ||
108 | }); | ||
81 | } | 109 | } |
82 | /** | 110 | /** |
83 | * @description: 环节扩展信息 | 111 | * @description: 环节扩展信息 |
... | @@ -85,134 +113,145 @@ export function getStepFormInfo (data) { | ... | @@ -85,134 +113,145 @@ export function getStepFormInfo (data) { |
85 | * @author: renchao | 113 | * @author: renchao |
86 | */ | 114 | */ |
87 | export function stepExpandInfo (data) { | 115 | export function stepExpandInfo (data) { |
88 | return request({ | 116 | return request({ |
89 | url: SERVER.SERVERAPI + '/rest/business/workFlow/stepExpandInfo', | 117 | url: SERVER.SERVERAPI + '/rest/business/workFlow/stepExpandInfo', |
90 | method: 'post', | 118 | method: 'post', |
91 | data | 119 | data |
92 | }) | 120 | }) |
93 | } | 121 | } |
94 | |||
95 | /** | 122 | /** |
96 | * @description: 获取审批意见 | 123 | * @description: 登簿接口 |
97 | * @param {*} data | 124 | * @param {*} data |
98 | * @author: renchao | 125 | * @author: renchao |
99 | */ | 126 | */ |
100 | export function getSpyjList (data) { | 127 | export function record (data) { |
101 | return request({ | 128 | return request({ |
102 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getSpyjList', | 129 | url: SERVER.SERVERAPI + '/rest/business/workFlow/record', |
103 | method: 'post', | 130 | method: 'post', |
104 | data | 131 | data |
105 | }) | 132 | }) |
133 | } | ||
134 | |||
135 | // 终止任务 | ||
136 | export function stopTask (data) { | ||
137 | return request({ | ||
138 | url: SERVER.SERVERAPI + '/rest/business/workFlow/stopTask', | ||
139 | method: 'post', | ||
140 | data | ||
141 | }) | ||
106 | } | 142 | } |
107 | 143 | ||
108 | /** | 144 | /** |
109 | * @description: 保存审批意见 | 145 | * @description: 获取用户任务权限 |
110 | * @param {*} data | 146 | * @param {*} params |
111 | * @author: renchao | 147 | * @author: renchao |
112 | */ | 148 | */ |
113 | export function saveSpyj (data) { | 149 | export function judgeUserTaskPermission (params) { |
114 | return request({ | 150 | return request({ |
115 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyj', | 151 | url: SERVER.SERVERAPI + '/rest/business/workFlow/judgeUserTaskPermission', |
116 | method: 'post', | 152 | method: 'get', |
117 | data | 153 | params |
118 | }) | 154 | }) |
119 | } | 155 | } |
156 | |||
120 | /** | 157 | /** |
121 | * @description: 根据受理申请保存审批意见 | 158 | * @description: 获取申请书数据 |
122 | * @param {*} data | 159 | * @param {*} data |
123 | * @author: renchao | 160 | * @author: renchao |
124 | */ | 161 | */ |
125 | export function saveSpyjBySlsq (data) { | 162 | export function getPrintApplicationInfo (data) { |
126 | return request({ | 163 | return request({ |
127 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/saveSpyjBySlsq', | 164 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getPrintApplicationInfo', |
128 | method: 'post', | 165 | method: 'post', |
129 | data | 166 | data |
130 | }) | 167 | }) |
131 | } | 168 | } |
132 | 169 | ||
133 | /** | 170 | /** |
134 | * @description: 获取用户常用意见 | 171 | * @description: 国有建设用地使用权/房屋使用权 -选择不动产单元 |
135 | * @param {*} data | 172 | * @param {*} data |
136 | * @author: renchao | 173 | * @author: renchao |
137 | */ | 174 | */ |
138 | export function getUserCommonOpinion (data) { | 175 | export function choiceBdcdy (data) { |
139 | return request({ | 176 | return request({ |
140 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getUserCommonOpinion', | 177 | url: SERVER.SERVERAPI + '/rest/business/workFlow/choiceBdcdy', |
141 | method: 'post', | 178 | method: 'post', |
142 | data | 179 | data |
143 | }) | 180 | }) |
144 | } | 181 | } |
145 | |||
146 | /** | 182 | /** |
147 | * @description: 新增用户常用意见 | 183 | * @description: 待办箱/不动产单元删除接口 |
148 | * @param {*} params | 184 | * @param {*} data |
149 | * @author: renchao | 185 | * @author: renchao |
150 | */ | 186 | */ |
151 | export function addUserCommonOpinion (params) { | 187 | export function deleteFlow (data) { |
152 | return request({ | 188 | return request({ |
153 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/addUserCommonOpinion', | 189 | url: SERVER.SERVERAPI + '/rest/business/workFlow/deleteFlow', |
154 | method: 'get', | 190 | method: 'post', |
155 | params | 191 | data |
156 | }) | 192 | }) |
157 | } | 193 | } |
158 | |||
159 | /** | 194 | /** |
160 | * @description: 删除常用意见 | 195 | * @description: 业务办理-发起业务申请流程 |
161 | * @param {*} params | 196 | * @param {*} data |
162 | * @author: renchao | 197 | * @author: renchao |
163 | */ | 198 | */ |
164 | export function delUserCommonOpinion (params) { | 199 | export function startBusinessFlow (data) { |
165 | return request({ | 200 | return request({ |
166 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/delUserCommonOpinion', | 201 | url: SERVER.SERVERAPI + '/rest/business/workFlow/startBusinessFlow', |
167 | method: 'get', | 202 | method: 'post', |
168 | params | 203 | data |
169 | }) | 204 | }) |
170 | } | 205 | } |
171 | 206 | ||
172 | /** | 207 | /** |
173 | * @description: 登簿接口 | 208 | * @description: 业务办理-发起补录申请流程 |
174 | * @param {*} data | 209 | * @param {*} data |
175 | * @author: renchao | 210 | * @author: renchao |
176 | */ | 211 | */ |
177 | export function record (data) { | 212 | export function startRepairFlow (data) { |
178 | return request({ | 213 | return request({ |
179 | url: SERVER.SERVERAPI + '/rest/business/workFlow/record', | 214 | url: SERVER.SERVERAPI + '/rest/business/workFlow/startRepairFlow', |
180 | method: 'post', | 215 | method: 'post', |
181 | data | 216 | data |
182 | }) | 217 | }) |
183 | } | 218 | } |
184 | 219 | ||
185 | // 终止任务 | 220 | /** |
186 | export function stopTask (data) { | 221 | * @description: 申请列表删除 |
187 | return request({ | 222 | * @param {*} data |
188 | url: SERVER.SERVERAPI + '/rest/business/workFlow/stopTask', | 223 | * @author: renchao |
189 | method: 'post', | 224 | */ |
190 | data | 225 | export function deleteSlbdcdy (data) { |
191 | }) | 226 | return request({ |
227 | url: SERVER.SERVERAPI + '/rest/business/workFlow/deleteSlbdcdy', | ||
228 | method: 'post', | ||
229 | data | ||
230 | }) | ||
192 | } | 231 | } |
193 | 232 | ||
194 | /** | 233 | /** |
195 | * @description: 获取用户任务权限 | 234 | * @description: 认领任务 |
196 | * @param {*} params | 235 | * @param {*} bsmSlsq |
236 | * @param {*} bestepid | ||
197 | * @author: renchao | 237 | * @author: renchao |
198 | */ | 238 | */ |
199 | export function judgeUserTaskPermission (params) { | 239 | export function claimTask (bsmSlsq, bestepid) { |
200 | return request({ | 240 | return request({ |
201 | url: SERVER.SERVERAPI + '/rest/business/workFlow/judgeUserTaskPermission', | 241 | url: SERVER.SERVERAPI + '/rest/business/workFlow/claimTask?bsmSlsq=' + bsmSlsq + '&bestepid=' + bestepid, |
202 | method: 'get', | 242 | method: 'get', |
203 | params | 243 | }) |
204 | }) | ||
205 | } | 244 | } |
206 | 245 | ||
207 | /** | 246 | /** |
208 | * @description: 获取申请书数据 | 247 | * @description: 取消认领任务 |
209 | * @param {*} data | 248 | * @param {*} bsmSlsq |
249 | * @param {*} bestepid | ||
210 | * @author: renchao | 250 | * @author: renchao |
211 | */ | 251 | */ |
212 | export function getPrintApplicationInfo (data) { | 252 | export function unClaimTask (bsmSlsq, bestepid) { |
213 | return request({ | 253 | return request({ |
214 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getPrintApplicationInfo', | 254 | url: SERVER.SERVERAPI + '/rest/business/workFlow/unClaimTask?bsmSlsq=' + bsmSlsq + '&bestepid=' + bestepid, |
215 | method: 'post', | 255 | method: 'get', |
216 | data | 256 | }) |
217 | }) | ||
218 | } | 257 | } | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:25:58 | 4 | * @LastEditTime: 2023-05-17 10:25:58 |
5 | */ | 5 | */ |
... | @@ -31,6 +31,11 @@ export function BatchInit (data) { | ... | @@ -31,6 +31,11 @@ export function BatchInit (data) { |
31 | }) | 31 | }) |
32 | } | 32 | } |
33 | 33 | ||
34 | /** | ||
35 | * @description: 初始化 | ||
36 | * @param {*} data | ||
37 | * @author: renchao | ||
38 | */ | ||
34 | export function Init (data) { | 39 | export function Init (data) { |
35 | let apiUrl = ""; | 40 | let apiUrl = ""; |
36 | switch (data.get("djlx")) { | 41 | switch (data.get("djlx")) { | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:30:47 | 4 | * @LastEditTime: 2023-05-17 10:30:47 |
5 | */ | 5 | */ |
... | @@ -56,20 +56,3 @@ export function saveData (data, djlx) { | ... | @@ -56,20 +56,3 @@ export function saveData (data, djlx) { |
56 | data | 56 | data |
57 | }) | 57 | }) |
58 | } | 58 | } |
59 | |||
60 | /** | ||
61 | * @description: 流程图 | ||
62 | * @param {*} bsmSlsq | ||
63 | * @param {*} bestepid | ||
64 | * @author: renchao | ||
65 | */ | ||
66 | export function getWorkFlowImage (bsmSlsq, bestepid) { | ||
67 | return request({ | ||
68 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage', | ||
69 | method: 'get', | ||
70 | params: { | ||
71 | bsmSlsq: bsmSlsq, | ||
72 | bestepid: bestepid | ||
73 | } | ||
74 | }) | ||
75 | } | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:31:23 | 4 | * @LastEditTime: 2023-05-17 10:31:23 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | 8 | ||
9 | // 初始化内容 | 9 | /** |
10 | * @description: 初始化 | ||
11 | * @param {*} data | ||
12 | * @author: renchao | ||
13 | */ | ||
10 | export function Init (data) { | 14 | export function Init (data) { |
11 | let apiUrl = ""; | 15 | let apiUrl = ""; |
12 | switch (data.get("djlx")) { | 16 | switch (data.get("djlx")) { |
... | @@ -50,20 +54,3 @@ export function saveData (data) { | ... | @@ -50,20 +54,3 @@ export function saveData (data) { |
50 | data | 54 | data |
51 | }) | 55 | }) |
52 | } | 56 | } |
53 | |||
54 | /** | ||
55 | * @description: 流程图 | ||
56 | * @param {*} bsmSlsq | ||
57 | * @param {*} bestepid | ||
58 | * @author: renchao | ||
59 | */ | ||
60 | export function getWorkFlowImage (bsmSlsq, bestepid) { | ||
61 | return request({ | ||
62 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage', | ||
63 | method: 'get', | ||
64 | params: { | ||
65 | bsmSlsq: bsmSlsq, | ||
66 | bestepid: bestepid | ||
67 | } | ||
68 | }) | ||
69 | } | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:32:29 | 4 | * @LastEditTime: 2023-05-17 10:32:29 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | 8 | ||
9 | // 初始化内容 | 9 | /** |
10 | * @description: 初始化 | ||
11 | * @param {*} data | ||
12 | * @author: renchao | ||
13 | */ | ||
10 | export function Init (data) { | 14 | export function Init (data) { |
11 | let apiUrl = ""; | 15 | let apiUrl = ""; |
12 | switch (data.get("djlx")) { | 16 | switch (data.get("djlx")) { |
... | @@ -39,7 +43,11 @@ export function Init (data) { | ... | @@ -39,7 +43,11 @@ export function Init (data) { |
39 | }) | 43 | }) |
40 | } | 44 | } |
41 | 45 | ||
42 | // 初始化内容 | 46 | /** |
47 | * @description: 保存数据 | ||
48 | * @param {*} data | ||
49 | * @author: renchao | ||
50 | */ | ||
43 | export function saveData (data) { | 51 | export function saveData (data) { |
44 | return request({ | 52 | return request({ |
45 | url: SERVER.SERVERAPI + '/rest/ywbl/nydsyqlr/saveData', | 53 | url: SERVER.SERVERAPI + '/rest/ywbl/nydsyqlr/saveData', | ... | ... |
src/api/workflow/search.js
0 → 100644
1 | /* | ||
2 | * @Description: 待办已办箱 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:13:24 | ||
5 | */ | ||
6 | |||
7 | import request from '@/utils/request' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
9 | |||
10 | |||
11 | /** | ||
12 | * @description: 待办箱列表查询接口 | ||
13 | * @param {*} data | ||
14 | * @author: renchao | ||
15 | */ | ||
16 | export function searchTaskToDo (data) { | ||
17 | return request({ | ||
18 | url: SERVER.SERVERAPI + '/rest/workBox/search/searchTaskToDo', | ||
19 | method: 'post', | ||
20 | data | ||
21 | }) | ||
22 | } | ||
23 | |||
24 | /** | ||
25 | * @description: 已办箱列表查询接口 | ||
26 | * @param {*} data | ||
27 | * @author: renchao | ||
28 | */ | ||
29 | export function searchTaskDone (data) { | ||
30 | return request({ | ||
31 | url: SERVER.SERVERAPI + '/rest/workBox/search/searchTaskDone', | ||
32 | method: 'post', | ||
33 | data | ||
34 | }) | ||
35 | } |
... | @@ -6,7 +6,11 @@ | ... | @@ -6,7 +6,11 @@ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | 8 | ||
9 | // 初始化内容 | 9 | /** |
10 | * @description: 初始化 | ||
11 | * @param {*} data | ||
12 | * @author: renchao | ||
13 | */ | ||
10 | export function Init (data) { | 14 | export function Init (data) { |
11 | let apiUrl = ""; | 15 | let apiUrl = ""; |
12 | switch (data.get("djlx")) { | 16 | switch (data.get("djlx")) { |
... | @@ -50,20 +54,3 @@ export function saveData (data) { | ... | @@ -50,20 +54,3 @@ export function saveData (data) { |
50 | data | 54 | data |
51 | }) | 55 | }) |
52 | } | 56 | } |
53 | |||
54 | /** | ||
55 | * @description: 流程图 | ||
56 | * @param {*} bsmSlsq | ||
57 | * @param {*} bestepid | ||
58 | * @author: renchao | ||
59 | */ | ||
60 | export function getWorkFlowImage (bsmSlsq, bestepid) { | ||
61 | return request({ | ||
62 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage', | ||
63 | method: 'get', | ||
64 | params: { | ||
65 | bsmSlsq: bsmSlsq, | ||
66 | bestepid: bestepid | ||
67 | } | ||
68 | }) | ||
69 | } | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:32:37 | 4 | * @LastEditTime: 2023-05-17 10:32:37 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | // 初始化内容 | 8 | /** |
9 | * @description: 初始化 | ||
10 | * @param {*} data | ||
11 | * @author: renchao | ||
12 | */ | ||
9 | export function Init (data) { | 13 | export function Init (data) { |
10 | let apiUrl = ""; | 14 | let apiUrl = ""; |
11 | switch (data.get("djlx")) { | 15 | switch (data.get("djlx")) { |
... | @@ -37,7 +41,11 @@ export function Init (data) { | ... | @@ -37,7 +41,11 @@ export function Init (data) { |
37 | data | 41 | data |
38 | }) | 42 | }) |
39 | } | 43 | } |
40 | // 初始化内容 | 44 | /** |
45 | * @description: 保存数据 | ||
46 | * @param {*} data | ||
47 | * @author: renchao | ||
48 | */ | ||
41 | export function saveData (data) { | 49 | export function saveData (data) { |
42 | return request({ | 50 | return request({ |
43 | url: SERVER.SERVERAPI + '/rest/ywbl/ygmmdj/saveData', | 51 | url: SERVER.SERVERAPI + '/rest/ywbl/ygmmdj/saveData', | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:32:41 | 4 | * @LastEditTime: 2023-05-17 10:32:41 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | // 初始化内容 | 8 | /** |
9 | * @description: 初始化 | ||
10 | * @param {*} data | ||
11 | * @author: renchao | ||
12 | */ | ||
9 | export function Init (data) { | 13 | export function Init (data) { |
10 | let apiUrl = ""; | 14 | let apiUrl = ""; |
11 | switch (data.get("djlx")) { | 15 | switch (data.get("djlx")) { |
... | @@ -37,7 +41,11 @@ export function Init (data) { | ... | @@ -37,7 +41,11 @@ export function Init (data) { |
37 | data | 41 | data |
38 | }) | 42 | }) |
39 | } | 43 | } |
40 | // 初始化内容 | 44 | /** |
45 | * @description: 保存数据 | ||
46 | * @param {*} data | ||
47 | * @author: renchao | ||
48 | */ | ||
41 | export function saveData (data) { | 49 | export function saveData (data) { |
42 | return request({ | 50 | return request({ |
43 | url: SERVER.SERVERAPI + '/rest/ywbl/ygdydj/saveData', | 51 | url: SERVER.SERVERAPI + '/rest/ywbl/ygdydj/saveData', | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:32:45 | 4 | * @LastEditTime: 2023-05-17 10:32:45 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | 8 | ||
9 | // 初始化内容 | 9 | /** |
10 | * @description: 初始化 | ||
11 | * @param {*} data | ||
12 | * @author: renchao | ||
13 | */ | ||
10 | export function Init (data) { | 14 | export function Init (data) { |
11 | return request({ | 15 | return request({ |
12 | url: SERVER.SERVERAPI + "/rest/ywbl/zjgcdy/init", | 16 | url: SERVER.SERVERAPI + "/rest/ywbl/zjgcdy/init", |
... | @@ -14,7 +18,11 @@ export function Init (data) { | ... | @@ -14,7 +18,11 @@ export function Init (data) { |
14 | data | 18 | data |
15 | }) | 19 | }) |
16 | } | 20 | } |
17 | // 批量初始化内容 | 21 | /** |
22 | * @description: 批量初始化 | ||
23 | * @param {*} data | ||
24 | * @author: renchao | ||
25 | */ | ||
18 | export function bacthInit (data) { | 26 | export function bacthInit (data) { |
19 | let apiUrl = ""; | 27 | let apiUrl = ""; |
20 | switch (data.get("djlx")) { | 28 | switch (data.get("djlx")) { |
... | @@ -46,7 +54,11 @@ export function bacthInit (data) { | ... | @@ -46,7 +54,11 @@ export function bacthInit (data) { |
46 | data | 54 | data |
47 | }) | 55 | }) |
48 | } | 56 | } |
49 | // 受理信息保存 | 57 | /** |
58 | * @description: 保存数据 | ||
59 | * @param {*} data | ||
60 | * @author: renchao | ||
61 | */ | ||
50 | export function saveData (data, djlx) { | 62 | export function saveData (data, djlx) { |
51 | let apiUrl = "/rest/ywbl/zjgcdy/saveData"; | 63 | let apiUrl = "/rest/ywbl/zjgcdy/saveData"; |
52 | if (djlx == "400") { | 64 | if (djlx == "400") { |
... | @@ -59,7 +71,11 @@ export function saveData (data, djlx) { | ... | @@ -59,7 +71,11 @@ export function saveData (data, djlx) { |
59 | }) | 71 | }) |
60 | } | 72 | } |
61 | 73 | ||
62 | // 受理信息保存 | 74 | /** |
75 | * @description: 批量保存 | ||
76 | * @param {*} data | ||
77 | * @author: renchao | ||
78 | */ | ||
63 | export function saveBatchData (data, djlx) { | 79 | export function saveBatchData (data, djlx) { |
64 | return request({ | 80 | return request({ |
65 | url: SERVER.SERVERAPI + "/rest/ywbl/zjgcdy/saveBatchData", | 81 | url: SERVER.SERVERAPI + "/rest/ywbl/zjgcdy/saveBatchData", |
... | @@ -68,18 +84,11 @@ export function saveBatchData (data, djlx) { | ... | @@ -68,18 +84,11 @@ export function saveBatchData (data, djlx) { |
68 | }) | 84 | }) |
69 | } | 85 | } |
70 | 86 | ||
71 | // 流程图 | 87 | /** |
72 | export function getWorkFlowImage (bsmSlsq, bestepid) { | 88 | * @description: 上传当个文件 |
73 | return request({ | 89 | * @param {*} data |
74 | url: SERVER.SERVERAPI + '/rest/business/workFlow/getWorkFlowImage', | 90 | * @author: renchao |
75 | method: 'get', | 91 | */ |
76 | params: { | ||
77 | bsmSlsq: bsmSlsq, | ||
78 | bestepid: bestepid | ||
79 | } | ||
80 | }) | ||
81 | } | ||
82 | // 上传单个文件 | ||
83 | export function sjClmxUpload (data) { | 92 | export function sjClmxUpload (data) { |
84 | return request({ | 93 | return request({ |
85 | url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/upload', | 94 | url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/upload', |
... | @@ -87,7 +96,12 @@ export function sjClmxUpload (data) { | ... | @@ -87,7 +96,12 @@ export function sjClmxUpload (data) { |
87 | data | 96 | data |
88 | }) | 97 | }) |
89 | } | 98 | } |
90 | // 删除上传文件 | 99 | |
100 | /** | ||
101 | * @description: 删除多个文件 | ||
102 | * @param {*} data | ||
103 | * @author: renchao | ||
104 | */ | ||
91 | export function sjClmxDelete (bsmClmx) { | 105 | export function sjClmxDelete (bsmClmx) { |
92 | return request({ | 106 | return request({ |
93 | url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/delete?bsmClmx=' + bsmClmx, | 107 | url: SERVER.SERVERAPI + '/rest/zhcx/sjClmx/delete?bsmClmx=' + bsmClmx, | ... | ... |
This diff is collapsed.
Click to expand it.
src/api/zhcx.js
deleted
100644 → 0
1 | /* | ||
2 | * @Description: 综合查询-登记簿查询 | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-05-17 10:23:50 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | |||
9 | |||
10 | /** | ||
11 | * @description: 根据条件进行列表查询 | ||
12 | * @param {*} data | ||
13 | * @author: renchao | ||
14 | */ | ||
15 | export function getDjbBysearch (data) { | ||
16 | return request({ | ||
17 | url: SERVER.SERVERAPI + '/rest/zhcx/search/qlxx/getDjbBysearch', | ||
18 | method: 'post', | ||
19 | data: data | ||
20 | }) | ||
21 | } | ||
22 | |||
23 | /** | ||
24 | * @description: 获取登记封面 | ||
25 | * @param {*} qlbsm | ||
26 | * @author: renchao | ||
27 | */ | ||
28 | export function getDjbfm (qlbsm) { | ||
29 | return request({ | ||
30 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/djbfm/' + qlbsm, | ||
31 | method: 'get' | ||
32 | }) | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * @description: 获取登记目录 | ||
37 | * @param {*} data | ||
38 | * @author: renchao | ||
39 | */ | ||
40 | export function getBdcqldjmlByBdcdyid (data) { | ||
41 | return request({ | ||
42 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getBdcqldjmlByBdcdyid', | ||
43 | method: 'get', | ||
44 | params: data | ||
45 | }) | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * @description: 获取宗地信息 | ||
50 | * @param {*} qlbsm | ||
51 | * @author: renchao | ||
52 | */ | ||
53 | export function getZdjbxx (qlbsm) { | ||
54 | return request({ | ||
55 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/zdjbxx/' + qlbsm, | ||
56 | method: 'get' | ||
57 | }) | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * @description: 获取宗地信息 | ||
62 | * @param {*} data | ||
63 | * @author: renchao | ||
64 | */ | ||
65 | export function getZdjjxxBybdcdyid (data) { | ||
66 | return request({ | ||
67 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getZdjjxxBybdcdyid', | ||
68 | method: 'get', | ||
69 | params: data | ||
70 | }) | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * @description: 获取宗地信息 | ||
75 | * @param {*} data | ||
76 | * @author: renchao | ||
77 | */ | ||
78 | export function getZdjjxxBySLdy (data) { | ||
79 | return request({ | ||
80 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getZdjjxxBybdcdyid', | ||
81 | method: 'get', | ||
82 | params: data | ||
83 | }) | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * @description: 获取不动产权利及其他事项 | ||
88 | * @param {*} data | ||
89 | * @author: renchao | ||
90 | */ | ||
91 | export function getBdcqljqtsx (data) { | ||
92 | return request({ | ||
93 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getBdcqljqtsx', | ||
94 | method: 'get', | ||
95 | params: data | ||
96 | }) | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * @description: 获取不动产权利及其他事项页面信息 | ||
101 | * @param {*} qlbsm | ||
102 | * @author: renchao | ||
103 | */ | ||
104 | export function getQlname (qlbsm) { | ||
105 | return request({ | ||
106 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/qlname/' + qlbsm, | ||
107 | method: 'get' | ||
108 | }) | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * @description: 获取权利详细信息 | ||
113 | * @param {*} qlbsm | ||
114 | * @author: renchao | ||
115 | */ | ||
116 | export function getDetail (qlbsm) { | ||
117 | return request({ | ||
118 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/detail/' + qlbsm, | ||
119 | method: 'get' | ||
120 | }) | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * @description: 获取建设用地使用权 | ||
125 | * @param {*} data | ||
126 | * @author: renchao | ||
127 | */ | ||
128 | export function getJsydsyqList (data) { | ||
129 | return request({ | ||
130 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getJsydsyqList', | ||
131 | method: 'post', | ||
132 | data | ||
133 | }) | ||
134 | } | ||
135 | /** | ||
136 | * @description: 获取抵押权 | ||
137 | * @param {*} data | ||
138 | * @author: renchao | ||
139 | */ | ||
140 | export function getDiyaqList (data) { | ||
141 | return request({ | ||
142 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getDiyaqList', | ||
143 | method: 'post', | ||
144 | data | ||
145 | }) | ||
146 | } | ||
147 | /** | ||
148 | * @description: 获取地役权 | ||
149 | * @param {*} data | ||
150 | * @author: renchao | ||
151 | */ | ||
152 | export function getDiyiqList (data) { | ||
153 | return request({ | ||
154 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getDiyiqList', | ||
155 | method: 'post', | ||
156 | data | ||
157 | }) | ||
158 | } | ||
159 | /** | ||
160 | * @description: 获取预告登记 | ||
161 | * @param {*} data | ||
162 | * @author: renchao | ||
163 | */ | ||
164 | export function getYgdjList (data) { | ||
165 | return request({ | ||
166 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getYgdjList', | ||
167 | method: 'post', | ||
168 | data | ||
169 | }) | ||
170 | } | ||
171 | /** | ||
172 | * @description: 获取异议登记 | ||
173 | * @param {*} data | ||
174 | * @author: renchao | ||
175 | */ | ||
176 | export function getYydjList (data) { | ||
177 | return request({ | ||
178 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getYydjList', | ||
179 | method: 'post', | ||
180 | data | ||
181 | }) | ||
182 | } | ||
183 | /** | ||
184 | * @description: 获取查封登记 | ||
185 | * @param {*} data | ||
186 | * @author: renchao | ||
187 | */ | ||
188 | export function getCfdjList (data) { | ||
189 | return request({ | ||
190 | url: SERVER.SERVERAPI + '/rest/zhcx/djbcx/getCfdjList', | ||
191 | method: 'post', | ||
192 | data | ||
193 | }) | ||
194 | } | ||
195 | /** | ||
196 | * @description: 进度查询列表 | ||
197 | * @param {*} data | ||
198 | * @author: renchao | ||
199 | */ | ||
200 | export function getJdcxBysearch (data) { | ||
201 | return request({ | ||
202 | url: SERVER.SERVERAPI + '/rest/zhcx/search/getJdcxBysearch', | ||
203 | method: 'post', | ||
204 | data | ||
205 | }) | ||
206 | } | ||
207 | |||
208 | /** | ||
209 | * @description: 证书领取查询 | ||
210 | * @param {*} data | ||
211 | * @author: renchao | ||
212 | */ | ||
213 | export function getBdcqzReceiveList (data) { | ||
214 | return request({ | ||
215 | url: SERVER.SERVERAPI + '/rest/zhcx/search/getBdcqzReceiveList', | ||
216 | method: 'post', | ||
217 | data | ||
218 | }) | ||
219 | } | ||
220 | |||
221 | /** | ||
222 | * @description: 在建工程抵押查询 | ||
223 | * @param {*} data | ||
224 | * @author: renchao | ||
225 | */ | ||
226 | export function getZjgcdyList (data) { | ||
227 | return request({ | ||
228 | url: SERVER.SERVERAPI + '/rest/zhcx/search/getZjgcdyList', | ||
229 | method: 'post', | ||
230 | data | ||
231 | }) | ||
232 | } | ||
233 | |||
234 | // 数据上报推送查询 | ||
235 | export function getSjsbPushList (data) { | ||
236 | return request({ | ||
237 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/list', | ||
238 | method: 'post', | ||
239 | data | ||
240 | }) | ||
241 | } | ||
242 | |||
243 | // 数据上报推送 | ||
244 | export function pushSjsbRecord (data) { | ||
245 | return request({ | ||
246 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/push', | ||
247 | method: 'post', | ||
248 | data | ||
249 | }) | ||
250 | } | ||
251 | |||
252 | // 数据上报推送 | ||
253 | export function detail (bsm) { | ||
254 | return request({ | ||
255 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/detail?bsm=' + bsm, | ||
256 | method: 'get' | ||
257 | }) | ||
258 | } | ||
259 | |||
260 | |||
261 |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: 证书管理 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-17 10:24:24 | 4 | * @LastEditTime: 2023-05-17 10:24:24 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
8 | /** | 8 | |
9 | * @description: 证书管理-获取序列号 | ||
10 | * @param {*} params | ||
11 | * @author: renchao | ||
12 | */ | ||
13 | export function getSysSerialSingle (params) { | ||
14 | return request({ | ||
15 | url: SERVER.SERVERAPI + '/rest/system/sysSerial/getSysSerialSingle', | ||
16 | method: 'get', | ||
17 | params: params | ||
18 | }) | ||
19 | } | ||
20 | /** | 9 | /** |
21 | * @description: 证书管理-证书入库列表 | 10 | * @description: 证书管理-证书入库列表 |
22 | * @param {*} data | 11 | * @param {*} data |
... | @@ -162,4 +151,4 @@ export function getZsglInfo (params) { | ... | @@ -162,4 +151,4 @@ export function getZsglInfo (params) { |
162 | method: 'get', | 151 | method: 'get', |
163 | params | 152 | params |
164 | }) | 153 | }) |
165 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
154 | } | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-20 10:22:20 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <label class="el-checkbox" :class="[ | 7 | <label class="el-checkbox" :class="[ |
3 | border && checkboxSize ? 'el-checkbox--' + checkboxSize : '', | 8 | border && checkboxSize ? 'el-checkbox--' + checkboxSize : '', |
... | @@ -26,169 +31,217 @@ | ... | @@ -26,169 +31,217 @@ |
26 | </label> | 31 | </label> |
27 | </template> | 32 | </template> |
28 | <script> | 33 | <script> |
29 | import Emitter from 'element-ui/src/mixins/emitter'; | 34 | import Emitter from 'element-ui/src/mixins/emitter'; |
30 | 35 | ||
31 | export default { | 36 | export default { |
32 | name: 'ElCheckbox', | 37 | name: 'ElCheckbox', |
33 | 38 | ||
34 | mixins: [Emitter], | 39 | mixins: [Emitter], |
35 | 40 | ||
36 | inject: { | 41 | inject: { |
37 | elForm: { | 42 | elForm: { |
38 | default: '' | 43 | default: '' |
44 | }, | ||
45 | elFormItem: { | ||
46 | default: '' | ||
47 | } | ||
39 | }, | 48 | }, |
40 | elFormItem: { | ||
41 | default: '' | ||
42 | } | ||
43 | }, | ||
44 | 49 | ||
45 | componentName: 'ElCheckbox', | 50 | componentName: 'ElCheckbox', |
46 | 51 | ||
47 | data () { | 52 | data () { |
48 | return { | 53 | return { |
49 | selfModel: false, | 54 | selfModel: false, |
50 | focus: false, | 55 | focus: false, |
51 | isLimitExceeded: false | 56 | isLimitExceeded: false |
52 | }; | 57 | }; |
53 | }, | 58 | }, |
54 | 59 | ||
55 | computed: { | 60 | computed: { |
56 | model: { | 61 | model: { |
57 | get () { | 62 | /** |
58 | return this.isGroup | 63 | * @description: get |
59 | ? this.store : this.value !== undefined | 64 | * @author: renchao |
60 | ? this.value : this.selfModel; | 65 | */ |
66 | get () { | ||
67 | return this.isGroup | ||
68 | ? this.store : this.value !== undefined | ||
69 | ? this.value : this.selfModel; | ||
70 | }, | ||
71 | /** | ||
72 | * @description: set | ||
73 | * @param {*} val | ||
74 | * @author: renchao | ||
75 | */ | ||
76 | set (val) { | ||
77 | if (this.isGroup) { | ||
78 | this.isLimitExceeded = false; | ||
79 | (this._checkboxGroup.min !== undefined && | ||
80 | val.length < this._checkboxGroup.min && | ||
81 | (this.isLimitExceeded = true)); | ||
82 | |||
83 | (this._checkboxGroup.max !== undefined && | ||
84 | val.length > this._checkboxGroup.max && | ||
85 | (this.isLimitExceeded = true)); | ||
86 | |||
87 | this.isLimitExceeded === false && | ||
88 | this.dispatch('ElCheckboxGroup', 'input', [val]); | ||
89 | } else { | ||
90 | this.$emit('input', val); | ||
91 | this.selfModel = val; | ||
92 | } | ||
93 | } | ||
61 | }, | 94 | }, |
62 | 95 | ||
63 | set (val) { | 96 | /** |
64 | if (this.isGroup) { | 97 | * @description: isChecked |
65 | this.isLimitExceeded = false; | 98 | * @author: renchao |
66 | (this._checkboxGroup.min !== undefined && | 99 | */ |
67 | val.length < this._checkboxGroup.min && | 100 | isChecked () { |
68 | (this.isLimitExceeded = true)); | 101 | if ({}.toString.call(this.model) === '[object Boolean]') { |
69 | 102 | return this.model; | |
70 | (this._checkboxGroup.max !== undefined && | 103 | } else if (Array.isArray(this.model)) { |
71 | val.length > this._checkboxGroup.max && | 104 | return this.model.indexOf(this.label) > -1; |
72 | (this.isLimitExceeded = true)); | 105 | } else if (this.model !== null && this.model !== undefined) { |
73 | 106 | return this.model === this.trueLabel; | |
74 | this.isLimitExceeded === false && | 107 | } |
75 | this.dispatch('ElCheckboxGroup', 'input', [val]); | 108 | }, |
76 | } else { | 109 | /** |
77 | this.$emit('input', val); | 110 | * @description: isGroup |
78 | this.selfModel = val; | 111 | * @author: renchao |
112 | */ | ||
113 | isGroup () { | ||
114 | let parent = this.$parent; | ||
115 | while (parent) { | ||
116 | if (parent.$options.componentName !== 'ElCheckboxGroup') { | ||
117 | parent = parent.$parent; | ||
118 | } else { | ||
119 | this._checkboxGroup = parent; | ||
120 | return true; | ||
121 | } | ||
79 | } | 122 | } |
123 | return false; | ||
124 | }, | ||
125 | /** | ||
126 | * @description: store | ||
127 | * @author: renchao | ||
128 | */ | ||
129 | store () { | ||
130 | return this._checkboxGroup ? this._checkboxGroup.value : this.value; | ||
131 | }, | ||
132 | |||
133 | /** | ||
134 | * @description: isLimitDisabled | ||
135 | * @author: renchao | ||
136 | */ | ||
137 | isLimitDisabled () { | ||
138 | const { max, min } = this._checkboxGroup; | ||
139 | return !!(max || min) && | ||
140 | (this.model.length >= max && !this.isChecked) || | ||
141 | (this.model.length <= min && this.isChecked); | ||
142 | }, | ||
143 | /** | ||
144 | * @description: isDisabled | ||
145 | * @author: renchao | ||
146 | */ | ||
147 | isDisabled () { | ||
148 | return this.isGroup | ||
149 | ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled | ||
150 | : this.disabled || (this.elForm || {}).disabled; | ||
151 | }, | ||
152 | /** | ||
153 | * @description: _elFormItemSize | ||
154 | * @author: renchao | ||
155 | */ | ||
156 | _elFormItemSize () { | ||
157 | return (this.elFormItem || {}).elFormItemSize; | ||
158 | }, | ||
159 | /** | ||
160 | * @description: checkboxSize | ||
161 | * @author: renchao | ||
162 | */ | ||
163 | checkboxSize () { | ||
164 | const temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size; | ||
165 | return this.isGroup | ||
166 | ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize | ||
167 | : temCheckboxSize; | ||
80 | } | 168 | } |
81 | }, | 169 | }, |
82 | 170 | ||
83 | isChecked () { | 171 | props: { |
84 | if ({}.toString.call(this.model) === '[object Boolean]') { | 172 | value: {}, |
85 | return this.model; | 173 | label: {}, |
86 | } else if (Array.isArray(this.model)) { | 174 | indeterminate: Boolean, |
87 | return this.model.indexOf(this.label) > -1; | 175 | disabled: Boolean, |
88 | } else if (this.model !== null && this.model !== undefined) { | 176 | checked: Boolean, |
89 | return this.model === this.trueLabel; | 177 | name: String, |
90 | } | 178 | trueLabel: [String, Number], |
179 | falseLabel: [String, Number], | ||
180 | id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/ | ||
181 | controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/ | ||
182 | border: Boolean, | ||
183 | size: String | ||
91 | }, | 184 | }, |
92 | 185 | ||
93 | isGroup () { | 186 | methods: { |
94 | let parent = this.$parent; | 187 | /** |
95 | while (parent) { | 188 | * @description: addToStore |
96 | if (parent.$options.componentName !== 'ElCheckboxGroup') { | 189 | * @author: renchao |
97 | parent = parent.$parent; | 190 | */ |
191 | addToStore () { | ||
192 | if ( | ||
193 | Array.isArray(this.model) && | ||
194 | this.model.indexOf(this.label) === -1 | ||
195 | ) { | ||
196 | this.model.push(this.label); | ||
98 | } else { | 197 | } else { |
99 | this._checkboxGroup = parent; | 198 | this.model = this.trueLabel || true; |
100 | return true; | ||
101 | } | 199 | } |
200 | }, | ||
201 | /** | ||
202 | * @description: handleChange | ||
203 | * @author: renchao | ||
204 | */ | ||
205 | handleChange (ev) { | ||
206 | if (this.isLimitExceeded) return; | ||
207 | let value; | ||
208 | if (ev.target.checked) { | ||
209 | value = this.trueLabel === undefined ? true : this.trueLabel; | ||
210 | } else { | ||
211 | value = this.falseLabel === undefined ? false : this.falseLabel; | ||
212 | } | ||
213 | this.$emit('change', value, ev); | ||
214 | this.$nextTick(() => { | ||
215 | if (this.isGroup) { | ||
216 | this.dispatch('ElCheckboxGroup', 'change', [this._checkboxGroup.value]); | ||
217 | } | ||
218 | }); | ||
102 | } | 219 | } |
103 | return false; | ||
104 | }, | ||
105 | |||
106 | store () { | ||
107 | return this._checkboxGroup ? this._checkboxGroup.value : this.value; | ||
108 | }, | 220 | }, |
109 | 221 | /** | |
110 | /* used to make the isDisabled judgment under max/min props */ | 222 | * @description: created |
111 | isLimitDisabled () { | 223 | * @author: renchao |
112 | const { max, min } = this._checkboxGroup; | 224 | */ |
113 | return !!(max || min) && | 225 | created () { |
114 | (this.model.length >= max && !this.isChecked) || | 226 | this.checked && this.addToStore(); |
115 | (this.model.length <= min && this.isChecked); | ||
116 | }, | ||
117 | |||
118 | isDisabled () { | ||
119 | return this.isGroup | ||
120 | ? this._checkboxGroup.disabled || this.disabled || (this.elForm || {}).disabled || this.isLimitDisabled | ||
121 | : this.disabled || (this.elForm || {}).disabled; | ||
122 | }, | ||
123 | |||
124 | _elFormItemSize () { | ||
125 | return (this.elFormItem || {}).elFormItemSize; | ||
126 | }, | 227 | }, |
127 | 228 | /** | |
128 | checkboxSize () { | 229 | * @description: mounted |
129 | const temCheckboxSize = this.size || this._elFormItemSize || (this.$ELEMENT || {}).size; | 230 | * @author: renchao |
130 | return this.isGroup | 231 | */ |
131 | ? this._checkboxGroup.checkboxGroupSize || temCheckboxSize | 232 | mounted () { // 为indeterminate元素 添加aria-controls 属性 |
132 | : temCheckboxSize; | 233 | if (this.indeterminate) { |
133 | } | 234 | this.$el.setAttribute('aria-controls', this.controls); |
134 | }, | ||
135 | |||
136 | props: { | ||
137 | value: {}, | ||
138 | label: {}, | ||
139 | indeterminate: Boolean, | ||
140 | disabled: Boolean, | ||
141 | checked: Boolean, | ||
142 | name: String, | ||
143 | trueLabel: [String, Number], | ||
144 | falseLabel: [String, Number], | ||
145 | id: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/ | ||
146 | controls: String, /* 当indeterminate为真时,为controls提供相关连的checkbox的id,表明元素间的控制关系*/ | ||
147 | border: Boolean, | ||
148 | size: String | ||
149 | }, | ||
150 | |||
151 | methods: { | ||
152 | addToStore () { | ||
153 | if ( | ||
154 | Array.isArray(this.model) && | ||
155 | this.model.indexOf(this.label) === -1 | ||
156 | ) { | ||
157 | this.model.push(this.label); | ||
158 | } else { | ||
159 | this.model = this.trueLabel || true; | ||
160 | } | 235 | } |
161 | }, | 236 | }, |
162 | handleChange (ev) { | 237 | /** |
163 | if (this.isLimitExceeded) return; | 238 | * @description: watch |
164 | let value; | 239 | * @author: renchao |
165 | if (ev.target.checked) { | 240 | */ |
166 | value = this.trueLabel === undefined ? true : this.trueLabel; | 241 | watch: { |
167 | } else { | 242 | value (value) { |
168 | value = this.falseLabel === undefined ? false : this.falseLabel; | 243 | this.dispatch('ElFormItem', 'el.form.change', value); |
169 | } | 244 | } |
170 | this.$emit('change', value, ev); | ||
171 | this.$nextTick(() => { | ||
172 | if (this.isGroup) { | ||
173 | this.dispatch('ElCheckboxGroup', 'change', [this._checkboxGroup.value]); | ||
174 | } | ||
175 | }); | ||
176 | } | ||
177 | }, | ||
178 | |||
179 | created () { | ||
180 | this.checked && this.addToStore(); | ||
181 | }, | ||
182 | mounted () { // 为indeterminate元素 添加aria-controls 属性 | ||
183 | if (this.indeterminate) { | ||
184 | this.$el.setAttribute('aria-controls', this.controls); | ||
185 | } | ||
186 | }, | ||
187 | |||
188 | watch: { | ||
189 | value (value) { | ||
190 | this.dispatch('ElFormItem', 'el.form.change', value); | ||
191 | } | 245 | } |
192 | } | 246 | }; |
193 | }; | ||
194 | </script> | 247 | </script> | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-07-20 13:33:07 | ||
5 | --> | ||
1 | <template> | 6 | <template> |
2 | <el-dialog :visible.sync="dialogVisible" v-if="dialogVisible" :width="width" :fullscreen="fullscreen" top="0" | 7 | <el-dialog :visible.sync="dialogVisible" v-if="dialogVisible" :width="width" :fullscreen="fullscreen" top="0" |
3 | :append-to-body="appendToBody" :lock-scroll="true" :close-on-click-modal="false" @close="closeDialog" :key="key" | 8 | :append-to-body="appendToBody" :lock-scroll="true" :close-on-click-modal="false" @close="closeDialog" :key="key" |
... | @@ -23,105 +28,117 @@ | ... | @@ -23,105 +28,117 @@ |
23 | </el-dialog> | 28 | </el-dialog> |
24 | </template> | 29 | </template> |
25 | <script> | 30 | <script> |
26 | export default { | 31 | export default { |
27 | props: { | 32 | props: { |
28 | value: { type: Boolean, default: false }, | 33 | value: { type: Boolean, default: false }, |
29 | isMain: { | 34 | isMain: { |
30 | type: Boolean, | 35 | type: Boolean, |
31 | default: false | 36 | default: false |
32 | }, | 37 | }, |
33 | appendToBody: { | 38 | appendToBody: { |
34 | type: Boolean, | 39 | type: Boolean, |
35 | default: true | 40 | default: true |
36 | }, | 41 | }, |
37 | isButton: { | 42 | isButton: { |
38 | type: Boolean, | 43 | type: Boolean, |
39 | default: true, | 44 | default: true, |
40 | }, | 45 | }, |
41 | width: { | 46 | width: { |
42 | type: String, | 47 | type: String, |
43 | default: '70%', | 48 | default: '70%', |
44 | }, | 49 | }, |
45 | title: { | 50 | title: { |
46 | type: String, | 51 | type: String, |
47 | default: '', | 52 | default: '', |
48 | }, | 53 | }, |
49 | isFullscreen: { | 54 | isFullscreen: { |
50 | type: Boolean, | 55 | type: Boolean, |
51 | default: true, | 56 | default: true, |
52 | }, | 57 | }, |
53 | isSave: { | 58 | isSave: { |
54 | type: Boolean, | 59 | type: Boolean, |
55 | default: true, | 60 | default: true, |
56 | }, | 61 | }, |
57 | saveButton: { | 62 | saveButton: { |
58 | type: String, | 63 | type: String, |
59 | default: '提交', | 64 | default: '提交', |
60 | }, | 65 | }, |
61 | isReset: { | 66 | isReset: { |
62 | type: Boolean, | 67 | type: Boolean, |
63 | default: true, | 68 | default: true, |
64 | }, | 69 | }, |
65 | saveloding: { | 70 | saveloding: { |
66 | type: Boolean, | 71 | type: Boolean, |
67 | default: false, | 72 | default: false, |
73 | }, | ||
74 | btnDisabled: { | ||
75 | type: Boolean, | ||
76 | default: false | ||
77 | }, | ||
78 | height: { | ||
79 | type: String, | ||
80 | default: '' | ||
81 | } | ||
68 | }, | 82 | }, |
69 | btnDisabled: { | 83 | data () { |
70 | type: Boolean, | 84 | return { |
71 | default: false | 85 | key: 0, |
86 | dialogVisible: false, | ||
87 | fullscreen: false, | ||
88 | scrollerHeight: '' | ||
89 | } | ||
72 | }, | 90 | }, |
73 | height: { | 91 | watch: { |
74 | type: String, | 92 | value (val) { |
75 | default: '' | 93 | this.$nextTick(() => { |
76 | } | 94 | this.dialogVisible = val |
77 | }, | 95 | }) |
78 | data () { | 96 | this.height && (this.scrollerHeight = this.height + 'px') |
79 | return { | ||
80 | key: 0, | ||
81 | dialogVisible: false, | ||
82 | fullscreen: false, | ||
83 | scrollerHeight: '' | ||
84 | } | ||
85 | }, | ||
86 | watch: { | ||
87 | value (val) { | ||
88 | this.$nextTick(() => { | ||
89 | this.dialogVisible = val | ||
90 | }) | ||
91 | this.height && (this.scrollerHeight = this.height + 'px') | ||
92 | } | ||
93 | }, | ||
94 | methods: { | ||
95 | handleFullscreen () { | ||
96 | this.fullscreen = !this.fullscreen | ||
97 | if (!this.fullscreen) { | ||
98 | this.scrollerHeight = '' | ||
99 | } else { | ||
100 | this.scrollerHeight = (window.innerHeight - 120) + 'px' | ||
101 | } | 97 | } |
102 | }, | 98 | }, |
103 | submitForm () { | 99 | methods: { |
104 | if (this.isButton) { | 100 | /** |
105 | this.$emit('submitForm'); | 101 | * @description: handleFullscreen |
102 | * @author: renchao | ||
103 | */ | ||
104 | handleFullscreen () { | ||
105 | this.fullscreen = !this.fullscreen | ||
106 | if (!this.fullscreen) { | ||
107 | this.scrollerHeight = '' | ||
108 | } else { | ||
109 | this.scrollerHeight = (window.innerHeight - 120) + 'px' | ||
110 | } | ||
111 | }, | ||
112 | /** | ||
113 | * @description: submitForm | ||
114 | * @author: renchao | ||
115 | */ | ||
116 | submitForm () { | ||
117 | if (this.isButton) { | ||
118 | this.$emit('submitForm'); | ||
119 | } | ||
120 | }, | ||
121 | /** | ||
122 | * @description: closeDialog | ||
123 | * @author: renchao | ||
124 | */ | ||
125 | closeDialog () { | ||
126 | this.key++ | ||
127 | this.$emit('input', false) | ||
128 | this.$emit('closeDialog') | ||
106 | } | 129 | } |
107 | }, | 130 | }, |
108 | closeDialog () { | 131 | } |
109 | this.key++ | ||
110 | this.$emit('input', false) | ||
111 | this.$emit('closeDialog') | ||
112 | } | ||
113 | }, | ||
114 | } | ||
115 | </script> | 132 | </script> |
116 | <style rel="stylesheet/scss" lang="scss" > | 133 | <style rel="stylesheet/scss" lang="scss" > |
117 | @import "~@/styles/mixin.scss"; | 134 | @import "~@/styles/mixin.scss"; |
118 | @import "~@/styles/dialogBox.scss"; | 135 | @import "~@/styles/dialogBox.scss"; |
119 | </style> | 136 | </style> |
120 | <style rel="stylesheet/scss" scoped lang="scss" > | 137 | <style rel="stylesheet/scss" scoped lang="scss" > |
121 | /deep/.is-fullscreen { | ||
122 | position: absolute; | ||
123 | top: 50% !important; | ||
124 | left: 50% !important; | ||
125 | transform: translate(-50%, -50%) !important; | ||
126 | } | ||
127 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
138 | /deep/.is-fullscreen { | ||
139 | position: absolute; | ||
140 | top: 50% !important; | ||
141 | left: 50% !important; | ||
142 | transform: translate(-50%, -50%) !important; | ||
143 | } | ||
144 | </style> | ... | ... |
... | @@ -106,6 +106,11 @@ | ... | @@ -106,6 +106,11 @@ |
106 | components: { | 106 | components: { |
107 | LbColumn, | 107 | LbColumn, |
108 | }, | 108 | }, |
109 | |||
110 | /** | ||
111 | * @description: data | ||
112 | * @author: renchao | ||
113 | */ | ||
109 | data () { | 114 | data () { |
110 | return { | 115 | return { |
111 | tableHeight: 'auto', | 116 | tableHeight: 'auto', |
... | @@ -114,6 +119,10 @@ | ... | @@ -114,6 +119,10 @@ |
114 | selected: '' | 119 | selected: '' |
115 | } | 120 | } |
116 | }, | 121 | }, |
122 | /** | ||
123 | * @description: created | ||
124 | * @author: renchao | ||
125 | */ | ||
117 | created () { | 126 | created () { |
118 | this.getMergeArr(this.data, this.merge) | 127 | this.getMergeArr(this.data, this.merge) |
119 | this.getHeight() | 128 | this.getHeight() |
... | @@ -124,17 +133,33 @@ | ... | @@ -124,17 +133,33 @@ |
124 | }, | 133 | }, |
125 | }, | 134 | }, |
126 | methods: { | 135 | methods: { |
127 | // 单选 | 136 | /** |
137 | * @description: 单选 | ||
138 | * @param {*} row | ||
139 | * @author: renchao | ||
140 | */ | ||
128 | singleElection (row) { | 141 | singleElection (row) { |
129 | this.selected = this.data.indexOf(row); | 142 | this.selected = this.data.indexOf(row); |
143 | <<<<<<< HEAD | ||
130 | this.$emit('row-click', row) | 144 | this.$emit('row-click', row) |
145 | ======= | ||
146 | // this.$emit('row-click', row) | ||
147 | >>>>>>> dev | ||
131 | }, | 148 | }, |
132 | 149 | ||
150 | /** | ||
151 | * @description: tableRowClassName | ||
152 | * @author: renchao | ||
153 | */ | ||
133 | tableRowClassName ({ row, rowIndex }) { | 154 | tableRowClassName ({ row, rowIndex }) { |
134 | if (rowIndex % 2 === 1) { | 155 | if (rowIndex % 2 === 1) { |
135 | return 'interlaced'; | 156 | return 'interlaced'; |
136 | } | 157 | } |
137 | }, | 158 | }, |
159 | /** | ||
160 | * @description: getHeight | ||
161 | * @author: renchao | ||
162 | */ | ||
138 | getHeight () { | 163 | getHeight () { |
139 | if (!this.heightNumSetting) { | 164 | if (!this.heightNumSetting) { |
140 | let _this = this | 165 | let _this = this |
... | @@ -170,6 +195,12 @@ | ... | @@ -170,6 +195,12 @@ |
170 | }) | 195 | }) |
171 | } | 196 | } |
172 | }, | 197 | }, |
198 | /** | ||
199 | * @description: calcHeightx | ||
200 | * @param {*} value | ||
201 | * @param {*} wappered | ||
202 | * @author: renchao | ||
203 | */ | ||
173 | calcHeightx (value, wappered = true) { | 204 | calcHeightx (value, wappered = true) { |
174 | //项目自定义的公共header部分的高度,可忽略 | 205 | //项目自定义的公共header部分的高度,可忽略 |
175 | let header = document.querySelector(".from-clues-header").offsetHeight; | 206 | let header = document.querySelector(".from-clues-header").offsetHeight; |
... | @@ -195,36 +226,89 @@ | ... | @@ -195,36 +226,89 @@ |
195 | } | 226 | } |
196 | return res; | 227 | return res; |
197 | }, | 228 | }, |
229 | /** | ||
230 | * @description: clearSelection | ||
231 | * @author: renchao | ||
232 | */ | ||
198 | clearSelection () { | 233 | clearSelection () { |
199 | this.$refs.elTable.clearSelection() | 234 | this.$refs.elTable.clearSelection() |
200 | }, | 235 | }, |
236 | /** | ||
237 | * @description: toggleRowSelection | ||
238 | * @author: renchao | ||
239 | */ | ||
201 | toggleRowSelection (row, selected) { | 240 | toggleRowSelection (row, selected) { |
202 | this.$refs.elTable.toggleRowSelection(row, selected) | 241 | this.$refs.elTable.toggleRowSelection(row, selected) |
203 | }, | 242 | }, |
243 | /** | ||
244 | * @description: toggleAllSelection | ||
245 | * @author: renchao | ||
246 | */ | ||
204 | toggleAllSelection () { | 247 | toggleAllSelection () { |
205 | this.$refs.elTable.toggleAllSelection() | 248 | this.$refs.elTable.toggleAllSelection() |
206 | }, | 249 | }, |
250 | /** | ||
251 | * @description: toggleRowExpansion | ||
252 | * @param {*} row | ||
253 | * @param {*} bsm | ||
254 | * @author: renchao | ||
255 | */ | ||
207 | toggleRowExpansion (row, expanded) { | 256 | toggleRowExpansion (row, expanded) { |
208 | this.$refs.elTable.toggleRowExpansion(row, expanded) | 257 | this.$refs.elTable.toggleRowExpansion(row, expanded) |
209 | }, | 258 | }, |
259 | /** | ||
260 | * @description: setCurrentRow | ||
261 | * @param {*} row | ||
262 | * @author: renchao | ||
263 | */ | ||
210 | setCurrentRow (row) { | 264 | setCurrentRow (row) { |
211 | this.$refs.elTable.setCurrentRow(row) | 265 | this.$refs.elTable.setCurrentRow(row) |
212 | }, | 266 | }, |
267 | /** | ||
268 | * @description: setCurrentRow | ||
269 | * @author: renchao | ||
270 | */ | ||
213 | clearSort () { | 271 | clearSort () { |
214 | this.$refs.elTable.clearSort() | 272 | this.$refs.elTable.clearSort() |
215 | }, | 273 | }, |
274 | /** | ||
275 | * @description: clearFilter | ||
276 | * @param {*} columnKey | ||
277 | * @author: renchao | ||
278 | */ | ||
216 | clearFilter (columnKey) { | 279 | clearFilter (columnKey) { |
217 | this.$refs.elTable.clearFilter(columnKey) | 280 | this.$refs.elTable.clearFilter(columnKey) |
218 | }, | 281 | }, |
282 | /** | ||
283 | * @description: doLayout | ||
284 | * @author: renchao | ||
285 | */ | ||
219 | doLayout () { | 286 | doLayout () { |
220 | this.$refs.elTable.doLayout() | 287 | this.$refs.elTable.doLayout() |
221 | }, | 288 | }, |
289 | /** | ||
290 | * @description: sort | ||
291 | * @param {*} prop | ||
292 | * @param {*} order | ||
293 | * @author: renchao | ||
294 | */ | ||
222 | sort (prop, order) { | 295 | sort (prop, order) { |
223 | this.$refs.elTable.sort(prop, order) | 296 | this.$refs.elTable.sort(prop, order) |
224 | }, | 297 | }, |
298 | /** | ||
299 | * @description: paginationCurrentChange | ||
300 | * @param {*} val | ||
301 | * @author: renchao | ||
302 | */ | ||
225 | paginationCurrentChange (val) { | 303 | paginationCurrentChange (val) { |
226 | this.$emit('p-current-change', val) | 304 | this.$emit('p-current-change', val) |
227 | }, | 305 | }, |
306 | /** | ||
307 | * @description: getMergeArr | ||
308 | * @param {*} tableData | ||
309 | * @param {*} merge | ||
310 | * @author: renchao | ||
311 | */ | ||
228 | getMergeArr (tableData, merge) { | 312 | getMergeArr (tableData, merge) { |
229 | if (!merge) return | 313 | if (!merge) return |
230 | this.mergeLine = {} | 314 | this.mergeLine = {} |
... | @@ -247,6 +331,10 @@ | ... | @@ -247,6 +331,10 @@ |
247 | }) | 331 | }) |
248 | }) | 332 | }) |
249 | }, | 333 | }, |
334 | /** | ||
335 | * @description: mergeMethod | ||
336 | * @author: renchao | ||
337 | */ | ||
250 | mergeMethod ({ row, column, rowIndex, columnIndex }) { | 338 | mergeMethod ({ row, column, rowIndex, columnIndex }) { |
251 | const index = this.merge.indexOf(column.property) | 339 | const index = this.merge.indexOf(column.property) |
252 | if (index > -1) { | 340 | if (index > -1) { |
... | @@ -260,9 +348,17 @@ | ... | @@ -260,9 +348,17 @@ |
260 | }, | 348 | }, |
261 | }, | 349 | }, |
262 | watch: { | 350 | watch: { |
351 | /** | ||
352 | * @description: merge | ||
353 | * @author: renchao | ||
354 | */ | ||
263 | merge () { | 355 | merge () { |
264 | this.getMergeArr(this.data, this.merge) | 356 | this.getMergeArr(this.data, this.merge) |
265 | }, | 357 | }, |
358 | /** | ||
359 | * @description: dataLength | ||
360 | * @author: renchao | ||
361 | */ | ||
266 | dataLength () { | 362 | dataLength () { |
267 | this.getMergeArr(this.data, this.merge) | 363 | this.getMergeArr(this.data, this.merge) |
268 | } | 364 | } | ... | ... |
... | @@ -6,6 +6,11 @@ import afterLeave from 'element-ui/src/utils/after-leave'; | ... | @@ -6,6 +6,11 @@ import afterLeave from 'element-ui/src/utils/after-leave'; |
6 | const Mask = Vue.extend(Loading); | 6 | const Mask = Vue.extend(Loading); |
7 | 7 | ||
8 | const loadingDirective = {}; | 8 | const loadingDirective = {}; |
9 | |||
10 | /** | ||
11 | * @description: install | ||
12 | * @author: renchao | ||
13 | */ | ||
9 | loadingDirective.install = Vue => { | 14 | loadingDirective.install = Vue => { |
10 | if (Vue.prototype.$isServer) return; | 15 | if (Vue.prototype.$isServer) return; |
11 | const toggleLoading = (el, binding) => { | 16 | const toggleLoading = (el, binding) => { |
... | @@ -110,14 +115,24 @@ loadingDirective.install = Vue => { | ... | @@ -110,14 +115,24 @@ loadingDirective.install = Vue => { |
110 | 115 | ||
111 | binding.value && toggleLoading(el, binding); | 116 | binding.value && toggleLoading(el, binding); |
112 | }, | 117 | }, |
113 | 118 | /** | |
119 | * @description: update | ||
120 | * @param {*} el | ||
121 | * @param {*} binding | ||
122 | * @author: renchao | ||
123 | */ | ||
114 | update: function (el, binding) { | 124 | update: function (el, binding) { |
115 | el.instance.setText(el.getAttribute('element-loading-text')); | 125 | el.instance.setText(el.getAttribute('element-loading-text')); |
116 | if (binding.oldValue !== binding.value) { | 126 | if (binding.oldValue !== binding.value) { |
117 | toggleLoading(el, binding); | 127 | toggleLoading(el, binding); |
118 | } | 128 | } |
119 | }, | 129 | }, |
120 | 130 | /** | |
131 | * @description: unbind | ||
132 | * @param {*} el | ||
133 | * @param {*} binding | ||
134 | * @author: renchao | ||
135 | */ | ||
121 | unbind: function (el, binding) { | 136 | unbind: function (el, binding) { |
122 | if (el.domInserted) { | 137 | if (el.domInserted) { |
123 | el.mask && | 138 | el.mask && | ... | ... |
... | @@ -20,6 +20,10 @@ let fullscreenLoading; | ... | @@ -20,6 +20,10 @@ let fullscreenLoading; |
20 | LoadingConstructor.prototype.originalPosition = ''; | 20 | LoadingConstructor.prototype.originalPosition = ''; |
21 | LoadingConstructor.prototype.originalOverflow = ''; | 21 | LoadingConstructor.prototype.originalOverflow = ''; |
22 | 22 | ||
23 | /** | ||
24 | * @description: close | ||
25 | * @author: renchao | ||
26 | */ | ||
23 | LoadingConstructor.prototype.close = function() { | 27 | LoadingConstructor.prototype.close = function() { |
24 | if (this.fullscreen) { | 28 | if (this.fullscreen) { |
25 | fullscreenLoading = undefined; | 29 | fullscreenLoading = undefined; |
... | @@ -38,6 +42,13 @@ LoadingConstructor.prototype.close = function() { | ... | @@ -38,6 +42,13 @@ LoadingConstructor.prototype.close = function() { |
38 | this.visible = false; | 42 | this.visible = false; |
39 | }; | 43 | }; |
40 | 44 | ||
45 | /** | ||
46 | * @description: addStyle | ||
47 | * @param {*} options | ||
48 | * @param {*} parent | ||
49 | * @param {*} instance | ||
50 | * @author: renchao | ||
51 | */ | ||
41 | const addStyle = (options, parent, instance) => { | 52 | const addStyle = (options, parent, instance) => { |
42 | let maskStyle = {}; | 53 | let maskStyle = {}; |
43 | if (options.fullscreen) { | 54 | if (options.fullscreen) { |
... | @@ -64,6 +75,10 @@ const addStyle = (options, parent, instance) => { | ... | @@ -64,6 +75,10 @@ const addStyle = (options, parent, instance) => { |
64 | }); | 75 | }); |
65 | }; | 76 | }; |
66 | 77 | ||
78 | /** | ||
79 | * @description: Loading | ||
80 | * @author: renchao | ||
81 | */ | ||
67 | const Loading = (options = {}) => { | 82 | const Loading = (options = {}) => { |
68 | if (Vue.prototype.$isServer) return; | 83 | if (Vue.prototype.$isServer) return; |
69 | options = merge({}, defaults, options); | 84 | options = merge({}, defaults, options); | ... | ... |
... | @@ -43,6 +43,11 @@ const MessageBoxConstructor = Vue.extend(msgboxVue); | ... | @@ -43,6 +43,11 @@ const MessageBoxConstructor = Vue.extend(msgboxVue); |
43 | let currentMsg, instance; | 43 | let currentMsg, instance; |
44 | let msgQueue = []; | 44 | let msgQueue = []; |
45 | 45 | ||
46 | |||
47 | /** | ||
48 | * @description: defaultCallback | ||
49 | * @author: renchao | ||
50 | */ | ||
46 | const defaultCallback = action => { | 51 | const defaultCallback = action => { |
47 | if (currentMsg) { | 52 | if (currentMsg) { |
48 | let callback = currentMsg.callback; | 53 | let callback = currentMsg.callback; |
... | @@ -56,6 +61,10 @@ const defaultCallback = action => { | ... | @@ -56,6 +61,10 @@ const defaultCallback = action => { |
56 | } | 61 | } |
57 | }; | 62 | }; |
58 | 63 | ||
64 | /** | ||
65 | * @description: initInstance | ||
66 | * @author: renchao | ||
67 | */ | ||
59 | const initInstance = () => { | 68 | const initInstance = () => { |
60 | instance = new MessageBoxConstructor({ | 69 | instance = new MessageBoxConstructor({ |
61 | el: document.createElement('div') | 70 | el: document.createElement('div') |
... | @@ -64,6 +73,10 @@ const initInstance = () => { | ... | @@ -64,6 +73,10 @@ const initInstance = () => { |
64 | instance.callback = defaultCallback; | 73 | instance.callback = defaultCallback; |
65 | }; | 74 | }; |
66 | 75 | ||
76 | /** | ||
77 | * @description: showNextMsg | ||
78 | * @author: renchao | ||
79 | */ | ||
67 | const showNextMsg = () => { | 80 | const showNextMsg = () => { |
68 | if (!instance) { | 81 | if (!instance) { |
69 | initInstance(); | 82 | initInstance(); |
... | @@ -109,6 +122,10 @@ const showNextMsg = () => { | ... | @@ -109,6 +122,10 @@ const showNextMsg = () => { |
109 | } | 122 | } |
110 | }; | 123 | }; |
111 | 124 | ||
125 | /** | ||
126 | * @description: MessageBox | ||
127 | * @author: renchao | ||
128 | */ | ||
112 | const MessageBox = function (options, callback) { | 129 | const MessageBox = function (options, callback) { |
113 | if (Vue.prototype.$isServer) return; | 130 | if (Vue.prototype.$isServer) return; |
114 | if (typeof options === 'string' || isVNode(options)) { | 131 | if (typeof options === 'string' || isVNode(options)) { |
... | @@ -143,10 +160,18 @@ const MessageBox = function (options, callback) { | ... | @@ -143,10 +160,18 @@ const MessageBox = function (options, callback) { |
143 | } | 160 | } |
144 | }; | 161 | }; |
145 | 162 | ||
163 | /** | ||
164 | * @description: setDefaults | ||
165 | * @author: renchao | ||
166 | */ | ||
146 | MessageBox.setDefaults = defaults => { | 167 | MessageBox.setDefaults = defaults => { |
147 | MessageBox.defaults = defaults; | 168 | MessageBox.defaults = defaults; |
148 | }; | 169 | }; |
149 | 170 | ||
171 | /** | ||
172 | * @description: alert | ||
173 | * @author: renchao | ||
174 | */ | ||
150 | MessageBox.alert = (title, message, options) => { | 175 | MessageBox.alert = (title, message, options) => { |
151 | if (typeof title === 'object') { | 176 | if (typeof title === 'object') { |
152 | options = title; | 177 | options = title; |
... | @@ -163,6 +188,10 @@ MessageBox.alert = (title, message, options) => { | ... | @@ -163,6 +188,10 @@ MessageBox.alert = (title, message, options) => { |
163 | }, options)); | 188 | }, options)); |
164 | }; | 189 | }; |
165 | 190 | ||
191 | /** | ||
192 | * @description: close | ||
193 | * @author: renchao | ||
194 | */ | ||
166 | MessageBox.close = () => { | 195 | MessageBox.close = () => { |
167 | instance.doClose(); | 196 | instance.doClose(); |
168 | instance.visible = false; | 197 | instance.visible = false; | ... | ... |
... | @@ -97,6 +97,10 @@ export default { | ... | @@ -97,6 +97,10 @@ export default { |
97 | }, | 97 | }, |
98 | 98 | ||
99 | methods: { | 99 | methods: { |
100 | /** | ||
101 | * @description: getSafeClose | ||
102 | * @author: renchao | ||
103 | */ | ||
100 | getSafeClose () { | 104 | getSafeClose () { |
101 | const currentId = this.uid; | 105 | const currentId = this.uid; |
102 | return () => { | 106 | return () => { |
... | @@ -105,6 +109,10 @@ export default { | ... | @@ -105,6 +109,10 @@ export default { |
105 | }); | 109 | }); |
106 | }; | 110 | }; |
107 | }, | 111 | }, |
112 | /** | ||
113 | * @description: doClose | ||
114 | * @author: renchao | ||
115 | */ | ||
108 | doClose () { | 116 | doClose () { |
109 | if (!this.visible) return; | 117 | if (!this.visible) return; |
110 | this.visible = false; | 118 | this.visible = false; |
... | @@ -122,18 +130,31 @@ export default { | ... | @@ -122,18 +130,31 @@ export default { |
122 | }); | 130 | }); |
123 | }, | 131 | }, |
124 | 132 | ||
133 | /** | ||
134 | * @description: handleWrapperClick | ||
135 | * @author: renchao | ||
136 | */ | ||
125 | handleWrapperClick () { | 137 | handleWrapperClick () { |
126 | if (this.closeOnClickModal) { | 138 | if (this.closeOnClickModal) { |
127 | this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel'); | 139 | this.handleAction(this.distinguishCancelAndClose ? 'close' : 'cancel'); |
128 | } | 140 | } |
129 | }, | 141 | }, |
130 | 142 | ||
143 | /** | ||
144 | * @description: handleInputEnter | ||
145 | * @author: renchao | ||
146 | */ | ||
131 | handleInputEnter () { | 147 | handleInputEnter () { |
132 | if (this.inputType !== 'textarea') { | 148 | if (this.inputType !== 'textarea') { |
133 | return this.handleAction('confirm'); | 149 | return this.handleAction('confirm'); |
134 | } | 150 | } |
135 | }, | 151 | }, |
136 | 152 | ||
153 | /** | ||
154 | * @description: handleAction | ||
155 | * @param {*} action | ||
156 | * @author: renchao | ||
157 | */ | ||
137 | handleAction (action) { | 158 | handleAction (action) { |
138 | if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) { | 159 | if (this.$type === 'prompt' && action === 'confirm' && !this.validate()) { |
139 | return; | 160 | return; |
... | @@ -147,6 +168,10 @@ export default { | ... | @@ -147,6 +168,10 @@ export default { |
147 | } | 168 | } |
148 | }, | 169 | }, |
149 | 170 | ||
171 | /** | ||
172 | * @description: validate | ||
173 | * @author: renchao | ||
174 | */ | ||
150 | validate () { | 175 | validate () { |
151 | if (this.$type === 'prompt') { | 176 | if (this.$type === 'prompt') { |
152 | const inputPattern = this.inputPattern; | 177 | const inputPattern = this.inputPattern; |
... | @@ -174,15 +199,27 @@ export default { | ... | @@ -174,15 +199,27 @@ export default { |
174 | removeClass(this.getInputElement(), 'invalid'); | 199 | removeClass(this.getInputElement(), 'invalid'); |
175 | return true; | 200 | return true; |
176 | }, | 201 | }, |
202 | /** | ||
203 | * @description: getFirstFocus | ||
204 | * @author: renchao | ||
205 | */ | ||
177 | getFirstFocus () { | 206 | getFirstFocus () { |
178 | const btn = this.$el.querySelector('.el-message-box__btns .el-button'); | 207 | const btn = this.$el.querySelector('.el-message-box__btns .el-button'); |
179 | const title = this.$el.querySelector('.el-message-box__btns .el-message-box__title'); | 208 | const title = this.$el.querySelector('.el-message-box__btns .el-message-box__title'); |
180 | return btn || title; | 209 | return btn || title; |
181 | }, | 210 | }, |
211 | /** | ||
212 | * @description: getInputElement | ||
213 | * @author: renchao | ||
214 | */ | ||
182 | getInputElement () { | 215 | getInputElement () { |
183 | const inputRefs = this.$refs.input.$refs; | 216 | const inputRefs = this.$refs.input.$refs; |
184 | return inputRefs.input || inputRefs.textarea; | 217 | return inputRefs.input || inputRefs.textarea; |
185 | }, | 218 | }, |
219 | /** | ||
220 | * @description: handleClose | ||
221 | * @author: renchao | ||
222 | */ | ||
186 | handleClose () { | 223 | handleClose () { |
187 | this.handleAction('close'); | 224 | this.handleAction('close'); |
188 | } | 225 | } |
... | @@ -200,6 +237,11 @@ export default { | ... | @@ -200,6 +237,11 @@ export default { |
200 | } | 237 | } |
201 | }, | 238 | }, |
202 | 239 | ||
240 | /** | ||
241 | * @description: visible | ||
242 | * @param {*} val | ||
243 | * @author: renchao | ||
244 | */ | ||
203 | visible (val) { | 245 | visible (val) { |
204 | if (val) { | 246 | if (val) { |
205 | this.uid++; | 247 | this.uid++; |
... | @@ -222,6 +264,10 @@ export default { | ... | @@ -222,6 +264,10 @@ export default { |
222 | } | 264 | } |
223 | }, | 265 | }, |
224 | 266 | ||
267 | /** | ||
268 | * @description: mounted | ||
269 | * @author: renchao | ||
270 | */ | ||
225 | mounted () { | 271 | mounted () { |
226 | this.$nextTick(() => { | 272 | this.$nextTick(() => { |
227 | if (this.closeOnHashChange) { | 273 | if (this.closeOnHashChange) { |
... | @@ -230,6 +276,10 @@ export default { | ... | @@ -230,6 +276,10 @@ export default { |
230 | }); | 276 | }); |
231 | }, | 277 | }, |
232 | 278 | ||
279 | /** | ||
280 | * @description: beforeDestroy | ||
281 | * @author: renchao | ||
282 | */ | ||
233 | beforeDestroy () { | 283 | beforeDestroy () { |
234 | if (this.closeOnHashChange) { | 284 | if (this.closeOnHashChange) { |
235 | window.removeEventListener('hashchange', this.close); | 285 | window.removeEventListener('hashchange', this.close); |
... | @@ -298,4 +348,4 @@ export default { | ... | @@ -298,4 +348,4 @@ export default { |
298 | /deep/.el-message-box__content { | 348 | /deep/.el-message-box__content { |
299 | padding-top: 0; | 349 | padding-top: 0; |
300 | } | 350 | } |
301 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
351 | </style> | ... | ... |
... | @@ -49,10 +49,18 @@ export default { | ... | @@ -49,10 +49,18 @@ export default { |
49 | } | 49 | } |
50 | }, | 50 | }, |
51 | methods: { | 51 | methods: { |
52 | /** | ||
53 | * @description: handleNotice | ||
54 | * @param {*} item | ||
55 | * @author: renchao | ||
56 | */ | ||
52 | handleNotice (item) { | 57 | handleNotice (item) { |
53 | this.$alertMes(item.noticeTitle, item.noticeContent) | 58 | this.$alertMes(item.noticeTitle, item.noticeContent) |
54 | }, | 59 | }, |
55 | // 获取数据 | 60 | /** |
61 | * @description: 获取数据 | ||
62 | * @author: renchao | ||
63 | */ | ||
56 | getData () { | 64 | getData () { |
57 | let style = document.styleSheets[0]; | 65 | let style = document.styleSheets[0]; |
58 | let text = this.$refs.text; | 66 | let text = this.$refs.text; |
... | @@ -72,13 +80,19 @@ export default { | ... | @@ -72,13 +80,19 @@ export default { |
72 | this.changeState(); | 80 | this.changeState(); |
73 | }, 300); | 81 | }, 300); |
74 | }, | 82 | }, |
75 | // 用速度计算时间(想要保持速度一样,2种状态时间不同需算出) | 83 | /** |
84 | * @description: 用速度计算时间(想要保持速度一样,2种状态时间不同需算出) | ||
85 | * @author: renchao | ||
86 | */ | ||
76 | ComputationTime () { | 87 | ComputationTime () { |
77 | this.firstAnimationTime = this.wordLength / this.speed; | 88 | this.firstAnimationTime = this.wordLength / this.speed; |
78 | this.secondAnimationTime = | 89 | this.secondAnimationTime = |
79 | (this.wordLength + this.backWidth) / this.speed; | 90 | (this.wordLength + this.backWidth) / this.speed; |
80 | }, | 91 | }, |
81 | // 根据状态切换动画 | 92 | /** |
93 | * @description: 根据状态切换动画 | ||
94 | * @author: renchao | ||
95 | */ | ||
82 | changeState () { | 96 | changeState () { |
83 | let text = this.$refs.text; | 97 | let text = this.$refs.text; |
84 | if (this.state == 1) { | 98 | if (this.state == 1) { |
... | @@ -88,6 +102,10 @@ export default { | ... | @@ -88,6 +102,10 @@ export default { |
88 | text.style.animation = `secondAnimation ${this.secondAnimationTime}s linear infinite`; | 102 | text.style.animation = `secondAnimation ${this.secondAnimationTime}s linear infinite`; |
89 | } | 103 | } |
90 | }, | 104 | }, |
105 | /** | ||
106 | * @description: Listener | ||
107 | * @author: renchao | ||
108 | */ | ||
91 | Listener () { | 109 | Listener () { |
92 | let text = this.$refs.text; | 110 | let text = this.$refs.text; |
93 | text.addEventListener( | 111 | text.addEventListener( |
... | @@ -98,10 +116,18 @@ export default { | ... | @@ -98,10 +116,18 @@ export default { |
98 | false | 116 | false |
99 | ) | 117 | ) |
100 | }, | 118 | }, |
119 | /** | ||
120 | * @description: mouseOver | ||
121 | * @author: renchao | ||
122 | */ | ||
101 | mouseOver () { | 123 | mouseOver () { |
102 | let text = this.$refs.text; | 124 | let text = this.$refs.text; |
103 | text.style.animationPlayState = 'paused' | 125 | text.style.animationPlayState = 'paused' |
104 | }, | 126 | }, |
127 | /** | ||
128 | * @description: mouseLeave | ||
129 | * @author: renchao | ||
130 | */ | ||
105 | mouseLeave () { | 131 | mouseLeave () { |
106 | let text = this.$refs.text; | 132 | let text = this.$refs.text; |
107 | text.style.animationPlayState = '' | 133 | text.style.animationPlayState = '' |
... | @@ -151,4 +177,4 @@ export default { | ... | @@ -151,4 +177,4 @@ export default { |
151 | } | 177 | } |
152 | } | 178 | } |
153 | } | 179 | } |
154 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
180 | </style> | ... | ... |
... | @@ -188,6 +188,10 @@ | ... | @@ -188,6 +188,10 @@ |
188 | this.$img = this.$refs["img"]; | 188 | this.$img = this.$refs["img"]; |
189 | }, | 189 | }, |
190 | methods: { | 190 | methods: { |
191 | /** | ||
192 | * @description: imgLoaded | ||
193 | * @author: renchao | ||
194 | */ | ||
191 | imgLoaded () { | 195 | imgLoaded () { |
192 | let imgInfo = this.$img.getBoundingClientRect(); | 196 | let imgInfo = this.$img.getBoundingClientRect(); |
193 | if (JSON.stringify(this.imgInfo) != JSON.stringify(imgInfo)) { | 197 | if (JSON.stringify(this.imgInfo) != JSON.stringify(imgInfo)) { |
... | @@ -200,6 +204,10 @@ | ... | @@ -200,6 +204,10 @@ |
200 | this.$emit("created", imgInfo); | 204 | this.$emit("created", imgInfo); |
201 | } | 205 | } |
202 | }, | 206 | }, |
207 | /** | ||
208 | * @description: mouseMove | ||
209 | * @author: renchao | ||
210 | */ | ||
203 | mouseMove (e) { | 211 | mouseMove (e) { |
204 | if (!this.hideZoom && this.imgLoadedFlag) { | 212 | if (!this.hideZoom && this.imgLoadedFlag) { |
205 | this.imgLoaded(); | 213 | this.imgLoaded(); |
... | @@ -225,6 +233,11 @@ | ... | @@ -225,6 +233,11 @@ |
225 | selector.bgTop = addWidth - y * scale; | 233 | selector.bgTop = addWidth - y * scale; |
226 | } | 234 | } |
227 | }, | 235 | }, |
236 | /** | ||
237 | * @description: initSelectorProperty | ||
238 | * @param {*} selectorWidth | ||
239 | * @author: renchao | ||
240 | */ | ||
228 | initSelectorProperty (selectorWidth) { | 241 | initSelectorProperty (selectorWidth) { |
229 | const selectorHalfWidth = selectorWidth / 2; | 242 | const selectorHalfWidth = selectorWidth / 2; |
230 | const selector = this.selector; | 243 | const selector = this.selector; |
... | @@ -236,12 +249,20 @@ | ... | @@ -236,12 +249,20 @@ |
236 | selector.absoluteLeft = left + selectorHalfWidth + scrollLeft; | 249 | selector.absoluteLeft = left + selectorHalfWidth + scrollLeft; |
237 | selector.absoluteTop = top + selectorHalfWidth + scrollTop; | 250 | selector.absoluteTop = top + selectorHalfWidth + scrollTop; |
238 | }, | 251 | }, |
252 | /** | ||
253 | * @description: mouseLeave | ||
254 | * @author: renchao | ||
255 | */ | ||
239 | mouseLeave () { | 256 | mouseLeave () { |
240 | this.hideSelector = true; | 257 | this.hideSelector = true; |
241 | if (this.outShow) { | 258 | if (this.outShow) { |
242 | this.hideOutShow = true; | 259 | this.hideOutShow = true; |
243 | } | 260 | } |
244 | }, | 261 | }, |
262 | /** | ||
263 | * @description: reset | ||
264 | * @author: renchao | ||
265 | */ | ||
245 | reset () { | 266 | reset () { |
246 | Object.assign(this.selector, { | 267 | Object.assign(this.selector, { |
247 | top: 0, | 268 | top: 0, |
... | @@ -251,9 +272,18 @@ | ... | @@ -251,9 +272,18 @@ |
251 | }); | 272 | }); |
252 | this.resetOutShowInitPosition(); | 273 | this.resetOutShowInitPosition(); |
253 | }, | 274 | }, |
275 | /** | ||
276 | * @description: resetOutShowInitPosition | ||
277 | * @author: renchao | ||
278 | */ | ||
254 | resetOutShowInitPosition () { | 279 | resetOutShowInitPosition () { |
255 | this.outShowInitTop = 0; | 280 | this.outShowInitTop = 0; |
256 | }, | 281 | }, |
282 | /** | ||
283 | * @description: resetOutShowInitPosition | ||
284 | * @param {*} e | ||
285 | * @author: renchao | ||
286 | */ | ||
257 | imgerrorfun (e) { | 287 | imgerrorfun (e) { |
258 | // let img = require('@/assets/vehicle_img/blank_vehicle.jpg') | 288 | // let img = require('@/assets/vehicle_img/blank_vehicle.jpg') |
259 | // this.url = img | 289 | // this.url = img |
... | @@ -326,4 +356,4 @@ | ... | @@ -326,4 +356,4 @@ |
326 | top: 50%; | 356 | top: 50%; |
327 | transform: translateY(-50%); | 357 | transform: translateY(-50%); |
328 | } | 358 | } |
329 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
359 | </style> | ... | ... |
... | @@ -2,6 +2,15 @@ import Vue from 'vue' | ... | @@ -2,6 +2,15 @@ import Vue from 'vue' |
2 | import Popup from './index.vue' | 2 | import Popup from './index.vue' |
3 | 3 | ||
4 | const PopupBox = Vue.extend(Popup) | 4 | const PopupBox = Vue.extend(Popup) |
5 | |||
6 | /** | ||
7 | * @description: install | ||
8 | * @param {*} title | ||
9 | * @param {*} editItem | ||
10 | * @param {*} data | ||
11 | * @param {*} formData | ||
12 | * @author: renchao | ||
13 | */ | ||
5 | Popup.install = function (title, editItem, data, formData) { | 14 | Popup.install = function (title, editItem, data, formData) { |
6 | data.title = title | 15 | data.title = title |
7 | data.editItem = editItem | 16 | data.editItem = editItem | ... | ... |
... | @@ -55,7 +55,10 @@ export default { | ... | @@ -55,7 +55,10 @@ export default { |
55 | } | 55 | } |
56 | }, | 56 | }, |
57 | mounted () { | 57 | mounted () { |
58 | // 计算滚动条高度 | 58 | /** |
59 | * @description: 计算滚动条高度 | ||
60 | * @author: renchao | ||
61 | */ | ||
59 | setTimeout(() => { | 62 | setTimeout(() => { |
60 | if (this.btnShow) { | 63 | if (this.btnShow) { |
61 | if (this.height == 'auto') { | 64 | if (this.height == 'auto') { |
... | @@ -73,10 +76,18 @@ export default { | ... | @@ -73,10 +76,18 @@ export default { |
73 | }, 300) | 76 | }, 300) |
74 | }, | 77 | }, |
75 | methods: { | 78 | methods: { |
79 | /** | ||
80 | * @description: onCancel | ||
81 | * @author: renchao | ||
82 | */ | ||
76 | onCancel () { | 83 | onCancel () { |
77 | this.isShow = false | 84 | this.isShow = false |
78 | this.cancel() | 85 | this.cancel() |
79 | }, | 86 | }, |
87 | /** | ||
88 | * @description: onConfirm | ||
89 | * @author: renchao | ||
90 | */ | ||
80 | onConfirm () { | 91 | onConfirm () { |
81 | this.loading = true | 92 | this.loading = true |
82 | let res = new Promise((resolve, reject) => { | 93 | let res = new Promise((resolve, reject) => { |
... | @@ -87,9 +98,19 @@ export default { | ... | @@ -87,9 +98,19 @@ export default { |
87 | this.isShow = false | 98 | this.isShow = false |
88 | } | 99 | } |
89 | }, | 100 | }, |
101 | /** | ||
102 | * @description: loadingFn | ||
103 | * @param {*} e | ||
104 | * @author: renchao | ||
105 | */ | ||
90 | loadingFn (e) { //加载状态 | 106 | loadingFn (e) { //加载状态 |
91 | this.loading = e | 107 | this.loading = e |
92 | }, | 108 | }, |
109 | /** | ||
110 | * @description: loadViewFn | ||
111 | * @param {*} view | ||
112 | * @author: renchao | ||
113 | */ | ||
93 | loadViewFn (view) { | 114 | loadViewFn (view) { |
94 | return (r) => | 115 | return (r) => |
95 | require.ensure([], () => | 116 | require.ensure([], () => | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-06-14 15:05:38 | 4 | * @LastEditTime: 2023-06-14 15:05:38 |
5 | */ | 5 | */ |
... | @@ -8,6 +8,10 @@ import Popup from './index.vue' | ... | @@ -8,6 +8,10 @@ import Popup from './index.vue' |
8 | const PopupBox = Vue.extend(Popup) | 8 | const PopupBox = Vue.extend(Popup) |
9 | let popuping = undefined | 9 | let popuping = undefined |
10 | 10 | ||
11 | /** | ||
12 | * @description: close | ||
13 | * @author: renchao | ||
14 | */ | ||
11 | PopupBox.prototype.close = function () { | 15 | PopupBox.prototype.close = function () { |
12 | // 如果Popup 有引用,则去掉引用 | 16 | // 如果Popup 有引用,则去掉引用 |
13 | if (popuping) { | 17 | if (popuping) { |
... | @@ -23,7 +27,14 @@ PopupBox.prototype.close = function () { | ... | @@ -23,7 +27,14 @@ PopupBox.prototype.close = function () { |
23 | } | 27 | } |
24 | }, 300) | 28 | }, 300) |
25 | } | 29 | } |
26 | 30 | /** | |
31 | * @description: Popup1 | ||
32 | * @param {*} title | ||
33 | * @param {*} editItem | ||
34 | * @param {*} data | ||
35 | * @param {*} formData | ||
36 | * @author: renchao | ||
37 | */ | ||
27 | const Popup1 = (title, editItem, data, formData) => { | 38 | const Popup1 = (title, editItem, data, formData) => { |
28 | // 如果组件已渲染,则返回即可 | 39 | // 如果组件已渲染,则返回即可 |
29 | if (popuping) { | 40 | if (popuping) { | ... | ... |
... | @@ -21,170 +21,183 @@ | ... | @@ -21,170 +21,183 @@ |
21 | </transition> | 21 | </transition> |
22 | </template> | 22 | </template> |
23 | <script> | 23 | <script> |
24 | import Popup1 from './index' | 24 | import Popup1 from './index' |
25 | export default { | 25 | export default { |
26 | name: 'index', | 26 | name: 'index', |
27 | data () { | 27 | data () { |
28 | return { | 28 | return { |
29 | title: '标题', | 29 | title: '标题', |
30 | editItem: "", | 30 | editItem: "", |
31 | isMain: false, | 31 | isMain: false, |
32 | formData: undefined,//父组件传递的参数 负责传给子组件 | 32 | formData: undefined,//父组件传递的参数 负责传给子组件 |
33 | btnShow: false, | 33 | btnShow: false, |
34 | cancel: function () { }, | 34 | cancel: function () { }, |
35 | confirm: function () { }, | 35 | confirm: function () { }, |
36 | cancelText: '取消', | 36 | cancelText: '取消', |
37 | confirmText: '确认', | 37 | confirmText: '确认', |
38 | isSync: false, | 38 | isSync: false, |
39 | isShow: false, | 39 | isShow: false, |
40 | myShow: false, | 40 | myShow: false, |
41 | titleStyle: 'center', | 41 | titleStyle: 'center', |
42 | width: "75%", | 42 | width: "75%", |
43 | height: "auto", | 43 | height: "auto", |
44 | contentHeight: "", | 44 | contentHeight: "", |
45 | iconClass: "", | 45 | iconClass: "", |
46 | key: 0 | 46 | key: 0 |
47 | } | 47 | } |
48 | }, | 48 | }, |
49 | watch: { | 49 | watch: { |
50 | isShow (newValue) { | 50 | isShow (newValue) { |
51 | this.$nextTick(() => { | 51 | this.$nextTick(() => { |
52 | this.editItem = this.loadViewFn(this.editItem) | 52 | this.editItem = this.loadViewFn(this.editItem) |
53 | document.body.appendChild(this.$el); | 53 | document.body.appendChild(this.$el); |
54 | this.myShow = newValue | 54 | this.myShow = newValue |
55 | }) | 55 | }) |
56 | } | 56 | } |
57 | }, | 57 | }, |
58 | mounted () { | 58 | mounted () { |
59 | // 计算滚动条高度 | 59 | /** |
60 | setTimeout(() => { | 60 | * @description: 计算滚动条高度 |
61 | if (this.btnShow) { | 61 | * @author: renchao |
62 | if (this.height == 'auto') { | 62 | */ |
63 | this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px' | 63 | setTimeout(() => { |
64 | if (this.btnShow) { | ||
65 | if (this.height == 'auto') { | ||
66 | this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px' | ||
67 | } else { | ||
68 | this.contentHeight = this.height | ||
69 | } | ||
64 | } else { | 70 | } else { |
65 | this.contentHeight = this.height | 71 | if (this.height == 'auto') { |
72 | this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px' | ||
73 | } else { | ||
74 | this.contentHeight = this.height | ||
75 | } | ||
66 | } | 76 | } |
67 | } else { | 77 | }, 300) |
68 | if (this.height == 'auto') { | 78 | }, |
69 | this.contentHeight = (this.$refs.contentRef.offsetHeight) + 'px' | 79 | methods: { |
70 | } else { | 80 | /** |
71 | this.contentHeight = this.height | 81 | * @description: onCancel |
82 | * @author: renchao | ||
83 | */ | ||
84 | onCancel () { | ||
85 | Popup1().close() | ||
86 | }, | ||
87 | /** | ||
88 | * @description: onConfirm | ||
89 | * @author: renchao | ||
90 | */ | ||
91 | onConfirm () { | ||
92 | let res = new Promise((resolve, reject) => { | ||
93 | this.confirm() | ||
94 | resolve(true) | ||
95 | }) | ||
96 | if (res) { | ||
97 | this.isShow = false | ||
72 | } | 98 | } |
99 | }, | ||
100 | /** | ||
101 | * @description: loadViewFn | ||
102 | * @param {*} view | ||
103 | * @author: renchao | ||
104 | */ | ||
105 | loadViewFn (view) { | ||
106 | return (r) => | ||
107 | require.ensure([], () => | ||
108 | r(require(`@/views/${view}.vue`)) | ||
109 | ) | ||
73 | } | 110 | } |
74 | }, 300) | ||
75 | }, | ||
76 | methods: { | ||
77 | onCancel () { | ||
78 | Popup1().close() | ||
79 | }, | 111 | }, |
80 | onConfirm () { | 112 | destroyed () { |
81 | let res = new Promise((resolve, reject) => { | 113 | if (this.appendToBody && this.$el && this.$el.parentNode) { |
82 | this.confirm() | 114 | this.$el.parentNode.removeChild(this.$el); |
83 | resolve(true) | ||
84 | }) | ||
85 | if (res) { | ||
86 | this.isShow = false | ||
87 | } | 115 | } |
88 | }, | ||
89 | loadViewFn (view) { | ||
90 | return (r) => | ||
91 | require.ensure([], () => | ||
92 | r(require(`@/views/${view}.vue`)) | ||
93 | ) | ||
94 | } | ||
95 | }, | ||
96 | destroyed () { | ||
97 | if (this.appendToBody && this.$el && this.$el.parentNode) { | ||
98 | this.$el.parentNode.removeChild(this.$el); | ||
99 | } | 116 | } |
100 | } | 117 | } |
101 | } | ||
102 | </script> | 118 | </script> |
103 | <style scoped lang="scss" > | 119 | <style scoped lang="scss" > |
104 | @import "~@/styles/mixin.scss"; | 120 | @import "~@/styles/mixin.scss"; |
105 | @import "~@/styles/dialogBox.scss"; | 121 | @import "~@/styles/dialogBox.scss"; |
106 | |||
107 | .ls-mask { | ||
108 | width: 100%; | ||
109 | height: 100%; | ||
110 | z-index: 500; | ||
111 | position: fixed; | ||
112 | left: 0; | ||
113 | top: 0; | ||
114 | background: rgba(0, 0, 0, 0.3); | ||
115 | |||
116 | } | ||
117 | 122 | ||
118 | .ls-mask-window { | 123 | .ls-mask { |
119 | background: white; | 124 | width: 100%; |
120 | position: relative; | 125 | height: 100%; |
121 | left: 50%; | 126 | z-index: 500; |
122 | top: 50%; | 127 | position: fixed; |
123 | min-height: 200px; | 128 | left: 0; |
124 | transform: translate(-50%, -50%); | 129 | top: 0; |
125 | border-radius: 5px; | 130 | background: rgba(0, 0, 0, 0.3); |
126 | overflow: hidden; | 131 | } |
127 | } | ||
128 | 132 | ||
129 | .ls-mask-window b { | 133 | .ls-mask-window { |
130 | padding-left: 5px; | 134 | background: white; |
131 | } | 135 | position: relative; |
136 | left: 50%; | ||
137 | top: 50%; | ||
138 | min-height: 200px; | ||
139 | transform: translate(-50%, -50%); | ||
140 | border-radius: 5px; | ||
141 | overflow: hidden; | ||
142 | } | ||
132 | 143 | ||
133 | .ls-title { | 144 | .ls-mask-window b { |
134 | padding: 16px; | 145 | padding-left: 5px; |
135 | color: #ffffff; | 146 | } |
136 | background: linear-gradient(3deg, #409EFF, #a7cbee); | ||
137 | font-size: 16px; | ||
138 | } | ||
139 | 147 | ||
140 | .ls-title .svg-icon { | 148 | .ls-title { |
141 | font-size: 18px; | 149 | padding: 16px; |
142 | } | 150 | color: #ffffff; |
151 | background: linear-gradient(3deg, #409eff, #a7cbee); | ||
152 | font-size: 16px; | ||
153 | } | ||
143 | 154 | ||
144 | .mask-content { | 155 | .ls-title .svg-icon { |
145 | padding: 20px; | 156 | font-size: 18px; |
146 | width: 100%; | 157 | } |
147 | min-height: 30%; | ||
148 | max-height: 90vh; | ||
149 | overflow-y: scroll; | ||
150 | } | ||
151 | 158 | ||
152 | .ls-mask-footer { | 159 | .mask-content { |
153 | height: 50px; | 160 | padding: 20px; |
154 | display: flex; | 161 | width: 100%; |
155 | justify-content: center; | 162 | min-height: 30%; |
156 | width: 100%; | 163 | max-height: 90vh; |
157 | position: absolute; | 164 | overflow-y: scroll; |
158 | border-top: 1px solid $borderColor; | 165 | } |
159 | bottom: 0; | ||
160 | background: #ffffff; | ||
161 | border-bottom-left-radius: 5px; | ||
162 | border-bottom-right-radius: 5px; | ||
163 | overflow: hidden; | ||
164 | } | ||
165 | 166 | ||
167 | .ls-mask-footer { | ||
168 | height: 50px; | ||
169 | display: flex; | ||
170 | justify-content: center; | ||
171 | width: 100%; | ||
172 | position: absolute; | ||
173 | border-top: 1px solid $borderColor; | ||
174 | bottom: 0; | ||
175 | background: #ffffff; | ||
176 | border-bottom-left-radius: 5px; | ||
177 | border-bottom-right-radius: 5px; | ||
178 | overflow: hidden; | ||
179 | } | ||
166 | 180 | ||
167 | /deep/.closeStyle { | 181 | /deep/.closeStyle { |
168 | position: absolute; | 182 | position: absolute; |
169 | top: 13px; | 183 | top: 13px; |
170 | right: 26px; | 184 | right: 26px; |
171 | font-size: 24px; | 185 | font-size: 24px; |
172 | cursor: pointer; | 186 | cursor: pointer; |
173 | color: #409EFF; | 187 | color: #409eff; |
174 | } | 188 | } |
175 | 189 | ||
176 | /deep/.el-loading-mask { | 190 | /deep/.el-loading-mask { |
177 | background: none; | 191 | background: none; |
178 | } | 192 | } |
179 | 193 | ||
180 | .dialog-fade-enter-active, | 194 | .dialog-fade-enter-active, |
181 | .dialog-fade-leave-active { | 195 | .dialog-fade-leave-active { |
182 | transition: opacity 0.3s; | 196 | transition: opacity 0.3s; |
183 | } | 197 | } |
184 | 198 | ||
185 | .dialog-fade-enter, | 199 | .dialog-fade-enter, |
186 | .dialog-fade-leave-to { | 200 | .dialog-fade-leave-to { |
187 | opacity: 0; | 201 | opacity: 0; |
188 | } | 202 | } |
189 | </style> | 203 | </style> |
190 | |||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -84,6 +84,13 @@ export default { | ... | @@ -84,6 +84,13 @@ export default { |
84 | }, | 84 | }, |
85 | 85 | ||
86 | methods: { | 86 | methods: { |
87 | /** | ||
88 | * @description: updateStyle | ||
89 | * @param {*} style | ||
90 | * @param {*} oldCluster | ||
91 | * @param {*} newCluster | ||
92 | * @author: renchao | ||
93 | */ | ||
87 | updateStyle (style, oldCluster, newCluster) { | 94 | updateStyle (style, oldCluster, newCluster) { |
88 | let newStyle = style | 95 | let newStyle = style |
89 | oldCluster.forEach((color, index) => { | 96 | oldCluster.forEach((color, index) => { |
... | @@ -92,6 +99,12 @@ export default { | ... | @@ -92,6 +99,12 @@ export default { |
92 | return newStyle | 99 | return newStyle |
93 | }, | 100 | }, |
94 | 101 | ||
102 | /** | ||
103 | * @description: getCSSString | ||
104 | * @param {*} url | ||
105 | * @param {*} variable | ||
106 | * @author: renchao | ||
107 | */ | ||
95 | getCSSString (url, variable) { | 108 | getCSSString (url, variable) { |
96 | return new Promise(resolve => { | 109 | return new Promise(resolve => { |
97 | const xhr = new XMLHttpRequest() | 110 | const xhr = new XMLHttpRequest() |
... | @@ -106,6 +119,11 @@ export default { | ... | @@ -106,6 +119,11 @@ export default { |
106 | }) | 119 | }) |
107 | }, | 120 | }, |
108 | 121 | ||
122 | /** | ||
123 | * @description: getThemeCluster | ||
124 | * @param {*} theme | ||
125 | * @author: renchao | ||
126 | */ | ||
109 | getThemeCluster (theme) { | 127 | getThemeCluster (theme) { |
110 | const tintColor = (color, tint) => { | 128 | const tintColor = (color, tint) => { |
111 | let red = parseInt(color.slice(0, 2), 16) | 129 | let red = parseInt(color.slice(0, 2), 16) |
... | @@ -169,4 +187,4 @@ export default { | ... | @@ -169,4 +187,4 @@ export default { |
169 | .theme-picker-dropdown .el-color-dropdown__link-btn { | 187 | .theme-picker-dropdown .el-color-dropdown__link-btn { |
170 | display: none; | 188 | display: none; |
171 | } | 189 | } |
172 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
190 | </style> | ... | ... |
... | @@ -2,6 +2,10 @@ import objectAssign from 'element-ui/src/utils/merge'; | ... | @@ -2,6 +2,10 @@ import objectAssign from 'element-ui/src/utils/merge'; |
2 | import { markNodeData, NODE_KEY } from './util'; | 2 | import { markNodeData, NODE_KEY } from './util'; |
3 | import { arrayFindIndex } from 'element-ui/src/utils/util'; | 3 | import { arrayFindIndex } from 'element-ui/src/utils/util'; |
4 | 4 | ||
5 | /** | ||
6 | * @description: getChildState | ||
7 | * @author: renchao | ||
8 | */ | ||
5 | export const getChildState = node => { | 9 | export const getChildState = node => { |
6 | let all = true; | 10 | let all = true; |
7 | let none = true; | 11 | let none = true; |
... | @@ -22,6 +26,11 @@ export const getChildState = node => { | ... | @@ -22,6 +26,11 @@ export const getChildState = node => { |
22 | return { all, none, allWithoutDisable, half: !all && !none }; | 26 | return { all, none, allWithoutDisable, half: !all && !none }; |
23 | }; | 27 | }; |
24 | 28 | ||
29 | /** | ||
30 | * @description: reInitChecked | ||
31 | * @param {*} node | ||
32 | * @author: renchao | ||
33 | */ | ||
25 | const reInitChecked = function(node) { | 34 | const reInitChecked = function(node) { |
26 | if (node.childNodes.length === 0 || node.loading) return; | 35 | if (node.childNodes.length === 0 || node.loading) return; |
27 | 36 | ||
... | @@ -45,6 +54,12 @@ const reInitChecked = function(node) { | ... | @@ -45,6 +54,12 @@ const reInitChecked = function(node) { |
45 | } | 54 | } |
46 | }; | 55 | }; |
47 | 56 | ||
57 | /** | ||
58 | * @description: getPropertyFromData | ||
59 | * @param {*} node | ||
60 | * @param {*} prop | ||
61 | * @author: renchao | ||
62 | */ | ||
48 | const getPropertyFromData = function(node, prop) { | 63 | const getPropertyFromData = function(node, prop) { |
49 | const props = node.store.props; | 64 | const props = node.store.props; |
50 | const data = node.data || {}; | 65 | const data = node.data || {}; |
... | @@ -63,6 +78,11 @@ const getPropertyFromData = function(node, prop) { | ... | @@ -63,6 +78,11 @@ const getPropertyFromData = function(node, prop) { |
63 | let nodeIdSeed = 0; | 78 | let nodeIdSeed = 0; |
64 | 79 | ||
65 | export default class Node { | 80 | export default class Node { |
81 | /** | ||
82 | * @description: constructor | ||
83 | * @param {*} options | ||
84 | * @author: renchao | ||
85 | */ | ||
66 | constructor(options) { | 86 | constructor(options) { |
67 | this.id = nodeIdSeed++; | 87 | this.id = nodeIdSeed++; |
68 | this.text = null; | 88 | this.text = null; |
... | @@ -135,6 +155,11 @@ export default class Node { | ... | @@ -135,6 +155,11 @@ export default class Node { |
135 | this.updateLeafState(); | 155 | this.updateLeafState(); |
136 | } | 156 | } |
137 | 157 | ||
158 | /** | ||
159 | * @description: setData | ||
160 | * @param {*} data | ||
161 | * @author: renchao | ||
162 | */ | ||
138 | setData(data) { | 163 | setData(data) { |
139 | if (!Array.isArray(data)) { | 164 | if (!Array.isArray(data)) { |
140 | markNodeData(this, data); | 165 | markNodeData(this, data); |
... | @@ -155,20 +180,36 @@ export default class Node { | ... | @@ -155,20 +180,36 @@ export default class Node { |
155 | } | 180 | } |
156 | } | 181 | } |
157 | 182 | ||
183 | /** | ||
184 | * @description: label | ||
185 | * @author: renchao | ||
186 | */ | ||
158 | get label() { | 187 | get label() { |
159 | return getPropertyFromData(this, 'label'); | 188 | return getPropertyFromData(this, 'label'); |
160 | } | 189 | } |
161 | 190 | ||
191 | /** | ||
192 | * @description: key | ||
193 | * @author: renchao | ||
194 | */ | ||
162 | get key() { | 195 | get key() { |
163 | const nodeKey = this.store.key; | 196 | const nodeKey = this.store.key; |
164 | if (this.data) return this.data[nodeKey]; | 197 | if (this.data) return this.data[nodeKey]; |
165 | return null; | 198 | return null; |
166 | } | 199 | } |
167 | 200 | ||
201 | /** | ||
202 | * @description: disabled | ||
203 | * @author: renchao | ||
204 | */ | ||
168 | get disabled() { | 205 | get disabled() { |
169 | return getPropertyFromData(this, 'disabled'); | 206 | return getPropertyFromData(this, 'disabled'); |
170 | } | 207 | } |
171 | 208 | ||
209 | /** | ||
210 | * @description: nextSibling | ||
211 | * @author: renchao | ||
212 | */ | ||
172 | get nextSibling() { | 213 | get nextSibling() { |
173 | const parent = this.parent; | 214 | const parent = this.parent; |
174 | if (parent) { | 215 | if (parent) { |
... | @@ -180,6 +221,10 @@ export default class Node { | ... | @@ -180,6 +221,10 @@ export default class Node { |
180 | return null; | 221 | return null; |
181 | } | 222 | } |
182 | 223 | ||
224 | /** | ||
225 | * @description: previousSibling | ||
226 | * @author: renchao | ||
227 | */ | ||
183 | get previousSibling() { | 228 | get previousSibling() { |
184 | const parent = this.parent; | 229 | const parent = this.parent; |
185 | if (parent) { | 230 | if (parent) { |
... | @@ -191,6 +236,12 @@ export default class Node { | ... | @@ -191,6 +236,12 @@ export default class Node { |
191 | return null; | 236 | return null; |
192 | } | 237 | } |
193 | 238 | ||
239 | /** | ||
240 | * @description: contains | ||
241 | * @param {*} target | ||
242 | * @param {*} deep | ||
243 | * @author: renchao | ||
244 | */ | ||
194 | contains(target, deep = true) { | 245 | contains(target, deep = true) { |
195 | const walk = function(parent) { | 246 | const walk = function(parent) { |
196 | const children = parent.childNodes || []; | 247 | const children = parent.childNodes || []; |
... | @@ -208,6 +259,10 @@ export default class Node { | ... | @@ -208,6 +259,10 @@ export default class Node { |
208 | return walk(this); | 259 | return walk(this); |
209 | } | 260 | } |
210 | 261 | ||
262 | /** | ||
263 | * @description: remove | ||
264 | * @author: renchao | ||
265 | */ | ||
211 | remove() { | 266 | remove() { |
212 | const parent = this.parent; | 267 | const parent = this.parent; |
213 | if (parent) { | 268 | if (parent) { |
... | @@ -215,6 +270,13 @@ export default class Node { | ... | @@ -215,6 +270,13 @@ export default class Node { |
215 | } | 270 | } |
216 | } | 271 | } |
217 | 272 | ||
273 | /** | ||
274 | * @description: insertChild | ||
275 | * @param {*} child | ||
276 | * @param {*} index | ||
277 | * @param {*} batch | ||
278 | * @author: renchao | ||
279 | */ | ||
218 | insertChild(child, index, batch) { | 280 | insertChild(child, index, batch) { |
219 | if (!child) throw new Error('insertChild error: child is required.'); | 281 | if (!child) throw new Error('insertChild error: child is required.'); |
220 | 282 | ||
... | @@ -247,6 +309,12 @@ export default class Node { | ... | @@ -247,6 +309,12 @@ export default class Node { |
247 | this.updateLeafState(); | 309 | this.updateLeafState(); |
248 | } | 310 | } |
249 | 311 | ||
312 | /** | ||
313 | * @description: insertBefore | ||
314 | * @param {*} child | ||
315 | * @param {*} ref | ||
316 | * @author: renchao | ||
317 | */ | ||
250 | insertBefore(child, ref) { | 318 | insertBefore(child, ref) { |
251 | let index; | 319 | let index; |
252 | if (ref) { | 320 | if (ref) { |
... | @@ -255,6 +323,12 @@ export default class Node { | ... | @@ -255,6 +323,12 @@ export default class Node { |
255 | this.insertChild(child, index); | 323 | this.insertChild(child, index); |
256 | } | 324 | } |
257 | 325 | ||
326 | /** | ||
327 | * @description: insertAfter | ||
328 | * @param {*} child | ||
329 | * @param {*} ref | ||
330 | * @author: renchao | ||
331 | */ | ||
258 | insertAfter(child, ref) { | 332 | insertAfter(child, ref) { |
259 | let index; | 333 | let index; |
260 | if (ref) { | 334 | if (ref) { |
... | @@ -264,6 +338,11 @@ export default class Node { | ... | @@ -264,6 +338,11 @@ export default class Node { |
264 | this.insertChild(child, index); | 338 | this.insertChild(child, index); |
265 | } | 339 | } |
266 | 340 | ||
341 | /** | ||
342 | * @description: removeChild | ||
343 | * @param {*} child | ||
344 | * @author: renchao | ||
345 | */ | ||
267 | removeChild(child) { | 346 | removeChild(child) { |
268 | const children = this.getChildren() || []; | 347 | const children = this.getChildren() || []; |
269 | const dataIndex = children.indexOf(child.data); | 348 | const dataIndex = children.indexOf(child.data); |
... | @@ -282,6 +361,11 @@ export default class Node { | ... | @@ -282,6 +361,11 @@ export default class Node { |
282 | this.updateLeafState(); | 361 | this.updateLeafState(); |
283 | } | 362 | } |
284 | 363 | ||
364 | /** | ||
365 | * @description: removeChildByData | ||
366 | * @param {*} data | ||
367 | * @author: renchao | ||
368 | */ | ||
285 | removeChildByData(data) { | 369 | removeChildByData(data) { |
286 | let targetNode = null; | 370 | let targetNode = null; |
287 | 371 | ||
... | @@ -297,6 +381,12 @@ export default class Node { | ... | @@ -297,6 +381,12 @@ export default class Node { |
297 | } | 381 | } |
298 | } | 382 | } |
299 | 383 | ||
384 | /** | ||
385 | * @description: expand | ||
386 | * @param {*} callback | ||
387 | * @param {*} expandParent | ||
388 | * @author: renchao | ||
389 | */ | ||
300 | expand(callback, expandParent) { | 390 | expand(callback, expandParent) { |
301 | const done = () => { | 391 | const done = () => { |
302 | if (expandParent) { | 392 | if (expandParent) { |
... | @@ -326,20 +416,38 @@ export default class Node { | ... | @@ -326,20 +416,38 @@ export default class Node { |
326 | } | 416 | } |
327 | } | 417 | } |
328 | 418 | ||
419 | /** | ||
420 | * @description: doCreateChildren | ||
421 | * @param {*} array | ||
422 | * @param {*} defaultProps | ||
423 | * @author: renchao | ||
424 | */ | ||
329 | doCreateChildren(array, defaultProps = {}) { | 425 | doCreateChildren(array, defaultProps = {}) { |
330 | array.forEach((item) => { | 426 | array.forEach((item) => { |
331 | this.insertChild(objectAssign({ data: item }, defaultProps), undefined, true); | 427 | this.insertChild(objectAssign({ data: item }, defaultProps), undefined, true); |
332 | }); | 428 | }); |
333 | } | 429 | } |
334 | 430 | ||
431 | /** | ||
432 | * @description: collapse | ||
433 | * @author: renchao | ||
434 | */ | ||
335 | collapse() { | 435 | collapse() { |
336 | this.expanded = false; | 436 | this.expanded = false; |
337 | } | 437 | } |
338 | 438 | ||
439 | /** | ||
440 | * @description: shouldLoadData | ||
441 | * @author: renchao | ||
442 | */ | ||
339 | shouldLoadData() { | 443 | shouldLoadData() { |
340 | return this.store.lazy === true && this.store.load && !this.loaded; | 444 | return this.store.lazy === true && this.store.load && !this.loaded; |
341 | } | 445 | } |
342 | 446 | ||
447 | /** | ||
448 | * @description: updateLeafState | ||
449 | * @author: renchao | ||
450 | */ | ||
343 | updateLeafState() { | 451 | updateLeafState() { |
344 | if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') { | 452 | if (this.store.lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') { |
345 | this.isLeaf = this.isLeafByUser; | 453 | this.isLeaf = this.isLeafByUser; |
... | @@ -353,6 +461,14 @@ export default class Node { | ... | @@ -353,6 +461,14 @@ export default class Node { |
353 | this.isLeaf = false; | 461 | this.isLeaf = false; |
354 | } | 462 | } |
355 | 463 | ||
464 | /** | ||
465 | * @description: setChecked | ||
466 | * @param {*} value | ||
467 | * @param {*} deep | ||
468 | * @param {*} recursion | ||
469 | * @param {*} passValue | ||
470 | * @author: renchao | ||
471 | */ | ||
356 | setChecked(value, deep, recursion, passValue) { | 472 | setChecked(value, deep, recursion, passValue) { |
357 | this.indeterminate = value === 'half'; | 473 | this.indeterminate = value === 'half'; |
358 | this.checked = value === true; | 474 | this.checked = value === true; |
... | @@ -406,6 +522,11 @@ export default class Node { | ... | @@ -406,6 +522,11 @@ export default class Node { |
406 | } | 522 | } |
407 | } | 523 | } |
408 | 524 | ||
525 | /** | ||
526 | * @description: getChildren | ||
527 | * @param {*} forceInit | ||
528 | * @author: renchao | ||
529 | */ | ||
409 | getChildren(forceInit = false) { // this is data | 530 | getChildren(forceInit = false) { // this is data |
410 | if (this.level === 0) return this.data; | 531 | if (this.level === 0) return this.data; |
411 | const data = this.data; | 532 | const data = this.data; |
... | @@ -428,6 +549,10 @@ export default class Node { | ... | @@ -428,6 +549,10 @@ export default class Node { |
428 | return data[children]; | 549 | return data[children]; |
429 | } | 550 | } |
430 | 551 | ||
552 | /** | ||
553 | * @description: updateChildren | ||
554 | * @author: renchao | ||
555 | */ | ||
431 | updateChildren() { | 556 | updateChildren() { |
432 | const newData = this.getChildren() || []; | 557 | const newData = this.getChildren() || []; |
433 | const oldData = this.childNodes.map((node) => node.data); | 558 | const oldData = this.childNodes.map((node) => node.data); |
... | @@ -458,6 +583,12 @@ export default class Node { | ... | @@ -458,6 +583,12 @@ export default class Node { |
458 | this.updateLeafState(); | 583 | this.updateLeafState(); |
459 | } | 584 | } |
460 | 585 | ||
586 | /** | ||
587 | * @description: loadData | ||
588 | * @param {*} callback | ||
589 | * @param {*} defaultProps | ||
590 | * @author: renchao | ||
591 | */ | ||
461 | loadData(callback, defaultProps = {}) { | 592 | loadData(callback, defaultProps = {}) { |
462 | if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) { | 593 | if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) { |
463 | this.loading = true; | 594 | this.loading = true; | ... | ... |
... | @@ -2,6 +2,11 @@ import Node from './node'; | ... | @@ -2,6 +2,11 @@ import Node from './node'; |
2 | import { getNodeKey } from './util'; | 2 | import { getNodeKey } from './util'; |
3 | 3 | ||
4 | export default class TreeStore { | 4 | export default class TreeStore { |
5 | /** | ||
6 | * @description: constructor | ||
7 | * @param {*} options | ||
8 | * @author: renchao | ||
9 | */ | ||
5 | constructor(options) { | 10 | constructor(options) { |
6 | this.currentNode = null; | 11 | this.currentNode = null; |
7 | this.currentNodeKey = null; | 12 | this.currentNodeKey = null; |
... | @@ -30,6 +35,11 @@ export default class TreeStore { | ... | @@ -30,6 +35,11 @@ export default class TreeStore { |
30 | } | 35 | } |
31 | } | 36 | } |
32 | 37 | ||
38 | /** | ||
39 | * @description: filter | ||
40 | * @param {*} value | ||
41 | * @author: renchao | ||
42 | */ | ||
33 | filter(value) { | 43 | filter(value) { |
34 | const filterNodeMethod = this.filterNodeMethod; | 44 | const filterNodeMethod = this.filterNodeMethod; |
35 | const lazy = this.lazy; | 45 | const lazy = this.lazy; |
... | @@ -60,6 +70,11 @@ export default class TreeStore { | ... | @@ -60,6 +70,11 @@ export default class TreeStore { |
60 | traverse(this); | 70 | traverse(this); |
61 | } | 71 | } |
62 | 72 | ||
73 | /** | ||
74 | * @description: setData | ||
75 | * @param {*} newVal | ||
76 | * @author: renchao | ||
77 | */ | ||
63 | setData(newVal) { | 78 | setData(newVal) { |
64 | const instanceChanged = newVal !== this.root.data; | 79 | const instanceChanged = newVal !== this.root.data; |
65 | if (instanceChanged) { | 80 | if (instanceChanged) { |
... | @@ -70,22 +85,44 @@ export default class TreeStore { | ... | @@ -70,22 +85,44 @@ export default class TreeStore { |
70 | } | 85 | } |
71 | } | 86 | } |
72 | 87 | ||
88 | /** | ||
89 | * @description: getNode | ||
90 | * @param {*} data | ||
91 | * @author: renchao | ||
92 | */ | ||
73 | getNode(data) { | 93 | getNode(data) { |
74 | if (data instanceof Node) return data; | 94 | if (data instanceof Node) return data; |
75 | const key = typeof data !== 'object' ? data : getNodeKey(this.key, data); | 95 | const key = typeof data !== 'object' ? data : getNodeKey(this.key, data); |
76 | return this.nodesMap[key] || null; | 96 | return this.nodesMap[key] || null; |
77 | } | 97 | } |
78 | 98 | ||
99 | /** | ||
100 | * @description: insertBefore | ||
101 | * @param {*} data | ||
102 | * @param {*} refData | ||
103 | * @author: renchao | ||
104 | */ | ||
79 | insertBefore(data, refData) { | 105 | insertBefore(data, refData) { |
80 | const refNode = this.getNode(refData); | 106 | const refNode = this.getNode(refData); |
81 | refNode.parent.insertBefore({ data }, refNode); | 107 | refNode.parent.insertBefore({ data }, refNode); |
82 | } | 108 | } |
83 | 109 | ||
110 | /** | ||
111 | * @description: insertAfter | ||
112 | * @param {*} data | ||
113 | * @param {*} refData | ||
114 | * @author: renchao | ||
115 | */ | ||
84 | insertAfter(data, refData) { | 116 | insertAfter(data, refData) { |
85 | const refNode = this.getNode(refData); | 117 | const refNode = this.getNode(refData); |
86 | refNode.parent.insertAfter({ data }, refNode); | 118 | refNode.parent.insertAfter({ data }, refNode); |
87 | } | 119 | } |
88 | 120 | ||
121 | /** | ||
122 | * @description: remove | ||
123 | * @param {*} data | ||
124 | * @author: renchao | ||
125 | */ | ||
89 | remove(data) { | 126 | remove(data) { |
90 | const node = this.getNode(data); | 127 | const node = this.getNode(data); |
91 | 128 | ||
... | @@ -97,6 +134,12 @@ export default class TreeStore { | ... | @@ -97,6 +134,12 @@ export default class TreeStore { |
97 | } | 134 | } |
98 | } | 135 | } |
99 | 136 | ||
137 | /** | ||
138 | * @description: append | ||
139 | * @param {*} data | ||
140 | * @param {*} parentData | ||
141 | * @author: renchao | ||
142 | */ | ||
100 | append(data, parentData) { | 143 | append(data, parentData) { |
101 | const parentNode = parentData ? this.getNode(parentData) : this.root; | 144 | const parentNode = parentData ? this.getNode(parentData) : this.root; |
102 | 145 | ||
... | @@ -105,6 +148,10 @@ export default class TreeStore { | ... | @@ -105,6 +148,10 @@ export default class TreeStore { |
105 | } | 148 | } |
106 | } | 149 | } |
107 | 150 | ||
151 | /** | ||
152 | * @description: _initDefaultCheckedNodes | ||
153 | * @author: renchao | ||
154 | */ | ||
108 | _initDefaultCheckedNodes() { | 155 | _initDefaultCheckedNodes() { |
109 | const defaultCheckedKeys = this.defaultCheckedKeys || []; | 156 | const defaultCheckedKeys = this.defaultCheckedKeys || []; |
110 | const nodesMap = this.nodesMap; | 157 | const nodesMap = this.nodesMap; |
... | @@ -118,6 +165,11 @@ export default class TreeStore { | ... | @@ -118,6 +165,11 @@ export default class TreeStore { |
118 | }); | 165 | }); |
119 | } | 166 | } |
120 | 167 | ||
168 | /** | ||
169 | * @description: _initDefaultCheckedNode | ||
170 | * @param {*} node | ||
171 | * @author: renchao | ||
172 | */ | ||
121 | _initDefaultCheckedNode(node) { | 173 | _initDefaultCheckedNode(node) { |
122 | const defaultCheckedKeys = this.defaultCheckedKeys || []; | 174 | const defaultCheckedKeys = this.defaultCheckedKeys || []; |
123 | 175 | ||
... | @@ -126,6 +178,11 @@ export default class TreeStore { | ... | @@ -126,6 +178,11 @@ export default class TreeStore { |
126 | } | 178 | } |
127 | } | 179 | } |
128 | 180 | ||
181 | /** | ||
182 | * @description: setDefaultCheckedKey | ||
183 | * @param {*} newVal | ||
184 | * @author: renchao | ||
185 | */ | ||
129 | setDefaultCheckedKey(newVal) { | 186 | setDefaultCheckedKey(newVal) { |
130 | if (newVal !== this.defaultCheckedKeys) { | 187 | if (newVal !== this.defaultCheckedKeys) { |
131 | this.defaultCheckedKeys = newVal; | 188 | this.defaultCheckedKeys = newVal; |
... | @@ -133,6 +190,11 @@ export default class TreeStore { | ... | @@ -133,6 +190,11 @@ export default class TreeStore { |
133 | } | 190 | } |
134 | } | 191 | } |
135 | 192 | ||
193 | /** | ||
194 | * @description: registerNode | ||
195 | * @param {*} node | ||
196 | * @author: renchao | ||
197 | */ | ||
136 | registerNode(node) { | 198 | registerNode(node) { |
137 | const key = this.key; | 199 | const key = this.key; |
138 | if (!key || !node || !node.data) return; | 200 | if (!key || !node || !node.data) return; |
... | @@ -141,6 +203,11 @@ export default class TreeStore { | ... | @@ -141,6 +203,11 @@ export default class TreeStore { |
141 | if (nodeKey !== undefined) this.nodesMap[node.key] = node; | 203 | if (nodeKey !== undefined) this.nodesMap[node.key] = node; |
142 | } | 204 | } |
143 | 205 | ||
206 | /** | ||
207 | * @description: deregisterNode | ||
208 | * @param {*} node | ||
209 | * @author: renchao | ||
210 | */ | ||
144 | deregisterNode(node) { | 211 | deregisterNode(node) { |
145 | const key = this.key; | 212 | const key = this.key; |
146 | if (!key || !node || !node.data) return; | 213 | if (!key || !node || !node.data) return; |
... | @@ -152,6 +219,12 @@ export default class TreeStore { | ... | @@ -152,6 +219,12 @@ export default class TreeStore { |
152 | delete this.nodesMap[node.key]; | 219 | delete this.nodesMap[node.key]; |
153 | } | 220 | } |
154 | 221 | ||
222 | /** | ||
223 | * @description: getCheckedNodes | ||
224 | * @param {*} leafOnly | ||
225 | * @param {*} includeHalfChecked | ||
226 | * @author: renchao | ||
227 | */ | ||
155 | getCheckedNodes(leafOnly = false, includeHalfChecked = false) { | 228 | getCheckedNodes(leafOnly = false, includeHalfChecked = false) { |
156 | const checkedNodes = []; | 229 | const checkedNodes = []; |
157 | const traverse = function(node) { | 230 | const traverse = function(node) { |
... | @@ -171,10 +244,19 @@ export default class TreeStore { | ... | @@ -171,10 +244,19 @@ export default class TreeStore { |
171 | return checkedNodes; | 244 | return checkedNodes; |
172 | } | 245 | } |
173 | 246 | ||
247 | /** | ||
248 | * @description: getCheckedKeys | ||
249 | * @param {*} leafOnly | ||
250 | * @author: renchao | ||
251 | */ | ||
174 | getCheckedKeys(leafOnly = false) { | 252 | getCheckedKeys(leafOnly = false) { |
175 | return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]); | 253 | return this.getCheckedNodes(leafOnly).map((data) => (data || {})[this.key]); |
176 | } | 254 | } |
177 | 255 | ||
256 | /** | ||
257 | * @description: getHalfCheckedNodes | ||
258 | * @author: renchao | ||
259 | */ | ||
178 | getHalfCheckedNodes() { | 260 | getHalfCheckedNodes() { |
179 | const nodes = []; | 261 | const nodes = []; |
180 | const traverse = function(node) { | 262 | const traverse = function(node) { |
... | @@ -194,10 +276,18 @@ export default class TreeStore { | ... | @@ -194,10 +276,18 @@ export default class TreeStore { |
194 | return nodes; | 276 | return nodes; |
195 | } | 277 | } |
196 | 278 | ||
279 | /** | ||
280 | * @description: getHalfCheckedKeys | ||
281 | * @author: renchao | ||
282 | */ | ||
197 | getHalfCheckedKeys() { | 283 | getHalfCheckedKeys() { |
198 | return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]); | 284 | return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]); |
199 | } | 285 | } |
200 | 286 | ||
287 | /** | ||
288 | * @description: _getAllNodes | ||
289 | * @author: renchao | ||
290 | */ | ||
201 | _getAllNodes() { | 291 | _getAllNodes() { |
202 | const allNodes = []; | 292 | const allNodes = []; |
203 | const nodesMap = this.nodesMap; | 293 | const nodesMap = this.nodesMap; |
... | @@ -210,6 +300,12 @@ export default class TreeStore { | ... | @@ -210,6 +300,12 @@ export default class TreeStore { |
210 | return allNodes; | 300 | return allNodes; |
211 | } | 301 | } |
212 | 302 | ||
303 | /** | ||
304 | * @description: updateChildren | ||
305 | * @param {*} key | ||
306 | * @param {*} data | ||
307 | * @author: renchao | ||
308 | */ | ||
213 | updateChildren(key, data) { | 309 | updateChildren(key, data) { |
214 | const node = this.nodesMap[key]; | 310 | const node = this.nodesMap[key]; |
215 | if (!node) return; | 311 | if (!node) return; |
... | @@ -224,6 +320,13 @@ export default class TreeStore { | ... | @@ -224,6 +320,13 @@ export default class TreeStore { |
224 | } | 320 | } |
225 | } | 321 | } |
226 | 322 | ||
323 | /** | ||
324 | * @description: _setCheckedKeys | ||
325 | * @param {*} key | ||
326 | * @param {*} leafOnly | ||
327 | * @param {*} checkedKeys | ||
328 | * @author: renchao | ||
329 | */ | ||
227 | _setCheckedKeys(key, leafOnly = false, checkedKeys) { | 330 | _setCheckedKeys(key, leafOnly = false, checkedKeys) { |
228 | const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level); | 331 | const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level); |
229 | const cache = Object.create(null); | 332 | const cache = Object.create(null); |
... | @@ -268,6 +371,12 @@ export default class TreeStore { | ... | @@ -268,6 +371,12 @@ export default class TreeStore { |
268 | } | 371 | } |
269 | } | 372 | } |
270 | 373 | ||
374 | /** | ||
375 | * @description: setCheckedNodes | ||
376 | * @param {*} array | ||
377 | * @param {*} leafOnly | ||
378 | * @author: renchao | ||
379 | */ | ||
271 | setCheckedNodes(array, leafOnly = false) { | 380 | setCheckedNodes(array, leafOnly = false) { |
272 | const key = this.key; | 381 | const key = this.key; |
273 | const checkedKeys = {}; | 382 | const checkedKeys = {}; |
... | @@ -278,6 +387,12 @@ export default class TreeStore { | ... | @@ -278,6 +387,12 @@ export default class TreeStore { |
278 | this._setCheckedKeys(key, leafOnly, checkedKeys); | 387 | this._setCheckedKeys(key, leafOnly, checkedKeys); |
279 | } | 388 | } |
280 | 389 | ||
390 | /** | ||
391 | * @description: setCheckedKeys | ||
392 | * @param {*} array | ||
393 | * @param {*} leafOnly | ||
394 | * @author: renchao | ||
395 | */ | ||
281 | setCheckedKeys(keys, leafOnly = false) { | 396 | setCheckedKeys(keys, leafOnly = false) { |
282 | this.defaultCheckedKeys = keys; | 397 | this.defaultCheckedKeys = keys; |
283 | const key = this.key; | 398 | const key = this.key; |
... | @@ -289,6 +404,11 @@ export default class TreeStore { | ... | @@ -289,6 +404,11 @@ export default class TreeStore { |
289 | this._setCheckedKeys(key, leafOnly, checkedKeys); | 404 | this._setCheckedKeys(key, leafOnly, checkedKeys); |
290 | } | 405 | } |
291 | 406 | ||
407 | /** | ||
408 | * @description: setDefaultExpandedKeys | ||
409 | * @param {*} keys | ||
410 | * @author: renchao | ||
411 | */ | ||
292 | setDefaultExpandedKeys(keys) { | 412 | setDefaultExpandedKeys(keys) { |
293 | keys = keys || []; | 413 | keys = keys || []; |
294 | this.defaultExpandedKeys = keys; | 414 | this.defaultExpandedKeys = keys; |
... | @@ -299,6 +419,13 @@ export default class TreeStore { | ... | @@ -299,6 +419,13 @@ export default class TreeStore { |
299 | }); | 419 | }); |
300 | } | 420 | } |
301 | 421 | ||
422 | /** | ||
423 | * @description: setChecked | ||
424 | * @param {*} data | ||
425 | * @param {*} checked | ||
426 | * @param {*} deep | ||
427 | * @author: renchao | ||
428 | */ | ||
302 | setChecked(data, checked, deep) { | 429 | setChecked(data, checked, deep) { |
303 | const node = this.getNode(data); | 430 | const node = this.getNode(data); |
304 | 431 | ||
... | @@ -307,10 +434,19 @@ export default class TreeStore { | ... | @@ -307,10 +434,19 @@ export default class TreeStore { |
307 | } | 434 | } |
308 | } | 435 | } |
309 | 436 | ||
437 | /** | ||
438 | * @description: getCurrentNode | ||
439 | * @author: renchao | ||
440 | */ | ||
310 | getCurrentNode() { | 441 | getCurrentNode() { |
311 | return this.currentNode; | 442 | return this.currentNode; |
312 | } | 443 | } |
313 | 444 | ||
445 | /** | ||
446 | * @description: setCurrentNode | ||
447 | * @param {*} currentNode | ||
448 | * @author: renchao | ||
449 | */ | ||
314 | setCurrentNode(currentNode) { | 450 | setCurrentNode(currentNode) { |
315 | const prevCurrentNode = this.currentNode; | 451 | const prevCurrentNode = this.currentNode; |
316 | if (prevCurrentNode) { | 452 | if (prevCurrentNode) { |
... | @@ -320,12 +456,22 @@ export default class TreeStore { | ... | @@ -320,12 +456,22 @@ export default class TreeStore { |
320 | this.currentNode.isCurrent = true; | 456 | this.currentNode.isCurrent = true; |
321 | } | 457 | } |
322 | 458 | ||
459 | /** | ||
460 | * @description: setUserCurrentNode | ||
461 | * @param {*} node | ||
462 | * @author: renchao | ||
463 | */ | ||
323 | setUserCurrentNode(node) { | 464 | setUserCurrentNode(node) { |
324 | const key = node[this.key]; | 465 | const key = node[this.key]; |
325 | const currNode = this.nodesMap[key]; | 466 | const currNode = this.nodesMap[key]; |
326 | this.setCurrentNode(currNode); | 467 | this.setCurrentNode(currNode); |
327 | } | 468 | } |
328 | 469 | ||
470 | /** | ||
471 | * @description: setCurrentNodeKey | ||
472 | * @param {*} key | ||
473 | * @author: renchao | ||
474 | */ | ||
329 | setCurrentNodeKey(key) { | 475 | setCurrentNodeKey(key) { |
330 | if (key === null || key === undefined) { | 476 | if (key === null || key === undefined) { |
331 | this.currentNode && (this.currentNode.isCurrent = false); | 477 | this.currentNode && (this.currentNode.isCurrent = false); | ... | ... |
1 | export const NODE_KEY = '$treeNodeId'; | 1 | export const NODE_KEY = '$treeNodeId'; |
2 | 2 | ||
3 | /** | ||
4 | * @description: markNodeData | ||
5 | * @param {*} node | ||
6 | * @param {*} data | ||
7 | * @author: renchao | ||
8 | */ | ||
3 | export const markNodeData = function(node, data) { | 9 | export const markNodeData = function(node, data) { |
4 | if (!data || data[NODE_KEY]) return; | 10 | if (!data || data[NODE_KEY]) return; |
5 | Object.defineProperty(data, NODE_KEY, { | 11 | Object.defineProperty(data, NODE_KEY, { |
... | @@ -10,11 +16,23 @@ export const markNodeData = function(node, data) { | ... | @@ -10,11 +16,23 @@ export const markNodeData = function(node, data) { |
10 | }); | 16 | }); |
11 | }; | 17 | }; |
12 | 18 | ||
19 | /** | ||
20 | * @description: getNodeKey | ||
21 | * @param {*} key | ||
22 | * @param {*} data | ||
23 | * @author: renchao | ||
24 | */ | ||
13 | export const getNodeKey = function(key, data) { | 25 | export const getNodeKey = function(key, data) { |
14 | if (!key) return data[NODE_KEY]; | 26 | if (!key) return data[NODE_KEY]; |
15 | return data[key]; | 27 | return data[key]; |
16 | }; | 28 | }; |
17 | 29 | ||
30 | /** | ||
31 | * @description: findNearestComponent | ||
32 | * @param {*} element | ||
33 | * @param {*} componentName | ||
34 | * @author: renchao | ||
35 | */ | ||
18 | export const findNearestComponent = (element, componentName) => { | 36 | export const findNearestComponent = (element, componentName) => { |
19 | let target = element; | 37 | let target = element; |
20 | while (target && target.tagName !== 'BODY') { | 38 | while (target && target.tagName !== 'BODY') { | ... | ... |
... | @@ -116,10 +116,21 @@ export default { | ... | @@ -116,10 +116,21 @@ export default { |
116 | }, | 116 | }, |
117 | 117 | ||
118 | methods: { | 118 | methods: { |
119 | /** | ||
120 | * @description: getNodeKey | ||
121 | * @param {*} node | ||
122 | * @author: renchao | ||
123 | */ | ||
119 | getNodeKey (node) { | 124 | getNodeKey (node) { |
120 | return getNodeKey(this.tree.nodeKey, node.data); | 125 | return getNodeKey(this.tree.nodeKey, node.data); |
121 | }, | 126 | }, |
122 | 127 | ||
128 | /** | ||
129 | * @description: handleSelectChange | ||
130 | * @param {*} checked | ||
131 | * @param {*} indeterminate | ||
132 | * @author: renchao | ||
133 | */ | ||
123 | handleSelectChange (checked, indeterminate) { | 134 | handleSelectChange (checked, indeterminate) { |
124 | if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) { | 135 | if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) { |
125 | this.tree.$emit('check-change', this.node.data, checked, indeterminate); | 136 | this.tree.$emit('check-change', this.node.data, checked, indeterminate); |
... | @@ -128,6 +139,10 @@ export default { | ... | @@ -128,6 +139,10 @@ export default { |
128 | this.indeterminate = indeterminate; | 139 | this.indeterminate = indeterminate; |
129 | }, | 140 | }, |
130 | 141 | ||
142 | /** | ||
143 | * @description: handleClick | ||
144 | * @author: renchao | ||
145 | */ | ||
131 | handleClick () { | 146 | handleClick () { |
132 | const store = this.tree.store; | 147 | const store = this.tree.store; |
133 | store.setCurrentNode(this.node); | 148 | store.setCurrentNode(this.node); |
... | @@ -144,6 +159,11 @@ export default { | ... | @@ -144,6 +159,11 @@ export default { |
144 | this.tree.$emit('node-click', this.node.data, this.node, this); | 159 | this.tree.$emit('node-click', this.node.data, this.node, this); |
145 | }, | 160 | }, |
146 | 161 | ||
162 | /** | ||
163 | * @description: handleContextMenu | ||
164 | * @param {*} event | ||
165 | * @author: renchao | ||
166 | */ | ||
147 | handleContextMenu (event) { | 167 | handleContextMenu (event) { |
148 | if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) { | 168 | if (this.tree._events['node-contextmenu'] && this.tree._events['node-contextmenu'].length > 0) { |
149 | event.stopPropagation(); | 169 | event.stopPropagation(); |
... | @@ -152,6 +172,10 @@ export default { | ... | @@ -152,6 +172,10 @@ export default { |
152 | this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this); | 172 | this.tree.$emit('node-contextmenu', event, this.node.data, this.node, this); |
153 | }, | 173 | }, |
154 | 174 | ||
175 | /** | ||
176 | * @description: handleExpandIconClick | ||
177 | * @author: renchao | ||
178 | */ | ||
155 | handleExpandIconClick () { | 179 | handleExpandIconClick () { |
156 | if (this.node.isLeaf) return; | 180 | if (this.node.isLeaf) return; |
157 | if (this.expanded) { | 181 | if (this.expanded) { |
... | @@ -163,6 +187,12 @@ export default { | ... | @@ -163,6 +187,12 @@ export default { |
163 | } | 187 | } |
164 | }, | 188 | }, |
165 | 189 | ||
190 | /** | ||
191 | * @description: handleCheckChange | ||
192 | * @param {*} value | ||
193 | * @param {*} ev | ||
194 | * @author: renchao | ||
195 | */ | ||
166 | handleCheckChange (value, ev) { | 196 | handleCheckChange (value, ev) { |
167 | this.node.setChecked(ev.target.checked, !this.tree.checkStrictly); | 197 | this.node.setChecked(ev.target.checked, !this.tree.checkStrictly); |
168 | this.$nextTick(() => { | 198 | this.$nextTick(() => { |
... | @@ -176,26 +206,53 @@ export default { | ... | @@ -176,26 +206,53 @@ export default { |
176 | }); | 206 | }); |
177 | }, | 207 | }, |
178 | 208 | ||
209 | /** | ||
210 | * @description: handleChildNodeExpand | ||
211 | * @param {*} nodeData | ||
212 | * @param {*} node | ||
213 | * @param {*} instance | ||
214 | * @author: renchao | ||
215 | */ | ||
179 | handleChildNodeExpand (nodeData, node, instance) { | 216 | handleChildNodeExpand (nodeData, node, instance) { |
180 | this.broadcast('ElTreeNode', 'tree-node-expand', node); | 217 | this.broadcast('ElTreeNode', 'tree-node-expand', node); |
181 | this.tree.$emit('node-expand', nodeData, node, instance); | 218 | this.tree.$emit('node-expand', nodeData, node, instance); |
182 | }, | 219 | }, |
183 | 220 | ||
221 | /** | ||
222 | * @description: handleDragStart | ||
223 | * @param {*} event | ||
224 | * @author: renchao | ||
225 | */ | ||
184 | handleDragStart (event) { | 226 | handleDragStart (event) { |
185 | if (!this.tree.draggable) return; | 227 | if (!this.tree.draggable) return; |
186 | this.tree.$emit('tree-node-drag-start', event, this); | 228 | this.tree.$emit('tree-node-drag-start', event, this); |
187 | }, | 229 | }, |
188 | 230 | ||
231 | /** | ||
232 | * @description: handleDragOver | ||
233 | * @param {*} event | ||
234 | * @author: renchao | ||
235 | */ | ||
189 | handleDragOver (event) { | 236 | handleDragOver (event) { |
190 | if (!this.tree.draggable) return; | 237 | if (!this.tree.draggable) return; |
191 | this.tree.$emit('tree-node-drag-over', event, this); | 238 | this.tree.$emit('tree-node-drag-over', event, this); |
192 | event.preventDefault(); | 239 | event.preventDefault(); |
193 | }, | 240 | }, |
194 | 241 | ||
242 | /** | ||
243 | * @description: handleDrop | ||
244 | * @param {*} event | ||
245 | * @author: renchao | ||
246 | */ | ||
195 | handleDrop (event) { | 247 | handleDrop (event) { |
196 | event.preventDefault(); | 248 | event.preventDefault(); |
197 | }, | 249 | }, |
198 | 250 | ||
251 | /** | ||
252 | * @description: handleDragEnd | ||
253 | * @param {*} event | ||
254 | * @author: renchao | ||
255 | */ | ||
199 | handleDragEnd (event) { | 256 | handleDragEnd (event) { |
200 | if (!this.tree.draggable) return; | 257 | if (!this.tree.draggable) return; |
201 | this.tree.$emit('tree-node-drag-end', event, this); | 258 | this.tree.$emit('tree-node-drag-end', event, this); | ... | ... |
... | @@ -177,15 +177,30 @@ | ... | @@ -177,15 +177,30 @@ |
177 | }, | 177 | }, |
178 | 178 | ||
179 | methods: { | 179 | methods: { |
180 | /** | ||
181 | * @description: filter | ||
182 | * @param {*} value | ||
183 | * @author: renchao | ||
184 | */ | ||
180 | filter(value) { | 185 | filter(value) { |
181 | if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter'); | 186 | if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter'); |
182 | this.store.filter(value); | 187 | this.store.filter(value); |
183 | }, | 188 | }, |
184 | 189 | ||
190 | /** | ||
191 | * @description: getNodeKey | ||
192 | * @param {*} node | ||
193 | * @author: renchao | ||
194 | */ | ||
185 | getNodeKey(node) { | 195 | getNodeKey(node) { |
186 | return getNodeKey(this.nodeKey, node.data); | 196 | return getNodeKey(this.nodeKey, node.data); |
187 | }, | 197 | }, |
188 | 198 | ||
199 | /** | ||
200 | * @description: getNodePath | ||
201 | * @param {*} data | ||
202 | * @author: renchao | ||
203 | */ | ||
189 | getNodePath(data) { | 204 | getNodePath(data) { |
190 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath'); | 205 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getNodePath'); |
191 | const node = this.store.getNode(data); | 206 | const node = this.store.getNode(data); |
... | @@ -199,87 +214,188 @@ | ... | @@ -199,87 +214,188 @@ |
199 | return path.reverse(); | 214 | return path.reverse(); |
200 | }, | 215 | }, |
201 | 216 | ||
217 | /** | ||
218 | * @description: getCheckedNodes | ||
219 | * @param {*} leafOnly | ||
220 | * @param {*} includeHalfChecked | ||
221 | * @author: renchao | ||
222 | */ | ||
202 | getCheckedNodes(leafOnly, includeHalfChecked) { | 223 | getCheckedNodes(leafOnly, includeHalfChecked) { |
203 | return this.store.getCheckedNodes(leafOnly, includeHalfChecked); | 224 | return this.store.getCheckedNodes(leafOnly, includeHalfChecked); |
204 | }, | 225 | }, |
205 | 226 | ||
227 | /** | ||
228 | * @description: getCheckedKeys | ||
229 | * @param {*} leafOnly | ||
230 | * @author: renchao | ||
231 | */ | ||
206 | getCheckedKeys(leafOnly) { | 232 | getCheckedKeys(leafOnly) { |
207 | return this.store.getCheckedKeys(leafOnly); | 233 | return this.store.getCheckedKeys(leafOnly); |
208 | }, | 234 | }, |
209 | 235 | ||
236 | /** | ||
237 | * @description: getCurrentNode | ||
238 | * @author: renchao | ||
239 | */ | ||
210 | getCurrentNode() { | 240 | getCurrentNode() { |
211 | const currentNode = this.store.getCurrentNode(); | 241 | const currentNode = this.store.getCurrentNode(); |
212 | return currentNode ? currentNode.data : null; | 242 | return currentNode ? currentNode.data : null; |
213 | }, | 243 | }, |
214 | 244 | ||
245 | /** | ||
246 | * @description: getCurrentKey | ||
247 | * @author: renchao | ||
248 | */ | ||
215 | getCurrentKey() { | 249 | getCurrentKey() { |
216 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey'); | 250 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in getCurrentKey'); |
217 | const currentNode = this.getCurrentNode(); | 251 | const currentNode = this.getCurrentNode(); |
218 | return currentNode ? currentNode[this.nodeKey] : null; | 252 | return currentNode ? currentNode[this.nodeKey] : null; |
219 | }, | 253 | }, |
220 | 254 | ||
255 | /** | ||
256 | * @description: setCheckedNodes | ||
257 | * @param {*} nodes | ||
258 | * @param {*} leafOnly | ||
259 | * @author: renchao | ||
260 | */ | ||
221 | setCheckedNodes(nodes, leafOnly) { | 261 | setCheckedNodes(nodes, leafOnly) { |
222 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes'); | 262 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedNodes'); |
223 | this.store.setCheckedNodes(nodes, leafOnly); | 263 | this.store.setCheckedNodes(nodes, leafOnly); |
224 | }, | 264 | }, |
225 | 265 | ||
266 | /** | ||
267 | * @description: setCheckedKeys | ||
268 | * @param {*} keys | ||
269 | * @param {*} leafOnly | ||
270 | * @author: renchao | ||
271 | */ | ||
226 | setCheckedKeys(keys, leafOnly) { | 272 | setCheckedKeys(keys, leafOnly) { |
227 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys'); | 273 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys'); |
228 | this.store.setCheckedKeys(keys, leafOnly); | 274 | this.store.setCheckedKeys(keys, leafOnly); |
229 | }, | 275 | }, |
230 | 276 | ||
277 | /** | ||
278 | * @description: setChecked | ||
279 | * @param {*} data | ||
280 | * @param {*} checked | ||
281 | * @param {*} deep | ||
282 | * @author: renchao | ||
283 | */ | ||
231 | setChecked(data, checked, deep) { | 284 | setChecked(data, checked, deep) { |
232 | this.store.setChecked(data, checked, deep); | 285 | this.store.setChecked(data, checked, deep); |
233 | }, | 286 | }, |
234 | 287 | ||
288 | /** | ||
289 | * @description: getHalfCheckedNodes | ||
290 | * @author: renchao | ||
291 | */ | ||
235 | getHalfCheckedNodes() { | 292 | getHalfCheckedNodes() { |
236 | return this.store.getHalfCheckedNodes(); | 293 | return this.store.getHalfCheckedNodes(); |
237 | }, | 294 | }, |
238 | 295 | ||
296 | /** | ||
297 | * @description: getHalfCheckedKeys | ||
298 | * @author: renchao | ||
299 | */ | ||
239 | getHalfCheckedKeys() { | 300 | getHalfCheckedKeys() { |
240 | return this.store.getHalfCheckedKeys(); | 301 | return this.store.getHalfCheckedKeys(); |
241 | }, | 302 | }, |
242 | 303 | ||
304 | /** | ||
305 | * @description: setCurrentNode | ||
306 | * @param {*} node | ||
307 | * @author: renchao | ||
308 | */ | ||
243 | setCurrentNode(node) { | 309 | setCurrentNode(node) { |
244 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode'); | 310 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode'); |
245 | this.store.setUserCurrentNode(node); | 311 | this.store.setUserCurrentNode(node); |
246 | }, | 312 | }, |
247 | 313 | ||
314 | /** | ||
315 | * @description: setCurrentKey | ||
316 | * @param {*} key | ||
317 | * @author: renchao | ||
318 | */ | ||
248 | setCurrentKey(key) { | 319 | setCurrentKey(key) { |
249 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey'); | 320 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey'); |
250 | this.store.setCurrentNodeKey(key); | 321 | this.store.setCurrentNodeKey(key); |
251 | }, | 322 | }, |
252 | 323 | ||
324 | /** | ||
325 | * @description: getNode | ||
326 | * @param {*} data | ||
327 | * @author: renchao | ||
328 | */ | ||
253 | getNode(data) { | 329 | getNode(data) { |
254 | return this.store.getNode(data); | 330 | return this.store.getNode(data); |
255 | }, | 331 | }, |
256 | 332 | ||
333 | /** | ||
334 | * @description: remove | ||
335 | * @param {*} data | ||
336 | * @author: renchao | ||
337 | */ | ||
257 | remove(data) { | 338 | remove(data) { |
258 | this.store.remove(data); | 339 | this.store.remove(data); |
259 | }, | 340 | }, |
260 | 341 | ||
342 | /** | ||
343 | * @description: append | ||
344 | * @param {*} data | ||
345 | * @param {*} parentNode | ||
346 | * @author: renchao | ||
347 | */ | ||
261 | append(data, parentNode) { | 348 | append(data, parentNode) { |
262 | this.store.append(data, parentNode); | 349 | this.store.append(data, parentNode); |
263 | }, | 350 | }, |
264 | 351 | ||
352 | /** | ||
353 | * @description: insertBefore | ||
354 | * @param {*} data | ||
355 | * @param {*} refNode | ||
356 | * @author: renchao | ||
357 | */ | ||
265 | insertBefore(data, refNode) { | 358 | insertBefore(data, refNode) { |
266 | this.store.insertBefore(data, refNode); | 359 | this.store.insertBefore(data, refNode); |
267 | }, | 360 | }, |
268 | 361 | ||
362 | /** | ||
363 | * @description: insertAfter | ||
364 | * @param {*} data | ||
365 | * @param {*} refNode | ||
366 | * @author: renchao | ||
367 | */ | ||
269 | insertAfter(data, refNode) { | 368 | insertAfter(data, refNode) { |
270 | this.store.insertAfter(data, refNode); | 369 | this.store.insertAfter(data, refNode); |
271 | }, | 370 | }, |
272 | 371 | ||
372 | /** | ||
373 | * @description: handleNodeExpand | ||
374 | * @param {*} nodeData | ||
375 | * @param {*} node | ||
376 | * @param {*} instance | ||
377 | * @author: renchao | ||
378 | */ | ||
273 | handleNodeExpand(nodeData, node, instance) { | 379 | handleNodeExpand(nodeData, node, instance) { |
274 | this.broadcast('ElTreeNode', 'tree-node-expand', node); | 380 | this.broadcast('ElTreeNode', 'tree-node-expand', node); |
275 | this.$emit('node-expand', nodeData, node, instance); | 381 | this.$emit('node-expand', nodeData, node, instance); |
276 | }, | 382 | }, |
277 | 383 | ||
384 | /** | ||
385 | * @description: updateKeyChildren | ||
386 | * @param {*} key | ||
387 | * @param {*} data | ||
388 | * @author: renchao | ||
389 | */ | ||
278 | updateKeyChildren(key, data) { | 390 | updateKeyChildren(key, data) { |
279 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild'); | 391 | if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild'); |
280 | this.store.updateChildren(key, data); | 392 | this.store.updateChildren(key, data); |
281 | }, | 393 | }, |
282 | 394 | ||
395 | /** | ||
396 | * @description: initTabIndex | ||
397 | * @author: renchao | ||
398 | */ | ||
283 | initTabIndex() { | 399 | initTabIndex() { |
284 | this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]'); | 400 | this.treeItems = this.$el.querySelectorAll('.is-focusable[role=treeitem]'); |
285 | this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]'); | 401 | this.checkboxItems = this.$el.querySelectorAll('input[type=checkbox]'); |
... | @@ -291,6 +407,11 @@ | ... | @@ -291,6 +407,11 @@ |
291 | this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0); | 407 | this.treeItems[0] && this.treeItems[0].setAttribute('tabindex', 0); |
292 | }, | 408 | }, |
293 | 409 | ||
410 | /** | ||
411 | * @description: handleKeydown | ||
412 | * @param {*} ev | ||
413 | * @author: renchao | ||
414 | */ | ||
294 | handleKeydown(ev) { | 415 | handleKeydown(ev) { |
295 | const currentItem = ev.target; | 416 | const currentItem = ev.target; |
296 | if (currentItem.className.indexOf('el-tree-node') === -1) return; | 417 | if (currentItem.className.indexOf('el-tree-node') === -1) return; |
... | @@ -319,6 +440,10 @@ | ... | @@ -319,6 +440,10 @@ |
319 | } | 440 | } |
320 | }, | 441 | }, |
321 | 442 | ||
443 | /** | ||
444 | * @description: created | ||
445 | * @author: renchao | ||
446 | */ | ||
322 | created() { | 447 | created() { |
323 | this.isTree = true; | 448 | this.isTree = true; |
324 | 449 | ... | ... |
src/components/formMenu/qlr.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/components/formMenu/qlxz.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/components/lineTree/lineItem.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
src/components/lineTree/lineTree.vue
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/components/ywPopup/index.js
0 → 100644
This diff is collapsed.
Click to expand it.
src/components/ywPopup/index.vue
0 → 100644
This diff is collapsed.
Click to expand it.
src/components/ywPopup/redeme.md
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/components/ywdialog.vue
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/registerBook/comparison.vue
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
src/views/workflow/components/batchDel.vue
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
-
Please register or sign in to post a comment