Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
王刘锁
/
jianlin-tms-view
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
25710986
authored
Nov 07, 2022
by
王刘锁
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
点位管理设备类型
parent
84c796aa
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
87 additions
and
37 deletions
src/api/siteAdmin/SiteConfig.js
src/views/modules/equipmentAdmin/equipmentAccount/add.vue
src/views/modules/equipmentAdmin/equipmentAccount/index.vue
src/views/modules/siteAdmin/siteConfig/add.vue
src/views/modules/taskPlan/taskChainList/index.vue
src/api/siteAdmin/SiteConfig.js
View file @
25710986
...
@@ -66,4 +66,13 @@ export default class SiteConfig {
...
@@ -66,4 +66,13 @@ export default class SiteConfig {
responseType
:
"blob"
,
responseType
:
"blob"
,
});
});
}
}
// 获取库位开关选项
getEquipOptions
(
data
)
{
return
request
({
url
:
"/facility/equipment/getList"
,
method
:
"post"
,
data
});
}
}
}
src/views/modules/equipmentAdmin/equipmentAccount/add.vue
View file @
25710986
...
@@ -30,8 +30,8 @@
...
@@ -30,8 +30,8 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
等待点位:"
prop=
"pointId"
:rules=
"[
{ message: '请选择等待
点位', trigger: 'change' },]">
<el-form-item
label=
"
点位:"
prop=
"pointId"
:rules=
"[
{ message: '请选择
点位', trigger: 'change' },]">
<el-select
v-model=
"formData.pointId"
filterable
placeholder=
"
等待
点位"
>
<el-select
v-model=
"formData.pointId"
filterable
placeholder=
"点位"
>
<el-option
v-for=
"item in formData.pointOptions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
<el-option
v-for=
"item in formData.pointOptions"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
>
</el-option>
</el-option>
</el-select>
</el-select>
...
...
src/views/modules/equipmentAdmin/equipmentAccount/index.vue
View file @
25710986
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
@
click=
"accountDelete(scope.row)"
>
删除
@
click=
"accountDelete(scope.row)"
>
删除
</el-button>
</el-button>
<el-divider
direction=
"vertical"
></el-divider>
<el-divider
direction=
"vertical"
></el-divider>
<el-button
v-if=
"hasPermission('equipmentAccount:edit') &&
scope.row.equipmentType === '4'
"
type=
"text"
size=
"small"
@
click=
"showRight(scope.row)"
>
管理主题
</el-button>
<el-button
v-if=
"hasPermission('equipmentAccount:edit') &&
(scope.row.equipmentType === '4' || scope.row.equipmentType === '5' || scope.row.equipmentType === '6')
"
type=
"text"
size=
"small"
@
click=
"showRight(scope.row)"
>
管理主题
</el-button>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
</vxe-table>
</vxe-table>
...
...
src/views/modules/siteAdmin/siteConfig/add.vue
View file @
25710986
...
@@ -46,13 +46,14 @@
...
@@ -46,13 +46,14 @@
:checkbox-config=
"{ highlight: true }"
>
:checkbox-config=
"{ highlight: true }"
>
<vxe-column
width=
"80px"
>
<vxe-column
width=
"80px"
>
<
template
#
default=
"{ row }"
>
<
template
#
default=
"{ row }"
>
<div>
关联任务
</div>
<div>
点位
</div>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
<vxe-column>
<vxe-column>
<
template
#
default=
"{ row, $rowIndex }"
>
<
template
#
default=
"{ row, $rowIndex }"
>
<el-form-item
:prop=
"`entities[$
{$rowIndex}].equipmentType`"
<el-form-item
:prop=
"`entities[$
{$rowIndex}].equipmentType`"
:rules="[{ required: true, message: '请选择设备类型', trigger: 'change' },]" :inline-message="true">
:rules="[{ required: true, message: '请选择设备类型', trigger: 'change' },]"
:inline-message="true">
<el-select
v-model=
"row.equipmentType"
placeholder=
"设备类型"
<el-select
v-model=
"row.equipmentType"
placeholder=
"设备类型"
@
change=
"(value) =>
{ getEquipmentType(value, row) }">
@
change=
"(value) =>
{ getEquipmentType(value, row) }">
<el-option
v-for=
"item in $dictUtils.getDictList('tms_equipment_type')"
:key=
"item.value"
<el-option
v-for=
"item in $dictUtils.getDictList('tms_equipment_type')"
:key=
"item.value"
...
@@ -100,6 +101,36 @@
...
@@ -100,6 +101,36 @@
</el-cascader>
</el-cascader>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
<vxe-column
width=
"80px"
>
<
template
#
default=
"{ row }"
>
<span>
库位开关
</span>
</
template
>
</vxe-column>
<vxe-column>
<
template
#
default=
"{ row , $rowIndex }"
>
<el-form-item
:prop=
"`entities[$
{$rowIndex}].devAddr`"
:rules="[{ required: false, message: '请选择库位开关设备', trigger: 'change' },]"
:inline-message="true">
<el-select
v-model=
"row.devAddr"
filterable
placeholder=
"库位开关设备"
>
<el-option
v-for=
"item in equipOptions"
:key=
"item.key"
:label=
"item.label"
:value=
"item.key"
>
</el-option>
</el-select>
</el-form-item>
</
template
>
</vxe-column>
<vxe-column>
<
template
#
default=
"{ row , $rowIndex }"
>
<el-form-item
:prop=
"`entities[$
{$rowIndex}].keyNum`"
:rules="[{ required: false, message: '请选择按钮序号', trigger: 'change' },]"
:inline-message="true">
<el-select
v-model=
"row.keyNum"
filterable
placeholder=
"按钮序号"
>
<el-option
v-for=
"item in keyNumOptions"
:key=
"item.key"
:label=
"item.label"
:value=
"item.key"
>
</el-option>
</el-select>
</el-form-item>
</
template
>
</vxe-column>
<!-- <vxe-column width="80px">
<!-- <vxe-column width="80px">
<template #default="{ row }">
<template #default="{ row }">
<span v-if="row.equipmentType === '1' || row.equipmentType === '2'">车辆分组</span>
<span v-if="row.equipmentType === '1' || row.equipmentType === '2'">车辆分组</span>
...
@@ -178,8 +209,12 @@ export default {
...
@@ -178,8 +209,12 @@ export default {
}
}
}
}
},
},
data
()
{
data
()
{
return
{
return
{
equipOptions
:
[],
keyNumOptions
:
[{
key
:
'1'
,
label
:
'1'
},
{
key
:
'2'
,
label
:
'2'
},
{
key
:
'3'
,
label
:
'3'
},
{
key
:
'4'
,
label
:
'4'
},
{
key
:
'5'
,
label
:
'5'
}],
dialogVisible
:
false
,
dialogVisible
:
false
,
factoryOptions
:
[],
factoryOptions
:
[],
formData
:
{
formData
:
{
...
@@ -192,94 +227,98 @@ export default {
...
@@ -192,94 +227,98 @@ export default {
configTempList
:
[],
configTempList
:
[],
rules
:
{
rules
:
{
factoryId
:
[
factoryId
:
[
{
required
:
true
,
message
:
'请选择厂区类型'
,
trigger
:
'change'
},
{
required
:
true
,
message
:
'请选择厂区类型'
,
trigger
:
'change'
},
],
],
floorNum
:
[
floorNum
:
[
{
required
:
true
,
message
:
'请输入楼层'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入楼层'
,
trigger
:
'blur'
},
],
],
siteType
:
[
siteType
:
[
{
required
:
true
,
message
:
'请选择站点类型'
,
trigger
:
'change'
},
{
required
:
true
,
message
:
'请选择站点类型'
,
trigger
:
'change'
},
],
],
name
:
[
name
:
[
{
required
:
true
,
message
:
'请输入站点名称'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入站点名称'
,
trigger
:
'blur'
},
],
],
command
:
[
command
:
[
{
required
:
true
,
message
:
'请输入指令标识'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入指令标识'
,
trigger
:
'blur'
},
],
],
sort
:
[
sort
:
[
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入排序'
,
trigger
:
'blur'
},
]
]
}
}
}
}
},
},
watch
:
{},
watch
:
{},
computed
:
{
computed
:
{},
},
methods
:
{
methods
:
{
// 打开弹窗
// 打开弹窗
open
()
{
open
()
{
this
.
dialogVisible
=
!
this
.
dialogVisible
this
.
dialogVisible
=
!
this
.
dialogVisible
},
},
// 关闭当前组件
// 关闭当前组件
dialogClose
()
{
dialogClose
()
{
this
.
$parent
.
_data
.
dialogConfig
.
open
=
false
this
.
$parent
.
_data
.
dialogConfig
.
open
=
false
},
},
// 表格新增
// 表格新增
tableDataADD
()
{
tableDataADD
()
{
this
.
formData
.
entities
.
push
({})
this
.
formData
.
entities
.
push
({})
},
},
// 获取厂区下拉
// 获取厂区下拉
getFactoryList
()
{
getFactoryList
()
{
this
.
FactoryAdmin
.
getFactoryList
().
then
(({
data
})
=>
{
this
.
FactoryAdmin
.
getFactoryList
().
then
(({
data
})
=>
{
this
.
factoryOptions
=
data
this
.
factoryOptions
=
data
})
})
},
},
// 获取站点配置模板下拉
// 获取站点配置模板下拉
getConfigTempList
()
{
getConfigTempList
()
{
this
.
SiteConfigTemplate
.
getConfigTempList
().
then
(({
data
})
=>
{
this
.
SiteConfigTemplate
.
getConfigTempList
().
then
(({
data
})
=>
{
this
.
configTempList
=
data
this
.
configTempList
=
data
})
})
},
},
// 表格删除
// 表格删除
removeRow
(
index
)
{
removeRow
(
index
)
{
this
.
formData
.
entities
.
splice
(
index
,
1
)
this
.
formData
.
entities
.
splice
(
index
,
1
)
},
},
async
getEquipmentType
(
value
,
row
)
{
async
getEquipmentType
(
value
,
row
)
{
if
(
value
!==
'1'
||
value
!==
'2'
)
{
if
(
value
!==
'1'
||
value
!==
'2'
)
{
this
.
$set
(
row
,
'configMap'
,
''
)
this
.
$set
(
row
,
'configMap'
,
''
)
this
.
$set
(
row
,
'pointId'
,
''
)
this
.
$set
(
row
,
'pointId'
,
''
)
}
}
},
},
// 获取地图下拉
// 获取地图下拉
getConfigMap
(
state
,
row
)
{
getConfigMap
(
state
,
row
)
{
if
(
state
&&
row
.
equipmentType
)
{
if
(
state
&&
row
.
equipmentType
)
{
this
.
MapAdmin
.
getMapList
({
equipmentType
:
row
.
equipmentType
}).
then
(({
data
})
=>
{
this
.
MapAdmin
.
getMapList
({
equipmentType
:
row
.
equipmentType
}).
then
(({
data
})
=>
{
this
.
$set
(
row
,
'mapOptions'
,
data
)
this
.
$set
(
row
,
'mapOptions'
,
data
)
})
})
}
}
},
},
// 获取库位开关下拉
getequipOptions
()
{
this
.
SiteConfig
.
getEquipOptions
({
equipmentType
:
'6'
}).
then
(({
data
})
=>
{
this
.
equipOptions
=
data
})
},
// 获取点位下拉
// 获取点位下拉
getPointType
(
value
,
row
)
{
getPointType
(
value
,
row
)
{
if
(
row
.
configMap
)
{
if
(
row
.
configMap
)
{
this
.
PositionAdmin
.
getPointList
({
mapId
:
row
.
configMap
}).
then
(({
data
})
=>
{
this
.
PositionAdmin
.
getPointList
({
mapId
:
row
.
configMap
}).
then
(({
data
})
=>
{
this
.
$set
(
row
,
'pointOptions'
,
data
)
this
.
$set
(
row
,
'pointOptions'
,
data
)
})
})
}
}
},
},
// 获取任务类型下拉
// 获取任务类型下拉
getTaskType
(
state
,
row
)
{
getTaskType
(
state
,
row
)
{
if
(
state
&&
this
.
formData
.
tempId
)
{
if
(
state
&&
this
.
formData
.
tempId
)
{
this
.
ConfigTempType
.
getConfigTempTypeList
({
tempId
:
this
.
formData
.
tempId
}).
then
(({
data
})
=>
{
this
.
ConfigTempType
.
getConfigTempTypeList
({
tempId
:
this
.
formData
.
tempId
}).
then
(({
data
})
=>
{
this
.
$set
(
row
,
'taskTypeOptions'
,
data
)
this
.
$set
(
row
,
'taskTypeOptions'
,
data
)
})
})
}
}
},
},
// 提交
// 提交
getSiteConfigAdd
(
formName
)
{
getSiteConfigAdd
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
SiteConfig
.
getConfigAdd
(
this
.
formData
).
then
(({
data
})
=>
{
this
.
SiteConfig
.
getConfigAdd
(
this
.
formData
).
then
(({
data
})
=>
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'新增成功!'
message
:
'新增成功!'
...
@@ -291,14 +330,14 @@ export default {
...
@@ -291,14 +330,14 @@ export default {
});
});
},
},
// 获取详情接口
// 获取详情接口
async
getInfo
(
id
)
{
async
getInfo
(
id
)
{
this
.
SiteConfig
.
getConfigInfo
(
id
).
then
(
async
({
data
})
=>
{
this
.
SiteConfig
.
getConfigInfo
(
id
).
then
(
async
({
data
})
=>
{
this
.
formData
=
data
this
.
formData
=
data
this
.
open
()
this
.
open
()
})
})
},
},
// 编辑更新按钮
// 编辑更新按钮
getSiteConfigEdit
(
formName
)
{
getSiteConfigEdit
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
SiteConfig
.
getConfigUpdate
(
this
.
formData
).
then
((
res
)
=>
{
this
.
SiteConfig
.
getConfigUpdate
(
this
.
formData
).
then
((
res
)
=>
{
...
@@ -313,7 +352,7 @@ export default {
...
@@ -313,7 +352,7 @@ export default {
});
});
},
},
},
},
created
()
{
created
()
{
this
.
FactoryAdmin
=
new
FactoryAdmin
()
this
.
FactoryAdmin
=
new
FactoryAdmin
()
this
.
SiteConfigTemplate
=
new
SiteConfigTemplate
()
this
.
SiteConfigTemplate
=
new
SiteConfigTemplate
()
this
.
MapAdmin
=
new
MapAdmin
()
this
.
MapAdmin
=
new
MapAdmin
()
...
@@ -321,9 +360,10 @@ export default {
...
@@ -321,9 +360,10 @@ export default {
this
.
ConfigTempType
=
new
ConfigTempType
()
this
.
ConfigTempType
=
new
ConfigTempType
()
this
.
SiteConfig
=
new
SiteConfig
()
this
.
SiteConfig
=
new
SiteConfig
()
},
},
mounted
()
{
mounted
()
{
this
.
getFactoryList
()
this
.
getFactoryList
()
this
.
getConfigTempList
()
this
.
getConfigTempList
()
this
.
getequipOptions
()
}
}
}
}
</
script
>
</
script
>
...
...
src/views/modules/taskPlan/taskChainList/index.vue
View file @
25710986
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
<span
v-else-if=
"scope.row.taskStatus === '1'"
style=
"color: #e1750f;font-weight: bold;"
>
执行中
</span>
<span
v-else-if=
"scope.row.taskStatus === '1'"
style=
"color: #e1750f;font-weight: bold;"
>
执行中
</span>
<span
v-else-if=
"scope.row.taskStatus === '4'"
style=
"color: #999999;font-weight: bold;"
>
已取消
</span>
<span
v-else-if=
"scope.row.taskStatus === '4'"
style=
"color: #999999;font-weight: bold;"
>
已取消
</span>
<span
v-else-if=
"scope.row.taskStatus === '3'"
style=
"color: #249601;font-weight: bold;"
>
已完成
</span>
<span
v-else-if=
"scope.row.taskStatus === '3'"
style=
"color: #249601;font-weight: bold;"
>
已完成
</span>
<span
v-else-if=
"scope.row.taskStatus === '5'"
style=
"color: #249601;font-weight: bold;"
>
队列中
</span>
</
template
>
</
template
>
</vxe-column>
</vxe-column>
<vxe-column
field=
"source_dictText"
title=
"来源"
align=
"center"
></vxe-column>
<vxe-column
field=
"source_dictText"
title=
"来源"
align=
"center"
></vxe-column>
...
...
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