Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
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
wangweidong
patzn-cloud-web-back-soil
Commits
4ac199dc
Commit
4ac199dc
authored
Jun 09, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了资质管理添加模块
parent
ceb151ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
228 additions
and
18 deletions
+228
-18
EditModal.vue
pages/meter-aptitude/manage/EditModal.vue
+176
-0
MeterAptitudeManageEdit.vue
pages/meter-aptitude/manage/MeterAptitudeManageEdit.vue
+52
-18
No files found.
pages/meter-aptitude/manage/EditModal.vue
0 → 100644
View file @
4ac199dc
<
template
>
<div>
<Modal
v-model=
"showUserGroupModal"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<Row>
<!--查询条件-->
<Col
span=
"24"
>
<Form
id=
"test-item-form"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
/>
<Form-item
:label-width=
"70"
label=
"检测依据"
>
<Input
v-model=
"code"
@
on-enter=
"_pageChange(1)"
placeholder=
"请输入检测依据"
style=
"width: 100%"
/>
</Form-item>
<Form-item
label=
"检测依据名称"
>
<Input
v-model=
"name"
@
on-enter=
"_pageChange(1)"
placeholder=
"请输入检测依据名称"
style=
"width: 100%"
/>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
style=
"margin-bottom: 10px"
>
<el-table
:height=
"300"
@
row-click=
"_rowChange"
@
row-dblclick=
"_dbClick"
:data=
"getPage"
border
size=
"small"
highlight-current-row
style=
"width: 100%"
>
<el-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:prop=
"item.key"
:label=
"item.title"
:min-width=
"item.width"
show-overflow-tooltip
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
].
display
:
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
</el-table>
</Col>
<Col
span=
"24"
>
<Page
:total=
"getPage.total"
:page-size=
"getPage.size"
@
on-change=
"_pageChange"
@
on-page-size-change=
"_pageRows"
placement=
"top"
show-total
show-elevator
show-sizer
/>
<div
style=
"clear: both"
/>
</Col>
</Row>
<div
slot=
"footer"
class=
"btn-width"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px"
>
取消
</Button>
<Button
@
click=
"_ok"
type=
"primary"
>
确定
</Button>
</div>
</Modal>
</div>
</template>
<
script
>
import
{
meterAptitude
}
from
'../../../api'
export
default
{
name
:
'EditModal'
,
data
()
{
return
{
loading
:
true
,
pageParams
:
{
rows
:
20
},
pageColumns
:
[
{
title
:
'检测依据'
,
key
:
'code'
},
{
title
:
'检测依据名称'
,
key
:
'name'
}
],
getPage
:
[],
showUserGroupModal
:
false
,
modalTitle
:
''
,
currentRowData
:
{},
name
:
''
,
code
:
''
}
},
methods
:
{
_open
()
{
this
.
modalTitle
=
'选择检测依据'
this
.
name
=
''
this
.
code
=
''
this
.
_judge
()
},
_judge
()
{
this
.
showUserGroupModal
=
true
this
.
currentRowData
=
{}
this
.
_page
()
},
_page
:
async
function
()
{
const
result
=
await
meterAptitude
.
page
(
this
.
_searchParams
())
if
(
result
)
{
console
.
log
(
'查询结果'
)
console
.
log
(
result
)
this
.
getPage
=
result
.
records
this
.
loading
=
false
console
.
log
(
this
.
getPage
)
}
},
_pageChange
(
page
)
{
this
.
pageParams
.
page
=
page
this
.
_page
()
},
_pageRows
(
rows
)
{
this
.
pageParams
.
rows
=
rows
this
.
_page
()
},
_searchParams
()
{
const
data
=
this
.
$serialize
(
'test-item-form'
)
if
(
this
.
name
)
{
data
.
name
=
this
.
name
}
if
(
this
.
code
)
{
data
.
code
=
this
.
code
}
return
this
.
$extend
(
data
,
this
.
pageParams
)
},
_search
()
{
this
.
_page
()
},
_rowChange
(
data
)
{
this
.
currentRowData
=
data
// 选中的行数据;
},
_cancel
()
{
this
.
showUserGroupModal
=
false
},
_ok
()
{
if
(
JSON
.
stringify
(
this
.
currentRowData
)
===
'{}'
)
{
switch
(
this
.
modalTitle
)
{
case
'选择检测依据'
:
this
.
$Message
.
warning
(
'请选择一条检测依据!'
)
break
}
}
else
{
this
.
$emit
(
'on-result-change'
,
this
.
currentRowData
)
this
.
showUserGroupModal
=
false
}
},
// 双击
_dbClick
(
data
,
event
)
{
this
.
currentRowData
=
data
// 选中的行数据;
this
.
_ok
()
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/meter-aptitude/manage/MeterAptitudeManageEdit.vue
View file @
4ac199dc
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"
9
00"
>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"
12
00"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
...
...
@@ -8,24 +8,31 @@
<!--
<autoComplete
:value=
"formObj.judgeBasis"
:downData=
"judgeBasisData"
@
on-result-change=
"_judgeBasisChange"
name=
"judgeBasis"
--
>
<!-- show-key="stdNum" placeholder="请输入或选择判定依据" focus-->
<!-- >
</autoComplete>
-->
<Input
v-model=
"formObj.code"
@
on-result-change=
"_judgeBasisChange"
name=
"code"
placeholder=
"请输入或选择判定依据"
/>
<Input
v-model=
"formObj.code"
@
on-result-change=
"_judgeBasisChange"
@
click
.
native=
"_selectjudgeBasis"
name=
"code"
placeholder=
"请选择检测依据"
readonly
/>
<!--
<Input-->
<!-- v-model="formObj.code"-->
<!-- name="code"-->
<!-- readonly-->
<!-- placeholder="请选择检测依据"-->
<!-- icon="ios-add-circle-outline"-->
<!-- @click.native="_selectjudgeBasis"-->
<!-- />-->
</Form-item>
<Form-item
label=
"检定依据名称"
prop=
"basis"
class=
"width-48"
>
<Input
v-model=
"formObj.basis"
name=
"basis"
placeholder=
"请输入判定依据名称"
/>
</Form-item>
<Form-item
label=
"检定周期 "
prop=
"cycle"
class=
"width-48"
>
<!--
<Input
:rows=
"3"
v-model=
"formObj.remark"
placeholder=
"请输入备注"
type=
"textarea"
name=
"remark"
/>
-->
<InputNumber
:rows=
"3"
v-model=
"formObj.cycle"
name=
"cycle"
style=
"width:
317
px;"
/>
<InputNumber
:rows=
"3"
v-model=
"formObj.cycle"
name=
"cycle"
style=
"width:
460
px;"
/>
</Form-item>
<Form-item
label=
"授权仪器名称 "
prop=
"name"
class=
"width-48"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入授权仪器名称"
/>
</Form-item>
<Form-item
label=
"价格"
prop=
"price"
class=
"width-48"
>
<InputNumber
v-model=
"formObj.price"
name=
"price"
placeholder=
"请输入价格"
style=
"width:
317
px;"
/>
<InputNumber
v-model=
"formObj.price"
name=
"price"
placeholder=
"请输入价格"
style=
"width:
460
px;"
/>
</Form-item>
<Form-item
label=
"测量范围 "
prop=
"extent"
class=
"width-48"
>
<Input
v-model=
"formObj.extent"
name=
"extent"
placeholder=
"请输入测量范围"
/>
<Input
v-model=
"formObj.extent"
name=
"extent"
placeholder=
"请输入测量范围"
style=
"border: none;"
/>
</Form-item>
<Form-item
label=
"准确度等级"
prop=
"grade"
class=
"width-48"
>
<Input
v-model=
"formObj.grade"
name=
"grade"
placeholder=
"请输入准确度等级"
/>
...
...
@@ -46,7 +53,8 @@
:form-id=
"formId"
:tableHeight=
"500"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
>
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
...
...
@@ -59,30 +67,31 @@
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key==='name'"
@
click
.
stop=
"_handleRow(scope)"
>
<input
v-model=
"scope.row.name"
blur
placeholder=
"请输入或选择检测项目"
></input>
<
el-
input
v-model=
"scope.row.name"
blur
placeholder=
"请输入或选择检测项目"
></
el-
input>
</div>
<div
v-if=
"item.key==='compare'"
@
click
.
stop=
"_handleRow(scope)"
>
<input
v-model=
"scope.row.compare"
blur
placeholder=
"请输入或选择比较符"
></input>
<
el-
input
v-model=
"scope.row.compare"
blur
placeholder=
"请输入或选择比较符"
></
el-
input>
</div>
<div
v-if=
"item.key==='limitValue'"
@
click
.
stop=
"_handleRow(scope)"
>
<input
v-model=
"scope.row.limitValue"
blur
placeholder=
"请输入或选择限量值"
></input>
<
el-
input
v-model=
"scope.row.limitValue"
blur
placeholder=
"请输入或选择限量值"
></
el-
input>
</div>
<div
v-if=
"item.key==='remark'"
@
click
.
stop=
"_handleRow(scope)"
>
<input
v-model=
"scope.row.remark"
blur
placeholder=
"请输入备注"
></input>
<
el-
input
v-model=
"scope.row.remark"
blur
placeholder=
"请输入备注"
></
el-
input>
</div>
<div
v-if=
"item.key==='unit'"
@
click
.
stop=
"_handleRow(scope)"
>
<input
v-model=
"scope.row.unit"
blur
placeholder=
"请输入或选择检测单位"
></input>
<
el-
input
v-model=
"scope.row.unit"
blur
placeholder=
"请输入或选择检测单位"
></
el-
input>
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</div>
<EditModal
ref=
"EditModal"
@
on-result-change=
"_backData"
is-change
/>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></ModalFooter>
</div>
...
...
@@ -98,9 +107,10 @@
import
ModalFooter
from
'../../../components/base/modalFooter'
// import autoComplete from '../../../components/base/AutoCompletes'
import
{
meterManage
}
from
'../../../api'
import
EditModal
from
'./EditModal'
export
default
{
components
:
{
EditModal
,
ModalFooter
// autoComplete
},
...
...
@@ -177,6 +187,30 @@ export default {
}
},
methods
:
{
_selectjudgeBasis
()
{
this
.
$refs
.
EditModal
.
_open
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
// this.getPage = this.$store.state.FoodJudgeBasis.page
break
case
'selectIds'
:
// this.selectIds = data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
// this._page()
break
}
},
_backData
(
data
)
{
this
.
formObj
.
code
=
data
.
code
this
.
formObj
.
basis
=
data
.
name
// this.formObj.standardId = data.id
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
...
...
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