Commit 8c3e0824 authored by 盖献康's avatar 盖献康

Merge branch 'develop' of http://gitlab.91isoft.com:90/car-test/web into developer/gaixiankang

parents 6bdbc1da 791db1d2
...@@ -21,12 +21,14 @@ const standard = { ...@@ -21,12 +21,14 @@ const standard = {
}, },
setStandardList({ commit }, name) { setStandardList({ commit }, name) {
getStandardList({ getStandardList({
name: name ? name : '', keyWord: name ? name : '',
pageNum: 1, pageNum: 1,
pageSize: 9999 pageSize: 9999
}).then(res => { }).then(res => {
if (res.code === 200) { if (res.code === 200) {
standard.state.standard = res.rows[0].id if (res.rows.length) {
standard.state.standard = res.rows[0].id
}
commit('SET_STANDARD_LIST', res.rows) commit('SET_STANDARD_LIST', res.rows)
} }
}) })
......
...@@ -185,14 +185,16 @@ ...@@ -185,14 +185,16 @@
type="primary" type="primary"
plain plain
size="mini" size="mini"
@click="downloadPdf(item.id)" @click="goNext('/processing/report?id=' + item.id + '&type=0')"
>报告</el-button >报告</el-button
> >
<el-button <el-button
type="primary" type="primary"
plain plain
size="mini" size="mini"
@click="goNext('/processing/retention-file?id=' + item.id)" @click="
goNext('/processing/retention-file?id=' + item.id + '&type=1')
"
>企业留档文件</el-button >企业留档文件</el-button
> >
<el-button <el-button
...@@ -271,47 +273,6 @@ export default { ...@@ -271,47 +273,6 @@ export default {
this.$store.dispatch('standard/setStandardList') this.$store.dispatch('standard/setStandardList')
}, },
methods: { methods: {
/**
* 检验报告
*/
downloadPdf(id) {
pdfDownload({
taskId: id,
type: 0
}).then(res => {
const fileUrl =
process.env.VUE_APP_IMAGE_API +
'/vehicle-quality-review-oss/' +
res.data
this.download(fileUrl)
})
},
/**
* 下载pdf
*/
download(fileUrl) {
// 根据pdf文件地址下载
// window.location.href = this.fileUrl
const xhr = new XMLHttpRequest()
xhr.open('GET', fileUrl, true)
xhr.responseType = 'blob'
xhr.onload = () => {
if (xhr.status === 200) {
const blob = new Blob([xhr.response], { type: 'application/pdf' })
const url = URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '检查报告.pdf'
link.click()
URL.revokeObjectURL(url)
}
}
xhr.send()
},
/* 跳转到问卷详情*/ /* 跳转到问卷详情*/
goNext(url) { goNext(url) {
this.$router.push({ path: url }) this.$router.push({ path: url })
......
...@@ -230,9 +230,12 @@ ...@@ -230,9 +230,12 @@
<div class="img-label" style="margin-top: 20px">选择测试场景</div> <div class="img-label" style="margin-top: 20px">选择测试场景</div>
</div> </div>
<!-- 测试场景 --> <!-- 测试场景 -->
<div class="test-scenario-container"> <div
v-if="model.testScenarioList.length > 0"
class="test-scenario-container"
>
<div <div
v-for="(item, index) in testScenarioList" v-for="(item, index) in model.testScenarioList"
:key="index" :key="index"
:class="{ :class="{
'test-scenario': item.check === false, 'test-scenario': item.check === false,
...@@ -242,7 +245,6 @@ ...@@ -242,7 +245,6 @@
> >
<div>{{ item.label }}</div> <div>{{ item.label }}</div>
</div> </div>
<!-- </div> -->
</div> </div>
</div> </div>
<!--签字确认--> <!--签字确认-->
...@@ -319,36 +321,13 @@ export default { ...@@ -319,36 +321,13 @@ export default {
return { return {
isShow: true, isShow: true,
task: {}, task: {},
auditRequirement: 0,
testScenarioList: [
{ value: 0, label: 'TBOX-蜂窝以太网接口', check: false },
{ value: 1, label: 'WiFi AP接口', check: false },
{ value: 2, label: 'WiFi Client接口', check: false },
{ value: 3, label: '充电以太网接口', check: false },
{ value: 4, label: 'CAN 诊断接口(OBD)', check: false },
{ value: 5, label: '以太网诊断接口(OBD)', check: false },
{ value: 6, label: '车载摄像头以太网接口(无线)', check: false },
{ value: 7, label: '第三方应用软件', check: false },
{ value: 8, label: '远程控车应用', check: false },
{ value: 9, label: 'USB接口', check: false },
{ value: 10, label: 'XCB标定', check: false },
{ value: 11, label: 'CCP标定', check: false },
{ value: 12, label: '安全启动', check: false },
{ value: 13, label: '远程控车', check: false },
{ value: 14, label: 'V2X', check: false },
{ value: 15, label: 'BT', check: false },
{ value: 16, label: 'BLE', check: false },
{ value: 17, label: 'NFC', check: false },
{ value: 18, label: '射频钥匙', check: false },
{ value: 19, label: '软件升级', check: false },
{ value: 20, label: 'ECU固体', check: false }
],
checkTestScenarioList: [],
model: { model: {
carReviewTask: {}, carReviewTask: {},
reviewSceneChangeTasks: {}, reviewSceneChangeTasks: {},
detailsList: [] detailsList: [],
testScenarioList: []
}, },
selectedScenario: [],
columns: [], columns: [],
ruleForm: { ruleForm: {
enterpriseLeader: '', enterpriseLeader: '',
...@@ -400,6 +379,16 @@ export default { ...@@ -400,6 +379,16 @@ export default {
? process.env.VUE_APP_IMAGE_API + imgs[1] ? process.env.VUE_APP_IMAGE_API + imgs[1]
: '' : ''
} }
if (this.model.testScenarioList.length > 0) {
this.model.testScenarioList = this.model.testScenarioList.map(
({ id, testScenario, ...rest }) => ({
label: testScenario,
value: parseInt(id),
check: false,
...rest
})
)
}
} else { } else {
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
} }
...@@ -433,6 +422,7 @@ export default { ...@@ -433,6 +422,7 @@ export default {
], ],
taskId: this.taskId taskId: this.taskId
} }
formData.testScenarioList = this.selectedScenario
carTaskSubmit(formData).then(res => { carTaskSubmit(formData).then(res => {
if (res.code === 200) { if (res.code === 200) {
this.$modal.msgSuccess('确认提交成功') this.$modal.msgSuccess('确认提交成功')
...@@ -444,21 +434,17 @@ export default { ...@@ -444,21 +434,17 @@ export default {
} }
}) })
}, },
handleTestScenario(item) { handleTestScenario(item) {
// 查看item.value在this.checkTestScenarioList里面存不存在 if (this.selectedScenario.includes(item.value)) {
// 存在则删除 this.selectedScenario.splice(
if (this.checkTestScenarioList.includes(item.value)) { this.selectedScenario.indexOf(item.value),
this.checkTestScenarioList.splice(
this.checkTestScenarioList.indexOf(item.label),
1 1
) )
item.check = false item.check = false
} else { } else {
item.check = true item.check = true
this.checkTestScenarioList.push(item.value) this.selectedScenario.push(item.value)
} }
console.log('李斯特', this.checkTestScenarioList)
}, },
openAll() { openAll() {
this.activeNames = this.model.carReviewTask.standard.map(i => { this.activeNames = this.model.carReviewTask.standard.map(i => {
......
...@@ -160,7 +160,8 @@ ...@@ -160,7 +160,8 @@
@click=" @click="
goNext( goNext(
'/processing/carReview/source-record?id=' + '/processing/carReview/source-record?id=' +
item.carReviewTaskId item.carReviewTaskId +
'&type=1'
) )
" "
>车型审查原始记录</el-button >车型审查原始记录</el-button
...@@ -183,14 +184,16 @@ ...@@ -183,14 +184,16 @@
type="primary" type="primary"
plain plain
size="mini" size="mini"
@click="downloadPdf(item.id)" @click="goNext('/processing/report?id=' + item.id + '&type=0')"
>报告</el-button >报告</el-button
> >
<el-button <el-button
type="primary" type="primary"
plain plain
size="mini" size="mini"
@click="goNext('/processing/retention-file?id=' + item.id)" @click="
goNext('/processing/retention-file?id=' + item.id + '&type=1')
"
>企业留档文件</el-button >企业留档文件</el-button
> >
<el-button <el-button
...@@ -241,18 +244,7 @@ export default { ...@@ -241,18 +244,7 @@ export default {
/** /**
* 检验报告 * 检验报告
*/ */
downloadPdf(id) { downloadPdf(id) {},
pdfDownload({
taskId: id,
type: 0
}).then(res => {
const fileUrl =
process.env.VUE_APP_IMAGE_API +
'/vehicle-quality-review-oss/' +
res.data
this.download(fileUrl)
})
},
/** /**
* 下载pdf * 下载pdf
*/ */
...@@ -270,7 +262,7 @@ export default { ...@@ -270,7 +262,7 @@ export default {
const link = document.createElement('a') const link = document.createElement('a')
link.href = url link.href = url
link.download = '检报告.pdf' link.download = '检报告.pdf'
link.click() link.click()
URL.revokeObjectURL(url) URL.revokeObjectURL(url)
......
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
pdfDownload({ pdfDownload({
taskId: this.$route.query.id, taskId: this.$route.query.id,
type: 1 type: this.$route.query.type
}).then(res => { }).then(res => {
this.fileUrl = this.fileUrl =
process.env.VUE_APP_IMAGE_API + process.env.VUE_APP_IMAGE_API +
...@@ -109,9 +109,9 @@ export default { ...@@ -109,9 +109,9 @@ export default {
const link = document.createElement('a') const link = document.createElement('a')
link.href = url link.href = url
link.download = '企业留档文件.pdf' link.download =
this.$route.query.type === 1 ? '企业留档文件.pdf' : '检验报告.pdf'
link.click() link.click()
URL.revokeObjectURL(url) URL.revokeObjectURL(url)
} }
} }
......
...@@ -214,7 +214,14 @@ ...@@ -214,7 +214,14 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog
:title="title"
:visible.sync="open"
width="500px"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="参数名称" prop="configName"> <el-form-item label="参数名称" prop="configName">
<el-input v-model="form.configName" placeholder="请输入参数名称" /> <el-input v-model="form.configName" placeholder="请输入参数名称" />
......
...@@ -145,7 +145,14 @@ ...@@ -145,7 +145,14 @@
</el-table> </el-table>
<!-- 添加或修改部门对话框 --> <!-- 添加或修改部门对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> <el-dialog
:title="title"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="open"
width="600px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col v-if="form.parentId !== 0" :span="24"> <el-col v-if="form.parentId !== 0" :span="24">
......
...@@ -204,7 +204,14 @@ ...@@ -204,7 +204,14 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog
:title="title"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="open"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型"> <el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" /> <el-input v-model="form.dictType" :disabled="true" />
......
...@@ -217,7 +217,14 @@ ...@@ -217,7 +217,14 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog
:title="title"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="open"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName"> <el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入字典名称" /> <el-input v-model="form.dictName" placeholder="请输入字典名称" />
......
...@@ -157,7 +157,14 @@ ...@@ -157,7 +157,14 @@
</el-table> </el-table>
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body> <el-dialog
:title="title"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="open"
width="680px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
......
...@@ -183,7 +183,14 @@ ...@@ -183,7 +183,14 @@
/> />
<!-- 添加或修改公告对话框 --> <!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog
:title="title"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="open"
width="780px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
......
...@@ -169,7 +169,14 @@ ...@@ -169,7 +169,14 @@
/> />
<!-- 添加或修改岗位对话框 --> <!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog
:title="title"
:visible.sync="open"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="postName"> <el-form-item label="岗位名称" prop="postName">
<el-input v-model="form.postName" placeholder="请输入岗位名称" /> <el-input v-model="form.postName" placeholder="请输入岗位名称" />
......
...@@ -224,7 +224,14 @@ ...@@ -224,7 +224,14 @@
/> />
<!-- 添加或修改角色配置对话框 --> <!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog
:title="title"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="open"
width="500px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="角色名称" prop="roleName"> <el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入角色名称" /> <el-input v-model="form.roleName" placeholder="请输入角色名称" />
...@@ -303,6 +310,8 @@ ...@@ -303,6 +310,8 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openDataScope" :visible.sync="openDataScope"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="500px" width="500px"
append-to-body append-to-body
> >
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
<el-dialog <el-dialog
title="选择用户" title="选择用户"
:visible.sync="visible" :visible.sync="visible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="800px" width="800px"
top="5vh" top="5vh"
append-to-body append-to-body
......
...@@ -448,14 +448,16 @@ ...@@ -448,14 +448,16 @@
type="primary" type="primary"
plain plain
size="mini" size="mini"
@click="downloadPdf(item.id)" @click="goNext('/processing/report?id=' + item.id + '&type=0')"
>报告</el-button >报告</el-button
> >
<el-button <el-button
type="primary" type="primary"
plain plain
size="mini" size="mini"
@click="goNext('/processing/retention-file?id=' + item.id)" @click="
goNext('/processing/retention-file?id=' + item.id + '&type=1')
"
>企业留档文件</el-button >企业留档文件</el-button
> >
<el-button <el-button
...@@ -541,21 +543,6 @@ export default { ...@@ -541,21 +543,6 @@ export default {
this.$store.dispatch('standard/setStandardList') this.$store.dispatch('standard/setStandardList')
}, },
methods: { methods: {
/**
* 检验报告
*/
downloadPdf(id) {
pdfDownload({
taskId: id,
type: 0
}).then(res => {
const fileUrl =
process.env.VUE_APP_IMAGE_API +
'/vehicle-quality-review-oss/' +
res.data
this.download(fileUrl)
})
},
/** /**
* 下载pdf * 下载pdf
*/ */
...@@ -573,7 +560,7 @@ export default { ...@@ -573,7 +560,7 @@ export default {
const link = document.createElement('a') const link = document.createElement('a')
link.href = url link.href = url
link.download = '检报告.pdf' link.download = '检报告.pdf'
link.click() link.click()
URL.revokeObjectURL(url) URL.revokeObjectURL(url)
......
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