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

Merge branch 'develop' into developer/yanjiaxu

parents 2c842a34 079f4e3d
...@@ -452,8 +452,8 @@ export default { ...@@ -452,8 +452,8 @@ export default {
tableData: [], tableData: [],
total: 0, total: 0,
dialogVisible: false, dialogVisible: false,
dialogTitle: '新建',
trademarkDisplay: true, trademarkDisplay: true,
dialogTitle: '新建',
samplePhotosDisplay: true samplePhotosDisplay: true
} }
}, },
......
...@@ -43,10 +43,7 @@ ...@@ -43,10 +43,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row <el-row v-show="testScenarioShow" :gutter="20">
v-show="model.inspectionItemList.includes('trfis')"
:gutter="20"
>
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
label="请选择测试场景(可多选)" label="请选择测试场景(可多选)"
...@@ -160,7 +157,7 @@ ...@@ -160,7 +157,7 @@
</div> </div>
<div class="tip-navigation"> <div class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title">小组信息</div> <div class="tip-title">检验小组</div>
</div> </div>
<div class="global-left-margin"> <div class="global-left-margin">
<el-table <el-table
...@@ -172,7 +169,12 @@ ...@@ -172,7 +169,12 @@
<el-table-column label="姓名" align="left" prop="nickName"> <el-table-column label="姓名" align="left" prop="nickName">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.userId !== ''">{{ row.nickName }}</span> <span v-if="row.userId !== ''">{{ row.nickName }}</span>
<el-select v-else v-model="userId" placeholder="请选择"> <el-select
v-else
v-model="userId"
placeholder="请选择"
@change="handleNameChange"
>
<el-option <el-option
v-for="(item, index) in userList" v-for="(item, index) in userList"
:key="index" :key="index"
...@@ -195,10 +197,16 @@ ...@@ -195,10 +197,16 @@
<el-table-column label="所属部门" align="left" prop="dept"> <el-table-column label="所属部门" align="left" prop="dept">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.userId === ''">-</span> <span v-if="row.userId === ''">-</span>
<span v-else>{{ row.dept.deptName }}</span> <span v-else-if="row.dept === null"> - </span>
<span v-else>{{ row.dept.deptName || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderIndex" label="排序"> <el-table-column
prop="orderIndex"
label="排序"
width="160"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.userId !== ''" class="sortable-handle"> <div v-if="scope.row.userId !== ''" class="sortable-handle">
<icon-park type="sort-three" size="14" fill="#F9A221" /> <icon-park type="sort-three" size="14" fill="#F9A221" />
...@@ -211,18 +219,19 @@ ...@@ -211,18 +219,19 @@
<el-table-column <el-table-column
width="160" width="160"
label="操作" label="操作"
align="left" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="actions-container"> <div class="actions-container">
<page-button <span v-show="scope.row.userId === ''">-</span>
v-show="scope.row.userId === ''" <!-- <page-button-->
icon="hard-disk-one" <!-- v-show="scope.row.userId === ''"-->
title="保存" <!-- icon="hard-disk-one"-->
class="button-item" <!-- title="保存"-->
@click.native="handleSavePeople(scope.row)" <!-- class="button-item"-->
></page-button> <!-- @click.native="handleSavePeople(scope.row)"-->
<!-- ></page-button>-->
<page-button <page-button
v-show="scope.row.userId !== ''" v-show="scope.row.userId !== ''"
icon="edit" icon="edit"
...@@ -238,13 +247,13 @@ ...@@ -238,13 +247,13 @@
class="button-item" class="button-item"
@click.native="handleDelete(scope.row)" @click.native="handleDelete(scope.row)"
></page-button> ></page-button>
<page-button <!-- <page-button-->
v-show="scope.row.userId === ''" <!-- v-show="scope.row.userId === ''"-->
icon="delete" <!-- icon="delete"-->
title="取消" <!-- title="取消"-->
class="button-item" <!-- class="button-item"-->
@click.native="handleCancelPeople()" <!-- @click.native="handleCancelPeople()"-->
></page-button> <!-- ></page-button>-->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -271,7 +280,7 @@ ...@@ -271,7 +280,7 @@
<!-- 零件样品信息 --> <!-- 零件样品信息 -->
<div class="tip-navigation"> <div class="tip-navigation">
<div class="tip"></div> <div class="tip"></div>
<div class="tip-title">零件样品信息</div> <div class="tip-title">件样品信息</div>
</div> </div>
<PartInfo <PartInfo
v-model="partInfoArr" v-model="partInfoArr"
...@@ -385,6 +394,7 @@ export default { ...@@ -385,6 +394,7 @@ export default {
// 零件样品信息结合 // 零件样品信息结合
partSampleInformationList: [], partSampleInformationList: [],
websock: null, websock: null,
testScenarioShow: false,
userId: '', userId: '',
standardId: '1', standardId: '1',
showTestScenario: false, showTestScenario: false,
...@@ -416,13 +426,13 @@ export default { ...@@ -416,13 +426,13 @@ export default {
// { value: 2, label: '汽车信息安全技术要求', check: false } // { value: 2, label: '汽车信息安全技术要求', check: false }
], ],
testScenarioList: [ testScenarioList: [
{ value: 0, label: '文档审核', check: false }, { value: 0, label: 'TBOX-蜂窝以太网接口', check: false },
{ value: 1, label: 'TBOX-蜂窝以太网接口', check: false }, { value: 1, label: 'WiFi AP接口', check: false },
{ value: 2, label: 'WiFi AP接口', check: false }, { value: 2, label: 'WiFi Client接口', check: false },
{ value: 3, label: 'WiFi Client接口', check: false }, { value: 3, label: '充电以太网接口', check: false },
{ value: 4, label: '充电以太网接口', check: false }, { value: 4, label: 'CAN 诊断接口(OBD)', check: false },
{ value: 5, label: 'CAN 诊断接口(OBD)', check: false }, { value: 5, label: '以太网诊断接口(OBD)', check: false },
{ value: 6, label: '以太网诊断接口(OBD)', check: false }, { value: 6, label: '车载摄像头以太网接口(无线)', check: false },
{ value: 7, label: '第三方应用软件', check: false }, { value: 7, label: '第三方应用软件', check: false },
{ value: 8, label: '远程控车应用', check: false }, { value: 8, label: '远程控车应用', check: false },
{ value: 9, label: 'USB接口', check: false }, { value: 9, label: 'USB接口', check: false },
...@@ -435,9 +445,8 @@ export default { ...@@ -435,9 +445,8 @@ export default {
{ value: 16, label: 'BLE', check: false }, { value: 16, label: 'BLE', check: false },
{ value: 17, label: 'NFC', check: false }, { value: 17, label: 'NFC', check: false },
{ value: 18, label: '射频钥匙', check: false }, { value: 18, label: '射频钥匙', check: false },
{ value: 19, label: '远程控车', check: false }, { value: 19, label: '软件升级', check: false },
{ value: 20, label: '软件升级', check: false }, { value: 20, label: 'ECU固件', check: false }
{ value: 21, label: 'ECU固件', check: false }
], ],
rules: { rules: {
testScenarioList: [ testScenarioList: [
...@@ -571,17 +580,24 @@ export default { ...@@ -571,17 +580,24 @@ export default {
}, },
'model.inspectionItemList': { 'model.inspectionItemList': {
handler(newValue, oldValue) { handler(newValue, oldValue) {
console.log('bne', newValue)
if (newValue.length > 0) { if (newValue.length > 0) {
this.$refs.form.clearValidate('inspectionItemList') this.$refs.form.clearValidate('inspectionItemList')
} else { } else {
this.$refs.form.validateField('inspectionItemList') this.$refs.form.validateField('inspectionItemList')
} }
console.log('model.inspectionItemList', newValue) console.log('model.inspectionItemList', newValue)
if (newValue.includes(2)) { if (newValue.includes('trfis')) {
this.rules.testScenarioList[0].required = true this.rules.testScenarioList[0].required = true
} else { } else {
this.rules.testScenarioList[0].required = false this.rules.testScenarioList[0].required = false
} }
this.rules.inspectionItemList[0].required = true
if (newValue.length === 1 && newValue.includes('trfis')) {
this.testScenarioShow = true
} else {
this.testScenarioShow = false
}
} }
}, },
'model.testScenarioList': { 'model.testScenarioList': {
...@@ -897,11 +913,12 @@ export default { ...@@ -897,11 +913,12 @@ export default {
).userId = '' ).userId = ''
}, },
handleInspectionItem(item) { handleInspectionItem(item) {
console.log('字典', item)
// 查看item.value在this.checkTestScenarioList里面存不存在 // 查看item.value在this.checkTestScenarioList里面存不存在
// 存在则删除 // 存在则删除
if (this.model.inspectionItemList.includes(item.value)) { if (this.model.inspectionItemList.includes(item.value)) {
this.model.inspectionItemList.splice( this.model.inspectionItemList.splice(
this.model.inspectionItemList.indexOf(item.label), this.model.inspectionItemList.indexOf(item.value),
1 1
) )
item.check = false item.check = false
...@@ -953,27 +970,49 @@ export default { ...@@ -953,27 +970,49 @@ export default {
}) })
}) })
}, },
/** handleNameChange(value) {
* 保存人员 console.log('value', value)
* @param row this.userId = value
*/ const selectData = this.userList.find(item => item.userId === value)
handleSavePeople(row) { this.tableData.forEach(data => {
const obj = this.userList.find(item => item.userId === this.userId) if (data.userId === '') {
const currentData = this.tableData.find( data.nickName = selectData.nickName
item => item.userId === row.userId data.userId = selectData.userId
) data.dept = selectData.dept
currentData.userId = this.userId }
currentData.nickName = obj.nickName })
currentData.dept = obj.dept
// 已被选择的人做禁用 // 已被选择的人做禁用
this.userList.find(item => item.userId === this.userId).disabled = true this.userList.find(item => item.userId === this.userId).disabled = true
this.userId = '' this.userId = ''
this.leaderTop() this.leaderTop()
if (this.tableData.length === 1) { if (this.tableData.length === 1) {
currentData.isLeader = 1 this.tableData[0].isLeader = 1
} else { } else {
currentData.isLeader = 0 this.tableData[this.tableData.length - 1].isLeader = 0
} }
},
/**
* 保存人员
* @param row
*/
handleSavePeople(row) {
console.log('保存小组有', row)
// const obj = this.userList.find(item => item.userId === this.userId)
// const currentData = this.tableData.find(
// item => item.userId === row.userId
// )
// currentData.userId = this.userId
// currentData.nickName = obj.nickName
// currentData.dept = obj.dept
// // 已被选择的人做禁用
// this.userList.find(item => item.userId === this.userId).disabled = true
// this.userId = ''
// this.leaderTop()
// if (this.tableData.length === 1) {
// currentData.isLeader = 1
// } else {
// currentData.isLeader = 0
// }
console.log('现在的对象', this.tableData) console.log('现在的对象', this.tableData)
}, },
/** /**
...@@ -1048,7 +1087,11 @@ export default { ...@@ -1048,7 +1087,11 @@ export default {
} }
this.taskCreateRequest.taskList = this.model.inspectionItemList this.taskCreateRequest.taskList = this.model.inspectionItemList
this.tableData.forEach(item => { this.tableData.forEach(item => {
if (item.dept !== null) {
item.deptName = item.dept.deptName item.deptName = item.dept.deptName
} else {
item.deptName = ''
}
item.name = item.nickName item.name = item.nickName
}) })
this.taskCreateRequest.auditors = this.tableData this.taskCreateRequest.auditors = this.tableData
...@@ -1190,6 +1233,7 @@ export default { ...@@ -1190,6 +1233,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.add-number { .add-number {
width: 100%; width: 100%;
margin-bottom: 18px;
} }
.global-left-margin { .global-left-margin {
padding-left: 18px; padding-left: 18px;
...@@ -1210,12 +1254,14 @@ export default { ...@@ -1210,12 +1254,14 @@ export default {
color: #1a6fd7; color: #1a6fd7;
} }
} }
.sortable-handle {
cursor: move;
}
.test-scenario-container { .test-scenario-container {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.test-scenario { .test-scenario {
width: 237px; width: 228px;
height: 32px; height: 32px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
background-color: #ffffff; background-color: #ffffff;
...@@ -1227,7 +1273,7 @@ export default { ...@@ -1227,7 +1273,7 @@ export default {
} }
} }
.check-test-scenario { .check-test-scenario {
width: 237px; width: 228px;
height: 32px; height: 32px;
border: 1px solid #1a6fd7; border: 1px solid #1a6fd7;
background-color: #e3eefc; background-color: #e3eefc;
......
...@@ -56,10 +56,7 @@ ...@@ -56,10 +56,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row <el-row v-show="testScenarioShow" :gutter="20">
v-show="model.inspectionItemList.includes('trfis')"
:gutter="20"
>
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
label="请选择测试场景(可多选)" label="请选择测试场景(可多选)"
...@@ -211,7 +208,7 @@ ...@@ -211,7 +208,7 @@
<el-table-column label="所属部门" align="left" prop="dept"> <el-table-column label="所属部门" align="left" prop="dept">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<span v-if="row.userId === ''">-</span> <span v-if="row.userId === ''">-</span>
<span v-else>{{ row.deptName }}</span> <span v-else>{{ row.deptName || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -356,13 +353,13 @@ export default { ...@@ -356,13 +353,13 @@ export default {
// { value: 2, label: '汽车信息安全技术要求', check: false } // { value: 2, label: '汽车信息安全技术要求', check: false }
], ],
testScenarioList: [ testScenarioList: [
{ value: 0, label: '文档审核', check: false }, { value: 0, label: 'TBOX-蜂窝以太网接口', check: false },
{ value: 1, label: 'TBOX-蜂窝以太网接口', check: false }, { value: 1, label: 'WiFi AP接口', check: false },
{ value: 2, label: 'WiFi AP接口', check: false }, { value: 2, label: 'WiFi Client接口', check: false },
{ value: 3, label: 'WiFi Client接口', check: false }, { value: 3, label: '充电以太网接口', check: false },
{ value: 4, label: '充电以太网接口', check: false }, { value: 4, label: 'CAN 诊断接口(OBD)', check: false },
{ value: 5, label: 'CAN 诊断接口(OBD)', check: false }, { value: 5, label: '以太网诊断接口(OBD)', check: false },
{ value: 6, label: '以太网诊断接口(OBD)', check: false }, { value: 6, label: '车载摄像头以太网接口(无线)', check: false },
{ value: 7, label: '第三方应用软件', check: false }, { value: 7, label: '第三方应用软件', check: false },
{ value: 8, label: '远程控车应用', check: false }, { value: 8, label: '远程控车应用', check: false },
{ value: 9, label: 'USB接口', check: false }, { value: 9, label: 'USB接口', check: false },
...@@ -375,9 +372,8 @@ export default { ...@@ -375,9 +372,8 @@ export default {
{ value: 16, label: 'BLE', check: false }, { value: 16, label: 'BLE', check: false },
{ value: 17, label: 'NFC', check: false }, { value: 17, label: 'NFC', check: false },
{ value: 18, label: '射频钥匙', check: false }, { value: 18, label: '射频钥匙', check: false },
{ value: 19, label: '远程控车', check: false }, { value: 19, label: '软件升级', check: false },
{ value: 20, label: '软件升级', check: false }, { value: 20, label: 'ECU固件', check: false }
{ value: 21, label: 'ECU固件', check: false }
], ],
rules: { rules: {
testScenarioList: [ testScenarioList: [
...@@ -495,7 +491,8 @@ export default { ...@@ -495,7 +491,8 @@ export default {
} }
], ],
// 任务详情 // 任务详情
taskDetail: {} taskDetail: {},
testScenarioShow: false
} }
}, },
watch: { watch: {
...@@ -583,17 +580,31 @@ export default { ...@@ -583,17 +580,31 @@ export default {
// 小组信息 // 小组信息
this.tableData = this.taskDetail.auditors this.tableData = this.taskDetail.auditors
// 整车样品信息 // 整车样品信息
if (this.taskDetail.completeVehicleSample !== null) {
this.carInfoArr = this.taskDetail.completeVehicleSample this.carInfoArr = this.taskDetail.completeVehicleSample
this.carInfoArr.forEach(item => { this.carInfoArr.forEach(item => {
item.sampleId = item.id item.sampleId = item.id
item.flag = 0 item.flag = 0
}) })
}
// 零件样品信息 // 零件样品信息
if (this.taskDetail.partVehicleSample !== null) {
this.partInfoArr = this.taskDetail.partVehicleSample this.partInfoArr = this.taskDetail.partVehicleSample
this.partInfoArr.forEach(item => { this.partInfoArr.forEach(item => {
item.sampleId = item.id item.sampleId = item.id
item.flag = 1 item.flag = 1
}) })
}
if (
this.taskDetail.taskList.split(',').length === 1 &&
this.taskDetail.taskList.split(',').includes('trfis')
) {
this.testScenarioShow = true
} else {
this.testScenarioShow = false
}
console.log('哈哈哈', this.testScenarioShow)
console.log('零件样品信息', this.partInfoArr) console.log('零件样品信息', this.partInfoArr)
console.log('model', this.model) console.log('model', this.model)
}) })
...@@ -811,7 +822,7 @@ export default { ...@@ -811,7 +822,7 @@ export default {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.test-scenario { .test-scenario {
width: 237px; width: 228px;
height: 32px; height: 32px;
border: 1px solid #dcdfe6; border: 1px solid #dcdfe6;
background-color: #ffffff; background-color: #ffffff;
...@@ -823,7 +834,7 @@ export default { ...@@ -823,7 +834,7 @@ export default {
} }
} }
.check-test-scenario { .check-test-scenario {
width: 237px; width: 228px;
height: 32px; height: 32px;
border: 1px solid #1a6fd7; border: 1px solid #1a6fd7;
background-color: #e3eefc; background-color: #e3eefc;
......
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