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
937f982d
Commit
937f982d
authored
Apr 29, 2021
by
陈浩建
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
华软教师职工
parent
abda1cd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
225 additions
and
1 deletions
+225
-1
src/api/school-center/broadbandList/rhPhoneAPI.js
+1
-1
src/api/school-center/broadbandList/teacherAPI.js
+17
-0
src/views/school-center/broadbandList/teacher.vue
+207
-0
No files found.
src/api/school-center/broadbandList/rhPhoneAPI.js
View file @
937f982d
import
{
postAction
}
from
'@/api/manage'
const
prefix
=
'/manager/ciop'
;
//
查询验证
码
//
融合号
码
let
rhPhone
=
(
params
)
=>
postAction
(
prefix
+
"/rhPhone/list"
,
params
);
// 新增数据
...
...
src/api/school-center/broadbandList/teacherAPI.js
0 → 100644
View file @
937f982d
import
{
postAction
}
from
'@/api/manage'
const
prefix
=
'/manager/ciop'
;
//查询验证码
let
listData
=
(
params
)
=>
postAction
(
prefix
+
"/teacher/list"
,
params
);
// 新增数据
let
addData
=
(
params
)
=>
postAction
(
prefix
+
"/teacher/addData"
,
params
);
// 删除数据
let
deleteData
=
(
params
)
=>
postAction
(
prefix
+
"/teacher/deleteData"
,
params
);
export
{
listData
,
addData
,
deleteData
}
src/views/school-center/broadbandList/teacher.vue
0 → 100644
View file @
937f982d
<
template
>
<div
class=
"flex-container"
>
<!-- 查询区域 -->
<div
class=
"table-page-search-wrapper"
>
<!-- 搜索区域 -->
<a-form
layout=
"inline"
>
<a-row
:gutter=
"24"
>
<a-col
:md=
"4"
:sm=
"8"
>
<a-form-item
label=
"职工号:"
>
<a-input
placeholder=
"职工号"
v-model=
"queryParam.stuNumber"
></a-input>
</a-form-item>
</a-col>
<a-col
:md=
"4"
:sm=
"8"
>
<a-form-item
label=
"教师姓名:"
>
<a-input
placeholder=
"教师姓名"
v-model=
"queryParam.stuName"
></a-input>
</a-form-item>
</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-col>
</span>
</a-row>
</a-form>
</div>
<!--列表-->
<s-table
:locale=
"emptyText"
:columns=
"columns"
:data=
"rowdata"
bordered
ref=
"table"
size=
"small"
class=
"flex-filling"
>
<template
slot=
"operation"
slot-scope=
"text,record"
>
<a-popconfirm
title=
"是否要删除此行?"
@
confirm=
"deleteActivity(record.id)"
>
<a>
删除
</a>
</a-popconfirm>
<!--
<a-divider
type=
"vertical"
/>
-->
</
template
>
</s-table>
<!--添加----弹框-->
<a-modal
:title=
"titleName"
:visible=
"modifyvisible"
@
ok=
"createfunctionOk"
@
cancel=
"createfunctionCancel"
html-type=
"submit"
width=
"840px"
>
<a-form
:form=
"Formtable"
>
<a-form-item
:labelCol=
"{span: 6}"
:wrapperCol=
"{span: 8, offset: 1}"
label=
"职工号"
>
<a-input
placeholder=
"输入t+职工号"
v-model=
"modifyForm.stuNumber"
></a-input>
</a-form-item>
<a-form-item
:labelCol=
"{span: 6}"
:wrapperCol=
"{span: 8, offset: 1}"
label=
"教师名字"
>
<a-input
placeholder=
"教师名字"
v-model=
"modifyForm.stuName"
></a-input>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<
script
>
import
STable
from
'@/components/table'
;
import
{
cloneObject
}
from
'@/utils/util'
;
import
{
listData
,
addData
,
deleteData
,
}
from
"../../../api/school-center/broadbandList/teacherAPI"
;
export
default
{
name
:
"Teacher"
,
components
:
{
STable
,
},
data
:
function
()
{
return
{
emptyText
:
{
emptyText
:
'暂无数据'
},
previewVisible
:
false
,
previewImage
:
''
,
fileList
:
[
],
apis
:
''
,
fileid
:{},
brackgroundurl
:
"manager/ciop/school/schoolManagement/qrcodeUpload"
,
// form
Formtable
:
this
.
$form
.
createForm
(
this
,
{
name
:
'Formtable'
}),
titleName
:
""
,
modifyForm
:
{
stuNumber
:
""
,
stuName
:
''
,
},
subNameList
:
[],
packageName
:[],
chosePages
:[],
products
:[],
//输入框列表
queryParam
:
{
stuNumber
:
''
,
stuName
:
''
,
},
modifyvisible
:
false
,
visiblepicture
:
false
,
columns
:
[
{
dataIndex
:
'stuNumber'
,
width
:
200
,
title
:
'职工号'
,
align
:
"center"
},
{
dataIndex
:
'stuName'
,
width
:
200
,
title
:
'教师名字'
,
align
:
"center"
},
{
dataIndex
:
'operation'
,
width
:
200
,
title
:
'操作'
,
align
:
"center"
,
scopedSlots
:
{
customRender
:
'operation'
},
fixed
:
"right"
}]
,
rowdata
:
parameter
=>
{
const
env
=
process
.
env
.
NODE_ENV
;
//获取当前环境
if
(
env
===
'development'
)
{
//测试环境默认添加前缀
this
.
apis
=
'/api/'
;
}
let
params
=
{
pageNo
:
parameter
.
pageNo
,
pageSize
:
parameter
.
pageSize
};
let
obj
=
cloneObject
(
this
.
queryParam
);
//表示
return
listData
(
Object
.
assign
(
params
,
obj
)).
then
(
res
=>
{
let
data
=
{};
if
(
res
.
page
.
state
!==
"success"
)
{
this
.
$message
.
error
(
"查询失败!"
,
5
);
this
.
emptyText
.
emptyText
=
'查询失败!'
data
=
{
data
:
[],
pageSize
:
parameter
.
pageSize
,
pageNo
:
1
,
totalCount
:
0
};
}
else
{
data
=
{
data
:
res
.
page
.
data
.
records
,
pageSize
:
parameter
.
pageSize
,
pageNo
:
parameter
.
pageNo
,
totalCount
:
res
.
page
.
data
.
total
};
}
return
data
;
});
}
}
},
methods
:{
search
()
{
this
.
$refs
.
table
.
refresh
({
search
:
true
})
},
add
(){
this
.
titleName
=
"添加"
this
.
modifyForm
.
stuNumber
=
""
;
this
.
modifyForm
.
StuName
=
""
;
setTimeout
(()
=>
{
this
.
Formtable
.
setFieldsValue
({
stuNumber
:
""
,
StuName
:
""
,
})
},
0
)
this
.
modifyvisible
=
true
;
},
//提交表单
createfunctionOk
(){
let
obj
=
cloneObject
(
this
.
modifyForm
);
addData
(
obj
).
then
(
res
=>
{
if
(
res
.
state
==
"success"
)
{
this
.
$notification
.
success
({
message
:
"添加成功!"
,
description
:
""
,
duration
:
4
});
}
else
{
let
msg
=
res
.
msg
!=
undefined
?
res
.
msg
:
"删除成功!"
;
this
.
$notification
.
error
({
message
:
msg
,
description
:
""
,
duration
:
4
});
}
this
.
search
();
});
this
.
modifyvisible
=
false
;
},
createfunctionCancel
(){
this
.
modifyvisible
=
false
;
},
deleteActivity
(
id
){
deleteData
({
id
:
id
}).
then
(
res
=>
{
if
(
res
.
state
==
"success"
)
{
this
.
$notification
.
success
({
message
:
"删除成功!"
,
description
:
""
,
duration
:
4
});
}
else
{
this
.
$notification
.
error
({
message
:
"删除失败!"
,
description
:
""
,
duration
:
4
});
}
this
.
search
();
});
},
}
}
</
script
>
<
style
scoped
>
</
style
>
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