Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
Project
Project
Details
Activity
Releases
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
中汽测评-信息安全测评系统
web
Commits
ca6dfd66
Commit
ca6dfd66
authored
Mar 06, 2024
by
jiaxu.yan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into developer/yanjiaxu
parents
dfb9548a
23b8cade
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
25 deletions
+29
-25
index.vue
src/views/setting/sample/index.vue
+29
-25
No files found.
src/views/setting/sample/index.vue
View file @
ca6dfd66
...
@@ -73,9 +73,7 @@
...
@@ -73,9 +73,7 @@
<el-table
<el-table
v-loading=
"tableLoding"
v-loading=
"tableLoding"
:data=
"tableData"
:data=
"tableData"
style=
"width: 100%"
border
border
:cell-style=
"taskNameCellStyle"
@
sort-change=
"sortClick"
@
sort-change=
"sortClick"
>
>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
align=
"center"
>
<el-table-column
type=
"index"
width=
"55"
label=
"序号"
align=
"center"
>
...
@@ -83,7 +81,6 @@
...
@@ -83,7 +81,6 @@
<el-table-column
<el-table-column
v-if=
"activeName === 'completeSample'"
v-if=
"activeName === 'completeSample'"
prop=
"identificationCode"
prop=
"identificationCode"
align=
"left"
label=
"车辆识别码(VIN)"
label=
"车辆识别码(VIN)"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"200"
min-width=
"200"
...
@@ -91,14 +88,12 @@
...
@@ -91,14 +88,12 @@
<el-table-column
<el-table-column
prop=
"sampleNumber"
prop=
"sampleNumber"
label=
"样品编号"
label=
"样品编号"
align=
"left"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"200"
min-width=
"200"
/>
/>
<el-table-column
<el-table-column
prop=
"sampleName"
prop=
"sampleName"
label=
"样品名称"
label=
"样品名称"
align=
"left"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"200"
min-width=
"200"
>
>
...
@@ -115,21 +110,18 @@
...
@@ -115,21 +110,18 @@
<el-table-column
<el-table-column
prop=
"sampleSender"
prop=
"sampleSender"
label=
"送样者"
label=
"送样者"
align=
"left"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"200"
min-width=
"200"
/>
/>
<el-table-column
<el-table-column
prop=
"numberOfSamples"
prop=
"numberOfSamples"
label=
"样品数量"
label=
"样品数量"
align=
"left"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"100"
min-width=
"100"
/>
/>
<el-table-column
<el-table-column
prop=
"deliveryDate"
prop=
"deliveryDate"
label=
"送样日期"
label=
"送样日期"
align=
"left"
sortable=
"'custom"
sortable=
"'custom"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"150"
min-width=
"150"
...
@@ -137,18 +129,16 @@
...
@@ -137,18 +129,16 @@
<el-table-column
<el-table-column
prop=
"manufactureDate"
prop=
"manufactureDate"
label=
"生产日期"
label=
"生产日期"
align=
"left"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"150"
min-width=
"150"
/>
/>
<el-table-column
<el-table-column
prop=
"manufacturingEnterprise"
prop=
"manufacturingEnterprise"
label=
"生产企业"
label=
"生产企业"
align=
"left"
show-overflow-tooltip
show-overflow-tooltip
min-width=
"200"
min-width=
"200"
/>
/>
<el-table-column
label=
"相关任务"
align=
"left
"
>
<el-table-column
label=
"相关任务"
width=
"500px"
:resizable=
"false
"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.taskSampleRelation.length > 0"
>
<div
v-if=
"scope.row.taskSampleRelation.length > 0"
>
<el-link
<el-link
...
@@ -158,7 +148,7 @@
...
@@ -158,7 +148,7 @@
:underline=
"false"
:underline=
"false"
class=
"custom-link"
class=
"custom-link"
@
click=
"goTaskDetails(item.taskId)"
@
click=
"goTaskDetails(item.taskId)"
>
{{
item
.
taskN
ame
?
item
.
taskName
:
'--'
}}
>
{{
item
.
taskN
o
?
item
.
taskNo
:
'--'
}}
<span
v-show=
"index + 1 != scope.row.taskSampleRelation.length"
>
<span
v-show=
"index + 1 != scope.row.taskSampleRelation.length"
>
,
,
</span></el-link
</span></el-link
...
@@ -368,17 +358,17 @@
...
@@ -368,17 +358,17 @@
<el-form-item
label=
"样品照片:"
prop=
"samplePhotos"
>
<el-form-item
label=
"样品照片:"
prop=
"samplePhotos"
>
<div
v-if=
"clickNameForm.samplePhotos"
>
<div
v-if=
"clickNameForm.samplePhotos"
>
<image-preview
<image-preview
:src=
"clickNameForm.samplePhotos"
v-for=
"(item, index) in clickNameForm.samplePhotos"
:key=
"index"
width=
"150px"
width=
"150px"
height=
"150px"
height=
"150px"
style=
"margin-right: 20px"
:src=
"item"
></image-preview>
></image-preview>
</div>
</div>
<div
v-else
>
暂无数据
</div>
<div
v-else
>
暂无数据
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
取 消
</el-button>
</div>
</el-dialog>
</el-dialog>
<MaterialLibrary
<MaterialLibrary
...
@@ -399,6 +389,7 @@ import {
...
@@ -399,6 +389,7 @@ import {
}
from
'@/api/system/sample'
}
from
'@/api/system/sample'
import
MaterialLibrary
from
'@/views/setting/materialLibrary/index.vue'
import
MaterialLibrary
from
'@/views/setting/materialLibrary/index.vue'
import
materialLibrary
from
'@/views/setting/materialLibrary/index.vue'
import
materialLibrary
from
'@/views/setting/materialLibrary/index.vue'
import
{
isExternal
}
from
'@/utils/validate'
export
default
{
export
default
{
components
:
{
MaterialLibrary
},
components
:
{
MaterialLibrary
},
...
@@ -495,11 +486,6 @@ export default {
...
@@ -495,11 +486,6 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
taskNameCellStyle
(
row
,
column
,
rowIndex
,
columnIndex
)
{
if
(
row
.
columnIndex
===
9
)
{
return
{
whiteSpace
:
'nowrap'
}
}
},
closeMaterial
(
data
)
{
closeMaterial
(
data
)
{
this
.
materialShow
=
data
this
.
materialShow
=
data
},
},
...
@@ -545,7 +531,11 @@ export default {
...
@@ -545,7 +531,11 @@ export default {
})
})
},
},
clickAddButton
()
{
clickAddButton
()
{
this
.
dialogTitle
=
'新增'
if
(
this
.
activeName
===
'completeSample'
)
{
this
.
dialogTitle
=
'新增整车样品'
}
else
{
this
.
dialogTitle
=
'新增零部件样品'
}
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
this
.
determineActiveName
()
this
.
determineActiveName
()
},
},
...
@@ -630,24 +620,35 @@ export default {
...
@@ -630,24 +620,35 @@ export default {
clickSampleName
(
row
)
{
clickSampleName
(
row
)
{
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
this
.
clickNameForm
=
row
this
.
clickNameForm
=
row
this
.
clickNameForm
.
samplePhotos
=
this
.
clickNameForm
.
samplePhotos
.
split
(
','
)
console
.
log
(
row
)
},
},
closeSamplePhoto
()
{
closeSamplePhoto
()
{
this
.
clickNameForm
=
{}
this
.
clickNameForm
=
{}
},
},
handleUpdate
(
id
)
{
handleUpdate
(
id
)
{
this
.
dialogTitle
=
'编辑'
if
(
this
.
activeName
===
'completeSample'
)
{
this
.
dialogTitle
=
'编辑整车样品'
}
else
{
this
.
dialogTitle
=
'编辑零部件样品'
}
selectSampleInfo
({
id
:
id
}).
then
(
res
=>
{
selectSampleInfo
({
id
:
id
}).
then
(
res
=>
{
this
.
editParamsForm
=
res
.
data
this
.
editParamsForm
=
res
.
data
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
})
})
},
},
handleDelete
(
id
)
{
handleDelete
(
id
)
{
this
.
$confirm
(
'
此操作将永久删除该数据, 是否继续
?'
,
'提示'
,
{
this
.
$confirm
(
'
是否确定删除该条数据
?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
removeSample
({
id
:
id
}).
then
(()
=>
{
removeSample
({
id
:
id
}).
then
(()
=>
{
this
.
$message
({
message
:
'删除成功'
,
type
:
'success'
})
this
.
getList
()
this
.
getList
()
})
})
})
})
...
@@ -663,7 +664,7 @@ export default {
...
@@ -663,7 +664,7 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
lang=
"scss"
scoped
>
.dialog-button
{
.dialog-button
{
display
:
flex
;
display
:
flex
;
justify-content
:
flex-end
;
justify-content
:
flex-end
;
...
@@ -672,4 +673,7 @@ export default {
...
@@ -672,4 +673,7 @@ export default {
.custom-link
:hover
{
.custom-link
:hover
{
text-decoration
:
underline
;
text-decoration
:
underline
;
}
}
::v-deep
.el-textarea__inner
{
font-family
:
微软雅黑
;
}
</
style
>
</
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