wangxl@jiinfo.cn пре 2 месеци
родитељ
комит
c38620d29e
5 измењених фајлова са 42 додато и 35 уклоњено
  1. 3 2
      config/index.js
  2. 5 5
      src/App.vue
  3. 12 10
      src/js/util/utilList.js
  4. 1 0
      src/view/product/components/RecentlyList.vue
  5. 21 18
      src/view/product/index.vue

+ 3 - 2
config/index.js

@@ -11,8 +11,9 @@ module.exports = {
         assetsPublicPath: '/',
         proxyTable: {
             '/api/': {
-                // target: 'http://192.168.0.104:18182/api/',
-                target: 'https://crs.sanyoubio.com/api/',
+                // target: 'https://crstest.jiinfo.cn/api/',
+                target: 'https://bsabtestcn.jiinfo.cn/api/',
+                // target: 'https://crs.sanyoubio.com/api/',
                 changeOrigin: true,
                 secure: false,
                 pathRewrite: {

+ 5 - 5
src/App.vue

@@ -4,9 +4,9 @@
       <div class="noHome">
         <home-header></home-header>
         <div :class="$route.meta.fullScreen ? 'content' :'content_app'">
-          <keep-alive include="AntigenPreparation">
-            <router-view/>
-          </keep-alive>
+          <!-- <keep-alive include="AntigenPreparation"> -->
+            <router-view :key="key"/>
+          <!-- </keep-alive> -->
         </div>
         <footerbox></footerbox>
       </div>
@@ -258,11 +258,11 @@ export default {
       }, 250);
     };
     // this.startPray()
-    // this.findAllCategory();
+    this.findAllCategory();
     this.getinfo();
   },
   mounted() {
-    // this.findAllMolecule();
+    this.findAllMolecule();
     let that = this;
     setTimeout(() => {
       that.loading = false;

+ 12 - 10
src/js/util/utilList.js

@@ -123,20 +123,22 @@ export const localeStorage = utilList.localeStorage = () => {
  * 字典转换
  */
 export const findAllCategory = utilList.findAllCategory = (key, obj) => {
-  var list = store.state.dictionary[`${key}`]
+  var list = store.state.dictionary[`${key}`] || []
   var arr = []
   var arrlis = []
   if (obj) {
     arr = obj.split(",")
-    for (var i = 0; i < list.length; i++) {
-      for (var j = 0; j < arr.length; j++) {
-        if (Number(list[i].id) === Number(arr[j])) {
-          if (localeStorage()) {
-            arrlis.push(list[i].name)
-            // return list[i].name
-          } else {
-            arrlis.push(list[i].nameCn)
-            // return list[i].nameCn
+    if (list.length > 0) {
+      for (var i = 0; i < list.length; i++) {
+        for (var j = 0; j < arr.length; j++) {
+          if (Number(list[i].id) === Number(arr[j])) {
+            if (localeStorage()) {
+              arrlis.push(list[i].name)
+              // return list[i].name
+            } else {
+              arrlis.push(list[i].nameCn)
+              // return list[i].nameCn
+            }
           }
         }
       }

+ 1 - 0
src/view/product/components/RecentlyList.vue

@@ -26,6 +26,7 @@ export default {
   methods: {
     tapRoduct(e) {
       // 浏览记录
+      console.log(e, "浏览记录");
       let name = this.$util.english(e.product);
       this.$router.push({
         path:

+ 21 - 18
src/view/product/index.vue

@@ -5,13 +5,14 @@
       <!-- 搜索 -->
       <el-form :inline="true" :model="form" class="demo-form-inline">
         <el-form-item label="抗体名称:">
-          <el-input v-model="form.antibodyName" placeholder="审批人"></el-input>
+          <el-input v-model="form.name" placeholder="抗体名称"></el-input>
         </el-form-item>
         <el-form-item label="靶点名称:">
-          <el-input v-model="form.targetName" placeholder="审批人"></el-input>
+          <el-input v-model="form.target" placeholder="靶点名称"></el-input>
         </el-form-item>
         <el-form-item>
           <el-button type="primary" @click="onSubmit">查询</el-button>
+          <el-button type="danger" @click="reset">重置</el-button>
         </el-form-item>
       </el-form>
        <!-- 列表 -->
@@ -46,19 +47,11 @@ export default {
   name: "antibody",
   data() {
     return {
-      criteria: {
-        type: 2,
-        species: "",
-        // source: '',
-        format: "",
-        host: "",
-        category: this.$route.query.id || "",
-        sortKey: undefined,
-        sortValue: undefined
-      },
       form: {
-        antibodyName: "",
-        targetName: ""
+        name: "",
+        target: "",
+        sortKey: undefined,
+        sortValue: undefined 
       },
       pageable: {
         page: 0,
@@ -72,14 +65,24 @@ export default {
     };
   },
   methods: {
+    // 重置
+    reset() {
+      this.form = {
+        name: "",
+        target: ""
+      };
+      this.pageable.page = 0;
+      this.postlist();
+    },
     // 查询
     onSubmit() {
       this.pageable.page = 0;
       this.postlist();
     },
     onSortFieldChange(params) {
-      this.criteria.sortKey = params.field || undefined;
-      this.criteria.sortValue = params.value || undefined;
+      console.log(params);
+      this.form.sortKey = params.field || undefined;
+      this.form.sortValue = params.value || undefined;
       this.pageable.page = 0;
       this.postlist();
     },
@@ -94,8 +97,8 @@ export default {
       let that = this;
       that.tableLoading = true;
       this.$api
-        .post("product/listByCategory", {
-          criteria: this.criteria,
+        .post("basb/pageListProducts", {
+          criteria: this.form,
           pageable: this.pageable
         })
         .then(res => {