Bläddra i källkod

Merge branch 'master' of http://git.in.ahbd.net/aielab/jcxt_qd

jiangyu 3 år sedan
förälder
incheckning
d249f6c676

+ 17 - 17
src/components/admin.vue

@@ -28,16 +28,17 @@
     									<i class="el-icon-s-home" />
              					 		<span slot="title">首页</span>
            							</el-menu-item> -->
-						<!--          一级菜单-->
+						
+						<!--一级菜单-->
 						<el-submenu :index="index+''" v-for="(item, index) in menuList" :key="index"  class="font">
-							<!--          一级菜单模板区-->
-							<template slot="title" class="font">
-								<!--              图标-->
-								<!-- <i :class="item.icon" /> -->
-								<!--              文本-->
-								<span>{{ item.subMenuName }}</span>
-							</template>
-							<!--            二级菜单-->
+						<!--一级菜单模板区-->
+								<template slot="title" class="font">
+									<!--              图标-->
+									<!-- <i :class="item.icon" /> -->
+									<!--              文本-->
+									<span>{{ item.subMenuName }}</span>
+								</template>
+						<!--二级菜单-->
 							<el-menu-item :index="subItem.path+''" v-for="subItem in item.children" :key="subItem.id"
 								@click="addTab(subItem.subMenuName, subItem.path)"  class="font">
 								<!--          二级菜单模板区-->
@@ -81,6 +82,7 @@
 		name: 'Admin',
 		data() {
 			return {
+				rymc:'',
 				name:'',
 				lastTime: null, // 最后一次点击的时间
 				currentTime: null, // 当前点击的时间
@@ -105,17 +107,15 @@
 			let data1 = []
 			let data = [
 				{
-					// icon: 'el-icon-user-solid',
+					//  subMenuName: '首页',
+					//  id: '6-1',
+					//  path: '/admin/conSole'
+					icon: 'el-icon-user-solid',
 					subMenuName: '首页',
 					children: [{
 							id: '6-1',
 							subMenuName: '控制台',
 							path: '/admin/conSole'
-					// },{
-					// 		id: '6-2',
-					// 		subMenuName: '系统介绍',
-					// 		path: '/admin/systemIntro'
-					// }
 					}]
 				},
 				{
@@ -166,7 +166,7 @@
 		methods: {
 			async getJgAccount() {
 				const result = await this.$http.post('getJgAccount')
-				this.name = result.data.data.name
+				this.name = result.data.data.rymc
 				console.log(this.name)
 			},
 			async userInform() {
@@ -368,7 +368,7 @@
 		 
 	}
 	.btn{
-		text-align: right;	
+		// text-align: right;	
 		float: right;
 		box-shadow: #145faa;
 	}

+ 0 - 312
src/components/admin/addSpecialTask.vue

@@ -1,312 +0,0 @@
-<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 label="任务名称" required>
-				<el-input v-model="form.task_name" placeholder="最长40字符"></el-input>
-			</el-form-item>
-			<el-form-item label="任务优先级" required>
-				<el-select v-model="form.level" placeholder="请选择">
-					<el-option v-for="item in priority" :key="item.value" :label="item.label" :value="item.value">
-					</el-option>
-				</el-select>
-			</el-form-item>
-			<el-form-item label="年度" required>
-				<el-date-picker v-model="form.year" type="year" value-format="yyyy">
-				</el-date-picker>
-			</el-form-item>
-			<el-form-item label="批次" required>
-				<el-select v-model="form.batch">
-					<el-option v-for="item in batch" :key="item.label" :label="item.label" :value="item.label">
-					</el-option>
-				</el-select>
-			</el-form-item>
-			<el-form-item label="任务时间" required>
-				<el-col :span="8">
-					<el-date-picker v-model="form.starttime" type="date" value-format="yyyy-MM-dd">
-					</el-date-picker>
-				</el-col>
-				<el-col :span="1">
-					<div class="line">--</div>
-				</el-col>
-				<el-col :span="11">
-					<el-date-picker v-model="form.endtime" type="date" value-format="yyyy-MM-dd">
-					</el-date-picker>
-				</el-col>
-			</el-form-item>
-			<!-- <el-form-item label="发布单位" required>
-				<el-input v-model="groupname" :disabled="true"></el-input>
-			</el-form-item> -->
-			<el-form-item label="牵头单位" required>
-				<el-input v-model="form.main_unit" @focus="getTestListShow = true"></el-input>
-			</el-form-item>
-			<el-form-item label="文件号">
-				<el-input v-model="form.filenum"></el-input>
-			</el-form-item>
-			<el-form-item label="备注">
-				<el-input type="textarea" placeholder="最长300字符" v-model="form.log"></el-input>
-			</el-form-item>
-			<el-form-item label="附件" required>
-				<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-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="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>
-	const groupname = window.sessionStorage.getItem('rymc')
-	const token = window.sessionStorage.getItem('token')
-	export default {
-		data() {
-			return {
-				groupname: groupname,
-				myHeaders: {
-					Authorization: 'bearer'+ token
-				},
-				form: {
-					main_unit: [],
-				},
-				// 优先级选项
-				priority: [{
-					value: '0',
-					label: '一般'
-				}, {
-					value: '1',
-					label: '紧急'
-				}, {
-					value: '2',
-					label: '特急'
-				}],
-				// 批次
-				batch: [{
-					label: '一季度'
-				}, {
-					label: '二季度'
-				}, {
-					label: '三季度'
-				}, {
-					label: '四季度'
-				}],
-				// 弹出检测机构弹窗
-				getTestListShow: false,
-				// 查询检测机构请求参数
-				queryInfo: {
-					pageNum: 1,
-					pageSize: 10,
-					keyWord: ''
-				},
-				// 检测机构列表
-				testList: [],
-				// 表头
-				tableHeader: [{
-						label: '单位名称',
-						prop: 'name',
-						width: 300
-						// fixed: 'left'
-					},
-					{
-						label: '机构类型',
-						prop: 'groupname',
-						// width: 40
-						// fixed: 'left'
-					}, {
-						label: '所属区域',
-						prop: 'dtRelyOnUnit',
-						width: 300
-						// fixed: 'left'
-					}
-				],
-				// 总共多少条数据
-				total: 0,
-				multipleSelection: null,
-				getTestListForm: {},
-				// 选中的牵头单位
-				orgs: [],
-				fileList: []
-			}
-		},
-		mounted() {
-			let that = this
-			// this.$nextTick(() => {
-			// 	console.log(that.multipleSelection)
-			//         that.multipleSelection.forEach((row) => {
-			//           that.$refs.multipleTable.toggleRowSelection(
-			//             that.testList.find((item) => {
-			//               return row==item; 
-			//             }),
-			//             true
-			//           );
-			//         });
-			//       });
-
-			// this.$nextTick(() => {
-			//   this.testList.forEach(outerItem => {
-			//     this.multipleSelection[this.page.current - 1] && this.multipleSelection[this.page.current - 1].forEach(item => {
-			//       if(outerItem.id == item.id) {
-			//         this.$refs.multipleTable.toggleRowSelection(outerItem,true);
-			//       }
-			//     })
-			//   })
-			// })
-		},
-		methods: {
-			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
-				console.log(this.form)
-				const result = await this.$http.post('AddTask', this.form)
-				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.$router.push('specialMonitor')
-				} else {
-					this.$message({
-						type: 'error',
-						message: result.data.message
-					})
-				}
-			},
-			reBack() {
-				this.$router.push('specialMonitor')
-			},
-			// 获取任务列表
-			async getTask() {
-				const result = await this.$http.post('getTaskList', this.queryInfo)
-				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.testList = result.data.data.rows
-					this.total = result.data.data.total
-				}
-			},
-			// 获取检测机构列表
-			async getTestList() {
-				this.queryInfo['token'] = token
-				const result = await this.$http.post('getTestList', this.queryInfo)
-				// 判断业务逻辑
-				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
-			},
-
-			/** 监听每页显示多少数据的改变 */
-			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() // 处理选中的方法
-			},
-			// 提交
-			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
-
-			},
-			// 上传成功
-			uploadSuccess(res) {
-				console.log(res.data)
-				this.form.file_url = res.data.fileUrl
-				this.form.file_name = res.data.fileName
-			}
-		}
-	}
-</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>

+ 10 - 22
src/components/admin/addTask.vue

@@ -1,15 +1,16 @@
 <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="任务名称" required>
 				<el-input v-model="form.task_name" placeholder="最长40字符"></el-input>
@@ -43,12 +44,6 @@
 					</el-date-picker>
 				</el-col>
 			</el-form-item>
-			<!-- <el-form-item label="发布单位" required>
-				<el-input v-model="rymc" :disabled="true"></el-input>
-			</el-form-item> -->
-			<!-- <el-form-item label="牵头单位" required>
-				<el-input v-model="form.main_unit" @focus="getTestListShow = true"></el-input>
-			</el-form-item> -->
 			<el-form-item label="文件号">
 				<el-input v-model="form.filenum"></el-input>
 			</el-form-item>
@@ -77,25 +72,24 @@
 		</el-form>
 	</div>
 </template>
+
 <script>
-	const rymc = window.sessionStorage.getItem('rymc')
+	// const rymc = window.sessionStorage.getItem('rymc')
 	const token = window.sessionStorage.getItem('token')
 	export default {
 		data() {
 			return {
 				id:'',
 				task_id:'',
-				task_class:'',
-				// rymc: rymc,		//从本地缓存获取发布单位
 				myHeaders: {
-					Authorization: 'bearer'+ token			//上传文件添加token
+					Authorization: 'bearer'+ token//上传文件添加token
 				},
 				// 任务表单
 				form: {
-					main_unit: [],	
 					task_id:'',
 					file_name:'',
-					file_url:''
+					file_url:'',
+					task_class:'例行监测',
 				},
 				// 优先级选项
 				priority: [{
@@ -121,11 +115,11 @@
 				// 抽检分离选项
 				divideOptions: [{
 						id: 0,
-						name: ''
+						name: '不分离'
 					},
 					{
 						id: 1,
-						name: ''
+						name: '分离'
 					}
 				],
 				// 上传成功文件列表
@@ -135,16 +129,10 @@
 		created() {
 			 this.task_class = this.$route.params.task_class
 			 this.task_id = this.$route.params.task_id
-			 this.postTasks()
 		},
 		methods: {
 			//保存
 			async onSubmit() {
-				// this.form['token'] = token
-				this.form['groupname'] = this.groupname
-				this.form['task_class'] = '例行监测'
-				this.form['ispublic'] = 0
-				this.form['task_id'] = this.task_id
 				const result = await this.$http.post('postTasks', this.form)
 					this.task_id = result.data.data.task_id
 					console.log( this.task_id)

+ 170 - 99
src/components/admin/addTaskJcObject.vue

@@ -8,36 +8,37 @@
 		</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 prop="rymc" label="抽样机构"  required>
+				<el-input v-model="form.rymc" @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 prop="name" label="检测机构"   required>
+					<el-input v-model="form.name" @focus="getOrganizationsShow2 = true"></el-input>
 			</el-form-item>
 			<el-form-item prop="sample_address" label="地区"   >
 				<el-cascader  :options="region" v-model="sample_address"
 					@change="handleChange" clearable>
 				</el-cascader>
 			</el-form-item>
-
-				<!-- <el-form-item prop="sample_address" label="地区"   >
-					<el-cascader :options="options" :props="props" v-model="sample_address" clearable ></el-cascader>
-				</el-form-item> -->
-
-
-
 		<!-- 底部按钮 -->
 			<el-form-item>
 				<el-button type="primary" @click="onSubmit()">保存</el-button>
-				<el-button type="warning" @click="reBack">返回</el-button>
+				
 			</el-form-item>
 		</el-form>
 <!-- 抽样机构 -->
 		<!-- 选择抽样机构对话框 -->
 		<template scope-slot="scope">
-			<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-dialog title="机构选择" :visible.sync="getOrganizationsShow1" width="60%" :close-on-click-modal="false" @open="getOrganizations1()" class="dialogItem">
+			<el-form v-if="getOrganizationsShow1" :model="getOrganizationsForm1" class="chouyangjigou">
 			<!--  表格数据区域-->
+				<!-- 搜索 -->
+					<el-form style="float:left"  :inline="true">
+						<el-form-item label="关键字" size="small">
+							<el-input style="width:200px" v-model="queryInfo1.name_like"></el-input>
+						</el-form-item>
+						<el-button  size="medium" type="primary" icon="el-icon-search" @click="searchData1()">搜索</el-button>
+						<el-button  size="medium" type="info" @click="reset1()">重置</el-button>
+					</el-form>
 				<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>
@@ -50,9 +51,9 @@
 						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
 				</el-table>
 		<div class="footer">
-	<!--抽样机构分页器区域-->
+		<!--抽样机构分页器区域-->
 			<el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
-				:current-page="queryInfo1.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo1.pageSize"
+				:current-page="queryInfo1.pageNum" :page-sizes="[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>
@@ -63,9 +64,17 @@
 		
 <!-- 检测机构 -->
 		<!-- 选择检测机构对话框 -->
-		<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-dialog title="机构选择" :visible.sync="getOrganizationsShow2" width="70%" :close-on-click-modal="false" @open="getOrganizations2()" class="dialogItem">
+			<el-form v-if="getOrganizationsShow2" :model="getOrganizationsForm2" class="jiancejigou" >
 				<!--  表格数据区域-->
+					<!-- 搜索 -->
+					<el-form style="float:left"  :inline="true">
+						<el-form-item label="关键字" size="small">
+							<el-input style="width:200px" v-model="queryInfo2.name_like"></el-input>
+						</el-form-item>
+						<el-button  size="medium" type="primary" icon="el-icon-search" @click="searchData()">搜索</el-button>
+						<el-button  size="medium" type="info" @click="reset2()">重置</el-button>
+					</el-form>
 				<el-table ref="multipleTable" :data="testList2" row-key="id" @selection-change="handleSelectionChange2"
 					border stripe highlight-current-row style="width: 100%" >
 					<el-table-column type="selection" :reserve-selection="true" width="50"></el-table-column>
@@ -74,13 +83,13 @@
 							{{ scope.$index+1 }}
 						</template>
 					</el-table-column>
-					<el-table-column :key="table.prop" v-for="table in tableHeader" :label="table.label"
+					<el-table-column :key="table.prop" v-for="table in tableHeader2" :label="table.label"
 						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
 				</el-table>
 				<div class="footer">
 				<!--检测机构分页器区域-->
 					<el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
-						:current-page="queryInfo2.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo2.pageSize"
+						:current-page="queryInfo2.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo2.pageSize"
 						layout="total, sizes, prev, pager, next, jumper" :total="total2" background />
 					<!-- 提交按钮 -->
 					<el-button type="success" @click="choseTest2()">提交</el-button>
@@ -92,11 +101,18 @@
 				<el-table  ref="multipleTable" :data="regionList" row-key="id" border stripe highlight-current-row >
 					<el-table-column :key="table.prop" v-for="table in tableHeader3" :label="table.label"
 						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+				<el-table-column label="操作" align="center" fixed="right">
+				<!-- 操作删除-->
+				<template slot-scope="scope">
+						<el-button type="danger" size="mini"  @click="delete(scope.row.id)" style="margin-top:5px;width:96px;margin-left:10px" >删除</el-button>
+				</template>
+				</el-table-column>
 				</el-table>
 <!-- 地区表格分页器 -->
 				<el-pagination @size-change="handleSizeChange3" @current-change="handleCurrentChange3"
 				:current-page="queryInfo3.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo3.pageSize"
 				layout="total, sizes, prev, pager, next, jumper" :total="total3" background />
+				<el-button class="footbtn" type="warning" @click="reBack">返回</el-button>
 	</div>
 </template>
 <script>
@@ -115,19 +131,13 @@ import {
 				CodeToText:'',
 				id:'',
 					form: {
-					// name:'',
-					bear_unit: '',
-					report_unit: '',
-					sample_number: '',
-					// sample_address: '',
-					uploadtime: '',
-					groupname:'',
-					properties:'',
-					main_unit:[],
-					check_unit:[], 
+					name:'',
+					rymc:'',
+					sample_address: '',
 					sample_org_id:'',
 					check_org_id:'',
-					task_id:''
+					task_id:'',
+					task_profile_id:'',
 				},
 				currentRow: null,
 				currentRow2: null,
@@ -178,8 +188,8 @@ import {
 				queryInfo1: {
 					pageNum: 1,
 					pageSize: 10,
-					name:'',
-					sample_org_id:''
+					groupname:'监管',
+					rymc:'',
 				},
 
 				// 弹出检测机构弹窗
@@ -188,14 +198,13 @@ import {
 				queryInfo2: {
 					pageNum: 1,
 					pageSize: 10,
-					// keyWord: '',
-					groupname:'检测机构',
+					groupname:'检测',
+					name_like:'',
 				},
 				// 地区表格请求参数
 				queryInfo3: {
 					pageNum: 1,
 					pageSize: 10,
-					// task_id:''
 				},
 				//抽样机构列表
 				testList: [],
@@ -206,16 +215,39 @@ import {
 				// 表头
 				tableHeader: [{
 						label: '单位名称',
-						prop: 'name',
-						width: 300
+						prop: 'rymc',
+						// width: 300
 						// fixed: 'left'
 					},
 					{
-						label: '机构类型',
-						prop: 'properties',
-						width:150
+						label: '企业代码',
+						prop: 'qydm',
+						// width:150
 						// fixed: 'left'
 					}, {
+						label: '组别名称',
+						prop: 'groupname',
+						// width: 300
+						// fixed: 'left'
+					}
+				],
+				tableHeader2: [{
+						label: '单位名称',
+						prop: 'name',
+						width: 300
+						// fixed: 'left'
+					},{
+						label: '依托单位',
+						prop: 'dtRelyOnUnit',
+						width: 300
+						// fixed: 'left'
+					},{
+						label: '机构性质',
+						prop: 'jgxz',
+						// width: 300
+						// fixed: 'left'
+					},
+					{
 						label: '组别名称',
 						prop: 'groupname',
 						width: 300
@@ -225,7 +257,7 @@ import {
 				// 地区表格表头
 				tableHeader3:[{
 					label: '抽样机构',
-					prop:'sampleOrgId.name',
+					prop:'sampleOrgId.rymc',
 				},{
 					label: '检测机构',
 					prop:'checkOrgId.name',
@@ -248,24 +280,12 @@ import {
 			}
 		},
 		created(){
-			this.sample_org_id = this.id
+			this.task_profile_id = this.id
 			this.task_id= this.$route.params.task_id
 			console.log(this.task_id)
-			this.postTaskProfile()		
+			// this.postTaskProfile()		
 		},
 		methods: {
-			// 添加任务step2
-			async postTaskProfile() {
-				const result = await this.$http.post('postTaskProfile', {
-					task_id: this.task_id,
-					sample_org_id:this.sample_org_id,
-					check_org_id:this.check_org_id,
-					sample_address:this.sample_address
-				})
-				this.sample_org_id = result.data.data.rows.id
-				this.check_org_id = result.data.data.rows.id
-				console.log(this.sample_org_id)
-			},
 			// 获取选择抽样地区
 			handleChange() {
 				var that = this
@@ -276,33 +296,8 @@ import {
 				that.form.sample_address = loc
 				// console.log(loc)
 			},
-			//保存
-			async onSubmit() {
-				// this.form['token'] = token
-				this.form['groupname'] = this.groupname
-				// this.form['releaser'] = window.sessionStorage.getItem('rymc')
-				this.form['task_class'] = '例行监测'
-				// this.form['ispublic'] = 0
-				this.form['sample_org_id'] = this.sample_org_id
-				this.form['check_org_id'] = this.check_org_id
-				this.form['task_id'] = this.task_id
-				const result = await this.$http.post('postTaskProfile', this.form)
-				this.getOrganizations3()
-				//判断业务逻辑
-				if (result.data.code == 0) {
-					this.$message({
-						type: 'success',
-						message: '创建任务成功'
-					})
-				} else {
-					this.$message({
-						type: 'error',
-						message: result.data.message
-					})
-				}
-			},
 			reBack() {
-				this.$router.push('addTask')
+				this.$router.push('routineMonitor')
 			},		
 			// 获取抽样机构列表
 			async getOrganizations1() {
@@ -310,8 +305,6 @@ import {
 				const result = await this.$http.post('getOrganizations', this.queryInfo1)
 					this.testList = result.data.data.rows
 					this.total = result.data.data.total
-					this.sample_org_id = result.data.data.rows.id
-					console.log(result.data.data.rows.id)
 			},
 
 			// 获取检测机构列表
@@ -330,8 +323,7 @@ import {
 				})
 						this.regionList = result.data.data.rows
 						this.total3 = result.data.data.total
-						// this.task_id = result.data.data.rows.task_id
-						console.log(task_id)
+						// console.log(task_id)
 				},
 			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
 			setPageNum() {
@@ -348,6 +340,34 @@ import {
 				})
 				this.hander = false
 			},
+			//搜索抽样机构
+			async searchData1() {
+				this.queryInfo1.pageNum = 1
+				this.getOrganizations1()
+			},
+				// 重置
+				reset1(){
+					this.queryInfo1={
+						name_like:'',
+						pageSize:10,
+						pageNum:1,
+						groupname:'监管'}
+					this.getOrganizations1()
+				},
+			//搜索检测机构
+			async searchData() {
+				this.queryInfo2.pageNum = 1
+				this.getOrganizations2()
+			},
+				// 重置
+					reset2(){
+						this.queryInfo2={
+							name_like:'',
+							pageSize:10,
+							pageNum:1,
+							groupname:'检测'}
+						this.getOrganizations2()
+					},
 //抽样机构页码
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange1(newSize) {
@@ -384,36 +404,71 @@ import {
 			//选中抽样(单选)
 			handleSelectionChange1(val) {
 				this.currentRow = val;
-				console.log(this.currentRow)
-				console.log(this.currentRow[0].name)
+				console.log('@@@',this.currentRow)
+				console.log('@@@',this.currentRow[0].name)
 				this.sample_org_id = this.currentRow[0].id
-				console.log(this.sample_org_id)
+				console.log('@@@',this.sample_org_id)
 			},
 			//选中检测(单选)
 			handleSelectionChange2(val) {
 				this.currentRow2 = val;
 				this.check_org_id = this.currentRow2[0].id
 				console.log(this.currentRow2)
-				console.log(this.currentRow2[0].name)
 				console.log(this.check_org_id)
 			},
 // 抽样单位提交
 			async choseTest1() {
 				let that = this
-				that.form.main_unit = that.currentRow[0].name
+				that.form.rymc = that.currentRow[0].rymc
 				that.getOrganizationsShow1 = false
-				that.form.sample_org_id = that.currentRow[0].id
-				console.log(that.form.sample_org_id)
-
 			},
 // 检测单位提交
-			choseTest2() {
+			async choseTest2() {
 				let that = this
-				that.form.check_unit = that.currentRow2[0].name
+				that.form.name = that.currentRow2[0].name
 				that.form.check_org_id = that.currentRow2[0].id
 				that.getOrganizationsShow2 = false
-				console.log(that.form.check_org_id)
+				console.log(that.currentRow2[0].id)
 			},
+//保存
+			async onSubmit() {
+				this.form['task_class'] = '例行监测'
+				this.form['sample_org_id'] = this.sample_org_id
+				this.form['check_org_id'] = this.check_org_id
+				this.form['task_id'] = this.task_id
+				const result = await this.$http.post('postTaskProfile', this.form)
+				this.getOrganizations3()
+				//判断业务逻辑
+				if (result.data.code == 0) {
+					this.$message({
+						type: 'success',
+						message: '创建任务成功'
+					})
+				} else {
+					this.$message({
+						type: 'error',
+						message: result.data.message
+					})
+				}
+			},
+			// 删除地区表格
+			async delete(){
+				const result = await this.$http.post('deleteTaskProfile', this.form)
+				console.log(task_profile_id)
+				//判断业务逻辑
+				if (result.data.code == 0) {
+					this.$message({
+						type: 'success',
+						message: '删除成功'
+					})
+				} else {
+					this.$message({
+						type: 'error',
+						message: result.data.message
+					})
+				}
+				this.getOrganizations3()
+			}
 		}
 	}
 </script>
@@ -424,7 +479,7 @@ import {
 	}
 
 	.el-form {
-		width: 800px;
+		width: 600px;
 		margin: 0 auto;
 	}
 
@@ -434,4 +489,20 @@ import {
 		flex-direction: row;
 		justify-content: space-between;
 	}
-</style>
+	.jiancejigou{
+		width: 1200px;
+	}
+	.chouyangjigou{
+		width: 1000px;
+	}
+	.footbtn{
+		margin-top: 10px;
+		margin-bottom: 5px;
+		margin-left: 5px;
+		float: right;
+	}
+	// /deep/  !important
+	thead .el-table-column--selection .cell {
+		display: none!important;
+	}
+</style>

+ 151 - 102
src/components/admin/addTaskObjectZx.vue

@@ -8,29 +8,37 @@
 		</el-breadcrumb>
 		<div class="title">添加任务</div>
 		<el-form :model="form" label-width="100px">
-			<el-form-item prop="sample_org_id" label="抽样机构"  required>
-				<el-input v-model="form.main_unit" @focus="getOrganizationsShow1 = true"></el-input>
+			<el-form-item prop="rymc" label="抽样机构"  required>
+				<el-input v-model="form.rymc" @focus="getOrganizationsShow1 = true"></el-input>
 			</el-form-item>
-			<el-form-item prop="check_org_id" label="检测机构"   required>
-					<el-input v-model="form.check_unit" @focus="getOrganizationsShow2 = true"></el-input>
+			<el-form-item prop="name" label="检测机构"   required>
+					<el-input v-model="form.name" @focus="getOrganizationsShow2 = true"></el-input>
 			</el-form-item>
 			<el-form-item prop="sample_address" label="地区"   >
 				<el-cascader  :options="region" v-model="sample_address"
-					@change="handleChange" clearable >
+					@change="handleChange" clearable>
 				</el-cascader>
 			</el-form-item>
 		<!-- 底部按钮 -->
 			<el-form-item>
-				<el-button type="success" @click="onSubmit()">保存</el-button>
-				<el-button type="warning" @click="reBack">返回</el-button>
+				<el-button type="primary" @click="onSubmit()">添加</el-button>
+				
 			</el-form-item>
 		</el-form>
 <!-- 抽样机构 -->
 		<!-- 选择抽样机构对话框 -->
 		<template scope-slot="scope">
-			<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-dialog title="机构选择" :visible.sync="getOrganizationsShow1" width="60%" :close-on-click-modal="false" @open="getOrganizations1()" class="dialogItem">
+			<el-form v-if="getOrganizationsShow1" :model="getOrganizationsForm1" class="chouyangjigou">
 			<!--  表格数据区域-->
+				<!-- 搜索 -->
+					<el-form style="float:left"  :inline="true">
+						<el-form-item label="关键字" size="small">
+							<el-input style="width:200px" v-model="queryInfo1.name_like"></el-input>
+						</el-form-item>
+						<el-button  size="medium" type="primary" icon="el-icon-search" @click="searchData1()">搜索</el-button>
+						<el-button  size="medium" type="info" @click="reset1()">重置</el-button>
+					</el-form>
 				<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>
@@ -45,7 +53,7 @@
 		<div class="footer">
 	<!--抽样机构分页器区域-->
 			<el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1"
-				:current-page="queryInfo1.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo1.pageSize"
+				:current-page="queryInfo1.pageNum" :page-sizes="[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>
@@ -56,9 +64,17 @@
 		
 <!-- 检测机构 -->
 		<!-- 选择检测机构对话框 -->
-		<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-dialog title="机构选择" :visible.sync="getOrganizationsShow2" width="70%" :close-on-click-modal="false" @open="getOrganizations2()" class="dialogItem">
+			<el-form v-if="getOrganizationsShow2" :model="getOrganizationsForm2" class="jiancejigou" >
 				<!--  表格数据区域-->
+					<!-- 搜索 -->
+					<el-form style="float:left"  :inline="true">
+						<el-form-item label="关键字" size="small">
+							<el-input style="width:200px" v-model="queryInfo2.name_like"></el-input>
+						</el-form-item>
+						<el-button  size="medium" type="primary" icon="el-icon-search" @click="searchData()">搜索</el-button>
+						<el-button  size="medium" type="info" @click="reset2()">重置</el-button>
+					</el-form>
 				<el-table ref="multipleTable" :data="testList2" row-key="id" @selection-change="handleSelectionChange2"
 					border stripe highlight-current-row style="width: 100%" >
 					<el-table-column type="selection" :reserve-selection="true" width="50"></el-table-column>
@@ -67,19 +83,20 @@
 							{{ scope.$index+1 }}
 						</template>
 					</el-table-column>
-					<el-table-column :key="table.prop" v-for="table in tableHeader" :label="table.label"
+					<el-table-column :key="table.prop" v-for="table in tableHeader2" :label="table.label"
 						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
 				</el-table>
 				<div class="footer">
-	<!--检测机构分页器区域-->
+				<!--检测机构分页器区域-->
 					<el-pagination @size-change="handleSizeChange2" @current-change="handleCurrentChange2"
-						:current-page="queryInfo2.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo2.pageSize"
+						:current-page="queryInfo2.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo2.pageSize"
 						layout="total, sizes, prev, pager, next, jumper" :total="total2" background />
-
+					<!-- 提交按钮 -->
 					<el-button type="success" @click="choseTest2()">提交</el-button>
 				</div>
 			</el-form>
 		</el-dialog>
+			
 <!-- 地区表格区域 -->
 				<el-table  ref="multipleTable" :data="regionList" row-key="id" border stripe highlight-current-row >
 					<el-table-column :key="table.prop" v-for="table in tableHeader3" :label="table.label"
@@ -88,9 +105,8 @@
 <!-- 地区表格分页器 -->
 				<el-pagination @size-change="handleSizeChange3" @current-change="handleCurrentChange3"
 				:current-page="queryInfo3.pageNum" :page-sizes="[1,10, 15, 20]" :page-size="queryInfo3.pageSize"
-				layout="total, sizes, prev, pager, next, jumper" :total="total3" background />			
-		
-
+				layout="total, sizes, prev, pager, next, jumper" :total="total3" background />
+				<el-button class="footbtn" type="warning" @click="reBack">返回</el-button>
 	</div>
 </template>
 <script>
@@ -107,23 +123,18 @@ import {
 				// 地区单选
 				props: { multiple: true },
 				CodeToText:'',
+				id:'',
 					form: {
-					// name:'',
-					// bear_unit: '',
-					// report_unit: '',
-					// sample_number: '',
+					name:'',
+					rymc:'',
 					sample_address: '',
-					// uploadtime: '',
-					// groupname:'',
-					// properties:'',
-					// main_unit:[],
-					// check_unit:[], 
 					sample_org_id:'',
 					check_org_id:'',
 					task_id:''
 				},
 				currentRow: null,
 				currentRow2: null,
+				// 抽样地区
 				region: regionData[11].children,
 				sample_address:[],
 				// 机构地域表格数据
@@ -170,8 +181,7 @@ import {
 				queryInfo1: {
 					pageNum: 1,
 					pageSize: 10,
-					name:'',
-					sample_org_id:''
+					groupname:'监管',
 				},
 
 				// 弹出检测机构弹窗
@@ -181,12 +191,13 @@ import {
 					pageNum: 1,
 					pageSize: 10,
 					// keyWord: '',
-					groupname:'检测机构',
+					groupname:'检测',
 				},
 				// 地区表格请求参数
 				queryInfo3: {
 					pageNum: 1,
 					pageSize: 10,
+					name_like:'',
 				},
 				//抽样机构列表
 				testList: [],
@@ -197,16 +208,39 @@ import {
 				// 表头
 				tableHeader: [{
 						label: '单位名称',
-						prop: 'name',
-						width: 300
+						prop: 'rymc',
+						// width: 300
 						// fixed: 'left'
 					},
 					{
-						label: '机构类型',
-						prop: 'properties',
-						width:150
+						label: '企业代码',
+						prop: 'qydm',
+						// width:150
 						// fixed: 'left'
 					}, {
+						label: '组别名称',
+						prop: 'groupname',
+						// width: 300
+						// fixed: 'left'
+					}
+				],
+				tableHeader2: [{
+						label: '单位名称',
+						prop: 'name',
+						width: 300
+						// fixed: 'left'
+					},{
+						label: '依托单位',
+						prop: 'dtRelyOnUnit',
+						width: 300
+						// fixed: 'left'
+					},{
+						label: '机构性质',
+						prop: 'jgxz',
+						// width: 300
+						// fixed: 'left'
+					},
+					{
 						label: '组别名称',
 						prop: 'groupname',
 						width: 300
@@ -216,7 +250,7 @@ import {
 				// 地区表格表头
 				tableHeader3:[{
 					label: '抽样机构',
-					prop:'sampleOrgId.name',
+					prop:'sampleOrgId.rymc',
 				},{
 					label: '检测机构',
 					prop:'checkOrgId.name',
@@ -233,33 +267,18 @@ import {
 				// multipleSelection: null,
 				getOrganizationsForm1: {},
 				getOrganizationsForm2: {},
-				// 选中的牵头单位
-				orgs: [],
-				orgs2: [],
 				// 上传成功文件列表
 				fileList: []
 				
 			}
 		},
-		created:function(){
+		created(){
 			this.sample_org_id = this.id
 			this.task_id= this.$route.params.task_id
 			console.log(this.task_id)
-			this.postTaskProfile()
+			// this.postTaskProfile()		
 		},
 		methods: {
-			// 添加任务step2
-			async postTaskProfile() {
-				const result = await this.$http.post('postTaskProfile', {
-					task_id: this.task_id,
-					sample_org_id:this.sample_org_id,
-					check_org_id:this.check_org_id,
-					sample_address:this.sample_address
-				})
-				this.sample_org_id = result.data.rows.id
-				this.check_org_id = result.data.rows.id
-				console.log(this.sample_org_id)
-			},
 			// 获取选择抽样地区
 			handleChange() {
 				var that = this
@@ -270,35 +289,9 @@ import {
 				that.form.sample_address = loc
 				// console.log(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
-				this.form['sample_org_id'] = this.sample_org_id
-				this.form['check_org_id'] = this.check_org_id
-				this.form['task_id'] = this.task_id
-				const result = await this.$http.post('postTaskProfile', this.form)
-				
-				this.getOrganizations3()
-				// 判断业务逻辑
-				if (result.data.code == 0) {
-					this.$message({
-						type: 'success',
-						message: '创建任务成功'
-					})
-				} else {
-					this.$message({
-						type: 'error',
-						message: result.data.message
-					})
-				}
-			},
+			// 返回
 			reBack() {
-				this.$router.push('addTask')
+				this.$router.push('specialMonitor')
 			},		
 			// 获取抽样机构列表
 			async getOrganizations1() {
@@ -306,8 +299,6 @@ import {
 				const result = await this.$http.post('getOrganizations', this.queryInfo1)
 					this.testList = result.data.data.rows
 					this.total = result.data.data.total
-					// this.sample_org_id = result.data.data.rows.id
-					// console.log(result.data.data.rows.id)
 			},
 
 			// 获取检测机构列表
@@ -320,17 +311,14 @@ import {
 			},
 			//地区表格
 				async getOrganizations3() {
-					// this.queryInfo3['token'] = token
 					const result = await this.$http.post('getJgTaskProfiles', {
 					task_id: this.task_id,
 					queryInfo3: this.queryInfo3,
 				})
 						this.regionList = result.data.data.rows
 						this.total3 = result.data.data.total
-						this.task_id = result.data.rows.task_id
-						console.log(this.task_id)
+						// console.log(task_id)
 				},
-
 			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
 			setPageNum() {
 				this.queryInfo.pageNum = 1
@@ -346,6 +334,35 @@ import {
 				})
 				this.hander = false
 			},
+//搜索抽样机构
+			async searchData1() {
+				this.queryInfo1.pageNum = 1
+				this.getOrganizations1()
+			},
+				// 重置
+				reset1(){
+					this.queryInfo1={
+						name_like:'',
+						pageSize:10,
+						pageNum:1,
+						groupname:'监管'}
+					this.getOrganizations1()
+				},
+			//搜索检测机构
+			async searchData() {
+				this.queryInfo2.pageNum = 1
+				this.getOrganizations2()
+			},
+				// 重置
+					reset2(){
+						this.queryInfo2={
+							name_like:'',
+							pageSize:10,
+							pageNum:1,
+							groupname:'检测'}
+						this.getOrganizations2()
+					},
+
 //抽样机构页码
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange1(newSize) {
@@ -379,39 +396,55 @@ import {
 				this.queryInfo3.pageNum = newPage
 				this.getOrganizations3()
 			},
-
 			//选中抽样(单选)
 			handleSelectionChange1(val) {
 				this.currentRow = val;
-				console.log(this.currentRow)
-				console.log(this.currentRow[0].name)
+				console.log('@@@',this.currentRow)
+				console.log('@@@',this.currentRow[0].name)
 				this.sample_org_id = this.currentRow[0].id
-				console.log(this.sample_org_id)
+				console.log('@@@',this.sample_org_id)
 			},
 			//选中检测(单选)
 			handleSelectionChange2(val) {
 				this.currentRow2 = val;
 				this.check_org_id = this.currentRow2[0].id
 				console.log(this.currentRow2)
-				console.log(this.currentRow2[0].name)
 				console.log(this.check_org_id)
 			},
 // 抽样单位提交
 			async choseTest1() {
 				let that = this
-				that.form.main_unit = that.currentRow[0].name
+				that.form.rymc = that.currentRow[0].rymc
 				that.getOrganizationsShow1 = false
-				that.form.sample_org_id = that.currentRow[0].id
-				console.log(that.form.sample_org_id)
-
 			},
 // 检测单位提交
-			choseTest2() {
+			async choseTest2() {
 				let that = this
-				that.form.check_unit = that.currentRow2[0].name
+				that.form.name = that.currentRow2[0].name
 				that.form.check_org_id = that.currentRow2[0].id
 				that.getOrganizationsShow2 = false
-				console.log(that.form.check_org_id)
+				console.log(that.currentRow2[0].id)
+			},
+//保存
+			async onSubmit() {
+				this.form['task_class'] = '专项监测'
+				this.form['sample_org_id'] = this.sample_org_id
+				this.form['check_org_id'] = this.check_org_id
+				this.form['task_id'] = this.task_id
+				const result = await this.$http.post('postTaskProfile', this.form)
+				this.getOrganizations3()
+				//判断业务逻辑
+				if (result.data.code == 0) {
+					this.$message({
+						type: 'success',
+						message: '创建任务成功'
+					})
+				} else {
+					this.$message({
+						type: 'error',
+						message: result.data.message
+					})
+				}
 			},
 		}
 	}
@@ -423,7 +456,7 @@ import {
 	}
 
 	.el-form {
-		width: 800px;
+		width: 600px;
 		margin: 0 auto;
 	}
 
@@ -433,4 +466,20 @@ import {
 		flex-direction: row;
 		justify-content: space-between;
 	}
-</style>
+	.jiancejigou{
+		width: 1200px;
+	}
+	.chouyangjigou{
+		width: 1000px;
+	}
+	.footbtn{
+		margin-top: 10px;
+		margin-bottom: 5px;
+		margin-left: 5px;
+		float: right;
+	}
+	// /deep/  !important
+	thead .el-table-column--selection .cell {
+		display: none!important;
+	}
+</style>

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

@@ -68,12 +68,12 @@ export default {
         },
         async queryTask() {
             this.$router.push({
-                path: '/admin/routineMonitor'
+                path: '/admin/historyTask'
             })
         },
         async tuiHui() {
             this.$router.push({
-                path: '/admin/reTask'
+                path: '/admin/tuiHui'
             })
         },
         async SystemIntroduction() {

+ 25 - 26
src/components/admin/getJcds.vue

@@ -5,13 +5,24 @@
             <el-breadcrumb separator-class="el-icon-arrow-right">		
             <el-breadcrumb-item >首页</el-breadcrumb-item>
             <el-breadcrumb-item>{{parentName}}</el-breadcrumb-item>
-            <el-breadcrumb-item>{{labelName}}</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 prop="status" label="状态" width="130" align="center" >
+					<template slot-scope="scope">
+						<el-tag type="info" v-if="scope.row.task_profile_status==4">未查看</el-tag>
+						<el-tag v-if="scope.row.task_profile_status==5" plain>已查看</el-tag>
+						<el-tag type="danger" v-if="scope.row.task_profile_status==13">抽样中</el-tag>
+						<el-tag type="success" v-if="scope.row.task_profile_status==14">抽样完成</el-tag>
+						<el-tag type="primary"  effect="plain" v-if="scope.row.task_profile_status==17">检测中</el-tag>
+						<el-tag type="success"  v-if="scope.row.task_profile_status==18">检测完成</el-tag>
+						<el-tag type="success" v-if="scope.row.task_profile_status==21">已完成</el-tag>
+					</template>
+			</el-table-column>
         <!-- 操作 -->
         <el-table-column label="操作" align="center" fixed="right">
         <template slot-scope="scope">
@@ -25,7 +36,7 @@
                 layout="total, sizes, prev, pager, next, jumper" :total="total" background />
         <!-- 返回按钮 -->
             <div class="btns">
-                <el-button plain size="medium" @click="returnTask()" >
+                <el-button plain size="medium" @click="returnTask()">
                     返回
                 </el-button>
             </div>
@@ -53,7 +64,7 @@ export default {
             	total:0,
                 tableHeader2: [{
                             label: '抽样机构',
-                            prop: 'sampleOrgId.name',
+                            prop: 'sampleOrgId.rymc',
                             width: 180,
                         }, {
                             label: '检测机构',
@@ -62,18 +73,16 @@ export default {
                         {
                             label: '抽样地区',
                             prop: 'sample_address'
-                        }, 
+                        },
                 ]  
         }
     },
-    mounted() {
-        this.getJgTaskProfiles()
-    },
     created() {
         this.task_id = this.$route.params.id
+        this.task_profile_id = this.$route.params.iid
         this.parentName = this.$route.params.parentName
-        this.labelName = this.$route.params.labelName
-        this.getJgTaskProfiles()
+        // this.labelName = this.$route.params.labelName
+        this.getData()
     },
 	methods: {
         //返回
@@ -113,7 +122,7 @@ export default {
             }
         },
         // 获取检测机构列表
-        async getJgTaskProfiles() {
+        async getData() {
               var that = this
             const { data: res} = await this.$http.post("getJgTaskProfiles", {
                 task_id: that.task_id,
@@ -123,41 +132,31 @@ export default {
                 });
                 that.tableData = res.data.rows
                 that.total = res.data.total
+
         },
         //查看检测单列表 
         read(task_id,id){
-            // console.log(11)
-            // console.log(id)
-            // console.log(task_id)
 				this.$router.push({
 					name:'readCheckList',
 					params: {
 					task_id:task_id,
                     task_profile_id:id,
                     parentName:this.parentName,
-					}
-                    
+					}    
 				})
-                console.log(parentName)
+                // console.log(parentName)
 		},
           //分页器
-                handleSizeChange(val) {
-                    console.log(`每页 ${val} 条`);
-                    },
-                handleCurrentChange(val) {
-                    this.queryInfo.pageNum = val;
-                    console.log(`当前页: ${val}`);
-                    this.getJgTaskProfiles()
-                    },
+               
                 /** 监听页码的改变 */
                 handleCurrentChange(newPage) {
                     this.queryInfo.pageNum = newPage
-                    this.getJgTaskProfiles()
+                    this.getData()
                 },
                 /** 监听每页显示多少数据的改变 */
                 handleSizeChange(newSize) {
                     this.queryInfo.pageSize = newSize
-                    this.getJgTaskProfiles()
+                    this.getData()
                 },
     },
     }

+ 49 - 48
src/components/admin/getMonitor.vue

@@ -3,8 +3,8 @@
         <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-item>监管机构</el-breadcrumb-item>
             </el-breadcrumb>
 	    </div>
 
@@ -56,7 +56,7 @@
             <el-form v-if="readDialogVisible" :model="readForm" label-width="150px">
 
                 <el-form-item label="机构名称:" prop="rymc" class="labelItem">
-					<div>{{readForm.name}}</div>
+					<div>{{readForm.rymc}}</div>
 				</el-form-item>
                 <!-- <el-form-item label="机构性质:" prop="jgxz" class="labelItem">
 					<div v-if="readForm.jgxz=='1'">政府部分</div>
@@ -64,9 +64,7 @@
 					<div v-else>企业</div>
 				</el-form-item> -->
                 <el-form-item label="组别:" prop="groupname" class="labelItem">
-					<!-- <div v-if="readForm.groupname=='1'">省级监管单位</div>
-					<div v-else-if="readForm.groupname=='2'">市级监管单位</div>
-					<div v-else>县级监管单位</div> -->
+                    <div>{{readForm.groupname}}</div>
 				</el-form-item>
                 <el-form-item label="企业代码:" prop="qydm" class="labelItem">
 					<div>{{readForm.qydm}}</div>
@@ -101,8 +99,7 @@ export default {
                 pageSize:10,
                 pageNum:1,
                 groupname:'',
-                jgxz:'',
-                name:'',
+                rymc:'',
             }, 
            	// 查看任务详情
             readDialogVisible: false,
@@ -119,7 +116,7 @@ export default {
         tableHeader: [
             {
                 label: '机构名称',
-                prop: 'name',
+                prop: 'rymc',
                 width: 280
 			},{
                 label: '组别名称',
@@ -129,43 +126,49 @@ export default {
                 label: '企业代码',
                 prop: 'qydm',
                 width: 200
-            },{
-                label: '地址',
-                prop: 'address',
-                width: 180
-            },{
-                label: '联系人',
+            },
+            // {
+            //     label: '地址',
+            //     prop: 'address',
+            //     width: 180
+            // },
+            {
+                label: '负责人姓名',
                 prop: 'contact_name',
                 width: 150
             },{
-                label: '联系电话',
+                label: '负责人电话',
                 prop: 'contact_phone',
                 width: 150
+            },{
+                label: '负责人QQ',
+                prop: 'contact_qq',
+                width: 150
             }
         ],
         // 任务状态选项
-        groupList: [
-            {
-                value: '1',
-                label: '省级监管单位'
-            }, {
-                value: '2',
-                label: '市级监管单位'
-            }, {
-                value: '3',
-                label: '县级监管单位'
-            }],
-        jxgzList: [
-            {
-                value: '1',
-                label: '政府部门'
-            }, {
-                value: '2',
-                label: '事业单位'
-            }, {
-                value: '3',
-                label: '企业'
-            }],
+        // groupList: [
+        //     {
+        //         value: '1',
+        //         label: '省级监管单位'
+        //     }, {
+        //         value: '2',
+        //         label: '市级监管单位'
+        //     }, {
+        //         value: '3',
+        //         label: '县级监管单位'
+        //     }],
+        // jxgzList: [
+        //     {
+        //         value: '1',
+        //         label: '政府部门'
+        //     }, {
+        //         value: '2',
+        //         label: '事业单位'
+        //     }, {
+        //         value: '3',
+        //         label: '企业'
+        //     }],
         }
     },
     created() {
@@ -188,8 +191,7 @@ export default {
 				pageSize:10,
                 pageNum:1,
                 groupname:'',
-                jgxz:'',
-                name:''
+                rymc:''
 				}
 				this.getJgOrgs()
         },
@@ -214,20 +216,19 @@ export default {
                 },
 			// 查看主体信息详情
 			async readDialogVisible1(row) {
-				this.readForm.name = row.name
-                this.readForm.name_other = row.name_other
+				this.readForm.rymc = row.rymc
                 this.readForm.groupname = row.groupname
-                this.readForm.address = row.address
-                this.readForm.properties = row.properties
+                // this.readForm.address = row.address
+                // this.readForm.properties = row.properties
                 this.readForm.contact_name = row.contact_name
                 this.readForm.contact_phone = row.contact_phone
                 this.readForm.contact_mail = row.contact_mail
                 this.readForm.contact_qq = row.contact_qq
                 this.readForm.qydm = row.qydm
-                this.readForm.create_time = row.create_time
-                this.readForm.update_time = row.update_time
-                this.readForm.cpfw = row.cpfw
-                this.readForm.delete_time = row.delete_time
+                // this.readForm.create_time = row.create_time
+                // this.readForm.update_time = row.update_time
+                // this.readForm.cpfw = row.cpfw
+                // this.readForm.delete_time = row.delete_time
 				this.readDialogVisible = true
 
 			},

+ 87 - 55
src/components/admin/getOrganization.vue

@@ -3,7 +3,7 @@
         <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>
@@ -63,64 +63,73 @@
 			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="150px">
+		<el-dialog title="查看详情" :visible.sync="readDialogVisible" width="40%" :close-on-click-modal="false" class="dialogItem">
+            <el-form v-if="readDialogVisible" :model="readForm" label-width="180px">
                 <el-form-item label="机构名称:" prop="name" class="labelItem">
 					<div>{{readForm.name}}</div>
 				</el-form-item>
-                <el-form-item label="依托单位:" prop="dtRelyOnUnit" class="labelItem">
-					<div>{{readForm.dtRelyOnUnit}}</div>
-				</el-form-item>
-                <el-form-item label="审核状态:" prop="userJcjgProfile.flag" class="labelItem">
+                <el-form-item label="审核状态:" prop="flag" class="labelItem">
 					<div v-if="readForm.flag=='1'">已通过审核</div>
                     <div v-else>未通过</div>
 				</el-form-item>
-                	<el-form-item label="机构性质:" prop="userJcjgProfile.properties" class="labelItem">
-					<!-- <div v-if="readForm.properties=='1'">政府部分</div>
-					<div v-else-if="readForm.properties=='2'">事业单位</div>
-					<div v-else>企业</div> -->
-				    </el-form-item>
-                <el-form-item label="统一社会信用代码:" prop="userJcjgProfile.dtCode" class="labelItem">
-					<div>{{readForm.dtCode}}</div>
+                <el-form-item label="机构类型:" prop="groupname" class="labelItem">
+                    <div>{{readForm.groupname}}</div>
+				</el-form-item>
+                <!-- <el-form-item label="农业系统:" prop="dtLevel" class="labelItem">
+                    <div>{{readForm.dtLevel}}</div>
+				</el-form-item> -->
+                <el-form-item label="机构性质:" prop="jgxz" class="labelItem">
+					<div>{{readForm.jgxz}}</div>
+				</el-form-item>
+                <el-form-item label="依托单位:" prop="dtRelyOnUnit" class="labelItem">
+					<div>{{readForm.dtRelyOnUnit}}</div>
+				</el-form-item>
+                 <el-form-item label="产品范围:" prop="cpfw" class="labelItem">
+					<div>{{readForm.cpfw}}</div>
 				</el-form-item>
-                 <el-form-item label="通讯地址:" prop="userJcjgProfile.address" class="labelItem">
+               
+                <el-form-item label="通讯地址:" prop="address" class="labelItem">
 					<div>{{readForm.address}}</div>
 				</el-form-item>
-                 <el-form-item label="法人名称:" prop="userJcjgProfile.user_fa" class="labelItem">
-					<div>{{readForm.user_fa}}</div>
+                 <el-form-item label="联系人:" prop="user_lxr" class="labelItem">
+					<div>{{readForm.user_lxr}}</div>
 				</el-form-item>
-                 <el-form-item label="邮编:" prop="userJcjgProfile.zipcode" class="labelItem">
-					<div>{{readForm.zipcode}}</div>
+                <el-form-item label="邮箱:" prop="email" class="labelItem">
+					<div>{{readForm.email}}</div>
 				</el-form-item>
-                 <el-form-item label="技术负责人:" prop="userJcjgProfile.user_js" class="labelItem">
-					<div>{{readForm.user_js}}</div>
+                <el-form-item label="联系人电话:" prop="phone_lxr" class="labelItem">
+					<div>{{readForm.phone_lxr}}</div>
 				</el-form-item>
-                 <el-form-item label="质量负责人:" prop="userJcjgProfile.user_zl" class="labelItem">
-					<div>{{readForm.user_zl}}</div>
+                <el-form-item label="联系人QQ:" prop="qq" class="labelItem">
+					<div>{{readForm.qq}}</div>
 				</el-form-item>
-                 <el-form-item label="catl证书编码:" prop="userJcjgProfile.catl_code" class="labelItem">
+                <el-form-item label="catl证书编码:" prop="catl_code" class="labelItem">
 					<div>{{readForm.catl_code}}</div>
 				</el-form-item>
-                 <el-form-item label="catl证书到期时间:" prop="userJcjgProfile.calt_expiration" class="labelItem">
+                 <el-form-item label="catl证书到期时间:" prop="calt_expiration" class="labelItem">
 					<div>{{readForm.calt_expiration}}</div>
 				</el-form-item>
-                 <el-form-item label="cma证书编码:" prop="userJcjgProfile.cma_code" class="labelItem">
+                <el-form-item label="cma证书编码:" prop="cma_code" class="labelItem">
 					<div>{{readForm.cma_code}}</div>
 				</el-form-item>
-                 <el-form-item label="cma证书到期时间:" prop="userJcjgProfile.cma_expiration" class="labelItem">
+                 <el-form-item label="cma证书到期时间:" prop="cma_expiration" class="labelItem">
 					<div>{{readForm.cma_expiration}}</div>
 				</el-form-item>
-                 <el-form-item label="产品范围:" prop="userJcjgProfile.cpfw" class="labelItem">
-					<div>{{readForm.cpfw}}</div>
+                <el-form-item label="农业农村部认可编号:" prop="mara_code" class="labelItem">
+					<div>{{readForm.mara_code}}</div>
+				</el-form-item>
+                <el-form-item label="农业农村部认可到期时间:" prop="mara_expiration" class="labelItem">
+					<div>{{readForm.mara_expiration}}</div>
+				</el-form-item>
+                <el-form-item label="统一社会信用代码:" prop="dtCode" class="labelItem">
+					<div>{{readForm.dtCode}}</div>
 				</el-form-item>
-                 <el-form-item label="认证产品数量(个):" prop="userJcjgProfile.shuliang" class="labelItem">
+                <el-form-item label="认证产品数量(个):" prop="shuliang" class="labelItem">
 					<div>{{readForm.shuliang}}</div>
 				</el-form-item>
-                <el-form-item label="认证参数数量(个):" prop="userJcjgProfile.canshu" class="labelItem">
+                <el-form-item label="认证参数数量(个):" prop="canshu" class="labelItem">
 					<div>{{readForm.canshu}}</div>
-				</el-form-item>
-                
-                
+				</el-form-item> 
             </el-form>
         </el-dialog>
 
@@ -163,7 +172,7 @@ export default {
 			},{
                 label: '依托单位',
                 prop: 'dtRelyOnUnit',
-                width: 180
+                width: 260
 			},
             // {
             //     label: '信用代码',
@@ -173,23 +182,23 @@ export default {
            {
                 label: 'cma证书编码',
                 prop: 'cma_code',
-                width: 150
+                width: 130
             },{
                 label: '农业农村部认可编号',
                 prop: 'mara_code',
-                width: 160
+                width: 280
             },{
                 label: '机构性质',
                 prop: 'jgxz',
-                width: 150
+                width: 100
             },{
                 label: '产品范围',
                 prop: 'cpfw',
-                width: 150
+                width: 200
             },{
                 label: '认证参数数量',
                 prop: 'canshu',
-                width: 150
+                width: 110
             }
         ],
         // 任务状态选项
@@ -243,6 +252,19 @@ export default {
             this.tableData = res.data.rows
             this.total = res.data.total
             console.log(this.tableData) 
+            	// if (this.readForm.dtLevel == 1){
+                //       this.readForm.dtLevel ='省级';
+                // }else if(this.readForm.dtLevel == 2){
+                //     this.readForm.dtLevel ='市级';
+                // }else if(this.readForm.dtLevel == 3){
+                //      this.readForm.dtLevel ='县级';
+                // }else if(this.readForm.dtLevel == 13){
+                //      this.readForm.dtLevel ='企业';
+                // }else if(this.readForm.dtLevel == 12){
+                //      this.readForm.dtLevel ='其他政府部门';
+                // }else{
+                //      this.readForm.dtLevel ='其他';
+                // }
             // for(let i= 0; i < this.tableData.length; i++) {
             //     if (this.tableData[i].properties == 1){
             //           this.tableData[i].properties ='政府部门';
@@ -298,22 +320,29 @@ export default {
                 },
 			// 查看主体信息详情
 			async readDialogVisible1(row) {
-                this.readForm.name = row.name
-                this.readForm.dtRelyOnUnit = row.dtRelyOnUnit
-                this.readForm.flag = row.flag
-                this.readForm.dtCode = row.dtCode
-                this.readForm.address = row.address
-                this.readForm.catl_code = row.catl_code
-                this.readForm.calt_expiration = row.calt_expiration
-                this.readForm.cma_code = row.cma_code
-                this.readForm.cma_expiration = row.cma_expiration
-                this.readForm.cpfw = row.cpfw
-                this.readForm.shuliang = row.shuliang
-                this.readForm.canshu = row.canshu
-                this.readForm.jgxz = row.jgxz
-				// console.log(this.readForm.dtRelyOnUnit)
-				this.readDialogVisible = true
+                this.readForm.name = row.name//单位名称
+                this.readForm.flag = row.flag//审核状态,0未审核,1已审核
+                this.readForm.groupname = row.groupname//机构类型
+                this.readForm.dtLevel = row.dtLevel//农业系统:3县级、2市级、1省级
+                this.readForm.jgxz = row.jgxz//机构性质
+                this.readForm.dtRelyOnUnit = row.dtRelyOnUnit//依托单位
+                this.readForm.dtCode = row.dtCode//统一社会信用代码
+                this.readForm.address = row.address//地址
+                this.readForm.user_lxr = row.user_lxr//联系人
+                this.readForm.email = row.email//邮箱
+                this.readForm.phone_lxr = row.phone_lxr//联系人电话
+                this.readForm.qq = row.qq//联系人QQ
+                this.readForm.catl_code = row.catl_code//catl证书编号
+                this.readForm.calt_expiration = row.calt_expiration//catl证书到期时间
+                this.readForm.cma_code = row.cma_code//cma证书编号
+                this.readForm.cma_expiration = row.cma_expiration//cma证书到期时间
+                this.readForm.mara_code = row.mara_code//农业农村部认可编号
+                this.readForm.mara_expiration = row.mara_expiration//农业农村部认可到期时间
+                this.readForm.cpfw = row.cpfw//产品范围(领域)
+                this.readForm.shuliang = row.shuliang//认证产品数量(个)
+                this.readForm.canshu = row.canshu//认证参数数量(个)
 
+				this.readDialogVisible = true
 			},
     },
        
@@ -331,4 +360,7 @@ export default {
 .biaoge{
     margin-top: 10px;
 }
+.labelItem{
+    padding: 0%;
+}
 </style>

+ 90 - 0
src/components/admin/historyTask.vue

@@ -0,0 +1,90 @@
+<template>
+<div>
+   <div class="workblock">
+        <div @click="routineMonitor()">
+            <el-button class="block" type="success" icon="el-icon-s-order">例行监测任务</el-button>
+        </div>
+        <div  @click="myMonitor()">
+            <el-button class="block" type="primary" icon="el-icon-aim">专项监测任务</el-button>
+        </div>
+        <!-- <div  @click="checkMonitor()">
+            <el-button class="block" type="warning" icon="el-icon-edit-outline">监督抽查</el-button>
+        </div> -->
+       
+    </div>
+    <div>
+        <el-button class="return" @click="fanhui">返回控制台</el-button>
+    </div>
+
+</div>
+ 
+    
+</template>
+<script>
+
+export default {
+    data() {
+      return {
+       
+      }
+    },
+    mounted() {
+		},
+    created() {
+		},
+    methods: {
+        async routineMonitor() {
+            this.$router.push({
+                path: '/admin/routineMonitor',
+            })
+        },
+        async myMonitor() {
+            this.$router.push({
+                path: '/admin/specialMonitor',
+            }) 
+        },
+        // async checkMonitor() {
+        //     this.$router.push({
+        //         path: '/admin/addTaskJd'
+        //     })
+        // },
+        async fanhui(){
+        this.$router.push({path: '/admin/conSole'})
+    }
+      
+    },
+   
+  }
+
+</script>
+<style lang="less" scoped>
+    .workblock{
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        height: 80%;
+        height: 28rem;
+    .block{
+        margin: 1.25rem 1.25rem;
+        width: 200px;
+        height: 100px;
+        font-size: 18px;
+        }
+        .block:hover {
+            // box-shadow: 0px 0px 0px #ccc;
+            transition-duration: 0.4s;
+            transform: scale(1.05);
+            // z-index: 10;
+            //  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
+        }
+    }
+    .return{
+        float: right;
+        margin-bottom: 10px;
+    }
+    .title {
+		margin-left: 45%;
+		margin-bottom: 20px;
+        font-size: 20px;
+	}
+</style>

+ 229 - 0
src/components/admin/message.vue

@@ -0,0 +1,229 @@
+
+<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 >{{parentName}}</el-breadcrumb-item>
+		<el-breadcrumb-item>抽检地区列表</el-breadcrumb-item>
+		</el-breadcrumb>
+	</div>
+		<!--  表格数据区域-->
+		<el-table ref="multipleTable" :data="tableData" 
+			border stripe highlight-current-row 
+			style="width: 100%">
+		<!-- <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" fixed="right">
+				<!-- 操作按钮区域的作用域插槽 -->
+				<template slot-scope="scope">
+					<el-col style="margin-bottom: 5px;">
+						<el-button type="warning" size="mini" plain @click="sendSample(scope.row.id)" style="margin-top:5px;margin-left:10px" >发送至抽样机构</el-button>
+						<el-button type="warning" size="mini" plain @click="sendCheck(scope.row.id)" style="margin-top:5px;margin-left:10px" >发送至检测机构</el-button>
+						<el-button type="warning" size="mini" plain @click="sendAll(scope.row.id)" style="margin-top:5px;margin-left:10px" >全部发送</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-button class="return" @click="fanhui" style="float:right;margin-bottom:10px">返回</el-button>
+	</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 {
+				task_id:'',
+				task_profile_id:'',
+				queryInfo:{
+					pageSize:10,
+					pageNum:1,
+				}, 
+				total:0,
+				tableHeader: [{
+						label: '抽样机构',
+						prop: 'sampleOrgId.rymc',
+					},
+					{
+						label: '检测机构',
+						prop: 'checkOrgId.name',
+					},
+					{
+						label: '地区',
+						prop: 'sample_address',
+					}
+				],
+				// 数据表格数据
+				tableData: [],
+			}
+		},
+		created() {
+			this.task_id = this.$route.params.id
+			this.parentName = this.$route.params.parentName
+			this.getJgTaskProfiles()
+			console.log(this.task_id)
+		},
+		methods: {
+		// 获取机构列表
+        async getJgTaskProfiles() {
+            	const result = await this.$http.post("getJgTaskProfiles", {
+                task_id: this.task_id,
+                pageNum: this.queryInfo.pageNum,
+                pageSize: this.queryInfo.pageSize
+                });
+                this.tableData = result.data.data.rows
+                this.total = result.data.data.total
+				this.total = result.data.data.total
+				console.log(result.data.data.rows)
+        },
+		// 发送给抽样机构
+		async sendSample(id){
+				console.log(id)
+				const result = await this.$http.post("sendSms",  
+					{
+						task_profile_id:id,
+						who:'S'
+					}); 
+				if (result.data.code == 0) {
+						this.$message({
+						type: 'success',
+						message:'发送成功',
+					})
+						} else {
+							this.$message({
+								type: 'warning',
+								message: result.data.message
+							})
+						}
+		},
+		// 发送给检测机构
+		async sendCheck(id){
+				console.log(id)
+				const result = await this.$http.post("sendSms",  
+					{
+						task_profile_id:id,
+						who:'C'
+					}); 
+				if (result.data.code == 0) {
+						this.$message({
+						type: 'success',
+						message:'发送成功',
+					})
+						} else {
+							this.$message({
+								type: 'warning',
+								message: result.data.message
+							})
+						}
+		},
+		//全部发送
+		async sendAll(id){
+				console.log(id)
+				const result = await this.$http.post("sendSms",  
+					{
+						task_profile_id:id,
+						who:'SC'
+					}); 
+				if (result.data.code == 0) {
+						this.$message({
+						type: 'success',
+						message:'发送成功',
+					})
+						} else {
+							this.$message({
+								type: 'warning',
+								message: result.data.message
+							})
+						}
+		},
+		//返回
+        fanhui(){
+            console.log(this.parentName)
+            if(this.parentName == '例行监测'){
+                this.$router.push({
+                    name:'routineMonitor',
+                    // params:{
+                    //     task_id:this.$route.params.id
+                    //     }
+                })
+            }
+            else if(this.parentName == '专项监测'){
+                 this.$router.push({
+                    name:'specialMonitor',
+                    // params:{
+                    //     task_id:this.$route.params.id
+                    //     }
+                })
+            }
+            // else if(this.parentName == '监督抽查'){
+            //      this.$router.push({
+            //         name:'checkMonitor',
+            //         params:{
+            //             task_id:this.$route.params.id
+            //             }
+            //     })
+            // }
+    	},
+
+			/** 监听页码的改变 */
+			handleCurrentChange(newPage) {
+				this.queryInfo.pageNum = newPage
+				this.getJgTaskProfiles()
+			},
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange(newSize) {
+				this.queryInfo.pageSize = newSize
+				this.getJgTaskProfiles()
+			},
+		},
+	}	
+</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;
+	}
+	.select {
+		// display: flex;
+		flex-direction: row;
+		margin-left: 35px;
+		
+	}
+	.footer {
+		padding: 5px 0;
+		border-top: 1px solid #e5e5e5;
+		text-align: center;
+	}
+</style>

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

@@ -2,7 +2,7 @@
 	<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>修改信息</el-breadcrumb-item>
 		</el-breadcrumb>
 		<div class="title">
@@ -53,7 +53,7 @@
 
 
 			<el-form-item>
-				<el-button type="success" @click="preServe()">保存修改</el-button>
+				<el-button type="primary" @click="preServe()">保存修改</el-button>
 				<el-button @click="reBack()">返回</el-button>
 			</el-form-item>
 		</el-form>

+ 1 - 2
src/components/admin/reTask.vue

@@ -4,9 +4,8 @@
 	<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>{{parentName}}</el-breadcrumb-item>
 		  <el-breadcrumb-item>退回任务</el-breadcrumb-item>
-		  <el-breadcrumb-item>任务列表</el-breadcrumb-item>
 		</el-breadcrumb>
 		</div>
 		

+ 46 - 17
src/components/admin/readCheck.vue

@@ -25,6 +25,10 @@
                                 <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>
+						<!-- 不合格项表格分页器 -->
+						<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+							:current-page="queryInfo.pageNum" :page-sizes="[10, 15, 20]" :page-size="queryInfo.pageSize"
+							layout="total, sizes, prev, pager, next, jumper" :total="total" background />
                         </div>
                     </el-descriptions-item>
                 </el-descriptions>
@@ -57,8 +61,13 @@
 				fileList: [],
 				form: {},
 				jcd_id:'',
+				total:0,
 				jcdItem: [],//不合格项信息
 				jcd_unit:[],//检测单信息
+				queryInfo:{
+					pageNum:1,
+					pageSize:10
+				},
 				units: [],
 				production: [],
 				task_id: '',
@@ -73,27 +82,31 @@
 						label: '检测项目',
 						prop: 'item_name',
 						// fixed: 'left'
-                        width: 210
+                        width: 200
 					},
 					{
 						label: '检验标准',
 						prop: 'item_standard',
-						width: 210
+						width: 200
 					},
 					{
 						label: '实测值',
 						prop: 'item_measured_value',
-						width: 210
+						width: 200
 					},
 					{
-						label: '检验依据',
+						label: '单项判定结果',
 						prop: 'item_result',
-						width: 210
+						width: 200
+					},{
+						label: '检验依据',
+						prop: 'item_basis',
+						width: 200
 					},
 					{
 						label: '检验备注',
 						prop: 'item_log',
-						width: 210
+						width: 200
 					}
 				],
 			}
@@ -104,26 +117,24 @@
 			this.jcd_id = this.$route.params.jcd_id
 			this.parentName = this.$route.params.parentName
 			console.log(this.parentName)
-			// console.log(this.task_id)
-			// console.log(this.task_profile_id)
 			this.getJcd()
+			this.getBuHeGe()
 		},
 		methods: {
-			// 获取抽样单信息
+			// 获取检测单信息
 			async getJcd() {
 				const result = await this.$http.post('getJcd', {
-					task_profile_id: this.task_profile_id,
-					task_id: this.task_id,
+					// task_profile_id: this.task_profile_id,
+					// task_id: this.task_id,
 					jcd_id : this.$route.params.jcd_id
 				})
 				this.jcd_unit = result.data.data//检测单信息
-					console.log(this.jcd_unit.jcd_result)
+					// console.log(this.jcd_unit.jcd_result)
 				if(this.jcd_unit.jcd_result == '1'){
 					this.jcd_unit.jcd_result = '合格'
 				}else{
 					this.jcd_unit.jcd_result = '不合格'
 				}
-
 				if(this.jcd_unit.jcd_status == '1'){
 					this.jcd_unit.jcd_status = '未上报'
 				}else if(this.jcd_unit.jcd_status == '2'){
@@ -133,10 +144,28 @@
 				}else{
 					this.jcd_unit.jcd_status = '无'
 				}
-                this.jcdItem = result.data.data.jcdItem//不合格项信息
-				
-				console.log(this.jcd_unit)
-				console.log(result.data.data.jcdItem)
+			},
+
+
+			//获取不合格项
+			async getBuHeGe() {
+				const result = await this.$http.post('getJcdItems', {
+					jcd_id : this.jcd_id,
+					queryInfo: this.queryInfo
+					})
+				this.jcdItem = result.data.data.rows
+				this.total = result.data.data.total
+				console.log( result.data.data.rows)
+			},
+			 /** 监听页码的改变 */
+			handleCurrentChange(newPage) {
+				this.queryInfo.pageNum = newPage
+				this.getJcdItems()
+			},
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange(newSize) {
+				this.queryInfo.pageSize = newSize
+				this.getJcdItems()
 			},
 			// 返回
 			back() {

+ 9 - 3
src/components/admin/readCheckList.vue

@@ -59,11 +59,12 @@
 export default{
     data(){
         return{
+            parentName:'',
             //弹框显隐
             readDialog:false,
             //第一个表格
             tableData:[],
-            //第二个表格z`
+            //第二个表格
             tableData2:[],
             //获取检测机构的两个参数
             task_id:'', 
@@ -94,7 +95,7 @@ export default{
                         },{
                             label: '单位地址',
                             prop: 'inspectedUnit.inspected_address',
-                            width: 200,
+                            width: 250,
                         },{
                             label: '单位联系人',
                             prop: 'inspectedUnit.contact_name',
@@ -145,7 +146,6 @@ export default{
        this.parentName = this.$route.params.parentName
        console.log(this.parentName)
        this.getJcds()
-    //    this.getSamples()
    },
    mounted(){
     if (window.history && window.history.pushState) {
@@ -166,6 +166,12 @@ export default{
              this.tableData = res.data.rows
              this.total = res.data.total
              console.log( this.tableData)
+             if (res.code == 1234){
+                this.$message({
+                    type: 'error',
+                    message: res.message
+                });
+             }
         },
        //第一个分页器
         /** 监听页码的改变 */

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

@@ -3,9 +3,9 @@
    	<div style="width: 100%">
         <!-- 标题栏导航 -->
 	    <div slot="header" class="clearfix">
-            <el-breadcrumb separator-class="el-icon-artableDate-right">		
+            <el-breadcrumb separator-class="el-icon-arrow-right">		
             <el-breadcrumb-item >首页</el-breadcrumb-item>
-            <el-breadcrumb-item>例行监测</el-breadcrumb-item>
+            <el-breadcrumb-item >{{parentName}}</el-breadcrumb-item>
             <el-breadcrumb-item>查看抽样单列表</el-breadcrumb-item>
             </el-breadcrumb>
 		</div>
@@ -37,46 +37,6 @@
                     返回
                 </el-button>
             </div>
-        <!-- 查看详情对话框-->
-		<!-- <el-dialog title="查看" :visible.sync="readDialogVisible" width="30%" :close-on-click-modal="false"
-			class="dialogItem">
-			<el-form v-if="readDialogVisible" label-width="100px">
-				<el-form-item label="抽样单编码:" prop="tableData.cyd_code" class="labelItem">
-					<div>{{readForm.cyd_code}}</div>
-				</el-form-item>
-				<el-form-item label="抽样单状态:" prop="cyd_status" class="labelItem">
-					<div v-if="level=='0'">一般</div>
-					<div v-if="level=='1'">紧急</div>
-					<div v-if="level=='2'">特急</div>
-				</el-form-item>
-				<el-form-item label="抽样人员1:" prop="sample_person_one" width="70px" class="labelItem">
-					<div>{{sample_person_one}}</div>
-				</el-form-item>
-				<el-form-item label="抽样人员2:" prop="sample_person_two" class="labelItem">
-					<div>{{readForm.sample_person_two}}</div>
-				</el-form-item>
-				<el-form-item label="抽样时间:" prop="cyd_date" class="labelItem">
-					<div>{{readForm.cyd_date}}</div>
-				</el-form-item>
-				<el-form-item label="单位名称:" prop="inspected_name" class="labelItem">
-					<div>{{readForm.inspected_name}}</div>
-				</el-form-item>
-				<el-form-item label="单位地址:" prop="inspected_address" class="labelItem">
-					<div>{{readForm.inspected_address}}</div>
-				</el-form-item>
-                <el-form-item label="联系人:" prop="contact_name" class="labelItem">
-					<div>{{readForm.contact_name}}</div>
-				</el-form-item>
-				<el-form-item label="备注:" prop="cyd_log" class="labelItem">
-					<div v-if="readForm.cyd_log==null">无</div>
-					<div v-else>{{readForm.cyd_log}}</div>
-				</el-form-item>
-				<div class="footer">
-					<el-button type="success" @click="readDialogVisible = false">返回</el-button>
-				</div>
-			</el-form>
-		</el-dialog> -->
-
     </div>
 </template>
 
@@ -92,6 +52,7 @@ export default {
             sampleOrgId:{},
             task_id:'', 
             task_profile_id:'', 
+            total:0,
             queryInfo:{
 					pageSize:10,
 					pageNum:1,
@@ -140,8 +101,10 @@ export default {
     created() {
         this.task_id = this.$route.params.task_id
         this.task_profile_id = this.$route.params.task_profile_id
+        this.parentName = this.$route.params.parentName
         console.log(this.task_id)
         console.log(this.task_profile_id)
+        console.log(this.parentName)
         this.getCyds()
     },
 	methods: {
@@ -151,7 +114,8 @@ export default {
             this.$router.push({
                 name:'setTaskJg',
                 params:{
-                    task_id: that.task_id
+                    id: this.$route.params.task_id,
+                    parentName:this.parentName,
                 }
             })
                 console.log(task_id)

+ 0 - 575
src/components/admin/recheckMonitor.vue

@@ -1,575 +0,0 @@
-<template>
-	<div style="width: 100%">
-		<el-card class="box-card">
-			<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>
-		
-		<!-- 头部搜索栏 -->
-		<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 />
-				</el-form-item>
-				<el-form-item label="任务状态" class="select">
-					<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">
-					<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;">
-					<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: 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-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 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-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>
-				</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-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-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>
-				</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="releaser" class="labelItem">
-					<div>{{readForm.releaser}}</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-form-item>
-				<el-form-item label="文件号:" prop="filenum" width="200px" 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')
-	export default {
-		name: 'recheckMonitor',
-		data() {
-			return {
-				queryInfo:{
-					year:'',
-					task_name:'',
-					starttime:'',
-					endtime:'',
-					ispublic:'',
-					pageSize:10,
-					pageNum:1
-				},
-				total:0,
-				cellStyle: {
-					padding: 2 + 'px'
-				},
-				rowStyle: {
-					height: 35 + 'px'
-				},
-				tableHeader: [{
-						label: '任务名称',
-						prop: 'task_name',
-						width: 150
-						// fixed: 'left'
-					},
-					{
-						label: '年度',
-						prop: 'year',
-						width: 80
-						// fixed: 'left'
-					}, {
-						label: '文件号',
-						prop: 'filenum',
-						width: 150
-						// fixed: 'left'
-					},
-					{
-						label: '开始时间',
-						prop: 'starttime',
-						width: 120
-					},
-					{
-						label: '结束时间',
-						prop: 'endtime',
-						width: 120
-					},
-					{
-						label: '创建者',
-						prop: 'releaser',
-						width: 120
-					},
-					{
-						label: '创建时间',
-						prop: 'createtime',
-						width: 180
-					}, {
-						label: '任务状态',
-						prop: 'ispublic',
-						width: 120
-					},
-					{
-						label: '任务优先级',
-						prop: 'level',
-						width: 120
-					},
-				],
-				// 数据表格数据
-				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.gettaskList()
-		},
-		methods: {
-			add() {
-				this.$router.push('addTask')
-			},
-			// 搜索
-			async searchData() {
-				this.queryInfo.pageNum = 1
-				this.gettaskList()
-			},
-			// 重置
-			reset(){
-				this.queryInfo={
-					year:'',
-					task_name:'',
-					starttime:'',
-					endtime:'',
-					ispublic:'',
-					pageSize:10,
-					pageNum:1
-				}
-			},
-			/** 监听页码的改变 */
-			handleCurrentChange(newPage) {
-				this.queryInfo.pageNum = newPage
-				this.gettaskList()
-			},
-			/** 监听每页显示多少数据的改变 */
-			handleSizeChange(newSize) {
-				this.queryInfo.pageSize = newSize
-				this.gettaskList()
-			},
-			
-			/** 监听页码的改变 */
-			handleCurrentChange(newPage) {
-				this.queryInfo.pageNum = newPage
-				this.gettaskList()
-			},
-			// 获取任务列表
-			async gettaskList() {
-				for (var key in this.queryInfo) {
-					if (this.queryInfo[key] == '') {
-						delete this.queryInfo[key]
-					}
-				}
-				const {
-					data: res
-				} = await this.$http.post(
-					"getTaskList", 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
-			},
-			// 查看任务详情
-			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
-				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.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('delTask', {
-					delarr: that.delarr,
-					token: token
-				})
-				if (result.data.code == 0) {
-					this.$message({
-						type: 'success',
-						message: '删除成功!'
-					});
-					that.gettaskList()
-				} else {
-					this.$message({
-						type: 'error',
-						message: '删除失败!'
-					});
-				}
-
-				this.$refs.multipleTable.clearSelection();
-			},
-			// 发布任务
-			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 != '未发布') {
-						this.$alert('任务不在可发布状态!', {
-							confirmButtonText: '确定',
-							callback: action => {
-
-							}
-						});
-					} else {
-						this.multipleSelection[i].ispublic = 1
-						canPub = 1
-					}
-				}
-				if(canPub==1){
-					const result = await this.$http.post('isPublicTask', {
-						pubarr: that.multipleSelection,
-						token: token
-					})
-					if (result.data.code == 0) {
-						this.$message({
-							type: 'success',
-							message: '发布成功!'
-						});
-						that.gettaskList()
-					}				
-				}
-			},
-			// 废止任务
-			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 == '已发布') {
-						this.pubarr[i].ispublic = 2
-						canPub = 1
-					} else {
-						this.$alert('任务不在可废止状态!', {
-							confirmButtonText: '确定',
-							callback: action => {
-
-							}
-						});
-					}
-					if(canPub==1){
-						const result = await this.$http.post('isPublicTask', {
-							pubarr: that.pubarr,
-							token: token
-						})
-						if (result.data.code == 0) {
-							this.$message({
-								type: 'success',
-								message: '任务已废止!'
-							});
-							that.gettaskList()
-						}
-					}
-					
-				}
-
-			}
-
-
-		},
-	}
-</script>
-
-<style lang="less" scoped>
-	.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;
-	}
-</style>

+ 79 - 55
src/components/admin/routineMonitor.vue

@@ -14,9 +14,18 @@
 		<div class="headSearch">
 			<el-row :gutter="120" style="margin-right: 0px;">
 				<el-form :inline="true">
+				<el-form-item  size="small">
+					<el-select v-model="queryInfo.type" style="width: 110px;" clearable>
+						<el-option label="我的任务" value="own" selected = "selected"></el-option>
+      					<el-option label="下级任务" value="other"></el-option>
+						  <!-- <option value = "own" selected = "selected" >我的任务 </option >
+						  <option value = "other" selected = "selected" >下级任务 </option > -->
+					</el-select>
+				</el-form-item>
 				<el-form-item label="年度"  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="任务状态" size="small">
 					<el-select v-model="queryInfo.ispublic" style="width: 110px;" clearable>
@@ -87,8 +96,8 @@
 						<el-tag type="danger" v-if="scope.row.ispublic==2">已废止</el-tag>
 						<el-tag type="info" v-if="scope.row.ispublic==5">已查看</el-tag>
 						<el-tag type="primary"  effect="plain" v-if="scope.row.ispublic==9">执行中</el-tag>
-						<el-tag type="info" v-if="scope.row.ispublic==13">抽样中</el-tag>
-						<el-tag type="info" v-if="scope.row.ispublic==17">检测中</el-tag>
+						<!-- <el-tag type="info" v-if="scope.row.ispublic==13">抽样中</el-tag> -->
+						<!-- <el-tag type="info" v-if="scope.row.ispublic==17">检测中</el-tag> -->
 						<el-tag type="success"  v-if="scope.row.ispublic==21">已完成</el-tag>
 						<el-tag type="info" v-if="scope.row.ispublic==25">未完成</el-tag>
 						
@@ -105,12 +114,13 @@
 				<!-- 操作按钮区域的作用域插槽 -->
 				<template slot-scope="scope">
 					<el-col style="margin-bottom: 5px;">
-						<el-button size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:5px">查看详情</el-button>
-						<el-button type="info"  plain size="mini" @click="sendBack(scope.row.id)" style="margin-top:5px" >退回</el-button>
+						<el-button size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:2px;width:96px">详情</el-button>
+						<el-button type="warning" size="mini" plain @click="sendBack(scope.row.id)" style="margin-top:5px;width:96px;margin-left:10px" >退回</el-button>
 					</el-col>
 					<el-col style="margin-bottom: 5px;">
-						<el-button type="primary" size="mini" plain @click="getJcds(scope.row.id)" style="margin-top:5px">检测单</el-button> 
-						<el-button type="primary" size="mini" plain @click="sampleList(scope.row.id)">抽样单</el-button>
+						<el-button type="primary" size="mini" plain @click="getJcds(scope.row.id)" style="margin-top:5px;margin-left:3px">检测单</el-button> 
+						<el-button type="primary" size="mini" plain @click="sampleList(scope.row.id)" style="margin-top:5px;margin-left:3px">抽样单</el-button>
+						<el-button type="primary" size="mini" plain @click="getMessage(scope.row.id)" style="margin-top:5px;margin-left:3px">抽检地区</el-button> 
 					</el-col>
 				</template>
 			</el-table-column>
@@ -139,7 +149,6 @@
 				<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>
@@ -147,7 +156,7 @@
 					<div>{{readForm.starttime}} 至 {{readForm.endtime}}</div>
 				</el-form-item>
 				<el-form-item label="发布单位:" prop="creater" class="labelItem">
-					<div>{{readForm.creater.name}}</div>
+					<div>{{readForm.creater.rymc}}</div>
 				</el-form-item>
 				<!-- <el-form-item label="抽样单位:" prop="taskProfile.sample_org_id.name " class="labelItem">
 					<div>{{readForm.taskProfile.sample_org_id.name }}</div>
@@ -187,6 +196,7 @@
 		data() {
 			return {
 				task_id:'',
+				task_profile_id:'',
 				queryInfo:{
 					creater:'',
 					task_name_like:'',
@@ -227,23 +237,28 @@
 					{
 						label: '年度',
 						prop: 'year',
-						width: 80
+						width: 60
 						// fixed: 'left'
 					}, {
 						label: '文件号',
 						prop: 'filenum',
-						width: 180
+						width: 160
 						// fixed: 'left'
 					},
 					{
 						label: '创建者',
-						prop: 'creater.name',
+						prop: 'creater.rymc',
 						width: 140
 					},
 					{
 						label: '创建时间',
 						prop: 'create_time',
-						width: 180
+						width: 110
+					},
+					{
+						label: '附件下载',
+						prop: 'file_url',
+						width: 120
 					}
 				],
 				// 数据表格数据
@@ -269,16 +284,19 @@
 				}, {
 					value: '9',
 					label: '执行中'
-				}, {
-					value: '13',
-					label: '抽样中'
-				},{
-					value: '17',
-					label: '检测中'
-				},{
+				}, 
+				// {
+				// 	value: '13',
+				// 	label: '抽样中'
+				// },{
+				// 	value: '17',
+				// 	label: '检测中'
+				// },
+				{
 					value: '21',
 					label: '已完成'
-				},{
+				},
+				{
 					value: '25',
 					label: '未完成'
 				}
@@ -318,7 +336,7 @@
 			}
 		},
 		created() {
-			this.getTasks()
+			this.getJgTasks()
 			this.task_id = this.$route.params.task_id
 		},
 		methods: {
@@ -332,6 +350,17 @@
 					name:'setTaskJg',
 					params: {
 					id:id,
+					parentName:'例行监测',
+					}
+				})
+			},
+			//发短信
+			getMessage(id){
+				this.$router.push({
+					name:'message',
+					params: {
+					id:id,
+					parentName:'例行监测',
 					}
 				})
 			},
@@ -343,7 +372,6 @@
 					params: {
 					id: id,
 					parentName:'例行监测',
-					labelName:'查看检测机构'
 					}
 				})
 			},
@@ -352,7 +380,7 @@
 				this.queryInfo.pageNum = 1
 				this.queryInfo.task_name_like = this.queryInfo.task_name
 				console.log(this.queryInfo.task_name)
-				this.getTasks()
+				this.getJgTasks()
 			},
 			// 重置
 			reset(){
@@ -367,7 +395,7 @@
 					task_class:'例行监测',
 					// task_id
 				}
-				this.getTasks()
+				this.getJgTasks()
 			},
 			//退回
 			async sendBack(id){
@@ -393,25 +421,21 @@
 			/** 监听页码的改变 */
 			handleCurrentChange(newPage) {
 				this.queryInfo.pageNum = newPage
-				this.getTasks()
+				this.getJgTasks()
 			},
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange(newSize) {
 				this.queryInfo.pageSize = newSize
-				this.getTasks()
+				this.getJgTasks()
 			},
 			// 获取任务列表
-			async getTasks() {
+			async getJgTasks() {
 				for (var key in this.queryInfo) {
 					if (this.queryInfo[key] == '') {
 						delete this.queryInfo[key]
 					}
 				}
-				const {
-					data: res
-				} = await this.$http.post(
-					"getTasks", this.queryInfo
-				);
+				const {data: res} = await this.$http.post("getJgTasks", this.queryInfo);
 				this.tableData = res.data.rows
 				this.total = res.data.total
 			},
@@ -455,15 +479,15 @@
 			// 删除任务
 			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;
 				for (let i = 0; i < length; i++) {
@@ -479,7 +503,7 @@
 						type: 'success',
 						message: '删除成功!'
 					});
-					that.getTasks()
+					that.getJgTasks()
 				} else {
 					this.$message({
 						type: 'error',
@@ -490,22 +514,22 @@
 				// console.log(this.$refs.multipleTable);
 				this.$refs.multipleTable.clearSelection();
 				that.delarr = [];
-				this.getTasks()
+				this.getJgTasks()
 				// 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;
@@ -536,7 +560,7 @@
 							type: 'success',
 							message: '发布成功!'
 						});
-						that.getTasks()
+						that.getJgTasks()
 					}else{
 						this.$message({
 							type: 'error',
@@ -581,7 +605,7 @@
 								type: 'success',
 								message: '任务已废止!'
 							});
-							that.getTasks()
+							that.getJgTasks()
 						}
 					}
 					

+ 41 - 10
src/components/admin/setTaskJg.vue

@@ -5,7 +5,7 @@
 	    <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>{{parentName}}</el-breadcrumb-item>
             <el-breadcrumb-item>查看抽样机构</el-breadcrumb-item>
             </el-breadcrumb>
 		</div>
@@ -16,7 +16,7 @@
         <!-- 操作 -->
         <el-table-column label="操作" align="center" fixed="right">
         <template slot-scope="scope">
-            <el-button @click="read(scope.row.task_id,scope.row.id)" style="margin:5px 0" type="success" size="small">查看抽样单列表</el-button>
+            <el-button @click="read(scope.row.task_id,scope.row.id)" style="margin:5px 0" type="primary" size="small">查看抽样单列表</el-button>
         </template>
         </el-table-column>
     </el-table>
@@ -50,7 +50,7 @@ export default {
             	total:0,
                 tableHeader2: [{
                             label: '抽样机构',
-                            prop: 'sampleOrgId.name',
+                            prop: 'sampleOrgId.rymc',
                             width: 180,
                         }, {
                             label: '检测机构',
@@ -68,29 +68,59 @@ export default {
     },
     created() {
         this.task_id = this.$route.params.id
+        this.parentName = this.$route.params.parentName
         console.log(this.task_id)
         this.getJgTaskProfiles()
     },
 	methods: {
-        //返回
+          //返回
         returnTask(){
-            this.$router.push('routineMonitor')
+            console.log(this.parentName)
+            if(this.parentName == '例行监测'){
+                this.$router.push({
+                    name:'routineMonitor',
+                    params:{
+                        task_id:this.$route.params.id
+                        }
+                })
+            }
+            else if(this.parentName == '专项监测'){
+                 this.$router.push({
+                    name:'specialMonitor',
+                    params:{
+                        task_id:this.$route.params.id
+                        }
+                })
+            }
+            else if(this.parentName == '监督抽查'){
+                 this.$router.push({
+                    name:'checkMonitor',
+                    params:{
+                        task_id:this.$route.params.id
+                        }
+                })
+            }
+            else if(this.parentName == '退回任务'){
+                 this.$router.push({
+                    name:'reTask',
+                    params:{
+                        task_id:this.$route.params.id
+                    }
+                })
+            }
         },
         // 获取抽样机构列表
         async getJgTaskProfiles() {
             var that = this
-            console.log(that.id)
             const {data: res} = await this.$http.post("getJgTaskProfiles", {
                 task_id:that.task_id,
                 task_profile_id:that.id,
                 pageNum: that.queryInfo.pageNum,
                 pageSize: that.queryInfo.pageSize
                 });
-                
                 that.tableData = res.data.rows
-                 // this.tableData = res.data.rows
                 that.total = res.data.total
-                console.log(that.task_profile_id)
+                console.log(that.id)
 
             
             console.log( this.tableData)
@@ -104,7 +134,8 @@ export default {
 					name:'readSampleList',
 					params: {
 					task_id:task_id,
-                    task_profile_id:id
+                    task_profile_id:id,
+                    parentName:this.parentName,
 					}
 				})
 		},

+ 114 - 55
src/components/admin/specialMonitor.vue

@@ -14,9 +14,18 @@
 		<div class="headSearch">
 			<el-row :gutter="120" style="margin-right: 0px;">
 				<el-form :inline="true">
-				<el-form-item label="年度" class="select" size="small">
+				<el-form-item  size="small">
+					<el-select v-model="queryInfo.type" style="width: 110px;" clearable>
+						<el-option label="我的任务" value="own" selected = "selected"></el-option>
+      					<el-option label="下级任务" value="other"></el-option>
+						  <!-- <option value = "own" selected = "selected" >我的任务 </option >
+						  <option value = "other" selected = "selected" >下级任务 </option > -->
+					</el-select>
+				</el-form-item>
+				<el-form-item label="年度"  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="任务状态" size="small">
 					<el-select v-model="queryInfo.ispublic" style="width: 110px;" clearable>
@@ -29,7 +38,7 @@
 					</el-select>
 				</el-form-item>
 
-				<el-form-item label="任务时间"  size="small">
+				<el-form-item label="任务时间" 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>
@@ -42,9 +51,8 @@
 				<el-form-item label="任务名称" size="small">
 					<el-input v-model="queryInfo.task_name"></el-input>
 				</el-form-item>
-
 				<!-- 查询 -->
-				<el-button  size="medium"  icon="el-icon-search" @click="searchData()">查询</el-button>
+				<el-button  size="medium" icon="el-icon-search" @click="searchData()">查询</el-button>
 				<!-- 重置 -->
 				<el-button  size="medium" type="info" @click="reset()">重置</el-button>
 				</el-form>
@@ -56,10 +64,10 @@
 			<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" icon="el-icon-edit-outline" @click="ispublic()">发布
+					<el-button type="primary" size="small"  icon="el-icon-edit-outline" @click="ispublic()">发布
 					</el-button>
-					<el-button type="primary" size="small" icon="el-icon-scissors" @click="repeal()">废止</el-button>
-					<el-button type="danger" size="small" icon="el-icon-delete" @click="delArray()">删除</el-button>
+					<el-button type="primary" size="small"  icon="el-icon-scissors" @click="repeal()">废止</el-button>
+					<el-button type="danger" size="small"  icon="el-icon-delete" @click="delArray()">删除</el-button>
 					<!-- <el-button type="primary" size="small" plain icon="el-icon-download">导出</el-button> -->
 				</div>
 			</el-row>
@@ -92,6 +100,7 @@
 						<el-tag type="info" v-if="scope.row.ispublic==17">检测中</el-tag>
 						<el-tag type="success"  v-if="scope.row.ispublic==21">已完成</el-tag>
 						<el-tag type="info" v-if="scope.row.ispublic==25">未完成</el-tag>
+						
 					</template>
 				</el-table-column>
 				<el-table-column prop="level" label="任务优先级" width="95" align="center">
@@ -105,14 +114,13 @@
 				<!-- 操作按钮区域的作用域插槽 -->
 				<template slot-scope="scope">
 					<el-col style="margin-bottom: 5px;">
-						<el-button size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:5px">详情</el-button>
-						<el-button type="info" size="mini" @click="sendBack(scope.row.id)" style="margin-top:5px">退回</el-button>
+						<el-button size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:2px;width:96px">详情</el-button>
+						<el-button type="warning" size="mini" plain @click="sendBack(scope.row.id)" style="margin-top:5px;width:96px;margin-left:10px" >退回</el-button>
 					</el-col>
 					<el-col style="margin-bottom: 5px;">
-						<!-- <el-button type="success" size="mini" plain @click="takeTheLeadReportList(scope.row.id)" style="margin-top:5px">牵头单位报告</el-button> -->
-						<el-button type="primary" 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="primary" size="mini" plain @click="sampleList(scope.row.id)">抽样单</el-button>
+						<el-button type="primary" size="mini" plain @click="getJcds(scope.row.id)" style="margin-top:5px;margin-left:3px">检测单</el-button> 
+						<el-button type="primary" size="mini" plain @click="sampleList(scope.row.id)" style="margin-top:5px;margin-left:3px">抽样单</el-button>
+						<el-button type="primary" size="mini" plain @click="getMessage(scope.row.id)" style="margin-top:5px;margin-left:3px">抽检地区</el-button> 
 					</el-col>
 				</template>
 			</el-table-column>
@@ -149,8 +157,14 @@
 					<div>{{readForm.starttime}} 至 {{readForm.endtime}}</div>
 				</el-form-item>
 				<el-form-item label="发布单位:" prop="creater" class="labelItem">
-					<div>{{readForm.creater.name}}</div>
+					<div>{{readForm.creater.rymc}}</div>
 				</el-form-item>
+				<!-- <el-form-item label="抽样单位:" prop="taskProfile.sample_org_id.name " class="labelItem">
+					<div>{{readForm.taskProfile.sample_org_id.name }}</div>
+				</el-form-item>
+				<el-form-item label="检测单位:" prop="taskProfile.check_org_id.name" class="labelItem">
+					<div>{{readForm.taskProfile.check_org_id.name}}</div>
+				</el-form-item> -->
 				<!-- <el-form-item label="牵头单位:" prop="main_unit" class="labelItem">
 					<div>{{readForm.main_unit}}</div>
 				</el-form-item> -->
@@ -173,7 +187,7 @@
 
 		</el-dialog>
 	</div>
-</template>
+</template> 
 <script>
 	const token = window.sessionStorage.getItem('token')
 	const rybh = window.sessionStorage.getItem('rybh')
@@ -182,9 +196,13 @@
 		name: '',
 		data() {
 			return {
+				task_id:'',
 				queryInfo:{
-					year:'',
+					creater:'',
 					task_name_like:'',
+					level:'',
+					year:'',
+					batch:'',
 					task_name:'',
 					starttime:'',
 					endtime:'',
@@ -192,8 +210,6 @@
 					pageSize:10,
 					pageNum:1,
 					task_class:'专项监测',
-					task_id:'',
-					task_profile_id:''
 				}, 
 				total:0,
 				cellStyle: {
@@ -221,23 +237,28 @@
 					{
 						label: '年度',
 						prop: 'year',
-						width: 80
+						width: 60
 						// fixed: 'left'
 					}, {
 						label: '文件号',
 						prop: 'filenum',
-						width: 180
+						width: 160
 						// fixed: 'left'
 					},
 					{
 						label: '创建者',
-						prop: 'creater.name',
+						prop: 'creater.rymc',
 						width: 140
 					},
 					{
 						label: '创建时间',
 						prop: 'create_time',
-						width: 180
+						width: 110
+					},
+					{
+						label: '附件下载',
+						prop: 'file_url',
+						width: 120
 					}
 				],
 				// 数据表格数据
@@ -259,14 +280,24 @@
 					label: '废止'
 				}, {
 					value: '5',
-					label: '执行中'
+					label: '已查看'
 				}, {
-					value: '3',
-					label: '已结束,未完成'
+					value: '9',
+					label: '执行中'
 				}, {
-					value: '4',
-					label: '已结束,已完成'
-				}],
+					value: '13',
+					label: '抽样中'
+				},{
+					value: '17',
+					label: '检测中'
+				},{
+					value: '21',
+					label: '已完成'
+				},{
+					value: '25',
+					label: '未完成'
+				}
+				],
 				// 日期选择器快捷选项
 				pickerOptions: {
 					// disabledDate(time) {
@@ -302,13 +333,13 @@
 			}
 		},
 		created() {
-			this.getTasks()
+			this.getJgTasks()
 			this.task_id = this.$route.params.task_id
 		},
 		methods: {
 			//新增
 			add() {
-				this.$router.push('addTaskZx')
+				this.$router.push('addTask')
 			},
 			//查看抽样机构
 			sampleList(id){
@@ -316,27 +347,37 @@
 					name:'setTaskJg',
 					params: {
 					id:id,
+					parentName:'专项监测',
+					}
+				})
+			},
+			//发短信
+			getMessage(id){
+				this.$router.push({
+					name:'message',
+					params: {
+					id:id,
+					parentName:'专项监测',
 					}
 				})
 			},
 			//查看检测机构
 			getJcds(id) {
+				console.log(id)
 				this.$router.push({
 					name:'getJcds',
 					params: {
 					id: id,
 					parentName:'专项监测',
-					labelName:'查看检测机构'
 					}
 				})
-			},		
+			},
 			// 搜索
 			async searchData() {
 				this.queryInfo.pageNum = 1
 				this.queryInfo.task_name_like = this.queryInfo.task_name
 				console.log(this.queryInfo.task_name)
-				this.getTasks()
-
+				this.getJgTasks()
 			},
 			// 重置
 			reset(){
@@ -349,40 +390,43 @@
 					pageSize:10,
 					pageNum:1,
 					task_class:'专项监测',
-					
+					// task_id
 				}
-				this.getTasks()
+				this.getJgTasks()
 			},
 			//退回
 			async sendBack(id){
-				const result = await this.$http.post("postRetask", {task_id:id});
-				// this.task_id = res.data.rows.id
-				console.log(id)
+				const result = await this.$http.post("postRetask",  {task_id:id}); 
 					if (result.data.code == 0) {
 						this.$message({
 						type: 'success',
+						// message: result.data.message
 						message:'退回成功',
 					})
-				} else {
-					this.$message({
-						type: 'warning',
-						// message:'退回失败',
-						message: result.data.message
-					})
-				}
+						} else {
+							this.$message({
+								type: 'warning',
+								message: result.data.message
+								// message:'退回失败',
+							})
+						}
+					
+				console.log(result.data.code)
+				
+				
 			},
 			/** 监听页码的改变 */
 			handleCurrentChange(newPage) {
 				this.queryInfo.pageNum = newPage
-				this.getTasks()
+				this.getJgTasks()
 			},
 			/** 监听每页显示多少数据的改变 */
 			handleSizeChange(newSize) {
 				this.queryInfo.pageSize = newSize
-				this.getTasks()
+				this.getJgTasks()
 			},
 			// 获取任务列表
-			async getTasks() {
+			async getJgTasks() {
 				for (var key in this.queryInfo) {
 					if (this.queryInfo[key] == '') {
 						delete this.queryInfo[key]
@@ -391,18 +435,21 @@
 				const {
 					data: res
 				} = await this.$http.post(
-					"getTasks", this.queryInfo
+					"getJgTasks", this.queryInfo
 				);
 				this.tableData = res.data.rows
 				this.total = res.data.total
 			},
 			// 查看任务详情
 			async readDialogVisible1(row) {
+				// console.log(this.readForm	)
+				// console.log(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
 				this.readForm.year = row.year
+				// this.taskProfile.sample_org_id.name = row.taskProfile.sample_org_id.name
 				this.readForm.starttime = row.starttime
 				this.readForm.endtime = row.endtime
 				this.readForm.releaser = row.releaser
@@ -412,6 +459,16 @@
 				this.readForm.file_name = row.file_name
 				this.readForm.filenum = row.filenum
 				this.readForm.log = row.log
+                // const {
+				// 	data: res
+				// } = await this.$http.post("getTask", {
+				// 	task_id:row.id
+					
+				// 	}
+				// );
+                // this.readForm.taskProfile = res.data.taskProfile
+			   
+
 				this.readDialogVisible = true
 
 			},
@@ -447,16 +504,18 @@
 						type: 'success',
 						message: '删除成功!'
 					});
-					that.getTasks()
+					that.getJgTasks()
 				} else {
 					this.$message({
 						type: 'error',
-						message: '删除失败!'
+						// message: '删除失败!'
+						message: result.data.message
 					});
 				}
 				// console.log(this.$refs.multipleTable);
 				this.$refs.multipleTable.clearSelection();
 				that.delarr = [];
+				this.getJgTasks()
 				// this.$refs.multipleTable.clearSelectionFun();
 			},
 			// 发布任务
@@ -502,7 +561,7 @@
 							type: 'success',
 							message: '发布成功!'
 						});
-						that.getTasks()
+						that.getJgTasks()
 					}else{
 						this.$message({
 							type: 'error',
@@ -547,7 +606,7 @@
 								type: 'success',
 								message: '任务已废止!'
 							});
-							that.getTasks()
+							that.getJgTasks()
 						}
 					}
 					
@@ -636,6 +695,6 @@
 		margin-top: 20px;
 	}
 	.headSearch{
-		margin-left: 25px;
+		margin-left: 60px;
 	}
 </style>

+ 107 - 0
src/components/admin/tuiHui.vue

@@ -0,0 +1,107 @@
+<template>
+<div>
+   <el-breadcrumb separator-class="el-icon-arrow-right">		
+		  <el-breadcrumb-item >首页</el-breadcrumb-item>
+		  <el-breadcrumb-item>退回任务</el-breadcrumb-item>
+	</el-breadcrumb>
+   <div class="workblock">
+        <div @click="tuiHuiRoutineMonitor()">
+            <el-button class="block" type="success" icon="el-icon-s-order">例行监测</el-button>
+        </div>
+        <div  @click="tuiHuiSpecialMonitor()">
+            <el-button class="block" type="primary" icon="el-icon-aim">专项监测</el-button>
+        </div>
+        <!-- <div  @click="checkMonitor()">
+            <el-button class="block" type="warning" icon="el-icon-edit-outline">监督抽查</el-button>
+        </div> -->
+       
+    </div>
+    <div>
+        <el-button class="return" @click="fanhui">返回控制台</el-button>
+    </div>
+
+</div>
+ 
+    
+</template>
+<script>
+
+export default {
+    data() {
+      return {
+        // lx: require('../../assets/img/jgcx.png'),
+        // zx: require('../../assets/img/jcrw.png'),
+        // jd: require('../../assets/img/jccx.png'),
+      }
+    },
+    mounted() {
+		},
+    created() {
+		},
+    methods: {
+        //例行监测
+        async tuiHuiRoutineMonitor() {
+            this.$router.push({
+                name: 'reTask',
+                params: {
+					id: id,
+					parentName:'例行监测',
+                }
+            })
+        },
+        //专项监测
+        async tuiHuiSpecialMonitor() {
+            this.$router.push({
+                name: 'reTask',
+                params: {
+					id: id,
+					parentName:'专项监测',
+                }
+            }) 
+        },
+        
+        // async checkMonitor() {
+        //     this.$router.push({
+        //         path: '/admin/addTaskJd'
+        //     })
+        // },
+        async fanhui(){
+        this.$router.push({path: '/admin/conSole'})
+    }
+      
+    },
+   
+  }
+
+</script>
+<style lang="less" scoped>
+    .workblock{
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        height: 80%;
+        height: 28rem;
+    .block{
+        margin: 1.25rem 1.25rem;
+        width: 200px;
+        height: 100px;
+        font-size: 18px;
+        }
+        .block:hover {
+            // box-shadow: 0px 0px 0px #ccc;
+            transition-duration: 0.4s;
+            transform: scale(1.05);
+            // z-index: 10;
+            //  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
+        }
+    }
+    .return{
+        float: right;
+        margin-bottom: 10px;
+    }
+    .title {
+		margin-left: 45%;
+		margin-bottom: 20px;
+        font-size: 20px;
+	}
+</style>

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

@@ -36,7 +36,7 @@
 				<el-input v-model="form.contact_qq" :disabled="true"></el-input>
 			</el-form-item>
 			<el-form-item>
-				<el-button type="success" @click="putAccount()">修改账户信息</el-button>
+				<el-button type="primary" @click="putAccount()">修改账户信息</el-button>
 				<!-- <el-button @click="reBack()">返回</el-button> -->
 			</el-form-item>
 		</el-form>

+ 4 - 7
src/components/login.vue

@@ -4,9 +4,7 @@
 		<el-header style="height: 114px;" class="liuLan">
 			<span>浏览次数:{{data}}</span>
 		</el-header>
-	<!-- <div class="box"> -->
-		<el-form class="form" ref="loginForm" :model="loginForm" label-position="top" :rules="rulesLoginForm" label-width="70px" @keyup.enter="submitForm">
-				
+		<el-form class="form" ref="loginForm" :model="loginForm" label-position="top" :rules="rulesLoginForm" label-width="70px" @keyup.enter="submitForm">	
 			<el-form-item  prop="login_name">
 				<el-input prefix-icon="el-icon-user-solid" style="width:300px" class="login_input"  placeholder="用户名称" v-model="loginForm.login_name" clearable />
 			</el-form-item>
@@ -17,7 +15,6 @@
 			<el-radio v-model="loginForm.user_flag" label="jcdw">检测机构</el-radio>
 			<input type="button" name="" value="登录" class="btn" @click="submitForm">
 		</el-form>
-	<!-- </div> -->
 		
 		<div class="footer">
 			<p>主办单位:安徽省农业农村厅</p>
@@ -279,13 +276,13 @@ let windowHalfY = window.innerHeight / 2;
 		padding: 40px 20px 20px 0px;
 		background-color: rgba(255, 255, 255, 0.781);
 		margin: 0 auto;
-		width: 500px;
-		height: 250px;
+		width: 25%;
+		height: 25%;
 		margin-top: 200px;
 		color: #333;
 		text-align: center;
 		>div {
-			margin: 18px 0;
+			margin: 15px 0;
 		}
 	}
 

+ 22 - 10
src/router/index.js

@@ -50,16 +50,16 @@ const routes = [{
 				component: () => import('../components/admin/addTask')
 			},
 			
-			{
-				path: '/admin/recheckMonitor',
-				name:'recheckMonitor',
-				component: () => import('../components/admin/recheckMonitor')
-			},
-			{
-				path: '/admin/addSpecialTask',
-				name:'addSpecialTask',
-				component: () => import('../components/admin/addSpecialTask')
-			},
+			// {
+			// 	path: '/admin/recheckMonitor',
+			// 	name:'recheckMonitor',
+			// 	component: () => import('../components/admin/recheckMonitor')
+			// // },
+			// {
+			// 	path: '/admin/addSpecialTask',
+			// 	name:'addSpecialTask',
+			// 	component: () => import('../components/admin/addSpecialTask')
+			// },
 			{
 				path: '/admin/addTaskJcObject',
 					name:'addTaskJcObject',
@@ -144,10 +144,22 @@ const routes = [{
 				path: '/admin/systemIntro',
 				name:'systemIntro',
 				component: () => import('../components/admin/systemIntro')
+			},{
+				path: '/admin/historyTask',
+				name:'historyTask',
+				component: () => import('../components/admin/historyTask')
 			},{
 				path: '/admin/dataEchart',
 				name:'dataEchart',
 				component: () => import('../components/admin/dataEchart')
+			},{
+				path: '/admin/message',
+				name:'message',
+				component: () => import('../components/admin/message')
+			},{
+				path: '/admin/tuiHui',
+				name:'tuiHui',
+				component: () => import('../components/admin/tuiHui')
 			},
 			
 		]