|
@@ -14,9 +14,12 @@
|
|
</div>
|
|
</div>
|
|
<div class="btn">
|
|
<div class="btn">
|
|
<!-- 完成 -->
|
|
<!-- 完成 -->
|
|
- <el-button @click="submit('form')" style="width: 180px" type="primary">{{
|
|
|
|
- $t("Key82")
|
|
|
|
- }}</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ @click="submit('form')"
|
|
|
|
+ style="width: 180px"
|
|
|
|
+ type="primary"
|
|
|
|
+ >{{ $t("Key82") }}</el-button
|
|
|
|
+ >
|
|
|
|
|
|
<el-button @click="preview" style="width: 180px" type="warning">
|
|
<el-button @click="preview" style="width: 180px" type="warning">
|
|
<!-- 预览 -->{{ $t("Key144") }}
|
|
<!-- 预览 -->{{ $t("Key144") }}
|
|
@@ -122,15 +125,21 @@
|
|
<!-- 下载 -->
|
|
<!-- 下载 -->
|
|
<el-form-item :label="$t('Key242')" prop="download">
|
|
<el-form-item :label="$t('Key242')" prop="download">
|
|
<el-radio-group v-model="form.download">
|
|
<el-radio-group v-model="form.download">
|
|
- <el-radio label="downloadable"> <!-- 开启 -->{{ $t("Key245") }} </el-radio>
|
|
|
|
|
|
+ <el-radio label="downloadable">
|
|
|
|
+ <!-- 开启 -->{{ $t("Key245") }}
|
|
|
|
+ </el-radio>
|
|
<el-radio label="0"> <!-- 关闭 -->{{ $t("Key246") }} </el-radio>
|
|
<el-radio label="0"> <!-- 关闭 -->{{ $t("Key246") }} </el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 分类 -->
|
|
<!-- 分类 -->
|
|
<el-form-item :label="$t('Key243')" prop="classify">
|
|
<el-form-item :label="$t('Key243')" prop="classify">
|
|
<el-radio-group v-model="form.classify">
|
|
<el-radio-group v-model="form.classify">
|
|
- <el-radio label="TEXTBOOK"> <!-- 教辅资料 -->{{ $t("Key554") }}</el-radio>
|
|
|
|
- <el-radio label="TEACHING"> <!-- 教研资料 -->{{ $t("Key214") }} </el-radio>
|
|
|
|
|
|
+ <el-radio label="TEXTBOOK">
|
|
|
|
+ <!-- 教辅资料 -->{{ $t("Key554") }}</el-radio
|
|
|
|
+ >
|
|
|
|
+ <el-radio label="TEACHING">
|
|
|
|
+ <!-- 教研资料 -->{{ $t("Key214") }}
|
|
|
|
+ </el-radio>
|
|
<el-radio label="TOOLBOOK">
|
|
<el-radio label="TOOLBOOK">
|
|
<!-- 工具书 -->
|
|
<!-- 工具书 -->
|
|
{{ $t("Key555") }}
|
|
{{ $t("Key555") }}
|
|
@@ -230,7 +239,10 @@ export default {
|
|
},
|
|
},
|
|
// 处理教材价格 失去焦点保留两位小数
|
|
// 处理教材价格 失去焦点保留两位小数
|
|
priceBlur() {
|
|
priceBlur() {
|
|
- if (Object.prototype.toString.call(this.form.price * 1).indexOf("Number") != -1) {
|
|
|
|
|
|
+ if (
|
|
|
|
+ Object.prototype.toString.call(this.form.price * 1).indexOf("Number") !=
|
|
|
|
+ -1
|
|
|
|
+ ) {
|
|
if (this.form.price * 1 > 9999) {
|
|
if (this.form.price * 1 > 9999) {
|
|
// 可能需要提示
|
|
// 可能需要提示
|
|
this.form.price = "";
|
|
this.form.price = "";
|
|
@@ -304,13 +316,21 @@ export default {
|
|
submit(formName) {
|
|
submit(formName) {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
let flag = false;
|
|
let flag = false;
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- } else {
|
|
|
|
- flag = true;
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ // this.$refs[formName].validate((valid) => {
|
|
|
|
+ // if (valid) {
|
|
|
|
+ // } else {
|
|
|
|
+ // flag = true;
|
|
|
|
+ // return false;
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ if (
|
|
|
|
+ !this.form.name ||
|
|
|
|
+ this.dynamicTags.length == 0 ||
|
|
|
|
+ this.form.price == "" ||
|
|
|
|
+ !this.form.institutionID
|
|
|
|
+ ) {
|
|
|
|
+ flag = true;
|
|
|
|
+ }
|
|
if (flag) {
|
|
if (flag) {
|
|
this.$message.warning(this.$t("Key605")); //"请填写完整"
|
|
this.$message.warning(this.$t("Key605")); //"请填写完整"
|
|
this.loading = false;
|
|
this.loading = false;
|
|
@@ -586,12 +606,15 @@ export default {
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
color: #000000;
|
|
color: #000000;
|
|
}
|
|
}
|
|
- .el-upload-list__item-name {
|
|
|
|
- margin-left: 50px;
|
|
|
|
- }
|
|
|
|
- .el-form-item__error {
|
|
|
|
- margin-left: 50px;
|
|
|
|
|
|
+ .upload{
|
|
|
|
+ width: 400px;
|
|
}
|
|
}
|
|
|
|
+ // .el-upload-list__item-name {
|
|
|
|
+ // margin-left: 50px;
|
|
|
|
+ // }
|
|
|
|
+ // .el-form-item__error {
|
|
|
|
+ // margin-left: 50px;
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
.text_right {
|
|
.text_right {
|
|
.el-form-item {
|
|
.el-form-item {
|