Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bms-vue-obear
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
daywrite
bms-vue-obear
Commits
e111a349
Commit
e111a349
authored
Mar 17, 2019
by
daywrite
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save待办事项
parent
c9d53052
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
9 deletions
+44
-9
ajax.js
src/ajax.js
+14
-1
element.js
src/apis/element.js
+11
-0
scheduleForm.vue
src/components/schedule/scheduleForm.vue
+5
-6
scheduleModal.vue
src/components/schedule/scheduleModal.vue
+14
-2
No files found.
src/ajax.js
View file @
e111a349
import
createRequestor
from
'create-requestor'
import
{
default
as
API
}
from
'@/api'
const
dev
=
process
.
env
.
NODE_ENV
===
'development'
let
config
=
{
ajaxOption
:
{
method
:
'GE
T'
,
method
:
dev
?
'GET'
:
'POS
T'
,
dataType
:
'json'
,
contentType
:
'application/x-www-form-urlencoded; charset=UTF-8'
},
...
...
@@ -34,12 +36,23 @@ let config = {
let
ajax
=
createRequestor
(
config
)
let
setUrlK
=
(
o
)
=>
{
let
params
=
''
Object
.
keys
(
o
).
forEach
(
item
=>
{
params
+=
`&
${
item
}
=
${
o
[
item
]}
`
})
return
params
}
export
function
requestAPI
(
option
,
data
)
{
let
params
=
{
data
:
JSON
.
stringify
(
data
)
}
return
ajax
.
requestAPI
(
option
,
params
)
}
export
function
requestWithJsonAPI
(
option
,
data
)
{
if
(
dev
&&
data
)
{
option
.
url
+=
setUrlK
(
data
)
data
=
{}
}
return
ajax
.
requestAPI
(
option
,
data
)
}
...
...
src/apis/element.js
View file @
e111a349
...
...
@@ -7,5 +7,16 @@ export default {
// 新建待办事项获取下拉列表配置项
getSaveNew
:
{
url
:
'/vue/schedule/get-new'
+
urlEnd
},
// 搜索客户名称
getClientByName
:
{
url
:
'/vue/search/client-by-name'
+
urlEnd
},
// 保存待办事项
saveNewSchedule
:
{
url
:
'/vue/schedule/save-new'
+
urlEnd
}
}
src/components/schedule/scheduleForm.vue
View file @
e111a349
...
...
@@ -22,7 +22,7 @@
v-for=
"item in timeTypeArray"
:key=
"item.key"
:label=
"item.name"
:value=
"item.
id
"
>
:value=
"item.
key
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -48,7 +48,7 @@
v-for=
"item in alarmBeforeArray"
:key=
"item.key"
:label=
"item.name"
:value=
"item.
id
"
>
:value=
"item.
key
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -66,7 +66,7 @@
v-for=
"item in repeatTypeArray"
:key=
"item.key"
:label=
"item.name"
:value=
"item.
id
"
>
:value=
"item.
key
"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -80,7 +80,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"是否共享"
prop=
"
actName
"
class=
"ec-clear-left is-required"
>
<el-form-item
label=
"是否共享"
prop=
"
is_public
"
class=
"ec-clear-left is-required"
>
<el-radio-group
v-model=
"model.is_public"
size=
"small"
>
<el-radio
:label=
"1"
border
>
共享
</el-radio>
<el-radio
:label=
"0"
border
>
私人
</el-radio>
...
...
@@ -93,7 +93,7 @@
import
depSelect
from
'./depSelect'
import
settingMixin
from
'../common/settingMixin'
export
default
{
name
:
'
fullCut
Form'
,
name
:
'
schedule
Form'
,
mixins
:
[
settingMixin
],
...
...
@@ -118,7 +118,6 @@ export default {
},
created
()
{
// this.initSetting(['getNewArray'])
if
(
this
.
isCreate
)
{
this
.
queryOaDeptViaJanus
()
}
...
...
src/components/schedule/scheduleModal.vue
View file @
e111a349
...
...
@@ -6,12 +6,16 @@
</ScheduleForm>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<el-button
@
click=
"diaVis = false"
size=
"mini"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"
diaVis = fals
e"
size=
"mini"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"
sav
e"
size=
"mini"
>
确 定
</el-button>
</div>
</el-dialog>
</section>
</
template
>
<
script
>
import
{
requestWithJsonAPI
,
api
}
from
'@/lib/commonMixin'
import
ScheduleForm
from
'./scheduleForm'
export
default
{
...
...
@@ -23,7 +27,7 @@ export default {
return
{
diaVis
:
false
,
model
:
{
client_id
:
''
,
client_id
:
'
111
'
,
schedule_title
:
''
,
start_at
:
''
,
end_at
:
''
,
...
...
@@ -39,6 +43,14 @@ export default {
methods
:
{
show
()
{
this
.
diaVis
=
true
},
save
()
{
console
.
log
(
'this.model'
,
this
.
model
)
requestWithJsonAPI
(
api
.
saveNewSchedule
,
this
.
model
)
.
then
((
res
)
=>
{
console
.
log
(
res
)
})
}
}
}
...
...
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