|
@@ -17,6 +17,7 @@
|
|
|
<el-row>
|
|
|
<el-col
|
|
|
v-for="(item, index) in ruleList"
|
|
|
+ :key="index"
|
|
|
:span="item.span ? item.span : 12"
|
|
|
><el-form-item :label="item.label" :prop="item.prop">
|
|
|
<el-select
|
|
@@ -27,7 +28,7 @@
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="items in options1"
|
|
|
- :key="item.value"
|
|
|
+ :key="items.value"
|
|
|
:label="items.text"
|
|
|
:value="items.value"
|
|
|
>
|
|
@@ -41,7 +42,7 @@
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="items in options2"
|
|
|
- :key="item.value"
|
|
|
+ :key="items.value"
|
|
|
:label="items.text"
|
|
|
:value="items.value"
|
|
|
>
|
|
@@ -51,9 +52,12 @@
|
|
|
v-model="ruleForm[item.prop]"
|
|
|
v-else-if="item.scope === 'options'"
|
|
|
>
|
|
|
- <el-radio v-for="items in item.options" :label="items.value">{{
|
|
|
- items.label
|
|
|
- }}</el-radio>
|
|
|
+ <el-radio
|
|
|
+ v-for="(items, indexs) in item.options"
|
|
|
+ :key="indexs"
|
|
|
+ :label="items.value"
|
|
|
+ >{{ items.label }}</el-radio
|
|
|
+ >
|
|
|
</el-radio-group>
|
|
|
|
|
|
<el-date-picker
|
|
@@ -78,13 +82,16 @@
|
|
|
:href="$methods.splitImgHost(ruleForm.FilePath)"
|
|
|
target="_blank"
|
|
|
class="file_style"
|
|
|
- >点击查看文件</a
|
|
|
+ >已上传(点击可查看下载)</a
|
|
|
>
|
|
|
<label for="uploads" style="vertical-align: text-bottom"
|
|
|
><span class="btn">{{
|
|
|
ruleForm[item.prop] ? "更换文件" : "上传文件"
|
|
|
}}</span></label
|
|
|
>
|
|
|
+ <span style="margin-left: 20px; color: red"
|
|
|
+ >(支持所有办公文件格式,多个文件请使用压缩包格式上传)</span
|
|
|
+ >
|
|
|
<input
|
|
|
type="file"
|
|
|
id="uploads"
|
|
@@ -254,6 +261,7 @@ export default {
|
|
|
label: "资料上传",
|
|
|
prop: "FilePath",
|
|
|
scope: "file",
|
|
|
+ span: 24,
|
|
|
},
|
|
|
],
|
|
|
ruleForm: { CompanyTypeName: "", MemberLevel: "" },
|
|
@@ -297,21 +305,21 @@ export default {
|
|
|
if (file === undefined) {
|
|
|
return;
|
|
|
}
|
|
|
- if (file.size > 10 * 1024 * 1024) {
|
|
|
- self.$message.error("文件不得大于10MB");
|
|
|
- return;
|
|
|
- }
|
|
|
- var type = e.target.value.toLowerCase().split(".").splice(-1);
|
|
|
- if (
|
|
|
- type[0] != "jpg" &&
|
|
|
- type[0] != "pdf" &&
|
|
|
- type[0] != "png" &&
|
|
|
- type[0] != "jpeg"
|
|
|
- ) {
|
|
|
- self.$message.error("上传格式需为:.jpg/.png/.jpeg/.pdf");
|
|
|
- e.target.value = "";
|
|
|
+ if (file.size > 50 * 1024 * 1024) {
|
|
|
+ self.$message.error("文件不得大于50MB");
|
|
|
return;
|
|
|
}
|
|
|
+ // var type = e.target.value.toLowerCase().split(".").splice(-1);
|
|
|
+ // if (
|
|
|
+ // type[0] != "jpg" &&
|
|
|
+ // type[0] != "pdf" &&
|
|
|
+ // type[0] != "png" &&
|
|
|
+ // type[0] != "jpeg"
|
|
|
+ // ) {
|
|
|
+ // self.$message.error("上传格式需为:.jpg/.png/.jpeg/.pdf");
|
|
|
+ // e.target.value = "";
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
let formDatas = new FormData();
|
|
|
formDatas.append("file", file);
|
|
|
this.$api
|
|
@@ -394,6 +402,6 @@ export default {
|
|
|
}
|
|
|
.btn {
|
|
|
cursor: pointer;
|
|
|
- color:red;
|
|
|
+ color: rgb(0, 102, 255);
|
|
|
}
|
|
|
</style>
|