Commit ca6dfd66 authored by jiaxu.yan's avatar jiaxu.yan

Merge branch 'develop' into developer/yanjiaxu

parents dfb9548a 23b8cade
......@@ -73,9 +73,7 @@
<el-table
v-loading="tableLoding"
:data="tableData"
style="width: 100%"
border
:cell-style="taskNameCellStyle"
@sort-change="sortClick"
>
<el-table-column type="index" width="55" label="序号" align="center">
......@@ -83,7 +81,6 @@
<el-table-column
v-if="activeName === 'completeSample'"
prop="identificationCode"
align="left"
label="车辆识别码(VIN)"
show-overflow-tooltip
min-width="200"
......@@ -91,14 +88,12 @@
<el-table-column
prop="sampleNumber"
label="样品编号"
align="left"
show-overflow-tooltip
min-width="200"
/>
<el-table-column
prop="sampleName"
label="样品名称"
align="left"
show-overflow-tooltip
min-width="200"
>
......@@ -115,21 +110,18 @@
<el-table-column
prop="sampleSender"
label="送样者"
align="left"
show-overflow-tooltip
min-width="200"
/>
<el-table-column
prop="numberOfSamples"
label="样品数量"
align="left"
show-overflow-tooltip
min-width="100"
/>
<el-table-column
prop="deliveryDate"
label="送样日期"
align="left"
sortable="'custom"
show-overflow-tooltip
min-width="150"
......@@ -137,18 +129,16 @@
<el-table-column
prop="manufactureDate"
label="生产日期"
align="left"
show-overflow-tooltip
min-width="150"
/>
<el-table-column
prop="manufacturingEnterprise"
label="生产企业"
align="left"
show-overflow-tooltip
min-width="200"
/>
<el-table-column label="相关任务" align="left">
<el-table-column label="相关任务" width="500px" :resizable="false">
<template slot-scope="scope">
<div v-if="scope.row.taskSampleRelation.length > 0">
<el-link
......@@ -158,7 +148,7 @@
:underline="false"
class="custom-link"
@click="goTaskDetails(item.taskId)"
>{{ item.taskName ? item.taskName : '--' }}
>{{ item.taskNo ? item.taskNo : '--' }}
<span v-show="index + 1 != scope.row.taskSampleRelation.length">
,
</span></el-link
......@@ -368,17 +358,17 @@
<el-form-item label="样品照片:" prop="samplePhotos">
<div v-if="clickNameForm.samplePhotos">
<image-preview
:src="clickNameForm.samplePhotos"
v-for="(item, index) in clickNameForm.samplePhotos"
:key="index"
width="150px"
height="150px"
style="margin-right: 20px"
:src="item"
></image-preview>
</div>
<div v-else>暂无数据</div>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
</div>
</el-dialog>
<MaterialLibrary
......@@ -399,6 +389,7 @@ import {
} from '@/api/system/sample'
import MaterialLibrary from '@/views/setting/materialLibrary/index.vue'
import materialLibrary from '@/views/setting/materialLibrary/index.vue'
import { isExternal } from '@/utils/validate'
export default {
components: { MaterialLibrary },
......@@ -495,11 +486,6 @@ export default {
this.getList()
},
methods: {
taskNameCellStyle(row, column, rowIndex, columnIndex) {
if (row.columnIndex === 9) {
return { whiteSpace: 'nowrap' }
}
},
closeMaterial(data) {
this.materialShow = data
},
......@@ -545,7 +531,11 @@ export default {
})
},
clickAddButton() {
this.dialogTitle = '新增'
if (this.activeName === 'completeSample') {
this.dialogTitle = '新增整车样品'
} else {
this.dialogTitle = '新增零部件样品'
}
this.dialogVisible = true
this.determineActiveName()
},
......@@ -630,24 +620,35 @@ export default {
clickSampleName(row) {
this.dialogFormVisible = true
this.clickNameForm = row
this.clickNameForm.samplePhotos =
this.clickNameForm.samplePhotos.split(',')
console.log(row)
},
closeSamplePhoto() {
this.clickNameForm = {}
},
handleUpdate(id) {
this.dialogTitle = '编辑'
if (this.activeName === 'completeSample') {
this.dialogTitle = '编辑整车样品'
} else {
this.dialogTitle = '编辑零部件样品'
}
selectSampleInfo({ id: id }).then(res => {
this.editParamsForm = res.data
this.dialogVisible = true
})
},
handleDelete(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
this.$confirm('是否确定删除该条数据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeSample({ id: id }).then(() => {
this.$message({
message: '删除成功',
type: 'success'
})
this.getList()
})
})
......@@ -663,7 +664,7 @@ export default {
}
}
</script>
<style>
<style lang="scss" scoped>
.dialog-button {
display: flex;
justify-content: flex-end;
......@@ -672,4 +673,7 @@ export default {
.custom-link:hover {
text-decoration: underline;
}
::v-deep .el-textarea__inner {
font-family: 微软雅黑;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment