|
@@ -221,6 +221,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
+ const printContentValidator = (rule, value, callback) => {
|
|
|
+ if (!this.modalForm.printContent.length) {
|
|
|
+ return callback(new Error("请选择试卷"));
|
|
|
+ }
|
|
|
+
|
|
|
+ callback();
|
|
|
+ };
|
|
|
const backupMethodValidator = (rule, value, callback) => {
|
|
|
if (!this.modalForm.printContent.length) {
|
|
|
return callback();
|
|
@@ -268,8 +275,8 @@ export default {
|
|
|
rules: {
|
|
|
printContent: [
|
|
|
{
|
|
|
- required: false,
|
|
|
- // validator: printContentValidator,
|
|
|
+ required: true,
|
|
|
+ validator: printContentValidator,
|
|
|
trigger: "change"
|
|
|
}
|
|
|
],
|