Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
8bf08967
Commit
8bf08967
authored
Oct 31, 2023
by
zhaopanyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zpy 10.31
parent
a4b9d8f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
40 deletions
+35
-40
ruoyi-ui/src/views/smartSchool/laboratoryManagement/laboratoryManagements/gradeExperimentapp/index.vue
+35
-40
No files found.
ruoyi-ui/src/views/smartSchool/laboratoryManagement/laboratoryManagements/gradeExperimentapp/index.vue
View file @
8bf08967
...
...
@@ -105,6 +105,8 @@
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"级部"
>
...
...
@@ -168,52 +170,57 @@
<el-row
:gutter=
"30"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"申请老师"
>
<el-input
v-model=
"postForm.applyName"
placeholder=
"请输入"
clearable
:disabled=
"isEdit
s
"
/>
<el-input
v-model=
"postForm.applyName"
placeholder=
"请输入"
clearable
:disabled=
"isEdit"
/>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"实验分类"
>
<el-select
v-model=
"postForm.experimentClassify"
placeholder=
"请选择"
clearable
style=
"width: 100%;"
:disabled=
"isEdit
s
"
>
style=
"width: 100%;"
:disabled=
"isEdit"
>
<el-option
v-for=
"dict in dict.type.experiment_classify"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"实验名称"
>
<el-input
v-model=
"postForm.experimentName"
placeholder=
"请输入"
clearable
:disabled=
"isEdit
s
"
/>
<el-input
v-model=
"postForm.experimentName"
placeholder=
"请输入"
clearable
:disabled=
"isEdit"
/>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"学科"
>
<el-select
v-model=
"postForm.sub"
placeholder=
"请选择"
clearable
style=
"width: 100%;"
:disabled=
"isEdit
s
"
>
:disabled=
"isEdit"
>
<el-option
v-for=
"dict in dict.type.lab_sub"
:key=
"dict.value"
:label=
"dict.label"
:value=
"dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"20"
>
<el-form-item
label=
"章节内容"
>
<el-input
v-model=
"postForm.chapterContent"
placeholder=
"请输入"
clearable
:disabled=
"isEdit
s
"
></el-input>
:disabled=
"isEdit"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"10"
>
<el-form-item
label=
"级部"
>
<el-input
v-model=
"postForm.grade"
placeholder=
"请输入"
clearable
:disabled=
"isEdit
s
"
/>
<el-input
v-model=
"postForm.grade"
placeholder=
"请输入"
clearable
:disabled=
"isEdit"
/>
</el-form-item>
</el-col>
<el-col
:span=
"10"
>
<el-form-item
label=
"学年"
>
<el-input
v-model=
"postForm.schoolYear"
placeholder=
"请输入"
clearable
:disabled=
"isEdit
s
"
/>
<el-input
v-model=
"postForm.schoolYear"
placeholder=
"请输入"
clearable
:disabled=
"isEdit"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -304,7 +311,6 @@ export default {
],
isEdit
:
false
,
isEdits
:
false
,
postForm
:
{
applyName
:
''
,
experimentClassify
:
''
,
...
...
@@ -385,39 +391,29 @@ export default {
const
labId
=
this
.
postForm
.
schoolLabClassYearRelationList
[
i
].
labId
;
this
.
selectedLabs
.
push
(
labId
);
}
// console.log('this.form', this.form);
this
.
postForm
.
applyName
=
response
.
data
.
applyName
;
this
.
postForm
.
experimentClassify
=
response
.
data
.
experimentClassify
;
this
.
postForm
.
experimentName
=
response
.
data
.
experimentName
;
this
.
postForm
.
sub
=
response
.
data
.
sub
;
this
.
postForm
.
chapterContent
=
response
.
data
.
chapterContent
;
this
.
postForm
.
grade
=
response
.
data
.
grade
;
this
.
postForm
.
schoolYear
=
response
.
data
.
schoolYear
;
this
.
postForm
.
experimentUseGoods
=
response
.
data
.
experimentUseGoods
;
this
.
postForm
.
plannedStartTime
=
response
.
data
.
plannedStartTime
;
this
.
postForm
.
plannedEndTime
=
response
.
data
.
plannedEndTime
;
this
.
postForm
.
schoolLabClassYearRelationList
=
this
.
selectedLabs
;
// 仅将已经选择的实验室作为关联数据提交
this
.
loading
=
false
;
const
plannedStartTime
=
this
.
postForm
.
plannedStartTime
const
plannedEndTime
=
this
.
postForm
.
plannedEndTime
const
sub
=
this
.
postForm
.
sub
getLabList
(
plannedStartTime
,
plannedEndTime
,
sub
).
then
(
response
=>
{
const
labs
=
response
.
data
;
console
.
log
(
labs
,
'qb'
);
const
selectedLabs
=
this
.
postForm
.
schoolLabClassYearRelationList
;
// 获取已选择的实验室列表
console
.
log
(
selectedLabs
,
'xz'
);
// 将已选择的实验室信息存储在新的数组中
const
selectedLabInfo
=
labs
.
filter
(
lab
=>
{
const
isSelected
=
selectedLabs
.
some
(
selectedLab
=>
selectedLab
.
labId
===
lab
.
labId
);
if
(
isSelected
)
{
lab
.
isSelected
=
true
;
return
true
;
}
return
false
;
});
// 更新 labs 数组,将已选择的实验室信息存储在对应实验室对象中
this
.
labs
=
labs
.
map
(
lab
=>
{
const
selectedLab
=
selectedLabInfo
.
find
(
selectedLab
=>
selectedLab
.
labId
===
lab
.
labId
);
if
(
selectedLab
)
{
lab
.
selectedLabInfo
=
selectedLab
;
}
return
lab
;
});
this
.
isEdits
=
true
;
getLabList
(
plannedStartTime
,
plannedEndTime
).
then
(
response
=>
{
const
labs
=
response
.
data
;
this
.
labs
=
labs
.
filter
(
lab
=>
lab
.
useState
===
"空闲"
);
// 根据状态筛选出空闲的实验室
// console.log(this.labs, 'this.labs');
// 这里不再需要循环添加实验室关联数据
this
.
loading
=
false
;
});
});
this
.
dialogTableVisible
=
true
;
},
...
...
@@ -433,7 +429,7 @@ export default {
console
.
log
(
'this.form.schoolLabClassYearRelationList'
,
this
.
form
.
schoolLabClassYearRelationList
);
}
//
this.form.schoolLabClassYearRelationList = [];
this
.
form
.
schoolLabClassYearRelationList
=
[];
for
(
let
i
=
0
;
i
<
this
.
schoolLabClassYearRelationList
.
length
;
i
++
)
{
const
labId
=
this
.
schoolLabClassYearRelationList
[
i
].
labId
;
const
labName
=
this
.
schoolLabClassYearRelationList
[
i
].
labName
;
...
...
@@ -482,7 +478,7 @@ export default {
getAllocationLab
(
params
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
'保存成功'
);
this
.
dialogTableVisible
=
false
;
this
.
open
=
false
;
this
.
getList
();
});
}
...
...
@@ -502,7 +498,7 @@ export default {
plannedEndTime
:
this
.
postForm
.
plannedEndTime
,
experimentUseGoods
:
this
.
postForm
.
experimentUseGoods
,
declareState
:
'3'
,
schoolLabClassYearRelationList
:
labs
,
schoolLabClassYearRelationList
:
[]
,
};
for
(
let
i
=
0
;
i
<
this
.
labs
.
length
;
i
++
)
{
const
labId
=
this
.
labs
[
i
].
labId
;
...
...
@@ -514,7 +510,7 @@ export default {
getAllocationLab
(
params
).
then
(
response
=>
{
console
.
log
(
params
,
params
);
this
.
$modal
.
msgSuccess
(
'提交成功'
);
this
.
dialogTableVisible
=
false
;
this
.
open
=
false
;
this
.
getList
();
});
}
...
...
@@ -532,4 +528,4 @@ export default {
}
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
\ No newline at end of file
<
style
lang=
"scss"
scoped
></
style
>
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