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
240e35bc
Commit
240e35bc
authored
Jul 28, 2020
by
周远喜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'product' of
http://git.mes123.com/zhouyx/mes-ui
into product
parents
4f9a288a
ac0167c7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
379 additions
and
82 deletions
+379
-82
index.vue
pages/account/login/index.vue
+3
-0
index.vue
pages/aps/ai/index.vue
+75
-72
api.js
pages/aps/aps/api.js
+9
-4
index.vue
pages/demo/operate/index.vue
+18
-0
index.vue
pages/demo/plan/index.vue
+13
-3
index.vue
pages/resourceManagement/train/index.vue
+255
-0
index.js
plugins/request/index.js
+4
-2
account.js
store/admin/account.js
+2
-1
No files found.
pages/account/login/index.vue
View file @
240e35bc
...
...
@@ -82,6 +82,9 @@ export default {
}
else
{
this
.
$Message
.
error
(
"登录失败!"
);
}
}).
catch
(
e
=>
{
console
.
log
(
e
)
// this.$Message.error(e.message)
});
}
},
...
...
pages/aps/ai/index.vue
View file @
240e35bc
...
...
@@ -34,7 +34,7 @@
<Modal
v-model=
"apsModal"
title=
"确定智能排产"
@
on-ok=
"apsOk"
@
on-cancel=
"cancel"
>
<p>
确定进行智能排产?
</p>
</Modal>
<Modal
v-model=
"resultModal"
title=
"数据检查"
width=
"1500"
@
on-ok=
"cancel"
@
on-cancel=
"cancel"
>
<CheckResult
:data=
"result"
></CheckResult>
</Modal>
...
...
@@ -52,7 +52,6 @@
</Col>
</Row>
</Modal>
</div>
</template>
<
script
>
...
...
@@ -69,21 +68,21 @@ export default {
Expand
,
Temp
,
Duration
,
CheckResult
CheckResult
,
},
data
()
{
return
{
action
:
Api
.
index
,
easySearch
:
{
keys
:
{
op
:
"notes"
,
value
:
null
}
keys
:
{
op
:
"notes"
,
value
:
null
}
,
},
result
:
{
res
:
true
,
datas
:
'{}'
datas
:
"{}"
,
},
resultModal
:
false
,
entity
:
{
setTime
:
""
setTime
:
""
,
},
editModal
:
false
,
detailModal
:
false
,
...
...
@@ -106,11 +105,11 @@ export default {
return
h
(
"Icon"
,
{
attrs
:
{
type
:
"md-more"
,
size
:
18
size
:
18
,
},
class
:
"drag"
class
:
"drag"
,
});
}
}
,
},
{
type
:
"expand"
,
...
...
@@ -118,16 +117,16 @@ export default {
render
:
(
h
,
params
)
=>
{
return
h
(
Expand
,
{
props
:
{
rowId
:
params
.
row
.
part_task_pk
}
rowId
:
params
.
row
.
part_task_pk
,
}
,
});
}
}
,
},
{
key
:
"selection"
,
type
:
"selection"
,
width
:
50
,
align
:
"center"
align
:
"center"
,
},
{
key
:
"id"
,
...
...
@@ -135,38 +134,38 @@ export default {
hide
:
true
,
align
:
"left"
,
sortable
:
true
,
width
:
50
width
:
50
,
},
{
key
:
"mesCode"
,
title
:
this
.
l
(
"mes_code"
),
align
:
"left"
,
high
:
true
,
width
:
240
width
:
240
,
},
{
key
:
"product_name"
,
title
:
this
.
l
(
"product_name"
),
align
:
"left"
,
high
:
true
high
:
true
,
},
{
key
:
"drawingnum"
,
title
:
this
.
l
(
"drawingnum"
),
align
:
"left"
,
high
:
true
high
:
true
,
},
{
key
:
"project_no"
,
title
:
this
.
l
(
"project_no"
),
align
:
"left"
,
high
:
true
high
:
true
,
},
{
key
:
"batchnum"
,
title
:
this
.
l
(
"batchnum"
),
align
:
"left"
,
high
:
true
high
:
true
,
},
{
key
:
"urgency_level"
,
...
...
@@ -174,7 +173,7 @@ export default {
align
:
"left"
,
high
:
true
,
code
:
"plan.order.urgencyLevel"
,
width
:
100
width
:
100
,
},
{
key
:
"priority"
,
...
...
@@ -184,14 +183,14 @@ export default {
hide
:
true
,
render
:
(
h
,
params
)
=>
{
return
h
(
"span"
,
{},
params
.
index
+
1
);
}
}
,
},
{
key
:
"plan_qty"
,
title
:
this
.
l
(
"plan_qty"
),
align
:
"right"
,
width
:
100
,
high
:
true
high
:
true
,
},
{
key
:
"spare_qty"
,
...
...
@@ -199,7 +198,7 @@ export default {
align
:
"right"
,
width
:
100
,
high
:
true
,
hide
:
true
hide
:
true
,
},
{
key
:
"plan_start"
,
...
...
@@ -208,7 +207,7 @@ export default {
high
:
true
,
hide
:
true
,
resizable
:
true
,
width
:
150
width
:
150
,
},
{
key
:
"plan_finish"
,
...
...
@@ -218,7 +217,7 @@ export default {
hide
:
true
,
sortable
:
true
,
resizable
:
true
,
width
:
150
width
:
150
,
},
{
key
:
"notes"
,
...
...
@@ -226,7 +225,7 @@ export default {
align
:
"left"
,
easy
:
true
,
high
:
true
,
hide
:
true
hide
:
true
,
},
{
key
:
"demand_start"
,
...
...
@@ -234,7 +233,7 @@ export default {
align
:
"center"
,
resizable
:
true
,
width
:
150
,
type
:
"date"
type
:
"date"
,
},
{
key
:
"demand_finish"
,
...
...
@@ -243,14 +242,14 @@ export default {
high
:
true
,
resizable
:
true
,
width
:
150
,
type
:
"date"
type
:
"date"
,
},
{
key
:
"badjustflag"
,
title
:
this
.
l
(
"badjustflag"
),
align
:
"left"
,
high
:
true
,
hide
:
true
hide
:
true
,
},
{
title
:
"操作"
,
...
...
@@ -266,9 +265,9 @@ export default {
type
:
"icon"
,
title
:
"恢复工序"
,
oprate
:
"edit"
,
msg
:
"确认要恢复工序吗?"
msg
:
"确认要恢复工序吗?"
,
},
on
:
{
click
:
()
=>
this
.
refresh
(
params
.
row
.
part_task_pk
)
}
on
:
{
click
:
()
=>
this
.
refresh
(
params
.
row
.
part_task_pk
)
}
,
}),
h
(
"op"
,
{
attrs
:
{
...
...
@@ -276,13 +275,13 @@ export default {
type
:
"icon"
,
title
:
"移出排产池"
,
oprate
:
"delete"
,
msg
:
"确认要移出排产吗?"
msg
:
"确认要移出排产吗?"
,
},
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
part_task_pk
)
}
})
on
:
{
click
:
()
=>
this
.
remove
(
params
.
row
.
part_task_pk
)
}
,
})
,
]);
}
}
}
,
}
,
],
arrPartPkId
:
[],
//设置参数开始
...
...
@@ -290,11 +289,11 @@ export default {
opTaskPk
:
0
,
//工单ID
partTaskPk
:
0
,
//生产计划ID
taskSeq
:
""
,
//工序编号
count
:
0
//生产计划数量
count
:
0
,
//生产计划数量
},
//设置参数结束
circleModal
:
false
,
//进度条
tempStatu
:
0
//新建模型时传过来的id值
tempStatu
:
0
,
//新建模型时传过来的id值
};
},
mounted
()
{
...
...
@@ -306,14 +305,13 @@ export default {
methods
:
{
//排产池加载数据列表
loadList
()
{
Api
.
getall
().
then
(
res
=>
{
Api
.
getall
().
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
this
.
list
=
res
.
result
;
}
});
},
detail
(
id
)
{
this
.
detailModal
=
true
;
this
.
curId
=
id
;
...
...
@@ -325,9 +323,9 @@ export default {
refresh
(
partPkId
)
{
//恢复工序
let
params
=
{
id
:
partPkId
id
:
partPkId
,
};
Api
.
recoveryoptasksimluate
(
params
).
then
(
r
=>
{
Api
.
recoveryoptasksimluate
(
params
).
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"恢复成功"
);
this
.
list
=
[];
...
...
@@ -345,10 +343,10 @@ export default {
paramsArry
.
push
(
partPkId
);
}
let
params
=
{
partPks
:
paramsArry
partPks
:
paramsArry
,
};
Api
.
beforeshiftoutapspool
(
params
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
)
{
this
.
checkapspool
(
params
);
...
...
@@ -361,7 +359,7 @@ export default {
this
.
$Message
.
error
(
"校验失败"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
$Message
.
error
(
"连接错误1"
);
});
},
...
...
@@ -370,7 +368,7 @@ export default {
},
checkapspool
(
params
)
{
Api
.
shiftoutapspool
(
params
)
.
then
(
r
=>
{
.
then
(
(
r
)
=>
{
if
(
r
.
success
)
{
this
.
$Message
.
success
(
"移出排产池操作成功"
);
this
.
loadList
();
...
...
@@ -383,7 +381,7 @@ export default {
this
.
$Message
.
error
(
"移出排产池操作失败"
);
}
})
.
catch
(
err
=>
{
.
catch
(
(
err
)
=>
{
this
.
$Message
.
error
(
"连接失败2"
);
});
},
...
...
@@ -391,7 +389,7 @@ export default {
//批量选择
let
selectRows
=
a
;
this
.
arrPartPkId
=
[];
selectRows
.
forEach
(
e
=>
{
selectRows
.
forEach
(
(
e
)
=>
{
this
.
arrPartPkId
.
push
(
e
.
part_task_pk
);
});
},
...
...
@@ -418,7 +416,7 @@ export default {
this
.
list
.
splice
(
a
,
1
);
this
.
list
.
splice
(
b
,
0
,
tempArray
);
},
getUserDepart
()
{
alert
(
"5656565"
);
// Api.getUserDepart().then(res=>{
...
...
@@ -441,7 +439,7 @@ export default {
this
.
$Message
.
error
(
"请设置基准日期"
);
}
},
//确定智能排产
apsOk
()
{
this
.
circleModal
=
true
;
...
...
@@ -457,13 +455,13 @@ export default {
parmsOrderpriority
.
alls
=
arryIds
;
// alert(JSON.stringify(parmsOrderpriority));
Api
.
orderpriority
(
parmsOrderpriority
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
result
)
{
//this.$Message.success("排序成功");
//智能排产前检查
Api
.
apsdatachecked
()
.
then
(
res1
=>
{
.
then
(
(
res1
)
=>
{
if
(
res1
.
success
)
{
// this.result=res1.result;
// this.resultModal=true;
...
...
@@ -471,12 +469,12 @@ export default {
}
else
{
// this.circleModal = false;
// this.$Message.error("操作失败:数据校验");
this
.
result
=
res1
.
result
;
this
.
resultModal
=
true
;
this
.
result
=
res1
.
result
;
this
.
resultModal
=
true
;
}
})
.
catch
(
function
(
err
)
{
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
...
...
@@ -491,7 +489,7 @@ export default {
}
})
.
catch
(
function
(
err
)
{
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
...
...
@@ -500,22 +498,30 @@ export default {
checkOk
()
{
//排产计算
let
paramsTime
=
{
setTime
:
this
.
entity
.
setTime
setTime
:
this
.
entity
.
setTime
,
};
Api
.
apsprepareandcalc
(
paramsTime
)
.
then
(
res2
=>
{
.
then
(
(
res2
)
=>
{
if
(
res2
.
success
)
{
if
(
res2
.
result
.
res
)
{
this
.
$Message
.
success
(
"排产计算成功"
);
//
this.$Message.success("排产计算成功");
//智能排产操作start
//只能排产操作end
this
.
circleModal
=
false
;
this
.
$router
.
push
({
path
:
"/ai/results"
// params: { customerId: id }
Api
.
aischedule
(
paramsTime
).
then
((
res3
)
=>
{
if
(
res3
.
success
)
{
if
(
res3
.
result
.
res
)
{
this
.
$Message
.
success
(
"排产成功"
);
this
.
circleModal
=
false
;
this
.
$router
.
push
({
path
:
"/ai/results"
,
// params: { customerId: id }
});
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
res3
.
result
.
msg
);
}
}
});
//智能排产操作end
}
else
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
res2
.
result
.
msg
);
...
...
@@ -526,16 +532,13 @@ export default {
}
})
.
catch
(
function
(
err
)
{
function
(
err
)
{
this
.
circleModal
=
false
;
this
.
$Message
.
error
(
"操作失败"
);
}.
bind
(
this
)
);
},
}
},
};
</
script
>
<
style
lang=
"less"
>
...
...
pages/aps/aps/api.js
View file @
240e35bc
...
...
@@ -121,16 +121,21 @@ export default {
},
//保存外协任务工期
saveoutsidetime
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/saveoutsidetime
`
,
params
)
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/saveoutsidetime`
,
params
)
},
//保存插单任务
saveinsertorder
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/saveinsertorder
`
,
params
)
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/saveinsertorder`
,
params
)
},
//取消插单任务
cancelinsertorder
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/cancelinsertorder
`
,
params
)
return
Api
.
post
(
`
${
apsUrl
}
/apspoolappservices/cancelinsertorder`
,
params
)
},
//修改外协工期相关end-----
//智能排产start----
aischedule
(
params
)
{
return
Api
.
post
(
`
${
apsUrl
}
/aps/aischedule`
,
params
)
},
//智能排产end----
}
pages/demo/operate/index.vue
View file @
240e35bc
...
...
@@ -98,6 +98,13 @@
<Option
value=
"shenzhen"
>
贵阳客运段
</Option>
</Select>
</FormItem>
<FormItem
label=
"来源类型"
>
<RadioGroup
v-model=
"formItem.radio3"
>
<Radio
label=
"1"
>
调图电报
</Radio>
<Radio
label=
"2"
>
临时调度
</Radio>
<Radio
label=
"3"
>
其他
</Radio>
</RadioGroup>
</FormItem>
<FormItem
label=
"编组"
>
<RadioGroup
v-model=
"formItem.radio"
>
<Radio
label=
"male"
>
重编
</Radio>
...
...
@@ -105,6 +112,7 @@
<Radio
label=
"female"
>
长编
</Radio>
</RadioGroup>
</FormItem>
<FormItem
label=
"车次类型"
>
<RadioGroup
v-model=
"formItem.radio1"
>
<Radio
label=
"male"
>
日常
</Radio>
...
...
@@ -153,6 +161,7 @@ export default {
time
:
""
,
slider
:
[
20
,
50
],
textarea
:
""
,
radio3
:
"1"
,
},
modal
:
false
,
modal1
:
false
,
...
...
@@ -192,6 +201,10 @@ export default {
title
:
"运营里程(公里)"
,
key
:
"a4"
,
},
{
title
:
"来源类型"
,
key
:
"a10"
,
},
{
title
:
"编组"
,
key
:
"a5"
,
...
...
@@ -275,6 +288,7 @@ export default {
"5.10、5.11、5.15、5.16、5.17、5.18、5.22、5.23、5.24、5.25、5.29、5.30、5.31"
,
a8
:
"否"
,
a9
:
""
,
a10
:
"调图电报"
,
},
{
name
:
"D8592"
,
...
...
@@ -290,6 +304,7 @@ export default {
"5.10、5.11、5.15、5.16、5.17、5.18、5.22、5.23、5.24、5.25、5.29、5.30、5.31"
,
a8
:
"有"
,
a9
:
""
,
a10
:
"调图电报"
,
},
{
name
:
"D8591"
,
...
...
@@ -305,6 +320,7 @@ export default {
"5.10、5.11、5.15、5.16、5.17、5.18、5.22、5.23、5.24、5.25、5.29、5.30、5.31"
,
a8
:
"有"
,
a9
:
""
,
a10
:
"临时调度"
,
},
{
name
:
"C6691"
,
...
...
@@ -319,6 +335,7 @@ export default {
a7
:
"长期"
,
a8
:
"否"
,
a9
:
""
,
a10
:
"其他"
,
},
{
name
:
"G8641"
,
...
...
@@ -334,6 +351,7 @@ export default {
"5.10、5.11、5.15、5.16、5.17、5.18、5.22、5.23、5.24、5.25、5.29、5.30、5.31"
,
a8
:
"否"
,
a9
:
"临时"
,
a10
:
"调图电报"
,
},
],
};
...
...
pages/demo/plan/index.vue
View file @
240e35bc
...
...
@@ -7,7 +7,7 @@
<Input
type=
"text"
v-model=
"formInline.name"
placeholder=
"请输入车次"
></Input>
</FormItem>
</Col>
<Col
span=
"4"
>
<Col
span=
"4"
>
<FormItem
prop=
"company"
label=
"始发站"
>
<Select
v-model=
"formInline.company"
style=
"width:200px"
>
<Option
value=
"beijing"
>
贵阳北
</Option>
...
...
@@ -54,7 +54,7 @@
<FormItem
label=
"车次"
>
<Input
v-model=
"formItem.input"
placeholder=
"请输入车次"
></Input>
</FormItem>
<FormItem
prop=
"company"
label=
"始发站"
>
<FormItem
prop=
"company"
label=
"始发站"
>
<Select
v-model=
"formItem.company"
style=
"width:200px"
>
<Option
value=
"beijing"
>
贵阳北
</Option>
<Option
value=
"shanghai"
>
重庆西
</Option>
...
...
@@ -92,7 +92,7 @@
</FormItem>
<FormItem
prop=
"company1"
label=
"担当车辆段"
>
<Select
v-model=
"formItem.company3"
>
<Option
value=
"beijing"
>
贵阳客运段
</Option>
<Option
value=
"beijing"
>
贵阳客运段
</Option>
<Option
value=
"shanghai"
>
贵阳车辆段
</Option>
<Option
value=
"shenzhen"
>
贵阳客运段
</Option>
</Select>
...
...
@@ -166,6 +166,11 @@ export default {
title
:
"车次"
,
key
:
"name"
,
},
{
title
:
"列车号"
,
key
:
"name1"
,
width
:
130
,
},
{
title
:
"始发站"
,
key
:
"a2"
,
...
...
@@ -262,6 +267,7 @@ export default {
data
:
[
{
name
:
"G8642"
,
name1
:
"CR200J30001"
,
startTime
:
"17:26"
,
a2
:
"贵阳北"
,
a
:
"成都东"
,
...
...
@@ -277,6 +283,7 @@ export default {
},
{
name
:
"D8592"
,
name1
:
"CR200J30013"
,
startTime
:
"11:40"
,
a2
:
"贵阳北"
,
a
:
"重庆西"
,
...
...
@@ -292,6 +299,7 @@ export default {
},
{
name
:
"D8591"
,
name1
:
"CR200J30009"
,
startTime
:
"14:16"
,
a2
:
"重庆西"
,
a
:
"贵阳北"
,
...
...
@@ -307,6 +315,7 @@ export default {
},
{
name
:
"C6691"
,
name1
:
"CR200J30008"
,
startTime
:
"13:32"
,
a2
:
"广元"
,
a
:
"成都东"
,
...
...
@@ -321,6 +330,7 @@ export default {
},
{
name
:
"G8641"
,
name1
:
"CR200J30012"
,
startTime
:
"17:26"
,
a2
:
"成都东"
,
a
:
"贵阳北"
,
...
...
pages/resourceManagement/train/index.vue
0 → 100644
View file @
240e35bc
<
template
>
<div
class=
"train"
>
<Row
:gutter=
"16"
style=
"margin-bottom:10px"
>
<Col
span=
"4"
>
<Input
v-model=
"keys"
search
placeholder=
"请输入车辆编号"
clearable
/>
</Col>
<Col
span=
"20"
style=
"text-align:right"
>
<Button
type=
"primary"
@
click=
"add"
>
新增
</Button>
</Col>
</Row>
<Table
border
:columns=
"columns"
:data=
"projectList"
></Table>
<Modal
v-model=
"modal"
:title=
"title"
@
on-ok=
"ok"
@
on-cancel=
"cancel"
width=
"600"
>
<Form
:model=
"formItem"
:label-width=
"100"
>
<FormItem
label=
"车辆编号"
>
<Input
v-model=
"formItem.name"
placeholder=
"请输入车辆编号"
></Input>
</FormItem>
<FormItem
label=
"车辆类型"
>
<Select
v-model=
"formItem.name1"
style=
"width:200px"
>
<Option
value=
"1"
>
CR2001
</Option>
<Option
value=
"2"
>
CR200J
</Option>
<Option
value=
"3"
>
CR2008
</Option>
</Select>
</FormItem>
<FormItem
label=
"类型编号"
>
<Input
v-model=
"formItem.a2"
placeholder=
"请输入类型编号"
></Input>
</FormItem>
<FormItem
label=
"生产厂家"
>
<Select
v-model=
"formItem.a"
style=
"width:200px"
>
<Option
value=
"1"
>
长客
</Option>
<Option
value=
"2"
>
唐厂
</Option>
</Select>
</FormItem>
<FormItem
label=
"出厂时间"
>
<DatePicker
type=
"date"
placeholder=
"Select startTime"
v-model=
"formItem.startTime"
style=
"width: 408px"
></DatePicker>
</FormItem>
<FormItem
label=
"配属时间"
>
<DatePicker
type=
"date"
placeholder=
"Select startTime"
v-model=
"formItem.a1"
style=
"width: 408px"
></DatePicker>
</FormItem>
</Form>
</Modal>
</div>
</
template
>
<
script
>
export
default
{
name
:
""
,
data
()
{
return
{
title
:
""
,
formInline
:
{
name
:
""
,
},
keys
:
""
,
formItem
:
{
name
:
""
,
name1
:
""
,
startTime
:
""
,
a2
:
""
,
a
:
""
,
a1
:
""
,
},
modal
:
false
,
modal1
:
false
,
columns
:
[
{
title
:
"序号"
,
type
:
"index"
,
width
:
60
,
align
:
"center"
,
},
{
title
:
"车辆编号"
,
key
:
"name"
,
},
{
title
:
"车辆类型"
,
key
:
"name1"
,
},
{
title
:
"类型编号"
,
key
:
"a2"
,
},
{
title
:
"生产厂家"
,
key
:
"a"
,
},
{
title
:
"出厂时间"
,
key
:
"startTime"
,
},
{
title
:
"配属时间"
,
key
:
"a1"
,
},
{
title
:
"操作"
,
key
:
"action"
,
width
:
120
,
align
:
"center"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
h
(
"op"
,
{
props
:
{
type
:
"detail"
,
size
:
"small"
,
},
style
:
{
marginRight
:
"5px"
,
},
on
:
{
click
:
()
=>
{
this
.
edit
(
params
.
row
);
},
},
},
"编辑"
),
h
(
"op"
,
{
props
:
{
type
:
"detail"
,
size
:
"small"
,
},
style
:
{
marginRight
:
"5px"
,
},
on
:
{
click
:
()
=>
{
this
.
remover
(
params
.
index
);
},
},
},
"删除"
),
]);
},
},
],
data
:
[
{
name
:
"CR200J3001"
,
name1
:
"CR200J"
,
startTime
:
"2017-02-05"
,
a2
:
"003"
,
a
:
"长客"
,
a1
:
"2018-03-01"
,
},
{
name
:
"CR200J3003"
,
name1
:
"CR200J"
,
startTime
:
"2017-02-15"
,
a2
:
"003"
,
a
:
"长客"
,
a1
:
"2018-03-01"
,
},
{
name
:
"CR200J1009"
,
name1
:
"CR200J"
,
startTime
:
"2017-02-15"
,
a2
:
"001"
,
a
:
"唐厂"
,
a1
:
"2018-03-01"
,
},
{
name
:
"CR200J1021"
,
name1
:
"CR200J"
,
startTime
:
"2017-02-09"
,
a2
:
"001"
,
a
:
"唐厂"
,
a1
:
"2018-03-01"
,
},
],
};
},
computed
:
{
projectList
()
{
return
this
.
data
.
filter
((
u
)
=>
{
return
u
.
name
.
indexOf
(
this
.
keys
)
>
-
1
;
});
},
},
methods
:
{
handleSubmit
(
name
)
{
this
.
$refs
[
name
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
$Message
.
success
(
"Success!"
);
}
else
{
this
.
$Message
.
error
(
"Fail!"
);
}
});
},
reset
()
{},
add
()
{
this
.
title
=
"新建"
;
this
.
modal
=
true
;
},
edit
(
row
)
{
console
.
log
(
row
);
this
.
title
=
"编辑"
;
this
.
modal
=
true
;
this
.
formItem
.
name
=
row
.
name
;
this
.
formItem
.
startTime
=
row
.
startTime
;
this
.
formItem
.
a2
=
row
.
a2
;
this
.
formItem
.
a1
=
row
.
a1
;
this
.
formItem
.
name1
=
"2"
;
if
(
row
.
a
==
"唐厂"
)
{
this
.
formItem
.
a
=
"2"
;
}
else
{
this
.
formItem
.
a
=
"1"
;
}
},
remover
()
{
this
.
$Modal
.
confirm
({
title
:
"删除"
,
content
:
"<p>您确定删除此信息?</p>"
,
onOk
:
()
=>
{
this
.
$Message
.
info
(
"Clicked ok"
);
},
onCancel
:
()
=>
{
this
.
$Message
.
info
(
"Clicked cancel"
);
},
});
},
ok
()
{
this
.
$Message
.
info
(
"Clicked ok"
);
},
cancel
()
{
this
.
$Message
.
info
(
"Clicked cancel"
);
},
},
};
</
script
>
<
style
lang=
"less"
>
.train {
padding-top: 10px;
.ivu-form-item-content {
float: left;
}
}
</
style
>
\ No newline at end of file
plugins/request/index.js
View file @
240e35bc
...
...
@@ -134,12 +134,13 @@ service.interceptors.response.use(
},
error
=>
{
const
token
=
sessionStorage
.
getItem
(
'token'
);
if
(
!
token
)
{
if
(
!
token
&&!
error
&&
!
error
.
response
)
{
window
.
location
.
href
=
'/account/login'
;
return
;
}
if
(
error
&&
error
.
response
)
{
// return;
if
(
error
.
response
.
status
==
"401"
)
{
window
.
location
.
href
=
'/account/login'
;
return
;
...
...
@@ -183,6 +184,7 @@ service.interceptors.response.use(
}
}
errorLog
(
error
);
return
Promise
.
reject
(
error
);
}
...
...
store/admin/account.js
View file @
240e35bc
...
...
@@ -57,7 +57,8 @@ export const actions = {
})
.
catch
(
err
=>
{
// console.log('err: ', err);
//console.log('erraaa: ', err);
reject
(
err
);
})
})
...
...
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