Ver código fonte

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

jiangyu 3 anos atrás
pai
commit
c0c736f3da

+ 55 - 14
src/components/admin.vue

@@ -13,6 +13,7 @@
 					<span>安徽省农产品质量安全监测系统</span>
 				</div>
 				<div class="right-function-container">
+					<el-button type="text" style="color:#FFFFFF" size="medium" @click="getAccount()">个人中心</el-button>
 					<el-button @click="logout">
 						退 出
 					</el-button>
@@ -24,7 +25,8 @@
 				<el-aside style="width: 210px;">
 					<!--        页面左侧菜单区域-->
 					<el-menu :default-active="$route.path" background-color="#EEF1F6" text-color="#48576a"
-						active-text-color="#31B404" :unique-opened="true" :collapse-transition="false" :router="true">
+						active-text-color="#31B404"  :collapse-transition="false" :router="true">
+						<!-- :unique-opened="true" -->
 						<!--            <el-menu-item
               index="/admin"
               @click="addTab('系统首页', '/admin')"
@@ -127,16 +129,29 @@
 				//   },
 				{
 					// icon: 'el-icon-user-solid',
-					subMenuName: '主体管理',
+					subMenuName: '主体信息管理',
 					children: [{
-							id: '6-1',
+							id: '4-1',
+							subMenuName: '检测机构',
+							path: '/admin/getOrganization'
+					},{
+							id: '4-2',
 							subMenuName: '监管机构',
-							path: '/admin/regulatoryAuthority'
-						}, {
-							id: '6-2',
-							subMenuName: '监测机构',
-							path: '/admin/testingFacility'
-						}
+							path: '/admin/getMonitor'
+					}]
+				},
+				{	
+
+					// subMenuName: '主体管理',
+					// children: [{
+					// 		id: '6-1',
+					// 		subMenuName: '监管机构',
+					// 		path: '/admin/regulatoryAuthority'
+					// 	}, {
+					// 		id: '6-2',
+					// 		subMenuName: '监测机构',
+					// 		path: '/admin/testingFacility'
+					// 	}
 						// ,{
 						//      id: '5-3',
 						//      subMenuName: '监测抽查',
@@ -145,10 +160,10 @@
 						//      id: '5-4',
 						//      subMenuName: '复检任务',
 						//      path: '/admin/'
-						//    },
-					]
-				},
-				{
+				// 		//    },
+				// 	]
+				// },
+				// {
 					// icon: 'el-icon-user-solid',
 					subMenuName: '监测任务',
 					children: [{
@@ -160,21 +175,36 @@
 							subMenuName: '专项监测',
 							path: '/admin/specialMonitor'
 						},
+						{
+						     id: '5-3',
+						     subMenuName: '监测抽查',
+						     path: '/admin/checkMonitor'
+						}
+
 						// ,{
 						//      id: '5-3',
 						//      subMenuName: '监测抽查',
 						//      path: '/admin/checkMonitor'
 						//    },{
+
 						//      id: '5-4',
 						//      subMenuName: '复检任务',
 						//      path: '/admin/'
 						//    },
-					]
+						]
 				},
+				//   },
+				
 			]
 			this.menuList = data
 		},
 		methods: {
+			// async getAccount() {
+			// 	const result = await this.$http.post('getAccount', {
+			// 		})},
+				getAccount() {
+				this.$router.push('getAccount')
+			},		
 			handleOpen(index) {
 				console.log(index)
 			},
@@ -289,11 +319,17 @@
 	}
 
 	// .el-menu-item.is-active {
+
+		// background-color: #3ace04 !important;
+
 	// 	// background-color: #3ace04 !important;
 	// }
 
 
 	// .admin-logo-container {
+		// border-color: #5EB9DE;
+		// border-right-width: 1px;
+		// border-right-style: solid;
 	// 	// border-color: #5EB9DE;
 	// 	// border-right-width: 1px;
 	// 	// border-right-style: solid;
@@ -351,4 +387,9 @@
 		position: absolute;
 		right: 15px;
 	}
+	.el-icon-s-custom{
+		padding: 5px;
+		float: right;
+		margin-top:10px;
+	}
 </style>

+ 103 - 128
src/components/admin/addTask.vue

@@ -11,8 +11,8 @@
 		<div class="title">
 			例行监测
 		</div>
-		<el-form :model="form" label-width="100px">
 
+		<el-form :model="form" label-width="100px">
 			<el-form-item label="任务名称" required>
 				<el-input v-model="form.task_name" placeholder="最长40字符"></el-input>
 			</el-form-item>
@@ -48,12 +48,18 @@
 			<!-- <el-form-item label="发布单位" required>
 				<el-input v-model="rymc" :disabled="true"></el-input>
 			</el-form-item> -->
-			<el-form-item label="牵头单位" required>
+			<!-- <el-form-item label="牵头单位" required>
 				<el-input v-model="form.main_unit" @focus="getTestListShow = true"></el-input>
-			</el-form-item>
+			</el-form-item> -->
 			<el-form-item label="文件号">
 				<el-input v-model="form.filenum"></el-input>
 			</el-form-item>
+			<el-form-item label="抽检分离:" prop="is_divide" width="70px" class="labelItem" required>
+					<el-select  v-model="form.is_divide" size="" >
+						<el-option v-for="item in divideOptions" :key="item.id" :label="item.name" :value="item.id">
+						</el-option>
+					</el-select>
+			</el-form-item>
 			<el-form-item label="备注">
 				<el-input type="textarea" placeholder="最长300字符" v-model="form.log"></el-input>
 			</el-form-item>
@@ -66,36 +72,11 @@
 				</el-upload>
 			</el-form-item>
 			<el-form-item>
-				<el-button type="success" @click="onSubmit">保存</el-button>
-				<el-button @click="reBack">返回</el-button>
+				<el-button type="success" @click="onSubmit()">保存</el-button>
+				<el-button type="success" @click="nextStep()">下一步</el-button>
+				<el-button @click="reBack()">返回</el-button>
 			</el-form-item>
 		</el-form>
-		<!-- 选择检测机构对话框 -->
-		<el-dialog title="机构选择" :visible.sync="getTestListShow" width="50%" :close-on-click-modal="false"
-			@open="getTestList()" class="dialogItem">
-			<el-form v-if="getTestListShow" :model="getTestListForm">
-				<!--  表格数据区域-->
-				<el-table ref="multipleTable" :data="testList" row-key="id" @selection-change="handleSelectionChange"
-					border stripe highlight-current-row style="width: 100%">
-					<el-table-column type="selection" :reserve-selection="true" 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.prop" v-for="table in tableHeader" :label="table.label"
-						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
-				</el-table>
-				<div class="footer">
-					<!--    分页器区域-->
-					<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-button type="success" @click="choseTest()">提交</el-button>
-				</div>
-
-			</el-form>
-		</el-dialog>
 	</div>
 </template>
 <script>
@@ -110,7 +91,7 @@
 				},
 				// 任务表单
 				form: {
-					main_unit: [],			
+					main_unit: [],	
 				},
 				// 优先级选项
 				priority: [{
@@ -133,45 +114,22 @@
 				}, {
 					label: '四季度'
 				}],
-				// 弹出检测机构弹窗
-				getTestListShow: false,
-				// 查询检测机构请求参数
-				queryInfo: {
-					pageNum: 1,
-					pageSize: 10,
-					keyWord: ''
-				},
-				// 检测机构列表
-				testList: [],
-				// 表头
-				tableHeader: [{
-						label: '单位名称',
-						prop: 'name',
-						width: 300
-						// fixed: 'left'
+				// 抽检分离选项
+				divideOptions: [{
+						id: 0,
+						name: '否'
 					},
 					{
-						label: '机构类型',
-						prop: 'groupname',
-						// width: 40
-						// fixed: 'left'
-					}, {
-						label: '所属区域',
-						prop: 'ssqy',
-						width: 300
-						// fixed: 'left'
+						id: 1,
+						name: '是'
 					}
 				],
-				// 总共多少条数据
-				total: 0,
-				// table表格多选选项
-				multipleSelection: null,
-				getTestListForm: {},
-				// 选中的牵头单位
-				orgs: [],
 				// 上传成功文件列表
 				fileList: []
 			}
+		},
+		created() {
+			
 		},
 		mounted() {
 			let that = this
@@ -186,7 +144,6 @@
 			//           );
 			//         });
 			//       });
-
 			// this.$nextTick(() => {
 			//   this.testList.forEach(outerItem => {
 			//     this.multipleSelection[this.page.current - 1] && this.multipleSelection[this.page.current - 1].forEach(item => {
@@ -198,6 +155,7 @@
 			// })
 		},
 		methods: {
+			//保存
 			async onSubmit() {
 				this.form['token'] = token
 				this.form['groupname'] = this.groupname
@@ -205,91 +163,108 @@
 				this.form['releaser'] = window.sessionStorage.getItem('rymc')
 				this.form['task_class'] = '例行监测'
 				this.form['ispublic'] = 0
-				console.log(this.form)
-				const result = await this.$http.post('AddTask', this.form)
+				const result = await this.$http.post('postTasks', this.form)
+				
+				
 				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.$router.push('routineMonitor')
+				if (result.code == 0) {
+						this.$message({
+						type: 'success',
+						message: result.data.message
+					})
 				} else {
 					this.$message({
-						type: 'error',
+						type: 'success',
 						message: result.data.message
 					})
 				}
+					
 			},
+			//返回
 			reBack() {
 				this.$router.push('routineMonitor')
 			},
-			// 获取任务列表
-			async getTask() {
-				const result = await this.$http.post('', this.queryInfo)
-				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.testList = result.data.data.rows
-					this.total = result.data.data.total
-				}else{
-					this.$message({
-						type: 'error',
-						message: result.data.message
-					})
+			//下一步
+			nextStep(id){
+			console.log(id)
+			this.$router.push({
+				name:'addTaskJcObject',
+				params:{
+					task_id:id
 				}
-			},
+			})
+			},			
+			// 获取任务列表
+			// async postTasks() {
+			// 	const result = await this.$http.post('postTasks', this.queryInfo)
+			// 	// 判断业务逻辑
+			// 	if (result.data.code == 0) {
+			// 		this.testList = result.data.data.rows
+			// 		this.total = result.data.data.total
+			// 		this.task_id = result.data.data.task_id
+			// 	}else{
+			// 		this.$message({
+			// 			type: 'error',
+			// 			message: result.data.message
+			// 		})
+			// 	}
+			// },
 			// 获取检测机构列表
-			async getTestList() {
-				this.queryInfo['token'] = token
-				const result = await this.$http.post('getTestList', this.queryInfo)
-				console.log(result);
+			// async getTestList() {
+			// 	this.queryInfo['token'] = token
+			// 	const result = await this.$http.post('getTestList', this.queryInfo)
+			// 	console.log(result);
 				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.testList = result.data.data.rows
-					this.total = result.data.data.total
-				}
-			},
+			// 	if (result.data.code == 0) {
+			// 		this.testList = result.data.data.rows
+			// 		this.total = result.data.data.total
+			// 	}
+			// },
 			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
-			setPageNum() {
-				this.queryInfo.pageNum = 1
-				this.getTestList()
-			},
-			setSelectedRow() {
-				// 设置当前页已选项
-				this.hander = true
-				this.testList.forEach(item => {
-					if (this.list.includes(item[this.uniqueKey])) {
-						this.$refs.multipleTable.toggleRowSelection(item, true)
-					}
-				})
-				this.hander = false
-			},
+			// setPageNum() {
+			// 	this.queryInfo.pageNum = 1
+			// 	this.getTestList()
+			// },
+			// setSelectedRow() {
+			// 	// 设置当前页已选项
+			// 	this.hander = true
+			// 	this.testList.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.getTestList()
-			},
+			// handleSizeChange(newSize) {
+			// 	this.queryInfo.pageSize = newSize
+			// 	this.getTestList()
+			// },
 
 			/** 监听页码的改变 */
-			handleCurrentChange(newPage) {
-				this.queryInfo.pageNum = newPage
-				this.getTestList()
-			},
-			// 批量勾选
-			handleSelectionChange(val) {
-				this.multipleSelection = val
-				if (this.hander) return false
-				// this.setSelectRows() // 处理选中的方法
-			},
+			// handleCurrentChange(newPage) {
+			// 	this.queryInfo.pageNum = newPage
+			// 	this.getTestList()
+			// },
+			// // 批量勾选
+			// handleSelectionChange(val) {
+			// 	this.multipleSelection = val
+			// 	if (this.hander) return false
+			// 	// this.setSelectRows() // 处理选中的方法
+			// },
 			// 提交
-			choseTest() {
-				let that = this
-				that.orgs = that.multipleSelection
-				console.log(that.orgs)
-				that.form.main_unit = that.multipleSelection.map(el => el.name).join(', ')
-				console.log(that.form.main_unit)
+			// choseTest() {
+			// 	let that = this
+			// 	that.orgs = that.multipleSelection
+			// 	console.log(that.orgs)
+			// 	that.form.main_unit = that.multipleSelection.map(el => el.name).join(', ')
+			// 	console.log(that.form.main_unit)
 				// that.form.main_unit = that.multipleSelection
 				// for(let i=0;i<that.multipleSelection.length;i++){
 				// 	that.form.main_unit.push(that.multipleSelection[i].name)
 				// }
-				that.getTestListShow = false
+				// that.getTestListShow = false
 
 			},
 			// 上传成功
@@ -299,7 +274,7 @@
 				this.form.file_name = res.data.fileName
 			}
 		}
-	}
+	
 </script>
 <style lang="less" scoped>
 	.title {

+ 466 - 0
src/components/admin/addTaskJcObject.vue

@@ -0,0 +1,466 @@
+<template>
+	<div style="width: 100%">
+		<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 :to="{path:'/admin/routineMonitor'}">任务列表</el-breadcrumb-item>
+			<el-breadcrumb-item>添加任务</el-breadcrumb-item>
+		</el-breadcrumb>
+		<div class="title">
+			例行监测
+		</div>
+		<el-form :model="form" label-width="100px">
+			<el-form-item prop="main_unit" label="抽样机构"  required>
+				<el-input v-model="form.main_unit" @focus="getOrganizationsShow1 = true"></el-input>
+			</el-form-item>
+			<el-form-item prop="check_unit" label="检测机构"   required>
+					<el-input v-model="form.check_unit" @focus="getOrganizationsShow2 = true"></el-input>
+			</el-form-item>
+			<el-form-item prop="sample_address" label="地区"   required>
+				<el-cascader  :options="region" v-model="sample_address"
+					@change="handleChange">
+				</el-cascader>
+			</el-form-item>
+		<!-- 底部按钮 -->
+			<el-form-item>
+				<el-button type="success" @click="onSubmit()">保存</el-button>
+				<el-button @click="reBack">返回</el-button>
+			</el-form-item>
+		</el-form>
+
+		<!-- 选择抽样机构对话框 -->
+		<el-dialog title="机构选择" :visible.sync="getOrganizationsShow1" width="50%" :close-on-click-modal="false" @open="getOrganizations1()" class="dialogItem">
+			<el-form v-if="getOrganizationsShow1" :model="getOrganizationsForm1">
+		<!-- 检索功能 -->
+		<el-row :gutter="20">
+			<el-col :span="6">
+				<!-- 组别名称 -->
+				<el-form-item label="组别名称">
+					<el-select v-model="form.groupname" clearable>
+						<el-option v-for="item in group" :key="item.value" :label="item.label" :value="item.value">
+						</el-option>
+					</el-select>
+				</el-form-item>
+			</el-col>
+			<el-col :span="6">
+				<!-- 机构性质 -->
+				<el-form-item label="机构性质">
+						<el-select v-model="form.properties" clearable>
+							<el-option v-for="item in field" :key="item.value" :label="item.label" :value="item.value">
+							</el-option>
+						</el-select>
+				</el-form-item>
+			</el-col>
+			<el-col :span="6">
+				<!-- 输入匹配关键词 -->
+				<!-- <el-form-item label="搜索名称">
+					<el-autocomplete
+						class="inline-input"
+						v-model="state2"
+						:fetch-suggestions="querySearch"
+						placeholder="请输入内容"
+						:trigger-on-focus="false"
+						@select="handleSelect">
+					</el-autocomplete>
+				</el-form-item> -->
+			</el-col>
+			<el-col :span="6">
+			<el-button type="success" @click="querySearch()" style="margin-top:40px">搜索</el-button>
+			</el-col>
+		</el-row>
+				<!--  表格数据区域-->
+				<el-table ref="multipleTable" :data="testList" row-key="id" @selection-change="handleSelectionChange1"
+					border stripe highlight-current-row style="width: 100%">
+					<el-table-column type="selection" :reserve-selection="true" 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.prop" v-for="table in tableHeader" :label="table.label"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+				</el-table>
+				<div class="footer">
+					<!--    分页器区域-->
+					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+						:current-page="queryInfo1.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo1.pageSize"
+						layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+					<el-button type="success" @click="choseTest1()">提交</el-button>
+				</div>
+				
+			</el-form>
+		</el-dialog>
+
+		<!-- 选择检测机构对话框 -->
+		<el-dialog title="机构选择" :visible.sync="getOrganizationsShow2" width="50%" :close-on-click-modal="false" @open="getOrganizations2()" class="dialogItem">
+			<el-form v-if="getOrganizationsShow2" :model="getOrganizationsForm2">
+		<!-- 检索功能 -->
+		<el-row :gutter="20">
+			<el-col :span="6">
+				<!-- 组别名称 -->
+				<el-form-item label="组别名称">
+					<el-select v-model="form.groupname" clearable>
+						<el-option v-for="item in group" :key="item.value" :label="item.label" :value="item.value">
+						</el-option>
+					</el-select>
+				</el-form-item>
+			</el-col>
+			<el-col :span="6">
+				<!-- 机构性质 -->
+				<el-form-item label="机构性质">
+						<el-select v-model="form.properties" clearable>
+							<el-option v-for="item in field" :key="item.value" :label="item.label" :value="item.value">
+							</el-option>
+						</el-select>
+				</el-form-item>
+			</el-col>
+			<el-col :span="6">
+				<!-- 输入匹配关键词 -->
+				<!-- <el-form-item label="搜索名称">
+					<el-autocomplete
+						class="inline-input"
+						v-model="state2"
+						:fetch-suggestions="querySearch"
+						placeholder="请输入内容"
+						:trigger-on-focus="false"
+						@select="handleSelect">
+					</el-autocomplete>
+				</el-form-item> -->
+			</el-col>
+			<el-col :span="6">
+			<el-button type="success" @click="choseTest()" style="margin-top:40px">搜索</el-button>
+			</el-col>
+		</el-row>
+				<!--  表格数据区域-->
+				<el-table ref="multipleTable" :data="testList" row-key="id"  @current-change="handleSelectionChange2"
+					border stripe highlight-current-row style="width: 100%" >
+					<!-- <el-table :data="testList" border stripe highlight-current-row  @current-change="handleSelectionChange2" style="width: 100%"
+					:row-style="rowStyle" :cell-style="cellStyle"> -->
+					<el-table-column type="selection" :reserve-selection="true" 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.prop" v-for="table in tableHeader" :label="table.label"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+				</el-table>
+				<div class="footer">
+					<!--    分页器区域-->
+					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+						:current-page="queryInfo2.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo2.pageSize"
+						layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+					<el-button type="success" @click="choseTest2()">提交</el-button>
+				</div>
+				
+			</el-form>
+		</el-dialog>
+			
+
+	</div>
+</template>
+<script>
+import {
+		regionData,
+		regionDataPlus,
+	} from 'element-china-area-data'
+	const rymc = window.sessionStorage.getItem('rymc')
+	const token = window.sessionStorage.getItem('token')
+	export default {
+		data() {
+			return {
+					form: {
+					bear_unit: '',
+					report_unit: '',
+					// check_unit: '',
+					sample_number: '',
+					sample_address: '',
+					uploadtime: '',
+					groupname:'',
+					properties:'',
+					main_unit:[],
+					check_unit:[]
+				},
+				currentRow: null,
+				//组别名称
+				group: [{
+					value: '1',
+					label: '检测机构'
+				}, {
+					value: '2',
+					label: '县级监管单位'
+				}, {
+					value: '3',
+					label: '市级监管单位'
+				},{
+					value: '4',
+					label: '省级监管单位'
+				}],
+				//机构性质
+				field: [{
+					value: '1',
+					label: '政府部门'
+				}, {
+					value: '2',
+					label: '事业单位'
+				}, {
+					value: '3',
+					label: '企业'
+				}],
+
+				// 抽样地区
+				region: regionData,
+				// sample_address: [],
+				// 机构地域表格数据
+				underTask: [],
+				underTasktotal: 0,
+				// 抽检分离选项
+				divideOptions: [{
+						id: 0,
+						name: '否'
+					},
+					{
+						id: 1,
+						name: '是'
+					}
+				],
+				// rymc: rymc,		//从本地缓存获取发布单位
+				myHeaders: {
+					Authorization: 'bearer'+ token			//上传文件添加token
+				},
+				// 任务表单
+				// form: {
+				// 	main_unit: [],	
+				// 	check_unit: [],				
+				// },
+				// form: {
+				// 	check_unit: [],			
+				// },
+				// 优先级选项
+				priority: [{
+					value: '0',
+					label: '一般'
+				}, {
+					value: '1',
+					label: '紧急'
+				}, {
+					value: '2',
+					label: '特急'
+				}],
+				// 批次选项
+				batch: [{
+					label: '一季度'
+				}, {
+					label: '二季度'
+				}, {
+					label: '三季度'
+				}, {
+					label: '四季度'
+				}],
+
+				// 弹出抽样机构弹窗
+				getOrganizationsShow1: false,
+				// 查询检测机构请求参数
+				queryInfo1: {
+					pageNum: 1,
+					pageSize: 10,
+					keyWord: ''
+				},
+
+				// 弹出检测机构弹窗
+				getOrganizationsShow2: false,
+				// 查询检测机构请求参数
+				queryInfo2: {
+					pageNum: 1,
+					pageSize: 10,
+					keyWord: ''
+				},
+				// 检测机构列表
+				testList: [],
+				// 表头
+				tableHeader: [{
+						label: '单位名称',
+						prop: 'name',
+						width: 300
+						// fixed: 'left'
+					},
+					{
+						label: '机构类型',
+						prop: 'properties',
+						width:150
+						// fixed: 'left'
+					}, {
+						label: '组别名称',
+						prop: 'groupname',
+						width: 300
+						// fixed: 'left'
+					}
+				],
+				// 总共多少条数据
+				total: 0,
+				// table表格多选选项
+				// multipleSelection: null,
+				getOrganizationsForm1: {},
+				getOrganizationsForm2: {},
+				// 选中的牵头单位
+				orgs: [],
+				// 上传成功文件列表
+				fileList: []
+			}
+		},
+		created:function(){
+			this.postTaskProfile()
+		},
+		
+		mounted() {
+			let that = this
+		},
+		methods: {
+			// 获取接口
+				async postTaskProfile() {
+				const result = await this.$http.post('postTaskProfile', {
+					task_id: this.task_id,
+					// pageSize:this.queryInfo.pageSize,
+					// pageNum:this.queryInfo.pageNum
+				})},
+			// 获取选择抽样地区
+			handleChange() {
+				var that = this
+				var loc = "";
+				// console.log(this.form.place)
+				for (let i = 0; i < this.sample_address.length; i++) {
+					loc += CodeToText[this.sample_address[i]];
+				}
+				// console.log(loc)
+				that.form.sample_address = loc
+			},
+			//保存
+			async onSubmit() {
+				this.form['token'] = token
+				this.form['groupname'] = this.groupname
+				this.form['orgs'] = this.orgs
+				this.form['releaser'] = window.sessionStorage.getItem('rymc')
+				this.form['task_class'] = '例行监测'
+				this.form['ispublic'] = 0
+				
+				const result = await this.$http.post('postTaskProfile', this.form)
+				// 判断业务逻辑
+				if (result.data.code == 0) {
+					this.$router.push('routineMonitor')
+				} else {
+					this.$message({
+						type: 'error',
+						message: result.data.message
+					})
+				}
+			},
+			reBack() {
+				this.$router.push('addTask')
+			},		
+			// 获取抽样机构列表
+			async getOrganizations1() {
+				this.queryInfo1['token'] = token
+				const result = await this.$http.post('getOrganizations', this.queryInfo1)
+				console.log(result.data.code);
+				// 判断业务逻辑
+				if (result.data.code == 0) {
+					this.testList = result.data.data.rows
+					this.total = result.data.data.total
+				}
+			},
+
+			// 获取检测机构列表
+			async getOrganizations2() {
+				this.queryInfo2['token'] = token
+				const result = await this.$http.post('getOrganizations', this.queryInfo2)
+				console.log(result.data.code);
+				// 判断业务逻辑
+				if (result.data.code == 0) {
+					this.testList = result.data.data.rows
+					this.total = result.data.data.total
+				}
+			},
+			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
+			setPageNum() {
+				this.queryInfo.pageNum = 1
+				this.getOrganizations1()
+			},
+			setSelectedRow() {
+				// 设置当前页已选项
+				this.hander = true
+				this.testList.forEach(item => {
+					if (this.list.includes(item[this.uniqueKey])) {
+						this.$refs.multipleTable.toggleRowSelection(item, true)
+					}
+				})
+				this.hander = false
+			},
+
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange(newSize) {
+				this.queryInfo1.pageSize = newSize
+				this.getOrganizations1()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChange(newPage) {
+				this.queryInfo1.pageNum = newPage
+				this.getOrganizations1()
+			},
+			//批量勾选
+			// handleSelectionChange(val) {
+			// 	this.multipleSelection = val
+			// 	if (this.hander) return false
+			// 	this.setSelectRows() // 处理选中的方法
+			// },
+			//选中抽样(单选)
+			handleSelectionChange1(val) {
+				this.currentRow = val;
+				console.log(this.currentRow)
+				console.log(this.currentRow[0].name)
+			},
+			//选中检测(单选)
+			handleSelectionChange2(val) {
+				this.currentRow = val;
+				console.log(this.currentRow)
+				console.log(this.currentRow[0].name)
+			},
+			// 抽样单位提交
+			choseTest1() {
+				let that = this
+				that.orgs = that.currentRow[0].name
+				// console.log(that.orgs)
+				that.form.main_unit = that.currentRow[0].name
+				that.getOrganizationsShow1 = false
+			},
+			// 检测单位提交
+			choseTest2() {
+				let that = this
+				that.orgs = that.currentRow[0].name
+				// console.log(that.orgs)
+				that.form.check_unit = that.currentRow[0].name
+				that.getOrganizationsShow2 = false
+			},
+		}
+	}
+</script>
+<style lang="less" scoped>
+	.title {
+		margin-left: 50%;
+		margin-bottom: 20px;
+	}
+
+	.el-form {
+		width: 800px;
+		margin: 0 auto;
+	}
+
+	.footer {
+		margin-top: 5px;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+	}
+</style>

+ 202 - 145
src/components/admin/checkMonitor.vue

@@ -1,9 +1,8 @@
+
 <template>
 	<div style="width: 100%">
-		<el-card class="box-card">
-			<div slot="header" class="clearfix">
-		<el-breadcrumb separator-class="el-icon-arrow-right">
-			
+	<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>
@@ -11,69 +10,114 @@
 		</el-breadcrumb>
 		</div>
 		
-		<!-- 头部搜索栏 -->
-		<el-row :gutter="50" style="margin-right: 0px;">
-			<el-form style="display: flex; flex-direction: row;">
-				<el-form-item label="年度" class="select">
-					<el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy" type="year"
-						clearable />
+		<!-- 头部查询栏 -->
+		<div class="headSearch">
+			<el-row :gutter="120" style="margin-right: 0px;">
+				<el-form :inline="true">
+				<!-- <el-form style="display: flex; flex-direction: row;" > -->
+				<el-form-item label="年度" class="select" size="small">
+					<el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy" type="year" clearable />
 				</el-form-item>
-				<el-form-item label="任务状态" class="select">
+
+				<el-form-item label="任务状态" class="select" size="small">
 					<el-select v-model="queryInfo.ispublic" style="width: 110px;" clearable>
-						<el-option v-for="item in taskispublic" :key="item.value" :label="item.label"
+						<el-option 
+							v-for="item in taskispublic" 
+							: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"
+				<!-- 起止时间 -->
+				<el-form-item label="任务时间" class="select" size="small">
+					<el-date-picker v-model="queryInfo.starttime" style="width: 120px;" align="right" type="date"
 						:picker-options="pickerOptions" clearable value-format="yyyy-MM-dd" />
 				</el-form-item>
-				<el-form-item label="--" class="select" style="margin-left: 10px;">
-					<el-date-picker v-model="queryInfo.endtime" style="width: 180px;" align="right" type="date"
+				<el-form-item label="--" class="select" style="margin-left: 10px;" size="small">
+					<el-date-picker v-model="queryInfo.endtime" style="width: 120px;" 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 label="任务名称" class="select" size="small">
+					<el-input v-model="queryInfo.task_name" style="width: 120px;"></el-input>
+				</el-form-item>
+					<!--创建者搜索 -->
+				<el-form-item label="创建者" size="small"> 
+					<el-autocomplete
+						class="inline-input"
+						v-model="state2"
+						:fetch-suggestions="querySearch"
+						placeholder="请输入内容"
+						:trigger-on-focus="false"
+						@select="handleSelect">
+					</el-autocomplete>
 				</el-form-item>
 				<!-- 查询 -->
-				<el-button style="height: 40px;margin-left: 10px;" type="success" @click="searchData()">查询</el-button>
+				<el-button  size="mini" style="height: 40px;margin-left: 10px;" type="success" @click="searchData()">查询</el-button>
 				<!-- 重置 -->
-				<el-button style="height: 40px;margin-left: 5px;" 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" @click="ispublic()">发布
-				</el-button>
-				<el-button type="primary" size="small" plain icon="el-icon-scissors" @click="repeal()">废止</el-button>
-				<el-button type="primary" size="small" plain icon="el-icon-delete" @click="delArray()">删除</el-button>
-				<el-button type="primary" size="small" plain icon="el-icon-download">导出</el-button>
-			</div>
-		</el-row>
+				<el-button  size="mini" style="height: 40px;margin-left: 5px;" type="success" @click="reset()">重置</el-button>
+				</el-form>
+			</el-row>
+		</div>
+		
+		<!--头部右侧按钮区域-->
+		<div class="rightButton">
+			<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" @click="ispublic()">发布
+					</el-button>
+					<el-button type="primary" size="small" plain icon="el-icon-scissors" @click="repeal()">废止</el-button>
+					<el-button type="primary" size="small" plain icon="el-icon-delete" @click="delArray()">删除</el-button>
+					<!-- <el-button type="primary" size="small" plain icon="el-icon-download">导出</el-button> -->
+				</div>
+			</el-row>
+		</div>
+		
 		<!--  表格数据区域-->
-		<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">
-				<template slot-scope="scope">
-					{{ scope.$index+1 }}
-				</template>
+		<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">
+			<template slot-scope="scope">
+				{{ scope.$index+1 }}
+			</template>
 			</el-table-column>
-			<el-table-column :key="" v-for="table in tableHeader" :label="table.label" :prop="table.prop" align="center"
+			<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="status" label="任务状态" width="130" align="center" >
+					<template slot-scope="scope">
+						<el-tag v-if="scope.row.ispublic==0">未发布</el-tag>
+						<el-tag type="warning" 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="success"  effect="plain" v-if="scope.row.ispublic==5">执行中</el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="level" label="任务优先级" width="95" 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 label="操作" align="center" fixed="right">
 				<!-- 操作按钮区域的作用域插槽 -->
 				<template slot-scope="scope">
 					<el-col style="margin-bottom: 5px;">
-						<el-button type="success" size="mini" @click="readDialogVisible1(scope.row)">详情</el-button>
-						<el-button type="success" size="mini" plain>牵头单位报告</el-button>
+						<el-button type="success" size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:5px">详情</el-button>
+						<el-button type="success" size="mini" plain @click="takeTheLeadReportList(scope.row.id)" style="margin-top:5px">牵头单位报告</el-button>
 					</el-col>
-					<el-col>
-						<el-button type="success" size="mini" plain @click="TaskSample()">抽样单</el-button>
-						<el-button type="success" size="mini" plain>承担单位报告</el-button>
+					<el-col style="margin-bottom: 5px;">
+						<el-button type="success" size="mini" plain @click="undertakeReport(scope.row.id)">承担单位报告</el-button>
+						<el-button type="success" size="mini" plain @click="taskSample(scope.row.id)">抽样单</el-button>
 					</el-col>
 				</template>
 			</el-table-column>
@@ -83,18 +127,18 @@
 		<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
 			:current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
 			layout="total, sizes, prev, pager, next, jumper" :total="total" background />
-			</el-card>
+	
 		<!-- 任务详情对话框-->
 		<el-dialog title="查看" :visible.sync="readDialogVisible" width="30%" :close-on-click-modal="false"
 			class="dialogItem">
-			<el-form v-if="readDialogVisible" :model="taskSampleForm" label-width="100px">
+			<el-form v-if="readDialogVisible" :model="readForm" label-width="100px">
 				<el-form-item label="任务名称:" prop="task_name" class="labelItem">
 					<div>{{readForm.task_name}}</div>
 				</el-form-item>
 				<el-form-item label="任务优先级:" prop="level" class="labelItem">
 					<div v-if="readForm.level=='0'">一般</div>
-					<div v-if="readForm.level=='1'">紧急</div>
-					<div v-if="readForm.level=='2'">特急</div>
+					<div v-else-if="readForm.level=='1'">紧急</div>
+					<div v-else>特急</div>
 				</el-form-item>
 				<el-form-item label="监测类型:" prop="task_class" width="70px" class="labelItem">
 					<div>{{readForm.task_class}}</div>
@@ -116,9 +160,10 @@
 					<div>{{readForm.main_unit}}</div>
 				</el-form-item>
 				<el-form-item label="附件:" prop="file_url" class="labelItem">
-					<div>{{readForm.file_url}}</div>
+					<!-- <div>{{readForm.file_url}}</div> -->
+					<el-link :href="readForm.file_url" type="primary">{{readForm.file_name}}</el-link>
 				</el-form-item>
-				<el-form-item label="文件号:" prop="filenum" width="200px" class="labelItem">
+				<el-form-item label="文件号:" prop="filenum" width="230px" class="labelItem">
 					<div v-if="readForm.filenum==null">无</div>
 					<div v-else>{{readForm.filenum}}</div>
 				</el-form-item>
@@ -133,14 +178,13 @@
 
 		</el-dialog>
 	</div>
-
 </template>
-
 <script>
 	const token = window.sessionStorage.getItem('token')
 	const rybh = window.sessionStorage.getItem('rybh')
+	const rymc = window.sessionStorage.getItem('rymc')
 	export default {
-		name: 'checkMonitor',
+		name: '',
 		data() {
 			return {
 				queryInfo:{
@@ -150,7 +194,8 @@
 					endtime:'',
 					ispublic:'',
 					pageSize:10,
-					pageNum:1
+					pageNum:1,
+					task_class:'监督抽查'
 				},
 				total:0,
 				cellStyle: {
@@ -165,17 +210,6 @@
 						width: 150
 						// fixed: 'left'
 					},
-					{
-						label: '年度',
-						prop: 'year',
-						width: 80
-						// fixed: 'left'
-					}, {
-						label: '文件号',
-						prop: 'filenum',
-						width: 150
-						// fixed: 'left'
-					},
 					{
 						label: '开始时间',
 						prop: 'starttime',
@@ -186,25 +220,27 @@
 						prop: 'endtime',
 						width: 120
 					},
+					{
+						label: '年度',
+						prop: 'year',
+						width: 80
+						// fixed: 'left'
+					}, {
+						label: '文件号',
+						prop: 'filenum',
+						width: 180
+						// fixed: 'left'
+					},
 					{
 						label: '创建者',
-						prop: 'releaser',
-						width: 120
+						prop: 'creater.name',
+						width: 140
 					},
 					{
 						label: '创建时间',
-						prop: 'createtime',
+						prop: 'create_time',
 						width: 180
-					}, {
-						label: '任务状态',
-						prop: 'ispublic',
-						width: 120
-					},
-					{
-						label: '任务优先级',
-						prop: 'level',
-						width: 120
-					},
+					}
 				],
 				// 数据表格数据
 				tableData: [],
@@ -268,12 +304,40 @@
 			}
 		},
 		created() {
-			this.gettaskList()
+			this.getTasks()
 		},
 		methods: {
 			add() {
 				this.$router.push('addTask')
 			},
+			takeTheLeadReportList(id) {
+				console.log(id)
+				this.$router.push({
+					name:'takeTheLeadReportList',
+					params: {
+					task_id: id,
+					}
+				})
+			},
+			undertakeReport(id){
+				console.log(id)
+				this.$router.push({
+					name:'undertakeReport',
+					params: {
+					task_id: id,
+					}
+				})
+			},
+			taskSample(id){
+				console.log(id)
+				this.$router.push({
+					name:'taskSample',
+					params: {
+					task_id: id,
+					}
+				})
+		},
+			
 			// 搜索
 			async searchData() {
 				this.queryInfo.pageNum = 1
@@ -288,27 +352,24 @@
 					endtime:'',
 					ispublic:'',
 					pageSize:10,
-					pageNum:1
+					pageNum:1,
+					task_class:'监督抽查',
+					task_id
 				}
+				this.getTasks()
 			},
 			/** 监听页码的改变 */
 			handleCurrentChange(newPage) {
 				this.queryInfo.pageNum = newPage
-				this.gettaskList()
+				this.getTasks()
 			},
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange(newSize) {
 				this.queryInfo.pageSize = newSize
-				this.gettaskList()
-			},
-			
-			/** 监听页码的改变 */
-			handleCurrentChange(newPage) {
-				this.queryInfo.pageNum = newPage
-				this.gettaskList()
+				this.getTasks()
 			},
 			// 获取任务列表
-			async gettaskList() {
+			async getTasks() {
 				for (var key in this.queryInfo) {
 					if (this.queryInfo[key] == '') {
 						delete this.queryInfo[key]
@@ -317,32 +378,8 @@
 				const {
 					data: res
 				} = await this.$http.post(
-					"getTaskList", this.queryInfo
+					"getTasks", this.queryInfo
 				);
-
-				for (let i = 0; i < res.data.rows.length; i++) {
-					if (res.data.rows[i].ispublic == '0') {
-						res.data.rows[i].ispublic = '未发布'
-					} else if (res.data.rows[i].ispublic == '1') {
-						res.data.rows[i].ispublic = '已发布'
-					} else if (res.data.rows[i].ispublic == '2') {
-						res.data.rows[i].ispublic = '废止'
-					} else if (res.data.rows[i].ispublic == '3') {
-						res.data.rows[i].ispublic = '已结束未完成'
-					}  else if (res.data.rows[i].ispublic == '5') {
-						res.data.rows[i].ispublic = '执行中'
-					} 
-					else {
-						res.data.rows[i].ispublic = '已结束已完成'
-					}
-					if (res.data.rows[i].level == '0') {
-						res.data.rows[i].level = '一般'
-					} else if (res.data.rows[i].level == '1') {
-						res.data.rows[i].level = '紧急'
-					} else if (res.data.rows[i].level == '2') {
-						res.data.rows[i].level = '特急'
-					}
-				}
 				this.tableData = res.data.rows
 				this.total = res.data.total
 			},
@@ -352,18 +389,20 @@
 				this.readForm.task_name = row.task_name
 				this.readForm.task_class = row.task_class
 				this.readForm.level = row.level
+				console.log(this.readForm.level)
 				this.readForm.year = row.year
 				this.readForm.starttime = row.starttime
 				this.readForm.endtime = row.endtime
 				this.readForm.releaser = row.releaser
 				this.readForm.main_unit = row.main_unit
 				this.readForm.file_url = row.file_url
+				this.readForm.file_name = row.file_name
 				this.readForm.filenum = row.filenum
 				this.readForm.log = row.log
 				this.readDialogVisible = true
 
 			},
-			// 批量删除学生
+			// 批量删除
 			handleSelectionChange(val) {
 				this.multipleSelection = val;
 				// console.log(this.multipleSelection)
@@ -371,16 +410,16 @@
 			// 删除任务
 			async delArray() {
 				// 判断任务是否为该创建者创建
-				for (let i = 0; i < this.multipleSelection.length; i++) {
-					if (rybh != this.multipleSelection[i].releaser) {
-						this.$alert('任务仅创建者可以删除!', {
-							confirmButtonText: '确定',
-							callback: action => {
+				// for (let i = 0; i < this.multipleSelection.length; i++) {
+				// 	if (rybh != this.multipleSelection[i].releaser) {
+				// 		this.$alert('任务仅创建者可以删除!', {
+				// 			confirmButtonText: '确定',
+				// 			callback: action => {
 
-							}
-						});
-					}
-				}
+				// 			}
+				// 		});
+				// 	}
+				// }
 				var that = this;
 				const length = this.multipleSelection.length;
 				// var val = this.selectedData;
@@ -388,38 +427,41 @@
 					// console.log(this.multipleSelection[i])
 					this.delarr.push(this.multipleSelection[i].id);
 				}
-				const result = await this.$http.post('delTask', {
+				const result = await this.$http.post('deleteTasks', {
 					delarr: that.delarr,
 					token: token
 				})
+				console.log(that.delarr);
 				if (result.data.code == 0) {
 					this.$message({
 						type: 'success',
 						message: '删除成功!'
 					});
-					that.gettaskList()
+					that.getTasks()
 				} else {
 					this.$message({
 						type: 'error',
 						message: '删除失败!'
 					});
 				}
-
+				// console.log(this.$refs.multipleTable);
 				this.$refs.multipleTable.clearSelection();
+				that.delarr = [];
+				// this.$refs.multipleTable.clearSelectionFun();
 			},
 			// 发布任务
 			async ispublic() {
 				// 判断任务是否为该创建者创建
-				for (let i = 0; i < this.multipleSelection.length; i++) {
-					if (rybh != this.multipleSelection[i].releaser) {
-						this.$alert('任务仅创建者可以发布!', {
-							confirmButtonText: '确定',
-							callback: action => {
+				// for (let i = 0; i < this.multipleSelection.length; i++) {
+				// 	if (rybh != this.multipleSelection[i].releaser) {
+				// 		this.$alert('任务仅创建者可以发布!', {
+				// 			confirmButtonText: '确定',
+				// 			callback: action => {
 
-							}
-						});
-					}
-				}
+				// 			}
+				// 		});
+				// 	}
+				// }
 				var that = this;
 				let canPub = 0
 				const length = this.multipleSelection.length;
@@ -427,7 +469,7 @@
 				console.log(this.multipleSelection)
 				// this.pubarr = this.multipleSelection;
 				for (let i = 0; i < length; i++) {
-					if (this.multipleSelection[i].ispublic != '未发布') {
+					if (this.multipleSelection[i].ispublic != '0') {
 						this.$alert('任务不在可发布状态!', {
 							confirmButtonText: '确定',
 							callback: action => {
@@ -442,14 +484,19 @@
 				if(canPub==1){
 					const result = await this.$http.post('isPublicTask', {
 						pubarr: that.multipleSelection,
-						token: token
+						token: token,
 					})
+					console.log(result.data.code)
 					if (result.data.code == 0) {
 						this.$message({
 							type: 'success',
 							message: '发布成功!'
 						});
-						that.gettaskList()
+						that.getTasks()
+					}else{
+						this.$message({
+							type: 'error',
+							message: result.data.message})
 					}				
 				}
 			},
@@ -470,7 +517,7 @@
 				// var val = this.selectedData;
 				this.pubarr = this.multipleSelection;
 				for (let i = 0; i < length; i++) {
-					if (this.pubarr[i].ispublic == '已发布') {
+					if (this.pubarr[i].ispublic == 1) {
 						this.pubarr[i].ispublic = 2
 						canPub = 1
 					} else {
@@ -491,7 +538,7 @@
 								type: 'success',
 								message: '任务已废止!'
 							});
-							that.gettaskList()
+							that.getTasks()
 						}
 					}
 					
@@ -505,6 +552,9 @@
 </script>
 
 <style lang="less" scoped>
+	.el-breadcrumb {
+		margin-bottom: 20px;
+	}
 	.el-table {
 		align-items: center;
 		margin-top: 25px;
@@ -533,9 +583,10 @@
 	}
 
 	.select {
-		display: flex;
+		// display: flex;
 		flex-direction: row;
-		margin-left: 10px;
+		// margin-left: 10px;
+		
 	}
 
 	.dialogItem /deep/ .el-dialog__body {
@@ -574,4 +625,10 @@
 		border-top: 1px solid #e5e5e5;
 		text-align: center;
 	}
+	.rightButton{
+		margin-top: 20px;
+	}
+	.headSearch{
+		margin-left: 25px;
+	}
 </style>

+ 114 - 0
src/components/admin/getAccount.vue

@@ -0,0 +1,114 @@
+<template>
+	<div style="width: 100%">
+		<el-breadcrumb separator-class="el-icon-arrow-right">
+			<el-breadcrumb-item>首页</el-breadcrumb-item>
+			<el-breadcrumb-item>个人中心</el-breadcrumb-item>
+		</el-breadcrumb>
+		<div class="title">
+			个人中心
+		</div>
+
+		<el-form :model="form" label-width="100px">
+			<el-form-item label="登录账号" prop="form.username" required>
+				<el-input v-model="form.username" :disabled="true"></el-input>
+			</el-form-item>
+			<el-form-item label="用户名称" prop="form.name" required>
+				<el-input v-model="form.name" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="别名" prop="form.name_other" required>
+				<el-input v-model="form.name_other" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="组别" prop="form.groupname" required>
+				<el-input v-model="form.groupname" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="机构属性" prop="form.properties" required>
+				<el-input v-model="form.properties" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="联系人姓名" prop="form.contact_name" required>
+				<el-input v-model="form.contact_name" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="联系人电话" prop="form.contact_phone" required>
+				<el-input v-model="form.contact_phone" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="创建时间" prop="form.create_time" required>
+				<el-input v-model="form.create_time" :disabled="true"></el-input>
+			</el-form-item>
+            <el-form-item label="修改时间" prop="form.update_time" required>
+				<el-input v-model="form.update_time" :disabled="true"></el-input>
+			</el-form-item>
+
+
+
+			<el-form-item>
+				<el-button type="success" @click="putAccount()">修改账户信息</el-button>
+				<!-- <el-button @click="reBack()">返回</el-button> -->
+			</el-form-item>
+		</el-form>
+	</div>
+</template>
+<script>
+	const rymc = window.sessionStorage.getItem('rymc')
+	const token = window.sessionStorage.getItem('token')
+	export default {
+		data() {
+			return {
+				form: {
+                    username:'',
+                    name:'', 
+                    name_other:'', 
+                    groupname: '', 
+                    properties: '', 
+                    contact_name: '', 
+                    contact_phone: '',
+                    create_time:'' ,
+                    update_time:''
+				},
+            }
+		},
+		created() {	
+            this.getAccount()
+		},
+		mounted() {
+            this.getAccount()
+		},
+		methods: {
+            async getAccount() {
+				const result = await this.$http.post('getAccount')
+				console.log(result.data.data)
+                this.form = result.data.data
+                if (this.form.properties == 1){
+                      this.form.properties ='政府部门';
+                }else if(this.form.properties == 2){
+                    this.form.properties ='事业单位';
+                }else{
+                     this.form.properties ='企业';
+                }
+              
+                    
+					
+        },
+        //修改信息
+            putAccount(){
+                 this.$router.push('putAccount')
+                },
+	}
+    }
+</script>
+<style lang="less" scoped>
+	.title {
+		margin-left: 50%;
+		margin-bottom: 20px;
+	}
+
+	.el-form {
+		width: 800px;
+		margin: 0 auto;
+	}
+
+	.footer {
+		margin-top: 5px;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+	}
+</style>

+ 164 - 0
src/components/admin/getJcds.vue

@@ -0,0 +1,164 @@
+<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-table :data="tableData" border stripe highlight-current-row style="width: 100%" >
+        <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>
+            <el-button @click="readCheckList()" style="margin:5px 0" type="success" size="small" >查看检测单列表</el-button>
+        </template>
+        </el-table-column>
+    </el-table>
+        <!--分页器区域-->
+            <el-pagination class="feyeqi" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                :current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
+                layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+        <!-- 返回按钮 -->
+            <div class="btns">
+                <el-button plain size="medium" @click="returnTask()" >
+                    返回
+                </el-button>
+            </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            // 数据表格数据
+			tableData: [],
+            sampleOrgId:{},
+            queryInfo:{
+					pageSize:10,
+					pageNum:1,
+					task_class:'例行监测',
+                    task_id: 33, //任务id
+                    sample_org_id: 18, //抽样单位id
+                    check_org_id: 272, //检测单位id
+                    sample_address:null, //抽样地址
+                    create_time:null,
+                    update_time: null,
+                    delete_time: null,
+                    },
+            sampleOrgId: {
+                    name:null, //抽样单位名称
+                    name_other: null, //抽样单位别名
+                    groupnam: null,
+                    properties: null,
+                    contact_name: null,
+                    contact_phone: null,
+                    create_time: null,
+                    update_time: null
+                    },
+            checkOrgId: {
+                    id: null, //task_profile_id
+                    name: null, //抽样单位名称
+                    name_other: null, //抽样单位别名
+                    groupname: null,
+                    properties:null,
+                    contact_name: null,
+                    contact_phone: null,
+                    create_time: null,
+                    update_time: null
+            },
+            	total:0,
+                tableHeader2: [{
+                            label: '抽样机构',
+                            prop: 'sampleOrgId.name',
+                            width: 180,
+                        }, {
+                            label: '检测机构',
+                            prop: 'checkOrgId.name'
+                        },
+                        {
+                            label: '抽样地区',
+                            prop: 'sample_address'
+                        }, 
+                ]  
+        }
+    },
+    mounted() {
+        this.getJgTaskProfiles()
+    },
+    created() {
+        this.id = this.$route.params.id
+        // this.task_id = this.$route.params.id
+        // console.log(this.task_id)
+        this.getJgTaskProfiles()
+    },
+	methods: {
+        //返回
+        returnTask(){
+            this.$router.push('routineMonitor')
+        },
+        // 获取抽样机构列表
+        async getJgTaskProfiles() {
+            for (var key in this.queryInfo) {
+                if (this.queryInfo[key] == '') {
+                    delete this.queryInfo[key]
+                }
+            }
+            const {
+                data: res
+            } = await this.$http.post(
+                "getJgTaskProfiles", this.queryInfo
+            );
+            this.tableData = res.data.rows
+            this.total = res.data.total
+            this.task_id = res.data.rows.task_id
+            console.log(result.data.rows.task_id)
+        },
+    },
+        //查看检测单 
+        readCheckList(id){
+				this.$router.push({
+					name:'readCheckList',
+					params: {
+					task_id:id,
+					}
+				})
+			},
+        //分页器
+                handleSizeChange(val) {
+                    console.log(`每页 ${val} 条`);
+                    },
+                handleCurrentChange(val) {
+                    this.queryInfo.pageNum = val;
+                    console.log(`当前页: ${val}`);
+                    this.getJgTaskProfiles()
+                    },
+                /** 监听页码的改变 */
+                handleCurrentChange(newPage) {
+                    this.queryInfo.pageNum = newPage
+                    this.getJgTaskProfiles()
+                },
+                /** 监听每页显示多少数据的改变 */
+                handleSizeChange(newSize) {
+                    this.queryInfo.pageSize = newSize
+                    this.getJgTaskProfiles()
+                },
+    }
+
+</script>
+<style>
+.btns{
+	float:right;
+	/* margin-top: 10px; */
+	padding: 10px;
+}
+.feyeqi{
+    margin-top: 10px;
+}
+</style>

+ 172 - 0
src/components/admin/getMonitor.vue

@@ -0,0 +1,172 @@
+  <template>
+	<div style="width: 100%">
+		<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>
+		<el-form ref="form" :model="form" label-width="80px">
+        
+        <div class="card">
+            <!-- 检索信息 -->
+            <el-form-item label="所属行业">
+                <el-checkbox-group v-model="form.properties" class="querybox">
+                    <el-checkbox label="不限" name="type"></el-checkbox>
+                    <el-checkbox label="种植业" name="type"></el-checkbox>
+                    <el-checkbox label="畜牧业" name="type"></el-checkbox>
+                    <el-checkbox label="渔业" name="type"></el-checkbox>
+                     <el-checkbox label="其他" name="type"></el-checkbox>
+                </el-checkbox-group>
+            </el-form-item>
+
+            <el-form-item label="机构级别">
+                <el-checkbox-group v-model="form.certificate" class="querybox">
+                    <el-checkbox label="不限" name="type"></el-checkbox>
+                    <el-checkbox label="部级" name="type"></el-checkbox>
+                    <el-checkbox label="省级" name="type"></el-checkbox>
+                    <el-checkbox label="市级" name="type"></el-checkbox>
+                    <el-checkbox label="县级" name="type"></el-checkbox>
+                </el-checkbox-group>
+            </el-form-item>
+
+            <el-form-item label="主体状态">
+                <el-checkbox-group v-model="form.type" class="querybox">
+                    <el-checkbox label="不限" name="type"></el-checkbox>
+                    <el-checkbox label="正常" name="type"></el-checkbox>
+                    <el-checkbox label="已注销" name="type"></el-checkbox>
+                    <el-checkbox label="已撤销" name="type"></el-checkbox>
+                </el-checkbox-group>
+            </el-form-item>
+            <!-- 地区和机构名称 -->
+            <el-row :gutter="50" style="margin-right: 0px;">
+                <el-form style="display: flex; flex-direction: row;" size="mini">
+
+                    <el-form-item prop="address" label="地区" class="select" >
+                        <el-cascader  :options="region" v-model="sample_address"
+                            @change="handleChange" size="small">
+                        </el-cascader>
+                    </el-form-item>
+
+                    <el-form-item prop="name" label="机构名称" class="select" >
+                        <el-input v-model="form.name" size="small"></el-input>
+                    </el-form-item>
+
+                    <el-form-item prop="name" label="机构负责人" class="select" >
+                        <el-input v-model="form.person" size="small"></el-input>
+                    </el-form-item>
+                    <el-button type="success" size="mini" style="height: 40px;margin-left: 10px;" @click="searchData()" >查询</el-button>
+                    <el-button type="success" size="mini" style="height: 40px;margin-left: 10px;"  @click="searchData()" >重置</el-button>
+                </el-form>
+                
+            </el-row>
+        </div>
+        
+            <!--  表格数据区域-->
+			<el-table ref="multipleTable" :data="testList" row-key="id" @selection-change="handleSelectionChange1"
+				border stripe highlight-current-row style="width: 100%;margin-top:30px">
+					<el-table-column type="selection" :reserve-selection="true" 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.prop" v-for="table in tableHeader" :label="table.label"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+                        <!--    分页器区域-->
+                <!-- <div class="footer">
+					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+						:current-page="queryInfo1.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo1.pageSize"
+						layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+					<el-button type="success" @click="choseTest1()">提交</el-button>
+				</div> -->
+
+                <!-- 操作按钮区域的作用域插槽 -->
+                <el-table-column label="操作" align="center" fixed="right">
+                    <template>
+                        <el-col style="margin-bottom: 5px;">
+                            <el-button type="text" size="mini" @click="readDetails()" style="margin-top:5px">详情</el-button>
+                            <el-button type="text" size="mini" plain @click="reVoke()" style="margin-top:5px">撤销</el-button>
+                        </el-col>
+                    </template>
+			    </el-table-column>
+			</el-table>
+					
+
+        </el-form>
+	</div>
+</template>
+<script>
+
+	export default {
+		data() {
+			return {
+				form: {
+                    properties:[],
+                    certificate:[],
+                    type:[],
+                    address:'',
+                    name:''
+                },
+                tableHeader: [{
+						label: '机构名称',
+						prop: 'name',
+						width: 240
+					},{
+						label: '机构类别',
+						prop: 'properties',
+						width: 160
+					},{
+						label: '机构级别',
+						prop: 'level',
+						width: 160
+					},{
+						label: '所属区域',
+						prop: 'address',
+						width: 240
+					},{
+						label: '机构负责人',
+						prop: 'person',
+						width: 150
+					},{
+						label: '创建时间',
+						prop: 'create_time',
+						width: 200
+					},{
+						label: '修改时间',
+						prop: 'update_time',
+						width: 200
+					},
+                ]}
+        },
+		created() {
+			this.getOrganization()
+		},
+		mounted() {
+			
+		},
+		methods: {
+			 async getOrganization() {
+				const result = await this.$http.post('getOrganization')
+				console.log(result.data.data)
+                this.form = result.data.data
+		}
+    }
+}
+	
+</script>
+
+<style>
+	/* .querybox{
+        padding: -20px;
+    } */
+    .select {
+		display: flex;
+		flex-direction: row;
+		margin-left: 38px;
+        
+	}
+    .card{
+        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
+        background: rgb(249, 255, 250);
+    }
+</style>

+ 190 - 0
src/components/admin/getOrganization.vue

@@ -0,0 +1,190 @@
+  <template>
+	<div style="width: 100%">
+		<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>
+		<el-form ref="form" :model="form" label-width="80px">
+        
+        <div class="card">
+            <!-- 检索信息 -->
+            <el-form-item label="机构性质">
+                <el-checkbox-group v-model="form.properties" class="querybox">
+                    <el-checkbox label="不限" name="type"></el-checkbox>
+                    <el-checkbox label="政府部门" name="type"></el-checkbox>
+                    <el-checkbox label="事业单位" name="type"></el-checkbox>
+                    <el-checkbox label="企业" name="type"></el-checkbox>
+                </el-checkbox-group>
+            </el-form-item>
+
+            <el-form-item label="资质证书">
+                <el-checkbox-group v-model="form.certificate" class="querybox">
+                    <el-checkbox label="不限" name="type"></el-checkbox>
+                    <el-checkbox label="CNAS" name="type"></el-checkbox>
+                    <el-checkbox label="CAL" name="type"></el-checkbox>
+                    <el-checkbox label="CMAF" name="type"></el-checkbox>
+                    <el-checkbox label="CATL" name="type"></el-checkbox>
+                    <el-checkbox label="CMA" name="type"></el-checkbox>
+                    <el-checkbox label="暂未取得资质" name="type"></el-checkbox>
+                </el-checkbox-group>
+            </el-form-item>
+
+            <el-form-item label="主体状态">
+                <el-checkbox-group v-model="form.type" class="querybox">
+                    <el-checkbox label="不限" name="type"></el-checkbox>
+                    <el-checkbox label="正常" name="type"></el-checkbox>
+                    <el-checkbox label="已注销" name="type"></el-checkbox>
+                    <el-checkbox label="已撤销" name="type"></el-checkbox>
+                </el-checkbox-group>
+            </el-form-item>
+            <!-- 地区和机构名称 -->
+            <el-row :gutter="50" style="margin-right: 0px;">
+                <el-form style="display: flex; flex-direction: row;" size="mini">
+
+                    <el-form-item prop="address" label="地区" class="select" >
+                        <el-cascader  :options="region" v-model="sample_address"
+                            @change="handleChange" size="small">
+                        </el-cascader>
+                    </el-form-item>
+
+                    <el-form-item prop="name" label="机构名称" class="select" >
+                        <el-input v-model="form.name" size="small"></el-input>
+                    </el-form-item>
+
+                    <el-form-item prop="name" label="机构负责人" class="select" >
+                        <el-input v-model="form.person" size="small"></el-input>
+                    </el-form-item>
+                    <el-button type="success" size="mini" style="height: 40px;margin-left: 10px;" @click="searchData()" >查询</el-button>
+                    <el-button type="success" size="mini" style="height: 40px;margin-left: 10px;"  @click="searchData()" >重置</el-button>
+                </el-form>
+                
+            </el-row>
+        </div>
+        
+            <!--  表格数据区域-->
+			<el-table ref="multipleTable" :data="tableData" row-key="id" @selection-change="handleSelectionChange1"
+				border stripe highlight-current-row style="width: 100%;margin-top:30px">
+					<el-table-column type="selection" :reserve-selection="true" 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.prop" v-for="table in tableHeader" :label="table.label"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+                 <!--    分页器区域-->
+                <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                    :current-page="form.pageNum" :page-sizes="[10, 15, 20]" :page-size="form.pageSize"
+                    layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+	
+
+                <!-- 操作按钮区域的作用域插槽 -->
+                <el-table-column label="操作" align="center" fixed="right">
+                    <template>
+                        <el-col style="margin-bottom: 5px;">
+                            <el-button type="text" size="mini" @click="readDetails()" style="margin-top:5px">详情</el-button>
+                            <el-button type="text" size="mini" plain @click="reVoke()" style="margin-top:5px">撤销</el-button>
+                        </el-col>
+                    </template>
+			    </el-table-column>
+			</el-table>
+					
+
+        </el-form>
+	</div>
+</template>
+<script>
+
+	export default {
+		data() {
+			return {
+				form: {
+                    properties:[],
+                    certificate:[],
+                    type:[],
+                    address:'',
+                    name:'',
+                    create_time:'',
+                    update_time:'',
+                    pageNum:'',
+                    pageSize:''
+                },
+                total:0,
+                // 数据表格数据
+				tableData: [],
+                tableHeader: [{
+						label: '机构名称',
+						prop: 'name',
+						width: 240
+					},{
+						label: '机构类别',
+						prop: 'properties',
+						width: 160
+					},{
+						label: '机构级别',
+						prop: 'level',
+						width: 160
+					},{
+						label: '所属区域',
+						prop: 'address',
+						width: 240
+					},{
+						label: '机构负责人',
+						prop: 'person',
+						width: 150
+					},{
+						label: '创建时间',
+						prop: 'create_time',
+						width: 200
+					},{
+						label: '修改时间',
+						prop: 'update_time',
+						width: 200
+					},
+                ]}
+        },
+		created() {
+			this.getOrganization()
+		},
+		mounted() {
+			this.getOrganization()
+		},
+		methods: {
+            /** 监听每页显示多少数据的改变 */
+			handleSizeChange(newSize) {
+				this.form.pageSize = newSize
+				this.getOrganization()
+			},
+            /** 监听页码的改变 */
+			handleCurrentChange(newPage) {
+				this.form.pageNum = newPage
+				this.getOrganization()
+			},
+			 async getOrganization() {
+				const result = await this.$http.post('getOrganization')
+				console.log(result.data.data)
+                // this.form = result.data.data
+                this.tableData = result.data.data
+                this.total = result.data.total
+		}
+    }
+}
+	
+</script>
+
+<style>
+	/* .querybox{
+        padding: -20px;
+    } */
+    .select {
+		display: flex;
+		flex-direction: row;
+		margin-left: 38px;
+        
+	}
+    .card{
+        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.1);
+        background: rgb(249, 255, 250);
+    }
+</style>

+ 2 - 0
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://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> -->

+ 114 - 0
src/components/admin/putAccount.vue

@@ -0,0 +1,114 @@
+<template>
+	<div style="width: 100%">
+		<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 class="title">
+			信息修改
+		</div>
+
+		<el-form :model="form" label-width="100px">
+			<el-form-item label="登录账号" prop="form.username" required>
+				<el-input v-model="form.username"></el-input>
+			</el-form-item>
+			<el-form-item label="用户名称" prop="form.name" required>
+				<el-input v-model="form.name" ></el-input>
+			</el-form-item>
+            <el-form-item label="别名" prop="form.name_other" required>
+				<el-input v-model="form.name_other"></el-input>
+			</el-form-item>
+            <el-form-item label="组别" prop="form.groupname" required>
+				<el-input v-model="form.groupname" ></el-input>
+			</el-form-item>
+            <el-form-item label="机构属性" prop="form.properties" required>
+				<el-input v-model="form.properties" ></el-input>
+			</el-form-item>
+            <el-form-item label="联系人姓名" prop="form.contact_name" required>
+				<el-input v-model="form.contact_name" ></el-input>
+			</el-form-item>
+            <el-form-item label="联系人电话" prop="form.contact_phone" required>
+				<el-input v-model="form.contact_phone"></el-input>
+			</el-form-item>
+            <!-- <el-form-item label="创建时间" prop="form.create_time" required>
+				<el-input v-model="form.create_time" ></el-input>
+			</el-form-item>
+            <el-form-item label="修改时间" prop="form.update_time" required>
+				<el-input v-model="form.update_time" ></el-input>
+			</el-form-item> -->
+
+
+
+			<el-form-item>
+				<el-button type="success" @click="preServe()">保存修改</el-button>
+				<el-button @click="reBack()">返回</el-button>
+			</el-form-item>
+		</el-form>
+	</div>
+</template>
+<script>
+	const rymc = window.sessionStorage.getItem('rymc')
+	const token = window.sessionStorage.getItem('token')
+	export default {
+		data() {
+			return {
+				form: {
+                    username:'',
+                    name:'', 
+                    name_other:'', 
+                    groupname: '', 
+                    properties: '', 
+                    contact_name: '', 
+                    contact_phone: '',
+                    create_time:'' ,
+                    update_time:''
+				},
+            }
+		},
+		created() {	
+            this.getAccount()
+		},
+		mounted() {
+            this.getAccount()
+		},
+		methods: {
+            //保存修改
+            async preServe(){
+				const result = await this.$http.post('putAccount',this.form)
+				// console.log(result.data.data)
+                this.getAccount()
+            },
+            //返回
+            reBack(){
+                 this.$router.push('getAccount')
+                },
+         //获取用户信息
+            async getAccount() {
+				const result = await this.$http.post('getAccount')
+				console.log(result.data.data)
+					this.form = result.data.data
+        },
+       
+        }
+	}
+
+</script>
+<style lang="less" scoped>
+	.title {
+		margin-left: 50%;
+		margin-bottom: 20px;
+	}
+
+	.el-form {
+		width: 800px;
+		margin: 0 auto;
+	}
+
+	.footer {
+		margin-top: 5px;
+		display: flex;
+		flex-direction: row;
+		justify-content: space-between;
+	}
+</style>

+ 0 - 0
src/components/admin/readCheckList.vue


+ 195 - 0
src/components/admin/readSampleList.vue

@@ -0,0 +1,195 @@
+<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-table :data="tableData" border stripe highlight-current-row style="width: 100%" >
+        <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>
+            <el-button style="margin:5px 0" type="success" size="small" @click="readSample()">查看详情</el-button>
+        </template>
+        </el-table-column>
+    </el-table>
+        <!--分页器区域-->
+            <el-pagination class="feyeqi" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                :current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
+                layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+        <!-- 返回按钮 -->
+            <div class="btns">
+                <el-button plain size="medium" @click="returnSampleList()" >
+                    返回
+                </el-button>
+            </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            // 数据表格数据
+			tableData:[],
+            sampleOrgId:{},
+            queryInfo:{
+					pageSize:10,
+					pageNum:1,
+					task_class:'例行监测',
+                    task_id: 33, //任务id
+                    sample_org_id: 18, //抽样单位id
+                    check_org_id: 272, //检测单位id
+                    sample_address:null, //抽样地址
+                    create_time:null,
+                    update_time: null,
+                    delete_time: null,
+                    properties:null, 
+                    },
+             creater: {
+                id:'', 
+                name:null, 
+                name_other: null,
+                groupname:null, 
+                // properties:null, 
+                contact_name: null, 
+                contact_phone: null 
+                }, 
+            releaser: {
+                id:'', 
+                name:null, 
+                name_other: null, 
+                groupname: null, 
+                // properties:null, 
+                contact_name: null, 
+                contact_phone: null
+                }, 
+                year: null, 
+                batch:null, 
+                qydm: null, 
+                level:null, 
+                task_class: "例行监测",
+                ispublic:null, 
+                filenum:null, 
+                log:null, 
+                file_url: null, 
+                file_name:null, 
+                is_divide: null, 
+                create_time: null, 
+                update_time:null, 
+            	total:0,
+                tableHeader2: [{
+                            label: '任务名称',
+                            prop: 'task_name',
+                            width: 180,
+                        },{
+                            label: '开始时间',
+                            prop: 'starttime',
+                            width: 120,
+                        },{
+                            label: '结束时间',
+                            prop: 'endtime',
+                            width: 120,
+                        },{
+                            label: '创建者',
+                            prop: 'releaser.name',
+                            width: 160,
+                        },{
+                            label: '组别',
+                            prop: 'releaser.groupname',
+                            width: 120,
+                        },{
+                            label: '机构性质',
+                            prop: 'releaser.properties'
+                        },{
+                            label: '任务优先级',
+                            prop: 'releaser.level',
+                            width: 120,
+                        },{
+                            label: '文件号',
+                            prop: 'releaserfilenum'
+                        },
+                ]  
+        }
+    },
+    mounted() {
+        this.getTasks()
+    },
+    created() {
+        this.id = this.$route.params.id
+        // this.task_id = this.$route.params.id
+        // console.log(this.task_id)
+        this.getTasks()
+    },
+	methods: {
+        //返回
+        returnSampleList(){
+            this.$router.push('setTaskJg')
+        },
+       // 获取抽样单列表
+        async getTasks() {
+            for (var key in this.queryInfo) {
+                if (this.queryInfo[key] == '') {
+                    delete this.queryInfo[key]
+                }
+            }
+            const {
+                data: res
+            } = await this.$http.post(
+                "getTasks", this.queryInfo
+            );
+            this.tableData = res.data.rows
+            console.log( this.tableData)
+            this.total = res.data.total
+            this.task_id = res.data.rows.task_id
+            for(let i=0; i<this.tableData.length; i++){
+                if (this.tableData[i].releaser.properties == "1"){
+                      this.tableData[i].releaser.properties ="政府部门";
+                }else if(this.tableData[i].releaser.properties == "2"){
+                    this.tableData[i].releaser.properties ="事业单位";
+                }else{
+                     this.tableData[i].releaser.properties ="企业";
+                }
+            }
+                
+                console.log(res.data.rows)
+        },
+        //分页器
+                handleSizeChange(val) {
+                    console.log(`每页 ${val} 条`);
+                    },
+                handleCurrentChange(val) {
+                    this.queryInfo.pageNum = val;
+                    console.log(`当前页: ${val}`);
+                    this.getTasks()
+                    },
+                /** 监听页码的改变 */
+                handleCurrentChange(newPage) {
+                    this.queryInfo.pageNum = newPage
+                    this.getTasks()
+                },
+                /** 监听每页显示多少数据的改变 */
+                handleSizeChange(newSize) {
+                    this.queryInfo.pageSize = newSize
+                    this.getTasks()
+                },
+    }
+}
+</script>
+<style>
+.btns{
+	float:right;
+	/* margin-top: 10px; */
+	padding: 10px;
+}
+.feyeqi{
+    margin-top: 10px;
+}
+</style>

+ 80 - 59
src/components/admin/routineMonitor.vue

@@ -12,7 +12,7 @@
 		
 		<!-- 头部查询栏 -->
 		<div class="headSearch">
-			<el-row :gutter="50" style="margin-right: 0px;">
+			<el-row :gutter="120" style="margin-right: 0px;">
 				<el-form :inline="true">
 				<!-- <el-form style="display: flex; flex-direction: row;" > -->
 				<el-form-item label="年度" class="select" size="small">
@@ -35,7 +35,7 @@
 						:picker-options="pickerOptions" clearable value-format="yyyy-MM-dd" />
 				</el-form-item>
 
-				<el-form-item label="--" class="select" style="margin-left: 10px;" size="small">
+				<el-form-item label="--" class="select" style="margin-left: 8px;" size="small">
 					<el-date-picker v-model="queryInfo.endtime" style="width: 180px;" align="right" type="date"
 						:picker-options="pickerOptions"  clearable />
 				</el-form-item>
@@ -104,11 +104,13 @@
 				<template slot-scope="scope">
 					<el-col style="margin-bottom: 5px;">
 						<el-button type="success" size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:5px">详情</el-button>
-						<el-button type="success" size="mini" plain @click="takeTheLeadReportList(scope.row.id)" style="margin-top:5px">牵头单位报告</el-button>
+						<el-button type="success" size="mini" @click="sendBack(scope.row)" style="margin-top:5px">退回</el-button>
 					</el-col>
 					<el-col style="margin-bottom: 5px;">
-						<el-button type="success" size="mini" plain @click="undertakeReport(scope.row.id)">承担单位报告</el-button>
-						<el-button type="success" size="mini" plain @click="taskSample(scope.row.id)">抽样单</el-button>
+						<!-- <el-button type="success" size="mini" plain @click="takeTheLeadReportList(scope.row.id)" style="margin-top:5px">牵头单位报告</el-button> -->
+						<el-button type="success" size="mini" plain @click="getJcds(scope.row.id)" style="margin-top:5px">检测单</el-button> 
+						<!-- <el-button type="success" size="mini" plain @click="undertakeReport(scope.row.id)">承担单位报告</el-button> -->
+						<el-button type="success" size="mini" plain @click="sampleList(scope.row.id)">抽样单</el-button>
 					</el-col>
 				</template>
 			</el-table-column>
@@ -144,17 +146,17 @@
 				<el-form-item label="任务时间:" prop="starttime" width="200px" class="labelItem">
 					<div>{{readForm.starttime}} 至 {{readForm.endtime}}</div>
 				</el-form-item>
-				<el-form-item label="发布单位:" prop="releaser" class="labelItem">
-					<div>{{readForm.releaser}}</div>
+				<el-form-item label="发布单位:" prop="creater" class="labelItem">
+					<div>{{readForm.creater.name}}</div>
 				</el-form-item>
-				<el-form-item label="牵头单位:" prop="main_unit" class="labelItem">
+				<!-- <el-form-item label="牵头单位:" prop="main_unit" class="labelItem">
 					<div>{{readForm.main_unit}}</div>
-				</el-form-item>
+				</el-form-item> -->
 				<el-form-item label="附件:" prop="file_url" class="labelItem">
 					<!-- <div>{{readForm.file_url}}</div> -->
 					<el-link :href="readForm.file_url" type="primary">{{readForm.file_name}}</el-link>
 				</el-form-item>
-				<el-form-item label="文件号:" prop="filenum" width="200px" class="labelItem">
+				<el-form-item label="文件号:" prop="filenum" width="230px" class="labelItem">
 					<div v-if="readForm.filenum==null">无</div>
 					<div v-else>{{readForm.filenum}}</div>
 				</el-form-item>
@@ -186,7 +188,9 @@
 					ispublic:'',
 					pageSize:10,
 					pageNum:1,
-					task_class:'例行监测'
+					task_class:'例行监测',
+					task_id:'',
+					task_profile_id:''
 				},
 				total:0,
 				cellStyle: {
@@ -201,17 +205,6 @@
 						width: 150
 						// fixed: 'left'
 					},
-					{
-						label: '年度',
-						prop: 'year',
-						width: 80
-						// fixed: 'left'
-					}, {
-						label: '文件号',
-						prop: 'filenum',
-						width: 150
-						// fixed: 'left'
-					},
 					{
 						label: '开始时间',
 						prop: 'starttime',
@@ -222,14 +215,25 @@
 						prop: 'endtime',
 						width: 120
 					},
+					{
+						label: '年度',
+						prop: 'year',
+						width: 80
+						// fixed: 'left'
+					}, {
+						label: '文件号',
+						prop: 'filenum',
+						width: 180
+						// fixed: 'left'
+					},
 					{
 						label: '创建者',
-						prop: 'creater',
+						prop: 'creater.name',
 						width: 140
 					},
 					{
 						label: '创建时间',
-						prop: 'createtime',
+						prop: 'create_time',
 						width: 180
 					}
 				],
@@ -295,39 +299,57 @@
 			}
 		},
 		created() {
-			this.gettaskList()
+			this.getTasks()
 		},
 		methods: {
+			//新增
 			add() {
 				this.$router.push('addTask')
 			},
-			takeTheLeadReportList(id) {
-				console.log(id)
+			//查看抽样机构
+			sampleList(id){
 				this.$router.push({
-					name:'takeTheLeadReportList',
+					name:'setTaskJg',
 					params: {
-					task_id: id,
+					task_id:id,
 					}
 				})
 			},
-			undertakeReport(id){
+			//查看检测机构
+			getJcds(id,profile_id) {
 				console.log(id)
 				this.$router.push({
-					name:'undertakeReport',
+					name:'getJcds',
 					params: {
 					task_id: id,
+					task_profile_id:profile_id
 					}
 				})
 			},
-			taskSample(id){
-				console.log(id)
-				this.$router.push({
-					name:'taskSample',
-					params: {
-					task_id: id,
-					}
-				})
-		},
+			// takeTheLeadReportList(id) {
+			// 	console.log(id)
+			// 	this.$router.push({
+			// 		name:'takeTheLeadReportList',
+			// 		params: {
+			// 		task_id: id,
+			// 		}
+			// 	})
+			// },
+			//
+			// 	})
+			// },
+			//承担单位报告
+			// undertakeReport(id){
+			// 	console.log(id)
+			// 	this.$router.push({
+			// 		name:'undertakeReport',
+			// 		params: {
+			// 		task_id: id,
+			// 		}
+			// 	})
+			// },
+			
+		// },
 			
 			// 搜索
 			async searchData() {
@@ -347,20 +369,24 @@
 					task_class:'例行监测',
 					task_id
 				}
-				this.gettaskList()
+				this.getTasks()
+			},
+			//退回
+			sendBack(){
+
 			},
 			/** 监听页码的改变 */
 			handleCurrentChange(newPage) {
 				this.queryInfo.pageNum = newPage
-				this.gettaskList()
+				this.getTasks()
 			},
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange(newSize) {
 				this.queryInfo.pageSize = newSize
-				this.gettaskList()
+				this.getTasks()
 			},
 			// 获取任务列表
-			async gettaskList() {
+			async getTasks() {
 				for (var key in this.queryInfo) {
 					if (this.queryInfo[key] == '') {
 						delete this.queryInfo[key]
@@ -369,7 +395,7 @@
 				const {
 					data: res
 				} = await this.$http.post(
-					"getTaskList", this.queryInfo
+					"getTasks", this.queryInfo
 				);
 				this.tableData = res.data.rows
 				this.total = res.data.total
@@ -380,11 +406,12 @@
 				this.readForm.task_name = row.task_name
 				this.readForm.task_class = row.task_class
 				this.readForm.level = row.level
-				console.log(this.readForm.level)
+				// console.log(this.readForm.level)
 				this.readForm.year = row.year
 				this.readForm.starttime = row.starttime
 				this.readForm.endtime = row.endtime
 				this.readForm.releaser = row.releaser
+				this.readForm.creater = row.creater
 				this.readForm.main_unit = row.main_unit
 				this.readForm.file_url = row.file_url
 				this.readForm.file_name = row.file_name
@@ -406,19 +433,16 @@
 				// 		this.$alert('任务仅创建者可以删除!', {
 				// 			confirmButtonText: '确定',
 				// 			callback: action => {
-
 				// 			}
 				// 		});
 				// 	}
 				// }
 				var that = this;
 				const length = this.multipleSelection.length;
-				// var val = this.selectedData;
 				for (let i = 0; i < length; i++) {
-					// console.log(this.multipleSelection[i])
 					this.delarr.push(this.multipleSelection[i].id);
 				}
-				const result = await this.$http.post('delTask', {
+				const result = await this.$http.post('deleteTasks', {
 					delarr: that.delarr,
 					token: token
 				})
@@ -428,7 +452,7 @@
 						type: 'success',
 						message: '删除成功!'
 					});
-					that.gettaskList()
+					that.getTasks()
 				} else {
 					this.$message({
 						type: 'error',
@@ -473,7 +497,7 @@
 					}
 				}
 				if(canPub==1){
-					const result = await this.$http.post('isPublicTask', {
+					const result = await this.$http.post('putTaskPublic', {
 						pubarr: that.multipleSelection,
 						token: token,
 					})
@@ -483,7 +507,7 @@
 							type: 'success',
 							message: '发布成功!'
 						});
-						that.gettaskList()
+						that.getTasks()
 					}else{
 						this.$message({
 							type: 'error',
@@ -515,12 +539,11 @@
 						this.$alert('任务不在可废止状态!', {
 							confirmButtonText: '确定',
 							callback: action => {
-
 							}
 						});
 					}
 					if(canPub==1){
-						const result = await this.$http.post('isPublicTask', {
+						const result = await this.$http.post('putTaskPublic', {
 							pubarr: that.pubarr,
 							token: token
 						})
@@ -529,15 +552,13 @@
 								type: 'success',
 								message: '任务已废止!'
 							});
-							that.gettaskList()
+							that.getTasks()
 						}
 					}
 					
 				}
 
 			}
-
-
 		},
 	}
 </script>
@@ -576,7 +597,7 @@
 	.select {
 		// display: flex;
 		flex-direction: row;
-		// margin-left: 10px;
+		margin-left: 35px;
 		
 	}
 

+ 164 - 0
src/components/admin/setTaskJg.vue

@@ -0,0 +1,164 @@
+<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-table :data="tableData" border stripe highlight-current-row style="width: 100%" >
+        <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>
+            <el-button @click="read()" style="margin:5px 0" type="success" size="small">查看抽样单列表</el-button>
+        </template>
+        </el-table-column>
+    </el-table>
+        <!--分页器区域-->
+            <el-pagination class="feyeqi" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                :current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
+                layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+        <!-- 返回按钮 -->
+            <div class="btns">
+                <el-button plain size="medium" @click="returnTask()" >
+                    返回
+                </el-button>
+            </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            // 数据表格数据
+			tableData: [],
+            sampleOrgId:{},
+            queryInfo:{
+					pageSize:10,
+					pageNum:1,
+					task_class:'例行监测',
+                    task_id: 33, //任务id
+                    sample_org_id: 18, //抽样单位id
+                    check_org_id: 272, //检测单位id
+                    sample_address:null, //抽样地址
+                    create_time:null,
+                    update_time: null,
+                    delete_time: null,
+                    },
+            sampleOrgId: {
+                    name:null, //抽样单位名称
+                    name_other: null, //抽样单位别名
+                    groupnam: null,
+                    properties: null,
+                    contact_name: null,
+                    contact_phone: null,
+                    create_time: null,
+                    update_time: null
+                    },
+            checkOrgId: {
+                    id: null, //task_profile_id
+                    name: null, //抽样单位名称
+                    name_other: null, //抽样单位别名
+                    groupname: null,
+                    properties:null,
+                    contact_name: null,
+                    contact_phone: null,
+                    create_time: null,
+                    update_time: null
+            },
+            	total:0,
+                tableHeader2: [{
+                            label: '抽样机构',
+                            prop: 'sampleOrgId.name',
+                            width: 180,
+                        }, {
+                            label: '检测机构',
+                            prop: 'checkOrgId.name'
+                        },
+                        {
+                            label: '抽样地区',
+                            prop: 'sample_address'
+                        }, 
+                ]  
+        }
+    },
+    mounted() {
+        this.getJgTaskProfiles()
+    },
+    created() {
+        this.id = this.$route.params.id
+        // this.task_id = this.$route.params.id
+        // console.log(this.task_id)
+        this.getJgTaskProfiles()
+    },
+	methods: {
+        //返回
+        returnTask(){
+            this.$router.push('routineMonitor')
+        },
+        // 获取抽样机构列表
+        async getJgTaskProfiles() {
+            for (var key in this.queryInfo) {
+                if (this.queryInfo[key] == '') {
+                    delete this.queryInfo[key]
+                }
+            }
+            const {
+                data: res
+            } = await this.$http.post(
+                "getJgTaskProfiles", this.queryInfo
+            );
+            this.tableData = res.data.rows
+            this.total = res.data.total
+            this.task_id = res.data.rows.task_id
+            console.log(res.data.rows.task_id)
+        },
+        //查看抽样单 
+        read(id){
+				this.$router.push({
+					name:'readSampleList',
+					params: {
+					task_id:id,
+					}
+				})
+		},
+        //分页器
+                handleSizeChange(val) {
+                    console.log(`每页 ${val} 条`);
+                    },
+                handleCurrentChange(val) {
+                    this.queryInfo.pageNum = val;
+                    console.log(`当前页: ${val}`);
+                    this.getJgTaskProfiles()
+                    },
+                /** 监听页码的改变 */
+                handleCurrentChange(newPage) {
+                    this.queryInfo.pageNum = newPage
+                    this.getJgTaskProfiles()
+                },
+                /** 监听每页显示多少数据的改变 */
+                handleSizeChange(newSize) {
+                    this.queryInfo.pageSize = newSize
+                    this.getJgTaskProfiles()
+                },
+    },
+}
+
+</script>
+<style>
+.btns{
+	float:right;
+	/* margin-top: 10px; */
+	padding: 10px;
+}
+.feyeqi{
+    margin-top: 10px;
+}
+</style>

+ 2 - 2
src/components/admin/specialMonitor.vue

@@ -12,7 +12,7 @@
 		</div>
 		<!-- 头部搜查询栏 -->
 		<div class="headSearch">
-			<el-row :gutter="50" style="margin-right: 0px;">
+			<el-row :gutter="120" style="margin-right: 0px;">
 			<!-- <el-form style="display: flex; flex-direction: row;"> -->
 				<el-form :inline="true">
 				<el-form-item label="年度" class="select" size="mini">
@@ -542,7 +542,7 @@
 	.select {
 		// display: flex;
 		flex-direction: row;
-		// margin-left: 10px;
+		margin-left: 35px;
 	}
 	
 		.el-form-item {

+ 626 - 0
src/components/admin/subjDtList.vue

@@ -0,0 +1,626 @@
+
+<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>
+		</div>
+		
+		<!-- 头部查询栏 -->
+		<div class="headSearch">
+			<el-row :gutter="50" style="margin-right: 0px;">
+				<el-form :inline="true">
+				<!-- <el-form style="display: flex; flex-direction: row;" > -->
+				<el-form-item label="年度" class="select" size="small">
+					<el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy" type="year" clearable />
+				</el-form-item>
+
+				<el-form-item label="任务状态" class="select" size="small">
+					<el-select v-model="queryInfo.ispublic" style="width: 110px;" clearable>
+						<el-option 
+							v-for="item in taskispublic" 
+							:key="item.value" 
+							:label="item.label"
+							:value="item.value" >
+						</el-option>
+					</el-select>
+				</el-form-item>
+
+				<el-form-item label="任务时间" class="select" size="small">
+					<el-date-picker v-model="queryInfo.starttime" style="width: 180px;" align="right" type="date"
+						:picker-options="pickerOptions" clearable value-format="yyyy-MM-dd" />
+				</el-form-item>
+
+				<el-form-item label="--" class="select" style="margin-left: 10px;" size="small">
+					<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="small">
+					<el-input v-model="queryInfo.task_name"></el-input>
+				</el-form-item>
+
+				<!-- 查询 -->
+				<el-button  size="mini" style="height: 40px;margin-left: 10px;" type="success" @click="searchData()">查询</el-button>
+				<!-- 重置 -->
+				<el-button  size="mini" style="height: 40px;margin-left: 5px;" type="success" @click="reset()">重置</el-button>
+				</el-form>
+			</el-row>
+		</div>
+		
+		<!--头部右侧按钮区域-->
+		<div class="rightButton">
+			<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" @click="ispublic()">发布
+					</el-button>
+					<el-button type="primary" size="small" plain icon="el-icon-scissors" @click="repeal()">废止</el-button>
+					<el-button type="primary" size="small" plain icon="el-icon-delete" @click="delArray()">删除</el-button>
+					<!-- <el-button type="primary" size="small" plain icon="el-icon-download">导出</el-button> -->
+				</div>
+			</el-row>
+		</div>
+		
+		<!--  表格数据区域-->
+		<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">
+			<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="status" label="任务状态" width="130" align="center" >
+					<template slot-scope="scope">
+						<el-tag v-if="scope.row.ispublic==0">未发布</el-tag>
+						<el-tag type="warning" 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="success"  effect="plain" v-if="scope.row.ispublic==5">执行中</el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="level" label="任务优先级" width="95" 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 label="操作" align="center" fixed="right">
+				<!-- 操作按钮区域的作用域插槽 -->
+				<template slot-scope="scope">
+					<el-col style="margin-bottom: 5px;">
+						<el-button type="success" size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:5px">详情</el-button>
+						<el-button type="success" size="mini" plain @click="takeTheLeadReportList(scope.row.id)" style="margin-top:5px">牵头单位报告</el-button>
+					</el-col>
+					<el-col style="margin-bottom: 5px;">
+						<el-button type="success" size="mini" plain @click="undertakeReport(scope.row.id)">承担单位报告</el-button>
+						<el-button type="success" size="mini" plain @click="taskSample(scope.row.id)">抽样单</el-button>
+					</el-col>
+				</template>
+			</el-table-column>
+		</el-table>
+		
+		<!--    分页器区域-->
+		<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+			:current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
+			layout="total, sizes, prev, pager, next, jumper" :total="total" background />
+	
+		<!-- 任务详情对话框-->
+		<el-dialog title="查看" :visible.sync="readDialogVisible" width="30%" :close-on-click-modal="false"
+			class="dialogItem">
+			<el-form v-if="readDialogVisible" :model="readForm" label-width="100px">
+				<el-form-item label="任务名称:" prop="task_name" class="labelItem">
+					<div>{{readForm.task_name}}</div>
+				</el-form-item>
+				<el-form-item label="任务优先级:" prop="level" class="labelItem">
+					<div v-if="readForm.level=='0'">一般</div>
+					<div v-else-if="readForm.level=='1'">紧急</div>
+					<div v-else>特急</div>
+				</el-form-item>
+				<el-form-item label="监测类型:" prop="task_class" width="70px" class="labelItem">
+					<div>{{readForm.task_class}}</div>
+				</el-form-item>
+				<el-form-item label="年度:" prop="year" class="labelItem">
+					<div>{{readForm.year}}</div>
+				</el-form-item>
+
+				<el-form-item label="批次:" prop="batch" width="200px" class="labelItem">
+					<div>{{readForm.batch}}</div>
+				</el-form-item>
+				<el-form-item label="任务时间:" prop="starttime" width="200px" class="labelItem">
+					<div>{{readForm.starttime}} 至 {{readForm.endtime}}</div>
+				</el-form-item>
+				<el-form-item label="发布单位:" prop="creater" class="labelItem">
+					<div>{{readForm.creater.name}}</div>
+				</el-form-item>
+				<!-- <el-form-item label="牵头单位:" prop="main_unit" class="labelItem">
+					<div>{{readForm.main_unit}}</div>
+				</el-form-item> -->
+				<el-form-item label="附件:" prop="file_url" class="labelItem">
+					<!-- <div>{{readForm.file_url}}</div> -->
+					<el-link :href="readForm.file_url" type="primary">{{readForm.file_name}}</el-link>
+				</el-form-item>
+				<el-form-item label="文件号:" prop="filenum" width="230px" class="labelItem">
+					<div v-if="readForm.filenum==null">无</div>
+					<div v-else>{{readForm.filenum}}</div>
+				</el-form-item>
+				<el-form-item label="备注:" prop="log" class="labelItem">
+					<div v-if="readForm.log==null">无</div>
+					<div v-else>{{readForm.log}}</div>
+				</el-form-item>
+				<div class="footer">
+					<el-button type="success" @click="readDialogVisible = false">返回</el-button>
+				</div>
+			</el-form>
+
+		</el-dialog>
+	</div>
+</template>
+<script>
+	const token = window.sessionStorage.getItem('token')
+	const rybh = window.sessionStorage.getItem('rybh')
+	const rymc = window.sessionStorage.getItem('rymc')
+	export default {
+		name: '',
+		data() {
+			return {
+				queryInfo:{
+					year:'',
+					task_name:'',
+					starttime:'',
+					endtime:'',
+					ispublic:'',
+					pageSize:10,
+					pageNum:1,
+					task_class:'例行监测'
+				},
+				total:0,
+				cellStyle: {
+					padding: 2 + 'px'
+				},
+				rowStyle: {
+					height: 35 + 'px'
+				},
+				tableHeader: [{
+						label: '任务名称',
+						prop: 'task_name',
+						width: 150
+						// fixed: 'left'
+					},
+					{
+						label: '开始时间',
+						prop: 'starttime',
+						width: 120
+					},
+					{
+						label: '结束时间',
+						prop: 'endtime',
+						width: 120
+					},
+					{
+						label: '年度',
+						prop: 'year',
+						width: 80
+						// fixed: 'left'
+					}, {
+						label: '文件号',
+						prop: 'filenum',
+						width: 180
+						// fixed: 'left'
+					},
+					{
+						label: '创建者',
+						prop: 'creater.name',
+						width: 140
+					},
+					{
+						label: '创建时间',
+						prop: 'create_time',
+						width: 180
+					}
+				],
+				// 数据表格数据
+				tableData: [],
+				// 批量删除选中数据
+				multipleSelection: [],
+				// 任务状态选项
+				taskispublic: [{
+					value: '',
+					label: '全部'
+				}, {
+					value: '0',
+					label: '未发布'
+				}, {
+					value: '1',
+					label: '已发布'
+				}, {
+					value: '2',
+					label: '废止'
+				}, {
+					value: '5',
+					label: '执行中'
+				}, {
+					value: '3',
+					label: '已结束,未完成'
+				}, {
+					value: '4',
+					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);
+						}
+					}]
+				},
+				// 查看任务详情
+				readDialogVisible: false,
+				readForm: {},
+				multipleSelection: [],
+				delarr: [],
+				pubarr: []
+			}
+		},
+		created() {
+			this.getTasks()
+		},
+		methods: {
+			add() {
+				this.$router.push('addTask')
+			},
+			takeTheLeadReportList(id) {
+				console.log(id)
+				this.$router.push({
+					name:'takeTheLeadReportList',
+					params: {
+					task_id: id,
+					}
+				})
+			},
+			undertakeReport(id){
+				console.log(id)
+				this.$router.push({
+					name:'undertakeReport',
+					params: {
+					task_id: id,
+					}
+				})
+			},
+			taskSample(id){
+				console.log(id)
+				this.$router.push({
+					name:'taskSample',
+					params: {
+					task_id: id,
+					}
+				})
+		},
+			
+			// 搜索
+			async searchData() {
+				this.queryInfo.pageNum = 1
+				this.gettaskList()
+			},
+			// 重置
+			reset(){
+				this.queryInfo={
+					year:'',
+					task_name:'',
+					starttime:'',
+					endtime:'',
+					ispublic:'',
+					pageSize:10,
+					pageNum:1,
+					task_class:'例行监测',
+					task_id
+				}
+				this.getTasks()
+			},
+			/** 监听页码的改变 */
+			handleCurrentChange(newPage) {
+				this.queryInfo.pageNum = newPage
+				this.getTasks()
+			},
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange(newSize) {
+				this.queryInfo.pageSize = newSize
+				this.getTasks()
+			},
+			// 获取任务列表
+			async getTasks() {
+				for (var key in this.queryInfo) {
+					if (this.queryInfo[key] == '') {
+						delete this.queryInfo[key]
+					}
+				}
+				const {
+					data: res
+				} = await this.$http.post(
+					"getTasks", this.queryInfo
+				);
+				this.tableData = res.data.rows
+				this.total = res.data.total
+			},
+			// 查看任务详情
+			async readDialogVisible1(row) {
+				this.readForm.batch = row.batch
+				this.readForm.task_name = row.task_name
+				this.readForm.task_class = row.task_class
+				this.readForm.level = row.level
+				// console.log(this.readForm.level)
+				this.readForm.year = row.year
+				this.readForm.starttime = row.starttime
+				this.readForm.endtime = row.endtime
+				this.readForm.releaser = row.releaser
+				this.readForm.creater = row.creater
+				this.readForm.main_unit = row.main_unit
+				this.readForm.file_url = row.file_url
+				this.readForm.file_name = row.file_name
+				this.readForm.filenum = row.filenum
+				this.readForm.log = row.log
+				this.readDialogVisible = true
+
+			},
+			// 批量删除
+			handleSelectionChange(val) {
+				this.multipleSelection = val;
+				// console.log(this.multipleSelection)
+			},
+			// 删除任务
+			async delArray() {
+				// 判断任务是否为该创建者创建
+				// for (let i = 0; i < this.multipleSelection.length; i++) {
+				// 	if (rybh != this.multipleSelection[i].releaser) {
+				// 		this.$alert('任务仅创建者可以删除!', {
+				// 			confirmButtonText: '确定',
+				// 			callback: action => {
+
+				// 			}
+				// 		});
+				// 	}
+				// }
+				var that = this;
+				const length = this.multipleSelection.length;
+				// var val = this.selectedData;
+				for (let i = 0; i < length; i++) {
+					// console.log(this.multipleSelection[i])
+					this.delarr.push(this.multipleSelection[i].id);
+				}
+				const result = await this.$http.post('deleteTasks', {
+					delarr: that.delarr,
+					token: token
+				})
+				console.log(that.delarr);
+				if (result.data.code == 0) {
+					this.$message({
+						type: 'success',
+						message: '删除成功!'
+					});
+					that.getTasks()
+				} else {
+					this.$message({
+						type: 'error',
+						message: '删除失败!'
+					});
+				}
+				// console.log(this.$refs.multipleTable);
+				this.$refs.multipleTable.clearSelection();
+				that.delarr = [];
+				// this.$refs.multipleTable.clearSelectionFun();
+			},
+			// 发布任务
+			async ispublic() {
+				// 判断任务是否为该创建者创建
+				// for (let i = 0; i < this.multipleSelection.length; i++) {
+				// 	if (rybh != this.multipleSelection[i].releaser) {
+				// 		this.$alert('任务仅创建者可以发布!', {
+				// 			confirmButtonText: '确定',
+				// 			callback: action => {
+
+				// 			}
+				// 		});
+				// 	}
+				// }
+				var that = this;
+				let canPub = 0
+				const length = this.multipleSelection.length;
+				// var val = this.selectedData;
+				console.log(this.multipleSelection)
+				// this.pubarr = this.multipleSelection;
+				for (let i = 0; i < length; i++) {
+					if (this.multipleSelection[i].ispublic != '0') {
+						this.$alert('任务不在可发布状态!', {
+							confirmButtonText: '确定',
+							callback: action => {
+
+							}
+						});
+					} else {
+						this.multipleSelection[i].ispublic = 1
+						canPub = 1
+					}
+				}
+				if(canPub==1){
+					const result = await this.$http.post('putTaskPublic', {
+						pubarr: that.multipleSelection,
+						token: token,
+					})
+					console.log(result.data.code)
+					if (result.data.code == 0) {
+						this.$message({
+							type: 'success',
+							message: '发布成功!'
+						});
+						that.getTasks()
+					}else{
+						this.$message({
+							type: 'error',
+							message: result.data.message})
+					}				
+				}
+			},
+			// 废止任务
+			async repeal() {
+				// 判断任务是否为该创建者创建
+				for (let i = 0; i < this.multipleSelection.length; i++) {
+					if (rybh != this.multipleSelection[i].releaser) {
+						this.$alert('任务仅创建者可以废止!', {
+							confirmButtonText: '确定',
+							callback: action => {}
+						});
+					}
+				}
+				var that = this;
+				let canPub = 0
+				const length = this.multipleSelection.length;
+				// var val = this.selectedData;
+				this.pubarr = this.multipleSelection;
+				for (let i = 0; i < length; i++) {
+					if (this.pubarr[i].ispublic == 1) {
+						this.pubarr[i].ispublic = 2
+						canPub = 1
+					} else {
+						this.$alert('任务不在可废止状态!', {
+							confirmButtonText: '确定',
+							callback: action => {
+
+							}
+						});
+					}
+					if(canPub==1){
+						const result = await this.$http.post('putTaskPublic', {
+							pubarr: that.pubarr,
+							token: token
+						})
+						if (result.data.code == 0) {
+							this.$message({
+								type: 'success',
+								message: '任务已废止!'
+							});
+							that.getTasks()
+						}
+					}
+					
+				}
+
+			}
+
+
+		},
+	}
+</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;
+	}
+
+	.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-dialog__header {
+		border-bottom: 1px solid #e5e5e5;
+	}
+
+	// .el-form-item__content{
+	// 	margin-left: 0;
+	// }
+	.footer {
+		padding: 5px 0;
+		border-top: 1px solid #e5e5e5;
+		text-align: center;
+	}
+	.rightButton{
+		margin-top: 20px;
+	}
+	.headSearch{
+		margin-left: 25px;
+	}
+</style>

+ 57 - 117
src/components/admin/taskSample.vue

@@ -6,8 +6,7 @@
 		  	<el-breadcrumb-item>监测任务</el-breadcrumb-item>
 		  	<el-breadcrumb-item>抽样单</el-breadcrumb-item>
 			</el-breadcrumb>
-		</div>	
-
+		</div>
 		<!-- 牵头单位弹框 -->
 		<!-- <el-button icon="el-icon-search" @click="getQtouList()" size="medium">搜索牵头单位</el-button> -->
 		<!-- 下拉菜单 -->
@@ -22,6 +21,7 @@
 				@change="choseQt()">
             </el-option>
         </el-select> -->
+
         <!-- 返回按钮 -->
 		<el-form-item label="牵头单位名称" class="select" size="small">
 			<el-input v-model="queryInfo.unit_name"></el-input>	
@@ -59,30 +59,6 @@
 					:page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize" 
 					layout="total, sizes, prev, pager, next, jumper" :total="total" background />
 		</div>
-			<!-- 牵头单位弹框 -->
-			<!-- <el-dialog title="机构选择" :visible.sync="dialogVisible" width="50%" :close-on-click-modal="ture" :show-close="true" :center="true" @click="getTestList()" > -->
-			<!-- <el-form v-if="getQtListShow" :model="getTestListForm"> -->
-				<!--  表格数据区域-->
-				<!-- <el-table ref="multipleTable" :data="QtouList" row-key="id" @selection-change="handleSelectionChange()"
-					border stripe highlight-current-row style="width: 100%">
-					<el-table-column type="selection" :reserve-selection="true" 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.prop" v-for="table in tableHeader_qt" :label="table.label"
-						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
-				</el-table> -->
-				<!-- <div class="footer"> -->
-					<!--    分页器区域-->
-					<!-- <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-button type="success" @click="dialogVisible = false" size="small">提交</el-button>
-				</div> -->
-			<!-- </el-form> -->
-		<!-- </el-dialog> -->
 	</div>
 	</div>
 		
@@ -98,6 +74,7 @@
 				//控制弹框显隐
 				dialogVisible: false,
 				total:0,
+				task_id:'',
 				queryInfo:{
 					keyWord: '',
 					year:'',
@@ -108,7 +85,6 @@
 					pageSize:10,
 					pageNum:1,
 					task_class:'专项监测',
-					task_id:'',
 					unit_name:'',
 				},
             cellStyle: {
@@ -118,91 +94,54 @@
 					height: 35 + 'px'
 				},
 			tableHeader: [{
-						label: '样品名称',
-						prop: 'sample_name',
-						width: 150
+						label: '抽样单编码',
+						prop: 'cyd_code',
+						width: 260
 						// fixed: 'left'
 					},
 					{
-						label: '样品编码',
-						prop: 'sample_id',
+						label: '受检单位',
+						prop: 'inspectedUnit.inspected_name',
 						width: 200
 						// fixed: 'left'
 					}, {
-						label: '商标',
-						prop: 'brand',
-						width: 150
+						label: '抽样日期',
+						prop: 'cydProfile.cyd_date',
+						width: 180
 						// fixed: 'left'
 					},
-					{
-						label: '等级',
-						prop: 'level',
-						width: 120
-					},
-					{
-						label: '抽样基数',
-						prop: 'sample_base',
-						width: 120
-					},
-					{
-						label: '抽样场所',
-						prop: 'sample_ground',
-						width: 120
-					},
 					{
 						label: '状态',
-						prop: 'sample_status',
-						width: 180
-					}
-				],
-				// 表头
-				tableHeader_qt: [{
-						label: '单位名称',
-						prop: 'name',
-						width: 300
-						// fixed: 'left'
+						prop: 'cyd_status',
+						width: 160
 					},
-					{
-						label: '机构类型',
-						prop: 'jgxz',
-						// width: 40
-						// fixed: 'left'
-					}, {
-						label: '所属区域',
-						prop: 'ssqy',
-						width: 300
-						// fixed: 'left'
-					},{
-						label: '产品范围',
-						prop: 'cpfw',
-						width: 300
-						// fixed: 'left'
-					}
+					
 				],
 				// 总共多少条数据
 				total: 0,
 				// table表格多选选项
-				multipleSelection: null,
-				getQtListShow: {},
+				// multipleSelection: null,
+				// getQtListShow: {},
 				// 选中的牵头单位
 				orgs: [],
 				// 数据表格数据
-			tableData: [],
-			QtouList:[]
+				tableData: [],
 			}
-		},
-		mounted: function() {
-			this.getJgCydList()
+		// },
+		
 			// this.getQtouList()
 		},
-		created() {
-		},
+		mounted: function() {
+			this.getCyds()
+			},
 		created: function() {
+			this.getCyds()
 			console.log(this.$route.params.task_id)
-			// this.unit_id = this.$route.params.unit_id
+			console.log(this.$route.params.task_profile_id)
 			this.task_id = this.$route.params.task_id
-			this.getJgCydList()
-			// this.getQtouList()
+			this.task_profile_id = this.$route.params.task_profile_id
+			
+			// this.getCyds()
 		},
 		
 		methods: {
@@ -212,27 +151,26 @@
 				handleCurrentChange(val) {
 					this.queryInfo.pageNum = val;
 					console.log(`当前页: ${val}`);
-					this.getJgCydList()
+					this.getCyds()
 				},
 			//批量选中
-				handleSelectionChange(val) {
-					this.multipleSelection = val;
-					console.log(this.multipleSelection)
-			},
-			
+			// 	handleSelectionChange(val) {
+			// 		this.multipleSelection = val;
+			// 		console.log(this.multipleSelection)
+			// },
 			//获取牵头单位列表
-			async getQtouList() {
-				this.dialogVisible = 'ture'
-				console.log(this.dialogVisible)
-				this.queryInfo['token'] = token
-				const result = await this.$http.post('getQtouList',this.queryInfo )
-				console.log( result.data.data.rows);
+			// async getQtouList() {
+			// 	this.dialogVisible = 'ture'
+			// 	console.log(this.dialogVisible)
+			// 	this.queryInfo['token'] = token
+			// 	const result = await this.$http.post('getQtouList',this.queryInfo )
+			// 	console.log( result.data.data.rows);
 				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.QtouList = result.data.data.rows
-					this.total = result.data.data.total
-				}
-			},
+			// 	if (result.data.code == 0) {
+			// 		this.QtouList = result.data.data.rows
+			// 		this.total = result.data.data.total
+			// 	}
+			// },
 			//返回
 			returnTask(){
 				this.$router.push('routineMonitor')
@@ -241,23 +179,25 @@
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange1(newSize) {
 				this.queryInfo.pageSize = newSize
-				this.getJgCydList()
+				this.getCyds()
 			},
 
 			/** 监听页码的改变 */
 			handleCurrentChange1(newPage) {
 				this.queryInfo.pageNum = newPage
-				this.getJgCydList()
+				this.getCyds()
 			},
+			
 			// 获取抽样单列表
-				async getJgCydList() {
-				const result = await this.$http.post('getJgCydList', {
-					task_id: this.task_id,
+				async getCyds() {
+				const result = await this.$http.post('getCyds', {
+					task_id:this.task_id,
+					task_profile_id:this.task_profile_id,
 					pageSize:this.queryInfo.pageSize,
-					pageNum:this.queryInfo.pageNum
+					pageNum:this.queryInfo.pageNum,
 				})
 				console.log( result.data)
-				console.log(this.queryInfo.pageSize)
+				console.log(result.data.data)
 				if (result.data.code == 0) {
 					for (let i = 0; i < result.data.data.rows.length; i++) {
 					if (result.data.data.rows[i].sample_status == '0') {
@@ -265,7 +205,7 @@
 					} else {
 						result.data.data.rows[i].sample_status = '已上报'
 					}
-				this.tableData = result.data.data.rows
+				this.tableData = result.data.data
 				this.total = result.data.data.total
 				console.log( result.data.data.total)
 				}
@@ -282,9 +222,8 @@
 					}
 				})
 			},
-					// 跳转到查看抽样单详情
-		}
 		}
+	}
 	
 	
 	
@@ -295,8 +234,9 @@
 	padding: 10px;
 }
 .btns{
-	float:right;
-	padding: 10px;
+	float:left;
+	margin-bottom: 10px;
+	/* padding: 10px; */
 }
 .footer {
 		margin-top: 5px;

+ 16 - 5
src/components/jc.vue

@@ -154,6 +154,16 @@ let groupname = window.sessionStorage.getItem('groupname')
   //     }
 	//   ]
   //   },
+        {
+      // icon: 'el-icon-user-solid',
+      subMenuName: '主体信息',
+      children: [{
+        id: '1-1',
+        subMenuName: '信息维护',
+        path: '/jc/subjectInformation'
+      }
+	  ]
+    },
   //   {
   //     // icon: 'el-icon-s-custom',
   //     subMenuName: '牵头单位',
@@ -220,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/'

+ 45 - 24
src/components/jc/fillSampleReport.vue

@@ -19,28 +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-cascader placeholder="请选择地区" :options="options" v-model="selectedOptions" @change="handleChange" style="width:15%">
+						<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:26.5%;margin-left:5px;"></el-input>
+						<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>
 
@@ -68,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"
@@ -79,30 +86,29 @@
 			</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:15%">
+						<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:24.5%;margin-left:5px;"></el-input>
+						<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: 40%;" 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>
@@ -118,7 +124,7 @@
 						multiple
 						: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>
@@ -132,10 +138,10 @@
 			</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>
@@ -172,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>
@@ -485,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)
@@ -498,6 +503,8 @@
 					});
 				} else {
 					this.addSampleInforDialog = false
+					this.$refs[formName].resetFields();
+					console.log(that.product_Unit)
 					this.getSamples()
 				}
 			
@@ -520,6 +527,11 @@
 					}
 					});
 			},
+			//填报抽样单样品删除
+			async deleteSample(id) {
+				const res = await this.$http.post('deleteSample',{sample_id: id})
+				this.getSamples()
+			},
 			//上传文件
 			 handleRemove(file, fileList) {
 				console.log(file, fileList);
@@ -682,17 +694,26 @@
 		.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>

+ 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>

+ 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;
 	// }

+ 4 - 2
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"
-									action="http://new.syjcapi.aielab.net/api/v1/ossUpload" :on-success="uploadSuccess" :limit="1">
+								<!-- <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="抽检结果">

+ 1 - 1
src/components/jc/sampleReport.vue

@@ -352,7 +352,7 @@
 	}
 	/deep/ #sampleReport{
 		.el-descriptions-item__label.is-bordered-label{
-		width: 13rem;
+		width: 12%;
 		font-size: .875rem;
 		}
 		.el-descriptions-item__content{

+ 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>

+ 182 - 39
src/components/jc/setTaskcd.vue

@@ -187,6 +187,8 @@
 								</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="success" size="small" plain v-if="scope.row.cyd_status == 1" @click="deleteCyd(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>
@@ -215,7 +217,7 @@
 				</el-table-column>
 			</el-table>
 			<!-- 查看检测单列表弹框 -->
-			<el-dialog title="检测单列表" :visible.sync="checkTestList" width="80%" :close-on-click-modal="false"
+			<el-dialog title="检测单列表" :visible.sync="checkTestList" width="70%" :close-on-click-modal="false"
 				class="dialogItem">
 				<!--  表格数据区域-->
 				<el-table :data="tableData1" border stripe highlight-current-row style="width: 100%"
@@ -230,13 +232,9 @@
 						: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="success" size="mini" plain
+								@click="getSamples(scope.row.id)">获取样品列表</el-button>
+							
 							<!-- <el-button style="margin:5px 5px" type="primary" size="mini" plain @click="creatpdf(scope.row.sample_id)">生成检测报告
 							</el-button> -->
 						</template>
@@ -250,11 +248,42 @@
 			</el-dialog>
 			</el-tab-pane>
 			
+			<el-dialog title="样品信息列表" :visible.sync="getSamplesList" width="75%" :close-on-click-modal="false"
+				class="dialogItem">
+							<!--  表格数据区域-->
+			<el-table ref="multipleTable" :data="yptableData" border stripe highlight-current-row style="width: 100%; margin:auto;"
+				: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 yptableHeader" :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 style="margin:5px 5px" type="success" size="mini" v-if="scope.row.jcd==null" plain
+								@click="getJcdObj(scope.row.id,scope.row.cyd_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="putJcdStatus(scope.row.jcd.id,scope.row.cyd_id)" v-else-if="scope.row.jcd.jcd_status == '1'">上报检测单
+							</el-button>
+							<el-button style="margin:5px 5px" type="primary" size="mini" plain v-else-if="scope.row.jcd.jcd_status == '3'">检测单已上报
+							</el-button>
+						</el-col>
+					</template>
+				</el-table-column>
+			</el-table>
+				<el-pagination @size-change="handleSizeChangeyp" @current-change="handleCurrentChangeyp"
+					:current-page="ypqueryInfo.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="ypqueryInfo.pageSize"
+					layout="total, sizes, prev, pager, next, jumper" :total="samplesListTotal" background />
+			</el-dialog>
 
 			<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>
@@ -285,7 +314,7 @@
 						multiple
 						: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>
 	
@@ -297,9 +326,30 @@
 				<el-button type="success" size="small" plain @click="addJcxItemDialog = true">新增不合格项</el-button>
 			</div>
 				<!--  表格数据区域-->
+			<el-table ref="multipleTable" :data="jcxItems" border stripe highlight-current-row style="margin:auto;"
+				:row-style="rowStyle" :cell-style="cellStyle" v-show="jcd.jcd_result==0">
+				<el-table-column type="selection" width="50px"></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 jcxHeader" :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="delJcdItem(scope.row.id)">删除</el-button>
+						</el-col>
+					</template>
+				</el-table-column>
+			</el-table>
+			
+<!-- 
 				<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">
+					<el-table-column label="序号" align="center" style="width: auto;">
 						<template slot-scope="scope">
 							{{ scope.$index+1 }}
 						</template>
@@ -311,12 +361,12 @@
 					</el-table-column>
 					<el-table-column label="操作" align="center">
 							<template slot-scope="scope">
-							<el-col style="margin-bottom: 5px;">
+							<el-col style="margin: 5px auto">
 								<el-button type="success" size="mini" @click="delJcdItem(scope.row.id)">删除</el-button>
 							</el-col>
 						</template>
 					</el-table-column>
-				</el-table>
+				</el-table> -->
 
 				<!--    分页器区域-->
 				<el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
@@ -332,7 +382,7 @@
 			<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 ref="jcxform" :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>
@@ -354,7 +404,7 @@
 				</el-form>
 				</div>
 			<div class="footer">
-				<el-button type="success" style="margin-bottom:30px;" size="small" @click="postJcdItem()">保存</el-button>
+				<el-button type="success" style="margin-bottom:30px;" size="small" @click="postJcdItem('jcxform')">保存</el-button>
 			</div>
 			</el-dialog>
 			<!-- ///////////////////////////////////////////检测报告生成-------难、、、、、、、、、、、、、、、、、、、、、、 -->
@@ -534,14 +584,18 @@
 				getSampleListDialog: false,//抽样单列表对话框
 				checkTestList: false,//检测单列表对话框
 				addJcxItemDialog: false,//新增不合格检测项目对话框
+				getSamplesList: false,//检测单列表中获取样品信息对话框
 				jcxItemTotal: 0,
+				samplesListTotal: 0,
 				activeName: 'first',
 				jcxItems: {},
 				id: 0,
 				jcd: {
-					jcd_result: '',
+					jcd_result: 1,
 					file_name: '',
-					file_url: ''
+					file_url: '',
+					sample_id: '',
+					cyd_id: ''
 				},
 				readForm: {
 					creater: [],
@@ -570,6 +624,11 @@
 					pageNum: 1,
 					pageSize: 10,
 					jcd_id: ''
+				},
+				ypqueryInfo:{
+					pageNum: 1,
+					pageSize: 10,
+					cyd_id: ''
 				},			
 				cellStyle: {
 					padding: 2 + 'px'
@@ -607,50 +666,51 @@
 					{
 						label: '受检单位',
 						prop: 'inspectedUnit.inspected_name',
-						width: 180
+						// width: 180
 					},
 					{
 						label: '抽样日期',
 						prop: 'cydProfile.cyd_date',
-						width: 150
+						// width: 150
 					},
-					{
-						label: '状态',
-						prop: 'status',
-						width: 100
-					}
+					// {
+					// 	label: '状态',
+					// 	prop: 'status',
+					// 	width: 100
+					// }
 				],
 
 				jcxHeader: [
 					{
 						label: '检测项目',
-						prop: 'item_name'
+						prop: 'item_name',
+						// width: 'auto'
 						// fixed: 'left'
 					},
 					{
 						label: '标准指标',
 						prop: 'item_standard',
-						// width: 180
+						// width: 'auto'
 					},
 					{
 						label: '实测值',
 						prop: 'item_measured_value',
-						// width: 150
+						// width: 'auto'
 					},
 					{
 						label: '单项判定',
 						prop: 'item_result',
-						// width: 100
+						// width: 'auto'
 					},
 					{
 						label: '检验依据',
 						prop: 'item_basis',
-						// width: 100
+						// width: 'auto'
 					},
 					{
 						label: '备注',
 						prop: 'item_log',
-						// width: 100
+						// width: 'auto'
 					},
 					],
 					
@@ -662,6 +722,7 @@
 				// 数据表格数据
 				tableData: [],
 				tableData1: [],
+				yptableData: [],//检测单列表中样品信息表格
 				options: [],
 				task_id: '',
 				multipleSelection: null,
@@ -721,6 +782,38 @@
 					// 	prop: 'uploadtime'
 					// }
 				],
+				yptableHeader: [{
+						label: '样品名称',
+						prop: 'sample_name'
+						// fixed: 'left'
+					},
+					{
+						label: '样品来源',
+						prop: 'sample_source',
+						// fixed: 'left'
+					},
+					{
+						label: '抽样数量',
+						prop: 'sample_count'
+					},
+					{
+						label: '抽样基数',
+						prop: 'sample_base'
+					},
+					{
+						label: '生产日期',
+						prop: 'sample_md_date'
+					},
+					{
+						label: '检测单状态',
+						prop: 'jcd_status'
+					},
+					{
+						label: '备注',
+						prop: 'sample_log'
+					}
+
+				],
 				fileList: [],
 				total: 0,
 				sampleShow: false, //是否展示抽样卡片
@@ -789,6 +882,36 @@
 				this.total = res.data.total	
 			},
 
+			//删除抽样单
+			async deleteCyd(id){
+				let that = this
+				const res = await this.$http.post('deleteCyd',{cyd_id:id})
+				this.getCyds()
+
+			},
+			//检测单列表中获取样品信息列表
+			async getSamples(id) {
+				let that = this
+				that.ypqueryInfo['cyd_id'] = id
+				const res = await this.$http.post('getSamples',that.ypqueryInfo)
+				console.log(res.data.data.rows)
+				that.yptableData = res.data.data.rows
+				for(let i= 0; i < this.yptableData.length; i++) {
+					if(this.yptableData[i].jcd == null) {
+						this.yptableData[i].jcd_status = '未填报'
+					}else if(this.yptableData[i].jcd.jcd_status == '1') {
+						this.yptableData[i].jcd_status = '未上报'
+					}else if(this.yptableData[i].jcd.jcd_status == '3') {
+						this.yptableData[i].jcd_status = '已上报'
+					}else if(this.yptableData[i].jcd.jcd_status == '5') {
+						this.yptableData[i].jcd_status = '已完成'
+					}
+				}
+				console.log(that.yptableData)
+				that.samplesListTotal = res.data.data.total
+				this.getSamplesList = true
+			},
+
 			// 删除不合格检测项目信息
 			async delJcdItem(id) {
 				let that = this
@@ -803,7 +926,7 @@
 				}
 			},
 			//新增不合格检测项目
-			async postJcdItem() {
+			async postJcdItem(formName) {
 				let that = this
 				that.jcxItem['jcd_id'] = that.jcd_id
 				const result = await this.$http.post('postJcdItem', that.jcxItem)
@@ -813,6 +936,7 @@
 					message: '保存成功'
 				})
 				this.addJcxItemDialog = false
+				this.$refs[formName].resetFields();
 				this.getJcdItems()
 			}
 			},
@@ -829,6 +953,7 @@
 			async putJcd() {
 				let that = this
 				that.jcd.jcd_id = that.jcd_id
+				console.log(that.jcd)
 				const res = await this.$http.post('putJcd',that.jcd)
 				if (res.data.code == 0) {
 				this.$message({
@@ -837,6 +962,9 @@
 				})
 				}
 				this.inputJcdShow = false
+				// this.getSamplesList = false
+				this.getSamples(that.jcd.cyd_id)
+				that.jcd.jcd_result = 1
 			},
 			
 			//查询
@@ -1019,25 +1147,30 @@
 			// 	}
 			// },
 			//填报检测单
-			async getJcdObj(id) {
+			async getJcdObj(sample_id,cyd_id) {
 				console.log(111)
 				this.inputJcdShow = true
 				console.log(222)
 				var that = this
+				that.jcd.cyd_id = cyd_id
 				const {
 					data: res
 				} = await this.$http.post("getJcdObj", {
-					cyd_id: id,
+					cyd_id: cyd_id,
+					sample_id: sample_id
 				});
-			
+
 				that.jcd_id = res.data.jcd_id
+				// that.jcd.sample_id = 
 				console.log(that.jcd_id)
+				// console.log(that.cyd_id)
 			},
 			//检测单列表-上报
-			async upJcdItem(id){
+			async putJcdStatus(id,cyd_id){
 				var that = this
-				const result = await this.$http.post('upJcdItem', {
-					sample_id: id
+				console.log(cyd_id)
+				const result = await this.$http.post('putJcdStatus', {
+					jcd_id: id
 				})
 				console.log(result.data.data)
 				// this.getCyds()
@@ -1048,7 +1181,7 @@
 							message: '上报抽样信息成功'
 						})
 						
-						this.getJcdList(result.data.data)
+						this.getSamples(cyd_id)
 					}
 			},
 			handleClick(tab, event) {
@@ -1164,6 +1297,16 @@
 				this.queryInfo2.pageNum = newPage
 				this.getJcdItems()
 			},
+			handleSizeChangeyp(newSize) {
+				this.ypqueryInfo.pageSize = newSize
+				this.getSamples()
+			},
+
+			/** 监听页码的改变 */
+			handleCurrentChangeyp(newPage) {
+				this.ypqueryInfo.pageNum = newPage
+				this.getSamples()
+			},
 			// 批量勾选
 			handleSelectionChange(val) {
 				this.multipleSelection = val
@@ -1180,7 +1323,7 @@
 					name: 'sampleReport',
 					params: {
 						task_id: this.task_id,
-						id: id
+						cyd_id: id
 					}
 				})
 			}

+ 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>

+ 4 - 2
src/main.js

@@ -12,9 +12,11 @@ import axios from 'axios'
 
 
 // 使用axios
-axios.defaults.baseURL = 'http://syjcapi.aielab.net/api/v1'
-//axios.defaults.baseURL = 'http://192.168.3.52/api/v1'
+// 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(

+ 55 - 1
src/router/index.js

@@ -9,6 +9,7 @@ import {
 import 'element-ui/lib/theme-chalk/index.css'
 Vue.use(VueRouter)
 
+
 /** 按需导入后台系统功能组件 */
 const routes = [{
 		path: '',
@@ -70,18 +71,59 @@ const routes = [{
 		// 	},
 			{
 				path: '/admin/undertakeReportZx',
-					name:'taskSampleZx',
+					name:'undertakeReportZx',
 					component: () => import('../components/admin/undertakeReportZx')
 			},
 			{
 				path: '/admin/jgsampleDetail',
 					name:'jgsampleDetail',
 					component: () => import('../components/admin/jgsampleDetail')
+			},{
+				path: '/admin/addTaskJcObject',
+					name:'addTaskJcObject',
+					component: () => import('../components/admin/addTaskJcObject')
+			},{
+				path: '/admin/subjDtList',
+					name:'subjDtList',
+					component: () => import('../components/admin/subjDtList')
+			},{
+				path: '/admin/getAccount',
+					name:'getAccount',
+					component: () => import('../components/admin/getAccount')
+			},{
+				path: '/admin/putAccount',
+					name:'putAccount',
+					component: () => import('../components/admin/putAccount')
+			},{
+				path: '/admin/getOrganization',
+					name:'getOrganization',
+					component: () => import('../components/admin/getOrganization')
+			},{
+				path: '/admin/getMonitor',
+					name:'getMonitor',
+					component: () => import('../components/admin/getMonitor')
 			},{
 				path: '/admin/regulatoryAuthority',
 				name:'regulatoryAuthority',
 				component: () => import('../components/admin/regulatoryAuthority')
+			},{
+				path: '/admin/setTaskJg',
+				name:'setTaskJg',
+				component: () => import('../components/admin/setTaskJg')
+			},{
+				path: '/admin/readSampleList',
+				name:'readSampleList',
+				component: () => import('../components/admin/readSampleList')
+			},{
+				path: '/admin/getJcds',
+				name:'getJcds',
+				component: () => import('../components/admin/getJcds')
+			},{
+				path: '/admin/readCheckList',
+				name:'readCheckList',
+				component: () => import('../components/admin/readCheckList')
 			},
+			
 		]
 	},
 	{
@@ -155,6 +197,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')
 		}
 		]
 	},{