Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
68139835
Commit
68139835
authored
Oct 15, 2024
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 暂时注销excel导出库
parent
0a2e3555
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
58 deletions
+63
-58
portal-manager-ui/admin/src/main.js
portal-manager-ui/admin/src/main.js
+2
-2
portal-manager-ui/admin/src/utils/commin.js
portal-manager-ui/admin/src/utils/commin.js
+37
-41
portal-manager-ui/admin/src/utils/js/exportExcel.js
portal-manager-ui/admin/src/utils/js/exportExcel.js
+24
-15
No files found.
portal-manager-ui/admin/src/main.js
View file @
68139835
...
@@ -16,8 +16,8 @@ Vue.use(Antd);
...
@@ -16,8 +16,8 @@ Vue.use(Antd);
import
GlobalComponents
from
"
./utils/js/globalComponents
"
;
import
GlobalComponents
from
"
./utils/js/globalComponents
"
;
Vue
.
use
(
GlobalComponents
);
Vue
.
use
(
GlobalComponents
);
import
common
from
"
./utils/commin
"
;
//
import common from "./utils/commin";
Vue
.
use
(
common
);
//
Vue.use(common);
// 公共样式
// 公共样式
import
"
@/assets/css/normalize.css
"
;
import
"
@/assets/css/normalize.css
"
;
...
...
portal-manager-ui/admin/src/utils/commin.js
View file @
68139835
// import moment from 'moment';
import
moment
from
'
moment
'
;
// import 'moment/locale/zh-cn'; // 获取中国标准时间,避免出现utc时间
import
'
moment/locale/zh-cn
'
;
// 获取中国标准时间,避免出现utc时间
// moment.locale('zh-cn')
moment
.
locale
(
'
zh-cn
'
)
// import * as echarts from 'echarts'
import
*
as
echarts
from
'
echarts
'
// import ExportJsonExcel from "js-export-excel";
// import Storage from './js/Storage.js';
import
ExportJsonExcel
from
"
js-export-excel
"
;
// import '@/utils/css/animate.min.css'
import
Storage
from
'
./js/Storage.js
'
;
// import 'font-awesome/css/font-awesome.css'
// import './css/index.less' //css 公共库
import
'
@/utils/css/animate.min.css
'
import
'
font-awesome/css/font-awesome.css
'
// function setLoading(props) {
import
'
./css/index.less
'
//css 公共库
// if (typeof props === 'boolean') props = {
// spinning: props
// }
function
setLoading
(
props
)
{
// if (Object.prototype.toString.call(props) !== '[object Object]') props = {}
if
(
typeof
props
===
'
boolean
'
)
props
=
{
// this.$app.loadingProps = {
spinning
:
props
// tip: '加载中...',
}
// ...props
if
(
Object
.
prototype
.
toString
.
call
(
props
)
!==
'
[object Object]
'
)
props
=
{}
// }
this
.
$app
.
loadingProps
=
{
// }
tip
:
'
加载中...
'
,
...
props
// const common = {
}
// install: function (Vue) {
}
// Vue.prototype.$echarts = echarts;
// Vue.prototype.$moment = moment;
const
common
=
{
// Vue.prototype.$Storage = Storage;
install
:
function
(
Vue
)
{
// Vue.prototype.$setLoading = setLoading;
Vue
.
prototype
.
$echarts
=
echarts
;
// Vue.prototype.$ExportJsonExcel = ExportJsonExcel;
Vue
.
prototype
.
$moment
=
moment
;
Vue
.
prototype
.
$Storage
=
Storage
;
// }
Vue
.
prototype
.
$setLoading
=
setLoading
;
// }
Vue
.
prototype
.
$ExportJsonExcel
=
ExportJsonExcel
;
// export default common
}
}
export
default
common
\ No newline at end of file
portal-manager-ui/admin/src/utils/js/exportExcel.js
View file @
68139835
// 导出表格数据
// 导出表格数据
const
ExportJsonExcel
=
require
(
"
js-export-excel
"
);
// const ExportJsonExcel = require("js-export-excel");
import
{
message
}
from
"
ant-design-vue
"
;
import
Vue
from
"
vue
"
;
/**
/**
* 导出excel
* 导出excel
* @param {导出的表头名信息} tHeader
* @param {导出的表头名信息} tHeader
...
@@ -8,18 +10,25 @@ const ExportJsonExcel = require("js-export-excel");
...
@@ -8,18 +10,25 @@ const ExportJsonExcel = require("js-export-excel");
* @param {导出文件名称} fileName
* @param {导出文件名称} fileName
*/
*/
export
const
export2Excel
=
(
tHeader
,
filterVal
,
list
,
fileName
)
=>
{
export
const
export2Excel
=
(
tHeader
,
filterVal
,
list
,
fileName
)
=>
{
let
option
=
{
message
.
warning
({
fileName
,
content
:
"
功能维护中
"
,
datas
:
[
maxCount
:
1
,
{
duration
:
2
,
sheetData
:
list
,
});
sheetName
:
"
sheet
"
,
Vue
.
prototype
.
$app
.
progressFile
.
show
=
false
;
sheetFilter
:
filterVal
,
Vue
.
prototype
.
$app
.
progressFile
.
percent
=
1
;
sheetHeader
:
tHeader
,
// let option = {
// columnWidths: columnWidths, // 列宽
// fileName,
},
// datas: [
],
// {
};
// sheetData: list,
let
toExcel
=
new
ExportJsonExcel
(
option
);
// sheetName: "sheet",
toExcel
.
saveExcel
();
//保存
// sheetFilter: filterVal,
// sheetHeader: tHeader,
// // columnWidths: columnWidths, // 列宽
// },
// ],
// };
// let toExcel = new ExportJsonExcel(option);
// toExcel.saveExcel(); //保存
};
};
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