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
2c3969e9
Commit
2c3969e9
authored
Dec 03, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c3fd6966
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
5 deletions
+22
-5
schoolBusinessNew.js
public/resource/js/schoolBusinessNew.js
+22
-5
No files found.
public/resource/js/schoolBusinessNew.js
View file @
2c3969e9
...
...
@@ -45,6 +45,12 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
_doc
.
on
(
'click'
,
'.add-pic'
,
function
()
{
follow
.
getaddPicList
();
});
_doc
.
on
(
'click'
,
'.pdf-pre-a'
,
function
()
{
var
file_id
=
$
(
this
).
parent
(
'li'
).
attr
(
'id'
)
-
0
;
var
_url
=
'/index/downloadFile'
;
window
.
open
(
_url
+
'?file_id='
+
file_id
);
});
$
(
"#search"
).
click
(
function
()
{
user
.
getList
(
1
);
});
...
...
@@ -184,6 +190,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
user
.
addDeleteNewsEvent
(
file_id
);
};
});
//图片预览点击放大事件
_doc
.
on
(
'click'
,
'.img-pre-ul>li>img'
,
function
(
e
)
{
_imgMaskObj
.
show
().
find
(
'img'
).
attr
(
'src'
,
this
.
src
);
...
...
@@ -222,6 +229,12 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
}
});
},
//下载 pdf
// downloadPDF:function(){
// var _url = '/index/downloadFile'
// window.open(_url + 'file_id=' + excel);
// },
//点击编辑 调用的接口
text_details
:
function
()
{
var
news_id
=
getUrlParam
(
'id'
);
//地址栏获取的商铺或者街铺id
...
...
@@ -257,9 +270,11 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
for
(
var
i
=
0
;
i
<
file_paths
.
length
;
i
++
){
console
.
log
(
file_paths
[
i
][
'file_name'
])
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
][
'file_id'
]
+
'><a class="pdf-pre-a" download="{1}" href="
{0}" title="点击可下载">{1
}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
file_paths
[
i
][
'file_name'
]
&&
$
(
'#fujian_ul'
).
append
(
'<li class="pdf-pre-li" id='
+
file_paths
[
i
][
'file_id'
]
+
'><a class="pdf-pre-a" download="{1}" href="
" title="点击可下载">{2
}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'
.
stringFormatObj
({
'0'
:
'/'
+
file_paths
[
i
][
'show_file'
],
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
]))
'1'
:
dealFileName
(
decodeURI
(
_tempArr
[
_tempArr
.
length
-
1
])),
'2'
:
file_paths
[
i
][
'file_former_name'
]
}));
}
}
else
{}
...
...
@@ -332,8 +347,10 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
for
(
var
i
=
0
;
i
<
_fujianObj
.
length
;
i
++
){
var
one_name
=
_fujianObj
[
i
].
getAttribute
(
'data-filename'
);
//附件取得是data-filename
var
one_name_html
=
_fujianObj
[
i
].
innerHTML
;
//附件取得是data-filename
_data
[
'annex_file_name['
+
i
+
'][0]'
]
=
one_name
;
_data
[
'annex_file_name['
+
i
+
'][1]'
]
=
one_name_html
;
// _data['annex_file_name['+i+'][''']'] = one_name + ','+one_name_html;
// _data['annex_file_name['+i+'][1]'] = one_name_html;
_data
[
'annex_file_name['
+
i
+
'][file_name]'
]
=
one_name
;
_data
[
'annex_file_name['
+
i
+
'][file_former_name]'
]
=
one_name_html
;
}
}
/*if(_fujianObj.length === 1) {
...
...
@@ -351,7 +368,7 @@ define(['doT', 'text!temp/schoolBusiness_template_tpl.html', 'ckfinder', 'ckfind
$
(
"#modal_add_user"
).
modal
(
'hide'
);
//提交成功 关闭模态框
// user.getList(1);
alert
(
'提交成功'
)
window
.
location
.
href
=
'/index/business_school'
;
//
window.location.href = '/index/business_school';
console
.
log
(
66
);
}
else
{
alert
(
data
.
msg
);
...
...
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