5a08c379 by yuanbo

增加注释

1 parent 4481a1bf
...@@ -297,10 +297,19 @@ ...@@ -297,10 +297,19 @@
297 }, 297 },
298 methods: { 298 methods: {
299 // 关闭弹框事件 299 // 关闭弹框事件
300 /**
301 * @description: 关闭弹框事件
302 * @author: renchao
303 */
300 closeDialog () { 304 closeDialog () {
301 this.dialogVisible = false; 305 this.dialogVisible = false;
302 }, 306 },
303 // 展示弹框 307 // 展示弹框
308 /**
309 * @description: 展示弹框
310 * @param {*} item
311 * @author: renchao
312 */
304 isShow (item) { 313 isShow (item) {
305 this.title = '登薄日志(' + item.ACCESSDATE + ')' 314 this.title = '登薄日志(' + item.ACCESSDATE + ')'
306 this.titleName = 'sjmx' 315 this.titleName = 'sjmx'
...@@ -310,6 +319,7 @@ ...@@ -310,6 +319,7 @@
310 }, 319 },
311 /** 320 /**
312 * @description: 获取列表接口 321 * @description: 获取列表接口
322 * @param {*} data
313 * @author: renchao 323 * @author: renchao
314 */ 324 */
315 _getDetails (data) { 325 _getDetails (data) {
...@@ -356,6 +366,10 @@ ...@@ -356,6 +366,10 @@
356 }) 366 })
357 }, 367 },
358 // 当日登薄详单 368 // 当日登薄详单
369 /**
370 * @description: 当日登薄详单
371 * @author: renchao
372 */
359 handleDBAdd () { 373 handleDBAdd () {
360 this.tableDBData.data.push({ 374 this.tableDBData.data.push({
361 YWH: '', 375 YWH: '',
...@@ -371,6 +385,11 @@ ...@@ -371,6 +385,11 @@
371 this.$set(item, 'index', index) 385 this.$set(item, 'index', index)
372 }) 386 })
373 }, 387 },
388 /**
389 * @description: handleDBMinus
390 * @param {*} row
391 * @author: renchao
392 */
374 handleDBMinus (row) { 393 handleDBMinus (row) {
375 this.$confirm('此操作将删除列表, 是否继续?', '提示', { 394 this.$confirm('此操作将删除列表, 是否继续?', '提示', {
376 confirmButtonText: '确定', 395 confirmButtonText: '确定',
...@@ -393,6 +412,10 @@ ...@@ -393,6 +412,10 @@
393 }) 412 })
394 }, 413 },
395 // 当日上报详单 414 // 当日上报详单
415 /**
416 * @description: 当日上报详单
417 * @author: renchao
418 */
396 handleSBAdd () { 419 handleSBAdd () {
397 this.tableSBData.data.push({ 420 this.tableSBData.data.push({
398 YWH: '', 421 YWH: '',
...@@ -404,6 +427,11 @@ ...@@ -404,6 +427,11 @@
404 this.$set(item, 'index', index) 427 this.$set(item, 'index', index)
405 }) 428 })
406 }, 429 },
430 /**
431 * @description: handleSBMinus
432 * @param {*} row
433 * @author: renchao
434 */
407 handleSBMinus (row) { 435 handleSBMinus (row) {
408 this.$confirm('此操作将删除列表, 是否继续?', '提示', { 436 this.$confirm('此操作将删除列表, 是否继续?', '提示', {
409 confirmButtonText: '确定', 437 confirmButtonText: '确定',
......
...@@ -129,9 +129,18 @@ ...@@ -129,9 +129,18 @@
129 }, 129 },
130 methods: { 130 methods: {
131 //截止日期变化 131 //截止日期变化
132 /**
133 * @description: 截止日期变化
134 * @param {*} val
135 * @author: renchao
136 */
132 endTimeChange (val) { 137 endTimeChange (val) {
133 this.form.endTime = timeFormat(new Date(val), true) 138 this.form.endTime = timeFormat(new Date(val), true)
134 }, 139 },
140 /**
141 * @description: featchData
142 * @author: renchao
143 */
135 featchData () { 144 featchData () {
136 getRecordLogPage({ ...this.form }).then(res => { 145 getRecordLogPage({ ...this.form }).then(res => {
137 if (res.code === 200) { 146 if (res.code === 200) {
...@@ -143,12 +152,21 @@ ...@@ -143,12 +152,21 @@
143 }) 152 })
144 }, 153 },
145 // 重置 154 // 重置
155 /**
156 * @description: 重置
157 * @author: renchao
158 */
146 resetForm () { 159 resetForm () {
147 this.$refs.ruleForm.resetFields(); 160 this.$refs.ruleForm.resetFields();
148 this.form.currentPage = 1 161 this.form.currentPage = 1
149 this.featchData(); 162 this.featchData();
150 }, 163 },
151 // 编辑 164 // 编辑
165 /**
166 * @description: 编辑
167 * @param {*} row
168 * @author: renchao
169 */
152 handleEdit (row) { 170 handleEdit (row) {
153 this.$refs.editLog.isShow(row); 171 this.$refs.editLog.isShow(row);
154 this.$store.dispatch('business/setReportLogEdit') 172 this.$store.dispatch('business/setReportLogEdit')
......
...@@ -82,9 +82,17 @@ export default { ...@@ -82,9 +82,17 @@ export default {
82 } 82 }
83 }, 83 },
84 methods: { 84 methods: {
85 /**
86 * @description: closeDialog
87 * @author: renchao
88 */
85 closeDialog () { 89 closeDialog () {
86 this.$emit('input', false) 90 this.$emit('input', false)
87 }, 91 },
92 /**
93 * @description: handleSubmit
94 * @author: renchao
95 */
88 handleSubmit () { 96 handleSubmit () {
89 this.$emit('input', false) 97 this.$emit('input', false)
90 } 98 }
......
...@@ -202,10 +202,19 @@ ...@@ -202,10 +202,19 @@
202 }, 202 },
203 methods: { 203 methods: {
204 //截止日期变化 204 //截止日期变化
205 /**
206 * @description: 截止日期变化
207 * @param {*} val
208 * @author: renchao
209 */
205 endTimeChange (val) { 210 endTimeChange (val) {
206 this.form.exchangeEndTime = timeFormat(new Date(val), true) 211 this.form.exchangeEndTime = timeFormat(new Date(val), true)
207 }, 212 },
208 // 初始化数据 213 // 初始化数据
214 /**
215 * @description: 初始化数据
216 * @author: renchao
217 */
209 featchData () { 218 featchData () {
210 getDataReportPage({ ...this.form }).then((res) => { 219 getDataReportPage({ ...this.form }).then((res) => {
211 if (res.code === 200) { 220 if (res.code === 200) {
...@@ -217,8 +226,17 @@ ...@@ -217,8 +226,17 @@
217 }); 226 });
218 }, 227 },
219 // 上报 228 // 上报
229 /**
230 * @description: 上报
231 * @author: renchao
232 */
220 handleEscalation () { }, 233 handleEscalation () { },
221 // 详情 234 // 详情
235 /**
236 * @description: 详情
237 * @param {*} row
238 * @author: renchao
239 */
222 handleDetail (row) { 240 handleDetail (row) {
223 this.title = row.rectypeName; 241 this.title = row.rectypeName;
224 this.$refs.editLog.isShow(row); 242 this.$refs.editLog.isShow(row);
...@@ -229,6 +247,10 @@ ...@@ -229,6 +247,10 @@
229 } 247 }
230 }, 248 },
231 // 重置 249 // 重置
250 /**
251 * @description: 重置
252 * @author: renchao
253 */
232 resetForm () { 254 resetForm () {
233 this.$refs.ruleForm.resetFields(); 255 this.$refs.ruleForm.resetFields();
234 this.form.exchangeEndTime = "" 256 this.form.exchangeEndTime = ""
......
...@@ -82,9 +82,17 @@ export default { ...@@ -82,9 +82,17 @@ export default {
82 } 82 }
83 }, 83 },
84 methods: { 84 methods: {
85 /**
86 * @description: closeDialog
87 * @author: renchao
88 */
85 closeDialog () { 89 closeDialog () {
86 this.$emit('input', false) 90 this.$emit('input', false)
87 }, 91 },
92 /**
93 * @description: handleSubmit
94 * @author: renchao
95 */
88 handleSubmit () { 96 handleSubmit () {
89 this.$emit('input', false) 97 this.$emit('input', false)
90 } 98 }
......
...@@ -219,10 +219,19 @@ ...@@ -219,10 +219,19 @@
219 }, 219 },
220 methods: { 220 methods: {
221 //截止日期变化 221 //截止日期变化
222 /**
223 * @description: 截止日期变化
224 * @param {*} val
225 * @author: renchao
226 */
222 endTimeChange (val) { 227 endTimeChange (val) {
223 this.form.exchangeEndTime = timeFormat(new Date(val), true) 228 this.form.exchangeEndTime = timeFormat(new Date(val), true)
224 }, 229 },
225 // 初始化数据 230 // 初始化数据
231 /**
232 * @description: 初始化数据
233 * @author: renchao
234 */
226 featchData () { 235 featchData () {
227 getSjsbReportPage({ ...this.form, ...this.formData }).then((res) => { 236 getSjsbReportPage({ ...this.form, ...this.formData }).then((res) => {
228 if (res.code === 200) { 237 if (res.code === 200) {
...@@ -234,8 +243,17 @@ ...@@ -234,8 +243,17 @@
234 }); 243 });
235 }, 244 },
236 // 上报 245 // 上报
246 /**
247 * @description: 上报
248 * @author: renchao
249 */
237 handleEscalation () { }, 250 handleEscalation () { },
238 // 详情 251 // 详情
252 /**
253 * @description: 详情
254 * @param {*} row
255 * @author: renchao
256 */
239 handleDetail (row) { 257 handleDetail (row) {
240 this.title = row.rectypeName; 258 this.title = row.rectypeName;
241 this.$refs.editLog.isShow(row); 259 this.$refs.editLog.isShow(row);
...@@ -246,12 +264,21 @@ ...@@ -246,12 +264,21 @@
246 } 264 }
247 }, 265 },
248 // 重置 266 // 重置
267 /**
268 * @description: 重置
269 * @author: renchao
270 */
249 resetForm () { 271 resetForm () {
250 this.$refs.ruleForm.resetFields(); 272 this.$refs.ruleForm.resetFields();
251 this.form.exchangeEndTime = "" 273 this.form.exchangeEndTime = ""
252 this.form.currentPage = 1 274 this.form.currentPage = 1
253 this.featchData(); 275 this.featchData();
254 }, 276 },
277 /**
278 * @description: ywhClick
279 * @param {*} item
280 * @author: renchao
281 */
255 ywhClick (item) { 282 ywhClick (item) {
256 window.open('http://192.168.2.38/bdcdj#/workFrame?bsmSlsq=4582b05a4d49c25673eb0880b5787e58&bestepid=sl&bsmBusiness=&sqywbm=A03100', '_blank') 283 window.open('http://192.168.2.38/bdcdj#/workFrame?bsmSlsq=4582b05a4d49c25673eb0880b5787e58&bestepid=sl&bsmBusiness=&sqywbm=A03100', '_blank')
257 //判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面 284 //判断用户是否拥有该任务的权限,若有则跳转,无权限则给予提示并刷新页面
......
...@@ -92,6 +92,10 @@ ...@@ -92,6 +92,10 @@
92 }, 92 },
93 methods: { 93 methods: {
94 // 保存新增或关闭事件 94 // 保存新增或关闭事件
95 /**
96 * @description: 保存新增或关闭事件
97 * @author: renchao
98 */
95 submitForm () { 99 submitForm () {
96 this.$refs.form.validate((valid) => { 100 this.$refs.form.validate((valid) => {
97 if (valid) { 101 if (valid) {
...@@ -152,6 +156,10 @@ ...@@ -152,6 +156,10 @@
152 }) 156 })
153 }, 157 },
154 // 重置 158 // 重置
159 /**
160 * @description: 重置
161 * @author: renchao
162 */
155 resetForm () { 163 resetForm () {
156 this.dialogForm = { 164 this.dialogForm = {
157 roleName: '', 165 roleName: '',
...@@ -159,6 +167,10 @@ ...@@ -159,6 +167,10 @@
159 this.$refs.form.resetFields() 167 this.$refs.form.resetFields()
160 }, 168 },
161 // 关闭 169 // 关闭
170 /**
171 * @description: 关闭
172 * @author: renchao
173 */
162 close () { 174 close () {
163 this.resetForm() 175 this.resetForm()
164 this.$emit('input', false) 176 this.$emit('input', false)
......
...@@ -139,6 +139,10 @@ ...@@ -139,6 +139,10 @@
139 mounted () { }, 139 mounted () { },
140 methods: { 140 methods: {
141 //查询 141 //查询
142 /**
143 * @description: 查询
144 * @author: renchao
145 */
142 searchQuery () { 146 searchQuery () {
143 if (this.form.rolesName) { 147 if (this.form.rolesName) {
144 this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName); 148 this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
...@@ -146,6 +150,12 @@ ...@@ -146,6 +150,12 @@
146 this.getTableData() 150 this.getTableData()
147 } 151 }
148 }, 152 },
153 /**
154 * @description: childrenFn
155 * @param {*} arr
156 * @param {*} key
157 * @author: renchao
158 */
149 childrenFn (arr, key) { 159 childrenFn (arr, key) {
150 let searchTree = []; 160 let searchTree = [];
151 arr.forEach((item, index) => { 161 arr.forEach((item, index) => {
...@@ -159,6 +169,10 @@ ...@@ -159,6 +169,10 @@
159 } 169 }
160 }, 170 },
161 // 获取角色列表 171 // 获取角色列表
172 /**
173 * @description: 获取角色列表
174 * @author: renchao
175 */
162 getTableData () { 176 getTableData () {
163 getRolesById([1, 2]) 177 getRolesById([1, 2])
164 .then((res) => { 178 .then((res) => {
......
...@@ -136,6 +136,12 @@ ...@@ -136,6 +136,12 @@
136 methods: { 136 methods: {
137 137
138 // 人员配置点击行勾选数据 138 // 人员配置点击行勾选数据
139 /**
140 * @description: 人员配置点击行勾选数据
141 * @param {*} row
142 * @param {*} event
143 * @author: renchao
144 */
139 handleClickTableRow (row, event) { 145 handleClickTableRow (row, event) {
140 this.checkNum = 0; 146 this.checkNum = 0;
141 this.isCheck = false; 147 this.isCheck = false;
...@@ -176,6 +182,15 @@ ...@@ -176,6 +182,15 @@
176 }, 182 },
177 // 获取授权主体的菜单权限 183 // 获取授权主体的菜单权限
178 // getMenuAuthorityList 184 // getMenuAuthorityList
185 /**
186 * @description: 获取授权主体的菜单权限
187 * @param {*} operationList
188 * @param {*} id
189 * @param {*} Code
190 * @param {*} menutablelistData
191 * @param {*} operationCodes
192 * @author: renchao
193 */
179 menulist (operationList, id, Code, menutablelistData, operationCodes) { 194 menulist (operationList, id, Code, menutablelistData, operationCodes) {
180 this.selectedSubsystemCode = Code 195 this.selectedSubsystemCode = Code
181 this.menuList = menutablelistData; 196 this.menuList = menutablelistData;
...@@ -198,10 +213,12 @@ ...@@ -198,10 +213,12 @@
198 213
199 }, 214 },
200 /** 215 /**
201 * 递归渲染列表数据 216 * @description: 递归渲染列表数据
202 * list:原始数组 217 * @param {*} list 原始数组
203 * authorityList:已授权数组 218 * @param {*} authorityList 已授权数组
204 */ 219 * @param {*} operationCodes
220 * @author: renchao
221 */
205 getRecursionTreeData (list, authorityList, operationCodes) { 222 getRecursionTreeData (list, authorityList, operationCodes) {
206 ++this.menukey 223 ++this.menukey
207 this.checkArr = [] 224 this.checkArr = []
...@@ -239,6 +256,13 @@ ...@@ -239,6 +256,13 @@
239 // this.setCheckAllArr(list) 256 // this.setCheckAllArr(list)
240 }, 257 },
241 // 授权条件 258 // 授权条件
259 /**
260 * @description: 授权条件
261 * @param {*} authorityList
262 * @param {*} checkArr
263 * @param {*} item
264 * @author: renchao
265 */
242 setAuthorizedConditions (authorityList, checkArr, item) { 266 setAuthorizedConditions (authorityList, checkArr, item) {
243 if (this.roleId === '') { 267 if (this.roleId === '') {
244 checkArr.forEach(ele => { 268 checkArr.forEach(ele => {
...@@ -272,6 +296,10 @@ ...@@ -272,6 +296,10 @@
272 this.$set(item, 'checkArr', this.$deepCopy(checkArr)) 296 this.$set(item, 'checkArr', this.$deepCopy(checkArr))
273 }, 297 },
274 // 获取拼接授权信息 298 // 获取拼接授权信息
299 /**
300 * @description: 获取拼接授权信息
301 * @author: renchao
302 */
275 getAuthorizedInfo () { 303 getAuthorizedInfo () {
276 const lastArr = [] 304 const lastArr = []
277 const authorizedList = [] 305 const authorizedList = []
...@@ -306,6 +334,12 @@ ...@@ -306,6 +334,12 @@
306 } 334 }
307 }, 335 },
308 // 获取人员列表做筛选 336 // 获取人员列表做筛选
337 /**
338 * @description: 获取人员列表做筛选
339 * @param {*} a
340 * @param {*} rid
341 * @author: renchao
342 */
309 personlist (a, rid) { 343 personlist (a, rid) {
310 this.roleId = rid; 344 this.roleId = rid;
311 this.visible = true; 345 this.visible = true;
...@@ -326,10 +360,18 @@ ...@@ -326,10 +360,18 @@
326 }); 360 });
327 }, 361 },
328 // 关闭事件 362 // 关闭事件
363 /**
364 * @description: 关闭事件
365 * @author: renchao
366 */
329 close () { 367 close () {
330 this.visible = false; 368 this.visible = false;
331 }, 369 },
332 // 保存事件 370 // 保存事件
371 /**
372 * @description: 保存事件
373 * @author: renchao
374 */
333 handleSaveMember () { 375 handleSaveMember () {
334 // 人员授权 376 // 人员授权
335 const idList = this.usermultipleSelection.map((item) => { 377 const idList = this.usermultipleSelection.map((item) => {
...@@ -357,6 +399,11 @@ ...@@ -357,6 +399,11 @@
357 }) 399 })
358 }, 400 },
359 // 勾选人员事件 401 // 勾选人员事件
402 /**
403 * @description: 勾选人员事件
404 * @param {*} val
405 * @author: renchao
406 */
360 handleSelectionChange (val) { 407 handleSelectionChange (val) {
361 this.lastuserList.forEach((element, index) => { 408 this.lastuserList.forEach((element, index) => {
362 delete this.lastuserList[index].selectStatus 409 delete this.lastuserList[index].selectStatus
...@@ -371,6 +418,12 @@ ...@@ -371,6 +418,12 @@
371 }); 418 });
372 }, 419 },
373 // 数据筛选 420 // 数据筛选
421 /**
422 * @description: 数据筛选
423 * @param {*} scope
424 * @param {*} arr
425 * @author: renchao
426 */
374 setarrdata (scope, arr) { 427 setarrdata (scope, arr) {
375 428
376 arr.forEach((item, index, arr) => { 429 arr.forEach((item, index, arr) => {
...@@ -384,6 +437,13 @@ ...@@ -384,6 +437,13 @@
384 437
385 }, 438 },
386 // 勾选菜单事件 439 // 勾选菜单事件
440 /**
441 * @description: 勾选菜单事件
442 * @param {*} flag
443 * @param {*} checkId
444 * @param {*} scope
445 * @author: renchao
446 */
387 changeCheck (flag, checkId, scope) { 447 changeCheck (flag, checkId, scope) {
388 this.checklistbor = [] 448 this.checklistbor = []
389 this.setarrdata(scope, this.lastMenuList) 449 this.setarrdata(scope, this.lastMenuList)
...@@ -400,6 +460,12 @@ ...@@ -400,6 +460,12 @@
400 ) 460 )
401 this.getAuthorizedInfo() 461 this.getAuthorizedInfo()
402 }, 462 },
463 /**
464 * @description: handleClick
465 * @param {*} tab
466 * @param {*} event
467 * @author: renchao
468 */
403 handleClick (tab, event) { 469 handleClick (tab, event) {
404 this.lastuserList.forEach((item, index) => { 470 this.lastuserList.forEach((item, index) => {
405 if (item.selectStatus === 0) { 471 if (item.selectStatus === 0) {
......
...@@ -83,6 +83,10 @@ ...@@ -83,6 +83,10 @@
83 } 83 }
84 }, 84 },
85 methods: { 85 methods: {
86 /**
87 * @description: handleSubmit
88 * @author: renchao
89 */
86 handleSubmit () { 90 handleSubmit () {
87 let _this = this 91 let _this = this
88 this.$refs['ruleForm'].validate(async (valid) => { 92 this.$refs['ruleForm'].validate(async (valid) => {
...@@ -125,6 +129,10 @@ ...@@ -125,6 +129,10 @@
125 } 129 }
126 }) 130 })
127 }, 131 },
132 /**
133 * @description: handleClose
134 * @author: renchao
135 */
128 handleClose () { 136 handleClose () {
129 this.$emit("input", false); 137 this.$emit("input", false);
130 } 138 }
......
...@@ -163,6 +163,10 @@ ...@@ -163,6 +163,10 @@
163 } 163 }
164 }, 164 },
165 methods: { 165 methods: {
166 /**
167 * @description: isShow
168 * @author: renchao
169 */
166 isShow () { 170 isShow () {
167 setTimeout(() => { 171 setTimeout(() => {
168 this.ruleForm = this.ruleData 172 this.ruleForm = this.ruleData
...@@ -170,9 +174,18 @@ ...@@ -170,9 +174,18 @@
170 }, 0) 174 }, 0)
171 this.$refs.validRule.isShow() 175 this.$refs.validRule.isShow()
172 }, 176 },
177 /**
178 * @description: handleEdit
179 * @param {*} scope
180 * @author: renchao
181 */
173 handleEdit (scope) { 182 handleEdit (scope) {
174 this.$set(scope.row, '_edit', true) 183 this.$set(scope.row, '_edit', true)
175 }, 184 },
185 /**
186 * @description: handleAdd
187 * @author: renchao
188 */
176 handleAdd () { 189 handleAdd () {
177 this.tableData.data.push({ 190 this.tableData.data.push({
178 field: '', 191 field: '',
...@@ -182,9 +195,19 @@ ...@@ -182,9 +195,19 @@
182 message: '' 195 message: ''
183 }) 196 })
184 }, 197 },
198 /**
199 * @description: handleMinus
200 * @param {*} index
201 * @param {*} row
202 * @author: renchao
203 */
185 handleMinus (index, row) { 204 handleMinus (index, row) {
186 this.tableData.data.splice(index, 1); 205 this.tableData.data.splice(index, 1);
187 }, 206 },
207 /**
208 * @description: handleSubmit
209 * @author: renchao
210 */
188 async handleSubmit () { 211 async handleSubmit () {
189 this.ruleForm.sysYwsjbFieldList = this.tableData.data 212 this.ruleForm.sysYwsjbFieldList = this.tableData.data
190 try { 213 try {
...@@ -203,6 +226,10 @@ ...@@ -203,6 +226,10 @@
203 } 226 }
204 227
205 }, 228 },
229 /**
230 * @description: handleClose
231 * @author: renchao
232 */
206 handleClose () { 233 handleClose () {
207 this.$refs['ruleForm'].resetFields(); 234 this.$refs['ruleForm'].resetFields();
208 this.$refs.validRule.isHide() 235 this.$refs.validRule.isHide()
......
...@@ -262,6 +262,12 @@ ...@@ -262,6 +262,12 @@
262 }, 262 },
263 methods: { 263 methods: {
264 // 添加索引 264 // 添加索引
265 /**
266 * @description: 添加索引
267 * @param {*} data
268 * @param {*} isAdd
269 * @author: renchao
270 */
265 addIndexes (data = this.tableData, isAdd = true) { 271 addIndexes (data = this.tableData, isAdd = true) {
266 data.forEach((item, index) => { 272 data.forEach((item, index) => {
267 if (index == 0) { 273 if (index == 0) {
...@@ -283,6 +289,10 @@ ...@@ -283,6 +289,10 @@
283 } 289 }
284 }); 290 });
285 }, 291 },
292 /**
293 * @description: itemShowFalse
294 * @author: renchao
295 */
286 itemShowFalse () { 296 itemShowFalse () {
287 this.tableData.forEach((item, index) => { 297 this.tableData.forEach((item, index) => {
288 item.codeShow = false; 298 item.codeShow = false;
...@@ -291,11 +301,21 @@ ...@@ -291,11 +301,21 @@
291 item.normnameShow = false; 301 item.normnameShow = false;
292 }); 302 });
293 }, 303 },
304 /**
305 * @description: handleMinus
306 * @param {*} index
307 * @param {*} row
308 * @author: renchao
309 */
294 handleMinus (index, row) { 310 handleMinus (index, row) {
295 removeTreeListItem(this.tableData, row.dictid, 'dictid'); 311 removeTreeListItem(this.tableData, row.dictid, 'dictid');
296 this.tableData = judgeSort(this.tableData) 312 this.tableData = judgeSort(this.tableData)
297 this.key++; 313 this.key++;
298 }, 314 },
315 /**
316 * @description: handleSubmit
317 * @author: renchao
318 */
299 handleSubmit () { 319 handleSubmit () {
300 editDictNode({ 320 editDictNode({
301 dictid: this.details.rowData.dictid, 321 dictid: this.details.rowData.dictid,
...@@ -311,10 +331,19 @@ ...@@ -311,10 +331,19 @@
311 } 331 }
312 }); 332 });
313 }, 333 },
334 /**
335 * @description: closeDialog
336 * @author: renchao
337 */
314 closeDialog () { 338 closeDialog () {
315 this.$emit("input", false); 339 this.$emit("input", false);
316 }, 340 },
317 // 增加下级 341 // 增加下级
342 /**
343 * @description: 增加下级
344 * @param {*} row
345 * @author: renchao
346 */
318 handleAddSubordinate (row) { 347 handleAddSubordinate (row) {
319 if (!row.children) { 348 if (!row.children) {
320 row.children = []; 349 row.children = [];
...@@ -332,6 +361,10 @@ ...@@ -332,6 +361,10 @@
332 this.keyList.push(row.dictid); 361 this.keyList.push(row.dictid);
333 }, 362 },
334 // 增加 363 // 增加
364 /**
365 * @description: 增加
366 * @author: renchao
367 */
335 handleAdd () { 368 handleAdd () {
336 this.$nextTick(() => { 369 this.$nextTick(() => {
337 let container = this.$el.querySelector(".el-table__body-wrapper"); 370 let container = this.$el.querySelector(".el-table__body-wrapper");
...@@ -351,12 +384,24 @@ ...@@ -351,12 +384,24 @@
351 this.key++; 384 this.key++;
352 }, 385 },
353 // 上移下移 386 // 上移下移
387 /**
388 * @description: 上移下移
389 * @param {*} index
390 * @param {*} row
391 * @author: renchao
392 */
354 moveUpward (index, row) { 393 moveUpward (index, row) {
355 realMove(row.dictid, "UP", this.tableData); 394 realMove(row.dictid, "UP", this.tableData);
356 let id = findParents(this.tableData, row.dictid); 395 let id = findParents(this.tableData, row.dictid);
357 this.keyList = id; 396 this.keyList = id;
358 this.key++; 397 this.key++;
359 }, 398 },
399 /**
400 * @description: moveDown
401 * @param {*} index
402 * @param {*} row
403 * @author: renchao
404 */
360 moveDown (index, row) { 405 moveDown (index, row) {
361 realMove(row.dictid, "DOWN", this.tableData); 406 realMove(row.dictid, "DOWN", this.tableData);
362 let id = findParents(this.tableData, row.dictid); 407 let id = findParents(this.tableData, row.dictid);
......
...@@ -86,6 +86,10 @@ ...@@ -86,6 +86,10 @@
86 }, 86 },
87 methods: { 87 methods: {
88 // 初始化数据 88 // 初始化数据
89 /**
90 * @description: 初始化数据
91 * @author: renchao
92 */
89 queryClick () { 93 queryClick () {
90 getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => { 94 getQlxxDictList({ ...this.ruleForm, ...this.pageData }).then(res => {
91 let { records, total } = res.result 95 let { records, total } = res.result
...@@ -93,11 +97,19 @@ ...@@ -93,11 +97,19 @@
93 this.tableData.total = total ? total : 0 97 this.tableData.total = total ? total : 0
94 }) 98 })
95 }, 99 },
100 /**
101 * @description: handleSearch
102 * @author: renchao
103 */
96 handleSearch () { 104 handleSearch () {
97 this.pageData.currentPage = 1 105 this.pageData.currentPage = 1
98 this.tableData.data = [] 106 this.tableData.data = []
99 this.queryClick() 107 this.queryClick()
100 }, 108 },
109 /**
110 * @description: handleRefresh
111 * @author: renchao
112 */
101 handleRefresh () { 113 handleRefresh () {
102 this.$confirm('是否确认刷新', '提示', { 114 this.$confirm('是否确认刷新', '提示', {
103 confirmButtonText: '确定', 115 confirmButtonText: '确定',
...@@ -123,6 +135,12 @@ ...@@ -123,6 +135,12 @@
123 }); 135 });
124 }); 136 });
125 }, 137 },
138 /**
139 * @description: editClick
140 * @param {*} row
141 * @param {*} val
142 * @author: renchao
143 */
126 editClick (row, val) { 144 editClick (row, val) {
127 this.details.rowData = row 145 this.details.rowData = row
128 this.details.isenable = val 146 this.details.isenable = val
......
...@@ -108,6 +108,11 @@ ...@@ -108,6 +108,11 @@
108 ] 108 ]
109 }, 109 },
110 methods: { 110 methods: {
111 /**
112 * @description: getUserdata
113 * @param {*} id
114 * @author: renchao
115 */
111 getUserdata (id) { 116 getUserdata (id) {
112 getAction(`${api.users}/${id}`).then((res) => { 117 getAction(`${api.users}/${id}`).then((res) => {
113 if (res.status === 1) { 118 if (res.status === 1) {
...@@ -117,6 +122,10 @@ ...@@ -117,6 +122,10 @@
117 } 122 }
118 }) 123 })
119 }, 124 },
125 /**
126 * @description: updateInfo
127 * @author: renchao
128 */
120 updateInfo () { 129 updateInfo () {
121 this.$refs.form.validate((valid) => { 130 this.$refs.form.validate((valid) => {
122 if (valid) { 131 if (valid) {
......
...@@ -54,9 +54,17 @@ ...@@ -54,9 +54,17 @@
54 created () { }, 54 created () { },
55 mounted () { }, 55 mounted () { },
56 methods: { 56 methods: {
57 /**
58 * @description: information
59 * @author: renchao
60 */
57 information () { 61 information () {
58 this.isshow = true; 62 this.isshow = true;
59 }, 63 },
64 /**
65 * @description: password
66 * @author: renchao
67 */
60 password () { 68 password () {
61 this.isshow = false; 69 this.isshow = false;
62 }, 70 },
......
...@@ -83,9 +83,21 @@ ...@@ -83,9 +83,21 @@
83 } 83 }
84 }, 84 },
85 methods: { 85 methods: {
86 /**
87 * @description: getid
88 * @param {*} val
89 * @author: renchao
90 */
86 getid (val) { 91 getid (val) {
87 this.userId = val.id; 92 this.userId = val.id;
88 }, 93 },
94 /**
95 * @description: validatorConfirmPassword
96 * @param {*} rule
97 * @param {*} value
98 * @param {*} callback
99 * @author: renchao
100 */
89 validatorConfirmPassword (rule, value, callback) { 101 validatorConfirmPassword (rule, value, callback) {
90 const { newPassword } = this.form; 102 const { newPassword } = this.form;
91 if (value !== newPassword) { 103 if (value !== newPassword) {
...@@ -94,6 +106,10 @@ ...@@ -94,6 +106,10 @@
94 callback(); 106 callback();
95 } 107 }
96 }, 108 },
109 /**
110 * @description: updatePassword
111 * @author: renchao
112 */
97 updatePassword () { 113 updatePassword () {
98 this.$refs.form.validate((valid) => { 114 this.$refs.form.validate((valid) => {
99 if (valid) { 115 if (valid) {
......
...@@ -88,10 +88,19 @@ ...@@ -88,10 +88,19 @@
88 }, 88 },
89 89
90 methods: { 90 methods: {
91 /**
92 * @description: onJsonChange
93 * @param {*} value
94 * @author: renchao
95 */
91 onJsonChange (value) { 96 onJsonChange (value) {
92 // 只有在格式正确的时候进入此事件 97 // 只有在格式正确的时候进入此事件
93 this.hasJsonFlag = true 98 this.hasJsonFlag = true
94 }, 99 },
100 /**
101 * @description: onJsonSave
102 * @author: renchao
103 */
95 onJsonSave () { 104 onJsonSave () {
96 const value = this.resultInfo 105 const value = this.resultInfo
97 if (this.hasJsonFlag === false) { 106 if (this.hasJsonFlag === false) {
...@@ -104,17 +113,34 @@ ...@@ -104,17 +113,34 @@
104 return true 113 return true
105 } 114 }
106 }, 115 },
116 /**
117 * @description: onError
118 * @param {*} value
119 * @author: renchao
120 */
107 onError (value) { 121 onError (value) {
108 this.hasJsonFlag = false 122 this.hasJsonFlag = false
109 }, 123 },
124 /**
125 * @description: openDialog
126 * @author: renchao
127 */
110 openDialog () { 128 openDialog () {
111 this.dialogVisible = true 129 this.dialogVisible = true
112 }, 130 },
131 /**
132 * @description: cancel
133 * @author: renchao
134 */
113 cancel () { 135 cancel () {
114 this.resultInfo = this.tmpResultInfo 136 this.resultInfo = this.tmpResultInfo
115 this.dialogVisible = false 137 this.dialogVisible = false
116 }, 138 },
117 // 放大 139 // 放大
140 /**
141 * @description: 放大
142 * @author: renchao
143 */
118 enLarge () { 144 enLarge () {
119 const fullarea = document.getElementById('minejson') 145 const fullarea = document.getElementById('minejson')
120 if (fullarea.requestFullscreen) { 146 if (fullarea.requestFullscreen) {
......
...@@ -136,6 +136,11 @@ ...@@ -136,6 +136,11 @@
136 }, 136 },
137 methods: { 137 methods: {
138 // 获取父级菜单 138 // 获取父级菜单
139 /**
140 * @description: 获取父级菜单
141 * @param {*} id
142 * @author: renchao
143 */
139 getParentMenuList (id) { 144 getParentMenuList (id) {
140 145
141 getParentMenuListAction(id).then((res) => { 146 getParentMenuListAction(id).then((res) => {
...@@ -156,16 +161,30 @@ ...@@ -156,16 +161,30 @@
156 }) 161 })
157 }, 162 },
158 // 配置参数 163 // 配置参数
164 /**
165 * @description: 配置参数
166 * @param {*} data
167 * @author: renchao
168 */
159 getJsonString (data) { 169 getJsonString (data) {
160 this.form.metadata = data 170 this.form.metadata = data
161 }, 171 },
162 // 新增菜单 172 // 新增菜单
173 /**
174 * @description: 新增菜单
175 * @author: renchao
176 */
163 add () { 177 add () {
164 this.getParentMenuList(this.productId) 178 this.getParentMenuList(this.productId)
165 this.type = 0 179 this.type = 0
166 this.form.jumpMode = 1 180 this.form.jumpMode = 1
167 }, 181 },
168 // 编辑菜单 182 // 编辑菜单
183 /**
184 * @description: 编辑菜单
185 * @param {*} record
186 * @author: renchao
187 */
169 edit (record) { 188 edit (record) {
170 this.type = 1 189 this.type = 1
171 // 若有id为编辑 190 // 若有id为编辑
...@@ -177,10 +196,20 @@ ...@@ -177,10 +196,20 @@
177 } 196 }
178 }, 197 },
179 // 选择上级菜单 198 // 选择上级菜单
199 /**
200 * @description: 选择上级菜单
201 * @param {*} value
202 * @author: renchao
203 */
180 handleChange (value) { 204 handleChange (value) {
181 this.form.parentId = value 205 this.form.parentId = value
182 }, 206 },
183 // 保存 207 // 保存
208 /**
209 * @description: 保存
210 * @param {*} submitType
211 * @author: renchao
212 */
184 submitForm (submitType) { 213 submitForm (submitType) {
185 this.$refs.form.validate((valid) => { 214 this.$refs.form.validate((valid) => {
186 if (valid) { 215 if (valid) {
...@@ -216,6 +245,10 @@ ...@@ -216,6 +245,10 @@
216 }) 245 })
217 }, 246 },
218 // 重置 247 // 重置
248 /**
249 * @description: 重置
250 * @author: renchao
251 */
219 resetForm () { 252 resetForm () {
220 this.$refs.form.resetFields() 253 this.$refs.form.resetFields()
221 this.form = { 254 this.form = {
...@@ -224,6 +257,10 @@ ...@@ -224,6 +257,10 @@
224 } 257 }
225 }, 258 },
226 // 关闭 259 // 关闭
260 /**
261 * @description: 关闭
262 * @author: renchao
263 */
227 close () { 264 close () {
228 this.resetForm() 265 this.resetForm()
229 this.$emit('input', false) 266 this.$emit('input', false)
......
...@@ -158,6 +158,10 @@ ...@@ -158,6 +158,10 @@
158 }, 158 },
159 methods: { 159 methods: {
160 //查询 160 //查询
161 /**
162 * @description: 查询
163 * @author: renchao
164 */
161 searchQuery () { 165 searchQuery () {
162 if (this.form.menuName) { 166 if (this.form.menuName) {
163 this.tablelistData = this.childrenFn(this.listData, this.form.menuName); 167 this.tablelistData = this.childrenFn(this.listData, this.form.menuName);
...@@ -166,6 +170,12 @@ ...@@ -166,6 +170,12 @@
166 } 170 }
167 }, 171 },
168 // 数据处理方法 172 // 数据处理方法
173 /**
174 * @description: 数据处理方法
175 * @param {*} arr
176 * @param {*} key
177 * @author: renchao
178 */
169 childrenFn (arr, key) { 179 childrenFn (arr, key) {
170 const that = this; 180 const that = this;
171 let searchTree = []; 181 let searchTree = [];
...@@ -195,6 +205,10 @@ ...@@ -195,6 +205,10 @@
195 } 205 }
196 }, 206 },
197 // 加载表格数据 207 // 加载表格数据
208 /**
209 * @description: 加载表格数据
210 * @author: renchao
211 */
198 getTableList () { 212 getTableList () {
199 getMenuInfo(this.BASE_API.CODE).then((res) => { 213 getMenuInfo(this.BASE_API.CODE).then((res) => {
200 if (res.code === 200) { 214 if (res.code === 200) {
...@@ -231,6 +245,10 @@ ...@@ -231,6 +245,10 @@
231 }) 245 })
232 }, 246 },
233 // 新增菜单 247 // 新增菜单
248 /**
249 * @description: 新增菜单
250 * @author: renchao
251 */
234 handleAdd () { 252 handleAdd () {
235 this.isDialog = true 253 this.isDialog = true
236 this.$refs.dialogForm.add(); 254 this.$refs.dialogForm.add();
...@@ -238,12 +256,23 @@ ...@@ -238,12 +256,23 @@
238 }, 256 },
239 257
240 // 修改 258 // 修改
259 /**
260 * @description: 修改
261 * @param {*} record
262 * @author: renchao
263 */
241 handleEdit (record) { 264 handleEdit (record) {
242 this.isDialog = true 265 this.isDialog = true
243 this.$refs.dialogForm.edit(record); 266 this.$refs.dialogForm.edit(record);
244 this.$refs.dialogForm.title = "修改"; 267 this.$refs.dialogForm.title = "修改";
245 }, 268 },
246 // 删除 269 // 删除
270 /**
271 * @description: 删除
272 * @param {*} id
273 * @param {*} content
274 * @author: renchao
275 */
247 handleDelete (id, content) { 276 handleDelete (id, content) {
248 this.$confirm( 277 this.$confirm(
249 `<div class="customer-message-wrapper"> 278 `<div class="customer-message-wrapper">
...@@ -284,11 +313,21 @@ ...@@ -284,11 +313,21 @@
284 .catch(() => { }) 313 .catch(() => { })
285 }, 314 },
286 // 新增、编辑回显 315 // 新增、编辑回显
316 /**
317 * @description: 获新增、编辑回显
318 * @author: renchao
319 */
287 reloadTableData () { 320 reloadTableData () {
288 this.getTableList() 321 this.getTableList()
289 }, 322 },
290 323
291 // 排序 324 // 排序
325 /**
326 * @description: 排序
327 * @param {*} row
328 * @param {*} operate
329 * @author: renchao
330 */
292 moveUp (row, operate) { 331 moveUp (row, operate) {
293 if (row.isTop) { 332 if (row.isTop) {
294 return; 333 return;
...@@ -296,6 +335,12 @@ ...@@ -296,6 +335,12 @@
296 this.realMove(row, operate); 335 this.realMove(row, operate);
297 } 336 }
298 }, 337 },
338 /**
339 * @description: moveDown
340 * @param {*} row
341 * @param {*} operate
342 * @author: renchao
343 */
299 moveDown (row, operate) { 344 moveDown (row, operate) {
300 if (row.isBottom) { 345 if (row.isBottom) {
301 return; 346 return;
...@@ -305,6 +350,12 @@ ...@@ -305,6 +350,12 @@
305 }, 350 },
306 351
307 //树形表格移动 352 //树形表格移动
353 /**
354 * @description: 树形表格移动
355 * @param {*} row
356 * @param {*} operate
357 * @author: renchao
358 */
308 realMove (row, operate) { 359 realMove (row, operate) {
309 function tarverse (nodes, id) { 360 function tarverse (nodes, id) {
310 let result; 361 let result;
......
...@@ -92,6 +92,10 @@ ...@@ -92,6 +92,10 @@
92 }, 92 },
93 methods: { 93 methods: {
94 // 保存新增或关闭事件 94 // 保存新增或关闭事件
95 /**
96 * @description: 保存新增或关闭事件
97 * @author: renchao
98 */
95 submitForm () { 99 submitForm () {
96 this.$refs.form.validate((valid) => { 100 this.$refs.form.validate((valid) => {
97 if (valid) { 101 if (valid) {
...@@ -151,6 +155,10 @@ ...@@ -151,6 +155,10 @@
151 }) 155 })
152 }, 156 },
153 // 重置 157 // 重置
158 /**
159 * @description: 重置
160 * @author: renchao
161 */
154 resetForm () { 162 resetForm () {
155 this.dialogForm = { 163 this.dialogForm = {
156 roleName: '', 164 roleName: '',
...@@ -158,6 +166,10 @@ ...@@ -158,6 +166,10 @@
158 this.$refs.form.resetFields() 166 this.$refs.form.resetFields()
159 }, 167 },
160 // 关闭 168 // 关闭
169 /**
170 * @description: 关闭
171 * @author: renchao
172 */
161 close () { 173 close () {
162 this.resetForm() 174 this.resetForm()
163 this.$emit('input', false) 175 this.$emit('input', false)
......
...@@ -259,6 +259,10 @@ ...@@ -259,6 +259,10 @@
259 mounted () { }, 259 mounted () { },
260 methods: { 260 methods: {
261 //查询 261 //查询
262 /**
263 * @description: 查询
264 * @author: renchao
265 */
262 searchQuery () { 266 searchQuery () {
263 if (this.form.rolesName) { 267 if (this.form.rolesName) {
264 this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName); 268 this.listdata = this.childrenFn(this.setlistdata, this.form.rolesName);
...@@ -266,6 +270,12 @@ ...@@ -266,6 +270,12 @@
266 this.getTableData() 270 this.getTableData()
267 } 271 }
268 }, 272 },
273 /**
274 * @description: childrenFn
275 * @param {*} arr
276 * @param {*} key
277 * @author: renchao
278 */
269 childrenFn (arr, key) { 279 childrenFn (arr, key) {
270 let searchTree = []; 280 let searchTree = [];
271 arr.forEach((item, index) => { 281 arr.forEach((item, index) => {
...@@ -279,6 +289,10 @@ ...@@ -279,6 +289,10 @@
279 } 289 }
280 }, 290 },
281 // 获取角色列表 291 // 获取角色列表
292 /**
293 * @description: 获取角色列表
294 * @author: renchao
295 */
282 getTableData () { 296 getTableData () {
283 getRolesById([1, 2]) 297 getRolesById([1, 2])
284 .then((res) => { 298 .then((res) => {
...@@ -290,6 +304,10 @@ ...@@ -290,6 +304,10 @@
290 }, 304 },
291 305
292 // 获取菜单列表 306 // 获取菜单列表
307 /**
308 * @description: 获取菜单列表
309 * @author: renchao
310 */
293 getTableList () { 311 getTableList () {
294 getMenuInfo(this.BASE_API.CODE).then((res) => { 312 getMenuInfo(this.BASE_API.CODE).then((res) => {
295 if (res.code === 200) { 313 if (res.code === 200) {
...@@ -361,6 +379,12 @@ ...@@ -361,6 +379,12 @@
361 }); 379 });
362 }, 380 },
363 // 获取权限列表 381 // 获取权限列表
382 /**
383 * @description: 获取权限列表
384 * @param {*} productId
385 * @param {*} code
386 * @author: renchao
387 */
364 getAuthorityList (productId, code) { 388 getAuthorityList (productId, code) {
365 getAuthorityListAction(productId, code).then( 389 getAuthorityListAction(productId, code).then(
366 res => { 390 res => {
...@@ -380,6 +404,11 @@ ...@@ -380,6 +404,11 @@
380 }, 404 },
381 405
382 // 配置 406 // 配置
407 /**
408 * @description: 配置
409 * @param {*} row
410 * @author: renchao
411 */
383 getList (row) { 412 getList (row) {
384 this.getTableList() 413 this.getTableList()
385 const params = {}; 414 const params = {};
...@@ -430,6 +459,11 @@ ...@@ -430,6 +459,11 @@
430 }); 459 });
431 }, 460 },
432 // 新增、修改角色 461 // 新增、修改角色
462 /**
463 * @description: 新增、修改角色
464 * @param {*} value
465 * @author: renchao
466 */
433 handleAddEdit (value) { 467 handleAddEdit (value) {
434 this.isDialog = true 468 this.isDialog = true
435 this.$refs.addEditDialog.menuType = this.menuType; 469 this.$refs.addEditDialog.menuType = this.menuType;
...@@ -445,6 +479,12 @@ ...@@ -445,6 +479,12 @@
445 this.$refs.addEditDialog.title = value.id ? "修改" : "新增"; 479 this.$refs.addEditDialog.title = value.id ? "修改" : "新增";
446 }, 480 },
447 //排序 481 //排序
482 /**
483 * @description: 排序
484 * @param {*} record
485 * @param {*} operate
486 * @author: renchao
487 */
448 updateOrder (record, operate) { 488 updateOrder (record, operate) {
449 const findIndex = this.listdata.findIndex(item => item.id === record.id) 489 const findIndex = this.listdata.findIndex(item => item.id === record.id)
450 let swapId = '' 490 let swapId = ''
...@@ -463,6 +503,12 @@ ...@@ -463,6 +503,12 @@
463 }) 503 })
464 }, 504 },
465 // 删除 505 // 删除
506 /**
507 * @description: 删除
508 * @param {*} id
509 * @param {*} content
510 * @author: renchao
511 */
466 handleDelete: function (id, content = "") { 512 handleDelete: function (id, content = "") {
467 this.$confirm( 513 this.$confirm(
468 `<div class="customer-message-wrapper"> 514 `<div class="customer-message-wrapper">
...@@ -503,6 +549,10 @@ ...@@ -503,6 +549,10 @@
503 .catch(() => { }); 549 .catch(() => { });
504 }, 550 },
505 // 新增回显 551 // 新增回显
552 /**
553 * @description: 新增回显
554 * @author: renchao
555 */
506 reloadTableData () { 556 reloadTableData () {
507 this.getTableData(); 557 this.getTableData();
508 }, 558 },
......
...@@ -134,6 +134,12 @@ ...@@ -134,6 +134,12 @@
134 methods: { 134 methods: {
135 135
136 // 人员配置点击行勾选数据 136 // 人员配置点击行勾选数据
137 /**
138 * @description: 人员配置点击行勾选数据
139 * @param {*} row
140 * @param {*} event
141 * @author: renchao
142 */
137 handleClickTableRow (row, event) { 143 handleClickTableRow (row, event) {
138 this.checkNum = 0; 144 this.checkNum = 0;
139 this.isCheck = false; 145 this.isCheck = false;
...@@ -174,6 +180,14 @@ ...@@ -174,6 +180,14 @@
174 }, 180 },
175 // 获取授权主体的菜单权限 181 // 获取授权主体的菜单权限
176 // getMenuAuthorityList 182 // getMenuAuthorityList
183 /**
184 * @description: 获取授权主体的菜单权限
185 * @param {*} operationList
186 * @param {*} id
187 * @param {*} menutablelistData
188 * @param {*} operationCodes
189 * @author: renchao
190 */
177 menulist (operationList, id, Code, menutablelistData, operationCodes) { 191 menulist (operationList, id, Code, menutablelistData, operationCodes) {
178 this.selectedSubsystemCode = Code 192 this.selectedSubsystemCode = Code
179 this.menuList = menutablelistData; 193 this.menuList = menutablelistData;
...@@ -196,10 +210,12 @@ ...@@ -196,10 +210,12 @@
196 210
197 }, 211 },
198 /** 212 /**
199 * 递归渲染列表数据 213 * @description: 递归渲染列表数据
200 * list:原始数组 214 * @param {*} list 原始数组
201 * authorityList:已授权数组 215 * @param {*} authorityList 已授权数组
202 */ 216 * @param {*} operationCodes
217 * @author: renchao
218 */
203 getRecursionTreeData (list, authorityList, operationCodes) { 219 getRecursionTreeData (list, authorityList, operationCodes) {
204 ++this.menukey 220 ++this.menukey
205 this.checkArr = [] 221 this.checkArr = []
...@@ -237,6 +253,13 @@ ...@@ -237,6 +253,13 @@
237 // this.setCheckAllArr(list) 253 // this.setCheckAllArr(list)
238 }, 254 },
239 // 授权条件 255 // 授权条件
256 /**
257 * @description: 授权条件
258 * @param {*} authorityList
259 * @param {*} checkArr
260 * @param {*} item
261 * @author: renchao
262 */
240 setAuthorizedConditions (authorityList, checkArr, item) { 263 setAuthorizedConditions (authorityList, checkArr, item) {
241 if (this.roleId === '') { 264 if (this.roleId === '') {
242 checkArr.forEach(ele => { 265 checkArr.forEach(ele => {
...@@ -270,6 +293,10 @@ ...@@ -270,6 +293,10 @@
270 this.$set(item, 'checkArr', this.$deepCopy(checkArr)) 293 this.$set(item, 'checkArr', this.$deepCopy(checkArr))
271 }, 294 },
272 // 获取拼接授权信息 295 // 获取拼接授权信息
296 /**
297 * @description: 获取拼接授权信息
298 * @author: renchao
299 */
273 getAuthorizedInfo () { 300 getAuthorizedInfo () {
274 const lastArr = [] 301 const lastArr = []
275 const authorizedList = [] 302 const authorizedList = []
...@@ -304,6 +331,12 @@ ...@@ -304,6 +331,12 @@
304 } 331 }
305 }, 332 },
306 // 获取人员列表做筛选 333 // 获取人员列表做筛选
334 /**
335 * @description: 获取人员列表做筛选
336 * @param {*} e
337 * @param {*} rid
338 * @author: renchao
339 */
307 personlist (a, rid) { 340 personlist (a, rid) {
308 this.roleId = rid; 341 this.roleId = rid;
309 this.visible = true; 342 this.visible = true;
...@@ -324,10 +357,18 @@ ...@@ -324,10 +357,18 @@
324 }); 357 });
325 }, 358 },
326 // 关闭事件 359 // 关闭事件
360 /**
361 * @description: 关闭事件
362 * @author: renchao
363 */
327 close () { 364 close () {
328 this.visible = false; 365 this.visible = false;
329 }, 366 },
330 // 保存事件 367 // 保存事件
368 /**
369 * @description: 保存事件
370 * @author: renchao
371 */
331 handleSaveMember () { 372 handleSaveMember () {
332 // 人员授权 373 // 人员授权
333 const idList = this.usermultipleSelection.map((item) => { 374 const idList = this.usermultipleSelection.map((item) => {
...@@ -355,6 +396,11 @@ ...@@ -355,6 +396,11 @@
355 }) 396 })
356 }, 397 },
357 // 勾选人员事件 398 // 勾选人员事件
399 /**
400 * @description: 勾选人员事件
401 * @param {*} val
402 * @author: renchao
403 */
358 handleSelectionChange (val) { 404 handleSelectionChange (val) {
359 this.lastuserList.forEach((element, index) => { 405 this.lastuserList.forEach((element, index) => {
360 delete this.lastuserList[index].selectStatus 406 delete this.lastuserList[index].selectStatus
...@@ -369,6 +415,12 @@ ...@@ -369,6 +415,12 @@
369 }); 415 });
370 }, 416 },
371 // 数据筛选 417 // 数据筛选
418 /**
419 * @description: 数据筛选
420 * @param {*} scope
421 * @param {*} arr
422 * @author: renchao
423 */
372 setarrdata (scope, arr) { 424 setarrdata (scope, arr) {
373 425
374 arr.forEach((item, index, arr) => { 426 arr.forEach((item, index, arr) => {
...@@ -382,6 +434,13 @@ ...@@ -382,6 +434,13 @@
382 434
383 }, 435 },
384 // 勾选菜单事件 436 // 勾选菜单事件
437 /**
438 * @description: 勾选菜单事件
439 * @param {*} flag
440 * @param {*} checkId
441 * @param {*} scope
442 * @author: renchao
443 */
385 changeCheck (flag, checkId, scope) { 444 changeCheck (flag, checkId, scope) {
386 this.checklistbor = [] 445 this.checklistbor = []
387 this.setarrdata(scope, this.lastMenuList) 446 this.setarrdata(scope, this.lastMenuList)
...@@ -398,6 +457,12 @@ ...@@ -398,6 +457,12 @@
398 ) 457 )
399 this.getAuthorizedInfo() 458 this.getAuthorizedInfo()
400 }, 459 },
460 /**
461 * @description: handleClick
462 * @param {*} tab
463 * @param {*} event
464 * @author: renchao
465 */
401 handleClick (tab, event) { 466 handleClick (tab, event) {
402 this.lastuserList.forEach((item, index) => { 467 this.lastuserList.forEach((item, index) => {
403 if (item.selectStatus === 0) { 468 if (item.selectStatus === 0) {
......
...@@ -106,14 +106,26 @@ ...@@ -106,14 +106,26 @@
106 } 106 }
107 }, 107 },
108 methods: { 108 methods: {
109 /**
110 * @description: handleAdd
111 * @author: renchao
112 */
109 handleAdd () { 113 handleAdd () {
110 this.taskData = null 114 this.taskData = null
111 this.isDialog = true 115 this.isDialog = true
112 }, 116 },
117 /**
118 * @description: resetSe
119 * @author: renchao
120 */
113 resetSe () { 121 resetSe () {
114 this.form.jobName = '' 122 this.form.jobName = ''
115 this.featchData() 123 this.featchData()
116 }, 124 },
125 /**
126 * @description: featchData
127 * @author: renchao
128 */
117 async featchData () { 129 async featchData () {
118 try { 130 try {
119 this.form = Object.assign(this.form, this.formData) 131 this.form = Object.assign(this.form, this.formData)
...@@ -124,6 +136,11 @@ ...@@ -124,6 +136,11 @@
124 this.message = error 136 this.message = error
125 } 137 }
126 }, 138 },
139 /**
140 * @description: recover
141 * @param {*} row
142 * @author: renchao
143 */
127 recover (row) { 144 recover (row) {
128 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', { 145 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
129 confirmButtonText: '确定', 146 confirmButtonText: '确定',
...@@ -156,6 +173,11 @@ ...@@ -156,6 +173,11 @@
156 }) 173 })
157 }, 174 },
158 175
176 /**
177 * @description: handleActive
178 * @param {*} row
179 * @author: renchao
180 */
159 handleActive (row) { 181 handleActive (row) {
160 this.$confirm('此操将进行激活操作, 是否继续?', '提示', { 182 this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
161 confirmButtonText: '确定', 183 confirmButtonText: '确定',
...@@ -188,6 +210,11 @@ ...@@ -188,6 +210,11 @@
188 }) 210 })
189 }, 211 },
190 // 暂停 212 // 暂停
213 /**
214 * @description: 暂停
215 * @param {*} row
216 * @author: renchao
217 */
191 handleSuspend (row) { 218 handleSuspend (row) {
192 this.$confirm('此操将进行暂停操作, 是否继续?', '提示', { 219 this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
193 confirmButtonText: '确定', 220 confirmButtonText: '确定',
...@@ -219,10 +246,20 @@ ...@@ -219,10 +246,20 @@
219 }) 246 })
220 }) 247 })
221 }, 248 },
249 /**
250 * @description: handleEdit
251 * @param {*} row
252 * @author: renchao
253 */
222 handleEdit (row) { 254 handleEdit (row) {
223 this.taskData = row 255 this.taskData = row
224 this.isDialog = true 256 this.isDialog = true
225 }, 257 },
258 /**
259 * @description: handleDel
260 * @param {*} row
261 * @author: renchao
262 */
226 handleDel (row) { 263 handleDel (row) {
227 this.$confirm('此操将进行删除操作, 是否继续?', '提示', { 264 this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
228 confirmButtonText: '确定', 265 confirmButtonText: '确定',
......
...@@ -125,6 +125,10 @@ ...@@ -125,6 +125,10 @@
125 this.getdistricts() 125 this.getdistricts()
126 }, 126 },
127 methods: { 127 methods: {
128 /**
129 * @description: getdistricts
130 * @author: renchao
131 */
128 getdistricts () { 132 getdistricts () {
129 getAction(api.departments, { 133 getAction(api.departments, {
130 queryOptions: { orderBys: [{ property: "sort", direction: "desc" }] }, 134 queryOptions: { orderBys: [{ property: "sort", direction: "desc" }] },
...@@ -132,14 +136,21 @@ ...@@ -132,14 +136,21 @@
132 this.districtAreaList = res.content; 136 this.districtAreaList = res.content;
133 137
134 }); 138 });
135
136
137 }, 139 },
138 // 添加人员 140 // 添加人员
141 /**
142 * @description: 添加人员
143 * @author: renchao
144 */
139 adds () { 145 adds () {
140 this.showLoginName = false 146 this.showLoginName = false
141 }, 147 },
142 // 编辑 148 // 编辑
149 /**
150 * @description: 编辑
151 * @param {*} record
152 * @author: renchao
153 */
143 edit (record) { 154 edit (record) {
144 this.showLoginName = true 155 this.showLoginName = true
145 // 若有id为编辑 156 // 若有id为编辑
...@@ -150,6 +161,10 @@ ...@@ -150,6 +161,10 @@
150 } 161 }
151 }, 162 },
152 // 保存 163 // 保存
164 /**
165 * @description: 保存
166 * @author: renchao
167 */
153 submitForm () { 168 submitForm () {
154 this.districtAreaList.forEach((item) => { 169 this.districtAreaList.forEach((item) => {
155 if (this.form.departmentId == item.id) { 170 if (this.form.departmentId == item.id) {
...@@ -185,6 +200,10 @@ ...@@ -185,6 +200,10 @@
185 }) 200 })
186 }, 201 },
187 // 重置 202 // 重置
203 /**
204 * @description: 重置
205 * @author: renchao
206 */
188 resetForm () { 207 resetForm () {
189 this.form = { 208 this.form = {
190 sex: '0' 209 sex: '0'
...@@ -192,6 +211,10 @@ ...@@ -192,6 +211,10 @@
192 this.$refs.form.resetFields() 211 this.$refs.form.resetFields()
193 }, 212 },
194 // 关闭 213 // 关闭
214 /**
215 * @description: 关闭
216 * @author: renchao
217 */
195 close () { 218 close () {
196 this.resetForm() 219 this.resetForm()
197 this.$emit('input', false) 220 this.$emit('input', false)
......
...@@ -230,12 +230,20 @@ ...@@ -230,12 +230,20 @@
230 }, 230 },
231 }, 231 },
232 methods: { 232 methods: {
233 /**
234 * @description: handleAdd
235 * @author: renchao
236 */
233 handleAdd () { 237 handleAdd () {
234 this.isDialog = true 238 this.isDialog = true
235 this.$refs.dialogForm.adds(); 239 this.$refs.dialogForm.adds();
236 this.$refs.dialogForm.title = "添加"; 240 this.$refs.dialogForm.title = "添加";
237 }, 241 },
238 // 查询 242 // 查询
243 /**
244 * @description: 查询
245 * @author: renchao
246 */
239 getTableList () { 247 getTableList () {
240 this.queryParam = { 248 this.queryParam = {
241 name: this.form.name, 249 name: this.form.name,
...@@ -258,6 +266,11 @@ ...@@ -258,6 +266,11 @@
258 }) 266 })
259 }, 267 },
260 // 获取组织机构 268 // 获取组织机构
269 /**
270 * @description: 获取组织机构
271 * @param {*} deptIdArr
272 * @author: renchao
273 */
261 getDepts (deptIdArr) { 274 getDepts (deptIdArr) {
262 let params = { 275 let params = {
263 queryOptions: { 276 queryOptions: {
...@@ -307,6 +320,11 @@ ...@@ -307,6 +320,11 @@
307 // }, 320 // },
308 321
309 // 重置用户密码 322 // 重置用户密码
323 /**
324 * @description: 重置用户密码
325 * @param {*} data
326 * @author: renchao
327 */
310 resetPassword (data) { 328 resetPassword (data) {
311 const ids = [] 329 const ids = []
312 if (data instanceof Array) { 330 if (data instanceof Array) {
...@@ -352,6 +370,12 @@ ...@@ -352,6 +370,12 @@
352 .catch(() => { }) 370 .catch(() => { })
353 }, 371 },
354 //排序 372 //排序
373 /**
374 * @description: 排序
375 * @param {*} record
376 * @param {*} operate
377 * @author: renchao
378 */
355 updateOrder (record, operate) { 379 updateOrder (record, operate) {
356 const findIndex = this.tableData.data.findIndex(item => item.id === record.id) 380 const findIndex = this.tableData.data.findIndex(item => item.id === record.id)
357 let swapId = '' 381 let swapId = ''
...@@ -371,12 +395,23 @@ ...@@ -371,12 +395,23 @@
371 }, 395 },
372 396
373 // 修改人员信息 397 // 修改人员信息
398 /**
399 * @description: 修改人员信息
400 * @param {*} row
401 * @author: renchao
402 */
374 handleEdit (row) { 403 handleEdit (row) {
375 this.isDialog = true 404 this.isDialog = true
376 this.$refs.dialogForm.edit(row); 405 this.$refs.dialogForm.edit(row);
377 this.$refs.dialogForm.title = "修改"; 406 this.$refs.dialogForm.title = "修改";
378 }, 407 },
379 // 删除 408 // 删除
409 /**
410 * @description: 删除
411 * @param {*} id
412 * @param {*} content
413 * @author: renchao
414 */
380 handleDelete (id, content) { 415 handleDelete (id, content) {
381 this.$confirm(deleteDomStr(content), '执行确认', { 416 this.$confirm(deleteDomStr(content), '执行确认', {
382 dangerouslyUseHTMLString: true, 417 dangerouslyUseHTMLString: true,
...@@ -399,6 +434,10 @@ ...@@ -399,6 +434,10 @@
399 .catch(() => { }) 434 .catch(() => { })
400 }, 435 },
401 // 新增回显 436 // 新增回显
437 /**
438 * @description: 新增回显
439 * @author: renchao
440 */
402 reloadTableData () { 441 reloadTableData () {
403 this.getTableList() 442 this.getTableList()
404 }, 443 },
......
...@@ -124,6 +124,10 @@ ...@@ -124,6 +124,10 @@
124 }; 124 };
125 }, 125 },
126 methods: { 126 methods: {
127 /**
128 * @description: featchData
129 * @author: renchao
130 */
127 async featchData () { 131 async featchData () {
128 try { 132 try {
129 this.form = Object.assign(this.form, this.formData); 133 this.form = Object.assign(this.form, this.formData);
...@@ -141,11 +145,21 @@ ...@@ -141,11 +145,21 @@
141 this.$refs.msg.messageShow(); 145 this.$refs.msg.messageShow();
142 } 146 }
143 }, 147 },
148 /**
149 * @description: handleSearch
150 * @author: renchao
151 */
144 handleSearch () { 152 handleSearch () {
145 this.form.currentPage = 1 153 this.form.currentPage = 1
146 this.tableData.data = [] 154 this.tableData.data = []
147 this.featchData() 155 this.featchData()
148 }, 156 },
157 /**
158 * @description: handleEdit
159 * @param {*} index
160 * @param {*} row
161 * @author: renchao
162 */
149 async handleEdit (index, row) { 163 async handleEdit (index, row) {
150 try { 164 try {
151 let { result: res } = await ruleConfig.eidtConfigRule(row.BSM_YWSJB); 165 let { result: res } = await ruleConfig.eidtConfigRule(row.BSM_YWSJB);
...@@ -158,6 +172,12 @@ ...@@ -158,6 +172,12 @@
158 }); 172 });
159 } 173 }
160 }, 174 },
175 /**
176 * @description: handleDel
177 * @param {*} index
178 * @param {*} row
179 * @author: renchao
180 */
161 handleDel (index, row) { 181 handleDel (index, row) {
162 let _this = this; 182 let _this = this;
163 this.$confirm("此操作将进行删除校验规则, 是否继续?", "提示", { 183 this.$confirm("此操作将进行删除校验规则, 是否继续?", "提示", {
...@@ -192,6 +212,10 @@ ...@@ -192,6 +212,10 @@
192 }); 212 });
193 }); 213 });
194 }, 214 },
215 /**
216 * @description: handleUpdateDic
217 * @author: renchao
218 */
195 handleUpdateDic () { 219 handleUpdateDic () {
196 this.$store.dispatch("dictionaries/generateDic").then((res) => { 220 this.$store.dispatch("dictionaries/generateDic").then((res) => {
197 if (res) { 221 if (res) {
......