WANG 6 лет назад
Родитель
Сommit
23044dd8b4

+ 1 - 1
src/modules/examwork/view/examInfo.vue

@@ -84,7 +84,7 @@
           <el-table-column type="selection" width="40"></el-table-column>
           <el-table-column prop="id" width="60" label="ID" sortable>
           </el-table-column>
-          <el-table-column prop="name" label="考试编码"> </el-table-column>
+          <el-table-column prop="code" label="考试编码"> </el-table-column>
           <el-table-column prop="name" label="考试名称"> </el-table-column>
           <el-table-column width="130" label="考试类型" sortable>
             <template slot-scope="scope">

+ 19 - 1
src/modules/examwork/view/offlineExam.vue

@@ -54,7 +54,22 @@
                     <el-input
                       v-model="form.code"
                       class="input"
-                      :disabled="examId != 'add'"
+                      :disabled="true"
+                      maxlength="20"
+                    ></el-input>
+                  </el-form-item>
+                </el-row>
+                <el-row v-else>
+                  <el-form-item
+                    label="考试编码"
+                    placeholder="请输入考试编码"
+                    prop="code"
+                    :label-width="style.label_width_tab1"
+                  >
+                    <el-input
+                      v-model="form.name"
+                      class="input"
+                      :disabled="true"
                       maxlength="20"
                     ></el-input>
                   </el-form-item>
@@ -166,6 +181,9 @@ import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 let _this = null;
 
 let validateCode = (rule, value, callback) => {
+  if (_this.examId == "add") {
+    _this.form.code = _this.form.name;
+  }
   let code = _this.form.code;
   if (code == "") {
     callback(new Error("请输入考试编码"));

+ 19 - 1
src/modules/examwork/view/onlineExam.vue

@@ -54,7 +54,22 @@
                     <el-input
                       v-model="form.code"
                       class="input"
-                      :disabled="examId != 'add'"
+                      :disabled="true"
+                      maxlength="20"
+                    ></el-input>
+                  </el-form-item>
+                </el-row>
+                <el-row v-else>
+                  <el-form-item
+                    label="考试编码"
+                    placeholder="请输入考试编码"
+                    prop="code"
+                    :label-width="style.label_width_tab1"
+                  >
+                    <el-input
+                      v-model="form.name"
+                      class="input"
+                      :disabled="true"
                       maxlength="20"
                     ></el-input>
                   </el-form-item>
@@ -593,6 +608,9 @@ import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 let _this = null;
 
 let validateCode = (rule, value, callback) => {
+  if (_this.examId == "add") {
+    _this.form.code = _this.form.name;
+  }
   let code = _this.form.code;
   if (code == "") {
     callback(new Error("请输入考试编码"));

+ 19 - 1
src/modules/examwork/view/practiceExam.vue

@@ -54,7 +54,22 @@
                     <el-input
                       v-model="form.code"
                       class="input"
-                      :disabled="examId != 'add'"
+                      :disabled="true"
+                      maxlength="20"
+                    ></el-input>
+                  </el-form-item>
+                </el-row>
+                <el-row v-else>
+                  <el-form-item
+                    label="考试编码"
+                    placeholder="请输入考试编码"
+                    prop="code"
+                    :label-width="style.label_width_tab1"
+                  >
+                    <el-input
+                      v-model="form.name"
+                      class="input"
+                      :disabled="true"
                       maxlength="20"
                     ></el-input>
                   </el-form-item>
@@ -256,6 +271,9 @@ import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 let _this = null;
 
 let validateCode = (rule, value, callback) => {
+  if (_this.examId == "add") {
+    _this.form.code = _this.form.name;
+  }
   let code = _this.form.code;
   if (code == "") {
     callback(new Error("请输入考试编码"));

+ 19 - 1
src/modules/examwork/view/printExam.vue

@@ -54,7 +54,22 @@
                     <el-input
                       v-model="form.code"
                       class="input"
-                      :disabled="examId != 'add'"
+                      :disabled="true"
+                      maxlength="20"
+                    ></el-input>
+                  </el-form-item>
+                </el-row>
+                <el-row v-else>
+                  <el-form-item
+                    label="考试编码"
+                    placeholder="请输入考试编码"
+                    prop="code"
+                    :label-width="style.label_width_tab1"
+                  >
+                    <el-input
+                      v-model="form.name"
+                      class="input"
+                      :disabled="true"
                       maxlength="20"
                     ></el-input>
                   </el-form-item>
@@ -141,6 +156,9 @@ import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 let _this = null;
 
 let validateCode = (rule, value, callback) => {
+  if (_this.examId == "add") {
+    _this.form.code = _this.form.name;
+  }
   let code = _this.form.code;
   if (code == "") {
     callback(new Error("请输入考试编码"));

+ 19 - 1
src/modules/examwork/view/traditionExam.vue

@@ -54,7 +54,22 @@
                     <el-input
                       v-model="form.code"
                       class="input"
-                      :disabled="examId != 'add'"
+                      :disabled="true"
+                      maxlength="20"
+                    ></el-input>
+                  </el-form-item>
+                </el-row>
+                <el-row v-else>
+                  <el-form-item
+                    label="考试编码"
+                    placeholder="请输入考试编码"
+                    prop="code"
+                    :label-width="style.label_width_tab1"
+                  >
+                    <el-input
+                      v-model="form.name"
+                      class="input"
+                      :disabled="true"
                       maxlength="20"
                     ></el-input>
                   </el-form-item>
@@ -141,6 +156,9 @@ import LinkTitlesCustom from "@/components/LinkTitlesCustom.vue";
 let _this = null;
 
 let validateCode = (rule, value, callback) => {
+  if (_this.examId == "add") {
+    _this.form.code = _this.form.name;
+  }
   let code = _this.form.code;
   if (code == "") {
     callback(new Error("请输入考试编码"));