Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.portalStaticPage
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
9cf2eae0
authored
2020-12-15 13:47:48 +0800
by
任超
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:图片上传
1 parent
b5c3267e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
33 deletions
staticJs/bszn.js
staticJs/common.js
staticJs/imageUpdate.js
staticJs/onlineApply/houseFill.js
staticViews/bszn.html
staticViews/onlineApply/houseFill.html
staticJs/bszn.js
View file @
9cf2eae
...
...
@@ -61,6 +61,10 @@ $(document).on("click", ".area_list li", function (e) {
_getGuideBusinessInWssq
(
$
(
this
).
attr
(
"data-id"
))
_getGuideBusinessInReserve
(
$
(
this
).
attr
(
"data-id"
))
})
// 办事指南在线办理
$
(
document
).
on
(
"click"
,
".onlineProcessing"
,
function
()
{
console
.
log
(
$
(
this
).
attr
(
'data-id'
))
})
layui
.
use
([
'form'
,
'common'
],
function
()
{
var
common
=
layui
.
common
,
...
...
@@ -126,7 +130,7 @@ function _getGuideBusinessInWssq(id) {
li
=
'<li class="layui-this" lay-id="0">全部</li>'
itemList_tab
.
append
(
li
)
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li lay-id="'
+
(
i
+
1
)
+
'">'
+
result
.
data
[
i
].
b
usinessShortName
+
'</li>'
li
=
'<li lay-id="'
+
(
i
+
1
)
+
'">'
+
result
.
data
[
i
].
b
sznFlmc
+
'</li>'
itemList_tab
.
append
(
li
)
}
}
...
...
@@ -159,14 +163,27 @@ function _getGuideBusinessInReserve(id) {
li
=
'<li class="layui-this" lay-id="0">全部</li>'
itemList_tab1
.
append
(
li
)
for
(
var
i
=
0
;
i
<
result
.
data
.
length
;
i
++
)
{
li
=
'<li lay-id="'
+
(
i
+
1
)
+
'">'
+
result
.
data
[
i
].
b
usinessShortName
+
'</li>'
li
=
'<li lay-id="'
+
(
i
+
1
)
+
'">'
+
result
.
data
[
i
].
b
sznFlmc
+
'</li>'
itemList_tab1
.
append
(
li
)
}
}
}
});
}
// GET /portal/MhGuide/listBusinessIdsByBsznId 通过办事指南ID获取对应的业务ID列表
function
_getGuideBusinessInReserve
(
id
)
{
$
.
ajax
({
type
:
"get"
,
//提交方式
url
:
portal
.
api_url
+
"/portal/MhGuide/listBusinessIdsByBsznId?bsznId="
+
id
,
//路径
dataType
:
"json"
,
//数据,这里使用的是Json格式进行传输
success
:
function
(
result
)
{
//返回数据根据结果进行相应的处理
if
(
result
.
code
==
200
&&
result
.
data
!=
null
)
{
}
}
});
}
var
data
=
{
//数据
"list"
:
[],
"onlineList"
:
[]
...
...
staticJs/common.js
View file @
9cf2eae
...
...
@@ -13,7 +13,7 @@ function SetServicesPath() {
//设置全局參數
var
portal
=
{
'api_url'
:
"http://192.168.2.
59
:8000"
,
//属性名用引号括起来,属性间由逗号隔开
'api_url'
:
"http://192.168.2.
108
:8000"
,
//属性名用引号括起来,属性间由逗号隔开
'name'
:
'myName'
,
"rootPath"
:
GetRootPath
()
};
...
...
staticJs/imageUpdate.js
View file @
9cf2eae
...
...
@@ -4,29 +4,29 @@ $(function () {
var
index
=
$
(
this
).
parent
().
index
();
flieList
.
splice
(
index
,
1
)
sizeObj
.
splice
(
index
,
1
)
if
(
flieList
.
length
==
1
)
{
$
(
this
).
parent
().
parent
().
parent
(
'.fileSpan'
).
find
(
'.update'
).
attr
(
'src'
,
'../../staticImages/update.png'
);
if
(
flieList
.
length
==
1
)
{
$
(
this
).
parent
().
parent
().
parent
(
'.fileSpan'
).
find
(
'.update'
).
attr
(
'src'
,
'../../staticImages/update.png'
);
$
(
this
).
parent
().
parent
().
parent
(
'.fileSpan'
).
find
(
'.updatetext'
).
text
(
'点击文件上传'
)
}
$
(
this
).
parent
().
remove
()
})
})
// 存放每个文件大小的数组,用来比较去重
var
sizeObj
=
[];
function
handleUpdate
(
e
,
$input
)
{
if
(
flieList
.
length
>=
2
)
{
var
flieList
=
[];
function
handleUpdate
(
e
,
$input
)
{
let
inputList
=
[]
inputList
.
push
(
$input
)
if
(
flieList
.
length
>=
2
)
{
layer
.
msg
(
'已经完成上传最大限度'
,
{
icon
:
5
});
return
false
}
else
{
}
else
{
let
file
=
[];
file
.
push
(
e
.
files
[
0
])
analysisList
(
file
,
document
.
getElementById
(
"#"
+
$input
),
$input
);
analysisList
(
file
,
document
.
getElementById
(
"#"
+
$input
),
$input
);
}
}
//解析列表函数
function
analysisList
(
obj
,
inputName
,
$input
)
{
//解析列表函数
function
analysisList
(
obj
,
inputName
,
$input
)
{
//如果没有文件
if
(
obj
.
length
<
1
)
{
return
false
;
...
...
@@ -48,29 +48,41 @@ function handleUpdate(e,$input) {
//给json对象添加内容,得到选择的文件的数据
var
itemArr
=
[
fileObj
,
name
,
size
];
//文件,文件名,文件大小,文件类型
flieList
.
push
(
itemArr
);
if
(
flieList
.
length
==
2
)
{
inputName
.
parent
().
find
(
'.update'
).
attr
(
'src'
,
'../../staticImages/Yes.png'
);
inputName
.
parent
().
find
(
'.updatetext'
).
text
(
''
)
if
(
flieList
.
length
==
2
)
{
$
(
"#"
+
$input
).
parent
().
find
(
'.update'
).
attr
(
'src'
,
'../../staticImages/Yes.png'
);
$
(
"#"
+
$input
)
.
parent
().
find
(
'.updatetext'
).
text
(
''
)
}
//把这个文件的大小放进数组中
sizeObj
.
push
(
size
);
}
createList
();
//生成列表
document
.
querySelector
(
"#"
+
$input
).
value
=
null
createList
(
$input
);
//生成列表
document
.
querySelector
(
"#"
+
$input
).
value
=
null
};
//生成列表
function
createList
()
{
$
(
'.fileListName'
).
empty
()
console
.
log
(
flieList
,
98898989
)
function
createList
(
$input
)
{
$
(
"#"
+
$input
).
parent
().
find
(
'.fileListName'
).
empty
()
for
(
var
i
=
0
;
i
<
flieList
.
length
;
i
++
)
{
var
fileData
=
flieList
[
i
];
var
name
=
fileData
[
1
]
$
(
'.fileListName'
).
append
(
'<li class="fileName">'
+
$
(
"#"
+
$input
).
parent
().
find
(
'.fileListName'
).
append
(
'<li class="fileName">'
+
'<span title="'
+
name
+
'">'
+
name
+
'</span>'
+
'<img class="operation" src="../../staticImages/chacha.png">'
+
'<img class="operation" src="../../staticImages/chacha.png">'
+
'</li>'
);
}
}
function
isRepeat
(
arr
)
//不重复FALSE 重复true
{
var
hash
=
{};
for
(
var
i
in
arr
)
{
if
(
hash
[
arr
[
i
]])
{
return
true
;
}
// 不存在该元素,则赋值为true,可以赋任意值,相应的修改if判断条件即可
hash
[
arr
[
i
]]
=
true
;
}
return
false
;
}
\ No newline at end of file
...
...
staticJs/onlineApply/houseFill.js
View file @
9cf2eae
...
...
@@ -92,7 +92,6 @@ $('.add_form').click(function () {
$
(
'.record'
).
click
(
function
(
event
)
{
event
.
stopPropagation
();
})
var
flieList
=
[];
// 登记证书列表
var
flieList1
=
[];
// 房屋所有权证书列表
var
flieList3
=
[];
// 询问笔录
// 省市区
...
...
staticViews/bszn.html
View file @
9cf2eae
...
...
@@ -83,7 +83,7 @@
<
svg
class
=
"icon svg-icon"
aria
-
hidden
=
"true"
>
<
use
xlink
:
href
=
"#icontudi"
><
/use
>
<
/svg
>
{{
item
.
b
usinessShortName
}}
{{
item
.
b
sznFlmc
}}
<
/h2
>
<
/div
>
<
ul
class
=
"online_list"
>
...
...
@@ -95,7 +95,7 @@
<
button
type
=
"button"
class
=
"layui-btn layui-btn-sm"
>
查看详情
<
/button
>
<
/a
>
<
a
>
<
a
class
=
"onlineProcessing"
data
-
id
=
{{
item
.
bsznListVOS
[
i
].
bsmBszn
}}
>
<
button
type
=
"button"
class
=
"layui-btn layui-btn-sm layui-btn-normal"
>
在线办理
<
/button
>
<
/a
>
<
/div
>
...
...
@@ -115,7 +115,7 @@
<
svg
class
=
"icon svg-icon"
aria
-
hidden
=
"true"
>
<
use
xlink
:
href
=
"#icontudi"
><
/use
>
<
/svg
>
{{
item
.
b
usinessShortName
}}
{{
item
.
b
sznFlmc
}}
<
/h2
>
<
/div
>
<
ul
class
=
"online_list"
>
...
...
@@ -126,7 +126,7 @@
<
a
href
=
'./businessGuideDeatil.html?id={{item.bsznListVOS[i].bsmBszn}}'
target
=
"_blank"
>
<
button
type
=
"button"
class
=
"layui-btn layui-btn-sm"
>
查看详情
<
/button
>
<
/a
>
<
a
>
<
a
class
=
"onlineProcessing"
data
-
id
=
{{
item
.
bsznListVOS
[
i
].
bsmBszn
}}
>
<
button
type
=
"button"
class
=
"layui-btn layui-btn-sm layui-btn-normal"
>
在线办理
<
/button
>
<
/a
>
<
/div
>
...
...
staticViews/onlineApply/houseFill.html
View file @
9cf2eae
...
...
@@ -116,7 +116,7 @@
<div
class=
"img_update"
>
<div
class=
"fileBox"
>
<div
class=
"fileSpan vm"
>
<input
type=
"file"
multiple
id=
"fileInput"
onc
lick=
""
onc
hange=
"handleUpdate(this,'fileInput')"
/>
<input
type=
"file"
multiple
id=
"fileInput"
onchange=
"handleUpdate(this,'fileInput')"
/>
<div
class=
"file_name"
>
<img
class=
"update"
src=
"../../staticImages/update.png"
>
<p
class=
"updatetext"
>
点击文件上传
</p>
...
...
@@ -130,12 +130,12 @@
<div
class=
"img_update"
>
<div
class=
"fileBox"
>
<div
class=
"fileSpan vm"
>
<input
type=
"file"
multiple
id=
"fileInput1"
/>
<input
type=
"file"
multiple
id=
"fileInput1"
onclick=
""
onchange=
"handleUpdate(this,'fileInput1')"
/>
<div
class=
"file_name"
>
<img
class=
"update"
src=
"../../staticImages/update.png"
>
<p
class=
"updatetext"
>
点击文件上传
</p>
</div>
<div
class=
"fileListName
1
"
></div>
<div
class=
"fileListName"
></div>
</div>
<div
class=
"certificate"
>
房屋所有权证书(2份)
</div>
</div>
...
...
Please
register
or
sign in
to post a comment