|
@@ -20,7 +20,7 @@
|
|
<el-upload
|
|
<el-upload
|
|
class="upload-width"
|
|
class="upload-width"
|
|
ref="upload"
|
|
ref="upload"
|
|
- accept="image/*"
|
|
|
|
|
|
+ accept=".png"
|
|
:action="uploadAction"
|
|
:action="uploadAction"
|
|
:headers="uploadHeaders"
|
|
:headers="uploadHeaders"
|
|
:data="uploadData"
|
|
:data="uploadData"
|
|
@@ -32,6 +32,8 @@
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
:auto-upload="false"
|
|
:auto-upload="false"
|
|
:multiple="false"
|
|
:multiple="false"
|
|
|
|
+ :limit="1"
|
|
|
|
+ :on-exceed="handleExceed"
|
|
list-type="picture"
|
|
list-type="picture"
|
|
>
|
|
>
|
|
<el-button size="small" slot="trigger" type="primary"
|
|
<el-button size="small" slot="trigger" type="primary"
|
|
@@ -44,7 +46,7 @@
|
|
>清空文件</el-button
|
|
>清空文件</el-button
|
|
>
|
|
>
|
|
<div slot="tip" class="el-upload__tip">
|
|
<div slot="tip" class="el-upload__tip">
|
|
- 图片大小为400*100的png文件
|
|
|
|
|
|
+ 图片大小(长*宽)为400*100的png文件
|
|
</div>
|
|
</div>
|
|
</el-upload>
|
|
</el-upload>
|
|
<el-input v-show="false" v-model="ruleForm.LOGO_FILE_URL"></el-input>
|
|
<el-input v-show="false" v-model="ruleForm.LOGO_FILE_URL"></el-input>
|
|
@@ -74,7 +76,11 @@
|
|
>
|
|
>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="窗口默认大小" prop="STUDENT_CLIENT_DEFAULT_SIZE">
|
|
|
|
|
|
+ <el-form-item
|
|
|
|
+ v-show="false"
|
|
|
|
+ label="窗口默认大小"
|
|
|
|
+ prop="STUDENT_CLIENT_DEFAULT_SIZE"
|
|
|
|
+ >
|
|
<el-input
|
|
<el-input
|
|
v-model="ruleForm.STUDENT_CLIENT_DEFAULT_SIZE"
|
|
v-model="ruleForm.STUDENT_CLIENT_DEFAULT_SIZE"
|
|
placeholder="窗口大小格式为:宽度*高度"
|
|
placeholder="窗口大小格式为:宽度*高度"
|
|
@@ -89,15 +95,10 @@
|
|
></el-input>
|
|
></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button
|
|
|
|
- class="btn-margin-left"
|
|
|
|
- type="primary"
|
|
|
|
- @click="submitForm('ruleForm')"
|
|
|
|
|
|
+ <el-button type="primary" @click="submitForm('ruleForm')"
|
|
>保 存</el-button
|
|
>保 存</el-button
|
|
>
|
|
>
|
|
- <el-button class="btn-margin-left" @click="resetForm('ruleForm')"
|
|
|
|
- >取 消</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <!-- <el-button class="btn-margin-left" @click="resetForm('ruleForm')">取 消</el-button> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</el-main>
|
|
</el-main>
|
|
@@ -148,7 +149,7 @@ export default {
|
|
{ min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" }
|
|
{ min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" }
|
|
],
|
|
],
|
|
LOGO_FILE_URL: [
|
|
LOGO_FILE_URL: [
|
|
- { required: true, message: "请选择学校logo", trigger: "change" }
|
|
|
|
|
|
+ { required: true, message: "请上传学校logo", trigger: "change" }
|
|
],
|
|
],
|
|
loginType: [
|
|
loginType: [
|
|
{
|
|
{
|
|
@@ -276,12 +277,17 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.fileList = [];
|
|
this.fileList = [];
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "学生客户端信息暂未初始化,请立即初始化",
|
|
|
|
+ type: "warning"
|
|
|
|
+ });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- resetForm(formName) {
|
|
|
|
- this.$refs[formName].resetFields();
|
|
|
|
- },
|
|
|
|
|
|
+ // resetForm(formName) {
|
|
|
|
+ // this.$refs[formName].resetFields();
|
|
|
|
+ // },
|
|
initUpload() {
|
|
initUpload() {
|
|
this.fileList = [];
|
|
this.fileList = [];
|
|
},
|
|
},
|
|
@@ -349,12 +355,12 @@ export default {
|
|
for (let file of fileList) {
|
|
for (let file of fileList) {
|
|
var fileName = file.name;
|
|
var fileName = file.name;
|
|
if (
|
|
if (
|
|
- !fileName.endsWith(".jpg") &&
|
|
|
|
- !fileName.endsWith(".gif") &&
|
|
|
|
|
|
+ // !fileName.endsWith(".jpg") &&
|
|
|
|
+ // !fileName.endsWith(".gif") &&
|
|
!fileName.endsWith(".png")
|
|
!fileName.endsWith(".png")
|
|
) {
|
|
) {
|
|
this.$notify({
|
|
this.$notify({
|
|
- message: "上传文件必须为[jpg,gif,png]",
|
|
|
|
|
|
+ message: "上传文件格式必须为[png]",
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
this.initUpload();
|
|
this.initUpload();
|
|
@@ -374,6 +380,12 @@ export default {
|
|
handleRemove(file, fileList) {
|
|
handleRemove(file, fileList) {
|
|
console.log(file, fileList);
|
|
console.log(file, fileList);
|
|
this.removeFile();
|
|
this.removeFile();
|
|
|
|
+ },
|
|
|
|
+ handleExceed() {
|
|
|
|
+ this.$notify({
|
|
|
|
+ message: "当前限制选择 1 个文件,请先清空文件再试",
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -394,12 +406,12 @@ export default {
|
|
</script>
|
|
</script>
|
|
<style scoped>
|
|
<style scoped>
|
|
.input-width {
|
|
.input-width {
|
|
- width: 600px;
|
|
|
|
|
|
+ width: 638px;
|
|
}
|
|
}
|
|
.upload-width {
|
|
.upload-width {
|
|
- width: 600px;
|
|
|
|
-}
|
|
|
|
-.btn-margin-left {
|
|
|
|
- margin-left: 200px;
|
|
|
|
|
|
+ width: 638px;
|
|
}
|
|
}
|
|
|
|
+/* .btn-margin-left {
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+} */
|
|
</style>
|
|
</style>
|