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
9226d4e2
Commit
9226d4e2
authored
Sep 25, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了试验项目编辑原始记录
parent
4d3b7751
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
19 deletions
+48
-19
soil-test.js
api/soil/soil-test.js
+5
-1
nuxt.config.js
nuxt.config.js
+8
-1
OriginalRecordEdit.vue
pages/soil-test-manage/test-input/OriginalRecordEdit.vue
+20
-8
OriginalRecordView.vue
pages/soil-test-manage/test-input/OriginalRecordView.vue
+10
-9
common.js
plugins/common.js
+5
-0
No files found.
api/soil/soil-test.js
View file @
9226d4e2
...
...
@@ -49,5 +49,9 @@ export default {
recordPage
:
data
=>
http
.
post
(
'soil/v1/original_record/page'
,
data
).
then
(
res
=>
res
),
pageTest
:
data
=>
http
.
post
(
'soil/v1/experiment/page_test'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/experiment/page_test'
,
data
).
then
(
res
=>
res
),
updateItem
:
data
=>
http
.
post
(
'soil/v1/original_record/update_original_record'
,
data
)
.
then
(
res
=>
res
)
}
nuxt.config.js
View file @
9226d4e2
...
...
@@ -27,6 +27,9 @@ module.exports = {
{
src
:
'http://static.patzn.com/thirdparty/ztree/zTree_v3-3.5.29/js/jquery.ztree.all.min.js'
},
{
src
:
'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.js'
}
],
link
:
[
...
...
@@ -52,7 +55,11 @@ module.exports = {
rel
:
'stylesheet'
,
href
:
'http://static.patzn.com/theme/my-theme/main.css'
},
{
rel
:
'stylesheet'
,
href
:
''
,
name
:
'theme'
}
{
rel
:
'stylesheet'
,
href
:
''
,
name
:
'theme'
},
{
rel
:
'stylesheet'
,
href
:
'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.css'
}
]
},
...
...
pages/soil-test-manage/test-input/OriginalRecordEdit.vue
View file @
9226d4e2
...
...
@@ -8,6 +8,7 @@
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
{
soilTest
}
from
'../../../api'
/**
* 编辑原始记录详情
...
...
@@ -74,6 +75,7 @@ export default {
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_saveOriginal
(
data
)
{
console
.
log
(
'修改的数据'
,
data
)
if
(
this
.
again
)
{
if
(
data
.
data
.
msg
===
true
)
{
this
.
_editSaveRecord
(
data
)
...
...
@@ -89,6 +91,15 @@ export default {
// eslint-disable-next-line no-undef
layx
.
destroyAll
(
this
.
formIdTemp
)
},
_updateRecord
:
async
function
(
param
)
{
const
result
=
await
soilTest
.
updateItem
(
param
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
_cancel
()
this
.
$emit
(
'on-result-change'
)
}
},
// 保存后解析项目的检测值
_editSaveRecord
(
data
)
{
const
param
=
{
...
...
@@ -113,14 +124,15 @@ export default {
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
})
}
this
.
$store
.
dispatch
(
'EnvItem/updateFormForItem'
,
param
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
EnvItem
.
success
)
{
this
.
$Message
.
success
(
'保存成功'
)
// this.showModal = false;
this
.
$emit
(
'on-result-change'
)
this
.
_cancel
()
}
})
this
.
_updateRecord
(
param
)
// this.$store.dispatch('EnvItem/updateFormForItem', param).then(() => {
// if (this.$store.state.EnvItem.success) {
// this.$Message.success('保存成功')
// // this.showModal = false;
// this.$emit('on-result-change')
// this._cancel()
// }
// })
}
}
}
...
...
pages/soil-test-manage/test-input/OriginalRecordView.vue
View file @
9226d4e2
...
...
@@ -88,14 +88,12 @@ export default {
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
,
componentName
:
'ItemOriginalRecordEdit'
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
,
componentName
:
'OriginalItemView'
name
:
'查看原始记录'
}
// {
// type: 'erlenmeyer-flask',
...
...
@@ -246,10 +244,13 @@ export default {
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
$refs
.
refModal
.
_openWithType
(
data
.
id
,
'ENVTESTMAKEEDIT'
)
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
break
case
'查看原始记录'
:
this
.
_recordView
(
data
.
i
d
)
this
.
_recordView
(
data
.
originalRecordI
d
)
break
case
'查看检测项目'
:
this
.
$refs
.
refModal
.
_open
(
data
)
...
...
@@ -304,9 +305,9 @@ export default {
case
'selectIds'
:
this
.
selectIds
=
data
break
//
case 'iconClick':
// this._iconClick(data.name, data.rowData, data.componentName);
// break;
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
...
...
plugins/common.js
View file @
9226d4e2
...
...
@@ -483,10 +483,15 @@ Vue.prototype.$resetFields = function(formObj) {
}
return
formObj
}
Vue
.
prototype
.
$layx
=
function
(
id
,
title
,
url
,
option
)
{
// eslint-disable-next-line no-undef
layx
.
iframe
(
id
,
title
,
url
,
option
||
{
width
:
'100%'
,
height
:
'100%'
})
}
/**
*搜索条件清空缓存处理方式(form表单 查询)
*
*/
Vue
.
prototype
.
$serializeForm
=
function
(
formObj
)
{
const
newFormObj
=
{}
for
(
const
key
in
formObj
)
{
...
...
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