jiangyu 3 роки тому
батько
коміт
71fcc20195

+ 7 - 6
src/components/admin/routineMonitor.vue

@@ -108,7 +108,7 @@
 					</el-col>
 					<el-col style="margin-bottom: 5px;">
 						<el-button type="success" size="mini" plain @click="undertakeReport()">承担单位报告</el-button>
-						<el-button type="success" size="mini" plain @click="taskSample()">抽样单</el-button>
+						<el-button type="success" size="mini" plain @click="taskSample(scope.row.id)">抽样单</el-button>
 					</el-col>
 				</template>
 			</el-table-column>
@@ -301,17 +301,18 @@
 			add() {
 				this.$router.push('addTask')
 			},
-			ttaskSample() {
-				this.$router.push('taskSample')
-			},
+		
 			takeTheLeadReport() {
 				this.$router.push('takeTheLeadReportList')
 			},
 			undertakeReport(){
 				this.$router.push('undertakeReport')
 			},
-			taskSample(){
-				this.$router.push('taskSample')
+			taskSample(id){
+				console.log(id)
+				this.$router.push({
+					name:'taskSample',
+					params: {task_id:id}})
 			},
 			// 搜索
 			async searchData() {

+ 4 - 3
src/components/admin/taskSample.vue

@@ -11,12 +11,13 @@
 		<!-- 下拉菜单 -->
 	<div>
 			牵头单位
-        <el-select v-model="value" placeholder="请选择">
+        <el-select v-model="value" placeholder="请选择" clearable>
             <el-option
                 v-for="item in options"
                 :key="item.value"
                 :label="item.label"
-                :value="item.value">
+                :value="item.value"
+				@change="choseQt()">
             </el-option>
         </el-select>
         <!-- 返回按钮 -->
@@ -151,7 +152,7 @@
 			}
 		},
 		created() {
-			
+		
 		},
 		methods: {
 			sendBack(){},

+ 2 - 2
src/components/jc/sampleDetail.vue

@@ -198,8 +198,8 @@
 				const result = await this.$http.post('getSampleDetail', {
 					sample_id: this.id
 				})
-				console.log(result.data)
-					this.form = result.data[0]
+				console.log(result.data.data)
+					this.form = result.data.data
 					this.unit_test = this.form.unitTest
 					this.unit_production = this.form.unitProduction
 					this.unit_sample = this.form.unitSample

+ 4 - 4
src/router/index.js

@@ -49,16 +49,16 @@ const routes = [{
 			{
 				path: '/admin/takeTheLeadReportList',
 				component: () => import('../components/admin/takeTheLeadReportList')
-			},{
-				path: '/admin/taskSample',
-				component: () => import('../components/admin/taskSample')
 			},{
 				path: '/admin/leadReport',
 				component: () => import('../components/admin/leadReport')
 			},{
 				path: '/admin/undertakeReport',
 				component: () => import('../components/admin/undertakeReport')
-			},
+			},{
+				path: '/admin/taskSample',
+				component: () => import('../components/admin/taskSample')
+			}
 		]
 	},
 	{