88b53ae9 by yuanbo

增加注释

1 parent 8b931f4d
...@@ -14,6 +14,10 @@ export default { ...@@ -14,6 +14,10 @@ export default {
14 } 14 }
15 }, 15 },
16 methods: { 16 methods: {
17 /**
18 * @description: nextTo
19 * @author: renchao
20 */
17 nextTo () { 21 nextTo () {
18 this.$router.push({ 22 this.$router.push({
19 path: this.redirect || '/', 23 path: this.redirect || '/',
......
...@@ -49,6 +49,10 @@ export default { ...@@ -49,6 +49,10 @@ export default {
49 this.dealCheckedItem(); 49 this.dealCheckedItem();
50 }, 50 },
51 methods: { 51 methods: {
52 /**
53 * @description: submitForm
54 * @author: renchao
55 */
52 submitForm () { 56 submitForm () {
53 var checkedNodes = this.$refs.tree.getCheckedNodes(); 57 var checkedNodes = this.$refs.tree.getCheckedNodes();
54 if (checkedNodes.length > 6) { 58 if (checkedNodes.length > 6) {
...@@ -65,6 +69,10 @@ export default { ...@@ -65,6 +69,10 @@ export default {
65 } 69 }
66 }) 70 })
67 }, 71 },
72 /**
73 * @description: queryClick
74 * @author: renchao
75 */
68 queryClick () { 76 queryClick () {
69 let that = this 77 let that = this
70 getMenuInfo().then(res => { 78 getMenuInfo().then(res => {
...@@ -79,13 +87,28 @@ export default { ...@@ -79,13 +87,28 @@ export default {
79 } 87 }
80 this.defaultCheckeds = lookForAllId() 88 this.defaultCheckeds = lookForAllId()
81 }, 89 },
90 /**
91 * @description: dealCheckedItem
92 * @author: renchao
93 */
82 dealCheckedItem () { 94 dealCheckedItem () {
83 }, 95 },
84 //关闭窗口 96 //关闭窗口
97 /**
98 * @description: 关闭窗口
99 * @author: renchao
100 */
85 closeDialog () { 101 closeDialog () {
86 this.$emit("input", false); 102 this.$emit("input", false);
87 }, 103 },
88 //节点选择状态发生改变时 104 //节点选择状态发生改变时
105 /**
106 * @description: 节点选择状态发生改变时
107 * @param {*} data
108 * @param {*} checked
109 * @param {*} node
110 * @author: renchao
111 */
89 handleClick (data, checked, node) { 112 handleClick (data, checked, node) {
90 var checkedNodes = this.$refs.tree.getCheckedNodes(); 113 var checkedNodes = this.$refs.tree.getCheckedNodes();
91 if (checkedNodes.length > 6) { 114 if (checkedNodes.length > 6) {
...@@ -105,4 +128,4 @@ export default { ...@@ -105,4 +128,4 @@ export default {
105 display: flex; 128 display: flex;
106 flex-wrap: wrap; 129 flex-wrap: wrap;
107 } 130 }
108 </style>
...\ No newline at end of file ...\ No newline at end of file
131 </style>
......
...@@ -193,15 +193,29 @@ ...@@ -193,15 +193,29 @@
193 this.queryProjectList();//获取常办项目列表 193 this.queryProjectList();//获取常办项目列表
194 }, 194 },
195 methods: { 195 methods: {
196 /**
197 * @description: handleProject
198 * @param {*} item
199 * @author: renchao
200 */
196 handleProject (item) { 201 handleProject (item) {
197 let url = item.uri.split('/').slice(0, 3).join('/') 202 let url = item.uri.split('/').slice(0, 3).join('/')
198 this.$router.push(url) 203 this.$router.push(url)
199 }, 204 },
205 /**
206 * @description: handleView
207 * @param {*} pdfUrl
208 * @author: renchao
209 */
200 handleView (pdfUrl) { 210 handleView (pdfUrl) {
201 const href = pdfUrl 211 const href = pdfUrl
202 window.open(href, '_blank'); 212 window.open(href, '_blank');
203 }, 213 },
204 //获取待办事项列表 214 //获取待办事项列表
215 /**
216 * @description: 获取待办事项列表
217 * @author: renchao
218 */
205 queryTodoList () { 219 queryTodoList () {
206 getHomeTodoList().then(res => { 220 getHomeTodoList().then(res => {
207 if (res.result) { 221 if (res.result) {
...@@ -210,6 +224,10 @@ ...@@ -210,6 +224,10 @@
210 }) 224 })
211 }, 225 },
212 //获取已办事项列表 226 //获取已办事项列表
227 /**
228 * @description: 获取已办事项列表
229 * @author: renchao
230 */
213 queryDoneList () { 231 queryDoneList () {
214 getHomeDoneList().then(res => { 232 getHomeDoneList().then(res => {
215 if (res.result) { 233 if (res.result) {
...@@ -218,6 +236,10 @@ ...@@ -218,6 +236,10 @@
218 }) 236 })
219 }, 237 },
220 //获取通知列表 238 //获取通知列表
239 /**
240 * @description: 获取通知列表
241 * @author: renchao
242 */
221 queryNoticeList () { 243 queryNoticeList () {
222 getHomeNoticeList().then(res => { 244 getHomeNoticeList().then(res => {
223 if (res.result) { 245 if (res.result) {
...@@ -230,6 +252,10 @@ ...@@ -230,6 +252,10 @@
230 }) 252 })
231 }, 253 },
232 //获取常办项目列表 254 //获取常办项目列表
255 /**
256 * @description: 获取常办项目列表
257 * @author: renchao
258 */
233 queryProjectList () { 259 queryProjectList () {
234 getHomeFrequentProjects().then(res => { 260 getHomeFrequentProjects().then(res => {
235 if (res.result && res.result.length > 0) { 261 if (res.result && res.result.length > 0) {
...@@ -239,6 +265,10 @@ ...@@ -239,6 +265,10 @@
239 } 265 }
240 }) 266 })
241 }, 267 },
268 /**
269 * @description: _timedate
270 * @author: renchao
271 */
242 _timedate (d) { 272 _timedate (d) {
243 var td = new Date(); 273 var td = new Date();
244 td = new Date(td.getFullYear(), td.getMonth(), td.getDate()); 274 td = new Date(td.getFullYear(), td.getMonth(), td.getDate());
...@@ -253,6 +283,10 @@ ...@@ -253,6 +283,10 @@
253 return d 283 return d
254 } 284 }
255 }, 285 },
286 /**
287 * @description: buildChart
288 * @author: renchao
289 */
256 buildChart () { 290 buildChart () {
257 let height = document.getElementById("mountNodeCon").offsetHeight - 20 291 let height = document.getElementById("mountNodeCon").offsetHeight - 20
258 var chart = new G2.Chart({ 292 var chart = new G2.Chart({
...@@ -283,6 +317,10 @@ ...@@ -283,6 +317,10 @@
283 chart.line().position('year*value').size(2).shape('smooth'); 317 chart.line().position('year*value').size(2).shape('smooth');
284 chart.render(); 318 chart.render();
285 }, 319 },
320 /**
321 * @description: loginTimeChart
322 * @author: renchao
323 */
286 loginTimeChart () { 324 loginTimeChart () {
287 var data = [{ 325 var data = [{
288 item: '用户1', 326 item: '用户1',
...@@ -334,13 +372,25 @@ ...@@ -334,13 +372,25 @@
334 chart.render(); 372 chart.render();
335 }, 373 },
336 //跳转到更多通知列表页面 374 //跳转到更多通知列表页面
375 /**
376 * @description: 跳转到更多通知列表页面
377 * @author: renchao
378 */
337 jumpToMoreNotice () { 379 jumpToMoreNotice () {
338 console.log(this.$route); 380 console.log(this.$route);
339 }, 381 },
340 //配置常办项目 382 //配置常办项目
383 /**
384 * @description: 配置常办项目
385 * @author: renchao
386 */
341 setFrequencyProject () { 387 setFrequencyProject () {
342 this.projectDialog = true; 388 this.projectDialog = true;
343 }, 389 },
390 /**
391 * @description: handleNotice
392 * @author: renchao
393 */
344 handleNotice (item) { 394 handleNotice (item) {
345 setReadStatus({ bsmNotice: item.bsmNotice }).then(res => { 395 setReadStatus({ bsmNotice: item.bsmNotice }).then(res => {
346 if (res.code == 200) { 396 if (res.code == 200) {
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-19 09:50:23 4 * @LastEditTime: 2023-07-19 09:50:23
5 --> 5 -->
...@@ -113,6 +113,10 @@ ...@@ -113,6 +113,10 @@
113 }, 113 },
114 methods: { 114 methods: {
115 //表单提交 115 //表单提交
116 /**
117 * @description: 表单提交
118 * @author: renchao
119 */
116 submitForm () { 120 submitForm () {
117 let that = this; 121 let that = this;
118 that.$refs.ruleForm.validate(valid => { 122 that.$refs.ruleForm.validate(valid => {
...@@ -129,6 +133,10 @@ ...@@ -129,6 +133,10 @@
129 }); 133 });
130 }, 134 },
131 //新增接口 135 //新增接口
136 /**
137 * @description: 新增接口
138 * @author: renchao
139 */
132 addInterface () { 140 addInterface () {
133 addSysInterface(this.ruleForm).then(res => { 141 addSysInterface(this.ruleForm).then(res => {
134 if (res.code == 200) { 142 if (res.code == 200) {
...@@ -141,6 +149,10 @@ ...@@ -141,6 +149,10 @@
141 }) 149 })
142 }, 150 },
143 //编辑接口 151 //编辑接口
152 /**
153 * @description: 编辑接口
154 * @author: renchao
155 */
144 editInterface () { 156 editInterface () {
145 editSysInterface(this.ruleForm).then(res => { 157 editSysInterface(this.ruleForm).then(res => {
146 if (res.code == 200) { 158 if (res.code == 200) {
...@@ -153,10 +165,19 @@ ...@@ -153,10 +165,19 @@
153 }) 165 })
154 }, 166 },
155 //获取详情 167 //获取详情
168 /**
169 * @description: 获取详情
170 * @param {*} item
171 * @author: renchao
172 */
156 getDetailInfo (item) { 173 getDetailInfo (item) {
157 this.ruleForm = item 174 this.ruleForm = item
158 }, 175 },
159 //关闭弹窗 176 //关闭弹窗
177 /**
178 * @description: 关闭弹窗
179 * @author: renchao
180 */
160 closeDialog () { 181 closeDialog () {
161 this.$emit("input", false); 182 this.$emit("input", false);
162 this.ruleForm = { 183 this.ruleForm = {
......
...@@ -72,6 +72,10 @@ export default { ...@@ -72,6 +72,10 @@ export default {
72 }, 72 },
73 methods: { 73 methods: {
74 //表单提交 74 //表单提交
75 /**
76 * @description: 表单提交
77 * @author: renchao
78 */
75 submitForm () { 79 submitForm () {
76 console.log(this.interfaceParams); 80 console.log(this.interfaceParams);
77 console.log(this.hasJsonFlag); 81 console.log(this.hasJsonFlag);
...@@ -89,10 +93,19 @@ export default { ...@@ -89,10 +93,19 @@ export default {
89 }) 93 })
90 }, 94 },
91 //获取详情 95 //获取详情
96 /**
97 * @description: 获取详情
98 * @param {*} item
99 * @author: renchao
100 */
92 getDetailInfo(item){ 101 getDetailInfo(item){
93 this.ruleForm = item 102 this.ruleForm = item
94 }, 103 },
95 //关闭弹窗 104 //关闭弹窗
105 /**
106 * @description: 关闭弹窗
107 * @author: renchao
108 */
96 closeDialog () { 109 closeDialog () {
97 this.$emit("input", false); 110 this.$emit("input", false);
98 this.interfaceParams = {} 111 this.interfaceParams = {}
...@@ -100,6 +113,11 @@ export default { ...@@ -100,6 +113,11 @@ export default {
100 this.hasJsonFlag = true 113 this.hasJsonFlag = true
101 }, 114 },
102 //获取接口类型 115 //获取接口类型
116 /**
117 * @description: 获取接口类型
118 * @param {*} code
119 * @author: renchao
120 */
103 getInterfaceType(code){ 121 getInterfaceType(code){
104 let name = '' 122 let name = ''
105 for (let item of this.interfaceTypes) { 123 for (let item of this.interfaceTypes) {
...@@ -110,13 +128,28 @@ export default { ...@@ -110,13 +128,28 @@ export default {
110 } 128 }
111 return name; 129 return name;
112 }, 130 },
131 /**
132 * @description: onJsonChange
133 * @param {*} value
134 * @author: renchao
135 */
113 onJsonChange(value){ 136 onJsonChange(value){
114 this.onJsonSave(); 137 this.onJsonSave();
115 }, 138 },
139 /**
140 * @description: onJsonSave
141 * @param {*} value
142 * @author: renchao
143 */
116 onJsonSave (value) { 144 onJsonSave (value) {
117 this.interfaceParams = value 145 this.interfaceParams = value
118 this.hasJsonFlag = true 146 this.hasJsonFlag = true
119 }, 147 },
148 /**
149 * @description: onError
150 * @param {*} value
151 * @author: renchao
152 */
120 onError(value) { 153 onError(value) {
121 this.hasJsonFlag = false 154 this.hasJsonFlag = false
122 }, 155 },
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-07-19 09:50:36 4 * @LastEditTime: 2023-07-19 09:50:36
5 --> 5 -->
...@@ -78,6 +78,10 @@ ...@@ -78,6 +78,10 @@
78 }; 78 };
79 }, 79 },
80 methods: { 80 methods: {
81 /**
82 * @description: queryClick
83 * @author: renchao
84 */
81 queryClick () { 85 queryClick () {
82 this.$startLoading() 86 this.$startLoading()
83 getSysInterfaceList({ ...this.ruleForm, ...this.pageData }, { 'target': '#ptjkLoading' }).then(res => { 87 getSysInterfaceList({ ...this.ruleForm, ...this.pageData }, { 'target': '#ptjkLoading' }).then(res => {
...@@ -90,17 +94,31 @@ ...@@ -90,17 +94,31 @@
90 }) 94 })
91 }, 95 },
92 //打开新增 96 //打开新增
97 /**
98 * @description: 打开新增
99 * @author: renchao
100 */
93 openDialog () { 101 openDialog () {
94 this.editFlag = false; 102 this.editFlag = false;
95 this.addDialog = true; 103 this.addDialog = true;
96 }, 104 },
97 //打开编辑 105 //打开编辑
106 /**
107 * @description: 打开编辑
108 * @param {*} item
109 * @author: renchao
110 */
98 editInterface (item) { 111 editInterface (item) {
99 this.editFlag = true; 112 this.editFlag = true;
100 this.addDialog = true; 113 this.addDialog = true;
101 this.$refs.addDialog.getDetailInfo(item); 114 this.$refs.addDialog.getDetailInfo(item);
102 }, 115 },
103 //打开调试窗口 116 //打开调试窗口
117 /**
118 * @description: 打开调试窗口
119 * @param {*} item
120 * @author: renchao
121 */
104 tuneInterface (item) { 122 tuneInterface (item) {
105 this.retrieveDialog = true; 123 this.retrieveDialog = true;
106 this.$refs.retrieveDialog.getDetailInfo(item); 124 this.$refs.retrieveDialog.getDetailInfo(item);
......