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
a91c915c
Commit
a91c915c
authored
Jul 01, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
统计查询修改
parent
1db9daae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
811 additions
and
29 deletions
+811
-29
MeterCertificateRate.vue
...eter-statistics/certificate-rate/MeterCertificateRate.vue
+255
-0
MeterCustomerEntrust.vue
...eter-statistics/customer-entrust/MeterCustomerEntrust.vue
+255
-0
MeterPersonalTask.vue
pages/meter-statistics/personal-task/MeterPersonalTask.vue
+28
-29
MeterSampleQuantity.vue
.../meter-statistics/sample-quantity/MeterSampleQuantity.vue
+255
-0
meter-routes.js
router/meter-routes.js
+18
-0
No files found.
pages/meter-statistics/certificate-rate/MeterCertificateRate.vue
0 → 100644
View file @
a91c915c
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top:10px"
>
<Form
:d=
"formId"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检定依据:"
style=
"margin-left: -20px"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.code"
name=
"judgeBasis"
placeholder=
"请输入判定依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检定依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"judgeBasisName"
placeholder=
"请输入判定依据名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:form-id=
"formId"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
{
meterAptitude
}
from
'../../../api'
export
default
{
name
:
'MeterAptitudeStandard'
,
components
:
{},
data
()
{
return
{
formId
:
'meterAptitudeFormId'
,
pageColumns
:
[
{
title
:
'检定依据'
,
key
:
'code'
,
width
:
160
},
{
title
:
'检定依据名称'
,
key
:
'name'
},
{
title
:
'登记时间'
,
key
:
'ctime'
,
date
:
true
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
formObj
:
{
name
:
undefined
,
code
:
undefined
},
searchOpen
:
true
,
selectIds
:
[],
getPage
:
{},
typeData
:
[]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
_import
()
break
case
'导出'
:
this
.
_export
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
_page
:
async
function
()
{
console
.
log
(
9522123
)
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterAptitude
.
page
(
this
.
formObj
)
if
(
result
)
{
console
.
log
(
55555
)
console
.
log
(
result
)
this
.
getPage
=
result
console
.
log
(
123456789
)
console
.
log
(
this
.
getPage
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_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
}
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
meterAptitude
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除这 '
+
ids
.
length
+
' 条记录?'
)
}
},
// 编辑&添加
_editModal
(
edit
,
id
)
{
if
(
edit
)
{
this
.
_getById
(
id
)
// 编辑
// this.$store.dispatch('FoodJudgeBasis/getById', id).then(() => {
// this.$refs.editModal._open(this.$store.state.FoodJudgeBasis.model)
// })
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
_getById
:
async
function
(
id
)
{
const
result
=
await
meterAptitude
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
},
// 导入
_import
()
{
const
data
=
{
importUrl
:
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_import'
,
downloadUrl
:
'/food/v1/excel/template/FoodAptitudeJudgeBasis'
,
title
:
'导入检验方法管理'
}
this
.
$refs
.
sampleModal
.
_open
(
data
)
},
// 导出
_export
()
{
console
.
log
(
'.this.selectIds'
,
this
.
selectIds
)
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择需要导出的数据'
)
}
else
{
const
content
=
'确定导出 '
+
this
.
selectIds
.
length
+
' 条记录?'
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_export?ids='
+
this
.
selectIds
)
}
})
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/meter-statistics/customer-entrust/MeterCustomerEntrust.vue
0 → 100644
View file @
a91c915c
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top:10px"
>
<Form
:d=
"formId"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检定依据:"
style=
"margin-left: -20px"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.code"
name=
"judgeBasis"
placeholder=
"请输入判定依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检定依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"judgeBasisName"
placeholder=
"请输入判定依据名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:form-id=
"formId"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
{
meterAptitude
}
from
'../../../api'
export
default
{
name
:
'MeterAptitudeStandard'
,
components
:
{},
data
()
{
return
{
formId
:
'meterAptitudeFormId'
,
pageColumns
:
[
{
title
:
'检定依据'
,
key
:
'code'
,
width
:
160
},
{
title
:
'检定依据名称'
,
key
:
'name'
},
{
title
:
'登记时间'
,
key
:
'ctime'
,
date
:
true
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
formObj
:
{
name
:
undefined
,
code
:
undefined
},
searchOpen
:
true
,
selectIds
:
[],
getPage
:
{},
typeData
:
[]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
_import
()
break
case
'导出'
:
this
.
_export
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
_page
:
async
function
()
{
console
.
log
(
9522123
)
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterAptitude
.
page
(
this
.
formObj
)
if
(
result
)
{
console
.
log
(
55555
)
console
.
log
(
result
)
this
.
getPage
=
result
console
.
log
(
123456789
)
console
.
log
(
this
.
getPage
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_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
}
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
meterAptitude
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除这 '
+
ids
.
length
+
' 条记录?'
)
}
},
// 编辑&添加
_editModal
(
edit
,
id
)
{
if
(
edit
)
{
this
.
_getById
(
id
)
// 编辑
// this.$store.dispatch('FoodJudgeBasis/getById', id).then(() => {
// this.$refs.editModal._open(this.$store.state.FoodJudgeBasis.model)
// })
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
_getById
:
async
function
(
id
)
{
const
result
=
await
meterAptitude
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
},
// 导入
_import
()
{
const
data
=
{
importUrl
:
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_import'
,
downloadUrl
:
'/food/v1/excel/template/FoodAptitudeJudgeBasis'
,
title
:
'导入检验方法管理'
}
this
.
$refs
.
sampleModal
.
_open
(
data
)
},
// 导出
_export
()
{
console
.
log
(
'.this.selectIds'
,
this
.
selectIds
)
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择需要导出的数据'
)
}
else
{
const
content
=
'确定导出 '
+
this
.
selectIds
.
length
+
' 条记录?'
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_export?ids='
+
this
.
selectIds
)
}
})
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/meter-statistics/personal-task/MeterPersonalTask.vue
View file @
a91c915c
...
@@ -8,40 +8,35 @@
...
@@ -8,40 +8,35 @@
<div
class=
"fl"
>
<div
class=
"fl"
>
<Form
id=
"search-form"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<Form
id=
"search-form"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检测科室:"
>
<Select
v-model=
"groupId"
@
on-change=
"_groupChange"
placeholder=
"请选择检测科室"
clearable
label-in-value
>
<Option
v-for=
"item in groupData"
:value=
"item.id"
:key=
"item.id"
>
{{
item
.
name
}}
</Option>
</Select>
</Form-item>
<Form-item
class=
"search-item"
label=
"人员:"
>
<Form-item
class=
"search-item"
label=
"人员:"
>
<AutoCompletes
:value=
"tester"
:blur=
"true"
:down
Data=
"testerData"
@
on-result-change=
"_testerChang
e"
<AutoCompletes
:value=
"tester"
:blur=
"true"
:down
-data=
"testerData"
show-key=
"realnam
e"
show-key=
"realname"
placeholder=
"请选择人员
"
placeholder=
"请选择人员"
@
on-result-change=
"_testerChange
"
></AutoCompletes>
></AutoCompletes>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"服务类型:"
>
<!--
<Form-item
class=
"search-item"
label=
"服务类型:"
>
--
>
<Select
v-model=
"serviceType"
placeholder=
"请选择服务类型"
clearable
>
<!--
<Select
v-model=
"serviceType"
placeholder=
"请选择服务类型"
clearable
>
--
>
<Option
v-for=
"item in serviceTypeList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</Option
>
<!--
<Option
v-for=
"item in serviceTypeList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</Option>
--
>
</Select
>
<!--
</Select>
--
>
</Form-item
>
<!--
</Form-item>
--
>
<Form-item
label=
"
检测
日期:"
>
<Form-item
label=
"
委托
日期:"
>
<el-date-picker
<el-date-picker
v-model=
"queryDate"
v-model=
"queryDate"
@
change=
"_dateChange"
type=
"monthrange"
type=
"monthrange"
range-separator=
"-"
range-separator=
"-"
start-placeholder=
"开始月份"
start-placeholder=
"开始月份"
end-placeholder=
"结束月份"
end-placeholder=
"结束月份"
size=
"small"
size=
"small"
value-format=
"yyyy-MM"
>
value-format=
"yyyy-MM"
@
change=
"_dateChange"
>
</el-date-picker>
</el-date-picker>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_search"
type=
"primary"
class=
"width-80
"
>
搜索
</Button>
<Button
type=
"primary"
class=
"width-80"
@
click=
"_search
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</div>
</div>
<div
class=
"fr"
>
<div
class=
"fr"
>
<Button
@
click=
"_exportSampleForm"
class=
"width-80
"
>
导出
</Button>
<Button
class=
"width-80"
@
click=
"_exportSampleForm
"
>
导出
</Button>
</div>
</div>
<div
class=
"clear"
></div>
<div
class=
"clear"
></div>
</Col>
</Col>
...
@@ -50,15 +45,15 @@
...
@@ -50,15 +45,15 @@
<Row
:gutter=
"16"
>
<Row
:gutter=
"16"
>
<Col
span=
"14"
>
<Col
span=
"14"
>
<PTVXETable
id=
"personalTestNum"
ref=
"pageTable"
<PTVXETable
id=
"personalTestNum"
ref=
"pageTable"
:page
C
olumns=
"pageColumns"
:page
-c
olumns=
"pageColumns"
:table
Height=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
hide-checkbox
>
:table
-height=
"tableHeight"
:get-page=
"getPage"
hide-checkbox
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:field=
"item.key"
:title=
"item.title"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.detail"
><a
<span
v-if=
"item.detail"
><a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a></span>
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a></span>
...
@@ -103,12 +98,19 @@ export default {
...
@@ -103,12 +98,19 @@ export default {
testerId
:
''
,
testerId
:
''
,
pageColumns
:
[
pageColumns
:
[
{
title
:
'姓名'
,
key
:
'tester'
,
detail
:
true
},
{
title
:
'姓名'
,
key
:
'tester'
,
detail
:
true
},
{
title
:
'
项目
量'
,
key
:
'total'
},
{
title
:
'
样品
量'
,
key
:
'total'
},
{
title
:
'
项目
占比(%)'
,
key
:
'ratio'
},
{
title
:
'
样品
占比(%)'
,
key
:
'ratio'
},
{
title
:
'
项目
总价'
,
key
:
'price'
,
width
:
205
}
{
title
:
'
样品
总价'
,
key
:
'price'
,
width
:
205
}
],
],
groupData
:
[],
groupData
:
[],
getPage
:
{},
getPage
:
[
{
tester
:
'wwd'
,
total
:
'12'
,
ratio
:
'10%'
,
price
:
'3500'
}
],
tempData
:
{
tempData
:
{
groupId
:
''
,
groupId
:
''
,
groupName
:
''
,
groupName
:
''
,
...
@@ -215,9 +217,6 @@ export default {
...
@@ -215,9 +217,6 @@ export default {
},
},
_tableResultChange
(
msg
,
data
)
{
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodItem
.
page
break
case
'changeSize'
:
case
'changeSize'
:
// this._page()
// this._page()
break
break
...
...
pages/meter-statistics/sample-quantity/MeterSampleQuantity.vue
0 → 100644
View file @
a91c915c
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--查询-->
<Col
span=
"24"
style=
"margin-top:10px"
>
<Form
:d=
"formId"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检定依据:"
style=
"margin-left: -20px"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.code"
name=
"judgeBasis"
placeholder=
"请输入判定依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-item"
label=
"检定依据名称:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.name"
name=
"judgeBasisName"
placeholder=
"请输入判定依据名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:form-id=
"formId"
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<
script
>
import
{
meterAptitude
}
from
'../../../api'
export
default
{
name
:
'MeterAptitudeStandard'
,
components
:
{},
data
()
{
return
{
formId
:
'meterAptitudeFormId'
,
pageColumns
:
[
{
title
:
'检定依据'
,
key
:
'code'
,
width
:
160
},
{
title
:
'检定依据名称'
,
key
:
'name'
},
{
title
:
'登记时间'
,
key
:
'ctime'
,
date
:
true
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
formObj
:
{
name
:
undefined
,
code
:
undefined
},
searchOpen
:
true
,
selectIds
:
[],
getPage
:
{},
typeData
:
[]
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
_import
()
break
case
'导出'
:
this
.
_export
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
case
'操作日志'
:
this
.
_record
(
data
.
id
)
break
}
},
_page
:
async
function
()
{
console
.
log
(
9522123
)
// this.$refs.pageTable._page('search-form-package', 'FoodJudgeBasis/page')
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
meterAptitude
.
page
(
this
.
formObj
)
if
(
result
)
{
console
.
log
(
55555
)
console
.
log
(
result
)
this
.
getPage
=
result
console
.
log
(
123456789
)
console
.
log
(
this
.
getPage
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_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
}
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
meterAptitude
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除这 '
+
ids
.
length
+
' 条记录?'
)
}
},
// 编辑&添加
_editModal
(
edit
,
id
)
{
if
(
edit
)
{
this
.
_getById
(
id
)
// 编辑
// this.$store.dispatch('FoodJudgeBasis/getById', id).then(() => {
// this.$refs.editModal._open(this.$store.state.FoodJudgeBasis.model)
// })
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
_getById
:
async
function
(
id
)
{
const
result
=
await
meterAptitude
.
getById
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
},
// 导入
_import
()
{
const
data
=
{
importUrl
:
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_import'
,
downloadUrl
:
'/food/v1/excel/template/FoodAptitudeJudgeBasis'
,
title
:
'导入检验方法管理'
}
this
.
$refs
.
sampleModal
.
_open
(
data
)
},
// 导出
_export
()
{
console
.
log
(
'.this.selectIds'
,
this
.
selectIds
)
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择需要导出的数据'
)
}
else
{
const
content
=
'确定导出 '
+
this
.
selectIds
.
length
+
' 条记录?'
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
,
onOk
:
()
=>
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/v1/food_aptitude_judge_basis/food_aptitude_judge_export?ids='
+
this
.
selectIds
)
}
})
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
router/meter-routes.js
View file @
a91c915c
...
@@ -40,6 +40,9 @@ import MeterCertificatePrintIndex from '../pages/meter-certificate/print/MeterCe
...
@@ -40,6 +40,9 @@ import MeterCertificatePrintIndex from '../pages/meter-certificate/print/MeterCe
import
MeterCannotSubIndex
from
'../pages/meter-subcontract/cannot-sub/MeterCannotSubIndex'
import
MeterCannotSubIndex
from
'../pages/meter-subcontract/cannot-sub/MeterCannotSubIndex'
import
MeterPersonalTask
from
'../pages/meter-statistics/personal-task/MeterPersonalTask'
import
MeterPersonalTask
from
'../pages/meter-statistics/personal-task/MeterPersonalTask'
import
MeterAnnualEntrust
from
'../pages/meter-statistics/annual-entrust/MeterAnnualEntrust'
import
MeterAnnualEntrust
from
'../pages/meter-statistics/annual-entrust/MeterAnnualEntrust'
import
MeterCustomerEntrust
from
'../pages/meter-statistics/customer-entrust/MeterCustomerEntrust'
import
MeterCertificateRate
from
'../pages/meter-statistics/certificate-rate/MeterCertificateRate'
import
MeterSampleQuantity
from
'../pages/meter-statistics/sample-quantity/MeterSampleQuantity'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -269,6 +272,21 @@ export default [
...
@@ -269,6 +272,21 @@ export default [
path
:
'annual_entrust'
,
path
:
'annual_entrust'
,
component
:
MeterAnnualEntrust
,
component
:
MeterAnnualEntrust
,
meta
:
{
title
:
'年度委托量统计'
}
meta
:
{
title
:
'年度委托量统计'
}
},
{
path
:
'customer_entrust'
,
component
:
MeterCustomerEntrust
,
meta
:
{
title
:
'客户委托量统计'
}
},
{
path
:
'certificate_rate'
,
component
:
MeterCertificateRate
,
meta
:
{
title
:
'证书及时率统计'
}
},
{
path
:
'sample_quantity'
,
component
:
MeterSampleQuantity
,
meta
:
{
title
:
'器具检测量统计'
}
}
}
]
]
}
}
...
...
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