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
5bf063d1
Commit
5bf063d1
authored
Sep 18, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改收样室收样页面和开土制备页面
parent
3341cea8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
212 additions
and
4 deletions
+212
-4
soil-entrust.js
api/soil/soil-entrust.js
+7
-1
SoilSampleManage.vue
pages/soil-sample-manage/SoilSampleManage.vue
+38
-3
DescribeDetailModal.vue
...-sample-manage/sample-preparation/DescribeDetailModal.vue
+159
-0
SamplePreparation.vue
...il-sample-manage/sample-preparation/SamplePreparation.vue
+8
-0
No files found.
api/soil/soil-entrust.js
View file @
5bf063d1
...
@@ -52,5 +52,11 @@ export default {
...
@@ -52,5 +52,11 @@ export default {
sendSample
:
data
=>
sendSample
:
data
=>
http
.
post
(
'soil/v1/sample/send_sample'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/sample/send_sample'
,
data
).
then
(
res
=>
res
),
pagePrepare
:
data
=>
pagePrepare
:
data
=>
http
.
post
(
'soil/v1/sample/page_prepare'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/sample/page_prepare'
,
data
).
then
(
res
=>
res
),
sampleEdit
:
data
=>
http
.
put
(
'soil/v1/sample/'
+
data
.
id
+
'?describeDetail='
+
data
.
describeDetail
),
weiteSoilDetail
:
data
=>
http
.
post
(
'soil/v1/sample/write_soil_detail'
,
data
).
then
(
res
=>
res
)
}
}
pages/soil-sample-manage/SoilSampleManage.vue
View file @
5bf063d1
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
<!-- 表格 -->
<!-- 表格 -->
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
<vxe-table-column
v-for=
"item in pageColumns"
v-for=
"item in pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -61,6 +61,9 @@
...
@@ -61,6 +61,9 @@
<div
v-else-if=
"item.date"
>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
</div>
<div
v-else-if=
"item.key==='describeDetail'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.describeDetail"
@
change=
"_inputChange(scope.row)"
></el-input>
</div>
<div
v-else
>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
{{
scope
.
row
[
item
.
key
]
}}
</div>
</div>
...
@@ -75,6 +78,7 @@
...
@@ -75,6 +78,7 @@
</div>
</div>
</Modal>
</Modal>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<DescribeDetailModal
ref=
"writeDetailModal"
@
on-result-change=
"_page"
></DescribeDetailModal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -82,9 +86,10 @@ import http from '../../api/http'
...
@@ -82,9 +86,10 @@ import http from '../../api/http'
import
{
soilEntrust
}
from
'../../api'
import
{
soilEntrust
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
DescribeDetailModal
from
'./sample-preparation/DescribeDetailModal'
let
LODOP
let
LODOP
export
default
{
export
default
{
components
:
{
SoilSampleItemManage
},
components
:
{
SoilSampleItemManage
,
DescribeDetailModal
},
data
()
{
data
()
{
return
{
return
{
formId
:
'soilSampleManage'
,
formId
:
'soilSampleManage'
,
...
@@ -104,6 +109,11 @@ export default {
...
@@ -104,6 +109,11 @@ export default {
type
:
'success'
,
type
:
'success'
,
id
:
''
,
id
:
''
,
name
:
'打印标签'
name
:
'打印标签'
},
{
type
:
'success'
,
id
:
''
,
name
:
'批量填写土质描述详情'
}
}
],
],
itemList
:
[],
itemList
:
[],
...
@@ -131,6 +141,7 @@ export default {
...
@@ -131,6 +141,7 @@ export default {
pageColumns
:
[
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
160
,
fixed
:
'left'
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
160
,
fixed
:
'left'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
160
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
160
},
{
title
:
'土质描述详情'
,
key
:
'describeDetail'
,
width
:
160
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
160
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
160
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
130
}
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
130
}
...
@@ -149,6 +160,19 @@ export default {
...
@@ -149,6 +160,19 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
_inputChange
:
async
function
(
info
)
{
const
result
=
await
soilEntrust
.
sampleEdit
({
id
:
info
.
id
,
describeDetail
:
info
.
describeDetail
})
if
(
result
)
{
this
.
_resultChange
(
'修改成功'
)
}
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
_footerResult
(
name
)
{
_footerResult
(
name
)
{
switch
(
name
)
{
switch
(
name
)
{
case
'取消'
:
case
'取消'
:
...
@@ -224,6 +248,9 @@ export default {
...
@@ -224,6 +248,9 @@ export default {
case
'打印标签'
:
case
'打印标签'
:
this
.
_printLabel
()
this
.
_printLabel
()
break
break
case
'批量填写土质描述详情'
:
this
.
_writeDetail
(
this
.
selectIds
)
break
case
'复制历史样品检测项目'
:
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
this
.
_copyHisItem
()
break
break
...
@@ -242,6 +269,14 @@ export default {
...
@@ -242,6 +269,14 @@ export default {
}
}
})
})
},
},
_writeDetail
(
id
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
const
ids
=
id
.
join
(
','
)
this
.
$refs
.
writeDetailModal
.
_open
(
ids
)
}
},
_exportSample
()
{
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
...
@@ -414,8 +449,8 @@ export default {
...
@@ -414,8 +449,8 @@ export default {
this
.
_page
()
this
.
_page
()
},
},
_resultChange
(
msg
)
{
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
},
_copy
(
data
)
{
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
...
...
pages/soil-sample-manage/sample-preparation/DescribeDetailModal.vue
0 → 100644
View file @
5bf063d1
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
:width=
"500"
class=
"zIndex-1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<Form-item
label=
"土质描述详情"
prop=
"detail "
style=
"width: 100%"
>
<el-input
v-model=
"formObj.detail "
name=
"detail "
></el-input>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></ModalFooter>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
import
ModalFooter
from
'../../../components/base/modalFooter'
import
{
soilAptitude
,
soilEntrust
,
soilSample
}
from
'../../../api'
export
default
{
components
:
{
ModalFooter
},
data
()
{
return
{
formId
:
''
,
lengthLimitList
:
[
{
key
:
'stdNum'
,
title
:
'标准号'
},
{
key
:
'enName'
,
title
:
'英文名称'
},
{
key
:
'belongUnit'
,
title
:
'归口单位'
},
{
key
:
'publishUnit'
,
title
:
'发布单位'
}
],
modalTitle
:
'添加食品标准表'
,
formObj
:
{
detail
:
''
},
ruleValidate
:
{},
showEditModal
:
false
,
ids
:
''
,
options
:
[],
classifyList
:
[
{
value
:
0
,
name
:
'判定依据'
},
{
value
:
1
,
name
:
'检测依据'
},
{
value
:
2
,
name
:
'其他'
}
],
typeList
:
[
{
value
:
0
,
name
:
'国家标准'
},
{
value
:
1
,
name
:
'地方标准'
},
{
value
:
2
,
name
:
'行业标准'
},
{
value
:
3
,
name
:
'企业标准'
}
],
statusList
:
[
{
value
:
0
,
name
:
'现行'
},
{
value
:
1
,
name
:
'即将实施'
},
{
value
:
2
,
name
:
'部分被代替'
},
{
value
:
3
,
name
:
'被代替'
},
{
value
:
4
,
name
:
'作废'
}
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
/** *modal-footer */
selectLocation
(
data
)
{
this
.
_getLocationById
(
data
)
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
this
.
showEditModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
formObj
.
ids
=
this
.
ids
this
.
_receive
(
this
.
formObj
)
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_receive
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
weiteSoilDetail
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'填写成功!'
)
}
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
standardSave
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
standardEdit
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
_hideLoading
()
this
.
showEditModal
=
false
},
_open
(
ids
)
{
this
.
formObj
.
detail
=
''
this
.
ids
=
ids
this
.
showEditModal
=
true
},
_getLocation
:
async
function
()
{
const
result
=
await
soilSample
.
locationList
()
if
(
result
)
{
console
.
log
(
result
)
this
.
options
=
result
console
.
log
(
this
.
options
)
}
},
_getLocationById
:
async
function
(
id
)
{
console
.
log
(
id
)
const
result
=
await
soilSample
.
locationGetById
(
id
)
if
(
result
)
{
this
.
formObj
.
receiveLocation
=
result
.
name
}
console
.
log
(
this
.
formObj
.
receiveLocation
)
},
_registerAdd
()
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
formObj
.
type
=
3
this
.
showEditModal
=
true
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SamplePreparation.vue
View file @
5bf063d1
...
@@ -100,6 +100,11 @@ export default {
...
@@ -100,6 +100,11 @@ export default {
// name: '管理样品'
// name: '管理样品'
// },
// },
{
{
type
:
'ios-camera-outline'
,
id
:
''
,
name
:
'试样照片'
},
{
type
:
'md-cloud'
,
type
:
'md-cloud'
,
id
:
''
,
id
:
''
,
name
:
'附件'
name
:
'附件'
...
@@ -187,6 +192,9 @@ export default {
...
@@ -187,6 +192,9 @@ export default {
case
'试样列表'
:
case
'试样列表'
:
this
.
_sampleManage
(
data
.
id
)
this
.
_sampleManage
(
data
.
id
)
break
break
case
'试样照片'
:
this
.
_upload
(
data
.
id
)
break
case
'附件'
:
case
'附件'
:
this
.
_upload
(
data
.
id
)
this
.
_upload
(
data
.
id
)
break
break
...
...
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