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
f35d37bb
Commit
f35d37bb
authored
Oct 26, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了备样管理编辑
parent
00c30bec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
soil-sample.js
api/soil/soil-sample.js
+2
-1
SampleBackupsManage.vue
...-sample-manage/backups-manage/tab/SampleBackupsManage.vue
+42
-2
No files found.
api/soil/soil-sample.js
View file @
f35d37bb
...
@@ -131,5 +131,6 @@ export default {
...
@@ -131,5 +131,6 @@ export default {
getDictList
:
data
=>
getDictList
:
data
=>
http
.
post
(
'res/v1/dict/dict_query?type='
+
data
).
then
(
res
=>
res
),
http
.
post
(
'res/v1/dict/dict_query?type='
+
data
).
then
(
res
=>
res
),
editBackup
:
data
=>
editBackup
:
data
=>
http
.
put
(
'soil/v1/sample_backup/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
)
http
.
put
(
'soil/v1/sample_backup/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
getUserList
:
data
=>
http
.
post
(
'/base/v1/user/page'
).
then
(
res
=>
res
)
}
}
pages/soil-sample-manage/backups-manage/tab/SampleBackupsManage.vue
View file @
f35d37bb
...
@@ -50,12 +50,21 @@
...
@@ -50,12 +50,21 @@
<div
v-else-if=
"item.key==='conditions'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-else-if=
"item.key==='conditions'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<div
v-else
>
<el-select
:value=
"scope.row.conditions"
@
change=
"selCondi"
clearable
style=
"width:100%"
size=
"small"
>
<el-select
:value=
"scope.row.conditions"
@
change=
"selCondi"
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in conditionList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
<el-option
v-for=
"item in conditionList"
:value=
"item.name"
:key=
"item.name"
>
{{
item
.
name
}}
</el-option>
</el-option>
</el-select>
</el-select>
</div>
</div>
</div>
</div>
<div
v-else-if=
"item.key==='backupUser'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
<div
v-else
>
<el-select
:value=
"scope.row.backupUser"
@
change=
"selUser"
style=
"width:100%"
size=
"small"
>
<el-option
v-for=
"item in backupUserList"
:value=
"item.id"
:label=
"item.realname"
:key=
"item.realname"
>
{{
item
.
realname
}}
</el-option>
</el-select>
</div>
</div>
<div
v-else-if=
"item.key==='backupLocation'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-else-if=
"item.key==='backupLocation'"
@
click
.
stop=
"_handleIndex(scope)"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
<div
v-if=
"editIndex!==scope.rowIndex"
>
{{
scope
.
row
[
item
.
key
]
}}
{{
scope
.
row
[
item
.
key
]
}}
...
@@ -171,6 +180,7 @@ export default {
...
@@ -171,6 +180,7 @@ export default {
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
/* {title: '处置方式', key: 'handleMethod', width: 120,}, */
],
],
conditionList
:
[],
conditionList
:
[],
backupUserList
:
[],
locList
:
[],
locList
:
[],
currentIndex
:
-
1
,
currentIndex
:
-
1
,
editIndex
:
-
1
,
editIndex
:
-
1
,
...
@@ -226,6 +236,7 @@ export default {
...
@@ -226,6 +236,7 @@ export default {
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this.sampleHandleValue = Number(localStorage.getItem('sampleHandleValue'))
// this._getLocList()
// this._getLocList()
this
.
_getConditionList
()
this
.
_getConditionList
()
this
.
_getUserList
()
// this._getBackUpCount()
// this._getBackUpCount()
},
},
methods
:
{
methods
:
{
...
@@ -263,7 +274,10 @@ export default {
...
@@ -263,7 +274,10 @@ export default {
const
tempData
=
{
const
tempData
=
{
quantity
:
this
.
getPage
.
records
[
this
.
currentIndex
].
quantity
,
quantity
:
this
.
getPage
.
records
[
this
.
currentIndex
].
quantity
,
conditions
:
this
.
getPage
.
records
[
this
.
currentIndex
].
conditions
,
conditions
:
this
.
getPage
.
records
[
this
.
currentIndex
].
conditions
,
backupLocation
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupLocation
backupLocation
:
this
.
getPage
.
records
[
this
.
currentIndex
]
.
backupLocation
,
backupUser
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUser
,
backupUserId
:
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUserId
}
}
this
.
_saveOk
({
this
.
_saveOk
({
id
:
this
.
getPage
.
records
[
this
.
currentIndex
].
id
,
id
:
this
.
getPage
.
records
[
this
.
currentIndex
].
id
,
...
@@ -311,10 +325,36 @@ export default {
...
@@ -311,10 +325,36 @@ export default {
break
break
}
}
},
},
_getUserList
:
async
function
()
{
const
result
=
await
soilSample
.
getUserList
()
if
(
result
)
{
console
.
log
(
result
)
this
.
backupUserList
=
result
.
records
}
},
selCondi
(
data
)
{
selCondi
(
data
)
{
this
.
$forceUpdate
()
this
.
$forceUpdate
()
this
.
getPage
.
records
[
this
.
currentIndex
].
conditions
=
data
this
.
getPage
.
records
[
this
.
currentIndex
].
conditions
=
data
},
},
selUser
(
data
)
{
this
.
$forceUpdate
()
if
(
data
)
{
for
(
let
i
=
0
;
i
<
this
.
backupUserList
.
length
;
i
++
)
{
if
(
this
.
backupUserList
[
i
].
id
===
data
)
{
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUser
=
this
.
backupUserList
[
i
].
realname
}
}
}
else
{
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUser
=
''
}
this
.
getPage
.
records
[
this
.
currentIndex
].
backupUserId
=
data
console
.
log
(
this
.
getPage
.
records
[
this
.
currentIndex
])
// this.$forceUpdate()
// this.getPage.records[this.currentIndex].backupUser = data
// this.getPage.records[this.currentIndex].backupUser = data
},
inputChange
(
data
)
{
inputChange
(
data
)
{
this
.
getPage
.
records
[
this
.
currentIndex
].
quantity
=
data
this
.
getPage
.
records
[
this
.
currentIndex
].
quantity
=
data
},
},
...
...
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