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
c9931b17
Commit
c9931b17
authored
Sep 23, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了试样检测
parent
7b7fc2e8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
251 additions
and
12 deletions
+251
-12
soil-test.js
api/soil/soil-test.js
+2
-0
Judge.vue
pages/soil-test-manage/test-input/Judge.vue
+110
-0
TestInput.vue
pages/soil-test-manage/test-input/TestInput.vue
+1
-1
dataEntry.vue
pages/soil-test-manage/test-input/dataEntry.vue
+5
-3
fillResult.vue
pages/soil-test-manage/test-input/fillResult.vue
+21
-7
fillTestValue.vue
pages/soil-test-manage/test-input/fillTestValue.vue
+102
-0
SampleManage.vue
...e/test-task-manage/entrust-sample-manage/SampleManage.vue
+10
-1
No files found.
api/soil/soil-test.js
View file @
c9931b17
...
@@ -21,5 +21,7 @@ export default {
...
@@ -21,5 +21,7 @@ export default {
pageExpTest
:
data
=>
pageExpTest
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_test'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/entrust/page_exp_test'
,
data
).
then
(
res
=>
res
),
samplePage
:
data
=>
http
.
post
(
'soil/v1/sample/page'
,
data
).
then
(
res
=>
res
),
samplePage
:
data
=>
http
.
post
(
'soil/v1/sample/page'
,
data
).
then
(
res
=>
res
),
pageExpTestSample
:
data
=>
http
.
post
(
'soil/v1/sample/page_exp_test_sample'
,
data
).
then
(
res
=>
res
),
pageItem
:
data
=>
http
.
post
(
'soil/v1/experiment/page'
,
data
).
then
(
res
=>
res
)
pageItem
:
data
=>
http
.
post
(
'soil/v1/experiment/page'
,
data
).
then
(
res
=>
res
)
}
}
pages/soil-test-manage/test-input/Judge.vue
0 → 100644
View file @
c9931b17
<
template
>
<div>
<Modal
v-model=
"showBackModal"
:mask-closable=
"false"
class=
"zIndex-1100"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"contract-back-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
>
<Form-item
label=
"判定结果:"
prop=
"singleJudge"
>
<RadioGroup
v-model=
"formObj.singleJudge"
>
<Radio
:label=
"'PASS'"
>
合格
</Radio>
<Radio
:label=
"'FAIL'"
>
不合格
</Radio>
<Radio
:label=
"'NO_TEST'"
>
不检测
</Radio>
<Radio
:label=
"'NO_JUDGE'"
>
不判定
</Radio>
</RadioGroup>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 判定
*/
import
{
soilTest
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
ids
:
[],
// 合同ids
modalTitle
:
'判定'
,
showBackModal
:
false
,
formObj
:
{
singleJudge
:
'PASS'
},
path
:
''
,
ruleValidate
:
{
singleJudge
:
[
{
required
:
true
,
message
:
'判定结果不能为空'
,
trigger
:
'blur'
}
]
},
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
_open
(
ids
)
{
this
.
ids
=
ids
// 合同id
this
.
showBackModal
=
true
this
.
formObj
.
singleJudge
=
'PASS'
this
.
_hideLoading
()
},
_cancel
()
{
this
.
showBackModal
=
false
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
result
,
msg
)
{
if
(
result
)
{
this
.
showBackModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
}
this
.
_hideLoading
()
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
handJudge
(
data
)
this
.
_resultChange
(
result
,
'操作成功'
)
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form'
)
data
.
singleJudge
=
this
.
formObj
.
singleJudge
data
.
itemIds
=
this
.
ids
.
join
(
','
)
this
.
_save
(
data
)
}
else
{
this
.
$Message
.
error
(
'表单验证失败'
)
this
.
_hideLoading
()
}
})
}
}
}
</
script
>
pages/soil-test-manage/test-input/TestInput.vue
View file @
c9931b17
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
{
soilTest
}
from
'../../../api'
import
{
soilTest
}
from
'../../../api'
import
Operation
from
'../../../components/operation/Operation'
import
Operation
from
'../../../components/operation/Operation'
import
dataEntry
from
'./
tabs/
dataEntry'
import
dataEntry
from
'./dataEntry'
export
default
{
export
default
{
components
:
{
components
:
{
UserInfo
,
UserInfo
,
...
...
pages/soil-test-manage/test-input/
tabs/
dataEntry.vue
→
pages/soil-test-manage/test-input/dataEntry.vue
View file @
c9931b17
...
@@ -83,12 +83,14 @@
...
@@ -83,12 +83,14 @@
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
soilTest
}
from
'../../../
../
api'
import
{
soilTest
}
from
'../../../api'
import
fillResult
from
'.
.
/fillResult'
import
fillResult
from
'./fillResult'
export
default
{
export
default
{
components
:
{
fillResult
},
components
:
{
fillResult
},
data
()
{
data
()
{
return
{
return
{
formId
:
'dataEntry'
,
modalTitle
:
'管理样品'
,
searchOpen
:
true
,
searchOpen
:
true
,
showModal
:
false
,
showModal
:
false
,
formObj
:
{
formObj
:
{
...
@@ -139,7 +141,7 @@ export default {
...
@@ -139,7 +141,7 @@ export default {
_page
:
async
function
(
id
)
{
_page
:
async
function
(
id
)
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
id
this
.
formObj
.
entrustId
=
id
const
result
=
await
soilTest
.
samplePag
e
(
const
result
=
await
soilTest
.
pageExpTestSampl
e
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
...
pages/soil-test-manage/test-input/fillResult.vue
View file @
c9931b17
...
@@ -57,9 +57,9 @@
...
@@ -57,9 +57,9 @@
<Button
@
click=
"_detectionValue"
style=
"margin-bottom: 5px"
type=
"primary"
>
<Button
@
click=
"_detectionValue"
style=
"margin-bottom: 5px"
type=
"primary"
>
填写检测值
填写检测值
</Button>
</Button>
<Button
@
click=
"_selectEquipmentByIds"
style=
"margin-bottom: 5px"
type=
"primary"
>
<!--
<Button
@
click=
"_selectEquipmentByIds"
style=
"margin-bottom: 5px"
type=
"primary"
>
--
>
选择仪器设备
<!-- 选择仪器设备-->
</Button
>
<!--
</Button>
--
>
</Col>
</Col>
<!-- 表格 -->
<!-- 表格 -->
<Col
span=
"24"
>
<Col
span=
"24"
>
...
@@ -118,6 +118,7 @@
...
@@ -118,6 +118,7 @@
align=
"center"
align=
"center"
fixed=
"right"
fixed=
"right"
>
>
<icon-list
:msg=
"iconMsgDised"
@
on-result-change=
"_iconClick"
></icon-list>
</el-table-column>
</el-table-column>
</element-table>
</element-table>
</Col>
</Col>
...
@@ -127,13 +128,17 @@
...
@@ -127,13 +128,17 @@
</div>
</div>
</Modal>
</Modal>
<!--判定-->
<!--判定-->
<Judge
ref=
"judgeModal"
@
on-result-change=
"_page"
/>
<!--填写检测值-->
<fillTestValue
ref=
"valueModal"
@
on-result-change=
"_page"
></fillTestValue>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
soilTest
}
from
'../../../api'
import
{
soilTest
}
from
'../../../api'
import
fillTestValue
from
'./fillTestValue'
import
Judge
from
'./Judge'
export
default
{
export
default
{
components
:
{},
components
:
{
fillTestValue
,
Judge
},
data
()
{
data
()
{
return
{
return
{
formObj
:
{
formObj
:
{
...
@@ -151,8 +156,7 @@ export default {
...
@@ -151,8 +156,7 @@ export default {
btn
:
[
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'确认'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'确认'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'判定'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'判定'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'填写检测值'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'填写检测值'
}
{
type
:
'primary'
,
id
:
''
,
name
:
'选择仪器设备'
}
],
],
footerList
:
[
footerList
:
[
{
id
:
''
,
type
:
''
,
name
:
'取消'
},
{
id
:
''
,
type
:
''
,
name
:
'取消'
},
...
@@ -166,6 +170,16 @@ export default {
...
@@ -166,6 +170,16 @@ export default {
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
},
{
title
:
'小类'
,
key
:
'smallType'
},
{
title
:
'检测结果'
,
key
:
'testValue'
,
width
:
160
},
{
title
:
'限值'
,
key
:
'limitValue'
,
width
:
130
},
{
title
:
'比较符'
,
key
:
'compareSymbol'
,
width
:
160
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
100
},
{
title
:
'判定结果'
,
key
:
'singleJudge'
,
width
:
140
,
singleJudge
:
true
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
180
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
180
},
{
title
:
'试验方法'
,
key
:
'testMethod'
,
width
:
180
},
{
title
:
'试验方法'
,
key
:
'testMethod'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
180
}
{
title
:
'状态'
,
key
:
'status'
,
width
:
180
}
...
...
pages/soil-test-manage/test-input/fillTestValue.vue
0 → 100644
View file @
c9931b17
<
template
>
<Modal
v-model=
"detectionModal"
:mask-closable=
"false"
width=
"400"
>
<p
slot=
"header"
>
填写检测值
</p>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"80"
onsubmit=
"return false"
inline
>
<Form-item
label=
"检测结果"
prop=
"testValue"
style=
"width: 100%;"
>
<Input
v-model=
"formObj.testValue"
name=
"testValue"
placeholder=
"请填写检测结果值"
/>
</Form-item>
</Form>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</
template
>
<
script
>
import
{
soilTest
}
from
'../../../api'
const
defVal
=
{
testValue
:
''
}
export
default
{
name
:
'DetectionValue'
,
data
()
{
return
{
detectionModal
:
false
,
formObj
:
defVal
,
ruleValidate
:
{
testValue
:
[
{
required
:
true
,
message
:
'检测结果值不能为空!'
,
trigger
:
'blur'
}
]
},
footerList
:
[
{
id
:
''
,
type
:
''
,
name
:
'取消'
},
{
id
:
''
,
type
:
'primary'
,
name
:
'保存'
}
],
selectIds
:
[]
}
},
methods
:
{
_open
(
ids
)
{
this
.
detectionModal
=
true
this
.
$refs
.
formObj
.
resetFields
()
this
.
formObj
=
Object
.
assign
({},
{},
defVal
)
this
.
_hideLoading
()
this
.
selectIds
=
ids
},
_footerResult
(
msg
)
{
switch
(
msg
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_ok
(
msg
)
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form'
)
data
.
itemIds
=
this
.
selectIds
.
join
(
','
)
data
.
testValue
=
this
.
formObj
.
testValue
this
.
_save
(
data
)
}
else
{
this
.
$Message
.
error
(
'表单验证失败'
)
this
.
_hideLoading
()
}
})
},
_cancel
()
{
this
.
detectionModal
=
false
},
_resultChange
(
result
,
msg
)
{
if
(
result
)
{
this
.
detectionModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
}
this
.
_hideLoading
()
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
testValue
(
data
)
this
.
_resultChange
(
result
,
'提交成功'
)
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
}
}
}
</
script
>
<
style
scoped
>
</
style
>
pages/soil-test-manage/test-task-manage/entrust-sample-manage/SampleManage.vue
View file @
c9931b17
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
<WaitScan
ref=
"waitScanModal"
></WaitScan>
<WaitScan
ref=
"waitScanModal"
></WaitScan>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<!--
<keep-alive>
-->
<!-- <!– eslint-disable-next-line vue/require-component-is –>-->
<!--
<component
ref=
"refModal"
:is=
"currentComponent"
></component>
-->
<!--
</keep-alive>
-->
</div>
</div>
</Modal>
</Modal>
</div>
</div>
...
@@ -34,9 +38,13 @@ export default {
...
@@ -34,9 +38,13 @@ export default {
modalTitle
:
''
,
modalTitle
:
''
,
selectIds
:
[],
selectIds
:
[],
activeName
:
'waitReceive'
,
activeName
:
'waitReceive'
,
name
:
''
name
:
''
,
currentComponent
:
''
}
}
},
},
mounted
()
{
// this.currentComponent = 'waitScan'
},
methods
:
{
methods
:
{
_open
(
contractId
,
type
,
name
)
{
_open
(
contractId
,
type
,
name
)
{
this
.
type
=
type
// 类型(采样或送样)
this
.
type
=
type
// 类型(采样或送样)
...
@@ -44,6 +52,7 @@ export default {
...
@@ -44,6 +52,7 @@ export default {
this
.
showSampleModal
=
true
this
.
showSampleModal
=
true
this
.
entrustId
=
contractId
// 合同id
this
.
entrustId
=
contractId
// 合同id
this
.
activeName
=
'waitReceive'
this
.
activeName
=
'waitReceive'
// this.currentComponent = 'waitScan'
this
.
selectIds
=
[]
this
.
selectIds
=
[]
this
.
_waitPage
()
this
.
_waitPage
()
},
},
...
...
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