Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhupu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sugar
zhupu
Commits
dffa6eaf
Commit
dffa6eaf
authored
Nov 24, 2023
by
wuxiaoli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
族谱查看传承人
parent
8e9da6f9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
4 deletions
+19
-4
application/admin/controller/user/Agent.php
application/admin/controller/user/Agent.php
+4
-2
application/admin/view/user/agent/add.html
application/admin/view/user/agent/add.html
+1
-1
application/admin/view/user/agent/edit.html
application/admin/view/user/agent/edit.html
+1
-1
public/assets/js/backend/family/family.js
public/assets/js/backend/family/family.js
+13
-0
No files found.
application/admin/controller/user/Agent.php
View file @
dffa6eaf
...
@@ -34,7 +34,7 @@ class Agent extends Backend
...
@@ -34,7 +34,7 @@ class Agent extends Backend
/**
/**
* 查看
* 查看
*/
*/
public
function
index
()
public
function
index
(
$family_id
=
''
)
{
{
//设置过滤方法
//设置过滤方法
$this
->
request
->
filter
([
'strip_tags'
]);
$this
->
request
->
filter
([
'strip_tags'
]);
...
@@ -44,6 +44,8 @@ class Agent extends Backend
...
@@ -44,6 +44,8 @@ class Agent extends Backend
return
$this
->
selectpage
();
return
$this
->
selectpage
();
}
}
list
(
$where
,
$sort
,
$order
,
$offset
,
$limit
)
=
$this
->
buildparams
();
list
(
$where
,
$sort
,
$order
,
$offset
,
$limit
)
=
$this
->
buildparams
();
$param
=
[];
if
(
!
empty
(
$family_id
)){
$param
[
'family_id'
]
=
$family_id
;
};
$total
=
$this
->
model
$total
=
$this
->
model
->
where
(
$where
)
->
where
(
$where
)
->
order
(
$sort
,
$order
)
->
order
(
$sort
,
$order
)
...
@@ -67,7 +69,7 @@ class Agent extends Backend
...
@@ -67,7 +69,7 @@ class Agent extends Backend
$list
[
$key
][
'MergerName'
]
=
$province
[
'MergerName'
];
$list
[
$key
][
'MergerName'
]
=
$province
[
'MergerName'
];
}
}
}
}
$result
=
array
(
"total"
=>
$total
,
"rows"
=>
$list
);
$result
=
array
(
"total"
=>
$total
,
"rows"
=>
$list
,
"where"
=>
$where
);
return
json
(
$result
);
return
json
(
$result
);
}
}
return
$this
->
view
->
fetch
();
return
$this
->
view
->
fetch
();
...
...
application/admin/view/user/agent/add.html
View file @
dffa6eaf
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Family_id')}:
</label>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Family_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-family_id"
data-rule=
""
data-source=
"family/family/index"
class=
"form-control selectpage"
data-search-field=
"id,family_name,realname,address"
data-primary-key=
"id"
data-field=
"id"
data-format-item=
"{id} - {family_name} - {realname} - {address}"
name=
"row[family_id]"
type=
"text"
data-params=
'{"custom[status]":"1"}'
value=
""
>
<input
id=
"c-family_id"
data-rule=
""
data-source=
"family/family/index"
class=
"form-control selectpage"
data-search-field=
"id,family_name,realname,address"
data-primary-key=
"id"
data-field=
"id"
data-format-item=
"{id} - {family_name} - {realname} - {address}"
name=
"row[family_id]"
type=
"text"
data-params=
'{"custom[status]":"1"
,"custom[type]":"3"
}'
value=
""
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
application/admin/view/user/agent/edit.html
View file @
dffa6eaf
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Family_id')}:
</label>
<label
class=
"control-label col-xs-12 col-sm-2"
>
{:__('Family_id')}:
</label>
<div
class=
"col-xs-12 col-sm-8"
>
<div
class=
"col-xs-12 col-sm-8"
>
<input
id=
"c-family_id"
data-rule=
""
data-source=
"family/family/index"
class=
"form-control selectpage"
data-search-field=
"id,family_name,realname,address"
data-primary-key=
"id"
data-field=
"id"
data-format-item=
"{id} - {family_name} - {realname} - {address}"
name=
"row[family_id]"
type=
"text"
data-params=
'{"custom[status]":"1"}'
value=
"{$row.family_id|htmlentities}"
>
<input
id=
"c-family_id"
data-rule=
""
data-source=
"family/family/index"
class=
"form-control selectpage"
data-search-field=
"id,family_name,realname,address"
data-primary-key=
"id"
data-field=
"id"
data-format-item=
"{id} - {family_name} - {realname} - {address}"
name=
"row[family_id]"
type=
"text"
data-params=
'{"custom[status]":"1"
,"custom[type]":"3"
}'
value=
"{$row.family_id|htmlentities}"
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
public/assets/js/backend/family/family.js
View file @
dffa6eaf
...
@@ -70,6 +70,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
...
@@ -70,6 +70,19 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return
'
family/family_tree/index?family_id=
'
+
row
.
id
;
return
'
family/family_tree/index?family_id=
'
+
row
.
id
;
},
},
},
},
{
name
:
'
agent
'
,
text
:
__
(
'
传承人
'
),
title
:
__
(
'
传承人
'
),
extend
:
'
data-area=["1260px","760px"]
'
,
classname
:
'
btn btn-xs btn-info btn-dialog
'
,
url
:
function
(
row
)
{
return
'
user/agent/index?family_id=
'
+
row
.
id
;
},
visible
:
function
(
row
){
//控制按钮隐藏方法 判断表格数据是否满足要求,然后隐藏或显示
return
row
.
type
==
3
?
true
:
false
;
}
},
],
],
events
:
Table
.
api
.
events
.
operate
,
formatter
:
Table
.
api
.
formatter
.
operate
}
events
:
Table
.
api
.
events
.
operate
,
formatter
:
Table
.
api
.
formatter
.
operate
}
]
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment