Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
national_museum_vod
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
qzhxx
national_museum_vod
Commits
0cd73f45
Commit
0cd73f45
authored
Apr 29, 2021
by
xulili
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加机顶盒基础信息导出
parent
a36d3d14
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
24 deletions
+85
-24
httpServer.js
src/config/httpServer.js
+5
-3
index.vue
src/page/STB/base/index.vue
+79
-20
settoplog.vue
src/page/system/log/settoplog.vue
+1
-1
No files found.
src/config/httpServer.js
View file @
0cd73f45
...
...
@@ -65,6 +65,8 @@ const httpServer = (opts, data, file, timeout) => {
params
:
Object
.
assign
(
Public
,
data
),
data
:
data
,
headers
:
opts
.
headers
||
{},
responseType
:
opts
.
responseType
||
''
};
httpDefaultOpts
.
headers
[
"Access-control-Allow-Origin"
]
=
"*"
;
httpDefaultOpts
.
headers
[
"Access-Control-Allow-Headers"
]
=
"content-type,x-requested-with"
;
...
...
@@ -76,7 +78,7 @@ const httpServer = (opts, data, file, timeout) => {
}
else
if
(
opts
.
authType
===
"front"
)
{
authToken
=
localStorage
.
getItem
(
"token"
)
||
MyLocalStorage
.
Cache
.
get
(
'token'
);
}
httpDefaultOpts
.
headers
[
"Authorization"
]
=
authToken
httpDefaultOpts
.
headers
[
"Authorization"
]
=
authToken
}
if
(
opts
.
method
===
'get'
)
{
delete
httpDefaultOpts
.
data
...
...
@@ -101,11 +103,11 @@ const httpServer = (opts, data, file, timeout) => {
// }, 10000)
axios
(
httpDefaultOpts
).
then
((
res
)
=>
{
// console.log(res)
if
(
res
.
data
)
{
if
(
res
.
data
)
{
loadingInstance
.
close
();
// clearTimeout(markIndex)
}
if
(
res
.
data
.
resultCode
==
'1109'
&&
localStorage
.
getItem
(
'backToken'
))
{
//清除用户信息
errorState
(
res
.
status
,
res
.
data
)
...
...
src/page/STB/base/index.vue
View file @
0cd73f45
...
...
@@ -21,6 +21,17 @@
change-on-select
></el-cascader>
</el-form-item>
<el-form-item>
<el-date-picker
v-model=
"form.date"
type=
"daterange"
value-format=
"yyyy-MM-dd"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<div
class=
"btn-group"
>
<el-button
type=
"primary"
@
click=
"onSearch"
>
查询
</el-button>
...
...
@@ -38,8 +49,16 @@
<div
class=
"table-content"
>
<div
class=
"btn-group"
>
<el-button
type=
"primary"
@
click=
"addBox"
>
新建机顶盒账号
</el-button>
<el-button
class=
"export"
type=
"primary"
@
click=
"handleExport"
>
导出
</el-button
>
</div>
<stb-table
:currentPage=
"page._index"
:feildList=
"feildList"
:list=
"tableData"
@
action=
"handleAction"
/>
<stb-table
:currentPage=
"page._index"
:feildList=
"feildList"
:list=
"tableData"
@
action=
"handleAction"
/>
<party-pagination
:page=
"page"
@
changePage=
"handleCurrentChange"
/>
</div>
<add-dialog
ref=
"formItem"
@
refreshFn=
"onSearch"
/>
...
...
@@ -47,22 +66,23 @@
</div>
</
template
>
<
script
>
import
{
partyPagination
}
from
"@/components/index"
;
import
{
addDialog
,
editDialog
,
stbTable
}
from
"./components/index"
;
import
{
partyPagination
}
from
"@/components/index"
;
import
{
addDialog
,
editDialog
,
stbTable
}
from
"./components/index"
;
import
{
getAreas
}
from
"@/config/area.js"
;
import
{
getOrgListWithOutPage
}
from
"@/config/organ.js"
;
export
default
{
components
:
{
partyPagination
,
addDialog
,
editDialog
,
stbTable
},
components
:
{
partyPagination
,
addDialog
,
editDialog
,
stbTable
},
data
()
{
return
{
page
:
{
_index
:
1
,
_size
:
10
,
total
:
0
page
:
{
_index
:
1
,
_size
:
10
,
total
:
0
,
},
feildList
:
[
{
prop
:
"mac"
,
label
:
"MAC地址"
},
{
prop
:
"organName"
,
label
:
"所属单位"
},
{
prop
:
"num"
,
label
:
"展板播放次数"
},
{
prop
:
"exiredDate"
,
label
:
"到期时间"
},
{
prop
:
""
,
label
:
"操作"
,
isEdit
:
true
,
width
:
180
},
],
...
...
@@ -89,26 +109,34 @@ export default {
methods
:
{
// 获取单位信息
async
getOrgList
()
{
this
.
orgOptions
=
await
getOrgListWithOutPage
()
this
.
orgOptions
=
await
getOrgListWithOutPage
()
;
},
// 获取区域信息
async
getAreas
()
{
this
.
areaOptions
=
await
getAreas
()
this
.
areaOptions
=
await
getAreas
()
;
},
// 查询
onSearch
()
{
this
.
page
.
_index
=
1
this
.
requestForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
this
.
getTableData
()
this
.
page
.
_index
=
1
;
this
.
requestForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
))
;
this
.
getTableData
()
;
},
// 获得数据接口
getTableData
()
{
let
vm
=
this
;
let
dates
=
{};
if
(
this
.
form
.
date
)
{
dates
.
startDate
=
this
.
form
.
date
[
0
];
dates
.
endDate
=
this
.
form
.
date
[
1
];
}
let
param
=
{
_index
:
this
.
page
.
_index
,
_size
:
this
.
page
.
_size
,
areaId
:
this
.
requestForm
.
areaId
.
length
?
this
.
requestForm
.
areaId
[
this
.
requestForm
.
areaId
.
length
-
1
]
:
''
,
organId
:
this
.
requestForm
.
orgId
areaId
:
this
.
requestForm
.
areaId
.
length
?
this
.
requestForm
.
areaId
[
this
.
requestForm
.
areaId
.
length
-
1
]
:
""
,
organId
:
this
.
requestForm
.
orgId
,
...
dates
,
};
vm
.
$https
(
{
...
...
@@ -120,15 +148,15 @@ export default {
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
resultCode
===
"200"
)
{
let
data
=
res
.
data
.
data
vm
.
page
.
total
=
data
.
total
vm
.
tableData
=
data
.
records
let
data
=
res
.
data
.
data
;
vm
.
page
.
total
=
data
.
total
;
vm
.
tableData
=
data
.
records
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
)
this
.
$message
.
error
(
res
.
data
.
message
)
;
}
})
.
catch
(
function
(
err
)
{
console
.
log
(
err
)
console
.
log
(
err
)
;
});
},
// 新增弹框打开
...
...
@@ -165,6 +193,37 @@ export default {
handleEdit
()
{
this
.
$refs
.
editform
.
backFn
(
this
.
activeRow
);
},
// 导出
handleExport
()
{
let
dates
=
{};
if
(
this
.
form
.
date
)
{
dates
.
startDate
=
this
.
requestForm
.
date
[
0
];
dates
.
endDate
=
this
.
requestForm
.
date
[
1
];
}
let
param
=
{
areaId
:
this
.
requestForm
.
areaId
.
length
?
this
.
requestForm
.
areaId
[
this
.
requestForm
.
areaId
.
length
-
1
]
:
""
,
organId
:
this
.
requestForm
.
orgId
,
...
dates
,
};
this
.
$https
(
{
url
:
"/boxOperation/export"
,
method
:
"post"
,
authType
:
this
.
backToken
,
responseType
:
"blob"
,
},
this
.
$qs
.
stringify
(
param
)
).
then
((
res
)
=>
{
let
blobUrl
=
window
.
URL
.
createObjectURL
(
res
.
data
);
const
aElement
=
document
.
createElement
(
"a"
);
aElement
.
href
=
blobUrl
;
aElement
.
download
=
"机顶盒基础信息.xls"
;
aElement
.
click
();
window
.
URL
.
revokeObjectURL
(
blobUrl
);
});
},
},
};
</
script
>
...
...
src/page/system/log/settoplog.vue
View file @
0cd73f45
...
...
@@ -73,7 +73,7 @@ export default {
feildList
:
[
{
prop
:
"macAddr"
,
label
:
"机顶盒Mac地址"
},
{
prop
:
"orgName"
,
label
:
"所属单位"
},
{
prop
:
"
learnName"
,
label
:
"学习内容
"
},
{
prop
:
"
exhibitionBoardName"
,
label
:
"展板
"
},
{
prop
:
"startTime"
,
label
:
"开始时间"
},
{
prop
:
"endTime"
,
label
:
"结束时间"
},
],
...
...
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