Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
12d4b53f
Commit
12d4b53f
authored
Jun 10, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
f31c9b71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
136 additions
and
37 deletions
+136
-37
WebSiteContract.vue
src/components/WebSet/WebSiteContract.vue
+136
-37
No files found.
src/components/WebSet/WebSiteContract.vue
View file @
12d4b53f
...
...
@@ -2,6 +2,7 @@
.WebSiteContract
.el-button.is-circle
{
padding
:
6px
;
}
</
style
>
<
template
>
<!--契约管理-->
...
...
@@ -10,7 +11,7 @@
<ul>
<li>
<label>
名称
</label>
<el-input
v-model=
"msg.
n
ame"
:placeholder=
"$t('system.ph_in')"
@
keyup
.
native
.
enter=
"getData"
class=
"w210"
>
<el-input
v-model=
"msg.
N
ame"
:placeholder=
"$t('system.ph_in')"
@
keyup
.
native
.
enter=
"getData"
class=
"w210"
>
</el-input>
</li>
<li>
...
...
@@ -21,32 +22,31 @@
</ul>
</div>
<div>
<el-table
:data=
"dataList"
style=
"width: 100%"
:default-sort=
"
{prop: 'date', order: 'descending'}">
<el-table-column
prop=
"
file
Name"
label=
"档案名称"
sortable
>
<el-table
:data=
"dataList"
style=
"width: 100%"
v-loading=
"loading"
:default-sort=
"
{prop: 'date', order: 'descending'}">
<el-table-column
prop=
"Name"
label=
"档案名称"
sortable
>
</el-table-column>
<el-table-column
prop=
"
status
"
label=
"状态"
>
<el-table-column
prop=
"
IsOpen
"
label=
"状态"
>
<template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.
status
"
:active-value=
"1"
:inactive-value=
"0"
active-color=
"#13ce66"
inactive-color=
"#
ff4949
"
></el-switch>
<el-switch
v-model=
"scope.row.
IsOpen
"
:active-value=
"1"
:inactive-value=
"0"
active-color=
"#13ce66"
inactive-color=
"#
dcdfe6"
@
change=
"UpdateIsOpen(scope.row)
"
></el-switch>
</
template
>
</el-table-column>
<el-table-column
prop=
"setupTime"
label=
"建立时间"
sortable
>
<el-table-column
prop=
"CreateByName"
label=
"建立人"
sortable
>
</el-table-column>
<el-table-column
prop=
"CreateTimeStr"
label=
"建立时间"
sortable
>
</el-table-column>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_edit')"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
@
click=
"outerVisible = true,updateData(
index
)"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
@
click=
"outerVisible = true,updateData(
scope.row
)"
>
</el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_delete')"
placement=
"top-start"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
circle
@
click=
"delete
list(index
)"
></el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
circle
@
click=
"delete
Data(scope.row
)"
></el-button>
</el-tooltip>
</
template
>
</el-table-column>
</el-table>
<div
class=
"noData"
v-if=
"dataList.length==0"
>
{{$t('system.content_noData')}}
</div>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
'msg.pageSize'
:total=
total
>
</el-pagination>
...
...
@@ -57,24 +57,28 @@
<el-row>
<el-col
:span=
"24"
>
<el-form-item
label=
"状态"
>
<el-radio
v-model=
"addMsg.
status
"
:label=
"1"
>
开启
</el-radio>
<el-radio
v-model=
"addMsg.
status
"
:label=
"0"
>
关闭
</el-radio>
<el-radio
v-model=
"addMsg.
IsOpen
"
:label=
"1"
>
开启
</el-radio>
<el-radio
v-model=
"addMsg.
IsOpen
"
:label=
"0"
>
关闭
</el-radio>
</el-form-item>
<el-form-item
label=
"档案名称"
>
<el-input
type=
"text"
v-model=
"addMsg.
fileName
"
>
<el-input
type=
"text"
v-model=
"addMsg.
Name"
maxlength=
"50
"
>
</el-input>
</el-form-item>
<el-form-item
label=
"档案上传"
>
<!-- <el-input type="text" v-model="addMsg.stayDays">
</el-input> -->
<el-upload
:http-request=
"UploadImage"
:multiple=
"true"
accept=
".pdf,.PDF"
:show-file-list=
"false"
action=
""
>
<div
class=
"addIconDiv"
>
<i
class=
"web_addImg iconfont icon-img_haha"
></i>
</div>
</el-upload>
<a
v-if=
"addMsg.Url"
class=
"web_imgUrl"
>
{{addMsg.Url}}
</a>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
{{$t('pub.saveBtn')}}
</button>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false"
>
{{$t('pub.cancelBtn')}}
</button>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false"
>
{{$t('pub.cancelBtn')}}
</button>
</div>
</el-dialog>
</div>
...
...
@@ -83,8 +87,9 @@
export
default
{
data
()
{
return
{
loading
:
false
,
msg
:
{
n
ame
:
''
,
//名称
N
ame
:
''
,
//名称
pageSize
:
15
,
pageIndex
:
1
,
},
...
...
@@ -92,15 +97,12 @@
currentPage
:
1
,
//弹窗
outerVisible
:
false
,
dataList
:
[{
fileName
:
'档案名称'
,
//档案名称
status
:
1
,
//状态
setupTime
:
'2018-10-02'
,
//建立时间
}],
addMsg
:{
status
:
1
,
//状态
fileName
:
''
,
//档案名称
pdfFile
:
''
,
//档案上传文件pdf
dataList
:
[],
addMsg
:
{
Id
:
0
,
//编号
IsOpen
:
0
,
//状态(0-关闭,1-开启)
Name
:
''
,
//档案名称
Url
:
''
,
//档案路劲
},
}
},
...
...
@@ -110,7 +112,22 @@
methods
:
{
//获取配置
getData
()
{
//获取现有线路列表
this
.
loading
=
true
;
this
.
apipost
(
"ws_get_GetContractPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
}
else
{
this
.
loading
=
false
;
}
},
err
=>
{}
);
},
handleCurrentChange
(
val
)
{
//翻页功能按钮
...
...
@@ -122,17 +139,99 @@
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
},
//更新广告状态
UpdateIsOpen
(
item
)
{
this
.
apipost
(
"ws_post_UpdateContractIsOpen"
,
{
Id
:
item
.
Id
,
IsOpen
:
item
.
IsOpen
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
this
.
getData
();
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//修改
updateData
(
index
)
{
updateData
(
item
)
{
this
.
apipost
(
"ws_get_GetContract"
,
{
Id
:
item
.
Id
,
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
var
tempData
=
res
.
data
.
data
;
this
.
addMsg
.
Id
=
tempData
.
Id
;
this
.
addMsg
.
IsOpen
=
tempData
.
IsOpen
;
this
.
addMsg
.
Name
=
tempData
.
Name
;
this
.
addMsg
.
Url
=
tempData
.
Url
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//删除
deletelist
(
index
)
{
deleteData
(
item
)
{
var
that
=
this
;
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
apipost
(
"ws_post_RemoveContract"
,
{
Id
:
item
.
Id
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
getData
();
}
else
{
that
.
Error
(
res
.
data
.
message
);
}
},
null
);
});
},
//新增
submitForm
(
addMsg
){
//清空数据
clearMsg
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
IsOpen
=
0
;
this
.
addMsg
.
Name
=
""
;
this
.
addMsg
.
Url
=
""
;
},
//新增、修改广告
submitForm
(
addMsg
)
{
this
.
apipost
(
"ws_post_SetContract"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
getData
();
this
.
clearMsg
();
this
.
Success
(
res
.
data
.
message
);
this
.
outerVisible
=
false
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
//上传图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/WebSite/"
;
this
.
UploadSelfFileT
(
path
,
newArr
,
x
=>
{
var
str
=
x
.
data
.
FilePath
;
var
imgUrl
=
this
.
domainManager
().
ViittoFileUrl
+
str
;
this
.
addMsg
.
Url
=
imgUrl
;
});
},
}
}
...
...
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