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
8058e30e
Commit
8058e30e
authored
Jun 24, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整体优化
parent
01accc19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
74 deletions
+119
-74
meter-item.js
api/meter/meter-item.js
+10
-0
ContractLeftList.vue
pages/contract-tab/ContractLeftList.vue
+4
-46
ContractRightList.vue
pages/contract-tab/ContractRightList.vue
+0
-0
ContractTab.vue
pages/contract-tab/ContractTab.vue
+51
-10
MeterSampleManage.vue
pages/meter-entrust/MeterSampleManage.vue
+1
-0
MeterSampleManage.vue
pages/meter-review/MeterSampleManage.vue
+2
-8
ContractRightList.vue
pages/meter-review/contract-tab/ContractRightList.vue
+0
-0
ContractTab.vue
pages/meter-review/contract-tab/ContractTab.vue
+51
-10
No files found.
api/meter/meter-item.js
View file @
8058e30e
...
...
@@ -18,6 +18,16 @@ export default {
https
.
post
(
'meter/v1/item/add_send_entrust'
,
JSON
.
stringify
(
data
))
.
then
(
res
=>
res
),
saveItems
:
data
=>
http
.
post
(
'meter/v1/item/add_sample_item?sampleIds='
+
data
.
sampleIds
+
'&itemIds='
+
data
.
itemIds
)
.
then
(
res
=>
res
),
testValue
:
data
=>
http
.
post
(
...
...
pages/contract-tab/ContractLeftList.vue
View file @
8058e30e
...
...
@@ -34,7 +34,7 @@
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:rows=
"100"
is-task
>
:rows=
"100"
is-task
:isRadio=
"true"
hide-checkbox
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
...
...
@@ -100,19 +100,6 @@ export default {
}
},
methods
:
{
_dicSearch
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'个人任务是否勾选'
)
.
then
(()
=>
{
const
resultData
=
this
.
$store
.
state
.
LmsBaseDict
.
item
if
(
resultData
.
length
>
0
)
{
this
.
personal
=
resultData
[
0
].
name
===
'是'
?
1
:
0
}
else
{
this
.
personal
=
1
}
this
.
_page
()
})
},
_btnClick
()
{},
_selInputResult1
(
msg
,
data
)
{
switch
(
msg
)
{
...
...
@@ -122,7 +109,6 @@ export default {
}
},
_open
()
{
// this._dicSearch()
this
.
_page
()
},
_searchParams
()
{
...
...
@@ -135,35 +121,20 @@ export default {
return
obj
},
_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
meterManage
.
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
()
}
},
// _page() {
// // this.$refs.pageTable._page(
// // 'data-input-contract-left',
// // 'FoodContract/dataInputContractLeft',
// // this._searchParams()
// // )
// },
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodContract
.
page
break
case
'selectIds'
:
this
.
$emit
(
'on-result-change'
,
data
,
this
.
personal
)
break
case
'singleSelect'
:
this
.
$emit
(
'on-result-change'
,
data
.
id
,
this
.
personal
)
break
case
'changeSize'
:
this
.
_page
()
this
.
_clear
()
...
...
@@ -182,19 +153,6 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
this
.
_clear
()
}
// 委托详情
// _detailModal(data) {
// this.$store.dispatch('FoodContract/getById', data.id).then(() => {
// if (data.type === 1) {
// this.currentComponent = 'FoodContractGovernDetail'
// } else {
// this.currentComponent = 'FoodContractCompanyDetail'
// }
// this.$nextTick(function() {
// this.$refs.refModal._open(this.$store.state.FoodContract.model)
// })
// })
// }
}
}
</
script
>
pages/contract-tab/ContractRightList.vue
View file @
8058e30e
This diff is collapsed.
Click to expand it.
pages/contract-tab/ContractTab.vue
View file @
8058e30e
...
...
@@ -9,12 +9,17 @@
<ContractRightList
ref=
"rightModal"
@
on-result-change=
"_rightResult"
></ContractRightList>
</
template
>
</TwoColumnPage>
<div
slot=
"footer"
class=
"btn-width"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
TwoColumnPage
from
'../../components/base/TwoColumnPage'
import
{
meterItem
}
from
'../../api'
import
ContractLeftList
from
'./ContractLeftList'
import
ContractRightList
from
'./ContractRightList'
...
...
@@ -26,26 +31,62 @@ export default {
},
data
()
{
return
{
showModal
:
false
showModal
:
false
,
sampleIds
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'添加'
,
type
:
'primary'
}
],
itemIds
:
[]
}
},
methods
:
{
_open
()
{
// this.formObj.entrustId = id
_open
(
sampleIds
)
{
this
.
showModal
=
true
this
.
sampleIds
=
sampleIds
this
.
$refs
.
leftModal
.
_open
()
// this._page()
},
_leftResult
(
data
,
personal
)
{
this
.
$refs
.
rightModal
.
_open
(
data
,
personal
)
// console.log(data, personal)
},
_rightResult
()
{
this
.
$refs
.
leftModal
.
_page
()
_rightResult
(
data
)
{
if
(
undefined
!==
data
)
{
this
.
itemIds
=
data
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'添加'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
if
(
this
.
itemIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择要添加的检测项目!'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
return
false
}
this
.
_saveItemForSample
({
sampleIds
:
this
.
sampleIds
,
itemIds
:
this
.
itemIds
})
},
_saveItemForSample
:
async
function
(
data
)
{
const
result
=
await
meterItem
.
saveItems
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功!'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
$emit
(
'on-result-change'
)
this
.
_cancel
()
}
}
// _open() {
// this.$refs.leftModal._open()
// }
}
}
</
script
>
pages/meter-entrust/MeterSampleManage.vue
View file @
8058e30e
...
...
@@ -134,6 +134,7 @@ export default {
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
140
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
,
width
:
140
},
{
title
:
'所检项目'
,
key
:
'itemNames'
,
width
:
140
},
{
title
:
'是否分包'
,
key
:
'jobOut'
,
width
:
110
},
{
title
:
'检测类型'
,
key
:
'type'
,
width
:
140
},
{
title
:
'数量'
,
key
:
'quantity'
,
width
:
140
}
...
...
pages/meter-review/MeterSampleManage.vue
View file @
8058e30e
...
...
@@ -130,6 +130,7 @@ export default {
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
140
},
{
title
:
'型号规格'
,
key
:
'spec'
,
width
:
140
},
{
title
:
'出厂编号'
,
key
:
'factoryNumber'
,
width
:
140
},
{
title
:
'检测项目'
,
key
:
'itemNames'
,
width
:
140
},
{
title
:
'是否分包'
,
key
:
'jobOut'
,
width
:
110
},
{
title
:
'检测类型'
,
key
:
'type'
,
width
:
140
},
{
title
:
'数量'
,
key
:
'quantity'
,
width
:
140
}
...
...
@@ -166,12 +167,6 @@ export default {
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
...
...
@@ -223,7 +218,6 @@ export default {
}
},
_sampleEditModal
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleEditModal
.
_open
(
data
.
id
)
},
_tableResultChange
(
msg
,
data
)
{
...
...
@@ -404,7 +398,7 @@ export default {
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
importModal
.
_open
(
this
.
selectIds
,
this
.
selectData
[
0
]
)
this
.
$refs
.
importModal
.
_open
(
this
.
selectIds
)
}
},
_subpackageSample
()
{
...
...
pages/meter-review/contract-tab/ContractRightList.vue
View file @
8058e30e
This diff is collapsed.
Click to expand it.
pages/meter-review/contract-tab/ContractTab.vue
View file @
8058e30e
...
...
@@ -9,12 +9,17 @@
<ContractRightList
ref=
"rightModal"
@
on-result-change=
"_rightResult"
></ContractRightList>
</
template
>
</TwoColumnPage>
<div
slot=
"footer"
class=
"btn-width"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
TwoColumnPage
from
'../../../components/base/TwoColumnPage'
import
{
meterItem
}
from
'../../../api'
import
ContractLeftList
from
'./ContractLeftList'
import
ContractRightList
from
'./ContractRightList'
...
...
@@ -26,26 +31,62 @@ export default {
},
data
()
{
return
{
showModal
:
false
showModal
:
false
,
sampleIds
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'添加'
,
type
:
'primary'
}
],
itemIds
:
[]
}
},
methods
:
{
_open
()
{
// this.formObj.entrustId = id
_open
(
sampleIds
)
{
this
.
showModal
=
true
this
.
sampleIds
=
sampleIds
this
.
$refs
.
leftModal
.
_open
()
// this._page()
},
_leftResult
(
data
,
personal
)
{
this
.
$refs
.
rightModal
.
_open
(
data
,
personal
)
// console.log(data, personal)
},
_rightResult
()
{
this
.
$refs
.
leftModal
.
_page
()
_rightResult
(
data
)
{
if
(
undefined
!==
data
)
{
this
.
itemIds
=
data
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'添加'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
if
(
this
.
itemIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择要添加的检测项目!'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
return
false
}
this
.
_saveItemForSample
({
sampleIds
:
this
.
sampleIds
,
itemIds
:
this
.
itemIds
})
},
_saveItemForSample
:
async
function
(
data
)
{
const
result
=
await
meterItem
.
saveItems
(
data
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功!'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
$emit
(
'on-result-change'
)
this
.
_cancel
()
}
}
// _open() {
// this.$refs.leftModal._open()
// }
}
}
</
script
>
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