Sfoglia il codice sorgente

Merge branch 'master' of http://192.168.3.53:11080/aielab/jcxt_qd

yyfang 3 anni fa
parent
commit
9dc23f2efe

+ 3 - 1
src/components/admin/jgsampleDetail.vue

@@ -163,7 +163,9 @@
 									<el-input v-model="form.file_name" disabled></el-input>
 
 								<!-- <el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"
-									action="http://syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
+
+									action="http://new.syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
+
 									<i class="el-icon-upload"></i>
 									<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
 								</el-upload> -->

+ 64 - 52
src/components/jc.vue

@@ -140,61 +140,72 @@ export default {
   created () {
     this.lastTime = new Date().getTime() // 网页第一次打开时,记录当前时间
     // 保证admin中的页面刷新后重置到/admin路由下
-    if (this.$route.path !== '/jc/routineMonitorqt') this.$router.push('/jc/routineMonitorqt')
+    if (this.$route.path !== '/jc/routineMonitor') this.$router.push('/jc/routineMonitor')
 let groupname = window.sessionStorage.getItem('groupname')
     let data1 = []
-    let data = [{
+    let data = [
+  //     {
+  //     // icon: 'el-icon-user-solid',
+  //     subMenuName: '监测模型',
+  //     children: [{
+  //       id: '1-1',
+  //       subMenuName: '模型配置',
+  //       path: '/jc/jcobj'
+  //     }
+	//   ]
+  //   },
+        {
       // icon: 'el-icon-user-solid',
-      subMenuName: '监测模型',
+      subMenuName: '主体信息',
       children: [{
         id: '1-1',
-        subMenuName: '模型配置',
-        path: '/jc/jcobj'
+        subMenuName: '信息维护',
+        path: '/jc/subjectInformation'
       }
 	  ]
     },
-    {
-      // icon: 'el-icon-s-custom',
-      subMenuName: '牵头单位',
-      children: [
-		  // {
-    //     id: '2-1',
-    //     subMenuName: '退回任务',
-    //     path: '/admin/'
-    //   },
-	  {
-        id: '2-2',
-        subMenuName: '例行监测',
-        path: '/jc/routineMonitorqt'
-      }
-	  ,{
-        id: '2-3',
-        subMenuName: '专项监测',
-        path: '/jc/specialMonitorqt'
-      },
-	  // {
-   //      id: '2-5',
-   //      subMenuName: '监测信息汇总',
-   //      path: '/admin/'
-   //    },{
-   //      id: '2-6',
-   //      subMenuName: '承担任务报告下载',
-   //      path: '/admin/'
-   //    },{
-   //      id: '2-7',
-   //      subMenuName: '项目总结报告上传',
-   //      path: '/admin/'
-   //    },{
-   //      id: '2-8',
-   //      subMenuName: '项目总结报告管理',
-   //      path: '/admin/'
-   //    },{
-   //      id: '2-9',
-   //      subMenuName: '系统报表',
-   //      path: '/admin/'
-   //    }
-      ]
-    },
+  //   {
+  //     // icon: 'el-icon-s-custom',
+  //     subMenuName: '牵头单位',
+  //     children: [
+	// 	  // {
+  //   //     id: '2-1',
+  //   //     subMenuName: '退回任务',
+  //   //     path: '/admin/'
+  //   //   },
+	//   {
+  //       id: '2-2',
+  //       subMenuName: '例行监测',
+  //       path: '/jc/routineMonitorqt'
+  //     }
+	//   ,{
+  //       id: '2-3',
+  //       subMenuName: '专项监测',
+  //       path: '/jc/specialMonitorqt'
+  //     },
+	//   // {
+  //  //      id: '2-5',
+  //  //      subMenuName: '监测信息汇总',
+  //  //      path: '/admin/'
+  //  //    },{
+  //  //      id: '2-6',
+  //  //      subMenuName: '承担任务报告下载',
+  //  //      path: '/admin/'
+  //  //    },{
+  //  //      id: '2-7',
+  //  //      subMenuName: '项目总结报告上传',
+  //  //      path: '/admin/'
+  //  //    },{
+  //  //      id: '2-8',
+  //  //      subMenuName: '项目总结报告管理',
+  //  //      path: '/admin/'
+  //  //    },{
+  //  //      id: '2-9',
+  //  //      subMenuName: '系统报表',
+  //  //      path: '/admin/'
+  //  //    }
+  //     ]
+  //   },
     {
       // icon: 'el-icon-s-data',
       subMenuName: '承担单位',
@@ -219,11 +230,12 @@ let groupname = window.sessionStorage.getItem('groupname')
         subMenuName: '专项监测',
         path: '/jc/specialMonitorcd'
       }
-	  // ,{
-   //      id: '3-5',
-   //      subMenuName: '监督抽查',
-   //      path: '/admin/'
-   //    },{
+	  ,{
+        id: '3-5',
+        subMenuName: '退回任务',
+        path: '/jc/returnTaskcd'
+      },
+   //{
    //      id: '3-6',
    //      subMenuName: '报告汇总',
    //      path: '/admin/'

+ 122 - 53
src/components/jc/fillSampleReport.vue

@@ -19,31 +19,28 @@
 			</el-steps>
 		</div>
 		<!-- 受检单位信息 -->
-		<div id="sjinformation" style="margin:40px auto; width:60%" v-show="active == 1">
+		<div id="sjinformation" style="margin:40px auto; width:50%" v-show="active == 1">
 			<el-form :rules="rules" :model="inspected_Unit">
 				<el-form-item label="单位名称:" prop="inspected_name" class="labelItem">
-					<el-input v-model="inspected_Unit.inspected_name" style="width:42%"></el-input>
+					<el-input v-model="inspected_Unit.inspected_name" style="width:60%"></el-input>
 				</el-form-item>
-				<el-form-item label="单位地址:" prop="inspected_address" class="labelItem">
-					<el-row>
-					<el-col :span="10" style="margin-right:10px;">	
-						<!-- <el-cascader placeholder="请选择地区" :options="region" v- model="selectedOptions" @change="handleChange" :props="{ expandTrigger: 'hover' }" style="width:100%">
-						</el-cascader> -->
-					</el-col>
-					<el-col :span="10">
-						<el-input v-model="inspected_Unit.inspected_address" placeholder="请输入详细地址" style="width:100%"></el-input>
-					</el-col>
-					</el-row>
+				<el-form-item label="单位地址:" prop="inspected_address" class="labelItem">	
+						<el-cascader placeholder="请选择地区" :options="options" v-model="selectedOptions" @change="handleChange" style="width:25%">
+						</el-cascader>
+						<el-input v-model="inspected_Unit.inspected_address2" placeholder="请输入详细地址" style="width:34%;margin-left:5px;"></el-input>
 				</el-form-item>
 				
+				<!-- <el-form-item label="" prop="inspected_address2" class="labelItem">	
+						<el-input v-model="inspected_Unit.inspected_address" placeholder="请输入详细地址" style="width:42%"></el-input>
+				</el-form-item> -->
 				<el-form-item label="联系人:" prop="contact_name" class="labelItem">
-					<el-input v-model="inspected_Unit.contact_name" style="width:42%"></el-input>
+					<el-input v-model="inspected_Unit.contact_name" style="width:60%"></el-input>
 				</el-form-item>
 				<el-form-item label="联系电话:" prop="contact_phone" class="labelItem">
-					<el-input v-model="inspected_Unit.contact_phone" style="width:42%"></el-input>
+					<el-input v-model="inspected_Unit.contact_phone" style="width:60%"></el-input>
 				</el-form-item>
 				<el-form-item label="Email:" prop="contact_email" class="labelItem">
-					<el-input v-model="inspected_Unit.contact_email" style="width:42%"></el-input>
+					<el-input v-model="inspected_Unit.contact_email" style="width:60%"></el-input>
 				</el-form-item>
 			</el-form>
 
@@ -61,7 +58,7 @@
 			<!-- </el-row> -->
 				<!--  表格数据区域-->
 			<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%; margin:auto;"
-				:row-style="rowStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange">
+				:row-style="rowStyle" :cell-style="cellStyle">
 				<el-table-column type="selection" width="50"></el-table-column>
 				<el-table-column label="序号" width="50px">
 					<template slot-scope="scope">
@@ -71,6 +68,13 @@
 
 				<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">
+						<template slot-scope="scope">
+						<el-col style="margin-bottom: 5px;">
+							<el-button type="success" size="mini" @click="deleteSample(scope.row.id)">删除</el-button>
+						</el-col>
+					</template>
+				</el-table-column>
 			</el-table>
 			<el-pagination style="margin-top:20px;" @size-change="handleSizeChange" @current-change="handleCurrentChange"
 				:current-page="queryInfo.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="queryInfo.pageSize"
@@ -82,40 +86,45 @@
 			</div>
 
 		</div>
-		<div id="sjinformation" style="margin:40px auto; width:60%" v-show="active == 3">
+		<div id="sjinformation" style="margin:40px auto; width:40%" v-show="active == 3">
 			<el-form :rules="rules2" :model="sample_unit">
 				<el-form-item label="抽样单编号:" prop="cyd_code" class="labelItem">
-					<el-input v-model="sample_unit.cyd_code" style="width:40%"></el-input>
+					<el-input v-model="sample_unit.cyd_code" style="width:65%"></el-input>
+				</el-form-item>
+
+					<el-form-item label="抽样地点:" prop="sample_address" class="labelItem">	
+						<el-cascader placeholder="请选择地区" :options="options" v-model="selectedOptions1" @change="handleChange1" style="width:28%">
+						</el-cascader>
+						<el-input v-model="sample_unit.sample_address2" placeholder="请输入详细地址" style="width:36%;margin-left:5px;"></el-input>
 				</el-form-item>
+
 				<el-form-item label="抽样人员1:" prop="sample_person_one" class="labelItem">
-					<el-input v-model="sample_unit.sample_person_one" style="width:40%"></el-input>
+					<el-input v-model="sample_unit.sample_person_one" style="width:65%"></el-input>
 				</el-form-item>
 				<el-form-item label="抽样人员2:" prop="sample_person_two" class="labelItem">
-					<el-input v-model="sample_unit.sample_person_two" style="width:40%"></el-input>
+					<el-input v-model="sample_unit.sample_person_two" style="width:65%"></el-input>
 				</el-form-item>
 				<el-form-item label="抽样单日期:" prop="cyd_date" class="labelItem">
-					<el-date-picker v-model="sample_unit.cyd_date" style="width: 42%;" align="right" type="date"
-						:picker-options="pickerOptions" clearable />
+					<el-date-picker v-model="sample_unit.cyd_date" style="width:65%;" align="right" type="date" clearable />
 				</el-form-item>
 				<el-form-item label="备注:" prop="cyd_log" class="labelItem">
-					<el-input v-model="sample_unit.cyd_log" style="width:40%"></el-input>
+					<el-input v-model="sample_unit.cyd_log" style="width:65%"></el-input>
 				</el-form-item>
 			</el-form>
 			<el-form>
-				<el-form-item label="抽样单报告上传:" prop="releaser" class="labelItem">
+				<el-form-item label="抽样单报告上传:" prop="sample_unit" class="labelItem">
 					<el-upload
 						class="upload-demo"
 						:headers="myHeaders"
-						action='http://syjcapi.aielab.net/api/v1'
+						action='http://new.syjcapi.aielab.net/api/v1/ossUpload'
 						:on-preview="handlePreview"
 						:on-remove="handleRemove"
 						:before-remove="beforeRemove"
+						:on-success="uploadSuccess"
 						multiple
-						:limit="3"
-						:on-exceed="handleExceed"
 						:file-list="fileList">
 						<el-button size="small" type="primary">点击上传</el-button>
-						<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
+						<div slot="tip" class="el-upload__tip">只能上传pdf文件,且不超过500kb</div>
 					</el-upload>
 				</el-form-item>
 			</el-form>
@@ -129,14 +138,17 @@
 			</div> -->
 
 		<!-- 新增样品信息弹框 -->
-		<el-dialog title="新增样品信息" :visible.sync="addSampleInforDialog" width="50%" :close-on-click-modal="false" class="dialogItem" append-to-body>
-		<el-form id="addSample" :rules="rules1" :model="product_Unit">
+		<el-dialog title="新增样品信息" :visible.sync="addSampleInforDialog" width="40%" :close-on-click-modal="false" class="dialogItem" append-to-body>
+		<el-form id="addSample" ref="form" :rules="rules1" :model="product_Unit">
 				<el-form-item label="样品名称:" prop="sample_name" class="labelItem">
-					<el-input v-model="product_Unit.sample_name" style="width:42%"></el-input>
+					<el-input v-model="product_Unit.sample_name" style="width:42%;"></el-input>
 				</el-form-item>
 				<!-- <el-form-item label="样品编号:" prop="releaser" class="labelItem" required>
 					<el-input v-model="" style="width:42%"></el-input>
 				</el-form-item> -->
+				<!-- <el-form-item label="抽样地点:" prop="sample_name" class="labelItem">
+					<el-input v-model="product_Unit.sample_name" style="width:42%"></el-input>
+				</el-form-item> -->
 				<el-form-item label="样品商标:" prop="sample_brand" class="labelItem">
 					<el-input v-model="product_Unit.sample_brand" style="width:42%"></el-input>
 				</el-form-item>
@@ -166,15 +178,14 @@
 					<el-input v-model="product_Unit.sample_base" style="width:42%"></el-input>
 				</el-form-item>
 				<el-form-item label="抽样时间:" prop="sample_ing_date" class="labelItem">
-					<el-date-picker v-model="product_Unit.sample_ing_date" style="width: 42%;" align="right" type="date"
-							:picker-options="pickerOptions" clearable />
+					<el-date-picker v-model="product_Unit.sample_ing_date" style="width: 42%;" align="right" type="date" clearable />
 				</el-form-item>
 				<el-form-item label="备注:" prop="sample_log" class="labelItem">
 					<el-input v-model="product_Unit.sample_log" style="width:42%"></el-input>
 				</el-form-item>
 			</el-form>
 			<div class="footer">
-				<el-button type="success" style="margin-bottom:30px;" size="small" @click="postSample()">确定</el-button>
+				<el-button type="success" style="margin-bottom:30px;" size="small" @click="postSample('form')">确定</el-button>
 			</div>
 		</el-dialog>
 </div>
@@ -218,7 +229,7 @@
 
 				rules: {
                 	inspected_name: [{required: true, message: '请输入单位名称', trigger: 'blur'},],
-					inspected_address: [{required: true, message: '请输入单位地址', trigger: 'blur'},],
+					// inspected_address: [{required: true, message: '请输入单位地址', trigger: 'blur'},],
 					contact_name: [{required: true, message: '请输入联系人', trigger: 'blur'},],
 					contact_phone: [{required: true, message: '请输入联系电话', trigger: 'blur'},]
 						},
@@ -274,6 +285,11 @@
 					}
 
 				],
+				// 产地
+				options: regionData,
+				selectedOptions: [],
+				//抽样地点
+				selectedOptions1: [],
 				// 数据表格数据
 				tableData: [],
 				// 批量删除选中数据
@@ -317,7 +333,9 @@
 					sample_person_one: '',
 					sample_person_two: '',
 					cyd_date: '',
-					cyd_log: ''
+					cyd_log: '',
+					file_url: '',
+					file_name: ''
 				},//填报抽样单最后一步
 				units: [],
 				production: [],
@@ -326,7 +344,7 @@
 				task_id: '',
 				undertake_id: '',
 				// 产地
-				options: regionData,
+				options: regionData[11].children,
 				selectedOptions: [],
 				// 日期选择器快捷选项
 				pickerOptions: {
@@ -362,9 +380,9 @@
 			console.log(this.task_id)
 			console.log(this.task_profile_id)
 			this.getCydObj()
-			
-
 			console.log(regionData)
+			console.log(regionData[11])
+
 		},
 		methods: {
 			// // 步骤条下一步
@@ -457,6 +475,9 @@
 			async postInspectedUnit() {
 				var that = this
 				that.inspected_Unit['cyd_id'] = that.cyd_id
+				console.log()
+				that.inspected_Unit.inspected_address = that.inspected_Unit.inspected_address1 + that.inspected_Unit.inspected_address2
+				console.log(that.inspected_Unit.inspected_address)
 				const res = await this.$http.post('postInspectedUnit',that.inspected_Unit)
 				console.log(res)
 				// 判断业务逻辑
@@ -469,7 +490,7 @@
 				// }
 			},
 			//保存样品信息
-			async postSample(){
+			async postSample(formName){
 				var that = this
 				that.product_Unit['cyd_id'] = that.cyd_id
 				const res = await this.$http.post('postSample',that.product_Unit)
@@ -482,6 +503,8 @@
 					});
 				} else {
 					this.addSampleInforDialog = false
+					this.$refs[formName].resetFields();
+					console.log(that.product_Unit)
 					this.getSamples()
 				}
 			
@@ -490,6 +513,7 @@
 			async postCydProfile(){
 				var that = this
 				that.sample_unit['cyd_id'] = that.cyd_id
+				that.sample_unit.sample_address = that.sample_unit.sample_address1 + that.sample_unit.sample_address2
 				const res = await this.$http.post('postCydProfile',that.sample_unit)
 				const result = await this.$http.post('postCyd',{
 					cyd_id: that.cyd_id,
@@ -503,6 +527,30 @@
 					}
 					});
 			},
+			//填报抽样单样品删除
+			async deleteSample(id) {
+				const res = await this.$http.post('deleteSample',{sample_id: id})
+				this.getSamples()
+			},
+			//上传文件
+			 handleRemove(file, fileList) {
+				console.log(file, fileList);
+			},
+			handlePreview(file) {
+				console.log(file);
+			},
+			beforeRemove(file, fileList) {
+				return this.$confirm(`确定移除 ${ file.name }?`);
+			},
+
+			// 上传成功
+			uploadSuccess(res) {
+				console.log(res.data)
+				this.sample_unit.file_url = res.data.fileUrl
+				this.sample_unit.file_name = res.data.fileName
+				console.log(this.sample_unit.file_url)
+				console.log(this.sample_unit.file_name)
+			},
 			//填报抽样单样品信息分页
 			handleSizeChange(val) {
 				this.queryInfo.pageSize = val;
@@ -525,18 +573,30 @@
 			},
 			// 获取样本列表
 			// 生成样品编码
-			// 获取选择产地
-			// handleChange() {
-			// 	var that = this
-			// 	var loc = "";
-			// 	// console.log(this.form.place)
-			// 	for (let i = 0; i < this.selectedOptions.length; i++) {
-			// 		loc += CodeToText[this.selectedOptions[i]];
-			// 	}
-			// 	// console.log(loc)
-			// 	that.cyd_data.place = loc
-			// 	console.log(that.cyd_data.place)
-			// },
+			// 获取受检单位地址
+			handleChange() {
+				var that = this
+				var loc = "";
+				console.log(this.selectedOptions)
+				for (let i = 0; i < this.selectedOptions.length; i++) {
+					loc += CodeToText[this.selectedOptions[i]];
+				}
+				console.log(loc)
+				that.inspected_Unit.inspected_address1 = loc
+				console.log(that.inspected_Unit.inspected_address1)
+			},
+			// 获取抽样地址
+			handleChange1() {
+				var that = this
+				var loc = "";
+				console.log(this.selectedOptions1)
+				for (let i = 0; i < this.selectedOptions1.length; i++) {
+					loc += CodeToText[this.selectedOptions1[i]];
+				}
+				console.log(loc)
+				that.sample_unit.sample_address1 = loc
+				console.log(that.sample_unit.sample_address1)
+			},
 			// 上传成功(要确认数据)
 			// uploadSuccess(res) {
 			// 	console.log(res.data)
@@ -629,22 +689,31 @@
 		left:135px;
 	}
 		.el-upload__tip{
-			margin-left: 8.125rem;
+			margin-left: 7.5rem;
 		}
 		.el-upload-list__item-name{
 			margin-left: 7.8125rem
 		}
+		.labelItem{
+			width: 120%;
+		}
+	
 	}
 	.footer {
 		margin-left: 45%;
 		margin-top: 20px;
 	}
 	/deep/ #addSample{
+		width: 80%;
+		margin: auto;
 		.el-form-item__label{
 			width: 17%;
 		}
 		.el-form-item__error{
 		left:155px;
 	}
+	.labelItem{
+		width: 160%;
+	}
 	}
 </style>

+ 1 - 0
src/components/jc/inputSample.vue

@@ -235,6 +235,7 @@
 			console.log(this.task_id)
 			console.log(this.undertake_id)
 			this.getTestObj()
+			console.log(this.regionData)
 		},
 		methods: {
 

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

@@ -123,9 +123,9 @@
 					</template>
 				</el-table-column>
 				<el-table-column label="检测标准" width="130px" align="center">
-					<template slot-scope="scope">
+					<!-- <template slot-scope="scope">
 						GB2763-2021
-					</template>
+					</template> -->
 				</el-table-column>
 			</el-table>
 			<div class="footer">

+ 445 - 0
src/components/jc/returnTaskcd.vue

@@ -0,0 +1,445 @@
+<template>
+
+	<div style="width: 100%">
+
+			<div slot="header" class="clearfix">
+				<el-breadcrumb separator-class="el-icon-arrow-right">
+					<el-breadcrumb-item>首页</el-breadcrumb-item>
+					<el-breadcrumb-item>承担单位</el-breadcrumb-item>
+					<el-breadcrumb-item>任务列表</el-breadcrumb-item>
+
+				</el-breadcrumb>
+			</div>
+			<!-- 头部搜索栏 -->
+			<el-row :gutter="50" style="margin-right: 0px;">
+				<el-form style="display: flex; flex-direction: row;" size="mini">
+					<el-form-item label="年度" class="select">
+						<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">
+						<el-select v-model="queryInfo.ispublic" style="width: 110px;">
+							<el-option v-for="item in taskstatus" :key="item.value" :label="item.label"
+								:value="item.value">
+							</el-option>
+						</el-select>
+					</el-form-item>
+					<el-form-item label="任务时间" class="select">
+						<el-date-picker v-model="queryInfo.starttime" style="width: 180px;" align="right" type="date"
+							:picker-options="pickerOptions" clearable />
+					</el-form-item>
+					<el-form-item label="--" class="select" style="margin-left: 10px; padding-left: 0px;">
+						<el-date-picker v-model="queryInfo.endtime" style="width: 180px;" align="right" type="date"
+							:picker-options="pickerOptions" clearable />
+					</el-form-item>
+					<el-form-item label="任务名称" class="select">
+						<el-input v-model="queryInfo.task_name"></el-input>
+					</el-form-item>
+					<!-- 查询 -->
+					<el-button style="height: 28px;margin-left: 10px;" size="mini" type="success" @click="searchData()">查询</el-button>
+					<!-- 重置 -->
+					<el-button style="height: 28px;margin-left: 5px;"  size="mini" type="success" @click="reset()">重置</el-button>
+				</el-form>
+			</el-row>
+			<!--  头部钮区域-->
+			<el-row :gutter="90" style="margin-right: 0px;">
+				<div style="display: flex;flex-direction: row;float: right;">
+					<!-- <el-button type="primary" size="small" plain icon="el-icon-plus" @click="add">新增</el-button>
+				<el-button type="primary" size="small" plain icon="el-icon-edit-outline" >发布</el-button>
+				<el-button type="primary" size="small" plain icon="el-icon-scissors" >废止</el-button>
+				<el-button type="primary" size="small" plain icon="el-icon-delete" >删除</el-button> -->
+					<el-button type="primary" size="small" plain icon="el-icon-download" @click="exportData">导出Excel</el-button>
+				</div>
+			</el-row>
+			<!--  表格数据区域-->
+			<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%"
+				:row-style="rowStyle" :cell-style="cellStyle">
+				<el-table-column type="selection" width="50" align="center"></el-table-column>
+				<el-table-column label="序号" width="50px" align="center">
+					<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 prop="ispublic" label="任务状态" align="center">
+					<template slot-scope="scope">
+						<el-tag type="danger" v-if="scope.row.ispublic==1">已发布</el-tag>
+						<el-tag type="danger" v-if="scope.row.ispublic==2">废止</el-tag>
+						<el-tag type="info" v-if="scope.row.ispublic==3">已结束,未完成</el-tag>
+						<el-tag type="success" v-if="scope.row.ispublic==4">已结束,已完成</el-tag>
+						<el-tag type="warning" v-if="scope.row.ispublic==5">执行中</el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="level" label="任务优先级" width="100" align="center">
+					<template slot-scope="scope">
+						<el-tag type="success" v-if="scope.row.level==0">一般</el-tag>
+						<el-tag type="warning" v-if="scope.row.level==1">紧急</el-tag>
+						<el-tag type="danger" v-if="scope.row.level==2">特急</el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="file_url" label="附件" width="80" align="center">
+					<template slot-scope="scope">
+						<span v-if="scope.row.file_url == null">--</span>
+						<el-link v-else type="primary" :href="scope.row.file_url">下载</el-link>
+					</template>
+				</el-table-column>
+				<el-table-column label="操作" align="center" fixed="right">
+					<!-- 操作按钮区域的作用域插槽 -->
+					<template slot-scope="scope">
+						<el-button type="success" size="mini" @click="runtask(scope.row.id)">执行任务</el-button>
+
+					</template>
+				</el-table-column>
+			</el-table>
+			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+				:current-page="queryInfo.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="queryInfo.pageSize"
+				layout="total, sizes, prev, pager, next, jumper" :total="total">
+			</el-pagination>
+	
+	</div>
+
+</template>
+
+<script>
+const qee = require('qf-export-excel')
+const HeadersList = [{
+						title: '任务名称',
+						key: 'task_name',
+					},
+					{
+						title: '年度',
+						key: 'year',
+					}, {
+						title: '文件号',
+						key: 'filenum',
+					},
+					{
+						title: '开始时间',
+						key: 'starttime',
+					},
+					{
+						title: '结束时间',
+						key: 'endtime',
+					},
+					{
+						title: '发布单位',
+						key: 'releaser',
+					},
+					{
+						title: '创建时间',
+						key: 'createtime',
+					},{
+						title: '任务状态',
+						key: 'ispublic'
+					},{
+						title: '任务优先级',
+						key: 'level'
+					}
+
+				]
+	export default {
+		name: '',
+		data() {
+			return {
+				total: 0,
+				cellStyle: {
+					padding: 2 + 'px'
+				},
+				rowStyle: {
+					height: 35 + 'px'
+				},
+				tableHeader: [{
+						label: '任务名称',
+						prop: 'task_name',
+
+						// fixed: 'left'
+					},
+					{
+						label: '年度',
+						prop: 'year',
+
+						// fixed: 'left'
+					}, {
+						label: '文件号',
+						prop: 'filenum',
+
+						// fixed: 'left'
+					},
+					{
+						label: '开始时间',
+						prop: 'starttime',
+
+					},
+					{
+						label: '结束时间',
+						prop: 'endtime',
+
+					},
+					{
+						label: '发布单位',
+						prop: 'releaser.name',
+
+					},
+					// {
+					// 	label: '创建时间',
+					// 	prop: 'create_time',
+					// 	// width: 180
+					// },
+
+				],
+			
+				// 数据表格数据
+				tableData: [],
+				// 批量删除选中数据
+				multipleSelection: [],
+				queryInfo:{
+					pageSize:10,
+					pageNum:1,
+					currentPage:1,
+					year:'',
+					ispublic:'',
+					starttime:'',
+					endtime:'',
+					task_name:'',
+					task_class:'retask'
+				},
+				// 任务状态选项
+				taskstatus: [{
+					value: '',
+					label: '全部'
+				},{
+					value: '2',
+					label: '已废止'
+				}, {
+					value: '3',
+					label: '已结束,未完成'
+				}, {
+					value: '4',
+					label: '已结束,已完成'
+				}, {
+					value: '5',
+					label: '执行中'
+				}],
+				// 日期选择器快捷选项
+				pickerOptions: {
+					disabledDate(time) {
+						return time.getTime() > Date.now();
+					},
+					shortcuts: [{
+						text: '今天',
+						onClick(picker) {
+							picker.$emit('pick', new Date());
+						}
+					}, {
+						text: '昨天',
+						onClick(picker) {
+							const date = new Date();
+							date.setTime(date.getTime() - 3600 * 1000 * 24);
+							picker.$emit('pick', date);
+						}
+					}, {
+						text: '一周前',
+						onClick(picker) {
+							const date = new Date();
+							date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
+							picker.$emit('pick', date);
+						}
+					}]
+				},
+			}
+		},
+
+		mounted: function() {
+			this.gettaskList()
+		},
+		methods: {
+			handleSizeChange(val) {
+				this.queryInfo.pageSize = val;
+				console.log(`每页 ${val} 条`);
+			},
+			handleCurrentChange(val) {
+				this.queryInfo.pageNum = val;
+				console.log(`当前页: ${val}`);
+				this.gettaskList()
+			},
+			add() {
+				// this.$router.push('')
+			},
+			async gettaskList() {
+				for (var key in this.queryInfo) {
+					if (this.queryInfo[key] == '') {
+						delete this.queryInfo[key]
+					}
+				}
+				const {
+					data: res
+				} = await this.$http.post(
+					"getCdTasks", this.queryInfo
+				);
+				console.log(res)
+				this.tableData = res.data.rows
+				this.total = res.data.total
+
+
+			},
+				// 搜索
+			async searchData() {
+				console.log(this.queryInfo)
+				this.queryInfo.pageNum = 1
+				this.gettaskList()
+			},
+
+			// 重置
+			reset(){
+				this.queryInfo={
+					year:'',
+					task_name:'',
+					starttime:'',
+					endtime:'',
+					ispublic:'',
+					pageSize:'',
+					pageNum:1,
+					task_class:'retask'
+				}
+				this.gettaskList()
+			},
+			runtask(id) {
+				console.log(id)
+				this.$router.push({
+					name: 'setReturnTask',
+					params: {
+						id: id
+					}
+				})
+			},
+			// 导出Excel
+			async exportData() {
+			
+				// for (var key in this.exportInfo) {
+				// 	if (this.exportInfo[key] == '') {
+				// 		delete this.exportInfo[key]
+				// 	}
+				// }
+			console.log(this.tableData)
+				let exportList = []
+					exportList = this.tableData
+					
+					for (let i = 0; i < exportList.length; i++) {
+						if (exportList[i].level == '0') {
+							exportList[i].level = '一般'
+						} else if (exportList[i].level == '1')  {
+							exportList[i].level = '紧急'
+						}else{
+							exportList[i].level = '特急'
+						}
+						if (exportList[i].ispublic == '1') {
+							exportList[i].ispublic = '已发布'
+						} else if(exportList[i].ispublic == '2')  {
+							exportList[i].ispublic = '废止'
+						}else if(exportList[i].ispublic == '3') {
+							exportList[i].ispublic = '已结束,未完成'
+						}else if(exportList[i].ispublic == '4') {
+							exportList[i].ispublic = '已结束,已完成'
+						}else if(exportList[i].ispublic == '5') {
+							exportList[i].ispublic = '执行中'
+						}
+					}
+				// 导出表格的表头设置
+				// let allColumns = exportList
+				var columnNames = []
+				var columnValues = []
+				// var columns = []
+				require.ensure([], () => {
+					const {
+						export_json_to_excel
+					} = require('@/vendor/Export2Excel.js')
+			
+					for (var i = 0; i < HeadersList.length; i++) {
+						columnNames[i] = HeadersList[i].title
+						columnValues[i] = HeadersList[i].key
+					}
+					const tHeader = columnNames
+					const filterVal = columnValues
+					// console.log(columns)
+					const list = exportList
+					const data = this.formatJson(filterVal, list)
+					export_json_to_excel(tHeader, data, '例行监测任务')
+				
+				})
+			},
+			formatJson(filterVal, jsonData) {
+				return jsonData.map(v => filterVal.map(j => v[j]))
+			},
+
+		},
+	}
+</script>
+
+<style lang="less" scoped>
+	.el-breadcrumb {
+		margin-bottom: 20px;
+	}
+	.el-table {
+		align-items: center;
+		margin-top: 25px;
+	}
+
+	/deep/ .el-col {
+		padding-right: 0 !important;
+	}
+
+	/deep/ .el-radio-group label {
+		width: 180px;
+		margin-right: 10px;
+	}
+
+	.el-pagination {
+		margin-top: 25px;
+	}
+
+	// .el-cascader {
+	// 	width: 290px;
+	// }
+
+	.el-select {
+		width: 210px;
+		height: 100%;
+	}
+
+	.select {
+		display: flex;
+		flex-direction: row;
+		margin-left: 10px;
+	}
+
+	.dialogItem /deep/ .el-dialog__body {
+		padding: 15px 12px 0;
+		color: #606266;
+		font-size: 14px;
+		word-break: break-all;
+	}
+
+	.el-form-item {
+		margin-bottom: 8px;
+		padding-left: 18px;
+	}
+
+	.labelItem /deep/ .el-form-item__label {
+		// width: 80px;
+		text-align: center;
+		vertical-align: middle;
+		float: left;
+		font-size: 13px;
+		color: #606266;
+		// line-height: 40px;
+		padding: 0 2px 0 0;
+		-webkit-box-sizing: border-box;
+		box-sizing: border-box;
+	}
+
+	// .el-form-item__content{
+	// 	margin-left: 0;
+	// }
+</style>

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

@@ -179,7 +179,7 @@ const HeadersList = [{
 					},
 					{
 						label: '发布单位',
-						prop: 'releaser',
+						prop: 'releaser.name',
 
 					},
 					// {
@@ -189,7 +189,7 @@ const HeadersList = [{
 					// },
 
 				],
-				total:'',
+			
 				// 数据表格数据
 				tableData: [],
 				// 批量删除选中数据

+ 118 - 129
src/components/jc/routineMonitorqt.vue

@@ -1,10 +1,11 @@
 <template>
+
 	<div style="width: 100%">
 
 			<div slot="header" class="clearfix">
 				<el-breadcrumb separator-class="el-icon-arrow-right">
 					<el-breadcrumb-item>首页</el-breadcrumb-item>
-					<el-breadcrumb-item>牵头单位</el-breadcrumb-item>
+					<el-breadcrumb-item>承担单位</el-breadcrumb-item>
 					<el-breadcrumb-item>任务列表</el-breadcrumb-item>
 
 				</el-breadcrumb>
@@ -12,45 +13,49 @@
 			<!-- 头部搜索栏 -->
 			<el-row :gutter="50" style="margin-right: 0px;">
 				<el-form style="display: flex; flex-direction: row;" size="mini">
-					<el-form-item label="年度" class="select" size="mini">
+					<el-form-item label="年度" class="select">
 						<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="mini">
+					<el-form-item label="任务状态" class="select">
 						<el-select v-model="queryInfo.ispublic" style="width: 110px;">
 							<el-option v-for="item in taskstatus" :key="item.value" :label="item.label"
 								:value="item.value">
 							</el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item label="任务时间" class="select" size="mini">
+					<el-form-item label="任务时间" class="select">
 						<el-date-picker v-model="queryInfo.starttime" style="width: 180px;" align="right" type="date"
 							:picker-options="pickerOptions" clearable />
 					</el-form-item>
-					<el-form-item label="--" class="select" style="margin-left: 10px;" size="mini">
+					<el-form-item label="--" class="select" style="margin-left: 10px; padding-left: 0px;">
 						<el-date-picker v-model="queryInfo.endtime" style="width: 180px;" align="right" type="date"
 							:picker-options="pickerOptions" clearable />
 					</el-form-item>
-					<el-form-item label="任务名称" class="select" size="mini">
+					<el-form-item label="任务名称" class="select">
 						<el-input v-model="queryInfo.task_name"></el-input>
 					</el-form-item>
 					<!-- 查询 -->
-					<el-button style="height: 28px;margin-left: 10px;" type="success"  size="mini" @click="searchData()">查询</el-button>
+					<el-button style="height: 28px;margin-left: 10px;" size="mini" type="success" @click="searchData()">查询</el-button>
 					<!-- 重置 -->
-					<el-button style="height: 28px;margin-left: 5px;" type="success"  size="mini" @click="reset()">重置</el-button>
+					<el-button style="height: 28px;margin-left: 5px;"  size="mini" type="success" @click="reset()">重置</el-button>
 				</el-form>
 			</el-row>
 			<!--  头部钮区域-->
 			<el-row :gutter="90" style="margin-right: 0px;">
 				<div style="display: flex;flex-direction: row;float: right;">
+					<!-- <el-button type="primary" size="small" plain icon="el-icon-plus" @click="add">新增</el-button>
+				<el-button type="primary" size="small" plain icon="el-icon-edit-outline" >发布</el-button>
+				<el-button type="primary" size="small" plain icon="el-icon-scissors" >废止</el-button>
+				<el-button type="primary" size="small" plain icon="el-icon-delete" >删除</el-button> -->
 					<el-button type="primary" size="small" plain icon="el-icon-download" @click="exportData">导出Excel</el-button>
 				</div>
 			</el-row>
 			<!--  表格数据区域-->
 			<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-column label="序号" width="50px">
+				:row-style="rowStyle" :cell-style="cellStyle">
+				<el-table-column type="selection" width="50" align="center"></el-table-column>
+				<el-table-column label="序号" width="50px" align="center">
 					<template slot-scope="scope">
 						{{ scope.$index+1 }}
 					</template>
@@ -58,33 +63,33 @@
 
 				<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 prop="level" label="任务优先级" align="center" width="100">
+				<el-table-column prop="ispublic" label="任务状态" align="center">
+					<template slot-scope="scope">
+						<el-tag type="danger" v-if="scope.row.ispublic==1">已发布</el-tag>
+						<el-tag type="danger" v-if="scope.row.ispublic==2">废止</el-tag>
+						<el-tag type="info" v-if="scope.row.ispublic==3">已结束,未完成</el-tag>
+						<el-tag type="success" v-if="scope.row.ispublic==4">已结束,已完成</el-tag>
+						<el-tag type="warning" v-if="scope.row.ispublic==5">执行中</el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="level" label="任务优先级" width="100" align="center">
 					<template slot-scope="scope">
 						<el-tag type="success" v-if="scope.row.level==0">一般</el-tag>
 						<el-tag type="warning" v-if="scope.row.level==1">紧急</el-tag>
 						<el-tag type="danger" v-if="scope.row.level==2">特急</el-tag>
 					</template>
 				</el-table-column>
-				<el-table-column prop="file_url" label="附件" align="center" width="60">
+				<el-table-column prop="file_url" label="附件" width="80" align="center">
 					<template slot-scope="scope">
-						<span v-if="scope.row.file_url==null">--</span>
+						<span v-if="scope.row.file_url == null">--</span>
 						<el-link v-else type="primary" :href="scope.row.file_url">下载</el-link>
 					</template>
 				</el-table-column>
-				<el-table-column prop="ispublic" label="任务状态"  align="center">
-				<template slot-scope="scope">
-					<el-tag type="success" v-if="scope.row.ispublic==1">已发布</el-tag>
-					<el-tag type="danger" v-if="scope.row.ispublic==2">废止</el-tag>
-					<el-tag type="info" v-if="scope.row.ispublic==3">已结束,未完成</el-tag>
-					<el-tag type="success" v-if="scope.row.ispublic==4">已结束,已完成</el-tag>
-					<el-tag type="warning" v-if="scope.row.ispublic==5">执行中</el-tag>
-				</template>
-			</el-table-column>
 				<el-table-column label="操作" align="center" fixed="right">
 					<!-- 操作按钮区域的作用域插槽 -->
 					<template slot-scope="scope">
-						<!-- <el-button type="warning" plain  size="small" @click="bindDialogShow1(scope.row)">绑定模型</el-button> -->
-						<el-button type="success"  size="mini" @click="runtask(scope.row.id)">执行任务</el-button>
+						<el-button type="success" size="mini" @click="runtask(scope.row.id)">执行任务</el-button>
+
 					</template>
 				</el-table-column>
 			</el-table>
@@ -92,40 +97,48 @@
 				:current-page="queryInfo.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="queryInfo.pageSize"
 				layout="total, sizes, prev, pager, next, jumper" :total="total">
 			</el-pagination>
-
+	
 	</div>
 
 </template>
 
 <script>
-		const qee = require('qf-export-excel')
-		const HeadersList = [{
-				title: '任务名称',
-				key: 'task_name'
-			}, {
-				title: '年度',
-				key: 'year'
-			},
-			{
-				title: '文件号',
-				key: 'filenum'
-			}, {
-				title: '开始时间',
-				key: 'starttime'
-			}, {
-				title: '结束时间',
-				key: 'endtime'
-			}, {
-				title: '创建者',
-				key: 'releaser'
-			}, {
-				title: '任务优先级',
-				key: 'level'
-			}, {
-				title: '任务状态',
-				key: 'ispublic'
-			}
-		]
+const qee = require('qf-export-excel')
+const HeadersList = [{
+						title: '任务名称',
+						key: 'task_name',
+					},
+					{
+						title: '年度',
+						key: 'year',
+					}, {
+						title: '文件号',
+						key: 'filenum',
+					},
+					{
+						title: '开始时间',
+						key: 'starttime',
+					},
+					{
+						title: '结束时间',
+						key: 'endtime',
+					},
+					{
+						title: '发布单位',
+						key: 'releaser',
+					},
+					{
+						title: '创建时间',
+						key: 'createtime',
+					},{
+						title: '任务状态',
+						key: 'ispublic'
+					},{
+						title: '任务优先级',
+						key: 'level'
+					}
+
+				]
 	export default {
 		name: '',
 		data() {
@@ -139,32 +152,44 @@
 				},
 				tableHeader: [{
 						label: '任务名称',
-						prop: 'task_name'
+						prop: 'task_name',
+
 						// fixed: 'left'
 					},
 					{
 						label: '年度',
-						prop: 'year'
+						prop: 'year',
+
 						// fixed: 'left'
 					}, {
 						label: '文件号',
 						prop: 'filenum',
+
 						// fixed: 'left'
 					},
 					{
 						label: '开始时间',
-						prop: 'starttime'
+						prop: 'starttime',
+
 					},
 					{
 						label: '结束时间',
-						prop: 'endtime'
+						prop: 'endtime',
+
 					},
 					{
 						label: '发布单位',
-						prop: 'releaser'
-					}
+						prop: 'releaser.name',
+
+					},
+					// {
+					// 	label: '创建时间',
+					// 	prop: 'create_time',
+					// 	// width: 180
+					// },
 
 				],
+			
 				// 数据表格数据
 				tableData: [],
 				// 批量删除选中数据
@@ -178,16 +203,13 @@
 					starttime:'',
 					endtime:'',
 					task_name:'',
-					task_class:'例行监测'
+					task_class:'专项监测'
 				},
 				// 任务状态选项
 				taskstatus: [{
 					value: '',
 					label: '全部'
-				}, {
-					value: '1',
-					label: '已发布'
-				}, {
+				},{
 					value: '2',
 					label: '已废止'
 				}, {
@@ -226,18 +248,12 @@
 						}
 					}]
 				},
-				bindDialogShow:false,
-				options:[],
-				bindForm:{}
 			}
 		},
 
 		mounted: function() {
 			this.gettaskList()
 		},
-		created: function() {
-			this.gettaskList()
-		},
 		methods: {
 			handleSizeChange(val) {
 				this.queryInfo.pageSize = val;
@@ -248,14 +264,27 @@
 				console.log(`当前页: ${val}`);
 				this.gettaskList()
 			},
-
-				// 批量选中
-			handleSelectionChange(val) {
-				this.multipleSelection = val;
-				console.log(this.multipleSelection)
+			add() {
+				// this.$router.push('')
 			},
+			async gettaskList() {
+				for (var key in this.queryInfo) {
+					if (this.queryInfo[key] == '') {
+						delete this.queryInfo[key]
+					}
+				}
+				const {
+					data: res
+				} = await this.$http.post(
+					"getCdTasks", this.queryInfo
+				);
+				console.log(res)
+				this.tableData = res.data.rows
+				this.total = res.data.total
+
 
-			// 搜索
+			},
+				// 搜索
 			async searchData() {
 				console.log(this.queryInfo)
 				this.queryInfo.pageNum = 1
@@ -270,40 +299,20 @@
 					starttime:'',
 					endtime:'',
 					ispublic:'',
-					pageSize:10,
+					pageSize:'',
 					pageNum:1,
-					task_class:'例行监测'
+					task_class:'专项监测'
 				}
 				this.gettaskList()
 			},
-
-		
-			// 获取任务列表
-			async gettaskList() {
-				console.log(this.queryInfo)
-				for (var key in this.queryInfo) {
-					if (this.queryInfo[key] == '') {
-						delete this.queryInfo[key]
+			runtask(id) {
+				console.log(id)
+				this.$router.push({
+					name: 'setTaskcd',
+					params: {
+						id: id
 					}
-				}
-				const {
-					data: res
-				} = await this.$http.post(
-					"getTaskTest", this.queryInfo
-				);
-				console.log(res)
-				this.tableData = res.data.rows
-				this.total = res.data.total
-			},
-
-			// 获取分页数据
-			async choseModel() {
-				const result = await this.$http.post('getPesticidesList', this.queryInfo)
-				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.pesticidesList = result.data.data.rows
-					this.total = result.data.data.total
-				}
+				})
 			},
 			// 导出Excel
 			async exportData() {
@@ -313,7 +322,7 @@
 				// 		delete this.exportInfo[key]
 				// 	}
 				// }
-			
+			console.log(this.tableData)
 				let exportList = []
 					exportList = this.tableData
 					
@@ -356,23 +365,13 @@
 					// console.log(columns)
 					const list = exportList
 					const data = this.formatJson(filterVal, list)
-					export_json_to_excel(tHeader, data, '例行监测任务')
+					export_json_to_excel(tHeader, data, '专项监测任务')
 				
 				})
 			},
 			formatJson(filterVal, jsonData) {
 				return jsonData.map(v => filterVal.map(j => v[j]))
 			},
-			// 执行任务
-			runtask(id) {
-				// console.log(id)
-				this.$router.push({
-					name: 'setTask',
-					params: {
-						id:id
-					}
-				})
-			}
 
 		},
 	}
@@ -423,7 +422,7 @@
 	}
 
 	.el-form-item {
-		margin-bottom: 30px;
+		margin-bottom: 8px;
 		padding-left: 18px;
 	}
 
@@ -440,16 +439,6 @@
 		box-sizing: border-box;
 	}
 
-	.cell {
-		display: flex;
-		flex-direction: row;
-	}
-	
-	.footer {
-		padding: 10px;
-		text-align: center;
-	}
-
 	// .el-form-item__content{
 	// 	margin-left: 0;
 	// }

+ 3 - 1
src/components/jc/sampleDetail.vue

@@ -162,8 +162,10 @@
 			<el-descriptions-item  label="被抽检单位签字盖章附件" prop="form.file_name" class="labelItem" style="" size="mini">
 									<el-input v-model="form.file_name" disabled></el-input>
 
-								<!-- <el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"
+								<!-- <el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"-success="uploadSuccess" :limit="1">
+=======
 									action="http://syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
+>>>>>>> 882955944facbe758b217653a97ca05d0048a4de
 									<i class="el-icon-upload"></i>
 									<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
 								</el-upload> -->

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

@@ -306,8 +306,8 @@
 						</template>
 					</el-table-column>
 					<el-table-column label="单位">
-						<template slot-scope="scope">
-							<span v-model="scope.row.unit" size="small">mg/kg</span>
+						<template>
+							<span size="small">mg/kg</span>
 						</template>
 					</el-table-column>
 					<el-table-column label="抽检结果">

+ 109 - 43
src/components/jc/sampleReport.vue

@@ -74,7 +74,7 @@
 	<!-- 受检单位情况 -->
 	<el-descriptions :column="1" border style="" >
 		<el-descriptions-item label="被抽查单位信息" >
-			<el-descriptions  :column="1" border  size="mini" style="width:100%">
+			<el-descriptions  :column="1" border  size="mini" style="width:100%;font-size:20px;">
 				<el-descriptions-item label="单位名称" prop="inspected_unit.inspected_name" size="mini" required>
 					{{inspected_unit.inspected_name}}
 				</el-descriptions-item>
@@ -94,47 +94,58 @@
 		</el-descriptions-item>
 	</el-descriptions>
 	<!-- 样品信息 -->
-		<el-descriptions :column="1" border style="">
+		<el-descriptions id="sampleInfo" :column="1" border style="">
 			<el-descriptions-item label="样品信息">
-				<el-descriptions  :column="1" border size="mini" style="width:100%">
-				<el-descriptions-item label="样品名称" prop="sample.sample_name" size="mini" required>
-					{{sample.sample_name}}
-				</el-descriptions-item>
-			</el-descriptions>
+				<el-descriptions  :column="1" border size="mini" style="width:100%;margin-bottom:5px">
+					<el-descriptions-item label="抽样地点" prop="cyd_data.cydProfile.sample_address" size="mini" required>
+						{{cyd_data.cydProfile.sample_address}}
+					</el-descriptions-item>
+				</el-descriptions>
+				<div>
+					<el-table :data="sample" border stripe highlight-current-row style="width: 100%;border:1px;"
+					:row-style="rowStyle" :cell-style="cellStyle">
+				<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>
+				</div>
+				
 			</el-descriptions-item>
 		</el-descriptions>
-	
-		
-		<!-- <el-descriptions  :column="2" border>
-			<el-descriptions-item label="检测任务依据" prop="cyd_data.base" class="labelItem" style="" size="mini" required>
-								<el-input v-model="cyd_data.base"></el-input>
-			</el-descriptions-item>
-			<el-descriptions-item  label="抽样时间" prop="cyd_data.sample_date" class="labelItem" style="" size="mini" required>
-								<el-date-picker v-model="cyd_data.sample_date" type="date" value-format="yyyy-MM-dd">
-								</el-date-picker>
-			</el-descriptions-item>
-			<el-descriptions-item  label="被抽检单位签字盖章附件" prop="cyd_data.file_url" class="labelItem" style="" size="mini">
-								<el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"
-									action="http://syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
-									<i class="el-icon-upload"></i>
-									<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-								</el-upload>
+		<!-- 抽样单位信息 -->
+		<el-descriptions :column="1" border style="" >
+			<el-descriptions-item label="抽样单位信息" >
+				<el-descriptions  :column="1" border  size="mini" style="width:100%">
+					<el-descriptions-item label="单位名称" prop="sampleOrgId.name" size="mini" required>
+						{{sampleOrgId.name}}
+					</el-descriptions-item>
+					<el-descriptions-item label="机构类型" prop="sampleOrgId.groupname" size="mini" required>
+						{{sampleOrgId.groupname}}
+					</el-descriptions-item>
+					<el-descriptions-item label="联系人" prop="sampleOrgId.contact_name" size="mini" required>
+						{{sampleOrgId.contact_name}}
+					</el-descriptions-item>
+					<el-descriptions-item label="联系电话" prop="sampleOrgId.contact_phone" size="mini" required>
+						{{sampleOrgId.contact_phone}}
+					</el-descriptions-item>
+				</el-descriptions>
 			</el-descriptions-item>
-		</el-descriptions> -->
+		</el-descriptions>
+	<!-- 备注 -->
+	<el-descriptions :column="1" border style="" >
+		<el-descriptions-item label="备注" > 
+			{{cyd_data.cydProfile.cyd_log}}
+		</el-descriptions-item>
+	</el-descriptions>
 	</div>
 <!-- 底部按钮 -->
 		<el-form>
 				<el-form-item class="btn">
 					<el-button type="primary" @click="back()">返回任务详情</el-button>
-					<el-button @click="resetForm()">重置</el-button>
-					<el-button @click="onSubmit">保存,继续添加</el-button>
+					<!-- <el-button @click="resetForm()">重置</el-button>
+					<el-button @click="onSubmit">保存,继续添加</el-button> -->
 				</el-form-item>
-			</el-form>
-			<!-- <el-form ref="form1" :model="form" label-width="110px"
-				style="margin-top: 20px;width: 48%;background-color: aliceblue;padding:10px 1px 1px 10px;">
-			</el-form> -->
+			</el-form>	
 		</div>
-		<!-- </el-card> -->
 </template>
 
 <script>
@@ -156,9 +167,18 @@
 				},
 				fileList: [],
 				form: {},
-				cyd_data: {},//抽样单信息上部分
-				inspected_unit: {},//受检单位信息
+				cyd_data: {
+					cydProfile: '',
+				},//抽样单信息上部分
+				inspected_unit: {
+					inspected_name: '',
+					inspected_address: '',
+					contact_name: '',
+					contact_phone: '',
+					contact_email: ''
+				},//受检单位信息
 				sample: {},//样品信息
+				sampleOrgId: [],//抽样单位信息
 				units: [],
 				production: [],
 				// 样品下拉框
@@ -167,11 +187,46 @@
 				undertake_id: '',
 				// 产地
 				options: regionData,
-				selectedOptions: []
+				selectedOptions: [],
+
+				cellStyle: {
+					padding: 2 + 'px'
+				},
+				rowStyle: {
+					height: 35 + 'px'
+				},
+				tableHeader: [{
+						label: '样品名称',
+						prop: 'sample_name'
+						// fixed: 'left'
+					},
+					{
+						label: '样品来源',
+						prop: 'sample_source',
+						// width: 180
+					},
+					{
+						label: '抽样数量',
+						prop: 'sample_count',
+						// width: 150
+					},
+					{
+						label: '抽样基数',
+						prop: 'sample_base',
+						// width: 100
+					},
+					{
+						label: '生产日期',
+						prop: 'sample_md_date',
+						// width: 100
+					}
+				],
 			}
 		},
 		created() {
+			this.task_id = this.$route.params.task_id
 			this.task_profile_id = this.$route.params.id
+			console.log(this.task_id)
 			console.log(this.task_profile_id)
 			this.getCyd()
 		},
@@ -186,9 +241,14 @@
 				this.cyd_data = result.data.data
 				this.inspected_unit = result.data.data.inspectedUnit
 				this.sample = result.data.data.sample
+				if(this.sample.sample_source == ''){
+					this.sample.sample_source = '自产'
+				}
+				this.sampleOrgId = result.data.data.taskProfile.sampleOrgId
 				console.log(this.cyd_data)
 				console.log(this.inspected_unit)
 				console.log(this.sample)
+				console.log(this.sampleOrgId)
 			},
 
 
@@ -244,14 +304,14 @@
 				}
 			},
 			// 重置表单
-			resetForm() {
-				// console.log(this.form)
-					this.cyd_data = '';
-					this.unit_test = '';
-					this.unit_production = '';
-					this.unit_sample = '';
-					this.selectedOptions = '';
-			},
+			// resetForm() {
+			// 	// console.log(this.form)
+			// 		this.cyd_data = '';
+			// 		this.unit_test = '';
+			// 		this.unit_production = '';
+			// 		this.unit_sample = '';
+			// 		this.selectedOptions = '';
+			// },
 			// 返回
 			back() {
 				var that = this
@@ -292,6 +352,12 @@
 	}
 	/deep/ #sampleReport{
 		.el-descriptions-item__label.is-bordered-label{
-		width: 15rem;}
+		width: 12%;
+		font-size: .875rem;
+		}
+		.el-descriptions-item__content{
+			font-size: .875rem;
+		}
 	}
+
 </style>

+ 1419 - 0
src/components/jc/setReturnTask.vue

@@ -0,0 +1,1419 @@
+<template>
+	<div>
+
+		<el-breadcrumb separator-class="el-icon-arrow-right">
+			<el-breadcrumb-item>首页</el-breadcrumb-item>
+			<el-breadcrumb-item>承担单位</el-breadcrumb-item>
+			<el-breadcrumb-item>任务列表</el-breadcrumb-item>
+			<el-breadcrumb-item>基本信息</el-breadcrumb-item>
+		</el-breadcrumb>
+
+		<!-- <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+			<el-tab-pane label="任务详情" name="taskDetail">
+			</el-tab-pane>
+
+			<el-tab-pane label="抽样" name="sampleDetail">
+				<sampleDetailcd v-if="activeName == 'sampleDetail'" ref="sampleDetail"></sampleDetailcd>
+			</el-tab-pane>
+
+			<el-tab-pane label="检测" name="testDetail">
+			</el-tab-pane>
+
+			<el-tab-pane label="报告上传" name="reportDetail">
+			</el-tab-pane>
+		</el-tabs> -->
+
+		<div id="taskDetail">
+		<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+			<el-tab-pane label="任务详情" name="first">
+				<el-descriptions class="margin-top" title=" " :column="2" :size="size" border>
+					<el-descriptions-item>
+						<template slot="label">
+							创建单位
+						</template>
+						{{readForm.creater.name}}
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							发布单位
+						</template>
+						{{readForm.releaser.name}}
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							年度
+						</template>
+						{{readForm.year}}
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							监测类型
+						</template>
+						{{readForm.task_class}}
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							开始时间
+						</template>
+						{{readForm.starttime}}
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							结束时间
+						</template>
+						{{readForm.endtime}}
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							抽检分离
+						</template>
+						<span v-if="readForm.is_divide==1">是</span>
+						<span v-if="readForm.is_divide==0">否</span>
+					</el-descriptions-item>
+					<el-descriptions-item>
+						<template slot="label">
+							附件
+						</template>
+						<div v-if="readForm.file_url==null">无</div>
+						<el-link v-else type="primary" :href="readForm.file_url">下载附件</el-link>
+					</el-descriptions-item>
+
+				</el-descriptions>
+				<el-descriptions class="margin-top" :size="size" border>
+					<el-descriptions-item>
+						<template slot="label">
+							备注
+						</template>
+						{{readForm.log}}
+					</el-descriptions-item>
+				</el-descriptions>
+			</el-tab-pane>
+		<el-tab-pane label="退回" name="fourth">
+			<div>
+				<el-table :data="thTask" border stripe highlight-current-row  @current-change="handlecyCurrentChange" style="width: 100%"
+					:row-style="rowStyle" :cell-style="cellStyle">
+					<el-table-column :key="table.label" v-for="table in thtableHeader" :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 style="margin:5px 0" type="success" size="small" @click="checkUnqualifiedItems(scope.row.task_id,scope.row.id)">查看不合格检测项
+						</el-button>
+					</template>
+					</el-table-column>
+				</el-table>
+
+				<!--    分页器区域-->
+					<el-pagination @size-change="handleSizeChangeth" @current-change="handleCurrentChangeth"
+					:current-page="queryInfoth.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfoth.pageSize"
+					layout="total, sizes, prev, pager, next, jumper" :total="thTaskTotal" background />
+				
+				<!-- 不合格检测项目 -->
+				<el-dialog title="不合格检测项目" :visible.sync="UnqualifiedJcxItemDialog" width="70%" :close-on-click-modal="false"
+				class="dialogItem">
+					<el-table :data="thjcxItems" border stripe highlight-current-row style="width: 100%"
+						:row-style="rowStyle" :cell-style="cellStyle">
+						<el-table-column type="selection" width="50" align="center"></el-table-column>
+						<el-table-column label="序号" width="50px" align="center">
+							<template slot-scope="scope">
+								{{ scope.$index+1 }}
+							</template>
+						</el-table-column>
+
+						<el-table-column :key="table.label" v-for="table in thjcxHeader" :label="table.label" :prop="table.prop"
+							align="center" :width="table.width" :fixed="table.fixed" />
+					</el-table>
+					<el-pagination @size-change="handleSizeChangethItems" @current-change="handleCurrentChangethItems"
+					:current-page="queryInfothItems.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfothItems.pageSize"
+					layout="total, sizes, prev, pager, next, jumper" :total="thItemsTotal" background />
+				</el-dialog>
+			</div>
+		</el-tab-pane>
+
+		<el-tab-pane label="抽样" name="second">
+			<!-- <el-tab-pane v-if="sampleShow==true" label="抽样" name="second"> -->
+
+				<!-- 头部搜索栏 -->
+				
+					<!-- <el-form style="display: flex; flex-direction: column;" ref="form2" :model="queryInfo">
+						<el-row style="width: 75%;">
+							<el-col :span="6">
+						<el-form-item label="样品名称" class="select" size="small" prop="sample_name">
+							<el-input v-model="queryInfo.sample_name"></el-input>
+						</el-form-item>
+							</el-col>
+							<el-col :span="6">
+						<el-form-item label="样品编码" class="select" size="small" prop="sample_id">
+							<el-input v-model="queryInfo.sample_id"></el-input>
+						</el-form-item>
+							</el-col>
+							<el-col :span="6">
+						<el-form-item label="受检单位" class="select" size="small" prop="units_name">
+							<el-input v-model="queryInfo.unit_test_name"></el-input>
+						</el-form-item>
+						</el-col>
+						</el-row>
+						<el-row style="width: 75%;">
+							<el-col :span="6">
+						<el-form-item label="抽样单位" class="select" size="small" prop="sample_unit_name">
+							<el-input v-model="queryInfo.unit_sample_name"></el-input>
+						</el-form-item>
+						    </el-col>
+							<el-col :span="6">
+						<el-form-item label="抽样日期" class="select" size="small" prop="sample_data">
+							<el-input v-model="queryInfo.sample_data"></el-input>
+						</el-form-item>
+						</el-col>
+						<el-col :span="6">
+						<el-form-item label="抽样场所" class="select" size="small" prop="sample_ground">
+							<el-input v-model="queryInfo.sample_ground"></el-input>
+						</el-form-item>
+						</el-col>
+						<el-col :span="4">
+							<el-button style="height: 32px;margin-left: 10px;" size="mini" type="success"
+							@click="searchData()">查询
+						</el-button>
+					
+						<el-button style="height: 32px;margin-left: 5px;" size="mini" type="success" @click="resetForm('form2')">
+							重置
+						</el-button>
+						</el-col>
+						</el-row>
+					</el-form> -->
+				<el-row style="margin-right: 0px;">
+				
+				<el-table :data="underTask" border stripe highlight-current-row  @current-change="handlecyCurrentChange" style="width: 100%"
+					:row-style="rowStyle" :cell-style="cellStyle">
+					<el-table-column :key="table.label" v-for="table in tableHeader2" :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 style="margin:5px 0" type="success" size="small" plain @click="input(scope.row.id)">填报抽样单
+						</el-button>
+						<el-button style="margin-bottom:5px" type="success" size="small" @click="getCydlist(scope.row.id)">查看抽样单列表
+						</el-button>
+							<!-- <el-button type="success" size="small" plain @click="sampleDetail(scope.row.sample_id)" @focus="getSampleListDialog = true">查看抽样单列表
+						</el-button> -->
+						<!-- <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="appear">上报抽样信息
+						</el-button> -->
+					</template>
+					</el-table-column>
+				</el-table>
+
+				<!-- 抽样单列表对话框 -->
+			<el-dialog title="抽样单列表" :visible.sync="getSampleListDialog" width="75%" :close-on-click-modal="false" class="dialogItem">
+				<el-form v-if="getSampleListDialog">
+					<!--  表格数据区域-->
+					<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row
+						@selection-change="handleSelectionChange" style="width: 100%" :row-style="rowStyle"
+						:cell-style="cellStyle">
+						<el-table-column type="selection" width="50"></el-table-column>
+						<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  label="附件" align="center" width="60">
+							<template slot-scope="scope">
+								<span v-if="scope.row.cydProfile.cyd_file_url==''">无</span>
+								<el-link v-else type="primary" :href="scope.row.cydProfile.cyd_file_url">下载</el-link>
+							</template>
+						</el-table-column> -->
+						<el-table-column label="操作" align="center" fixed="right">
+							<template slot-scope="scope">
+								<el-button style="margin:5px 5px" type="success" size="small" plain @click="sampleDetail(scope.row.id)">查看
+								</el-button>
+								<el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-if="scope.row.cyd_status == 1" @click="putCydStatus(scope.row.id)">上报抽样信息
+								</el-button>
+								<el-button style="margin:5px 5px" type="primary" size="small" plain icon="el-icon-edit-outline" v-else>抽样信息已上报
+								</el-button>
+							</template>
+						</el-table-column>
+					</el-table>
+					<!--    分页器区域-->
+					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+					:current-page="queryInfo.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo.pageSize"
+					layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+				</el-form>
+			</el-dialog>
+			</el-row>	
+		</el-tab-pane>
+
+			<el-tab-pane label="检测" name="third">
+			<!-- <el-tab-pane  v-if="checkShow==true"  label="检测" name="third"> -->
+			<el-table :data="underTask" border stripe highlight-current-row  @current-change="handlecyCurrentChange" style="width: 100%"
+					:row-style="rowStyle" :cell-style="cellStyle">
+				<el-table-column :key="table.label" v-for="table in tableHeader2" :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 style="margin:5px 0" type="success" size="small" @click="getJcdList(scope.row.id)">查看检测单列表
+					</el-button>
+				</template>
+				</el-table-column>
+			</el-table>
+			<!-- 查看检测单列表弹框 -->
+			<el-dialog title="检测单列表" :visible.sync="checkTestList" width="80%" :close-on-click-modal="false"
+				class="dialogItem">
+				<!--  表格数据区域-->
+				<el-table :data="tableData1" border stripe highlight-current-row style="width: 100%"
+					:row-style="rowStyle" :cell-style="cellStyle">
+					<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 checkHeader" :label="table.label"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+					<el-table-column label="操作" align="center" fixed="right" width="350px">
+						<template slot-scope="scope">
+							<el-button style="margin:5px 5px" type="success" size="mini" v-if="scope.row.jc_value_id==null" plain
+								@click="getJcdObj(scope.row.id)">填报检测单</el-button>
+							<el-button style="margin:5px 5px" type="primary" v-else size="mini" plain @click="update(scope.row)">修改</el-button>
+							<el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)" v-if="scope.row.cyd_status == 1">上报检测单
+							</el-button>
+							<el-button style="margin:5px 5px" type="primary" size="mini" plain @click="upJcdItem(scope.row.sample_id)" v-else>检测单已上报
+							</el-button>
+							<!-- <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="creatpdf(scope.row.sample_id)">生成检测报告
+							</el-button> -->
+						</template>
+					</el-table-column>
+				</el-table>
+
+				<!--    分页器区域-->
+				<el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
+					:current-page="queryInfo1.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo1.pageSize"
+					layout="total, sizes, prev, pager, next, jumper" :total="jcdListTotal" background />
+			</el-dialog>
+			</el-tab-pane>
+			
+
+			<el-dialog title="填报检测单" :visible.sync="inputJcdShow" width="70%" :close-on-click-modal="false"
+				class="dialogItem">
+
+
+			<div id="inputJcd" style="margin:10px 50px; width:100%">
+				<el-form :rules="rules" :model="jcd">
+					<el-row>
+					<el-col :span="10">
+					<el-form-item label="检测单编码:" prop="jcd_code" class="labelItem">	
+							<el-input v-model="jcd.jcd_code" placeholder="请输入检测单编码" style="width:50%;margin-left:5px;"></el-input>
+					</el-form-item>
+					</el-col>
+					<el-col :span="6">
+					<el-form-item label="检测结果:" prop="jcd_result" class="labelItem">
+						<el-radio-group v-model="jcd.jcd_result" @change="jcResult()">
+							<el-radio :label="1">合格</el-radio>
+							<el-radio :label="0">不合格</el-radio>
+						</el-radio-group>
+					</el-form-item>
+					</el-col>
+					</el-row>
+					<!-- 上传检测报告 -->
+					<el-form-item label="检测单报告上传:" prop="jcd" class="labelItem">
+					<el-upload
+						class="upload-demo"
+						:headers="myHeaders"
+						action='http://new.syjcapi.aielab.net/api/v1/ossUpload'
+						:on-preview="handlePreview"
+						:on-remove="handleRemove"
+						:before-remove="beforeRemove"
+						:on-success="uploadSuccess"
+						multiple
+						:file-list="fileList">
+						<el-button size="small" type="primary">点击上传</el-button>
+						<div slot="tip" class="el-upload__tip">只能上传pdf文件,且不超过500kb</div>
+					</el-upload>
+				</el-form-item>
+	
+				
+				</el-form>
+			</div>
+			<!-- <div v-show="jcd.jcd_result==0"> -->
+			<div style="display: flex;flex-direction: row;float: right;margin-bottom: 10px;" v-show="jcd.jcd_result==0">
+				<el-button type="success" size="small" plain @click="addJcxItemDialog = true">新增不合格项</el-button>
+			</div>
+				<!--  表格数据区域-->
+				<el-table :data="jcxItems" border stripe highlight-current-row style="width: 100%;"
+					:row-style="rowStyle" :cell-style="cellStyle" align="center" v-show="jcd.jcd_result==0">
+					<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 jcxHeader" :label="table.label"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed">
+
+					</el-table-column>
+					<el-table-column label="操作" align="center">
+							<template slot-scope="scope">
+							<el-col style="margin-bottom: 5px;">
+								<el-button type="success" size="mini" @click="delJcdItem(scope.row.id)">删除</el-button>
+							</el-col>
+						</template>
+					</el-table-column>
+				</el-table>
+
+				<!--    分页器区域-->
+				<el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
+					:current-page="queryInfo2.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo2.pageSize"
+					layout="total, sizes, prev, pager, next, jumper" :total="jcxItemTotal" background  v-show="jcd.jcd_result==0" />
+
+		
+			<div class="footer">
+				<el-button type="success" style="margin-bottom:30px;" size="small" @click="putJcd()">完成</el-button>
+			</div>
+			</el-dialog>
+
+			<el-dialog title="新增不合格检测项目" :visible.sync="addJcxItemDialog" width="40%" :close-on-click-modal="false"
+				class="dialogItem">
+				<div id="addUnqualifiedJcx" style="margin:auto;">
+				<el-form :rules="rules" :model="jcxItem" style="margin:10px auto;">
+					<el-form-item label="检测项目:" prop="item_name" class="labelItem">
+						<el-input v-model="jcxItem.item_name" style="width:42%"></el-input>
+					</el-form-item>
+					<el-form-item label="标准指标:" prop="item_standard" class="labelItem">	
+							<el-input v-model="jcxItem.item_standard" style="width:42%;"></el-input>
+					</el-form-item>
+					<el-form-item label="实测值:" prop="item_measured_value" class="labelItem">
+						<el-input v-model="jcxItem.item_measured_value" style="width:42%"></el-input>
+					</el-form-item>
+					<el-form-item label="单项判定:" prop="item_result" class="labelItem">
+						<el-input v-model="jcxItem.item_result" style="width:42%"></el-input>
+					</el-form-item>
+					<el-form-item label="监测依据:" prop="item_basis" class="labelItem">
+						<el-input v-model="jcxItem.item_basis" style="width:42%"></el-input>
+					</el-form-item>
+					<el-form-item label="备注:" prop="item_log" class="labelItem">
+						<el-input v-model="jcxItem.item_log" style="width:42%"></el-input>
+					</el-form-item>
+				</el-form>
+				</div>
+			<div class="footer">
+				<el-button type="success" style="margin-bottom:30px;" size="small" @click="postJcdItem()">保存</el-button>
+			</div>
+			</el-dialog>
+			<!-- ///////////////////////////////////////////检测报告生成-------难、、、、、、、、、、、、、、、、、、、、、、 -->
+			<el-dialog title="生成监测报告" :visible.sync="dialogVisible2" width="50%">
+				<div id="pdf">
+					<el-form ref="formjc" :model="formjc" label-width="100px"
+						style="margin-top: 20px;width: 100%;background-color: aliceblue;padding: 5px;">
+						<el-row style="text-align: center; font-size: 23px; margin: 40px 0;">
+							安徽省农业农村厅农产品质量安全例行监测检测报告
+						</el-row>
+						<el-row>
+							<el-col :span="12">
+								<el-form-item label="样品名称" prop="sample_name" class="labelItem" size="mini">
+									<el-input disabled v-model="formjc.sample_name"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="样品编码" prop="sample_id" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="formjc.sample_id"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col :span="12">
+								<el-form-item label="型号规格" prop="type" class="labelItem" size="mini">
+									<el-input disabled v-model="formjc.type"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="执行标准" prop="standard" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="formjc.standard"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col :span="12">
+								<el-form-item label="生产日期或批号" prop="production_date" class="labelItem" size="mini">
+									<el-input disabled v-model="formjc.production_date"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="产地" prop="place" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="formjc.place"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col :span="12">
+								<el-form-item label="产品认证情况" prop="certicfie" class="labelItem" size="mini">
+									<el-input disabled v-model="formjc.certicfie"></el-input>
+								</el-form-item>
+							</el-col>
+							<el-col :span="11">
+								<el-form-item label="证书编号" prop="certifie_num" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="formjc.certifie_num"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col :span="12">
+								<el-row>
+									<el-col :span="13">
+										<el-form-item label="抽样数量" prop="sample_num" class="labelItem" size="mini">
+											<el-input disabled v-model="formjc.sample_num"></el-input>
+										</el-form-item>
+									</el-col>
+									<el-col :span="10">
+										<el-form-item label="单位" prop="sample_num_unit" class="labelItem" size="mini"
+											label-width="60px">
+											<el-input disabled v-model="formjc.sample_num_unit"></el-input>
+										</el-form-item>
+									</el-col>
+								</el-row>
+							</el-col>
+							<el-col :span="11">
+								<el-row>
+									<el-col :span="13">
+										<el-form-item label="抽样基数" prop="sample_base" class="labelItem" size="mini">
+											<el-input disabled v-model="formjc.sample_base"></el-input>
+										</el-form-item>
+									</el-col>
+									<el-col :span="10">
+										<el-form-item label="单位" prop="sample_base_unit" class="labelItem" size="mini"
+											label-width="60px" clearable>
+											<el-input disabled v-model="formjc.sample_base_unit"></el-input>
+										</el-form-item>
+									</el-col>
+								</el-row>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col>
+								<el-form-item label="抽样场所" prop="sample_ground" class="labelItem" size="mini">
+									<el-input disabled v-model="formjc.sample_ground"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+						<el-row>
+							<el-col :span="7" style="text-align: center;vertical-align: middle;line-height: 250px;font-size: 14px;">
+								<div class="">
+									受检单位情况
+								</div>
+							</el-col>
+							<el-col :span="15">
+								<el-form-item label="单位名称" prop="unitTest.unit_test_name" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="unitTest.unit_test_name"></el-input>
+								</el-form-item>
+								<el-form-item label="通讯地址" prop="unitTest.address" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="unitTest.address"></el-input>
+								</el-form-item>
+								<el-form-item label="法定代表人" prop="unitTest.represent_name" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="unitTest.represent_name"></el-input>
+								</el-form-item>
+								<el-form-item label="受检人" prop="unitTest.user_name" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="unitTest.user_name"></el-input>
+								</el-form-item>
+								<el-form-item label="电话" prop="unitTest.phone" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="unitTest.phone"></el-input>
+								</el-form-item>
+								<el-form-item label="传真" prop="unitTest.fax" class="labelItem" style="" size="mini">
+									<el-input disabled v-model="unitTest.fax"></el-input>
+								</el-form-item>
+							</el-col>
+						</el-row>
+					</el-form>
+					<el-table :data="resultjc" border stripe highlight-current-row style="width: 100%"
+						:row-style="rowStyle" :cell-style="cellStyle">
+						<el-table-column :key="table.label" v-for="table in jcheader" :label="table.label"
+							:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+					</el-table>
+				</div>
+				<!-- <div  style="margin-top: 10px; text-align: center">
+				<el-button @click="dialogVisible2 = false">取 消</el-button>
+				<el-button type="primary" @click="download">生成检测报告pdf</el-button>
+				</div> -->
+				<!-- </span> -->
+			</el-dialog>
+
+			<!-- <el-tab-pane label="报告上传" name="five">
+				<el-upload class="upload-demo" :file-list="fileList" drag :headers="myHeaders"
+					action="http://syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
+					<i class="el-icon-upload"></i>
+					<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+				</el-upload>
+			</el-tab-pane> -->
+		</el-tabs>
+		</div>
+	</div>
+</template>
+
+<script>
+	import htmlToPdf from '../../assets/js/htmlToPdf.js'
+	import inputCheck from './inputCheck'
+	const token = window.sessionStorage.getItem('token')
+	const name = window.sessionStorage.getItem('name')
+	export default {
+		name: 'setTask',
+		data() {
+			return {
+				size: 'medium',
+				myHeaders: {
+					Authorization: token
+				},
+				rules: {
+                	item_name: [{required: true, message: '该项为必填项', trigger: 'blur'},],
+					// inspected_address: [{required: true, message: '请输入单位地址', trigger: 'blur'},],
+					item_standard: [{required: true, message: '该项为必填项', trigger: 'blur'},],
+					item_measured_value: [{required: true, message: '该项为必填项', trigger: 'blur'},],
+					item_result: [{required: true, message: '该项为必填项', trigger: 'blur'},],
+					item_basis: [{required: true, message: '该项为必填项', trigger: 'blur'},],
+					item_log: [{required: true, message: '该项为必填项', trigger: 'blur'},],
+						},
+				radio:{},
+				formjc: {},
+				unitTest: {},
+				dialogVisible2: false,
+				getSampleListDialog: false,//抽样单列表对话框
+				checkTestList: false,//检测单列表对话框
+				addJcxItemDialog: false,//新增不合格检测项目对话框
+				UnqualifiedJcxItemDialog: false,//退回中查看不合格检测项目对话框
+				jcxItemTotal: 0,
+				thItemsTotal: 0,
+				activeName: 'first',
+				jcxItems: {},
+				thjcxItems:{},
+				id: 0,
+				jcd: {
+					jcd_result: '',
+					file_name: '',
+					file_url: ''
+				},
+				readForm: {
+					creater: [],
+					releaser: [],
+					modelInfo: [],
+					model_type: '',
+				
+				},
+				// sample_name: '',
+				// sample_id: '',
+				sampleTask: [],
+				underTask: [],
+				
+				jcdListTotal: 0,
+				queryInfo: {
+					pageNum: 1,
+					pageSize: 10,
+				},
+				queryInfo1:{
+					pageNum: 1,
+					pageSize: 10,
+					task_id: '',
+					task_profile_id: ''
+				},	
+				queryInfo2:{
+					pageNum: 1,
+					pageSize: 10,
+					jcd_id: ''
+				},	
+				queryInfoth:{
+					pageNum: 1,
+					pageSize: 10,
+					task_id: ''
+				},
+				queryInfothItems:{
+					pageNum: 1,
+					pageSize: 10,
+					task_id: '',
+					task_profile_id: ''
+				},		
+				cellStyle: {
+					padding: 2 + 'px'
+				},
+				rowStyle: {
+					height: 35 + 'px'
+				},
+				tableHeader: [{
+						label: '抽样单编码',
+						prop: 'cyd_code'
+						// fixed: 'left'
+					},
+					{
+						label: '受检单位',
+						prop: 'inspectedUnit.inspected_name',
+						width: 180
+					},
+					{
+						label: '抽样日期',
+						prop: 'cydProfile.cyd_date',
+						width: 150
+					},
+					{
+						label: '状态',
+						prop: 'status',
+						width: 100
+					}
+				],
+				//获取检测单列表表格
+				checkHeader: [{
+						label: '抽样单编码',
+						prop: 'cyd_code'
+						// fixed: 'left'
+					},
+					{
+						label: '受检单位',
+						prop: 'inspectedUnit.inspected_name',
+						width: 180
+					},
+					{
+						label: '抽样日期',
+						prop: 'cydProfile.cyd_date',
+						width: 150
+					},
+					{
+						label: '状态',
+						prop: 'status',
+						width: 100
+					}
+				],
+
+				jcxHeader: [
+					{
+						label: '检测项目',
+						prop: 'item_name'
+						// fixed: 'left'
+					},
+					{
+						label: '标准指标',
+						prop: 'item_standard',
+						// width: 180
+					},
+					{
+						label: '实测值',
+						prop: 'item_measured_value',
+						// width: 150
+					},
+					{
+						label: '单项判定',
+						prop: 'item_result',
+						// width: 100
+					},
+					{
+						label: '检验依据',
+						prop: 'item_basis',
+						// width: 100
+					},
+					{
+						label: '备注',
+						prop: 'item_log',
+						// width: 100
+					},
+					],
+				thjcxHeader: [
+					{
+						label: '检测项目',
+						prop: 'item_name'
+						// fixed: 'left'
+					},
+					{
+						label: '标准指标',
+						prop: 'item_standard',
+						// width: 180
+					},
+					{
+						label: '实测值',
+						prop: 'item_measured_value',
+						// width: 150
+					},
+					{
+						label: '单项判定',
+						prop: 'item_result',
+						// width: 100
+					},
+					{
+						label: '检验依据',
+						prop: 'item_basis',
+						// width: 100
+					},
+					{
+						label: '备注',
+						prop: 'item_log',
+						// width: 100
+					},
+					],
+					
+				checkHeader2: [{
+					label: '检测项目',
+					prop: 'test_name',
+					// fixed: 'left'
+				}],
+				// 数据表格数据
+				tableData: [],
+				tableData1: [],
+				options: [],
+				// thTask: {
+				// 	sampleOrgId: '',
+				// 	checkOrgId: '',
+				// 	sample_address: ''
+				// },
+				thTask: [
+					
+				],
+				thTaskTotal: 0,
+				task_id: '',
+				multipleSelection: null,
+				// 填报检测对话框
+				inputJcdShow: false,
+				jcd_id: '',
+				testPesticides: [],
+				resultjc: [],
+				
+				jcheader: [{
+						label: '检测项目',
+						prop: 'test_name',
+					},
+					{
+						label: '检测值',
+						prop: 'test_value',
+					}, {
+						label: '限量值',
+						prop: 'state_value',
+					}, {
+						label: '单位',
+						prop: 'unit',
+					}, {
+						label: '抽检结果',
+						prop: 'test_result'
+					}, {
+						label: 'LOD',
+						prop: 'LOD',
+					}, {
+						label: 'LOQ',
+						prop: 'LOQ',
+					}
+				],
+				tableHeader2: [{
+						label: '抽样机构',
+						prop: 'sampleOrgId.name',
+						// width: 180,
+					}, {
+						label: '检测机构',
+						prop: 'checkOrgId.name'
+					},
+					{
+						label: '抽样地区',
+						prop: 'sample_address'
+					}, 
+				],
+				thtableHeader: [{
+						label: '抽样机构',
+						prop: 'sampleOrgId.name',
+						// width: 180,
+					}, {
+						label: '检测机构',
+						prop: 'checkOrgId.name'
+					},
+					{
+						label: '抽样地区',
+						prop: 'sample_address'
+					}, 
+				],
+				fileList: [],
+				total: 0,
+				sampleShow: false, //是否展示抽样卡片
+				checkShow: false, //是否展示检测卡片
+				currentRow: null,//选中机构地域表格数据项
+				jcxItem:{},//新增检测项目
+			};
+		},
+		components: {
+			inputCheck
+		},
+		mounted() {},
+		created() {
+			this.task_id = this.$route.params.id
+
+			this.getTask()
+			this.getCheckTaskList()
+			this.getOldTaskProfile()
+		},
+
+		methods: {
+			// 获取检测单列表
+			async getJcdList(id){
+				this.queryInfo1['task_id'] = this.task_id
+				this.queryInfo1['task_profile_id'] = id
+				this.checkTestList = true
+				this.getJcds()
+			},
+			async getJcds() {
+				const {
+					data: res
+				} = await this.$http.post("getJcds", this.queryInfo1);
+				// console.log(res)
+				this.tableData1 = res.data.rows
+				for(let i= 0; i < this.tableData1.length; i++) {
+					if(this.tableData1[i].cyd_status == 1) {
+						this.tableData1[i].status = '未上报'
+					}else {
+						this.tableData1[i].status = '已上报'
+					}
+				}
+				console.log(this.tableData1[0].cyd_status)
+				this.jcdListTotal = res.data.total
+				
+			},
+			// 获取抽样单列表
+			async getCydlist(id) {
+				this.queryInfo['task_id'] = this.task_id
+				this.queryInfo['task_profile_id'] = id
+				this.getSampleListDialog = true
+				this.getCyds()
+			},
+			async getCyds() {
+				const {
+					data: res
+				} = await this.$http.post("getCyds", this.queryInfo);
+				// console.log(res)
+				this.tableData = res.data.rows
+				for(let i= 0; i < this.tableData.length; i++) {
+					if(this.tableData[i].cyd_status == 1) {
+						this.tableData[i].status = '未上报'
+					}else {
+						this.tableData[i].status = '已上报'
+					}
+				}
+				console.log(this.tableData[0].status)
+				this.total = res.data.total	
+			},
+
+			// 删除不合格检测项目信息
+			async delJcdItem(id) {
+				let that = this
+				const result = await this.$http.post('delJcdItem', {jcd_item_id: id})
+				// 判断业务逻辑
+				if (result.data.code == 0) {
+					this.$message({
+						type: 'success',
+						message: '删除成功'
+					})
+					this.getJcdItems()
+				}
+			},
+			//新增不合格检测项目
+			async postJcdItem() {
+				let that = this
+				that.jcxItem['jcd_id'] = that.jcd_id
+				const result = await this.$http.post('postJcdItem', that.jcxItem)
+				if (result.data.code == 0) {
+				this.$message({
+					type: 'success',
+					message: '保存成功'
+				})
+				this.addJcxItemDialog = false
+				this.getJcdItems()
+			}
+			},
+			//获取不合格检测项目列表
+			async getJcdItems() {
+				let that = this
+				that.queryInfo2.jcd_id = that.jcd_id
+				const res = await this.$http.post('getJcdItems',that.queryInfo2)
+				console.log(res.data.data.rows)
+				this.jcxItems = res.data.data.rows
+				this.jcxItemTotal = res.data.data.total
+			},
+			//获取退回任务不合格检测项目列表
+			// async getthJcdItems() {
+			// 	let that = this
+			// 	that.queryInfo2.jcd_id = that.jcd_id
+			// 	const res = await this.$http.post('getUnqualifiedItem',that.queryInfo2)
+			// 	console.log(res.data.data.rows)
+			// 	this.thjcxItems = res.data.data.rows
+			// 	this.thjcxItemTotal = res.data.data.total
+			// },
+			//填报检测单完成
+			async putJcd() {
+				let that = this
+				that.jcd.jcd_id = that.jcd_id
+				const res = await this.$http.post('putJcd',that.jcd)
+				if (res.data.code == 0) {
+				this.$message({
+					type: 'success',
+					message: '填报检测单成功'
+				})
+				}
+				this.inputJcdShow = false
+			},
+			
+			//查询
+			async searchData() {
+				console.log(this.queryInfo)
+				this.queryInfo.pageNum = 1
+				this.getCyds()
+			},
+			//重置
+			resetForm(formName) {
+				// console.log(this.queryInfo)
+					this.$refs[formName].resetFields();
+			},
+			//选中抽样任务(单选)
+			handlecyCurrentChange(val) {
+				this.currentRow = val;
+				console.log(this.currentRow)
+				console.log(this.currentRow.id)
+
+				// under_id = 
+			},
+			//获取任务详情
+			async getTask() {
+				var that = this
+				const {
+					data: res
+				} = await this.$http.post("getTask", {
+					task_id: that.task_id,
+					pageNum: that.queryInfo.pageNum,
+					pageSize: that.queryInfo.pageSize
+				});
+				if(res.data.task_class = 'retask'){
+					res.data.task_class = '退回任务'
+				}
+				that.readForm = res.data
+				console.log(that.readForm)
+			},
+
+			//上传文件
+			 handleRemove(file, fileList) {
+				console.log(file, fileList);
+			},
+			handlePreview(file) {
+				console.log(file);
+			},
+			beforeRemove(file, fileList) {
+				return this.$confirm(`确定移除 ${ file.name }?`);
+			},
+
+			// 上传成功
+			uploadSuccess(res) {
+				console.log(res.data)
+				this.jcd.file_url = res.data.fileUrl
+				this.jcd.file_name = res.data.fileName
+				console.log(this.jcd.file_url)
+				console.log(this.jcd.file_name)
+			},
+
+			//退回任务列表
+			async getOldTaskProfile(){
+				this.queryInfoth['task_id'] = this.task_id
+				const res = await this.$http.post('getOldTaskProfile',this.queryInfoth)
+				console.log(res.data.data)
+				this.thTask = res.data.data.rows
+				this.thTaskTotal = res.data.data.total
+			},
+			//退回中查看不合格检测项目
+			async checkUnqualifiedItems(task_id,task_profile_id){
+				var that = this
+				that.queryInfothItems['task_id'] = task_id
+				that.queryInfothItems['task_profile_id'] = task_profile_id
+				const res = await this.$http.post('getUnqualifiedItem',that.queryInfothItems)
+				this.thjcxItems = res.data.data.rows
+				this.thItemsTotal = res.data.data.total
+				this.UnqualifiedJcxItemDialog = true
+			},
+
+			//抽样标签详情
+			async getSampleTaskList(){
+				for (var key in this.queryInfo) {
+				if (this.queryInfo[key] == '') {
+					delete this.queryInfo[key]
+					}
+				}
+				var that = this
+				const {
+					data: res
+				} = await this.$http.post("getSampleTaskList", {
+					task_id: that.task_id,
+					// pageNum: that.queryInfo.pageNum,
+					// pageSize: that.queryInfo.pageSize
+				});
+				console.log(res)
+				that.sampleTask = res.data.rows
+				console.log(that.sampleTask)
+			},
+
+			//检测标签详情
+			async getCheckTaskList(){
+				var that = this
+				const {
+					data: res
+				} = await this.$http.post("getCheckTaskList", {
+					task_id: that.task_id,
+					// pageNum: that.queryInfo.pageNum,
+					// pageSize: that.queryInfo.pageSize
+				});
+				console.log(res)
+				that.underTask = res.data.rows
+				console.log(that.underTask)
+			},
+
+
+			
+			// 上传成功
+			// async uploadSuccess(res) {
+			// 	console.log(res.data)
+			// 	this.form.file_url = res.data.fileUrl
+			// 	this.form.file_name = res.data.fileName
+			// 	const result = await this.$http.post('saveTestFile', {
+			// 		sample_id: sample_id
+			// 	})
+			// 	if (result.data.code == 0) {
+			// 		that.formjc = result.data.data
+			// 	}
+			// },
+			//下载检测报告
+			// download() {
+			// 	htmlToPdf.downloadPDF(document.querySelector('#pdf'), '检测报告')
+			// },
+			//生成检测报告pdf
+			// async creatpdf(sample_id) {
+			// 	var that = this
+			// 	that.dialogVisible2 = true
+			// 	// async getSampleDetail() {
+			// 	// const result = await this.$http.post('getSampleDetail', {
+			// 	// 	sample_id: sample_id
+			// 	// })
+			// 	// if (result.data.code == 0) {
+			// 	// 	that.formjc = result.data.data
+			// 	// }
+			// 	// console.log(that.formjc)
+			// 	const res = await this.$http.post('getTestValue', {
+			// 		sample_id: sample_id
+			// 	})
+			// 	console.log()
+			// 	if (res.data.code == 0) {
+			// 		that.formjc = res.data.data.result
+			// 		that.unitTest = res.data.data.result.unitTest
+			// 		that.resultjc = res.data.data.result_detail
+			// 	}
+			// 	console.log(that.formjc)
+			// 	console.log(that.resultjc)
+			// 	// },
+
+			// },
+			//保存检测单
+			// async saveJcdItem() {
+			// 	console.log(this.testPesticides)
+			// 	console.log(this.underInfo)
+			// 	for (let i = 0; i < this.testPesticides.length; i++) {
+			// 		this.testPesticides[i]['unit'] = 'mg/kg'
+			// 		console.log(this.testPesticides[i]['state_value'])
+			// 		if (this.testPesticides[i]['state_value'] === 'ND') {
+			// 			if (this.testPesticides[i]['test_value'] !== 'ND') {
+			// 				this.testPesticides[i]['test_result'] = '不合格'
+			// 			}
+			// 		} else {
+			// 			if (this.testPesticides[i]['test_value'] <= this.testPesticides[i]['state_value']) {
+			// 				this.testPesticides[i]['test_result'] = '合格'
+			// 			} else if (this.testPesticides[i]['test_value'] > this.testPesticides[i]['state_value']) {
+			// 				this.testPesticides[i]['test_result'] = '不合格'
+			// 			}
+			// 		}
+			// 		delete this.testPesticides[i]['test_model_id']
+			// 	}
+
+
+			// 	var that = this
+			// 	const result = await this.$http.post("saveJcdItem", {
+			// 		pesticides: that.testPesticides,
+			// 		sample_id: that.sample_id
+			// 	});
+			// 	if (result.data.data.disable_upload_data == '') {
+			// 		this.$message({
+			// 			type: 'success',
+			// 			message: '检测成功!'
+			// 		});
+			// 		that.inputCheckShow = false
+			// 		that.getJcdList(this.underInfo.underTake_id)
+			// 	} else if(result.data.data.enable_upload_data == ''){
+			// 		this.$message({
+			// 			type: 'error',
+			// 			message: '请输入检测数据'
+			// 		});
+			// 	} else{
+			// 		this.$message({
+			// 			type: 'error',
+			// 			message: '已存在数据保存失败,新增数据保存成功'
+			// 		});
+			// 		that.inputCheckShow = false
+			// 		that.getJcdList(this.underInfo.underTake_id)
+			// 	}
+			// },
+			//填报检测单
+			async getJcdObj(id) {
+				console.log(111)
+				this.inputJcdShow = true
+				console.log(222)
+				var that = this
+				const {
+					data: res
+				} = await this.$http.post("getJcdObj", {
+					cyd_id: id,
+				});
+			
+				that.jcd_id = res.data.jcd_id
+				console.log(that.jcd_id)
+			},
+			//检测单列表-上报
+			async upJcdItem(id){
+				var that = this
+				const result = await this.$http.post('upJcdItem', {
+					sample_id: id
+				})
+				console.log(result.data.data)
+				// this.getCyds()
+					// 判断业务逻辑
+					if (result.data.code == 0) {
+						this.$message({
+							type: 'success',
+							message: '上报抽样信息成功'
+						})
+						
+						this.getJcdList(result.data.data)
+					}
+			},
+			handleClick(tab, event) {
+				console.log(tab, event);
+			},
+			
+			// 跳转到填写抽样单
+			inputSample() {
+				this.activeName = 'second'
+			},
+			// 填报抽样单
+			input(id) {
+				console.log(id)
+				console.log(this.readForm.id)
+
+						this.$router.push({
+					name: 'fillSampleReport',
+					params: {
+						task_id: this.readForm.id,
+						under_id:id
+					}
+				})
+				// }
+				// if(isset(this.currentRow.id)){
+				// 	this.under_id=this.currentRow.id
+				// }
+			
+				// console.log(this.currentRow.id)
+			},
+			// 返回
+			back() {
+				var that = this
+				this.$router.push({
+					name: 'setTaskcd',
+					params: {
+						id: that.id
+					}
+				})
+			},
+			// 上传抽样信息
+			async putCydStatus(id) {
+				let that = this
+				// that.orgs = that.multipleSelection
+				// console.log(that.multipleSelection)
+				const result = await this.$http.post('putCydStatus', {
+					cyd_id: id
+				})
+				console.log(result.data.data)
+				// this.getCyds()
+					// 判断业务逻辑
+					this.$message({
+							type: 'success',
+							message: '上报抽样信息成功'
+						})
+						
+						this.getCyds(result.data.data)
+					// if (result.data.code == 0) {
+					// 	this.$message({
+					// 		type: 'success',
+					// 		message: '上报抽样信息成功'
+					// 	})
+						
+					// 	this.getCyds(result.data.data)
+					// }
+			},
+		
+			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
+			setPageNum() {
+				this.queryInfo.pageNum = 1
+				this.getCyds()
+			},
+			setSelectedRow() {
+				// 设置当前页已选项
+				this.hander = true
+				this.tableData.forEach(item => {
+					if (this.list.includes(item[this.uniqueKey])) {
+						this.$refs.multipleTable.toggleRowSelection(item, true)
+					}
+				})
+				this.hander = false
+			},
+
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange(newSize) {
+				this.queryInfo.pageSize = newSize
+				this.getCyds()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChange(newPage) {
+				this.queryInfo.pageNum = newPage
+				this.getCyds()
+			},
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange1(newSize) {
+				this.queryInfo1.pageSize = newSize
+				this.getJcdList()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChange1(newPage) {
+				this.queryInfo1.pageNum = newPage
+				this.getJcdList()
+			},
+				/** 监听每页显示多少数据的改变 */
+			handleSizeChange2(newSize) {
+				this.queryInfo2.pageSize = newSize
+				this.getJcdItems()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChange2(newPage) {
+				this.queryInfo2.pageNum = newPage
+				this.getJcdItems()
+			},
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChangeth(newSize) {
+				this.queryInfoth.pageSize = newSize
+				this.getOldTaskProfile()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChangeth(newPage) {
+				this.queryInfoth.pageNum = newPage
+				this.getOldTaskProfile()
+			},
+
+			handleSizeChangethItems(newSize) {
+				this.queryInfothItems.pageSize = newSize
+				this.checkUnqualifiedItems()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChangethItems(newPage) {
+				this.queryInfothItems.pageNum = newPage
+				this.checkUnqualifiedItems()
+			},
+			// 批量勾选
+			handleSelectionChange(val) {
+				this.multipleSelection = val
+				console.log(this.multipleSelection)
+				if (this.hander) return false
+				// this.setSelectRows() // 处理选中的方法
+			},
+			// 跳转到查看抽样单详情
+			sampleDetail(id) {
+				console.log(id)
+				console.log(this.task_id)
+
+				this.$router.push({
+					name: 'sampleReport',
+					params: {
+						task_id: this.task_id,
+						id: id
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+	.el-breadcrumb {
+		margin-bottom: 20px;
+	}
+
+	// .el-form-item {
+	// 	margin-bottom: 0px;
+	// }
+
+	.el-select {
+		width: 210px;
+		height: 100%;
+	}
+
+	.select {
+		display: flex;
+		flex-direction: row;
+		margin-left: 10px;
+	}
+
+	// .el-form {
+	// 	margin-left: 35%;
+	// }
+
+	// .el-form-item {
+	// 	// margin-bottom: 8px;
+	// 	margin: 0 auto;
+	// }
+
+	// .labelItem /deep/ .el-form-item__label {
+	// 	// width: 80px;
+	// 	text-align: center;
+	// 	vertical-align: middle;
+	// 	float: left;
+	// 	font-size: 14px;
+	// 	color: #606266;
+	// 	font-weight: bold;
+	// 	// line-height: 40px;
+	// 	padding: 0 20px 0 0;
+	// 	-webkit-box-sizing: border-box;
+	// 	box-sizing: border-box;
+	// }
+
+	.demonstration {
+		margin: 20px;
+	}
+
+	// .el-form-item__content {
+	// 	width: 200px;
+	// }
+
+	.footer {
+		margin-top: 20px;
+		margin-left: 45%;
+	}
+	.el-table{
+		margin-top: 20px;
+	}
+	.el-pagination {
+		margin-top: 25px;
+	}
+	/deep/ #taskDetail{
+		.el-descriptions-item__label.is-bordered-label{
+		width: 18.75rem;}
+	}
+	/deep/ #addUnqualifiedJcx{
+		.el-form-item__label{
+			width: 15%;
+		}
+		.el-form-item__error{
+		left: 6.875rem;
+	}
+	}
+	// /deep/ #inputJcd{
+	// 	.el-upload__tip{
+	// 		margin-left: 7.1875rem;
+	// 	}
+	// }
+</style>

File diff suppressed because it is too large
+ 543 - 302
src/components/jc/setTaskcd.vue


+ 34 - 23
src/components/jc/specialMonitorcd.vue

@@ -55,7 +55,7 @@
 			<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%"
 				:row-style="rowStyle" :cell-style="cellStyle">
 				<el-table-column type="selection" width="50" align="center"></el-table-column>
-				<el-table-column label="序号" width="50px"  align="center">
+				<el-table-column label="序号" width="50px" align="center">
 					<template slot-scope="scope">
 						{{ scope.$index+1 }}
 					</template>
@@ -63,15 +63,16 @@
 
 				<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 prop="ispublic" label="任务状态"  align="center">
+				<el-table-column prop="ispublic" label="任务状态" align="center">
 					<template slot-scope="scope">
+						<el-tag type="danger" v-if="scope.row.ispublic==1">已发布</el-tag>
 						<el-tag type="danger" v-if="scope.row.ispublic==2">废止</el-tag>
 						<el-tag type="info" v-if="scope.row.ispublic==3">已结束,未完成</el-tag>
 						<el-tag type="success" v-if="scope.row.ispublic==4">已结束,已完成</el-tag>
 						<el-tag type="warning" v-if="scope.row.ispublic==5">执行中</el-tag>
 					</template>
 				</el-table-column>
-				<el-table-column prop="level" label="任务优先级" width="100"  align="center">
+				<el-table-column prop="level" label="任务优先级" width="100" align="center">
 					<template slot-scope="scope">
 						<el-tag type="success" v-if="scope.row.level==0">一般</el-tag>
 						<el-tag type="warning" v-if="scope.row.level==1">紧急</el-tag>
@@ -80,19 +81,20 @@
 				</el-table-column>
 				<el-table-column prop="file_url" label="附件" width="80" align="center">
 					<template slot-scope="scope">
-						<el-link type="primary" :href="scope.row.fileurl">下载</el-link>
+						<span v-if="scope.row.file_url == null">--</span>
+						<el-link v-else type="primary" :href="scope.row.file_url">下载</el-link>
 					</template>
 				</el-table-column>
 				<el-table-column label="操作" align="center" fixed="right">
 					<!-- 操作按钮区域的作用域插槽 -->
 					<template slot-scope="scope">
-						<el-button type="success" size="mini" @click="runtask(scope.row.id)">执行检测</el-button>
+						<el-button type="success" size="mini" @click="runtask(scope.row.id)">执行任务</el-button>
 
 					</template>
 				</el-table-column>
 			</el-table>
 			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-				:current-page="currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="pageNum"
+				:current-page="queryInfo.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="queryInfo.pageSize"
 				layout="total, sizes, prev, pager, next, jumper" :total="total">
 			</el-pagination>
 	
@@ -135,6 +137,7 @@ const HeadersList = [{
 						title: '任务优先级',
 						key: 'level'
 					}
+
 				]
 	export default {
 		name: '',
@@ -176,24 +179,31 @@ const HeadersList = [{
 					},
 					{
 						label: '发布单位',
-						prop: 'releaser',
+						prop: 'releaser.name',
 
 					},
-					{
-						label: '创建时间',
-						prop: 'createtime',
-						// width: 180
-					},
+					// {
+					// 	label: '创建时间',
+					// 	prop: 'create_time',
+					// 	// width: 180
+					// },
 
 				],
+			
 				// 数据表格数据
 				tableData: [],
 				// 批量删除选中数据
 				multipleSelection: [],
-				queryInfo: {
+				queryInfo:{
 					pageSize:10,
 					pageNum:1,
 					currentPage:1,
+					year:'',
+					ispublic:'',
+					starttime:'',
+					endtime:'',
+					task_name:'',
+					task_class:'专项监测'
 				},
 				// 任务状态选项
 				taskstatus: [{
@@ -258,21 +268,23 @@ const HeadersList = [{
 				// this.$router.push('')
 			},
 			async gettaskList() {
+				for (var key in this.queryInfo) {
+					if (this.queryInfo[key] == '') {
+						delete this.queryInfo[key]
+					}
+				}
 				const {
 					data: res
 				} = await this.$http.post(
-					"getTaskcd", {
-						'pageNum': this.currentPage,
-						'pageSize': this.pageNum,
-						'task_class': '专项监测'
-					}
+					"getCdTasks", this.queryInfo
 				);
 				console.log(res)
 				this.tableData = res.data.rows
 				this.total = res.data.total
-			},
 
-			// 搜索
+
+			},
+				// 搜索
 			async searchData() {
 				console.log(this.queryInfo)
 				this.queryInfo.pageNum = 1
@@ -287,13 +299,12 @@ const HeadersList = [{
 					starttime:'',
 					endtime:'',
 					ispublic:'',
-					pageSize:10,
+					pageSize:'',
 					pageNum:1,
 					task_class:'专项监测'
 				}
 				this.gettaskList()
 			},
-
 			runtask(id) {
 				console.log(id)
 				this.$router.push({
@@ -354,7 +365,7 @@ const HeadersList = [{
 					// console.log(columns)
 					const list = exportList
 					const data = this.formatJson(filterVal, list)
-					export_json_to_excel(tHeader, data, '专项监测任务')
+					export_json_to_excel(tHeader, data, '例行监测任务')
 				
 				})
 			},

+ 183 - 0
src/components/jc/subjectInformation.vue

@@ -0,0 +1,183 @@
+<template>
+    <div>
+        	<div slot="header" class="clearfix">
+				<el-breadcrumb separator-class="el-icon-arrow-right">
+					<el-breadcrumb-item>首页</el-breadcrumb-item>
+					<el-breadcrumb-item>主体信息</el-breadcrumb-item>
+					<el-breadcrumb-item>信息维护</el-breadcrumb-item>
+				</el-breadcrumb>
+			</div>
+
+        <div id="ztinformation" style="margin:40px auto; width:60%">
+			<el-form :rules="rules" :model="inspected_Unit">
+                 <el-row style="text-align: center; font-size: 23px; margin: 40px 0;">
+                        主体信息维护
+                </el-row>
+				<el-form-item label="单位名称:" prop="user_id.name" class="labelItem">
+					<el-input v-model="ztinfo.user_id.name" style="width:42%"></el-input>
+				</el-form-item>
+				<el-form-item label="单位地址:" prop="address." class="labelItem">	
+						<!-- <el-cascader placeholder="请选择地区" :options="options" v-model="selectedOptions" @change="handleChange" style="width:15%">
+						</el-cascader> -->
+						<el-input v-model="ztinfo.address" placeholder="请输入详细地址" style="width:42%;margin-left:5px;"></el-input>
+				</el-form-item>
+				
+				<!-- <el-form-item label="" prop="inspected_address2" class="labelItem">	
+						<el-input v-model="inspected_Unit.inspected_address" placeholder="请输入详细地址" style="width:42%"></el-input>
+				</el-form-item> -->
+                <el-form-item label="法人代表:" prop="user_fa" class="labelItem">
+					<el-input v-model="ztinfo.user_fa" style="width:42%"></el-input>
+				</el-form-item>
+				<el-form-item label="联系人:" prop="user_id.contact_name" class="labelItem">
+					<el-input v-model="ztinfo.user_id.contact_name" style="width:42%"></el-input>
+				</el-form-item>
+				<el-form-item label="联系电话:" prop="user_id.contact_phone" class="labelItem">
+					<el-input v-model="ztinfo.user_id.contact_phone" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="QQ:" prop="user_id.contact_qq" class="labelItem">
+					<el-input v-model="ztinfo.user_id.contact_qq" style="width:42%"></el-input>
+				</el-form-item>
+				<el-form-item label="Email:" prop="user_id.contact_mail" class="labelItem">
+					<el-input v-model="ztinfo.user_id.contact_mail" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="依托单位:" prop="dtRelyOnUnit" class="labelItem">
+					<el-input v-model="ztinfo.dtRelyOnUnit" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="机构性质:" prop="jgxz" class="labelItem">
+					<el-input v-model="ztinfo.jgxz" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="统一社会信用代码:" prop="dtCode" class="labelItem">
+					<el-input v-model="ztinfo.dtCode" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="所属区域:" prop="ssqy" class="labelItem">
+					<el-input v-model="ztinfo.ssqy" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="邮编:" prop="zipcode" class="labelItem">
+					<el-input v-model="ztinfo.zipcode" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="技术负责人姓名:" prop="user_js" class="labelItem">
+					<el-input v-model="ztinfo.user_js" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="质量负责人姓名:" prop="user_zl" class="labelItem">
+					<el-input v-model="ztinfo.user_zl" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="资质情况:" prop="zizhi" class="labelItem">
+					<el-input v-model="ztinfo.zizhi" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="catl证书编号:" prop="catl_code" class="labelItem">
+					<el-input v-model="ztinfo.catl_code" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="catl到期时间:" prop="calt_expiration" class="labelItem">
+					<el-input v-model="ztinfo.calt_expiration" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="cma证书编号:" prop="cma_code" class="labelItem">
+					<el-input v-model="ztinfo.cma_code" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="cma到期时间:" prop="cma_code" class="labelItem">
+					<el-input v-model="ztinfo.cma_code" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="cma证书编号:" prop="cma_expiration" class="labelItem">
+					<el-input v-model="ztinfo.cma_expiration" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="农业农村部认可编号:" prop="mara_code" class="labelItem">
+					<el-input v-model="ztinfo.cma_code" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="农业农村部到期时间:" prop="mara_expiration" class="labelItem">
+					<el-input v-model="ztinfo.mara_expiration" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="产品范围:" prop="cpfw" class="labelItem">
+					<el-input v-model="ztinfo.cpfw" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="认证产品数量:" prop="shuliang" class="labelItem">
+					<el-input v-model="ztinfo.shuliang" style="width:42%"></el-input>
+				</el-form-item>
+                <el-form-item label="认证参数数量:" prop="canshu" class="labelItem">
+					<el-input v-model="ztinfo.canshu" style="width:42%"></el-input>
+				</el-form-item>
+			</el-form>
+
+			<div class="footer">
+				<el-button type="success" style="margin-bottom:30px;" size="small" @click="next1()">保存</el-button>
+			</div>
+		</div>
+    </div>
+</template>
+
+<script>
+	export default {
+		name: '',
+		data() {
+			return {
+				pageNum:1,
+                pageSize: 2,
+                ztinfo:''
+			}
+		},
+
+		mounted: function() {
+			
+		},
+		created(){
+            this.getOrganization()
+		},
+		
+		// watch: {
+		// 	monitorText(val) {
+		// 		this.$refs.tree.filter(val);
+		// 	}
+		// },
+		
+		methods: {
+            // async getJgOrgs() {
+            //     const result = await this.$http.post('getJgOrgs', {pageNum: this.pageNum,pageSize: this.pageSize})
+            // }
+            async getOrganization() {
+                const result = await this.$http.post('getOrganization')
+                console.log(result.data.data)
+                this.ztinfo = result.data.data
+            }
+        },
+	
+	}
+</script>
+
+<style lang="less" scoped>
+// #formzt .el-form{
+//     text-align: center;
+// }
+    /deep/ #ztinformation{
+		.el-form-item__label{
+			width: 14%;
+		}
+		.el-form-item__error{
+		left:135px;
+	}
+		.el-upload__tip{
+			margin-left: 7.5rem;
+		}
+		.el-upload-list__item-name{
+			margin-left: 7.8125rem
+		}
+	
+	}
+	.labelItem /deep/ .el-form-item__label {
+		// width: 80px;
+		text-align: center;
+		vertical-align: middle;
+		float: left;
+		font-size: 13px;
+		color: #606266;
+		// line-height: 40px;
+		padding: 0 2px 0 0;
+		-webkit-box-sizing: border-box;
+		box-sizing: border-box;
+	}
+    .footer {
+		margin-left: 45%;
+		margin-top: 20px;
+	}
+    // /deep/ .el-form{
+    //     display: flex;
+    //     justify-content: center;
+    // }
+</style>

+ 1 - 0
src/main.js

@@ -14,6 +14,7 @@ import axios from 'axios'
 // 使用axios
 // axios.defaults.baseURL = 'http://syjcapi.aielab.net/api/v1'
 axios.defaults.baseURL = 'http://new.syjc.com/api/v1'
+// axios.defaults.baseURL = 'http://new.syjcapi.aielab.net/api/v1'
 Vue.prototype.$http = axios
 Vue.config.productionTip = false
 axios.interceptors.request.use(

+ 12 - 0
src/router/index.js

@@ -209,6 +209,18 @@ const routes = [{
 				path: '/jc/fillSampleReport',
 				name:'fillSampleReport',
 				component: () => import('../components/jc/fillSampleReport')
+		},{
+			path: '/jc/returnTaskcd',
+			name:'returnTaskcd',
+			component: () => import('../components/jc/returnTaskcd')
+		},{
+			path: '/jc/subjectInformation',
+			name:'subjectInformation',
+			component: () => import('../components/jc/subjectInformation')
+		},{
+			path: '/jc/setReturnTask',
+			name:'setReturnTask',
+			component: () => import('../components/jc/setReturnTask')
 		}
 		]
 	},{

Some files were not shown because too many files changed in this diff