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

feat: 修改计划创建展示注释和提示

parent c6bb5d3a
......@@ -23,54 +23,37 @@
@input="input"
>
</el-input>
<div
style="width: 20rem; display: inline-block; vertical-align: middle"
>
{{ i.object }}
</div>
<el-upload
class="upload-demo"
ref="fileUpload"
:action="uploadImgUrl"
:on-preview="handlePreview"
v-model="i.file"
:on-remove="handleRemove"
accept=".pdf ,.doc ,.docx ,.xls, .xlsx"
:before-remove="beforeRemove"
:show-file-list="false"
:limit="1"
:on-success="
res => {
handleSuccess(res, i)
}
"
:on-exceed="handleExceed"
:headers="headers"
>、
<!-- <el-button
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
>
<div slot="tip" class="el-upload__tip">
<div v-if="i.path">
<el-link :href="i.path">{{ i.file_name }}</el-link>
</div>
</div>
</el-upload>
</div>
</div>
<el-upload
class="upload-demo"
ref="fileUpload"
:action="uploadImgUrl"
:on-preview="handlePreview"
v-model="model.file"
:on-remove="handleRemove"
accept=".pdf ,.doc ,.docx ,.xls, .xlsx"
:before-remove="beforeRemove"
:show-file-list="false"
:limit="1"
:on-success="handleSuccess"
:on-exceed="handleExceed"
:headers="headers"
>
<el-button size="small" :disabled="status" type="primary"
>上传文件</el-button
>
<div slot="tip" class="el-upload__tip">
<div v-if="model.path">
<el-link :href="model.path">{{ model.name }}</el-link>
</div>
</div>
</el-upload>
</div>
</template>
<script>
......@@ -100,9 +83,11 @@ export default {
return {
model: {
value: '',
list: []
list: [],
file: '',
path: '',
name: ''
},
loading: false,
headers: {
Authorization: 'Bearer ' + this.$store.getters.token
},
......@@ -152,7 +137,6 @@ export default {
}
})
this.model.value = old
this.input()
},
removeItem(array, item) {
......@@ -189,9 +173,6 @@ export default {
value: '',
check: false,
useCaseNo: i.useCaseNo,
path: '',
file: '',
file_name: '',
key: i.value,
id: i.id,
flag: i.flag
......@@ -203,18 +184,13 @@ export default {
},
handlePreview(file) {
console.log(file)
this.loading = true
},
handleSuccess(res, item) {
console.log(res, item)
handleSuccess(res, file) {
if (res.code === 200) {
this.loading = false
// const item = this.model.list[k]
item.path = process.env.VUE_APP_IMAGE_API + res.url
item.file_name = res.originalFilename
this.model.path = process.env.VUE_APP_IMAGE_API + res.url
this.model.name = res.originalFilename
this.$refs.fileUpload.clearFiles()
this.$message.success('上传成功')
this.$forceUpdate()
} else {
this.$message.error('error')
}
......
<template>
<el-form ref="queryForm" :model="form" class="formClass">
<div class="btn-group">
<el-button type="primary" style="margin-right: 20px"
>下载所有模板</el-button
>
<el-radio-group v-model="merge">
<el-radio-button :label="true">强关联选择对象 </el-radio-button>
<el-radio-button :label="false">自主选择对象</el-radio-button>
......@@ -20,18 +23,18 @@
>
不适用
</el-checkbox>
<span v-if="index == 0">
<span v-if="item.notApplicable">
<el-tooltip
class="box-item circle"
effect="dark"
content=''
placement="top"
style="border-radius: 100px;margin-left: 20px;"
>
<i class="el-icon-question smartTip"></i>
<div style="width: 250px;" slot="content" class="tip">
远控系统所在ECU若包含功能选项需做备注,若远控系统为TBOX则根据车辆情况勾选蜂窝网络与固件选项,若远控系统为车机与TBOX二合一系统,则根据车辆情况勾选蜂窝网络、固件、WIFI AP 、WIFI client选项
</div>
class="box-item circle"
effect="dark"
content=""
placement="top"
style="border-radius: 100px; margin-left: 20px"
>
<i class="el-icon-question smartTip"></i>
<div style="width: 250px" slot="content" class="tip">
{{ item.notApplicable }}
</div>
</el-tooltip>
</span>
</div>
......@@ -64,9 +67,12 @@
@makeRecord="makeRecord"
ref="formItem"
>
</component>
</component>
</el-form-item>
<div class="desc" v-if="item.remark">
{{ item.remark }}
</div>
<!-- <div class="desc">12334</div> -->
</div>
</div>
</el-col>
......@@ -202,8 +208,8 @@ export default {
</script>
<style lang="scss" scoped>
.circle {
fill: #456BD9;
stroke: #0F1C3F;
fill: #456bd9;
stroke: #0f1c3f;
stroke-width: 0.1875em;
padding: 6px 10px;
color: gray;
......@@ -253,8 +259,14 @@ export default {
display: flex;
justify-content: flex-end;
}
.tip{
.tip {
letter-spacing: 2px;
text-align: justify;
}
.desc {
color: red;
margin-top: 10px;
font-size: 14px;
font-weight: 800;
}
</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