Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcjg-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
65812452
authored
2023-07-27 13:31:25 +0800
by
yuanbo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加注释
1 parent
fb3fa909
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
0 deletions
src/mixins/TableListMixin.js
src/mixins/ruleMixin.js
src/mixins/tableMixin.js
src/mixins/TableListMixin.js
View file @
6581245
...
...
@@ -32,6 +32,11 @@ export const TableListMixin = {
},
methods
:
{
// 加载表格数据
/**
* @description: 加载表格数据
* @param {*} arg
* @author: renchao
*/
loadData
(
arg
)
{
if
(
!
this
.
tableUrl
)
{
console
.
log
(
'请设置tableUrl属性为接口地址!'
)
...
...
@@ -63,22 +68,45 @@ export const TableListMixin = {
})
},
// 字典值配置
/**
* @description: 字典值配置
* @author: renchao
*/
initDictConfig
()
{
// console.log('假初始化字典值方法!')
},
// 选择所有和取消所有
/**
* @description: 选择所有和取消所有
* @param {*} checked
* @param {*} records
* @author: renchao
*/
selectAllEvent
({
checked
,
records
})
{
this
.
selectionRows
=
records
},
// 选中节点
/**
* @description: 选中节点
* @param {*} records
* @author: renchao
*/
selectChangeEvent
({
records
})
{
this
.
selectionRows
=
records
},
// 使用查询条件查询
/**
* @description: 使用查询条件查询
* @author: renchao
*/
searchQuery
()
{
this
.
loadData
()
},
// 获取查询条件
/**
* @description: 获取查询条件
* @author: renchao
*/
getQueryParams
()
{
if
(
this
.
queryOptions
!==
''
)
{
this
.
queryParam
.
queryOptions
=
JSON
.
stringify
(
this
.
queryOptions
)
...
...
@@ -86,17 +114,32 @@ export const TableListMixin = {
return
this
.
$filterNullObj
(
this
.
queryParam
)
},
// 新增
/**
* @description: 新增
* @author: renchao
*/
handleAdd
:
function
()
{
this
.
$refs
.
dialogForm
.
add
()
this
.
$refs
.
dialogForm
.
title
=
'新增'
},
// 修改
/**
* @description: 修改
* @param {*} record
* @author: renchao
*/
handleEdit
:
function
(
record
)
{
localStorage
.
setItem
(
'record'
,
JSON
.
stringify
(
record
))
this
.
$refs
.
dialogForm
.
edit
(
record
)
this
.
$refs
.
dialogForm
.
title
=
'修改'
},
// 删除
/**
* @description: 删除
* @param {*} id
* @param {*} content
* @author: renchao
*/
handleDelete
:
function
(
id
,
content
=
''
)
{
this
.
$confirm
(
`<div class="customer-message-wrapper">
...
...
@@ -137,6 +180,10 @@ export const TableListMixin = {
.
catch
(()
=>
{})
},
// 批量删除
/**
* @description: 批量删除
* @author: renchao
*/
batchDel
:
function
()
{
if
(
!
this
.
tableUrl
)
{
this
.
$message
.
error
({
...
...
@@ -174,10 +221,20 @@ export const TableListMixin = {
.
catch
(()
=>
{})
},
// 新增或修改成功时,重载列表
/**
* @description: 新增或修改成功时,重载列表
* @author: renchao
*/
dialogFormOk
()
{
this
.
loadData
()
},
// 导出
/**
* @description: 导出
* @param {*} data
* @param {*} name
* @author: renchao
*/
handleExportXls
(
data
,
name
)
{
if
(
name
===
'菜单'
||
name
===
'部门'
||
name
===
'机构'
||
name
===
'资源'
||
name
===
'资源分类'
||
name
===
'数据字典'
||
name
===
'行政区划'
)
{
...
...
@@ -205,6 +262,10 @@ export const TableListMixin = {
}
},
/* 导入 */
/**
* @description: 导入
* @author: renchao
*/
handleImportExcel
(
info
)
{}
}
}
...
...
src/mixins/ruleMixin.js
View file @
6581245
...
...
@@ -16,8 +16,16 @@ let mixin = {
this
.
featchData
()
},
methods
:
{
/**
* @description: featchData
* @author: renchao
*/
featchData
()
{
},
/**
* @description: verificationForm
* @author: renchao
*/
verificationForm
()
{
return
new
Promise
((
resolve
)
=>
{
this
.
$refs
[
'formList'
].
validate
((
valid
)
=>
{
...
...
@@ -29,9 +37,17 @@ let mixin = {
})
})
},
/**
* @description: changeCertificate
* @author: renchao
*/
changeCertificate
()
{
},
/**
* @description: featchRule
* @author: renchao
*/
async
featchRule
()
{
try
{
let
{
result
:
{
sysywsjbfieldlist
}
}
=
await
ruleConfig
.
getRuleList
(
this
.
bsmYwsjb
)
...
...
src/mixins/tableMixin.js
View file @
6581245
...
...
@@ -21,13 +21,27 @@ let mixin = {
},
methods
:
{
// 表格索引得问题
/**
* @description: 表格索引得问题
* @param {*} index
* @author: renchao
*/
indexMethod
(
index
)
{
return
index
+
1
+
(
this
.
form
.
currentPage
-
1
)
*
this
.
formData
.
pageSize
;
},
/**
* @description: handleSizeChange
* @param {*} val
* @author: renchao
*/
handleSizeChange
(
val
)
{
this
.
formData
.
pageSize
=
val
this
.
featchData
()
},
/**
* @description: handleSearch
* @author: renchao
*/
handleSearch
()
{
this
.
form
.
currentPage
=
1
this
.
tableData
.
data
=
[]
...
...
@@ -38,15 +52,29 @@ let mixin = {
this
.
queryClick
()
}
},
/**
* @description: handleCurrentChange
* @param {*} val
* @author: renchao
*/
handleCurrentChange
(
val
)
{
this
.
form
.
currentPage
=
val
this
.
featchData
()
},
/**
* @description: handleSubmit
* @author: renchao
*/
handleSubmit
()
{
this
.
tableData
.
data
=
[]
this
.
featchData
()
},
// 详情
/**
* @description: 详情
* @param {*} row
* @author: renchao
*/
handleEdit
(
row
)
{
this
.
$refs
.
editLog
.
isShow
(
row
);
if
(
row
.
rectypeName
)
{
...
...
@@ -70,6 +98,10 @@ let mixin = {
}
},
// 重置表单
/**
* @description: 重置表单
* @author: renchao
*/
resetForm
()
{
if
(
!
this
.
form
)
return
Object
.
keys
(
this
.
form
).
forEach
((
key
)
=>
{
...
...
Please
register
or
sign in
to post a comment