Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
e3fee8a4
Commit
e3fee8a4
authored
Sep 10, 2018
by
agping
Committed by
hujun
Sep 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公告 上传附件
# Conflicts: # public/resource/js/addNoticeView.js # public/resource/js/notice.js
parent
443545ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
13 deletions
+39
-13
index.html
application/index/view/notice/index.html
+3
-0
addNoticeView.js
public/resource/js/addNoticeView.js
+14
-5
notice.js
public/resource/js/notice.js
+22
-8
No files found.
application/index/view/notice/index.html
View file @
e3fee8a4
...
...
@@ -263,6 +263,9 @@
<div
class=
"notice-text"
></div>
<div
class=
"notice-fujian-area"
>
<span>
附件(点击可下载):
</span>
<ul
id=
"#fujian_ul"
>
</ul>
</div>
</div>
...
...
public/resource/js/addNoticeView.js
View file @
e3fee8a4
...
...
@@ -84,8 +84,9 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确定删除该文件吗?'
))
{
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
);
var
_imgId
=
_this
.
parent
().
attr
(
'data-imgid'
)
*
1
;
_this
.
parent
().
remove
();
};
});
...
...
@@ -120,11 +121,19 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
// }
//附件相关
var
_data
=
[];
var
_fujianObj
=
$
(
'#fujian_ul'
).
find
(
'li>a.pdf-pre-a'
);
//附件看的是删除按钮的个数
if
(
_fujianObj
.
length
===
1
)
{
params
[
'annex_file_name'
]
=
_fujianObj
[
0
].
getAttribute
(
'data-filename'
);
//附件取得是data-filename
};
if
(
_fujianObj
.
length
>
0
){
//判断附件存在,同时,附件可能存在0到5个
for
(
var
i
=
0
;
i
<
_fujianObj
.
length
;
i
++
){
var
one_name
=
_fujianObj
[
i
].
getAttribute
(
'data-filename'
);
//附件取得是data-filename
if
(
one_name
){
_data
[
i
]
=
one_name
;
}
}
}
params
.
annex_file_name
=
_data
.
join
(
','
);
$
.
ajax
({
url
:
'/index/addNotice'
,
type
:
'POST'
,
...
...
public/resource/js/notice.js
View file @
e3fee8a4
...
...
@@ -82,14 +82,28 @@ define (['doT', 'text!temp/notice_template_tpl.html','ckfinder','ckfinderStart',
var
_filePath
=
$
(
this
).
attr
(
'data-fujian'
);
var
_tempArr
=
_filePath
.
split
(
'/'
);
var
_lastObj
=
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]));
if
(
_lastObj
){
$
(
'.notice-fujian-area'
).
show
().
html
(
'<span>附件(点击可下载):</span><a download="{0}" href="{1}" title="点击可下载">{0}</a>'
.
stringFormatObj
({
'0'
:
_lastObj
,
'1'
:
_filePath
}))
}
else
{
$
(
'.notice-fujian-area'
).
html
(
''
).
hide
();
}
// if(_lastObj){
// $('.notice-fujian-area').show().html('<span>附件(点击可下载):</span><a download="{0}" href="{1}" title="点击可下载">{0}</a>'.stringFormatObj({
// '0': _lastObj,
// '1': _filePath
// }))
// }else{
// $('.notice-fujian-area').html('').hide();
// }
// 获取附件 对接口
// if(file_paths){
// for ( var i = 0 ; i < file_paths.length ; i++ ){
// var _tempArr = file_paths[i]['file_name'].split('/');
// file_paths[i]['file_name'] && $('#fujian_ul').append('<li class="pdf-pre-li" id='+file_paths[i]['id'] +'><a class="pdf-pre-a" download="{1}" href="{0}" title="点击可下载">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
// '0': file_paths[i]['file_name'],
// '1': dealFileName(decodeURI(_tempArr[_tempArr.length-1]))
// }));
// };
// }
});
$
(
document
).
on
(
"input"
,
"#set_father_id3"
,
function
()
{
//手机号搜索客方
if
(
$
(
"#set_father_id3"
).
val
()
==
''
){
...
...
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