소스 검색

监管端抽样单

yyfang 3 년 전
부모
커밋
227dd6ad2c
4개의 변경된 파일219개의 추가작업 그리고 166개의 파일을 삭제
  1. 79 81
      package-lock.json
  2. 23 15
      src/components/admin/takeTheLeadReportList.vue
  3. 116 70
      src/components/admin/taskSample.vue
  4. 1 0
      src/router/index.js

+ 79 - 81
package-lock.json

@@ -1668,6 +1668,16 @@
           "integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
           "dev": true
         },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
         "cacache": {
           "version": "13.0.1",
           "resolved": "https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz",
@@ -1694,6 +1704,53 @@
             "unique-filename": "^1.1.1"
           }
         },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "color-name": {
+          "version": "1.1.4",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+          "dev": true,
+          "optional": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
+        "loader-utils": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.1.tgz",
+          "integrity": "sha512-g4miPa9uUrZz4iElkaVJgDFwKJGh8aQGM7pUL4ejXl6cu7kSb30seQOVGNMP6sW8j7DW77X68hJZ+GM7UGhXeQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
         "source-map": {
           "version": "0.6.1",
           "resolved": "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz",
@@ -1710,6 +1767,16 @@
             "minipass": "^3.1.1"
           }
         },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
         "terser-webpack-plugin": {
           "version": "2.3.8",
           "resolved": "https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610194262897&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz",
@@ -1726,6 +1793,18 @@
             "terser": "^4.6.12",
             "webpack-sources": "^1.4.3"
           }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.8.2",
+          "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.2.tgz",
+          "integrity": "sha512-Nkq+z9mAsMEK+qkXgK+9Ia7D8w9uu9j4ut0IMT5coMfux3rCgIp1QBB1CYwY0M34A1nRMSONEaWXxAAw6xSl/Q==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          }
         }
       }
     },
@@ -11513,87 +11592,6 @@
         }
       }
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.8.1",
-      "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.1.tgz",
-      "integrity": "sha512-V53TJbHmzjBhCG5OYI2JWy/aYDspz4oVHKxS43Iy212GjGIG1T3EsB3+GWXFm/1z5VwjdjLmdZUFYM70y77vtQ==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "ansi-styles": {
-          "version": "4.3.0",
-          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
-          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-convert": "^2.0.1"
-          }
-        },
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "color-convert": {
-          "version": "2.0.1",
-          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
-          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "color-name": "~1.1.4"
-          }
-        },
-        "color-name": {
-          "version": "1.1.4",
-          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
-          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
-          "dev": true,
-          "optional": true
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "loader-utils": {
-          "version": "2.0.0",
-          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
-          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "big.js": "^5.2.2",
-            "emojis-list": "^3.0.0",
-            "json5": "^2.1.2"
-          }
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
     "vue-router": {
       "version": "3.5.1",
       "resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.5.1.tgz?cache=0&sync_timestamp=1617697843139&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.5.1.tgz",

+ 23 - 15
src/components/admin/takeTheLeadReportList.vue

@@ -9,21 +9,25 @@
 				</el-breadcrumb>
 			</div> 
 
-            <div>
-				<!-- 下拉菜单 -->
-                <!-- <el-select v-model="value" placeholder="请选择">
-                	<el-option
-                    	v-for="item in options"
-                    	:key="item.value"
-                    	:label="item.label"
-                    	:value="item.value">
-                	</el-option>
-                </el-select> -->
-                <!-- 返回按钮 -->
-                <el-button class="btns" type="info" size="small" @click="returnTask">
-					返回任务列表
-				</el-button>
-            </div>
+			<div class="headSearch">
+			<el-row :gutter="50" style="margin-right: 0px;">
+				<el-form :inline="true">
+					<!-- <el-form style="display: flex; flex-direction: row;" > -->
+					<el-form-item label="年度" class="select" size="small">
+						<el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy" type="year" clearable />
+					</el-form-item>
+					<el-form-item label="任务名称" class="select" size="small">
+						<el-input v-model="queryInfo.task_name"></el-input>
+					</el-form-item>
+					<el-button type="success" size="small">查询</el-button>
+					<el-button class="btns" type="info" size="" @click="returnTask">
+						返回任务列表
+					</el-button>
+				</el-form> 
+			</el-row>
+		</div>
+
+            
         <!-- 表格区域 -->
 		<div class="table">
 			<!--  表格数据区域-->
@@ -167,6 +171,7 @@
 <style>
 .btns{
 	float:right;
+	padding: 10px;
 }
 .table{
 	padding: 10px;
@@ -180,4 +185,7 @@
 		border-top: 1px solid #e5e5e5;
 		text-align: center;
 		}
+.headSearch{
+		margin-left: 25px;
+}
 </style>

+ 116 - 70
src/components/admin/taskSample.vue

@@ -13,69 +13,49 @@
 			牵头单位
         <el-select v-model="value" placeholder="请选择">
             <el-option
-                v-for="item in options"
-                :key="item.value"
-                :label="item.label"
-                :value="item.value">
+                v-for="item in qiantouList"
+                :key="item.unit_id"
+                :label="item.unit_id"
+                :value="item.unit_id">
             </el-option>
         </el-select>
         <!-- 返回按钮 -->
 		<div class="btns">
-			<el-button type="info" size="small" @click="returnTask">
-				返回任务列表
-			</el-button>
-			<el-button type="info" size="small" @click="sendBack">
-				退回
+			<el-button plain size="" @click="returnTask()">
+				返回
 			</el-button>
 		</div>
-       
 	</div>
-		
-
 	<!-- 表格数据区域-->
 	<div class="table">
-		<el-table ref="multipleTable" 
-			:data="tableData" 
-			border stripe highlight-current-row 
-			style="width: 100%"
-			:row-style="rowStyle" 
-			:cell-style="cellStyle" 
-			@selection-change="handleSelectionChange">
-		<el-table-column type="selection" width="50">
-		</el-table-column>
+		<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%" 
+		:row-style="rowStyle" :cell-style="cellStyle"  @selection-change="handleSelectionChange">
 		<el-table-column label="序号" width="50px">
 			<template slot-scope="scope">
 				{{ scope.$index+1 }}
 			</template>
 		</el-table-column>
-		<el-table-column 
-			:key="table.label" 
-			v-for="table in tableHeader" 
-			:label="table.label" 
-			:prop="table.prop" 
-			align="center"
-			:width="table.width" 
-			:fixed="table.fixed">
-		</el-table-column>
+		<el-table-column :key="table.label" v-for="table in tableHeader" :label="table.label" :prop="table.prop" 
+		align="center" :width="table.width" :fixed="table.fixed"/>
 		<el-table-column label="操作" align="center" fixed="right">
 			<!-- 操作按钮区域的作用域插槽 -->
 			<template slot-scope="scope">
-					<el-button type="success" size="mini" @click="readDialogVisible1(scope.row)">抽样单详情</el-button>
+					<!-- <el-button type="success" size="mini" @click="readDialogVisible1(scope.row)">抽样单详情</el-button> -->
+					<el-button style="margin: 5px auto;" type="success" size="small" @click="readDialogVisible1()">查看详情</el-button>
+					<el-button  size="small"  @click="sendBack()">退回</el-button>
 			</template>
 		</el-table-column>
 		</el-table>
 			<!-- 分页器区域-->
 		<div class="block">
-				 <el-pagination
-					@size-change="handleSizeChange"
-					@current-change="handleCurrentChange"
-					:current-page="queryInfo.pageNum"
-					:page-sizes="[10, 15, 20]"
-					:page-size="queryInfo.pageSize"
-					layout="total, sizes, prev, pager, next, jumper"
-					:total="total"
-					background />
+				 <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pageNum"
+					:page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize" 
+					layout="total, sizes, prev, pager, next, jumper" :total="total" background />
 		</div>
+		<!-- 查看详情对话框 -->
+		<el-dialog title="查看" :visible.sync="readDialogVisible" width="80%" :close-on-click-modal="false" class="dialogItem">
+				<el-form v-if="readDialogVisible"></el-form>
+		</el-dialog>
 	</div>
 	</div>
 		
@@ -88,10 +68,10 @@
 		data() {
 			return {
 				total:0,
-				  options: [{
-					value: '选项1',
-					label: '部级监测机构'
-					}],
+				// 牵头单位下拉框
+				qiantouList: [
+				],
+				task_id:'',
 				queryInfo:{
 					year:'',
 					task_name:'',
@@ -100,7 +80,21 @@
 					ispublic:'',
 					pageSize:10,
 					pageNum:1,
-					task_class:'专项监测'
+					task_class:'专项监测',
+					// sample_id: '',
+					// sample_name:'',
+					// task_id:'',
+					// place:'',
+					// sample_date:'',
+					// sample_status:'',
+					// test_status:'',
+					// bear_name:'',
+					// check_name:'',
+					// report_name:'',
+					// underTake_task_id:'',
+					// unit_test_name:'',
+					// unit_production_name:'',
+					// undertake_id:''
 				},
             cellStyle: {
 					padding: 2 + 'px'
@@ -110,39 +104,39 @@
 				},
 			tableHeader: [{
 						label: '样品名称',
-						prop: '',
+						prop: 'sample_name',
 						width: 150
 						// fixed: 'left'
 					},
 					{
 						label: '样品编码',
-						prop: '',
-						width: 80
+						prop: 'sample_id',
+						width: 150
 						// fixed: 'left'
 					}, {
 						label: '商标',
-						prop: '',
+						prop: 'brand',
 						width: 150
 						// fixed: 'left'
 					},
 					{
 						label: '等级',
-						prop: '',
+						prop: 'level',
 						width: 120
 					},
 					{
 						label: '抽样基数',
-						prop: '',
+						prop: 'sample_base',
 						width: 120
 					},
 					{
 						label: '抽样场所',
-						prop: '',
+						prop: 'sample_ground',
 						width: 120
 					},
 					{
 						label: '状态',
-						prop: '',
+						prop: 'sample_status',
 						width: 180
 					}
 				],
@@ -150,29 +144,80 @@
 			tableData: []
 			}
 		},
-		created() {
-			
+		mounted: function() {
+			this.getJgCydList()
+			// this.getQtouList()
+		},
+		created: function() {
+			console.log(this.$route.params.task_id)
+			// this.unit_id = this.$route.params.unit_id
+			this.task_id = this.$route.params.task_id
+			this.getJgCydList()
+			// this.getQtouList()
 		},
+		
 		methods: {
-			sendBack(){},
-			// 获取牵头单位
-			getTaskById(){	
-			},
-			// 获取抽样单列表
-			getZLTaskSampleListByJcInfo(){
-				
+				handleSizeChange(val) {
+					console.log(`每页 ${val} 条`);
+				},
+				handleCurrentChange(val) {
+					this.queryInfo.pageNum = val;
+					console.log(`当前页: ${val}`);
+					this.getJgCydList()
+				},
+				// 批量选中
+				handleSelectionChange(val) {
+					this.multipleSelection = val;
+					console.log(this.multipleSelection)
 			},
+			//获取牵头单位列表
+			// async getQtouList() {
+			// 	const result = await this.$http.post('getQtouList', {
+			// 		task_id: this.task_id,
+			// 	})
+			// 	if (result.data.code == 0) {
+			// 		this.qiantouList = result.data.data
+			// 	}
+			// }
+			//返回
 			returnTask(){
 				this.$router.push('routineMonitor')
 			},
-			handleSizeChange(val) {
-        	console.log(`每页 ${val} 条`);
-      		},
-      		handleCurrentChange(val) {
-        		console.log(`当前页: ${val}`);
-      		}
-		},
-	}
+
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange1(newSize) {
+				this.queryInfo.pageSize = newSize
+				this.getJgCydList()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChange1(newPage) {
+				this.queryInfo.pageNum = newPage
+				this.getJgCydList()
+			},
+				// 获取抽样单列表
+				async getJgCydList() {
+				const result = await this.$http.post('getJgCydList', {
+					task_id: this.task_id,
+					pageSize:this.queryInfo.pageSize,
+					pageNum:this.queryInfo.pageNum
+				})
+				console.log( result.data)
+				console.log(this.queryInfo.pageSize)
+				if (result.data.code == 0) {
+				this.tableData = result.data.data
+				}
+				console.log(this.tableData)
+				},
+				//查看详情
+				async readDialogVisible1(row) {
+	
+			},
+				}
+		}
+	
+	
+	
 </script>
 
 <style>
@@ -181,5 +226,6 @@
 }
 .btns{
 	float:right;
+	padding: 10px;
 }
 </style>

+ 1 - 0
src/router/index.js

@@ -51,6 +51,7 @@ const routes = [{
 				component: () => import('../components/admin/takeTheLeadReportList')
 			},{
 				path: '/admin/taskSample',
+				name:'taskSample',
 				component: () => import('../components/admin/taskSample')
 			},{
 				path: '/admin/leadReport',