This commit is contained in:
yanran200730
2022-04-06 11:59:14 +08:00
parent 7c413fa9b2
commit e67d711db3
6 changed files with 397 additions and 1099 deletions

View File

@@ -1,59 +1,57 @@
<template>
<div class="attachment-material">
<ai-card title="附件材料">
<template #right>
<ai-title title="附件材料">
<template slot="rightBtn">
<span class="iconfont iconAdd rightBtn"></span>
<span class="rightBtn" style="margin-left: 8px;" @click="dialog=true">新增行数</span>
</template>
<template #content>
<el-table
:data="materialList"
stripe
style="width: 100%"
header-cell-class-name="table-header"
align="center"
empty-text="材料列表信息为空点击标题右侧添加按钮进行添加"
>
<el-table-column align="left" prop="annexName" label="材料名称" width="280">
<template slot-scope="scope">
<div class="table-border">{{ scope.row.annexName }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="exampleFileId" label="样例">
<template slot-scope="{row}">
<el-upload action :on-exceed="list=>handleUpload({file:list[0]}).then(v=>row.exampleFileId=v)"
:http-request="args=>handleUpload(args).then(v=>row.exampleFileId=v)" :limit="1" accept=".jpg,.png">
<el-button style="width: 102px">{{ row.exampleFileId ? '重新选择图片' : '选择图片文件' }}</el-button>
</el-upload>
</template>
</el-table-column>
<el-table-column align="center" prop="emptyFileId" label="空表">
<template slot-scope="{row}">
<el-upload action :on-exceed="list=>handleUpload({file:list[0]}).then(v=>row.emptyFileId=v)"
:http-request="args=>handleUpload(args).then(v=>row.emptyFileId=v)" :limit="1" accept=".doc,.docx">
<el-button style="width: 102px">{{ row.emptyFileId ? '重新选择word' : '选择word文件' }}</el-button>
</el-upload>
</template>
</el-table-column>
<el-table-column align="center" prop="name" label="是否必填">
<template slot-scope="scope">
<el-switch
v-model="scope.row.mustFill"
active-value="1" inactive-value="0"
active-color="#5088FF"
inactive-color="#D0D4DC">
</el-switch>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<span class="iconfont iconEdit icon-color89B" title="编辑" @click="editInfo(scope.$index)" style="margin-right: 10px;"/>
<span class="iconfont iconDelete icon-color89B" title="删除" @click="deleteInfo(scope.$index)"/>
</template>
</el-table-column>
</el-table>
</template>
</ai-card>
</ai-title>
<el-table
:data="materialList"
stripe
style="width: 100%"
header-cell-class-name="table-header"
align="center"
empty-text="材料列表信息为空点击标题右侧添加按钮进行添加"
>
<el-table-column align="left" prop="annexName" label="材料名称" width="280">
<template slot-scope="scope">
<div class="table-border">{{ scope.row.annexName }}</div>
</template>
</el-table-column>
<el-table-column align="center" prop="exampleFileId" label="样例">
<template slot-scope="{row}">
<el-upload action :on-exceed="list=>handleUpload({file:list[0]}).then(v=>row.exampleFileId=v)"
:http-request="args=>handleUpload(args).then(v=>row.exampleFileId=v)" :limit="1" accept=".jpg,.png">
<el-button style="width: 102px">{{ row.exampleFileId ? '重新选择图片' : '选择图片文件' }}</el-button>
</el-upload>
</template>
</el-table-column>
<el-table-column align="center" prop="emptyFileId" label="空表">
<template slot-scope="{row}">
<el-upload action :on-exceed="list=>handleUpload({file:list[0]}).then(v=>row.emptyFileId=v)"
:http-request="args=>handleUpload(args).then(v=>row.emptyFileId=v)" :limit="1" accept=".doc,.docx">
<el-button style="width: 102px">{{ row.emptyFileId ? '重新选择word' : '选择word文件' }}</el-button>
</el-upload>
</template>
</el-table-column>
<el-table-column align="center" prop="name" label="是否必填">
<template slot-scope="scope">
<el-switch
v-model="scope.row.mustFill"
active-value="0" inactive-value="1"
active-color="#D0D4DC"
inactive-color="#5088FF">
</el-switch>
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<span class="iconfont iconEdit icon-color89B" title="编辑" @click="editInfo(scope.$index)" style="margin-right: 10px;"/>
<span class="iconfont iconDelete icon-color89B" title="删除" @click="deleteInfo(scope.$index)"/>
</template>
</el-table-column>
</el-table>
<ai-dialog
title="添加附件材料"
:visible.sync="dialog"