Browse Source

抽样单列表机构性质显示

yyfang 3 năm trước cách đây
mục cha
commit
abb50b9e08

+ 11 - 7
src/components/admin/readSampleList.vue

@@ -38,7 +38,7 @@ export default {
     data() {
         return {
             // 数据表格数据
-			tableData: [],
+			tableData:[],
             sampleOrgId:{},
             queryInfo:{
 					pageSize:10,
@@ -146,16 +146,20 @@ export default {
                 "getTasks", this.queryInfo
             );
             this.tableData = res.data.rows
+            console.log( this.tableData)
             this.total = res.data.total
             this.task_id = res.data.rows.task_id
-            this.queryInfo = result.data.data
-                if (this.queryInfo.properties == 1){
-                      this.queryInfo.properties ='政府部门';
-                }else if(this.queryInfo.properties == 2){
-                    this.queryInfo.properties ='事业单位';
+            for(let i=0; i<this.tableData.length; i++){
+                if (this.tableData[i].releaser.properties == "1"){
+                      this.tableData[i].releaser.properties ="政府部门";
+                }else if(this.tableData[i].releaser.properties == "2"){
+                    this.tableData[i].releaser.properties ="事业单位";
                 }else{
-                     this.queryInfo.properties ='企业';
+                     this.tableData[i].releaser.properties ="企业";
                 }
+            }
+                
+                console.log(res.data.rows)
         },
         //分页器
                 handleSizeChange(val) {

+ 1 - 1
src/components/admin/setTaskJg.vue

@@ -118,7 +118,7 @@ export default {
             this.tableData = res.data.rows
             this.total = res.data.total
             this.task_id = res.data.rows.task_id
-            console.log(result.data.rows.task_id)
+            console.log(res.data.rows.task_id)
         },
         //查看抽样单 
         read(id){