Commit 3604e1ee authored by zhang's avatar zhang
parents 34fd5282 ceb3d49f
...@@ -101,6 +101,7 @@ export default { ...@@ -101,6 +101,7 @@ export default {
} }
}) })
this.model.value = old this.model.value = old
this.input()
}, },
removeItem(array, item) { removeItem(array, item) {
let arr = [] let arr = []
......
...@@ -23,55 +23,38 @@ ...@@ -23,55 +23,38 @@
@input="input" @input="input"
> >
</el-input> </el-input>
<div <div
style="width: 20rem; display: inline-block; vertical-align: middle" style="width: 20rem; display: inline-block; vertical-align: middle"
> >
{{ i.object }} {{ i.object }}
</div> </div>
</div>
</div>
<el-upload <el-upload
class="upload-demo" class="upload-demo"
ref="fileUpload" ref="fileUpload"
:action="uploadImgUrl" :action="uploadImgUrl"
:on-preview="handlePreview" :on-preview="handlePreview"
v-model="i.file" v-model="model.file"
:on-remove="handleRemove" :on-remove="handleRemove"
accept=".pdf ,.doc ,.docx ,.xls, .xlsx" accept=".pdf ,.doc ,.docx ,.xls, .xlsx"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
:on-success=" :on-success="handleSuccess"
res => {
handleSuccess(res, i)
}
"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
>、 >
<!-- <el-button <el-button size="small" :disabled="status" type="primary"
size="small"
v-if="i.path"
v-loading="loading"
:disabled="status"
type="primary"
>{{ i.file_name }}</el-button
> -->
<el-button
size="small"
v-loading="loading"
:disabled="status"
type="primary"
>上传文件</el-button >上传文件</el-button
> >
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
<div v-if="i.path"> <div v-if="model.path">
<el-link :href="i.path">{{ i.file_name }}</el-link> <el-link :href="model.path">{{ model.name }}</el-link>
</div> </div>
</div> </div>
</el-upload> </el-upload>
</div> </div>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
...@@ -100,9 +83,11 @@ export default { ...@@ -100,9 +83,11 @@ export default {
return { return {
model: { model: {
value: '', value: '',
list: [] list: [],
file: '',
path: '',
name: ''
}, },
loading: false,
headers: { headers: {
Authorization: 'Bearer ' + this.$store.getters.token Authorization: 'Bearer ' + this.$store.getters.token
}, },
...@@ -152,6 +137,7 @@ export default { ...@@ -152,6 +137,7 @@ export default {
} }
}) })
this.model.value = old this.model.value = old
this.input()
}, },
removeItem(array, item) { removeItem(array, item) {
let arr = [] let arr = []
...@@ -187,9 +173,6 @@ export default { ...@@ -187,9 +173,6 @@ export default {
value: '', value: '',
check: false, check: false,
useCaseNo: i.useCaseNo, useCaseNo: i.useCaseNo,
path: '',
file: '',
file_name: '',
key: i.value, key: i.value,
id: i.id, id: i.id,
flag: i.flag flag: i.flag
...@@ -201,18 +184,13 @@ export default { ...@@ -201,18 +184,13 @@ export default {
}, },
handlePreview(file) { handlePreview(file) {
console.log(file) console.log(file)
this.loading = true
}, },
handleSuccess(res, item) { handleSuccess(res, file) {
console.log(res, item)
if (res.code === 200) { if (res.code === 200) {
this.loading = false this.model.path = process.env.VUE_APP_IMAGE_API + res.url
// const item = this.model.list[k] this.model.name = res.originalFilename
item.path = process.env.VUE_APP_IMAGE_API + res.url this.$refs.fileUpload.clearFiles()
item.file_name = res.originalFilename
this.$message.success('上传成功') this.$message.success('上传成功')
this.$forceUpdate()
} else { } else {
this.$message.error('error') this.$message.error('error')
} }
......
<template> <template>
<div> <div>
<div v-if="prop =='chcek9'" style="display: inline flex;"> <div v-if="prop == 'chcek9'" style="display: inline flex">
<span>关键配置参数:</span> <span>关键配置参数:</span>
<el-checkbox-group v-model="value" :disabled="status" @change="input"> <el-checkbox-group v-model="value" :disabled="status" @change="input">
<el-checkbox <el-checkbox
v-for="(i, k) in items.options" v-for="(i, k) in items.options"
v-if="k<4" v-if="k < 4"
:label="i.id" :label="i.id"
@change=" @change="
e => { e => {
...@@ -20,13 +20,12 @@ ...@@ -20,13 +20,12 @@
<span></span> <span></span>
</div> </div>
<div v-if="prop == 'chcek9'" style="display: inline flex">
<div v-if="prop =='chcek9'" style="display: inline flex;">
<span>标定参数:</span> <span>标定参数:</span>
<el-checkbox-group v-model="value" :disabled="status" @change="input"> <el-checkbox-group v-model="value" :disabled="status" @change="input">
<el-checkbox <el-checkbox
v-for="(i, k) in items.options" v-for="(i, k) in items.options"
v-if="k>=4" v-if="k >= 4"
:label="i.id" :label="i.id"
@change=" @change="
e => { e => {
...@@ -38,8 +37,13 @@ ...@@ -38,8 +37,13 @@
{{ i.object }} {{ i.object }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
<el-checkbox-group v-if="prop!='chcek9'" v-model="value" :disabled="status" @change="input"> <el-checkbox-group
v-if="prop != 'chcek9'"
v-model="value"
:disabled="status"
@change="input"
>
<el-checkbox <el-checkbox
v-for="(i, k) in items.options" v-for="(i, k) in items.options"
:label="i.id" :label="i.id"
...@@ -53,7 +57,7 @@ ...@@ -53,7 +57,7 @@
{{ i.object }} {{ i.object }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
...@@ -125,6 +129,7 @@ export default { ...@@ -125,6 +129,7 @@ export default {
}) })
this.value = old this.value = old
this.input()
}, },
removeItem(array, item) { removeItem(array, item) {
...@@ -145,9 +150,8 @@ export default { ...@@ -145,9 +150,8 @@ export default {
}) })
} }
}, },
input(val) { input() {
let arr = [] let arr = []
let datas = []
this.items.options.map(i => { this.items.options.map(i => {
if (this.value.includes(i.id)) { if (this.value.includes(i.id)) {
arr.push(i.useCaseNo) arr.push(i.useCaseNo)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
:limit="1" :limit="1"
ref="fileUpload" ref="fileUpload"
:on-success="handleSuccess" :on-success="handleSuccess"
accept=".pdf" accept=".pdf ,.doc ,.docx ,.xls, .xlsx"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
> >
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
} }
}) })
this.model.value = old this.model.value = old
this.input()
}, },
removeItem(array, item) { removeItem(array, item) {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
accept=".pdf" accept=".pdf ,.doc ,.docx ,.xls, .xlsx"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
:before-remove="beforeRemove" :before-remove="beforeRemove"
:show-file-list="false" :show-file-list="false"
:limit="1" :limit="1"
accept=".pdf" accept=".pdf ,.doc ,.docx ,.xls, .xlsx"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:headers="headers" :headers="headers"
......
<template> <template>
<el-form ref="queryForm" :model="form" class="formClass"> <el-form ref="queryForm" :model="form" class="formClass">
<div class="btn-group"> <div class="btn-group">
<el-button
type="primary"
@click="handleDownload"
style="margin-right: 20px"
>下载所有模板</el-button
>
<el-radio-group v-model="merge"> <el-radio-group v-model="merge">
<el-radio-button :label="true">强关联选择对象 </el-radio-button> <el-radio-button :label="true">强关联选择对象 </el-radio-button>
<el-radio-button :label="false">自主选择对象</el-radio-button> <el-radio-button :label="false">自主选择对象</el-radio-button>
...@@ -20,17 +26,17 @@ ...@@ -20,17 +26,17 @@
> >
不适用 不适用
</el-checkbox> </el-checkbox>
<span v-if="index == 0"> <span v-if="item.notApplicable">
<el-tooltip <el-tooltip
class="box-item circle" class="box-item circle"
effect="dark" effect="dark"
content='' content=""
placement="top" placement="top"
style="border-radius: 100px;margin-left: 20px;" style="border-radius: 100px; margin-left: 20px"
> >
<i class="el-icon-question smartTip"></i> <i class="el-icon-question smartTip"></i>
<div style="width: 250px;" slot="content" class="tip"> <div style="width: 250px" slot="content" class="tip">
远控系统所在ECU若包含功能选项需做备注,若远控系统为TBOX则根据车辆情况勾选蜂窝网络与固件选项,若远控系统为车机与TBOX二合一系统,则根据车辆情况勾选蜂窝网络、固件、WIFI AP 、WIFI client选项 {{ item.notApplicable }}
</div> </div>
</el-tooltip> </el-tooltip>
</span> </span>
...@@ -65,8 +71,11 @@ ...@@ -65,8 +71,11 @@
ref="formItem" ref="formItem"
> >
</component> </component>
</el-form-item> </el-form-item>
<div class="desc" v-if="item.remark">
{{ item.remark }}
</div>
<!-- <div class="desc">12334</div> -->
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -129,6 +138,10 @@ export default { ...@@ -129,6 +138,10 @@ export default {
}) })
}, },
methods: { methods: {
handleDownload() {
location.href = 'https://10.12.48.78/vehicle-quality-review-oss/2024/10/17/SchemeTemplate.zip'
},
handleCilck(key) { handleCilck(key) {
this.$refs.queryForm.clearValidate(key) this.$refs.queryForm.clearValidate(key)
}, },
...@@ -202,8 +215,8 @@ export default { ...@@ -202,8 +215,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.circle { .circle {
fill: #456BD9; fill: #456bd9;
stroke: #0F1C3F; stroke: #0f1c3f;
stroke-width: 0.1875em; stroke-width: 0.1875em;
padding: 6px 10px; padding: 6px 10px;
color: gray; color: gray;
...@@ -253,8 +266,14 @@ export default { ...@@ -253,8 +266,14 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
} }
.tip{ .tip {
letter-spacing: 2px; letter-spacing: 2px;
text-align: justify; text-align: justify;
} }
.desc {
color: red;
margin-top: 10px;
font-size: 14px;
font-weight: 800;
}
</style> </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