gcj пре 3 година
родитељ
комит
057e17d9d8
2 измењених фајлова са 31 додато и 1 уклоњено
  1. 1 1
      package.json
  2. 30 0
      src/views/courseList.vue

+ 1 - 1
package.json

@@ -17,7 +17,7 @@
     "@tinymce/tinymce-vue": "^3.2.8",
     "awe-dnd": "^0.3.4",
     "axios": "0.18.1",
-    "book-ui": "file:../GCLS-Book-question-ui/book-ui-0.2.2.tgz",
+    "book-ui": "file:../GCLS-Book-question-ui/book-ui-0.2.3.tgz",
     "cnchar": "^3.0.1",
     "cnchar-all": "^3.0.1",
     "cnchar-order": "^3.0.1",

+ 30 - 0
src/views/courseList.vue

@@ -185,6 +185,22 @@
             v-model="formDialog.name"
           ></el-input>
         </el-form-item>
+        <el-form-item label="教材类型" label-width="90px" prop="type_id">
+          <!-- -->
+          <el-select
+            ref="typeSelects"
+            v-model="formDialog.type_id"
+            name="bookType"
+            placeholder="请选择教材类型"
+          >
+            <el-option
+              v-for="(item, index) in typeList"
+              :key="'type' + index"
+              :label="item.name"
+              :value="item.id"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item
           class="label-input"
           label="英文名"
@@ -383,6 +399,7 @@ export default {
         picture_id: "",
         id: "",
         publisher: "",
+        type_id: "",
       },
       agencyList: [
         {
@@ -447,10 +464,12 @@ export default {
         },
       ],
       diaMyOrgList: [],
+      typeList: [],
     };
   },
   mounted() {
     this.getList();
+    this.getTypeList();
     this.getMyOrgList();
     this.getMyOrgListAgree();
     //this.createOptions(1);
@@ -550,6 +569,7 @@ export default {
         picture_id: "",
         id: "",
         publisher: "",
+        type_id: "",
       };
       this.agency = "";
       this.fileList = [];
@@ -711,6 +731,15 @@ export default {
         }
       }
     },
+    // 教材类型列表
+    getTypeList() {
+      let MethodName = "dict_manager-GetBookTypeList";
+      let data = {};
+      getContentFile(MethodName, data).then((res) => {
+        this.typeList = res.type_list;
+        console.log(this.typeList);
+      });
+    },
     // 处理教材价格 最多两位小数
     inputPrice(e) {
       e = e.match(/^\d*(\.?\d{0,2})/g)[0] || "";
@@ -782,6 +811,7 @@ export default {
             publish_number: res.publish_number,
             publisher: res.publisher,
             edition: res.edition,
+            type_id: res.type_id,
           };
           if (res.picture_url) {
             let obj = {