Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
whp-xl
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhichao
whp-xl
Commits
0da53ab9
Commit
0da53ab9
authored
Jun 24, 2021
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
危化设备管理企业选择 gengdidi
parent
1319ac29
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
68 additions
and
8 deletions
+68
-8
SafetyDeviceMg.vue
...hcsystem-master/src/views/SafetyDevice/SafetyDeviceMg.vue
+5
-2
SafetyDeviceMgEdit.vue
...stem-master/src/views/SafetyDevice/SafetyDeviceMgEdit.vue
+63
-6
No files found.
dcit-hcsystem-hcsystem-master/src/views/SafetyDevice/SafetyDeviceMg.vue
View file @
0da53ab9
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
<el-table
:data=
"tableData.pageData"
stripe
border
style=
"width:100%;"
:loading=
"loading"
>
<el-table
:data=
"tableData.pageData"
stripe
border
style=
"width:100%;"
:loading=
"loading"
>
<el-table-column
width=
"50"
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
width=
"50"
type=
"index"
label=
"序号"
></el-table-column>
<el-table-column
prop=
"enterpriseName"
label=
"企业名称"
></el-table-column>
<el-table-column
prop=
"enterpriseName"
label=
"企业名称"
></el-table-column>
<el-input
type=
"hidden"
pro=
"enterpriseId"
></el-input>
<el-table-column
prop=
"deviceName"
label=
"设备名称"
></el-table-column>
<el-table-column
prop=
"deviceName"
label=
"设备名称"
></el-table-column>
<el-table-column
prop=
"deviceName"
label=
"设备类型"
>
<el-table-column
prop=
"deviceName"
label=
"设备类型"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -141,8 +142,10 @@ export default class SafetyDeviceMg extends Vue {
...
@@ -141,8 +142,10 @@ export default class SafetyDeviceMg extends Vue {
addFun
()
{
addFun
()
{
this
.
zjKey
++
;
this
.
zjKey
++
;
this
.
dialogVisible
=
true
;
this
.
dialogVisible
=
true
;
this
.
formData
.
dataType
=
this
.
searchData
.
dataType
;
//this.formData.dataType = this.searchData.dataType;
this
.
formData
.
enterpriseId
=
this
.
enterpriseId
;
if
(
METHOD
.
enterpriseId
){
this
.
formData
.
enterpriseId
=
METHOD
.
enterpriseId
;
}
}
}
editFun
(
row
:
any
)
{
editFun
(
row
:
any
)
{
this
.
dialogTit
=
"编辑"
;
this
.
dialogTit
=
"编辑"
;
...
...
dcit-hcsystem-hcsystem-master/src/views/SafetyDevice/SafetyDeviceMgEdit.vue
View file @
0da53ab9
...
@@ -7,6 +7,16 @@
...
@@ -7,6 +7,16 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
>
>
<el-form
ref=
"editForm"
:model=
"editForm"
:rules=
"rules"
label-width=
"100px"
>
<el-form
ref=
"editForm"
:model=
"editForm"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
label=
"选择企业"
prop=
"enterpriseId"
v-if=
"play"
>
<el-select
v-model=
"editForm.enterpriseId"
placeholder=
"请选择"
@
change=
"seletChange"
>
<el-option
v-for=
"item in enterpriseList"
:key=
"item.enterpriseId"
:label=
"item.unitName"
:value=
"item.enterpriseId"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"设备类型"
prop=
"dataType"
>
<el-form-item
label=
"设备类型"
prop=
"dataType"
>
<el-select
v-model=
"editForm.dataType"
>
<el-select
v-model=
"editForm.dataType"
>
<el-option
label=
"监控设备"
value=
"5"
></el-option>
<el-option
label=
"监控设备"
value=
"5"
></el-option>
...
@@ -59,7 +69,7 @@
...
@@ -59,7 +69,7 @@
<el-form-item
label=
"物品类型"
prop=
"category"
>
<el-form-item
label=
"物品类型"
prop=
"category"
>
<el-input
v-model=
"editForm.category"
></el-input>
<el-input
v-model=
"editForm.category"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"否是重大危险源"
prop=
"isBigDanger"
>
<
!--
<
el-form-item
label=
"否是重大危险源"
prop=
"isBigDanger"
>
<el-radio-group
v-model=
"editForm.isBigDanger"
>
<el-radio-group
v-model=
"editForm.isBigDanger"
>
<el-radio
:label=
"'0'"
>
否
</el-radio>
<el-radio
:label=
"'0'"
>
否
</el-radio>
<el-radio
:label=
"'1'"
>
是
</el-radio>
<el-radio
:label=
"'1'"
>
是
</el-radio>
...
@@ -72,7 +82,7 @@
...
@@ -72,7 +82,7 @@
<el-option
value=
"三级"
></el-option>
<el-option
value=
"三级"
></el-option>
<el-option
value=
"四级"
></el-option>
<el-option
value=
"四级"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"联系人"
prop=
"contacts"
>
<el-form-item
label=
"联系人"
prop=
"contacts"
>
<el-input
v-model=
"editForm.contacts"
></el-input>
<el-input
v-model=
"editForm.contacts"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -114,21 +124,23 @@ export default class SafetyDeviceMgEdit extends Vue {
...
@@ -114,21 +124,23 @@ export default class SafetyDeviceMgEdit extends Vue {
enterpriseId
:
String
;
enterpriseId
:
String
;
};
};
@
Prop
(
String
)
title
!
:
String
;
@
Prop
(
String
)
title
!
:
String
;
// @Provide() editForm: any = {};
@
Provide
()
enterpriseList
:
any
=
[];
@
Provide
()
qvvalue
:
any
=
[];
//区域值
@
Provide
()
qvvalue
:
any
=
[];
//区域值
@
Provide
()
signsArr
:
any
=
[];
//图例list
@
Provide
()
signsArr
:
any
=
[];
//图例list
@
Provide
()
dialogTableVisible
:
Boolean
=
false
;
@
Provide
()
dialogTableVisible
:
Boolean
=
false
;
@
Provide
()
rules
:
any
=
{
@
Provide
()
rules
:
any
=
{
//enterpriseId: [{ required: true, trigger: "blur", message: "该项为必填项!" }],
deviceName
:
[
deviceName
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}
{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}
],
],
dataType
:
[{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}],
dataType
:
[{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}],
isBigDanger
:
[
/*
isBigDanger: [
{ required: true, trigger: "blur", message: "该项为必填项!" }
{ required: true, trigger: "blur", message: "该项为必填项!" }
],
],
dangerGrade: [
dangerGrade: [
{ required: true, trigger: "blur", message: "该项为必填项!" }
{ required: true, trigger: "blur", message: "该项为必填项!" }
],
],
*/
factoryLocation
:
[
factoryLocation
:
[
{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}
{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}
],
],
...
@@ -136,6 +148,7 @@ export default class SafetyDeviceMgEdit extends Vue {
...
@@ -136,6 +148,7 @@ export default class SafetyDeviceMgEdit extends Vue {
latitude
:
[{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}]
latitude
:
[{
required
:
true
,
trigger
:
"blur"
,
message
:
"该项为必填项!"
}]
};
};
@
Provide
()
loadmap
:
Boolean
=
false
;
@
Provide
()
loadmap
:
Boolean
=
false
;
@
Provide
()
play
:
Boolean
=
false
;
@
Provide
()
enterpriseId
:
string
=
"dbe0c3268a3c4911913f35a2fdcd0e3e"
;
@
Provide
()
enterpriseId
:
string
=
"dbe0c3268a3c4911913f35a2fdcd0e3e"
;
qrFun
(
v
:
any
)
{
qrFun
(
v
:
any
)
{
...
@@ -157,11 +170,12 @@ export default class SafetyDeviceMgEdit extends Vue {
...
@@ -157,11 +170,12 @@ export default class SafetyDeviceMgEdit extends Vue {
confirmFun
(
formName
:
string
)
{
confirmFun
(
formName
:
string
)
{
let
that
=
this
,
let
that
=
this
,
params
=
that
.
editForm
;
params
=
that
.
editForm
;
params
.
enterpriseId
=
that
.
editForm
.
enterpriseListId
;
(
that
as
any
).
$refs
[
formName
].
validate
((
valid
:
boolean
)
=>
{
(
that
as
any
).
$refs
[
formName
].
validate
((
valid
:
boolean
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
METHOD
.
axiosPost
(
METHOD
.
axiosPost
(
that
,
that
,
`/safetyDeviceInfo/addOrEditSafetyDeviceInfo
/
${
that
.
enterpriseId
}
`
,
`/safetyDeviceInfo/addOrEditSafetyDeviceInfo`
,
params
,
params
,
function
(
res
:
any
)
{
function
(
res
:
any
)
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
...
@@ -179,9 +193,52 @@ export default class SafetyDeviceMgEdit extends Vue {
...
@@ -179,9 +193,52 @@ export default class SafetyDeviceMgEdit extends Vue {
}
}
});
});
}
}
getnterpriseListInfo
()
{
let
that
=
this
,
param
=
{
accountStatus
:
'0'
};
that
.
loading
=
true
;
METHOD
.
axiosPost
(
that
,
`/enterpriseInfo/queryEnterpriseListInfo`
,
param
,
function
(
res
:
any
)
{
that
.
loading
=
false
;
if
(
res
.
code
==
0
)
{
that
.
enterpriseList
=
res
.
data
;
}
}
);
}
getnterpriseListInfo
()
{
let
that
=
this
,
param
=
{
accountStatus
:
'0'
};
that
.
loading
=
true
;
METHOD
.
axiosPost
(
that
,
`/enterpriseInfo/queryEnterpriseListInfo`
,
param
,
function
(
res
:
any
)
{
that
.
loading
=
false
;
if
(
res
.
code
==
0
)
{
that
.
enterpriseList
=
res
.
data
;
}
}
);
}
seletChange
(
enterpriseId
:
any
)
{
let
that
=
this
,
arr
;
arr
=
that
.
enterpriseList
.
filter
((
ele
:
any
)
=>
enterpriseId
==
ele
.
enterpriseId
);
that
.
editForm
.
enterpriseListId
=
arr
[
0
].
enterpriseId
;
}
created
()
{
created
()
{
//this.editForm = this.editFormData;
if
(
METHOD
.
enterpriseId
){
if
(
METHOD
.
enterpriseId
){
this
.
enterpriseId
=
METHOD
.
enterpriseId
;
this
.
enterpriseId
=
METHOD
.
enterpriseId
;
}
else
{
//政府用户
this
.
play
=
true
;
this
.
getnterpriseListInfo
();
}
}
}
}
}
}
...
...
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