Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center-ui
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center-ui
Commits
a5debcec
Commit
a5debcec
authored
Mar 11, 2021
by
陈浩建
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
学校导出导入(部分)
parent
2ae9fd85
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
140 additions
and
18 deletions
+140
-18
src/api/school-center/schoolManagermentAPI.js
+9
-2
src/views/school-center/schoolmanager/schoolmanagement.vue
+131
-16
No files found.
src/api/school-center/schoolManagermentAPI.js
View file @
a5debcec
import
{
postAction
,
getAotion
}
from
'@/api/manage'
import
{
postAction
,
getAotion
,}
from
'@/api/manage'
import
{
downFilePost
}
from
"../manage"
;
const
prefix
=
'/manager/ciop'
;
// 获取活动列表
...
...
@@ -15,6 +16,12 @@ let insert= (params) => postAction(prefix + "/school/schoolManagement/insert" ,
//隐藏状态
let
hidestatus
=
(
params
)
=>
postAction
(
prefix
+
"/school/schoolManagement/hidestatus"
,
params
);
// 下载学校模板
let
excelMBOut
=
(
params
)
=>
postAction
(
prefix
+
"/school/schoolManagement/excelMBOut"
,
params
);
// 下载学校列表
let
reportDownload
=
(
params
)
=>
downFilePost
(
prefix
+
"/school/schoolManagement/excelOut"
,
params
);
export
{
findByList
,
choosepages
,
modify
,
insert
,
hidestatus
findByList
,
choosepages
,
modify
,
insert
,
hidestatus
,
excelMBOut
,
reportDownload
}
src/views/school-center/schoolmanager/schoolmanagement.vue
View file @
a5debcec
...
...
@@ -23,7 +23,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col
:md=
"
4"
:sm=
"8
"
>
<a-col
:md=
"
6"
:sm=
"12
"
>
<a-form-item
:labelCol=
"
{span: 5}" :wrapperCol="{span: 18, offset: 1}" label="老客户升级页面 ">
<a-select
placeholder=
"请选择"
v-model=
"queryParam.status"
>
<a-select-option
key=
""
>
请选择
</a-select-option>
...
...
@@ -34,9 +34,17 @@
</a-col>
<span
class=
"table-page-search-submitButtons"
style=
"float: left; overflow: hidden;"
>
<a-col
:md=
"6"
:sm=
"24"
>
<a-button
@
click=
"search()"
type=
"primary"
>
查询
</a-button>
<a-divider
type=
"vertical"
/>
<a-button
@
click=
"add()"
type=
"primary"
>
添加
</a-button>
<a-button
@
click=
"search()"
type=
"primary"
>
查询
</a-button>
<a-divider
type=
"vertical"
/>
<a-button
@
click=
"add()"
type=
"primary"
>
添加
</a-button>
<a-divider
type=
"vertical"
/>
<a-button
@
click=
"imp"
>
批量导入
</a-button>
<a-divider
type=
"vertical"
/>
<a-button
v-show=
"!callback"
@
click=
"excelOut"
>
导出
</a-button>
<a-button
v-show=
"callback"
>
导出中
<a-spin
style=
"margin-left: 5px"
size=
"small"
/>
</a-button>
</a-col>
</span>
</a-row>
...
...
@@ -186,6 +194,46 @@
</a-form-item>
</a-form>
</a-modal>
<a-modal
title=
"批量导入"
:visible=
"impXXModal"
@
ok=
"impOk"
@
cancel=
"impCancel"
html-type=
"submit"
width=
"400px"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p
style=
"text-align:center"
>
{{ importTile }}
</p>
</a-col>
</a-row>
<import-btn
:url=
"importUrl"
:responseFun=
"doPush"
>
<a-tooltip
placement=
"topLeft"
title=
"导入文件"
arrowPointAtCenter
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p>
选择文件:
<a-button
type=
"primary"
>
选择文件
</a-button>
</p>
</a-col>
</a-row>
</a-tooltip>
</import-btn>
<a-row
:gutter=
"24"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p
v-show=
"yrymXXmoBan"
>
模板下载:
<a-button
type=
"primary"
@
click=
"downloadXXMoBan"
>
学校导出模板
</a-button>
</p>
</a-col>
</a-row>
<a-row
:gutter=
"24"
:v-show=
"yrymXXmoBan"
>
<a-col
:md=
"24"
:sm=
"12"
>
<p>
说明:
</p>
<p>
1.批量导入请严格按照模版进行导入;
</p>
</a-col>
</a-row>
</a-modal>
</div>
</template>
...
...
@@ -193,25 +241,41 @@
import
Vue
from
'vue'
import
{
ACCESS_TOKEN
}
from
"@/store/mutation-types"
import
STable
from
'@/components/table'
;
import
{
findByList
,
choosepages
,
modify
,
insert
,
hidestatus
}
from
"@/api/school-center/schoolManagermentAPI"
import
{
cloneObject
}
from
'@/utils/util'
;
import
{
excelMBOut
,
reportDownload
,
findByList
,
choosepages
,
modify
,
insert
,
hidestatus
,
}
from
"../../../api/school-center/schoolManagermentAPI"
import
{
cloneObject
,
exportFile
}
from
'@/utils/util'
;
import
moment
from
"moment"
;
import
{
TreeSelect
}
from
'ant-design-vue'
;
const
SHOW_PARENT
=
TreeSelect
.
SHOW_ALL
;
import
{
getSchoolNames
,
initSubstName
}
from
"../../../api/school-center/userManager/newUserAPI"
;
import
ImportBtn
from
"../../../components/sysmanage/ImportBtn"
;
export
default
{
name
:
"schoolmanagement"
,
components
:
{
moment
,
STable
,
TreeSelect
,
ImportBtn
},
data
:
function
()
{
return
{
yrymXXmoBan
:
false
,
impXXModal
:
false
,
importUrl
:
""
,
importTile
:
""
,
treeCheckStrictly
:
true
,
isShowMore
:
true
,
SHOW_PARENT
,
emptyText
:
{
emptyText
:
'暂无数据'
},
callback
:
false
,
previewVisible
:
false
,
previewImage
:
''
,
fileList
:
[
...
...
@@ -363,7 +427,7 @@
{
dataIndex
:
'status'
,
width
:
200
,
title
:
'是否显示老客户升级页面
'
,
title
:
'是否显示老客户升级页面'
,
scopedSlots
:
{
customRender
:
'statusDefault'
},
align
:
"center"
},
...
...
@@ -514,6 +578,24 @@
search
()
{
this
.
$refs
.
table
.
refresh
({
search
:
true
})
},
// 执行上传
doPush
(
res
)
{
debugger
if
(
!
res
||
!
res
.
response
)
{
this
.
$message
.
error
(
"上传文件出错!"
,
10
);
return
false
;
}
const
response
=
res
.
response
;
if
(
response
.
state
!==
"success"
)
{
this
.
$message
.
error
(
response
.
msg
?
response
.
msg
:
"上传文件出错!"
,
10
);
return
false
;
}
this
.
$message
.
success
(
"上传成功!"
+
response
.
data
,
5
);
this
.
impXXModal
=
false
;
},
downloadXXMoBan
:
function
(){
exportFile
(
excelMBOut
(),
"学校列表模板.xlsx"
);
},
add
(){
this
.
titleName
=
"添加"
this
.
isShowMore
=
true
;
...
...
@@ -558,7 +640,6 @@
id
:
data
.
id
}
let
url
=
""
;
console
.
log
(
data
);
if
(
data
.
serviceQrcode
!=
undefined
)
{
url
=
this
.
baseuploadUrl
()
+
"app/ciop"
+
data
.
serviceQrcode
.
replace
(
"enclosure"
,
""
);
}
else
{
...
...
@@ -760,7 +841,6 @@
}
})
},
createfunctionCancel
(){
this
.
Formtable
.
setFieldsValue
({
...
...
@@ -814,13 +894,48 @@
})
}
})
}
},
mounted
()
{
this
.
initSubstName
();
this
.
getSchoolNames
();
}
}
},
excelOut
()
{
this
.
callback
=
true
;
let
today
=
new
Date
();
today
.
setTime
(
today
.
getTime
());
let
s2
=
today
.
getFullYear
()
+
"-"
+
(
today
.
getMonth
()
+
1
)
+
"-"
+
today
.
getDate
();
exportFile
(
reportDownload
(
this
.
queryParam
),
"校园信息列表"
+
s2
+
".xlsx"
,
this
.
downloadstatu
);
},
downloadstatu
()
{
this
.
callback
=
false
;
},
impOk
()
{
},
impCancel
()
{
this
.
impXXModal
=
false
;
this
.
clearmodel
();
},
imp
(){
this
.
handleSubmit1
();
},
clearmodel
()
{
this
.
importTile
=
""
;
this
.
yrymXXmoBan
=
false
;
this
.
importUrl
=
""
;
},
handleSubmit1
()
{
this
.
importTile
=
"学校导入"
;
this
.
yrymXXmoBan
=
true
;
this
.
importUrl
=
"manager/ciop/school/schoolManagement/importDate"
;
this
.
impXXModal
=
true
;
},
},
mounted
()
{
this
.
initSubstName
();
this
.
getSchoolNames
();
},
}
</
script
>
<
style
scoped
>
...
...
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