gangyj преди 2 години
родител
ревизия
01a2f0bccb
променени са 1 файла, в които са добавени 22 реда и са изтрити 9 реда
  1. 22 9
      src/views/manager/projectinfo/archivetreeconfig.vue

+ 22 - 9
src/views/manager/projectinfo/archivetreeconfig.vue

@@ -19,7 +19,7 @@
                @refresh-change="refreshChange"
                @on-load="onLoad">
        <template slot-scope="{type,size,row}" slot="menu">
-        <el-button icon="el-icon-setting" :size="size" :type="type" @click="configurationClick">配置规则</el-button>
+        <el-button icon="el-icon-setting" :size="size" :type="type" @click="configurationClick(row)">配置规则</el-button>
        
       </template>
     </avue-crud>
@@ -27,7 +27,8 @@
 </template>
 
 <script>
-import {getList, getDetail, add, update, remove} from "@/api/tentative/testcollect";
+// import {getList, getDetail, add, update, remove} from "@/api/tentative/testcollect";
+import { getProjectList } from "@/api/manager/projectinfo";
 import {mapGetters} from "vuex";
 
 export default {
@@ -63,7 +64,7 @@ export default {
         column: [
           {
             label: "项目名称",
-            prop: "name",
+            prop: "projectName",
             rules: [{
               required: true,
               message: "请输入分类名称",
@@ -110,23 +111,35 @@ export default {
     refreshChange() {
       this.onLoad(this.page, this.query);
     },
+    // onLoad(page, params = {}) {
+    //   this.loading = true;
+    //   getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+    //     const data = res.data.data;
+         
+    //     this.page.total = data.total;
+    //     // this.data = data.records;
+    //      this.data = [{name:'重庆乌江白马枢纽工程项目'}]
+    //     this.loading = false;
+    //     this.selectionClear();
+    //   });
+    // },
     onLoad(page, params = {}) {
       this.loading = true;
-      getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+      getProjectList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
         const data = res.data.data;
          
         this.page.total = data.total;
-        // this.data = data.records;
-         this.data = [{name:'重庆乌江白马枢纽工程项目'}]
+        this.data = data.records;
         this.loading = false;
-        this.selectionClear();
       });
     },
-    configurationClick(){
+    configurationClick(row){
+      //console.log(row);
+      //return;
       this.$router.push({
         path: '/manager/projectinfo/archivetreeRule',
         query: {
-          projectId:'1578599210897772545',//暂时传参
+          projectId:row.id,
         }
       });
     },