Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
Project
Project
Details
Activity
Releases
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
周远喜
mes-ui
Commits
4dd6b381
Commit
4dd6b381
authored
Oct 20, 2020
by
仇晓婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击事件防重复提交
parent
2fccf7f8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
2790 additions
and
2369 deletions
+2790
-2369
add.vue
pages/basicData/cache/add.vue
+11
-12
edit.vue
pages/basicData/cache/edit.vue
+5
-5
add.vue
pages/basicData/calendar/class/add.vue
+54
-31
edit.vue
pages/basicData/calendar/class/edit.vue
+69
-49
add.vue
pages/basicData/calendar/holiday/add.vue
+65
-49
add copy.vue
pages/basicData/calendar/holiday/class/add copy.vue
+46
-45
add.vue
pages/basicData/calendar/holiday/class/add.vue
+4
-4
edit.vue
pages/basicData/calendar/holiday/class/edit.vue
+38
-36
edit.vue
pages/basicData/calendar/holiday/edit.vue
+63
-56
add.vue
pages/basicData/calendar/overtime/add.vue
+68
-59
edit.vue
pages/basicData/calendar/overtime/edit.vue
+60
-54
add.vue
pages/basicData/calendar/work/add.vue
+77
-67
edit.vue
pages/basicData/calendar/work/edit.vue
+70
-66
add.vue
pages/basicData/code/add.vue
+27
-32
edit.vue
pages/basicData/code/edit.vue
+29
-34
set.vue
pages/basicData/code/set.vue
+6
-6
Addrow.vue
pages/basicData/department/Addrow.vue
+3
-7
add.vue
pages/basicData/department/add.vue
+3
-9
edit.vue
pages/basicData/department/edit.vue
+15
-18
add.vue
pages/basicData/dic/components/add.vue
+1
-1
edit.vue
pages/basicData/dic/components/edit.vue
+1
-1
add.vue
pages/basicData/menu/add.vue
+58
-44
addApi.vue
pages/basicData/menu/addApi.vue
+2
-2
edit.vue
pages/basicData/menu/edit.vue
+40
-36
add.vue
pages/basicData/messageConfig/add.vue
+13
-7
edit.vue
pages/basicData/messageConfig/edit.vue
+15
-9
add.vue
pages/basicData/method/add.vue
+108
-82
edit.vue
pages/basicData/method/edit.vue
+114
-87
add.vue
pages/basicData/systemUser/add.vue
+262
-230
edit.vue
pages/basicData/systemUser/edit.vue
+269
-236
add.vue
pages/basicData/user/add.vue
+262
-230
edit.vue
pages/basicData/user/edit.vue
+269
-236
add.vue
pages/exception/add.vue
+187
-132
detail.vue
pages/exception/detail.vue
+1
-7
edit.vue
pages/exception/edit.vue
+160
-108
add.vue
pages/system/data_source/add.vue
+73
-69
edit.vue
pages/system/data_source/edit.vue
+79
-74
add.vue
pages/test/Message/add.vue
+72
-67
edit.vue
pages/test/Message/edit.vue
+78
-72
iview.js
plugins/iview.js
+13
-0
No files found.
pages/basicData/cache/add.vue
View file @
4dd6b381
...
@@ -3,14 +3,17 @@
...
@@ -3,14 +3,17 @@
<Row>
<Row>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('code')"
prop=
"code"
>
><FormItem
:label=
"l('code')"
prop=
"code"
>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem></Col>
<Input
v-model=
"entity.code"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('name')"
prop=
"name"
>
><FormItem
:label=
"l('name')"
prop=
"name"
>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem></Col>
<Input
v-model=
"entity.name"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
><FormItem
:label=
"l('duration')"
prop=
"duration"
>
<InputNumber
v-model=
"entity.duration"
></InputNumber>
</FormItem>
<InputNumber
v-model=
"entity.duration"
></InputNumber>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
><FormItem
:label=
"l('strategy')"
prop=
"strategy"
>
...
@@ -43,9 +46,7 @@
...
@@ -43,9 +46,7 @@
></Col>
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -56,7 +57,6 @@ export default {
...
@@ -56,7 +57,6 @@ export default {
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
code
:
""
,
code
:
""
,
name
:
""
,
name
:
""
,
...
@@ -69,7 +69,9 @@ export default {
...
@@ -69,7 +69,9 @@ export default {
rules
:
{
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
duration
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
,
type
:
"number"
}],
duration
:
[
{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
,
type
:
"number"
},
],
},
},
};
};
},
},
...
@@ -86,10 +88,8 @@ export default {
...
@@ -86,10 +88,8 @@ export default {
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -98,7 +98,6 @@ export default {
...
@@ -98,7 +98,6 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
...
pages/basicData/cache/edit.vue
View file @
4dd6b381
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
></Col>
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button
>
保存
</Button
>
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
...
@@ -84,10 +84,10 @@ export default {
...
@@ -84,10 +84,10 @@ export default {
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -96,7 +96,7 @@ export default {
...
@@ -96,7 +96,7 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
...
pages/basicData/calendar/class/add.vue
View file @
4dd6b381
...
@@ -3,17 +3,31 @@
...
@@ -3,17 +3,31 @@
<Row>
<Row>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftWorkSchedCode')"
prop=
"shiftWorkSchedCode"
>
<FormItem
:label=
"l('shiftWorkSchedCode')"
prop=
"shiftWorkSchedCode"
>
<Input
v-model=
"entity.shiftWorkSchedCode"
placeholder=
"请填写班次编号"
style=
"width: 90%"
></Input>
<Input
v-model=
"entity.shiftWorkSchedCode"
placeholder=
"请填写班次编号"
style=
"width: 90%"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<FormItem
:label=
"l('shiftName')"
prop=
"shiftName"
>
<Input
v-model=
"entity.shiftName"
placeholder=
"请填写班次名称"
style=
"width: 90%"
></Input>
<Input
v-model=
"entity.shiftName"
placeholder=
"请填写班次名称"
style=
"width: 90%"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStartEnd')"
prop=
"shiftStartEnd"
>
<FormItem
:label=
"l('shiftStartEnd')"
prop=
"shiftStartEnd"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"请选择时间段"
style=
"width: 130px"
></TimePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"请选择时间段"
style=
"width: 130px"
></TimePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"24"
>
<!--
<Col
:span=
"24"
>
...
@@ -28,7 +42,7 @@
...
@@ -28,7 +42,7 @@
</Col>
-->
</Col>
-->
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -39,39 +53,49 @@ export default {
...
@@ -39,39 +53,49 @@ export default {
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
"请填写班次编号"
,
trigger
:
"blur"
}],
shiftWorkSchedCode
:
[
shiftName
:
[{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
}],
{
required
:
true
,
message
:
"请填写班次编号"
,
trigger
:
"blur"
},
shiftStartEnd
:
[{
],
shiftName
:
[
{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
},
],
shiftStartEnd
:
[
{
required
:
true
,
required
:
true
,
type
:
'array'
,
type
:
"array"
,
message
:
"请选择班次时间段"
,
message
:
"请选择班次时间段"
,
trigger
:
'blur'
,
trigger
:
"blur"
,
fields
:
{
fields
:
{
0
:
{
type
:
"string"
,
required
:
true
,
message
:
"请选择班次时间段"
},
0
:
{
1
:
{
type
:
"string"
,
required
:
true
,
message
:
"请选择班次时间段"
}
type
:
"string"
,
}
required
:
true
,
}
message
:
"请选择班次时间段"
,
},
1
:
{
type
:
"string"
,
required
:
true
,
message
:
"请选择班次时间段"
,
},
},
},
],
],
}
}
,
};
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
var
data
=
this
.
$u
.
clone
(
this
.
entity
);
var
data
=
this
.
$u
.
clone
(
this
.
entity
)
data
.
shiftStart
=
this
.
entity
.
shiftStartEnd
[
0
];
data
.
shiftStart
=
this
.
entity
.
shiftStartEnd
[
0
]
data
.
shiftEnd
=
this
.
entity
.
shiftStartEnd
[
1
];
data
.
shiftEnd
=
this
.
entity
.
shiftStartEnd
[
1
]
Api
.
create
(
data
)
Api
.
create
(
data
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -79,8 +103,7 @@ export default {
...
@@ -79,8 +103,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
@@ -93,12 +116,12 @@ export default {
...
@@ -93,12 +116,12 @@ export default {
l
(
key
)
{
l
(
key
)
{
key
=
"mes_shift_work_sched"
+
"."
+
key
;
key
=
"mes_shift_work_sched"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
}
}
,
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
pages/basicData/calendar/class/edit.vue
View file @
4dd6b381
...
@@ -13,22 +13,38 @@
...
@@ -13,22 +13,38 @@
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStartEnd')"
prop=
"shiftStartEnd"
>
<FormItem
:label=
"l('shiftStartEnd')"
prop=
"shiftStartEnd"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStartEnd"
type=
"timerange"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<FormItem
:label=
"l('shiftStart')"
prop=
"shiftStart"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStart"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftStart"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('shiftEnd')"
prop=
"shiftEnd"
>
<FormItem
:label=
"l('shiftEnd')"
prop=
"shiftEnd"
>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftEnd"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
<TimePicker
format=
"HH:mm"
v-model=
"entity.shiftEnd"
placeholder=
"选择时间段"
style=
"width: 130px"
></TimePicker>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -39,49 +55,54 @@ export default {
...
@@ -39,49 +55,54 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
"请填写班次编号"
,
trigger
:
"blur"
}],
shiftWorkSchedCode
:
[
shiftName
:
[{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
}],
{
required
:
true
,
message
:
"请填写班次编号"
,
trigger
:
"blur"
},
shiftStart
:
[{
],
shiftName
:
[
{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
},
],
shiftStart
:
[
{
required
:
true
,
required
:
true
,
message
:
"请选择开始时间"
,
message
:
"请选择开始时间"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
shiftEnd
:
[{
],
shiftEnd
:
[
{
required
:
true
,
required
:
true
,
message
:
"请选择结束时间"
,
message
:
"请选择结束时间"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
}
],
},
};
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
(
(
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
this
.
$emit
(
"on-load"
);
});
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
var
data
=
this
.
entity
;
var
data
=
this
.
entity
let
startime
=
data
.
shiftStart
;
let
startime
=
data
.
shiftStart
let
endtime
=
data
.
shiftEnd
;
let
endtime
=
data
.
shiftEnd
if
(
startime
>
endtime
)
{
if
(
startime
>
endtime
){
alert
(
"结束时间不能小于开始时间!"
);
alert
(
"结束时间不能小于开始时间!"
);
this
.
disabled
=
false
;
return
;
return
;
}
else
{
}
else
{
Api
.
update
(
data
)
Api
.
update
(
data
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -89,8 +110,7 @@ export default {
...
@@ -89,8 +110,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
@@ -104,14 +124,14 @@ export default {
...
@@ -104,14 +124,14 @@ export default {
l
(
key
)
{
l
(
key
)
{
key
=
"mes_shift_work_sched"
+
"."
+
key
;
key
=
"mes_shift_work_sched"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
}
,
}
}
,
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/add.vue
View file @
4dd6b381
...
@@ -3,12 +3,20 @@
...
@@ -3,12 +3,20 @@
<Row>
<Row>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('holidayId')"
prop=
"holidayId"
>
<FormItem
:label=
"l('holidayId')"
prop=
"holidayId"
>
<Input
v-model=
"entity.holidayId"
placeholder=
"请填写节假日编号"
style=
"width: 90%"
></Input>
<Input
v-model=
"entity.holidayId"
placeholder=
"请填写节假日编号"
style=
"width: 90%"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('holidayName')"
prop=
"holidayName"
>
<FormItem
:label=
"l('holidayName')"
prop=
"holidayName"
>
<Input
v-model=
"entity.holidayName"
placeholder=
"请填写节假日名称"
style=
"width: 90%"
></Input>
<Input
v-model=
"entity.holidayName"
placeholder=
"请填写节假日名称"
style=
"width: 90%"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"24"
>
<!--
<Col
:span=
"24"
>
...
@@ -24,17 +32,25 @@
...
@@ -24,17 +32,25 @@
</Col>
-->
</Col>
-->
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('holidayStart')"
prop=
"holidayStart"
>
<FormItem
:label=
"l('holidayStart')"
prop=
"holidayStart"
>
<DatePicker
type=
"date"
placeholder=
"请选择开始日期"
v-model=
"entity.holidayStart"
></DatePicker>
<DatePicker
type=
"date"
placeholder=
"请选择开始日期"
v-model=
"entity.holidayStart"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
<FormItem
:label=
"l('holidayEnd')"
prop=
"holidayEnd"
>
<FormItem
:label=
"l('holidayEnd')"
prop=
"holidayEnd"
>
<DatePicker
type=
"date"
placeholder=
"请选择结束日期"
v-model=
"entity.holidayEnd"
></DatePicker>
<DatePicker
type=
"date"
placeholder=
"请选择结束日期"
v-model=
"entity.holidayEnd"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -45,27 +61,30 @@ export default {
...
@@ -45,27 +61,30 @@ export default {
name
:
"Add"
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
holidayId
:
[
holidayId
:
[
{
required
:
true
,
message
:
"请填写节假日编号"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请填写节假日编号"
,
trigger
:
"blur"
}
,
],
],
holidayName
:
[
holidayName
:
[
{
required
:
true
,
message
:
"请填写节假日名称"
,
trigger
:
"blur"
}
{
required
:
true
,
message
:
"请填写节假日名称"
,
trigger
:
"blur"
}
,
],
],
holidayStart
:
[{
holidayStart
:
[
{
required
:
true
,
required
:
true
,
type
:
"date"
,
type
:
"date"
,
message
:
"请选择开始时间"
,
message
:
"请选择开始时间"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
holidayEnd
:
[{
],
holidayEnd
:
[
{
required
:
true
,
required
:
true
,
type
:
"date"
,
type
:
"date"
,
message
:
"请选择结束时间"
,
message
:
"请选择结束时间"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
],
// holidayTimeslot: [
// holidayTimeslot: [
// {
// {
// required: true,
// required: true,
...
@@ -79,27 +98,25 @@ export default {
...
@@ -79,27 +98,25 @@ export default {
// }
// }
// ]
// ]
}
}
,
};
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
(
(
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
let
startime
=
this
.
entity
.
holidayStart
;
let
startime
=
this
.
entity
.
holidayStart
let
endtime
=
this
.
entity
.
holidayEnd
;
let
endtime
=
this
.
entity
.
holidayEnd
if
(
startime
.
getTime
()
>
endtime
.
getTime
())
{
if
(
startime
.
getTime
()
>
endtime
.
getTime
()){
this
.
$Message
.
error
(
"结束时间不能大于开始时间!"
);
alert
(
"结束时间不能大于开始时间!"
);
this
.
disabled
=
false
;
return
;
return
;
}
else
{
}
else
{
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -107,8 +124,7 @@ export default {
...
@@ -107,8 +124,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
@@ -122,12 +138,12 @@ export default {
...
@@ -122,12 +138,12 @@ export default {
l
(
key
)
{
l
(
key
)
{
key
=
"calendar_holiday"
+
"."
+
key
;
key
=
"calendar_holiday"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
}
}
,
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
}
,
}
}
,
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/class/add copy.vue
View file @
4dd6b381
...
@@ -23,33 +23,35 @@
...
@@ -23,33 +23,35 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
'请填写编号'
,
trigger
:
'blur'
}],
shiftWorkSchedCode
:
[
shiftName
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}],
{
required
:
true
,
message
:
"请填写编号"
,
trigger
:
"blur"
},
}
],
}
shiftName
:
[
{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
},
],
},
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
// let parmes = {
// let parmes = {
// pageIndex: 1,
// pageIndex: 1,
// pageSize: 20,
// pageSize: 20,
...
@@ -66,47 +68,46 @@ export default {
...
@@ -66,47 +68,46 @@ export default {
// console.log(r.success)
// console.log(r.success)
// if(r.success){
// if(r.success){
// this.$Message.error("该班次名称已存在!")
// this.$Message.error("该班次名称已存在!")
// this.disabled = true
// return
// return
// }else{
// }else{
let
pames
=
{
let
pames
=
{
title
:
this
.
entity
.
title
,
title
:
this
.
entity
.
title
,
startendTime
:
this
.
entity
.
startendTime
.
join
(
'-'
)
startendTime
:
this
.
entity
.
startendTime
.
join
(
"-"
),
}
};
Api
.
create
(
pames
)
Api
.
create
(
pames
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
// this.disabled = false
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
'保存成功'
)
this
.
entity
=
{};
this
.
entity
=
{}
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
'on-ok'
)
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
)
console
.
warn
(
err
);
})
});
}
}
})
});
// }
// }
// })
// })
},
},
handleClose
()
{
handleClose
()
{
this
.
entity
=
{}
this
.
entity
=
{}
;
this
.
disabled
=
true
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
key
=
"calendar_class"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
;
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/class/add.vue
View file @
4dd6b381
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
name
:
'Add'
,
name
:
'Add'
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
'请填写编号'
,
trigger
:
'blur'
}],
shiftWorkSchedCode
:
[{
required
:
true
,
message
:
'请填写编号'
,
trigger
:
'blur'
}],
...
@@ -49,7 +49,7 @@ export default {
...
@@ -49,7 +49,7 @@ export default {
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
// let parmes = {
// let parmes = {
// pageIndex: 1,
// pageIndex: 1,
// pageSize: 20,
// pageSize: 20,
...
@@ -95,7 +95,7 @@ export default {
...
@@ -95,7 +95,7 @@ export default {
},
},
handleClose
()
{
handleClose
()
{
this
.
entity
=
{}
this
.
entity
=
{}
this
.
disabled
=
true
this
.
$emit
(
'on-close'
)
this
.
$emit
(
'on-close'
)
},
},
l
(
key
)
{
l
(
key
)
{
...
...
pages/basicData/calendar/holiday/class/edit.vue
View file @
4dd6b381
...
@@ -9,85 +9,87 @@
...
@@ -9,85 +9,87 @@
<Col
span=
"24"
>
<Col
span=
"24"
>
<!-- prop="startendTime" -->
<!-- prop="startendTime" -->
<FormItem
:label=
"l('startendTime')"
>
<FormItem
:label=
"l('startendTime')"
>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
<TimePicker
type=
"timerange"
format=
"HH:mm"
v-model=
"entity.startendTime"
placeholder=
"请选择时间段"
></TimePicker>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
title
:
[{
required
:
true
,
message
:
'请填写班次名称'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
"请填写班次名称"
,
trigger
:
"blur"
}],
// startendTime: [{ required: true, message: '请选择时间段', trigger: 'blur' }],
// startendTime: [{ required: true, message: '请选择时间段', trigger: 'blur' }],
}
}
,
}
}
;
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
r
.
result
.
startendTime
=
r
.
result
.
startendTime
.
split
(
'-'
)
r
.
result
.
startendTime
=
r
.
result
.
startendTime
.
split
(
"-"
);
this
.
entity
=
r
.
result
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
let
startendTime
=
this
.
entity
.
startendTime
let
startendTime
=
this
.
entity
.
startendTime
;
let
pames
=
{
let
pames
=
{
title
:
this
.
entity
.
title
,
title
:
this
.
entity
.
title
,
startendTime
:
startendTime
.
join
(
'-'
),
startendTime
:
startendTime
.
join
(
"-"
),
workHours
:
this
.
entity
.
workHours
,
workHours
:
this
.
entity
.
workHours
,
creationTime
:
this
.
entity
.
creationTime
,
creationTime
:
this
.
entity
.
creationTime
,
creatorUserId
:
this
.
entity
.
creatorUserId
,
creatorUserId
:
this
.
entity
.
creatorUserId
,
id
:
this
.
entity
.
id
,
id
:
this
.
entity
.
id
,
}
}
;
Api
.
update
(
pames
)
Api
.
update
(
pames
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
// console.warn(err)
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_class'
+
'.'
+
key
key
=
"calendar_class"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
);
}
}
}
}
},
}
},
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/holiday/edit.vue
View file @
4dd6b381
...
@@ -23,91 +23,98 @@
...
@@ -23,91 +23,98 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
holidayId
:
[{
required
:
true
,
message
:
'请填写节假日编号'
,
trigger
:
'blur'
}],
holidayId
:
[
holidayName
:
[{
required
:
true
,
message
:
'请填写节假日名称'
,
trigger
:
'blur'
}],
{
required
:
true
,
message
:
"请填写节假日编号"
,
trigger
:
"blur"
},
holidayStart
:
[{
],
holidayName
:
[
{
required
:
true
,
message
:
"请填写节假日名称"
,
trigger
:
"blur"
},
],
holidayStart
:
[
{
required
:
true
,
required
:
true
,
type
:
"date"
,
type
:
"date"
,
message
:
"请选择开始时间"
,
message
:
"请选择开始时间"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
holidayEnd
:
[{
],
holidayEnd
:
[
{
required
:
true
,
required
:
true
,
type
:
"date"
,
type
:
"date"
,
message
:
"请选择结束时间"
,
message
:
"请选择结束时间"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
}
],
}
},
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
let
startime
=
this
.
entity
.
holidayStart
;
let
startime
=
this
.
entity
.
holidayStart
let
endtime
=
this
.
entity
.
holidayEnd
;
let
endtime
=
this
.
entity
.
holidayEnd
if
(
startime
.
getTime
()
>
endtime
.
getTime
())
{
if
(
startime
.
getTime
()
>
endtime
.
getTime
()){
this
.
$Message
.
error
(
"结束时间不能小于开始时间!"
);
alert
(
"结束时间不能小于开始时间!"
);
this
.
disabled
=
false
;
return
;
return
;
}
else
{
}
else
{
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_holiday'
+
'.'
+
key
key
=
"calendar_holiday"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
);
}
}
}
}
},
}
},
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/overtime/add.vue
View file @
4dd6b381
...
@@ -18,113 +18,122 @@
...
@@ -18,113 +18,122 @@
v-for=
"item in orderCatList"
v-for=
"item in orderCatList"
:value=
"item.id"
:value=
"item.id"
:key=
"item.index"
:key=
"item.index"
:label=
"item.title
+'('+ item.startendTime +
')'"
:label=
"item.title
+ '(' + item.startendTime +
')'"
></Option>
></Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
id
:[],
id
:
[],
title
:
""
,
title
:
""
,
holidayId
:[],
holidayId
:
[],
holidayTitle
:
""
,
holidayTitle
:
""
,
selectItems
:
[],
//选中的加班日历
selectItems
:
[],
//选中的加班日历
},
},
orderCatList
:
[],
orderCatList
:
[],
rules
:
{
rules
:
{
holidayCalId
:
[{
required
:
true
,
message
:
'请填写日历编号'
,
trigger
:
'blur'
}],
holidayCalId
:
[
holidayCalName
:
[{
required
:
true
,
message
:
'请填写日历名称'
,
trigger
:
'blur'
}],
{
required
:
true
,
message
:
"请填写日历编号"
,
trigger
:
"blur"
},
],
holidayCalName
:
[
{
required
:
true
,
message
:
"请填写日历名称"
,
trigger
:
"blur"
},
],
holidayId
:
[
holidayId
:
[
{
required
:
true
,
type
:
'array'
,
min
:
1
,
message
:
'请选择关联假日'
,
trigger
:
'change'
},
{
]
required
:
true
,
}
type
:
"array"
,
}
min
:
1
,
message
:
"请选择关联假日"
,
trigger
:
"change"
,
},
],
},
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
created
()
{
created
()
{
this
.
selectAry
()
this
.
selectAry
()
;
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
let
titles
=
[];
let
titles
=
[];
this
.
selectItems
.
map
((
u
)
=>
{
this
.
selectItems
.
map
(
u
=>
{
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
);
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
)
});
})
let
parme
=
{
let
parme
=
{
holidayCalId
:
this
.
entity
.
holidayCalId
,
holidayCalId
:
this
.
entity
.
holidayCalId
,
holidayCalName
:
this
.
entity
.
holidayCalName
,
holidayCalName
:
this
.
entity
.
holidayCalName
,
mesHolidayTitles
:
titles
.
join
(),
mesHolidayTitles
:
titles
.
join
(),
mesHolidayIds
:
this
.
entity
.
holidayId
.
join
(),
mesHolidayIds
:
this
.
entity
.
holidayId
.
join
(),
}
}
;
Api
.
create
(
parme
)
.
then
((
r
)
=>
{
Api
.
create
(
parme
)
this
.
disabled
=
false
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
entity
.
holidayId
=
[];
this
.
entity
.
holidayId
=
[];
this
.
$refs
.
form
.
resetFields
();
this
.
$refs
.
form
.
resetFields
();
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
selectAry
()
{
selectAry
()
{
Api
.
getlist
().
then
((
res
)
=>
{
Api
.
getlist
().
then
((
res
)
=>
{
console
.
log
(
"加班日历"
,
res
)
console
.
log
(
"加班日历"
,
res
);
this
.
orderCatList
=
res
.
result
this
.
orderCatList
=
res
.
result
;
})
})
;
},
},
getItems
(
v
){
//获取所有选中项;
getItems
(
v
)
{
var
items
=
this
.
orderCatList
.
filter
(
u
=>
{
//获取所有选中项;
return
v
.
indexOf
(
u
.
id
)
>-
1
var
items
=
this
.
orderCatList
.
filter
((
u
)
=>
{
})
return
v
.
indexOf
(
u
.
id
)
>
-
1
;
this
.
selectItems
=
items
;
});
this
.
selectItems
=
items
;
},
},
getHours
(){
//获取工时
getHours
()
{
let
sum
=
0
;
//获取工时
this
.
selectItems
.
map
(
u
=>
{
let
sum
=
0
;
sum
+=
u
.
workHours
;
this
.
selectItems
.
map
((
u
)
=>
{
sum
+=
u
.
workHours
;
});
});
return
sum
;
return
sum
;
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_overtime'
+
'.'
+
key
key
=
"calendar_overtime"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
;
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/overtime/edit.vue
View file @
4dd6b381
...
@@ -18,116 +18,122 @@
...
@@ -18,116 +18,122 @@
v-for=
"item in orderCatList"
v-for=
"item in orderCatList"
:value=
"item.id"
:value=
"item.id"
:key=
"item.index"
:key=
"item.index"
:label=
"item.title
+'('+ item.startendTime +
')'"
:label=
"item.title
+ '(' + item.startendTime +
')'"
></Option>
></Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
selectItems
:
[],
//选中的加班日历
selectItems
:
[],
//选中的加班日历
orderCatList
:
[],
orderCatList
:
[],
rules
:
{
rules
:
{
holidayCalId
:
[{
required
:
true
,
message
:
'请填写日历编号'
,
trigger
:
'blur'
}],
holidayCalId
:
[
holidayCalName
:
[{
required
:
true
,
message
:
'请填写日历名称'
,
trigger
:
'blur'
}],
{
required
:
true
,
message
:
"请填写日历编号"
,
trigger
:
"blur"
},
],
holidayCalName
:
[
{
required
:
true
,
message
:
"请填写日历名称"
,
trigger
:
"blur"
},
],
classId
:
[
classId
:
[
{
required
:
true
,
type
:
'array'
,
min
:
1
,
message
:
'请选择关联节日'
,
trigger
:
'change'
},
{
]
required
:
true
,
}
type
:
"array"
,
}
min
:
1
,
message
:
"请选择关联节日"
,
trigger
:
"change"
,
},
],
},
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
created
()
{
created
()
{
this
.
selectAry
()
this
.
selectAry
()
;
},
},
methods
:
{
methods
:
{
selectAry
()
{
selectAry
()
{
Api
.
getlist
().
then
((
res
)
=>
{
Api
.
getlist
().
then
((
res
)
=>
{
this
.
orderCatList
=
res
.
result
this
.
orderCatList
=
res
.
result
;
})
})
;
},
},
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
let
dataForm
=
r
.
result
let
dataForm
=
r
.
result
;
if
(
dataForm
.
mesHolidayIds
)
{
if
(
dataForm
.
mesHolidayIds
)
{
let
ids
=
dataForm
.
mesHolidayIds
.
split
(
','
)
let
ids
=
dataForm
.
mesHolidayIds
.
split
(
","
);
var
uids
=
[]
var
uids
=
[]
;
ids
.
map
((
u
)
=>
{
ids
.
map
((
u
)
=>
{
uids
.
push
(
parseInt
(
u
))
uids
.
push
(
parseInt
(
u
))
;
})
})
;
this
.
getItems
(
uids
)
this
.
getItems
(
uids
)
;
dataForm
.
classId
=
uids
dataForm
.
classId
=
uids
;
}
else
{
}
else
{
dataForm
.
classId
=
[]
dataForm
.
classId
=
[]
;
}
}
this
.
entity
=
dataForm
this
.
entity
=
dataForm
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
let
titles
=
[];
let
titles
=
[]
this
.
selectItems
.
map
((
u
)
=>
{
this
.
selectItems
.
map
((
u
)
=>
{
titles
.
push
(
u
.
title
+
'('
+
u
.
startendTime
+
')'
)
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
);
})
})
;
var
data
=
this
.
$u
.
clone
(
this
.
entity
)
var
data
=
this
.
$u
.
clone
(
this
.
entity
)
;
data
.
mesHolidayTitles
=
titles
.
join
()
data
.
mesHolidayTitles
=
titles
.
join
()
;
data
.
mesHolidayIds
=
this
.
entity
.
classId
.
join
()
data
.
mesHolidayIds
=
this
.
entity
.
classId
.
join
()
;
Api
.
update
(
data
)
Api
.
update
(
data
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
getItems
(
v
)
{
getItems
(
v
)
{
var
items
=
this
.
orderCatList
.
filter
((
u
)
=>
{
var
items
=
this
.
orderCatList
.
filter
((
u
)
=>
{
return
v
.
indexOf
(
u
.
id
)
>
-
1
return
v
.
indexOf
(
u
.
id
)
>
-
1
;
})
});
this
.
selectItems
=
items
this
.
selectItems
=
items
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_overtime'
+
'.'
+
key
key
=
"calendar_overtime"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/work/add.vue
View file @
4dd6b381
...
@@ -13,134 +13,144 @@
...
@@ -13,134 +13,144 @@
</Col>
</Col>
<Col
span=
"24"
>
<Col
span=
"24"
>
<FormItem
:label=
"l('shiftName')"
prop=
"mesShiftWorkSchedIds"
>
<FormItem
:label=
"l('shiftName')"
prop=
"mesShiftWorkSchedIds"
>
<Select
v-model=
"entity.mesShiftWorkSchedIds"
multiple
@
on-change=
"getItems"
>
<Select
v-model=
"entity.mesShiftWorkSchedIds"
multiple
@
on-change=
"getItems"
>
<Option
<Option
v-for=
"item in orderCatList"
v-for=
"item in orderCatList"
:value=
"item.id"
:value=
"item.id"
:key=
"item.index"
:key=
"item.index"
:label=
"item.title
+'('+ item.startendTime +
')'"
:label=
"item.title
+ '(' + item.startendTime +
')'"
></Option>
></Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
orderCatList
:
[],
orderCatList
:
[],
multipleFlag
:
false
,
multipleFlag
:
false
,
vlableLis
:
[],
vlableLis
:
[],
sum
:
0
,
sum
:
0
,
idList
:
[],
idList
:
[],
titleClass
:
''
,
titleClass
:
""
,
titleClass02
:
''
,
titleClass02
:
""
,
entity
:
{
entity
:
{
id
:[],
id
:
[],
title
:
""
,
title
:
""
,
mesShiftWorkSchedIds
:[],
mesShiftWorkSchedIds
:
[],
calendarClassTitle
:
""
,
calendarClassTitle
:
""
,
workHours
:
0
workHours
:
0
,
},
},
selectItems
:
[],
//选中的加班日历
selectItems
:
[],
//选中的加班日历
rules
:
{
rules
:
{
calId
:
[{
required
:
true
,
message
:
'请填写日历编号'
,
trigger
:
'blur'
}],
calId
:
[{
required
:
true
,
message
:
"请填写日历编号"
,
trigger
:
"blur"
}],
calName
:
[{
required
:
true
,
message
:
'请填写日历名称'
,
trigger
:
'blur'
}],
calName
:
[
{
required
:
true
,
message
:
"请填写日历名称"
,
trigger
:
"blur"
},
],
mesShiftWorkSchedIds
:
[
mesShiftWorkSchedIds
:
[
{
required
:
true
,
type
:
'array'
,
min
:
1
,
message
:
'请选择关联班次'
,
trigger
:
'change'
},
{
]
required
:
true
,
}
type
:
"array"
,
}
min
:
1
,
message
:
"请选择关联班次"
,
trigger
:
"change"
,
},
],
},
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
created
()
{
created
()
{
this
.
selectAry
()
this
.
selectAry
()
;
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
let
titles
=
[];
let
titles
=
[];
this
.
selectItems
.
map
((
u
)
=>
{
this
.
selectItems
.
map
(
u
=>
{
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
);
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
)
});
})
let
parme
=
{
let
parme
=
{
calId
:
this
.
entity
.
calId
,
calId
:
this
.
entity
.
calId
,
calName
:
this
.
entity
.
calName
,
calName
:
this
.
entity
.
calName
,
shiftName
:
titles
.
join
(),
shiftName
:
titles
.
join
(),
mesShiftWorkSchedIds
:
this
.
entity
.
mesShiftWorkSchedIds
.
join
(),
mesShiftWorkSchedIds
:
this
.
entity
.
mesShiftWorkSchedIds
.
join
(),
workingLong
:
this
.
getHours
()
workingLong
:
this
.
getHours
(),
}
}
;
Api
.
create
(
parme
)
Api
.
create
(
parme
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
entity
.
mesShiftWorkSchedIds
=
[];
this
.
entity
.
mesShiftWorkSchedIds
=
[];
this
.
$refs
.
form
.
resetFields
();
this
.
$refs
.
form
.
resetFields
();
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
// this.orderCatList = []
// this.orderCatList = []
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
selectAry
()
{
selectAry
()
{
let
parmse
=
{
let
parmse
=
{
pageIndex
:
0
,
pageIndex
:
0
,
cont
:
0
,
cont
:
0
,
conditions
:
[],
conditions
:
[],
pageSize
:
20
pageSize
:
20
,
}
}
;
Api
.
getlist
().
then
((
res
)
=>
{
Api
.
getlist
().
then
((
res
)
=>
{
// console.log("工作日历",res)
// console.log("工作日历",res)
this
.
orderCatList
=
res
.
result
this
.
orderCatList
=
res
.
result
;
})
})
;
},
},
getItems
(
v
){
//获取所有选中项;
getItems
(
v
)
{
var
items
=
this
.
orderCatList
.
filter
(
u
=>
{
//获取所有选中项;
return
v
.
indexOf
(
u
.
id
)
>-
1
var
items
=
this
.
orderCatList
.
filter
((
u
)
=>
{
})
return
v
.
indexOf
(
u
.
id
)
>
-
1
;
this
.
selectItems
=
items
;
});
this
.
selectItems
=
items
;
},
},
getHours
(){
//获取工时
getHours
()
{
let
sum
=
0
;
//获取工时
this
.
selectItems
.
map
(
u
=>
{
let
sum
=
0
;
sum
+=
u
.
workHours
;
this
.
selectItems
.
map
((
u
)
=>
{
sum
+=
u
.
workHours
;
});
});
return
sum
;
return
sum
;
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_work'
+
'.'
+
key
key
=
"calendar_work"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
;
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/calendar/work/edit.vue
View file @
4dd6b381
...
@@ -18,130 +18,134 @@
...
@@ -18,130 +18,134 @@
v-for=
"item in orderCatList"
v-for=
"item in orderCatList"
:value=
"item.id"
:value=
"item.id"
:key=
"item.index"
:key=
"item.index"
:label=
"item.title
+'('+ item.startendTime +
')'"
:label=
"item.title
+ '(' + item.startendTime +
')'"
></Option>
></Option>
</Select>
</Select>
</FormItem>
</FormItem>
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
orderCatList
:
[],
orderCatList
:
[],
selectItems
:
[],
//选中的加班日历
selectItems
:
[],
//选中的加班日历
rules
:
{
rules
:
{
calId
:
[{
required
:
true
,
message
:
'请填写日历编号'
,
trigger
:
'blur'
}],
calId
:
[{
required
:
true
,
message
:
"请填写日历编号"
,
trigger
:
"blur"
}],
calName
:
[{
required
:
true
,
message
:
'请填写日历名称'
,
trigger
:
'blur'
}],
calName
:
[
{
required
:
true
,
message
:
"请填写日历名称"
,
trigger
:
"blur"
},
],
classId
:
[
classId
:
[
{
required
:
true
,
type
:
'array'
,
min
:
1
,
message
:
'请选择关联班次'
,
trigger
:
'change'
},
{
]
required
:
true
,
}
type
:
"array"
,
}
min
:
1
,
message
:
"请选择关联班次"
,
trigger
:
"change"
,
},
],
},
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
created
()
{
created
()
{
this
.
selectList
()
this
.
selectList
()
;
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
let
dataForm
=
r
.
result
let
dataForm
=
r
.
result
;
if
(
dataForm
.
mesShiftWorkSchedIds
){
if
(
dataForm
.
mesShiftWorkSchedIds
)
{
let
ids
=
dataForm
.
mesShiftWorkSchedIds
.
split
(
','
)
let
ids
=
dataForm
.
mesShiftWorkSchedIds
.
split
(
","
);
var
uids
=
[];
var
uids
=
[];
ids
.
map
(
u
=>
{
ids
.
map
(
(
u
)
=>
{
uids
.
push
(
parseInt
(
u
))
uids
.
push
(
parseInt
(
u
))
;
})
})
;
console
.
warn
(
uids
)
console
.
warn
(
uids
)
;
this
.
getItems
(
uids
);
this
.
getItems
(
uids
);
dataForm
.
classId
=
uids
;
dataForm
.
classId
=
uids
;
}
else
{
}
else
{
dataForm
.
classId
=
[];
dataForm
.
classId
=
[];
}
}
this
.
entity
=
dataForm
this
.
entity
=
dataForm
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
selectList
()
{
selectList
()
{
Api
.
getlist
().
then
((
res
)
=>
{
Api
.
getlist
().
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
;
this
.
orderCatList
=
res
.
result
this
.
orderCatList
=
res
.
result
;
})
})
;
},
},
getItems
(
v
)
{
getItems
(
v
)
{
//获取所有选中项;
//获取所有选中项;
var
items
=
this
.
orderCatList
.
filter
((
u
)
=>
{
var
items
=
this
.
orderCatList
.
filter
((
u
)
=>
{
console
.
log
(
u
.
id
)
console
.
log
(
u
.
id
)
;
return
v
.
indexOf
(
u
.
id
)
>
-
1
return
v
.
indexOf
(
u
.
id
)
>
-
1
;
})
})
;
this
.
selectItems
=
items
this
.
selectItems
=
items
;
console
.
log
(
this
.
selectItems
)
console
.
log
(
this
.
selectItems
)
;
},
},
getHours
()
{
getHours
()
{
let
sum
=
0
let
sum
=
0
;
this
.
selectItems
.
map
((
u
)
=>
{
this
.
selectItems
.
map
((
u
)
=>
{
sum
+=
u
.
workHours
sum
+=
u
.
workHours
;
})
})
;
return
sum
return
sum
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
let
titles
=
[];
let
titles
=
[];
this
.
selectItems
.
map
((
u
)
=>
{
this
.
selectItems
.
map
(
u
=>
{
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
);
titles
.
push
(
u
.
title
+
"("
+
u
.
startendTime
+
")"
)
});
})
this
.
entity
.
shiftName
=
titles
.
join
();
this
.
entity
.
shiftName
=
titles
.
join
();
var
data
=
this
.
$u
.
clone
(
this
.
entity
);
var
data
=
this
.
$u
.
clone
(
this
.
entity
);
data
.
mesShiftWorkSchedIds
=
this
.
entity
.
classId
.
join
();
data
.
mesShiftWorkSchedIds
=
this
.
entity
.
classId
.
join
();
data
.
workingLong
=
this
.
getHours
();
data
.
workingLong
=
this
.
getHours
();
Api
.
update
(
data
)
Api
.
update
(
data
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'calendar_work'
+
'.'
+
key
key
=
"calendar_work"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
);
}
}
}
}
}
},
},
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/code/add.vue
View file @
4dd6b381
...
@@ -37,69 +37,64 @@
...
@@ -37,69 +37,64 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
day
:
'1'
,
day
:
"1"
,
maxSerial
:
0
maxSerial
:
0
,
},
},
rules
:
{
rules
:
{
businessName
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
businessName
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
businessCode
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
businessCode
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
}
,
}
}
;
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
this
.
entity
=
{}
this
.
entity
=
{};
this
.
entity
.
maxSerial
=
0
;
this
.
entity
.
maxSerial
=
0
;
this
.
disabled
=
false
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
this
.
disabled
=
false
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'business_code_config'
+
'.'
+
key
key
=
"business_code_config"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
;
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/code/edit.vue
View file @
4dd6b381
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<FormItem
:label=
"l('day')"
prop=
"day"
>
<FormItem
:label=
"l('day')"
prop=
"day"
>
<Dictionary
<Dictionary
code=
"mes_xingchi_system.business_code_config.day"
code=
"mes_xingchi_system.business_code_config.day"
:value=
'entity.day'
:value=
"entity.day"
:key=
"entity.day"
:key=
"entity.day"
v-model=
"entity.day"
v-model=
"entity.day"
type=
"radio"
type=
"radio"
...
@@ -40,75 +40,70 @@
...
@@ -40,75 +40,70 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
color
:
''
color
:
""
,
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
}
,
}
}
;
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
=
r
.
result
;
this
.
entity
.
day
=
this
.
entity
.
day
this
.
entity
.
day
=
this
.
entity
.
day
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
this
.
disabled
=
false
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'business_code_config'
+
'.'
+
key
key
=
"business_code_config"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
);
}
this
.
disabled
=
false
;
}
}
}
},
}
},
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/code/set.vue
View file @
4dd6b381
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -34,7 +34,7 @@ export default {
...
@@ -34,7 +34,7 @@ export default {
name
:
'Edit'
,
name
:
'Edit'
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{},
tishi
:
''
,
tishi
:
''
,
rules
:
{
rules
:
{
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
this
.
entity
.
day
=
this
.
entity
.
day
+
''
this
.
entity
.
day
=
this
.
entity
.
day
+
''
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
setrule
(
this
.
entity
)
Api
.
setrule
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
...
@@ -67,11 +67,11 @@ export default {
...
@@ -67,11 +67,11 @@ export default {
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
'on-ok'
)
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
'保存失败'
)
this
.
disabled
=
false
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
console
.
warn
(
err
)
})
})
...
@@ -91,7 +91,7 @@ export default {
...
@@ -91,7 +91,7 @@ export default {
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
}
}
this
.
disabled
=
false
},
},
'entity.day'
:
{
'entity.day'
:
{
handler
(
newValue
,
oldValue
)
{
handler
(
newValue
,
oldValue
)
{
...
...
pages/basicData/department/Addrow.vue
View file @
4dd6b381
...
@@ -43,9 +43,7 @@
...
@@ -43,9 +43,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
<!-- 组织类型 -->
<!-- 组织类型 -->
...
@@ -78,7 +76,7 @@ export default {
...
@@ -78,7 +76,7 @@ export default {
};
};
return
{
return
{
// showTree: false, //组织类型
// showTree: false, //组织类型
disabled
:
false
,
citys
:
citys
(),
citys
:
citys
(),
entity
:
{
entity
:
{
id
:
0
,
id
:
0
,
...
@@ -149,7 +147,6 @@ export default {
...
@@ -149,7 +147,6 @@ export default {
Api
.
create
(
paramsdata
)
Api
.
create
(
paramsdata
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功!"
);
this
.
$Message
.
success
(
"保存成功!"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -158,7 +155,6 @@ export default {
...
@@ -158,7 +155,6 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
});
});
}
}
...
...
pages/basicData/department/add.vue
View file @
4dd6b381
...
@@ -39,9 +39,7 @@
...
@@ -39,9 +39,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
<!-- 组织类型 -->
<!-- 组织类型 -->
...
@@ -74,7 +72,7 @@ export default {
...
@@ -74,7 +72,7 @@ export default {
};
};
return
{
return
{
// showTree: false, //组织类型
// showTree: false, //组织类型
disabled
:
false
,
citys
:
citys
(),
citys
:
citys
(),
entity
:
{
entity
:
{
organization_Id
:
0
,
organization_Id
:
0
,
...
@@ -85,9 +83,7 @@ export default {
...
@@ -85,9 +83,7 @@ export default {
property
:
[],
property
:
[],
location
:
[],
location
:
[],
rules
:
{
rules
:
{
title02
:
[
title02
:
[{
required
:
true
,
message
:
"名称不能为空"
,
trigger
:
"blur"
}],
{
required
:
true
,
message
:
"名称不能为空"
,
trigger
:
"blur"
},
],
organizationType
:
[
organizationType
:
[
{
{
// type: 'array',
// type: 'array',
...
@@ -137,7 +133,6 @@ export default {
...
@@ -137,7 +133,6 @@ export default {
};
};
Api
.
create
(
paramsdata
)
Api
.
create
(
paramsdata
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功!"
);
this
.
$Message
.
success
(
"保存成功!"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -146,7 +141,6 @@ export default {
...
@@ -146,7 +141,6 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
this
.
$Message
.
error
(
"保存失败,请联系管理员"
);
});
});
}
}
...
...
pages/basicData/department/edit.vue
View file @
4dd6b381
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
<!-- 组织类型 -->
<!-- 组织类型 -->
...
@@ -57,7 +57,6 @@ export default {
...
@@ -57,7 +57,6 @@ export default {
city_level
:
[],
city_level
:
[],
propertyList
:
[],
propertyList
:
[],
showTree
:
false
,
//组织类型
showTree
:
false
,
//组织类型
disabled
:
false
,
citys
:
citys
(),
citys
:
citys
(),
entity
:
{
entity
:
{
organization_Id
:
0
,
//组织类型
organization_Id
:
0
,
//组织类型
...
@@ -69,7 +68,7 @@ export default {
...
@@ -69,7 +68,7 @@ export default {
isProduction
:
1
,
isProduction
:
1
,
code
:
""
,
code
:
""
,
property
:
""
,
property
:
""
,
id
:
-
1
id
:
-
1
,
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"blur"
}],
...
@@ -78,19 +77,19 @@ export default {
...
@@ -78,19 +77,19 @@ export default {
{
{
required
:
true
,
required
:
true
,
message
:
"属性不能为空"
,
message
:
"属性不能为空"
,
trigger
:
"change"
trigger
:
"change"
,
}
}
,
]
]
,
}
}
,
};
};
},
},
props
:
{
props
:
{
row
:
Object
row
:
Object
,
},
},
created
()
{},
created
()
{},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
[
"form"
].
validate
(
value
=>
{
this
.
$refs
[
"form"
].
validate
(
(
value
)
=>
{
if
(
value
)
{
if
(
value
)
{
if
(
this
.
entity
.
id
>
0
)
{
if
(
this
.
entity
.
id
>
0
)
{
let
isProduction
=
0
;
let
isProduction
=
0
;
...
@@ -132,11 +131,10 @@ export default {
...
@@ -132,11 +131,10 @@ export default {
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
organization_Id
:
this
.
entity
.
organization_Id
,
//组织类型 [id]
location
:
location
,
//省市县
location
:
location
,
//省市县
isProduction
:
isProduction
,
//是否生产班组:1是,0否
isProduction
:
isProduction
,
//是否生产班组:1是,0否
property
:
property
//属性
property
:
property
,
//属性
};
};
Api
.
update
(
paramsdata
)
Api
.
update
(
paramsdata
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"编辑成功"
);
this
.
$Message
.
success
(
"编辑成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -144,8 +142,7 @@ export default {
...
@@ -144,8 +142,7 @@ export default {
this
.
$Message
.
error
(
"编辑失败,请联系管理员"
);
this
.
$Message
.
error
(
"编辑失败,请联系管理员"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"编辑失败,请联系管理员"
);
this
.
$Message
.
error
(
"编辑失败,请联系管理员"
);
});
});
}
}
...
@@ -158,7 +155,7 @@ export default {
...
@@ -158,7 +155,7 @@ export default {
l
(
key
)
{
l
(
key
)
{
key
=
"DipartLocation"
+
"."
+
key
;
key
=
"DipartLocation"
+
"."
+
key
;
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
}
}
,
},
},
watch
:
{
watch
:
{
"row.id"
(
v
)
{
"row.id"
(
v
)
{
...
@@ -173,7 +170,7 @@ export default {
...
@@ -173,7 +170,7 @@ export default {
property
:
this
.
row
.
property
,
property
:
this
.
row
.
property
,
id
:
this
.
row
.
id
,
id
:
this
.
row
.
id
,
organization_Id
:
this
.
row
.
organization_Id
,
organization_Id
:
this
.
row
.
organization_Id
,
organizationType
:
this
.
row
.
organizationType
organizationType
:
this
.
row
.
organizationType
,
};
};
if
(
!
model
.
property
)
{
if
(
!
model
.
property
)
{
model
.
property
=
""
;
model
.
property
=
""
;
...
@@ -187,7 +184,7 @@ export default {
...
@@ -187,7 +184,7 @@ export default {
this
.
city_level
=
model
.
location
.
split
(
","
);
this
.
city_level
=
model
.
location
.
split
(
","
);
}
}
this
.
entity
=
model
;
this
.
entity
=
model
;
}
}
,
}
}
,
};
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/dic/components/add.vue
View file @
4dd6b381
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</FormItem>
</FormItem>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
...
pages/basicData/dic/components/edit.vue
View file @
4dd6b381
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</FormItem>
</FormItem>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
...
pages/basicData/menu/add.vue
View file @
4dd6b381
...
@@ -14,7 +14,12 @@
...
@@ -14,7 +14,12 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<FormItem
:label=
"l('type')"
prop=
"type"
>
<Dictionary
code=
"mes_xingchi_system.menu.type"
:disabled=
"true"
v-model=
"entity.type"
type=
"radio"
></Dictionary>
<Dictionary
code=
"mes_xingchi_system.menu.type"
:disabled=
"true"
v-model=
"entity.type"
type=
"radio"
></Dictionary>
<!-- -->
<!-- -->
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -32,18 +37,31 @@
...
@@ -32,18 +37,31 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('target')"
prop=
"target"
>
<FormItem
:label=
"l('target')"
prop=
"target"
>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"entity.target"
type=
"radio"
></Dictionary>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"entity.target"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('source')"
prop=
"source"
>
<FormItem
:label=
"l('source')"
prop=
"source"
>
<Dictionary
code=
"mes_xingchi_system.menu.source"
type=
"radio"
disabled
v-model=
"entity.source"
></Dictionary>
<Dictionary
code=
"mes_xingchi_system.menu.source"
type=
"radio"
disabled
v-model=
"entity.source"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"6"
>
<Col
:span=
"6"
>
...
@@ -53,7 +71,7 @@
...
@@ -53,7 +71,7 @@
</Col>
</Col>
<Col
:span=
"6"
>
<Col
:span=
"6"
>
<FormItem
:label=
"l('app')"
prop=
"app"
>
<FormItem
:label=
"l('app')"
prop=
"app"
>
<Input
v-model=
"entity.app"
:disabled=
"entity.upId
!=
0"
></Input>
<Input
v-model=
"entity.app"
:disabled=
"entity.upId
!=
0"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -68,82 +86,78 @@
...
@@ -68,82 +86,78 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
id
:
0
,
id
:
0
,
name
:
''
,
name
:
""
,
upId
:
0
,
upId
:
0
,
type
:
1
,
type
:
1
,
code
:
''
,
code
:
""
,
icon
:
''
,
icon
:
""
,
target
:
0
,
target
:
0
,
url
:
''
,
url
:
""
,
status
:
1
,
status
:
1
,
description
:
''
,
description
:
""
,
source
:
0
,
source
:
0
,
app
:
''
,
app
:
""
,
priority
:
0
priority
:
0
,
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
}
,
}
}
;
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
this
.
disabled
=
false
this
.
$refs
.
form
.
resetFields
()
this
.
$refs
.
form
.
resetFields
()
;
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
this
.
disabled
=
false
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'menu'
+
'.'
+
key
key
=
"menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
v
(
val
)
{
v
(
val
)
{
// console.log(JSON.stringify(this.$u.clone(this.v)));
// console.log(JSON.stringify(this.$u.clone(this.v)));
console
.
log
(
this
.
v
)
console
.
log
(
this
.
v
)
;
this
.
entity
.
upId
=
this
.
v
.
id
this
.
entity
.
upId
=
this
.
v
.
id
;
this
.
entity
.
type
=
this
.
v
.
type
+
1
this
.
entity
.
type
=
this
.
v
.
type
+
1
;
this
.
entity
.
app
=
this
.
v
.
app
this
.
entity
.
app
=
this
.
v
.
app
;
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/menu/addApi.vue
View file @
4dd6b381
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<DataGrid
:columns=
"columns"
:action=
"index"
border
:height=
"400"
:conditions=
"conditions"
@
on-selection-change=
"selectionChange"
:set=
"false"
:high=
"false"
></DataGrid>
<DataGrid
:columns=
"columns"
:action=
"index"
border
:height=
"400"
:conditions=
"conditions"
@
on-selection-change=
"selectionChange"
:set=
"false"
:high=
"false"
></DataGrid>
<div>
<div>
<Button
v-if=
"items.length>0"
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
v-if=
"items.length>0"
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</div>
</div>
</div>
</div>
...
@@ -14,7 +14,7 @@ export default {
...
@@ -14,7 +14,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
index
:
Api
.
method
,
index
:
Api
.
method
,
disabled
:
false
,
list
:
[],
list
:
[],
controller
:
null
,
controller
:
null
,
keys
:
""
,
keys
:
""
,
...
...
pages/basicData/menu/edit.vue
View file @
4dd6b381
...
@@ -30,12 +30,20 @@
...
@@ -30,12 +30,20 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('target')"
prop=
"target"
>
<FormItem
:label=
"l('target')"
prop=
"target"
>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"entity.target"
type=
"radio"
></Dictionary>
<Dictionary
code=
"mes_xingchi_system.menu.target"
v-model=
"entity.target"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"mes_xingchi_system.menu.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -56,7 +64,7 @@
...
@@ -56,7 +64,7 @@
</Col>
</Col>
<Col
:span=
"6"
>
<Col
:span=
"6"
>
<FormItem
:label=
"l('app')"
prop=
"app"
>
<FormItem
:label=
"l('app')"
prop=
"app"
>
<Input
v-model=
"entity.app"
:disabled=
"entity.upId
!=
0"
></Input>
<Input
v-model=
"entity.app"
:disabled=
"entity.upId
!=
0"
></Input>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -71,75 +79,71 @@
...
@@ -71,75 +79,71 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
color
:
''
color
:
""
,
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
}
,
}
}
;
},
},
props
:
{
props
:
{
eid
:
Number
,
eid
:
Number
,
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
})
;
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
this
.
disabled
=
false
this
.
$refs
.
form
.
resetFields
()
this
.
$refs
.
form
.
resetFields
()
;
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
this
.
disabled
=
false
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
);
console
.
warn
(
err
)
});
})
}
}
})
})
;
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
'menu'
+
'.'
+
key
key
=
"menu"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
)
;
}
}
,
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
)
this
.
load
(
v
)
;
}
}
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/messageConfig/add.vue
View file @
4dd6b381
...
@@ -32,7 +32,11 @@
...
@@ -32,7 +32,11 @@
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"message.config.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"message.config.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
...
@@ -53,7 +57,13 @@
...
@@ -53,7 +57,13 @@
<Col
:span=
"6"
>
<Col
:span=
"6"
>
<FormItem
:label=
"l('color')"
prop=
"color"
>
<FormItem
:label=
"l('color')"
prop=
"color"
>
<Input
v-model=
"entity.color"
>
<Input
v-model=
"entity.color"
>
<ColorPicker
v-model=
"entity.color"
slot=
"prepend"
transfer
size=
"small"
recommend
/>
<ColorPicker
v-model=
"entity.color"
slot=
"prepend"
transfer
size=
"small"
recommend
/>
</Input>
</Input>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -69,7 +79,7 @@
...
@@ -69,7 +79,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -92,7 +102,6 @@ export default {
...
@@ -92,7 +102,6 @@ export default {
});
});
};
};
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
// creationTime: "",
// creationTime: "",
// creatorUserId: null,
// creatorUserId: null,
...
@@ -143,10 +152,8 @@ export default {
...
@@ -143,10 +152,8 @@ export default {
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -155,7 +162,6 @@ export default {
...
@@ -155,7 +162,6 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
...
pages/basicData/messageConfig/edit.vue
View file @
4dd6b381
...
@@ -32,7 +32,11 @@
...
@@ -32,7 +32,11 @@
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"message.config.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"message.config.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<!--
<Col
:span=
"12"
>
<!--
<Col
:span=
"12"
>
...
@@ -53,7 +57,13 @@
...
@@ -53,7 +57,13 @@
<Col
:span=
"6"
>
<Col
:span=
"6"
>
<FormItem
:label=
"l('color')"
prop=
"color"
>
<FormItem
:label=
"l('color')"
prop=
"color"
>
<Input
v-model=
"entity.color"
>
<Input
v-model=
"entity.color"
>
<ColorPicker
v-model=
"entity.color"
slot=
"prepend"
transfer
size=
"small"
recommend
/>
<ColorPicker
v-model=
"entity.color"
slot=
"prepend"
transfer
size=
"small"
recommend
/>
</Input>
</Input>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -69,7 +79,7 @@
...
@@ -69,7 +79,7 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -80,9 +90,8 @@ export default {
...
@@ -80,9 +90,8 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{
entity
:
{
color
:
""
color
:
""
,
},
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
...
@@ -106,7 +115,7 @@ export default {
...
@@ -106,7 +115,7 @@ export default {
r
.
result
.
userIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
userIds
);
r
.
result
.
userIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
userIds
);
r
.
result
.
roleIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
roleIds
);
r
.
result
.
roleIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
roleIds
);
r
.
result
.
departmentIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
departmentIds
);
r
.
result
.
departmentIds
=
this
.
$u
.
toIntArray
(
r
.
result
.
departmentIds
);
if
(
r
.
result
.
color
==
null
)
{
if
(
r
.
result
.
color
==
null
)
{
r
.
result
.
color
=
""
;
r
.
result
.
color
=
""
;
}
}
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
...
@@ -125,10 +134,8 @@ export default {
...
@@ -125,10 +134,8 @@ export default {
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -137,7 +144,6 @@ export default {
...
@@ -137,7 +144,6 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
...
pages/basicData/method/add.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Input
v-model=
"entity.httpMethod"
>
</Input>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Col
:span=
"24"
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"entity.url"
>
</Input>
<Input
v-model=
"entity.httpMethod"
>
</Input>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('methodDescription')"
>
<Input
v-model=
"entity.methodDescription"
prop=
"methodDescription"
type=
"textarea"
:rows=
"5"
>
</Input>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Col
:span=
"12"
><FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"entity.service"
>
</Input>
<Input
v-model=
"entity.url"
>
</Input>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"entity.serviceDescription"
>
</Input>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('methodDescription')"
>
<Col
:span=
"12"
><FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"entity.controller"
>
</Input>
<Input
</FormItem></Col>
v-model=
"entity.methodDescription"
<Col
:span=
"12"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"entity.controllerDescription"
></Input>
prop=
"methodDescription"
</FormItem></Col>
type=
"textarea"
:rows=
"5"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"entity.service"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"entity.serviceDescription"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"entity.controller"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"entity.controllerDescription"
></Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"entity.level"
code=
"system.method.level"
type=
"radio"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"entity.level"
code=
"system.method.level"
type=
"radio"
></Dictionary>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem></Col>
-->
</FormItem></Col>
-->
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
title
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
url
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
url
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"method"
+
"."
+
key
;
key
=
"method"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
\ No newline at end of file
pages/basicData/method/edit.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Input
v-model=
"entity.httpMethod"
>
</Input>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('httpMethod')"
prop=
"httpMethod"
>
<Col
:span=
"24"
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Input
v-model=
"entity.url"
>
</Input>
<Input
v-model=
"entity.httpMethod"
>
</Input>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('methodDescription')"
>
<Input
v-model=
"entity.methodDescription"
prop=
"methodDescription"
type=
"textarea"
:rows=
"5"
>
</Input>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('url')"
prop=
"url"
>
<Col
:span=
"12"
><FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"entity.service"
>
</Input>
<Input
v-model=
"entity.url"
>
</Input>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"entity.serviceDescription"
>
</Input>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('methodDescription')"
>
<Col
:span=
"12"
><FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"entity.controller"
>
</Input>
<Input
</FormItem></Col>
v-model=
"entity.methodDescription"
<Col
:span=
"12"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"entity.controllerDescription"
></Input>
prop=
"methodDescription"
</FormItem></Col>
type=
"textarea"
:rows=
"5"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('service')"
prop=
"service"
>
<Input
v-model=
"entity.service"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('serviceDescription')"
prop=
"serviceDescription"
>
<Input
v-model=
"entity.serviceDescription"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controller')"
prop=
"controller"
>
<Input
v-model=
"entity.controller"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('controllerDescription')"
prop=
"controllerDescription"
>
<Input
v-model=
"entity.controllerDescription"
></Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"entity.level"
code=
"system.method.level"
type=
"radio"
></Dictionary>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Dictionary
v-model=
"entity.level"
code=
"system.method.level"
type=
"radio"
></Dictionary>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem></Col>
<!--
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
</FormItem></Col>
-->
</FormItem></Col>
-->
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
title
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
title
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
url
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
url
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"method"
+
"."
+
key
;
key
=
"method"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
pages/basicData/systemUser/add.vue
View file @
4dd6b381
<
template
>
<
template
>
<div
class=
"addUser"
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -14,27 +14,45 @@
...
@@ -14,27 +14,45 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
placeholder=
"请选择"
></DatePicker>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
placeholder=
"请选择"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -55,17 +73,26 @@
...
@@ -55,17 +73,26 @@
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -80,17 +107,17 @@
...
@@ -80,17 +107,17 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
util
from
'@/libs/util'
;
import
util
from
"@/libs/util"
;
const
valideTel
=
(
rule
,
value
,
callback
)
=>
{
const
valideTel
=
(
rule
,
value
,
callback
)
=>
{
var
re
=
/^1
[
3-9
]{1}[
0-9
]{9}
/
;
var
re
=
/^1
[
3-9
]{1}[
0-9
]{9}
/
;
if
(
value
===
""
||
value
===
null
)
{
if
(
value
===
""
||
value
===
null
)
{
...
@@ -109,7 +136,7 @@ export default {
...
@@ -109,7 +136,7 @@ export default {
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"员工编号不能为空"
));
return
callback
(
new
Error
(
"员工编号不能为空"
));
}
}
Api
.
list
(
value
).
then
(
r
=>
{
Api
.
list
(
value
).
then
((
r
)
=>
{
if
(
r
.
result
.
length
>
0
)
{
if
(
r
.
result
.
length
>
0
)
{
return
callback
(
new
Error
(
"员工编号已经存在"
));
return
callback
(
new
Error
(
"员工编号已经存在"
));
}
else
{
}
else
{
...
@@ -118,66 +145,71 @@ export default {
...
@@ -118,66 +145,71 @@ export default {
});
});
};
};
return
{
return
{
disabled
:
false
,
showDeptTree
:
false
,
showDeptTree
:
false
,
entity
:
{
entity
:
{
gender
:
1
,
gender
:
1
,
status
:
1
,
status
:
1
,
property
:
false
,
property
:
false
,
userType
:
2
userType
:
2
,
},
},
rules
:
{
rules
:
{
userName
:
[{
userName
:
[
{
required
:
true
,
required
:
true
,
message
:
"必填"
,
message
:
"必填"
,
trigger
:
"blur"
trigger
:
"blur"
,
}],
},
cardNo
:
[{
],
cardNo
:
[
{
required
:
true
,
required
:
true
,
message
:
"必填"
,
message
:
"必填"
,
trigger
:
"blur"
trigger
:
"blur"
,
},
},
{
{
validator
:
validateCarNo
,
validator
:
validateCarNo
,
trigger
:
"blur"
trigger
:
"blur"
,
}
},
],
],
departmentTitle
:
[{
departmentTitle
:
[
{
required
:
true
,
required
:
true
,
message
:
"必选"
,
message
:
"必选"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
],
// email: [
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
// ],
phone
:
[{
phone
:
[
{
validator
:
valideTel
,
validator
:
valideTel
,
required
:
true
,
required
:
true
,
trigger
:
"blur"
trigger
:
"blur"
,
}]
},
],
// degreeId: [
// degreeId: [
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// ],
// ],
// phone: [{ required: true, message: '必填', trigger: 'blur' }]
// phone: [{ required: true, message: '必填', trigger: 'blur' }]
}
},
};
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
if
(
this
.
entity
.
property
)
{
if
(
this
.
entity
.
property
)
{
this
.
entity
.
property
=
2
;
this
.
entity
.
property
=
2
;
}
else
{
}
else
{
this
.
entity
.
property
=
""
;
this
.
entity
.
property
=
""
;
}
}
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
//账户同步操作start
//账户同步操作start
...
@@ -186,18 +218,18 @@ export default {
...
@@ -186,18 +218,18 @@ export default {
loginName
:
this
.
entity
.
phone
,
//用户电话
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
//状态
status
:
this
.
entity
.
status
,
//状态
// tenantCode: this.$store.state.userInfo.tenantCode, //商户号
// tenantCode: this.$store.state.userInfo.tenantCode, //商户号
tenantCode
:
util
.
cookies
.
get
(
'tenantCode'
),
//商户号
tenantCode
:
util
.
cookies
.
get
(
"tenantCode"
),
//商户号
name
:
this
.
entity
.
userName
name
:
this
.
entity
.
userName
,
};
};
Api
.
authAccount
(
parms
).
then
(
res
=>
{
Api
.
authAccount
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
this
.
$Message
.
success
(
"账户同步成功"
);
//修改用户表的accountId start
//修改用户表的accountId start
let
parms1
=
{
let
parms1
=
{
userId
:
parms
.
userId
,
userId
:
parms
.
userId
,
accountId
:
res
.
result
accountId
:
res
.
result
,
};
};
Api
.
updateAccount
(
parms1
).
then
(
res1
=>
{
Api
.
updateAccount
(
parms1
).
then
((
res1
)
=>
{
if
(
res1
.
success
)
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
$Message
.
success
(
"操作成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -214,10 +246,10 @@ export default {
...
@@ -214,10 +246,10 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
// alert(JSON.stringify(err))
// alert(JSON.stringify(err))
console
.
warn
(
err
);
console
.
warn
(
err
);
this
.
disabled
=
false
;
this
.
$Message
.
error
(
err
.
error
.
message
);
this
.
$Message
.
error
(
err
.
error
.
message
);
});
});
}
}
...
@@ -238,13 +270,13 @@ export default {
...
@@ -238,13 +270,13 @@ export default {
},
},
getBirthday
(
value
)
{
getBirthday
(
value
)
{
this
.
entity
.
birthday
=
value
;
this
.
entity
.
birthday
=
value
;
}
},
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
},
}
},
};
};
</
script
>
</
script
>
...
...
pages/basicData/systemUser/edit.vue
View file @
4dd6b381
<
template
>
<
template
>
<div
class=
"addUser"
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -14,27 +14,46 @@
...
@@ -14,27 +14,46 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
style=
"width:100%"
placeholder=
"请选择"
></DatePicker>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
style=
"width: 100%"
placeholder=
"请选择"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -55,17 +74,26 @@
...
@@ -55,17 +74,26 @@
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -75,7 +103,10 @@
...
@@ -75,7 +103,10 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"用户类型"
>
<FormItem
label=
"用户类型"
>
<Dictionary
code=
"User.base.UserType"
v-model=
"entity.userType"
></Dictionary>
<Dictionary
code=
"User.base.UserType"
v-model=
"entity.userType"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
...
@@ -85,11 +116,11 @@
...
@@ -85,11 +116,11 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -109,20 +140,23 @@ export default {
...
@@ -109,20 +140,23 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
showDeptTree
:
false
,
showDeptTree
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
userName
:
[{
userName
:
[
{
required
:
true
,
required
:
true
,
message
:
"必填"
,
message
:
"必填"
,
trigger
:
"blur"
trigger
:
"blur"
,
}],
},
departmentTitle
:
[{
],
departmentTitle
:
[
{
required
:
true
,
required
:
true
,
message
:
"必选"
,
message
:
"必选"
,
trigger
:
"blur"
trigger
:
"blur"
,
}],
},
],
//cardNo: [{ required: true, message: '必填', trigger: 'blur' }],
//cardNo: [{ required: true, message: '必填', trigger: 'blur' }],
// birthday: [{ required: true, message: '必填', trigger: 'change' }],
// birthday: [{ required: true, message: '必填', trigger: 'change' }],
// degreeId: [
// degreeId: [
...
@@ -131,22 +165,24 @@ export default {
...
@@ -131,22 +165,24 @@ export default {
// email: [
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
// ],
phone
:
[{
phone
:
[
{
validator
:
valideTel
,
validator
:
valideTel
,
required
:
true
,
required
:
true
,
trigger
:
"blur"
trigger
:
"blur"
,
}]
},
}
],
},
};
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
Api
.
get
({
id
:
v
id
:
v
,
}).
then
(
r
=>
{
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
if
(
r
.
result
.
property
==
2
)
{
if
(
r
.
result
.
property
==
2
)
{
this
.
entity
.
property
=
true
;
this
.
entity
.
property
=
true
;
...
@@ -157,17 +193,15 @@ export default {
...
@@ -157,17 +193,15 @@ export default {
});
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
if
((
this
.
entity
.
property
=
true
))
{
if
((
this
.
entity
.
property
=
true
))
{
this
.
entity
.
property
=
2
;
this
.
entity
.
property
=
2
;
}
else
{
}
else
{
this
.
entity
.
property
=
""
;
this
.
entity
.
property
=
""
;
}
}
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
//账户同步操作start
//账户同步操作start
...
@@ -179,9 +213,9 @@ export default {
...
@@ -179,9 +213,9 @@ export default {
loginName
:
this
.
entity
.
phone
,
//用户电话
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
status
:
this
.
entity
.
status
,
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
name
:
this
.
entity
.
userName
name
:
this
.
entity
.
userName
,
};
};
Api
.
authAccount
(
parms2
).
then
(
res
=>
{
Api
.
authAccount
(
parms2
).
then
((
res
)
=>
{
//同步电话信息等
//同步电话信息等
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
this
.
$Message
.
success
(
"账户同步成功"
);
...
@@ -196,17 +230,17 @@ export default {
...
@@ -196,17 +230,17 @@ export default {
loginName
:
this
.
entity
.
phone
,
//用户电话
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
status
:
this
.
entity
.
status
,
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
name
:
this
.
entity
.
userName
name
:
this
.
entity
.
userName
,
};
};
Api
.
authAccount
(
parms
).
then
(
res1
=>
{
Api
.
authAccount
(
parms
).
then
((
res1
)
=>
{
if
(
res1
.
success
)
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
this
.
$Message
.
success
(
"账户同步成功"
);
//修改用户表的accountId start
//修改用户表的accountId start
let
parms1
=
{
let
parms1
=
{
userId
:
parms
.
userId
,
userId
:
parms
.
userId
,
accountId
:
res1
.
result
//账户同步成功后返回的accountId
accountId
:
res1
.
result
,
//账户同步成功后返回的accountId
};
};
Api
.
updateAccount
(
parms1
).
then
(
res2
=>
{
Api
.
updateAccount
(
parms1
).
then
((
res2
)
=>
{
if
(
res2
.
success
)
{
if
(
res2
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
$Message
.
success
(
"操作成功"
);
}
else
{
}
else
{
...
@@ -223,8 +257,7 @@ export default {
...
@@ -223,8 +257,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
@@ -245,15 +278,15 @@ export default {
...
@@ -245,15 +278,15 @@ export default {
},
},
getBirthday
(
value
)
{
getBirthday
(
value
)
{
this
.
entity
.
birthday
=
value
;
this
.
entity
.
birthday
=
value
;
}
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
},
}
},
};
};
</
script
>
</
script
>
...
...
pages/basicData/user/add.vue
View file @
4dd6b381
<
template
>
<
template
>
<div
class=
"addUser"
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -14,27 +14,45 @@
...
@@ -14,27 +14,45 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
placeholder=
"请选择"
></DatePicker>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
placeholder=
"请选择"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -55,17 +73,26 @@
...
@@ -55,17 +73,26 @@
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -80,17 +107,17 @@
...
@@ -80,17 +107,17 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"./api"
;
import
Api
from
"./api"
;
import
util
from
'@/libs/util'
;
import
util
from
"@/libs/util"
;
const
valideTel
=
(
rule
,
value
,
callback
)
=>
{
const
valideTel
=
(
rule
,
value
,
callback
)
=>
{
var
re
=
/^1
[
3-9
]{1}[
0-9
]{9}
/
;
var
re
=
/^1
[
3-9
]{1}[
0-9
]{9}
/
;
if
(
value
===
""
||
value
===
null
)
{
if
(
value
===
""
||
value
===
null
)
{
...
@@ -109,7 +136,7 @@ export default {
...
@@ -109,7 +136,7 @@ export default {
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
"员工编号不能为空"
));
return
callback
(
new
Error
(
"员工编号不能为空"
));
}
}
Api
.
list
(
value
).
then
(
r
=>
{
Api
.
list
(
value
).
then
((
r
)
=>
{
if
(
r
.
result
.
length
>
0
)
{
if
(
r
.
result
.
length
>
0
)
{
return
callback
(
new
Error
(
"员工编号已经存在"
));
return
callback
(
new
Error
(
"员工编号已经存在"
));
}
else
{
}
else
{
...
@@ -118,66 +145,71 @@ export default {
...
@@ -118,66 +145,71 @@ export default {
});
});
};
};
return
{
return
{
disabled
:
false
,
showDeptTree
:
false
,
showDeptTree
:
false
,
entity
:
{
entity
:
{
gender
:
1
,
gender
:
1
,
status
:
1
,
status
:
1
,
property
:
false
,
property
:
false
,
userType
:
0
userType
:
0
,
},
},
rules
:
{
rules
:
{
userName
:
[{
userName
:
[
{
required
:
true
,
required
:
true
,
message
:
"必填"
,
message
:
"必填"
,
trigger
:
"blur"
trigger
:
"blur"
,
}],
},
cardNo
:
[{
],
cardNo
:
[
{
required
:
true
,
required
:
true
,
message
:
"必填"
,
message
:
"必填"
,
trigger
:
"blur"
trigger
:
"blur"
,
},
},
{
{
validator
:
validateCarNo
,
validator
:
validateCarNo
,
trigger
:
"blur"
trigger
:
"blur"
,
}
},
],
],
departmentTitle
:
[{
departmentTitle
:
[
{
required
:
true
,
required
:
true
,
message
:
"必选"
,
message
:
"必选"
,
trigger
:
"change"
trigger
:
"change"
,
}],
},
],
// email: [
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
// ],
phone
:
[{
phone
:
[
{
validator
:
valideTel
,
validator
:
valideTel
,
required
:
true
,
required
:
true
,
trigger
:
"blur"
trigger
:
"blur"
,
}]
},
],
// degreeId: [
// degreeId: [
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// { required: true, message: '必填', trigger: 'blur', type: 'number' }
// ],
// ],
// phone: [{ required: true, message: '必填', trigger: 'blur' }]
// phone: [{ required: true, message: '必填', trigger: 'blur' }]
}
},
};
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
if
(
this
.
entity
.
property
)
{
if
(
this
.
entity
.
property
)
{
this
.
entity
.
property
=
2
;
this
.
entity
.
property
=
2
;
}
else
{
}
else
{
this
.
entity
.
property
=
""
;
this
.
entity
.
property
=
""
;
}
}
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
//账户同步操作start
//账户同步操作start
...
@@ -186,18 +218,18 @@ export default {
...
@@ -186,18 +218,18 @@ export default {
loginName
:
this
.
entity
.
phone
,
//用户电话
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
//状态
status
:
this
.
entity
.
status
,
//状态
// tenantCode: this.$store.state.userInfo.tenantCode, //商户号
// tenantCode: this.$store.state.userInfo.tenantCode, //商户号
tenantCode
:
util
.
cookies
.
get
(
'tenantCode'
),
//商户号
tenantCode
:
util
.
cookies
.
get
(
"tenantCode"
),
//商户号
name
:
this
.
entity
.
userName
name
:
this
.
entity
.
userName
,
};
};
Api
.
authAccount
(
parms
).
then
(
res
=>
{
Api
.
authAccount
(
parms
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
this
.
$Message
.
success
(
"账户同步成功"
);
//修改用户表的accountId start
//修改用户表的accountId start
let
parms1
=
{
let
parms1
=
{
userId
:
parms
.
userId
,
userId
:
parms
.
userId
,
accountId
:
res
.
result
accountId
:
res
.
result
,
};
};
Api
.
updateAccount
(
parms1
).
then
(
res1
=>
{
Api
.
updateAccount
(
parms1
).
then
((
res1
)
=>
{
if
(
res1
.
success
)
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
$Message
.
success
(
"操作成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -214,10 +246,10 @@ export default {
...
@@ -214,10 +246,10 @@ export default {
this
.
$Message
.
error
(
r
.
error
.
message
);
this
.
$Message
.
error
(
r
.
error
.
message
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
// alert(JSON.stringify(err))
// alert(JSON.stringify(err))
console
.
warn
(
err
);
console
.
warn
(
err
);
this
.
disabled
=
false
;
this
.
$Message
.
error
(
err
.
error
.
message
);
this
.
$Message
.
error
(
err
.
error
.
message
);
});
});
}
}
...
@@ -238,13 +270,13 @@ export default {
...
@@ -238,13 +270,13 @@ export default {
},
},
getBirthday
(
value
)
{
getBirthday
(
value
)
{
this
.
entity
.
birthday
=
value
;
this
.
entity
.
birthday
=
value
;
}
},
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
},
}
},
};
};
</
script
>
</
script
>
...
...
pages/basicData/user/edit.vue
View file @
4dd6b381
<
template
>
<
template
>
<div
class=
"addUser"
>
<div
class=
"addUser"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"100"
>
<Row
class=
"rowTitle100"
>
<Row
class=
"rowTitle100"
>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -14,27 +14,46 @@
...
@@ -14,27 +14,46 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<FormItem
:label=
"l('status')"
prop=
"status"
>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.status"
v-model=
"entity.status"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<FormItem
:label=
"l('gender')"
prop=
"gender"
>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
<Dictionary
code=
"User.base.gender"
v-model=
"entity.gender"
type=
"radio"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<FormItem
:label=
"l('birthday')"
prop=
"birthday"
>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
style=
"width:100%"
placeholder=
"请选择"
></DatePicker>
<DatePicker
type=
"date"
v-model=
"entity.birthday"
style=
"width: 100%"
placeholder=
"请选择"
></DatePicker>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<FormItem
:label=
"l('degreeId')"
prop=
"degreeId"
>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
<Dictionary
code=
"User.base.degree"
v-model=
"entity.degreeId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<FormItem
:label=
"l('departmentTitle')"
prop=
"departmentTitle"
>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
<DepartmentSelect
v-model=
"entity.departmentId"
@
on-change=
"setDepartmentTitle"
/>
</FormItem>
</FormItem>
</Col>
</Col>
...
@@ -55,17 +74,26 @@
...
@@ -55,17 +74,26 @@
</Col>
-->
</Col>
-->
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<FormItem
:label=
"l('positionId')"
prop=
"positionId"
>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
<Dictionary
code=
"User.base.position"
v-model=
"entity.positionId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<FormItem
:label=
"l('titleId')"
prop=
"titleId"
>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
<Dictionary
code=
"User.base.jobtitle"
v-model=
"entity.titleId"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<FormItem
:label=
"l('licensedToWork')"
prop=
"licensedToWork"
>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
<Dictionary
code=
"User.base.workLicense"
v-model=
"entity.licensedToWork"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
...
@@ -75,7 +103,10 @@
...
@@ -75,7 +103,10 @@
</Col>
</Col>
<Col
:span=
"12"
>
<Col
:span=
"12"
>
<FormItem
label=
"用户类型"
>
<FormItem
label=
"用户类型"
>
<Dictionary
code=
"User.base.UserType"
v-model=
"entity.userType"
></Dictionary>
<Dictionary
code=
"User.base.UserType"
v-model=
"entity.userType"
></Dictionary>
</FormItem>
</FormItem>
</Col>
</Col>
<Col
:span=
"24"
>
<Col
:span=
"24"
>
...
@@ -85,11 +116,11 @@
...
@@ -85,11 +116,11 @@
</Col>
</Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -109,20 +140,23 @@ export default {
...
@@ -109,20 +140,23 @@ export default {
name
:
"Edit"
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
showDeptTree
:
false
,
showDeptTree
:
false
,
entity
:
{},
entity
:
{},
rules
:
{
rules
:
{
userName
:
[{
userName
:
[
{
required
:
true
,
required
:
true
,
message
:
"必填"
,
message
:
"必填"
,
trigger
:
"blur"
trigger
:
"blur"
,
}],
},
departmentTitle
:
[{
],
departmentTitle
:
[
{
required
:
true
,
required
:
true
,
message
:
"必选"
,
message
:
"必选"
,
trigger
:
"blur"
trigger
:
"blur"
,
}],
},
],
//cardNo: [{ required: true, message: '必填', trigger: 'blur' }],
//cardNo: [{ required: true, message: '必填', trigger: 'blur' }],
// birthday: [{ required: true, message: '必填', trigger: 'change' }],
// birthday: [{ required: true, message: '必填', trigger: 'change' }],
// degreeId: [
// degreeId: [
...
@@ -131,22 +165,24 @@ export default {
...
@@ -131,22 +165,24 @@ export default {
// email: [
// email: [
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// { required: true, message: '必填', trigger: 'blur', type: 'email' }
// ],
// ],
phone
:
[{
phone
:
[
{
validator
:
valideTel
,
validator
:
valideTel
,
required
:
true
,
required
:
true
,
trigger
:
"blur"
trigger
:
"blur"
,
}]
},
}
],
},
};
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
Api
.
get
({
id
:
v
id
:
v
,
}).
then
(
r
=>
{
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
if
(
r
.
result
.
property
==
2
)
{
if
(
r
.
result
.
property
==
2
)
{
this
.
entity
.
property
=
true
;
this
.
entity
.
property
=
true
;
...
@@ -157,17 +193,15 @@ export default {
...
@@ -157,17 +193,15 @@ export default {
});
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
(
v
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
if
((
this
.
entity
.
property
=
true
))
{
if
((
this
.
entity
.
property
=
true
))
{
this
.
entity
.
property
=
2
;
this
.
entity
.
property
=
2
;
}
else
{
}
else
{
this
.
entity
.
property
=
""
;
this
.
entity
.
property
=
""
;
}
}
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
)
.
then
(
r
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
//账户同步操作start
//账户同步操作start
...
@@ -179,9 +213,9 @@ export default {
...
@@ -179,9 +213,9 @@ export default {
loginName
:
this
.
entity
.
phone
,
//用户电话
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
status
:
this
.
entity
.
status
,
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
name
:
this
.
entity
.
userName
name
:
this
.
entity
.
userName
,
};
};
Api
.
authAccount
(
parms2
).
then
(
res
=>
{
Api
.
authAccount
(
parms2
).
then
((
res
)
=>
{
//同步电话信息等
//同步电话信息等
if
(
res
.
success
)
{
if
(
res
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
this
.
$Message
.
success
(
"账户同步成功"
);
...
@@ -196,17 +230,17 @@ export default {
...
@@ -196,17 +230,17 @@ export default {
loginName
:
this
.
entity
.
phone
,
//用户电话
loginName
:
this
.
entity
.
phone
,
//用户电话
status
:
this
.
entity
.
status
,
status
:
this
.
entity
.
status
,
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
tenantCode
:
this
.
$store
.
state
.
userInfo
.
tenantCode
,
//商户号
name
:
this
.
entity
.
userName
name
:
this
.
entity
.
userName
,
};
};
Api
.
authAccount
(
parms
).
then
(
res1
=>
{
Api
.
authAccount
(
parms
).
then
((
res1
)
=>
{
if
(
res1
.
success
)
{
if
(
res1
.
success
)
{
this
.
$Message
.
success
(
"账户同步成功"
);
this
.
$Message
.
success
(
"账户同步成功"
);
//修改用户表的accountId start
//修改用户表的accountId start
let
parms1
=
{
let
parms1
=
{
userId
:
parms
.
userId
,
userId
:
parms
.
userId
,
accountId
:
res1
.
result
//账户同步成功后返回的accountId
accountId
:
res1
.
result
,
//账户同步成功后返回的accountId
};
};
Api
.
updateAccount
(
parms1
).
then
(
res2
=>
{
Api
.
updateAccount
(
parms1
).
then
((
res2
)
=>
{
if
(
res2
.
success
)
{
if
(
res2
.
success
)
{
this
.
$Message
.
success
(
"操作成功"
);
this
.
$Message
.
success
(
"操作成功"
);
}
else
{
}
else
{
...
@@ -223,8 +257,7 @@ export default {
...
@@ -223,8 +257,7 @@ export default {
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
}
}
})
})
.
catch
(
err
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
console
.
warn
(
err
);
});
});
...
@@ -245,15 +278,15 @@ export default {
...
@@ -245,15 +278,15 @@ export default {
},
},
getBirthday
(
value
)
{
getBirthday
(
value
)
{
this
.
entity
.
birthday
=
value
;
this
.
entity
.
birthday
=
value
;
}
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
},
}
},
};
};
</
script
>
</
script
>
...
...
pages/exception/add.vue
View file @
4dd6b381
This diff is collapsed.
Click to expand it.
pages/exception/detail.vue
View file @
4dd6b381
...
@@ -53,9 +53,7 @@
...
@@ -53,9 +53,7 @@
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
>
保存
</Button
>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
...
@@ -76,7 +74,6 @@ export default {
...
@@ -76,7 +74,6 @@ export default {
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
code
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
},
},
disabled
:
false
,
};
};
},
},
props
:
{
props
:
{
...
@@ -105,14 +102,12 @@ export default {
...
@@ -105,14 +102,12 @@ export default {
return
this
.
$t
(
key
);
return
this
.
$t
(
key
);
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
disabled
=
true
;
Api
.
update
({
Api
.
update
({
id
:
this
.
entity
.
id
,
id
:
this
.
entity
.
id
,
status
:
this
.
entity
.
status
,
status
:
this
.
entity
.
status
,
remark
:
this
.
entity
.
remark
,
remark
:
this
.
entity
.
remark
,
})
})
.
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"保存成功"
);
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
"on-ok"
);
this
.
$emit
(
"on-ok"
);
...
@@ -121,7 +116,6 @@ export default {
...
@@ -121,7 +116,6 @@ export default {
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
"保存失败"
);
this
.
$Message
.
error
(
"保存失败"
);
cosole
.
warn
(
err
);
cosole
.
warn
(
err
);
});
});
...
...
pages/exception/edit.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.creationTime"
></DatePicker>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('creationTime')"
prop=
"creationTime"
>
<Col
:span=
"12"
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
<DatePicker
</FormItem></Col>
type=
"date"
<Col
:span=
"12"
><FormItem
:label=
"l('lastModificationTime')"
prop=
"lastModificationTime"
>
<DatePicker
type=
"date"
v-model=
"entity.lastModificationTime"
></DatePicker>
v-model=
"entity.creationTime"
</FormItem></Col>
></DatePicker>
</FormItem
<Col
:span=
"12"
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
<InputNumber
v-model=
"entity.lastModifierUserId"
></InputNumber>
></Col>
</FormItem></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
><FormItem
:label=
"l('creatorUserId')"
prop=
"creatorUserId"
>
</FormItem></Col>
<InputNumber
v-model=
"entity.creatorUserId"
></InputNumber>
</FormItem
<Col
:span=
"12"
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
<DatePicker
type=
"date"
v-model=
"entity.deletionTime"
></DatePicker>
></Col>
</FormItem></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
><FormItem
</FormItem></Col>
:label=
"l('lastModificationTime')"
<Col
:span=
"12"
><FormItem
:label=
"l('timestamp')"
prop=
"timestamp"
>
<DatePicker
type=
"date"
v-model=
"entity.timestamp"
></DatePicker>
prop=
"lastModificationTime"
</FormItem></Col>
>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Input
v-model=
"entity.level"
>
</Input>
<DatePicker
</FormItem></Col>
type=
"date"
<Col
:span=
"12"
><FormItem
:label=
"l('messageTemplate')"
prop=
"messageTemplate"
>
<Input
v-model=
"entity.messageTemplate"
>
</Input>
v-model=
"entity.lastModificationTime"
</FormItem></Col>
></DatePicker>
</FormItem
<Col
:span=
"12"
><FormItem
:label=
"l('renderedMessage')"
prop=
"renderedMessage"
>
<Input
v-model=
"entity.renderedMessage"
>
</Input>
></Col>
</FormItem></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('clientIpAddress')"
prop=
"clientIpAddress"
>
<Input
v-model=
"entity.clientIpAddress"
>
</Input>
><FormItem
:label=
"l('lastModifierUserId')"
prop=
"lastModifierUserId"
>
</FormItem></Col>
<InputNumber
<Col
:span=
"12"
><FormItem
:label=
"l('loginName')"
prop=
"loginName"
>
<Input
v-model=
"entity.loginName"
>
</Input>
v-model=
"entity.lastModifierUserId"
</FormItem></Col>
></InputNumber>
</FormItem
<Col
:span=
"12"
><FormItem
:label=
"l('tanentCode')"
prop=
"tanentCode"
>
<Input
v-model=
"entity.tanentCode"
>
</Input>
></Col>
</FormItem></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('host')"
prop=
"host"
>
<Input
v-model=
"entity.host"
>
</Input>
><FormItem
:label=
"l('isDeleted')"
prop=
"isDeleted"
>
</FormItem></Col>
<InputNumber
v-model=
"entity.isDeleted"
></InputNumber>
</FormItem
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"entity.status"
>
</Input>
></Col>
</FormItem></Col>
<Col
:span=
"12"
<Col
:span=
"12"
><FormItem
:label=
"l('requestUrl')"
prop=
"requestUrl"
>
<InputFile
v-model=
"entity.requestUrl"
></InputFile>
><FormItem
:label=
"l('deletionTime')"
prop=
"deletionTime"
>
</FormItem></Col>
<DatePicker
<Col
:span=
"12"
><FormItem
:label=
"l('requestParam')"
prop=
"requestParam"
>
<Input
v-model=
"entity.requestParam"
>
</Input>
type=
"date"
</FormItem></Col>
v-model=
"entity.deletionTime"
<Col
:span=
"12"
><FormItem
:label=
"l('exception')"
prop=
"exception"
>
<Input
v-model=
"entity.exception"
>
</Input>
></DatePicker>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('deleterUserId')"
prop=
"deleterUserId"
>
<InputNumber
v-model=
"entity.deleterUserId"
></InputNumber>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('timestamp')"
prop=
"timestamp"
>
<DatePicker
type=
"date"
v-model=
"entity.timestamp"
></DatePicker>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('level')"
prop=
"level"
>
<Input
v-model=
"entity.level"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('messageTemplate')"
prop=
"messageTemplate"
>
<Input
v-model=
"entity.messageTemplate"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('renderedMessage')"
prop=
"renderedMessage"
>
<Input
v-model=
"entity.renderedMessage"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('clientIpAddress')"
prop=
"clientIpAddress"
>
<Input
v-model=
"entity.clientIpAddress"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('loginName')"
prop=
"loginName"
>
<Input
v-model=
"entity.loginName"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('tanentCode')"
prop=
"tanentCode"
>
<Input
v-model=
"entity.tanentCode"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('host')"
prop=
"host"
>
<Input
v-model=
"entity.host"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('status')"
prop=
"status"
>
<Input
v-model=
"entity.status"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('requestUrl')"
prop=
"requestUrl"
>
<InputFile
v-model=
"entity.requestUrl"
></InputFile>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('requestParam')"
prop=
"requestParam"
>
<Input
v-model=
"entity.requestParam"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('exception')"
prop=
"exception"
>
<Input
v-model=
"entity.exception"
>
</Input>
</FormItem
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
mounted
()
{
mounted
()
{
if
(
this
.
eid
>
0
)
{
if
(
this
.
eid
>
0
)
{
...
@@ -70,44 +123,43 @@
...
@@ -70,44 +123,43 @@
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
})
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"run_log"
+
"."
+
key
;
key
=
"run_log"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
pages/system/data_source/add.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"24"
><FormItem
:label=
"l('hostId')"
prop=
"hostId"
>
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('hostId')"
prop=
"hostId"
>
<Col
:span=
"24"
><FormItem
:label=
"l('port')"
prop=
"port"
>
<InputNumber
v-model=
"entity.port"
></InputNumber>
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"entity.userName"
>
</Input>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('port')"
prop=
"port"
>
<Col
:span=
"24"
><FormItem
:label=
"l('password')"
prop=
"password"
>
<Input
v-model=
"entity.password"
>
</Input>
<InputNumber
v-model=
"entity.port"
></InputNumber>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"entity.userName"
>
</Input>
</FormItem
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('password')"
prop=
"password"
>
<Input
v-model=
"entity.password"
>
</Input>
</FormItem
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"data_source"
+
"."
+
key
;
key
=
"data_source"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
\ No newline at end of file
pages/system/data_source/edit.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"24"
><FormItem
:label=
"l('hostId')"
prop=
"hostId"
>
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('hostId')"
prop=
"hostId"
>
<Col
:span=
"24"
><FormItem
:label=
"l('port')"
prop=
"port"
>
<InputNumber
v-model=
"entity.port"
></InputNumber>
<Dictionary
v-model=
"entity.hostId"
></Dictionary>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"entity.userName"
>
</Input>
<Col
:span=
"24"
</FormItem></Col>
><FormItem
:label=
"l('port')"
prop=
"port"
>
<Col
:span=
"24"
><FormItem
:label=
"l('password')"
prop=
"password"
>
<Input
v-model=
"entity.password"
>
</Input>
<InputNumber
v-model=
"entity.port"
></InputNumber>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('userName')"
prop=
"userName"
>
<Input
v-model=
"entity.userName"
>
</Input>
</FormItem
></Col>
<Col
:span=
"24"
><FormItem
:label=
"l('password')"
prop=
"password"
>
<Input
v-model=
"entity.password"
>
</Input>
</FormItem
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"data_source"
+
"."
+
key
;
key
=
"data_source"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
pages/test/Message/add.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Col
:span=
"12"
><FormItem
:label=
"l('content')"
prop=
"content"
>
<Input
v-model=
"entity.content"
>
</Input>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"system.method.level"
v-model=
"entity.state"
></Dictionary>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('content')"
prop=
"content"
>
<Input
v-model=
"entity.content"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"system.method.level"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Add'
,
name
:
"Add"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
v
:
Object
v
:
Object
,
},
},
methods
:
{
methods
:
{
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
create
(
this
.
entity
)
Api
.
create
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"Message"
+
"."
+
key
;
key
=
"Message"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
v
()
{
v
()
{
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
)
this
.
entity
=
this
.
$u
.
clone
(
this
.
v
);
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
\ No newline at end of file
pages/test/Message/edit.vue
View file @
4dd6b381
<
template
>
<
template
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Form
ref=
"form"
:model=
"entity"
:rules=
"rules"
:label-width=
"90"
>
<Row>
<Row>
<Col
:span=
"12"
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Input
v-model=
"entity.title"
>
</Input>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('title')"
prop=
"title"
>
<Col
:span=
"12"
><FormItem
:label=
"l('content')"
prop=
"content"
>
<Input
v-model=
"entity.content"
>
</Input>
<Input
v-model=
"entity.title"
>
</Input>
</FormItem
</FormItem></Col>
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"system.method.level"
v-model=
"entity.state"
></Dictionary>
<Col
:span=
"12"
</FormItem></Col>
><FormItem
:label=
"l('content')"
prop=
"content"
>
<Input
v-model=
"entity.content"
>
</Input>
</FormItem
></Col>
<Col
:span=
"12"
><FormItem
:label=
"l('state')"
prop=
"state"
>
<Dictionary
code=
"system.method.level"
v-model=
"entity.state"
></Dictionary>
</FormItem
></Col>
</Row>
</Row>
<FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"handleSubmit"
:disabled=
"disabled"
>
保存
</Button>
<Button
type=
"primary"
@
click=
"handleSubmit"
v-noClick
>
保存
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
<Button
@
click=
"handleClose"
class=
"ml20"
>
取消
</Button>
</FormItem>
</FormItem>
</Form>
</Form>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
'./api'
import
Api
from
"./api"
;
export
default
{
export
default
{
name
:
'Edit'
,
name
:
"Edit"
,
data
()
{
data
()
{
return
{
return
{
disabled
:
false
,
entity
:
{},
entity
:
{
},
rules
:
{
rules
:
{
name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
name
:
[{
required
:
true
,
message
:
"必填"
,
trigger
:
"blur"
}],
}
},
}
};
},
},
props
:
{
props
:
{
eid
:
Number
eid
:
Number
,
},
},
methods
:
{
methods
:
{
load
(
v
)
{
load
(
v
)
{
Api
.
get
({
id
:
v
}).
then
(
r
=>
{
Api
.
get
({
id
:
v
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
entity
=
r
.
result
;
this
.
$emit
(
'on-load'
)
this
.
$emit
(
"on-load"
);
})
});
},
},
handleSubmit
()
{
handleSubmit
()
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
this
.
$refs
.
form
.
validate
((
v
)
=>
{
if
(
v
)
{
if
(
v
)
{
this
.
disabled
=
true
;
Api
.
update
(
this
.
entity
)
Api
.
update
(
this
.
entity
).
then
((
r
)
=>
{
.
then
((
r
)
=>
{
this
.
disabled
=
false
;
if
(
r
.
success
)
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
$Message
.
success
(
"保存成功"
);
this
.
$emit
(
'on-ok'
)
this
.
$emit
(
"on-ok"
);
}
else
{
}
else
{
this
.
$Message
.
error
(
'保存失败'
)
this
.
$Message
.
error
(
"保存失败"
);
}
}
}).
catch
(
err
=>
{
this
.
disabled
=
false
;
this
.
$Message
.
error
(
'保存失败'
)
console
.
warn
(
err
)
})
})
.
catch
((
err
)
=>
{
this
.
$Message
.
error
(
"保存失败"
);
console
.
warn
(
err
);
});
}
}
})
});
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'on-close'
)
this
.
$emit
(
"on-close"
);
},
},
l
(
key
)
{
l
(
key
)
{
key
=
"Message"
+
"."
+
key
;
key
=
"Message"
+
"."
+
key
;
return
this
.
$t
(
key
)
return
this
.
$t
(
key
);
}
},
},
},
watch
:
{
watch
:
{
eid
(
v
)
{
eid
(
v
)
{
if
(
v
!=
0
)
{
if
(
v
!=
0
)
{
this
.
load
(
v
);
this
.
load
(
v
);
}
}
}
},
}
},
}
};
</
script
>
</
script
>
\ No newline at end of file
plugins/iview.js
View file @
4dd6b381
...
@@ -185,6 +185,19 @@ export default ({
...
@@ -185,6 +185,19 @@ export default ({
binding
.
value
(
event
)
binding
.
value
(
event
)
})
})
}
}
})
// 防重复点击(指令实现)
Vue
.
directive
(
'noClick'
,
{
inserted
(
el
,
binding
)
{
el
.
addEventListener
(
'click'
,
()
=>
{
if
(
!
el
.
disabled
)
{
el
.
disabled
=
true
setTimeout
(()
=>
{
el
.
disabled
=
false
},
binding
.
value
||
3000
)
}
})
}
})
})
// console.warn("this:",app.i18n.locale,app)
// console.warn("this:",app.i18n.locale,app)
}
}
\ No newline at end of file
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