|
@@ -35,7 +35,13 @@
|
|
label="名称"
|
|
label="名称"
|
|
min-width="200"
|
|
min-width="200"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
- <el-table-column prop="format" label="格式"></el-table-column>
|
|
|
|
|
|
+ <el-table-column prop="format" label="格式">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{
|
|
|
|
+ scope.row.format === "null" ? "" : scope.row.format
|
|
|
|
+ }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="choose" label="是否选中" width="100">
|
|
<el-table-column prop="choose" label="是否选中" width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<i
|
|
<i
|
|
@@ -50,11 +56,11 @@
|
|
fixed="right"
|
|
fixed="right"
|
|
width="120"
|
|
width="120"
|
|
>
|
|
>
|
|
- <template slot-scope="scope" v-if="scope.row.attachmentId !== -1">
|
|
|
|
|
|
+ <template slot-scope="scope" v-if="scope.row.attachmentId !== '-1'">
|
|
<el-button
|
|
<el-button
|
|
- v-if="!scope.row.choose"
|
|
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
type="text"
|
|
type="text"
|
|
|
|
+ :disabled="scope.row.choose"
|
|
@click="toSelect(scope.row)"
|
|
@click="toSelect(scope.row)"
|
|
>选中</el-button
|
|
>选中</el-button
|
|
>
|
|
>
|
|
@@ -108,7 +114,7 @@ export default {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
// upload
|
|
// upload
|
|
- format: ["ttf", "ttc"],
|
|
|
|
|
|
+ format: ["ttf", "woff", "otf", "eot"],
|
|
uploadUrl: "/api/admin/common/file/upload",
|
|
uploadUrl: "/api/admin/common/file/upload",
|
|
uploadData: {
|
|
uploadData: {
|
|
type: "UPLOAD",
|
|
type: "UPLOAD",
|
|
@@ -128,14 +134,17 @@ export default {
|
|
},
|
|
},
|
|
validError(errorData) {
|
|
validError(errorData) {
|
|
this.$message.error(errorData.message);
|
|
this.$message.error(errorData.message);
|
|
|
|
+ this.$refs.modalFormComp.validateField("attachmentId");
|
|
},
|
|
},
|
|
async uploadSuccess(data) {
|
|
async uploadSuccess(data) {
|
|
this.modalForm.attachmentId = data.id;
|
|
this.modalForm.attachmentId = data.id;
|
|
|
|
+ this.$refs.modalFormComp.validateField("attachmentId");
|
|
|
|
|
|
if (this.loading) return;
|
|
if (this.loading) return;
|
|
this.loading = true;
|
|
this.loading = true;
|
|
const res = await schoolSetFontAdd(this.modalForm).catch(() => {});
|
|
const res = await schoolSetFontAdd(this.modalForm).catch(() => {});
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
+ this.$refs.UploadFileView.setAttachmentName("");
|
|
if (!res) return;
|
|
if (!res) return;
|
|
|
|
|
|
this.$message.success("上传字体成功!");
|
|
this.$message.success("上传字体成功!");
|
|
@@ -158,7 +167,7 @@ export default {
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning",
|
|
type: "warning",
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
- if (!confirm !== "confirm") return;
|
|
|
|
|
|
+ if (confirm !== "confirm") return;
|
|
|
|
|
|
if (this.loading) return;
|
|
if (this.loading) return;
|
|
this.loading = true;
|
|
this.loading = true;
|