Browse Source

登录页面和发布任务页面修改

yyfang 3 năm trước cách đây
mục cha
commit
df74d15906

+ 10 - 10
src/components/admin.vue

@@ -142,21 +142,21 @@
 							subMenuName: '专项监测',
 							path: '/admin/specialMonitor'
 						},
-						{
-						     id: '5-3',
-						     subMenuName: '监督抽查',
-						     path: '/admin/checkMonitor'
-						},
+						// {
+						//      id: '5-3',
+						//      subMenuName: '监督抽查',
+						//      path: '/admin/checkMonitor'
+						// },
 						// {
 						//      id: '5-4',
 						//      subMenuName: '退回任务',
 						//      path: '/admin/retask'
 						// },
-						{
-						     id: '5-5',
-						     subMenuName: '数据统计',
-						     path: '/admin/dataEchart'
-						},
+						// {
+						//      id: '5-5',
+						//      subMenuName: '数据统计',
+						//      path: '/admin/dataEchart'
+						// },
 						]
 				},
 				

+ 11 - 102
src/components/admin/addTask.vue

@@ -83,6 +83,8 @@
 	export default {
 		data() {
 			return {
+				id:'',
+				task_id:'',
 				task_class:'',
 				// rymc: rymc,		//从本地缓存获取发布单位
 				myHeaders: {
@@ -91,7 +93,9 @@
 				// 任务表单
 				form: {
 					main_unit: [],	
-					task_id:''
+					task_id:'',
+					file_name:'',
+					file_url:''
 				},
 				// 优先级选项
 				priority: [{
@@ -133,48 +137,21 @@
 			 this.task_id = this.$route.params.task_id
 			 this.postTasks()
 		},
-		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['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['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)
-					// console.log( result.data.data)
 				// 判断业务逻辑
 				if (result.code == 0) {
 						this.$message({
 						type: 'success',
-						// message: result.data.message
 						message: result.data.message
 					})
 				} else {
@@ -190,94 +167,26 @@
 				this.$router.push('routineMonitor')
 			},
 			//下一步
-			nextStep(){
-				var that = this
+			nextStep(id){
 				this.$router.push({
 					name:'addTaskJcObject',
 					params:{
-						 task_id: that.task_id
+						 task_id: this.task_id
 					}
 				})
-				console.log(that.task_id)
 				console.log(task_id)
 			},			
 			// 获取任务列表
 			async postTasks() {
 				const result = await this.$http.post('postTasks', this.queryInfo)
-			// 	// 判断业务逻辑
-				// if (result.data.code == 0) {
-			// 		this.testList = result.data.data.rows
-			// 		this.total = result.data.data.total
-					this.task_id = result.data.task_id},
-			// 	}else{
-			// 		this.$message({
-			// 			type: 'error',
-			// 			message: result.data.message
-			// 		})
-			// 	}
-			// },
-			// 获取检测机构列表
-			// async getTestList() {
-			// 	this.queryInfo['token'] = token
-			// 	const result = await this.$http.post('getTestList', this.queryInfo)
-			// 	console.log(result);
-				// 判断业务逻辑
-			// 	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
+					this.task_id = result.data.task_id
+				},
 				// 上传成功
 				uploadSuccess(res) {
 				console.log(res.data)
 				this.form.file_url = res.data.fileUrl
 				this.form.file_name = res.data.fileName
-			}
+				}
 			},
 			
 		}

+ 26 - 10
src/components/admin/addTaskJcObject copy.vue

@@ -89,17 +89,12 @@
 		</el-dialog>
 			
 <!-- 地区表格区域 -->
-			<el-table ref="multipleTable" :data="regionList" row-key="id" @selection-change="handleSelectionChange3"
-					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>
+			<div class="diqubiaoge">
+				<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>
+				</el-table>
+			</div>
 	</div>
 </template>
 <script>
@@ -220,6 +215,8 @@ import {
 				testList: [],
 				// 检测机构列表
 				testList2: [],
+				// 地区
+				regionList: [],
 				// 表头
 				tableHeader: [{
 						label: '单位名称',
@@ -239,6 +236,20 @@ import {
 						// fixed: 'left'
 					}
 				],
+				tableHeader3:[{
+					label: '抽样机构',
+					prop:'form.main_unit',
+					width:260,
+				},{
+					label: '检测机构',
+					prop:'form.check_unit',
+					width:260,
+				},{
+					label: '地区',
+					prop:'sample_address',
+					// width:260,
+				},
+				],
 				// 总共多少条数据
 				total: 0,
 				total2: 0,
@@ -310,7 +321,6 @@ import {
 				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)
-
 				// 判断业务逻辑
 				if (result.data.code == 0) {
 					this.$router.push('routineMonitor')
@@ -321,6 +331,7 @@ import {
 					})
 				}
 			},
+
 			reBack() {
 				this.$router.push('addTask')
 			},		
@@ -434,4 +445,9 @@ import {
 		flex-direction: row;
 		justify-content: space-between;
 	}
+	.diqubiaoge{
+		display: flex;
+        justify-content: center;
+		 width: 50%
+	}
 </style>

+ 57 - 73
src/components/admin/addTaskJcObject.vue

@@ -28,8 +28,8 @@
 
 		<!-- 底部按钮 -->
 			<el-form-item>
-				<el-button type="success" @click="onSubmit()">保存</el-button>
-				<el-button @click="reBack">返回</el-button>
+				<el-button type="primary" @click="onSubmit()">保存</el-button>
+				<el-button type="warning" @click="reBack">返回</el-button>
 			</el-form-item>
 		</el-form>
 <!-- 抽样机构 -->
@@ -78,23 +78,25 @@
 						: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"
 						layout="total, sizes, prev, pager, next, jumper" :total="total2" background />
-
+					<!-- 提交按钮 -->
 					<el-button type="success" @click="choseTest2()">提交</el-button>
 				</div>
 			</el-form>
 		</el-dialog>
 			
 <!-- 地区表格区域 -->
-			<div class="diqubiaoge">
 				<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>
-			</div>
+<!-- 地区表格分页器 -->
+				<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 />
 	</div>
 </template>
 <script>
@@ -111,6 +113,7 @@ import {
 				// 地区单选
 				props: { multiple: true },
 				CodeToText:'',
+				id:'',
 					form: {
 					// name:'',
 					bear_unit: '',
@@ -123,35 +126,12 @@ import {
 					main_unit:[],
 					check_unit:[], 
 					sample_org_id:'',
-					check_org_id:''
+					check_org_id:'',
+					task_id:''
 				},
 				currentRow: null,
 				currentRow2: null,
-				//组别名称
-				// group: [
-				// {
-				// 	value: '2',
-				// 	label: '县级监管单位'
-				// }, {
-				// 	value: '3',
-				// 	label: '市级监管单位'
-				// },{
-				// 	value: '4',
-				// 	label: '省级监管单位'
-				// }],
-				//机构性质
-				// field: [{
-				// 	value: '1',
-				// 	label: '政府部门'
-				// }, {
-				// 	value: '2',
-				// 	label: '事业单位'
-				// }, {
-				// 	value: '3',
-				// 	label: '企业'
-				// }],
 				// 抽样地区
-				// region: regionData,
 				region: regionData[11].children,
 				sample_address:[],
 				// 机构地域表格数据
@@ -211,6 +191,12 @@ import {
 					// keyWord: '',
 					groupname:'检测机构',
 				},
+				// 地区表格请求参数
+				queryInfo3: {
+					pageNum: 1,
+					pageSize: 10,
+					// task_id:''
+				},
 				//抽样机构列表
 				testList: [],
 				// 检测机构列表
@@ -236,44 +222,36 @@ import {
 						// fixed: 'left'
 					}
 				],
+				// 地区表格表头
 				tableHeader3:[{
 					label: '抽样机构',
-					prop:'form.main_unit',
-					width:260,
+					prop:'sampleOrgId.name',
 				},{
 					label: '检测机构',
-					prop:'form.check_unit',
-					width:260,
+					prop:'checkOrgId.name',
 				},{
 					label: '地区',
 					prop:'sample_address',
-					// width:260,
 				},
 				],
 				// 总共多少条数据
 				total: 0,
 				total2: 0,
+				total3: 0,
 				// table表格多选选项
 				// 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()
-		},
-		
-		mounted() {
-			let that = this
+			this.postTaskProfile()		
 		},
 		methods: {
 			// 添加任务step2
@@ -284,21 +262,10 @@ import {
 					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
+				this.sample_org_id = result.data.data.rows.id
+				this.check_org_id = result.data.data.rows.id
 				console.log(this.sample_org_id)
 			},
-			//搜索
-			// async search(){
-			// 	this.queryInfo1.pageNum = 1
-			// 		this.getOrganizations()
-			// },
-			//搜索
-			// async search2(){
-			// 	this.queryInfo2.pageNum = 1
-			// 		this.getOrganizations()
-			// },
-			
 			// 获取选择抽样地区
 			handleChange() {
 				var that = this
@@ -311,20 +278,22 @@ import {
 			},
 			//保存
 			async onSubmit() {
-				this.form['token'] = token
+				// this.form['token'] = token
 				this.form['groupname'] = this.groupname
-				this.form['orgs'] = this.orgs
-				this.form['releaser'] = window.sessionStorage.getItem('rymc')
+				// this.form['releaser'] = window.sessionStorage.getItem('rymc')
 				this.form['task_class'] = '例行监测'
-				this.form['ispublic'] = 0
+				// 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.$router.push('routineMonitor')
+					this.$message({
+						type: 'success',
+						message: '创建任务成功'
+					})
 				} else {
 					this.$message({
 						type: 'error',
@@ -341,7 +310,7 @@ 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.rows.id
+					this.sample_org_id = result.data.data.rows.id
 					console.log(result.data.data.rows.id)
 			},
 
@@ -353,7 +322,17 @@ import {
 					this.total2 = result.data.data.total
 					// this.check_org_id = result.data.rows.id
 			},
-
+			//地区表格
+				async getOrganizations3() {
+					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.data.rows.task_id
+						console.log(task_id)
+				},
 			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
 			setPageNum() {
 				this.queryInfo.pageNum = 1
@@ -391,7 +370,17 @@ import {
 				this.queryInfo2.pageNum = newPage
 				this.getOrganizations2()
 			},
-
+//地区表格页码
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange3(newSize) {
+				this.queryInfo3.pageSize = newSize
+				this.getOrganizations3()
+			},
+			/** 监听页码的改变 */
+			handleCurrentChange3(newPage) {
+				this.queryInfo3.pageNum = newPage
+				this.getOrganizations3()
+			},
 			//选中抽样(单选)
 			handleSelectionChange1(val) {
 				this.currentRow = val;
@@ -445,9 +434,4 @@ import {
 		flex-direction: row;
 		justify-content: space-between;
 	}
-	.diqubiaoge{
-		display: flex;
-        justify-content: center;
-		 width: 50%
-	}
 </style>

+ 7 - 28
src/components/admin/addTaskJd.vue

@@ -91,6 +91,7 @@
 				// 任务表单
 				form: {
 					main_unit: [],	
+					task_id:''
 				},
 				// 优先级选项
 				priority: [{
@@ -129,42 +130,21 @@
 		},
 		created() {
 			 this.task_class = this.$route.params.task_class
+			 this.task_id = this.$route.params.task_id
 			 this.postTasks()
 		},
-		// 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['token'] = token
 				this.form['groupname'] = this.groupname
 				this.form['orgs'] = this.orgs
 				this.form['releaser'] = window.sessionStorage.getItem('rymc')
 				this.form['task_class'] = '监督抽查'
 				this.form['ispublic'] = 0
 				const result = await this.$http.post('postTasks', this.form)
-				
+					this.task_id = result.data.data.task_id
+					console.log( this.task_id)
 				
 				// 判断业务逻辑
 				if (result.code == 0) {
@@ -175,7 +155,6 @@
 				} else {
 					this.$message({
 						type: 'success',
-						// message: result.data.message
 						message: '保存成功'
 					})
 				}
@@ -187,13 +166,13 @@
 			},
 			//下一步
 			nextStep(id){
-			console.log(id)
 			this.$router.push({
 				name:'addTaskObjectJd',
 				params:{
-					task_id:id
+					 task_id: this.task_id
 				}
 			})
+				console.log(task_id)
 			},			
 			// 获取任务列表
 			async postTasks() {

+ 60 - 48
src/components/admin/addTaskObjectJd.vue

@@ -87,7 +87,15 @@
 				</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"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+				</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 />			
 
 	</div>
 </template>
@@ -117,35 +125,12 @@ import {
 					main_unit:[],
 					check_unit:[], 
 					sample_org_id:'',
-					check_org_id:''
+					check_org_id:'',
+					task_id:''
 				},
 				currentRow: null,
 				currentRow2: null,
-				//组别名称
-				// group: [
-				// {
-				// 	value: '2',
-				// 	label: '县级监管单位'
-				// }, {
-				// 	value: '3',
-				// 	label: '市级监管单位'
-				// },{
-				// 	value: '4',
-				// 	label: '省级监管单位'
-				// }],
-				//机构性质
-				// field: [{
-				// 	value: '1',
-				// 	label: '政府部门'
-				// }, {
-				// 	value: '2',
-				// 	label: '事业单位'
-				// }, {
-				// 	value: '3',
-				// 	label: '企业'
-				// }],
 				// 抽样地区
-				// region: regionData,
 				region: regionData[11].children,
 				sample_address:[],
 				// 机构地域表格数据
@@ -205,10 +190,18 @@ import {
 					// keyWord: '',
 					groupname:'检测机构',
 				},
+				// 地区表格请求参数
+				queryInfo3: {
+					pageNum: 1,
+					pageSize: 10,
+					// task_id:''
+				},
 				//抽样机构列表
 				testList: [],
 				// 检测机构列表
 				testList2: [],
+				// 地区
+				regionList: [],
 				// 表头
 				tableHeader: [{
 						label: '单位名称',
@@ -228,16 +221,26 @@ import {
 						// fixed: 'left'
 					}
 				],
+				// 地区表格表头
+				tableHeader3:[{
+					label: '抽样机构',
+					prop:'sampleOrgId.name',
+				},{
+					label: '检测机构',
+					prop:'checkOrgId.name',
+				},{
+					label: '地区',
+					prop:'sample_address',
+				},
+				],
 				// 总共多少条数据
 				total: 0,
 				total2: 0,
+				total3: 0,
 				// table表格多选选项
 				// multipleSelection: null,
 				getOrganizationsForm1: {},
 				getOrganizationsForm2: {},
-				// 选中的牵头单位
-				orgs: [],
-				orgs2: [],
 				// 上传成功文件列表
 				fileList: []
 				
@@ -249,10 +252,6 @@ import {
 			console.log(this.task_id)
 			this.postTaskProfile()
 		},
-		
-		mounted() {
-			let that = this
-		},
 		methods: {
 			// 添加任务step2
 			async postTaskProfile() {
@@ -266,17 +265,6 @@ import {
 				this.check_org_id = result.data.rows.id
 				console.log(this.sample_org_id)
 			},
-			//搜索
-			// async search(){
-			// 	this.queryInfo1.pageNum = 1
-			// 		this.getOrganizations()
-			// },
-			//搜索
-			// async search2(){
-			// 	this.queryInfo2.pageNum = 1
-			// 		this.getOrganizations()
-			// },
-			
 			// 获取选择抽样地区
 			handleChange() {
 				var that = this
@@ -299,10 +287,13 @@ import {
 				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.$router.push('routineMonitor')
+						this.$message({
+						type: 'success',
+						message: '创建任务成功'
+					})
 				} else {
 					this.$message({
 						type: 'error',
@@ -331,7 +322,18 @@ import {
 					this.total2 = result.data.data.total
 					// this.check_org_id = result.data.rows.id
 			},
-
+				//地区表格
+				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(result.data.data.rows.task_id)
+				},
 			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
 			setPageNum() {
 				this.queryInfo.pageNum = 1
@@ -369,7 +371,17 @@ import {
 				this.queryInfo2.pageNum = newPage
 				this.getOrganizations2()
 			},
-
+//地区表格页码
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange3(newSize) {
+				this.queryInfo3.pageSize = newSize
+				this.getOrganizations3()
+			},
+			/** 监听页码的改变 */
+			handleCurrentChange3(newPage) {
+				this.queryInfo3.pageNum = newPage
+				this.getOrganizations3()
+			},
 			//选中抽样(单选)
 			handleSelectionChange1(val) {
 				this.currentRow = val;

+ 81 - 71
src/components/admin/addTaskObjectZx.vue

@@ -8,10 +8,10 @@
 		</el-breadcrumb>
 		<div class="title">添加任务</div>
 		<el-form :model="form" label-width="100px">
-			<el-form-item prop="main_unit" label="抽样机构"  required>
+			<el-form-item prop="sample_org_id" label="抽样机构"  required>
 				<el-input v-model="form.main_unit" @focus="getOrganizationsShow1 = true"></el-input>
 			</el-form-item>
-			<el-form-item prop="check_unit" label="检测机构"   required>
+			<el-form-item prop="check_org_id" label="检测机构"   required>
 					<el-input v-model="form.check_unit" @focus="getOrganizationsShow2 = true"></el-input>
 			</el-form-item>
 			<el-form-item prop="sample_address" label="地区"   >
@@ -19,17 +19,10 @@
 					@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="success" @click="onSubmit()">保存</el-button>
-				<el-button @click="reBack">返回</el-button>
+				<el-button type="warning" @click="reBack">返回</el-button>
 			</el-form-item>
 		</el-form>
 <!-- 抽样机构 -->
@@ -87,7 +80,16 @@
 				</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"
+						:prop="table.prop" align="center" :width="table.width" :fixed="table.fixed" />
+				</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 />			
+		
 
 	</div>
 </template>
@@ -107,45 +109,21 @@ import {
 				CodeToText:'',
 					form: {
 					// name:'',
-					bear_unit: '',
-					report_unit: '',
-					sample_number: '',
-					// sample_address: '',
-					uploadtime: '',
-					groupname:'',
-					properties:'',
-					main_unit:[],
-					check_unit:[], 
+					// bear_unit: '',
+					// report_unit: '',
+					// sample_number: '',
+					sample_address: '',
+					// uploadtime: '',
+					// groupname:'',
+					// properties:'',
+					// main_unit:[],
+					// check_unit:[], 
 					sample_org_id:'',
-					check_org_id:''
+					check_org_id:'',
+					task_id:''
 				},
 				currentRow: null,
 				currentRow2: null,
-				//组别名称
-				// group: [
-				// {
-				// 	value: '2',
-				// 	label: '县级监管单位'
-				// }, {
-				// 	value: '3',
-				// 	label: '市级监管单位'
-				// },{
-				// 	value: '4',
-				// 	label: '省级监管单位'
-				// }],
-				//机构性质
-				// field: [{
-				// 	value: '1',
-				// 	label: '政府部门'
-				// }, {
-				// 	value: '2',
-				// 	label: '事业单位'
-				// }, {
-				// 	value: '3',
-				// 	label: '企业'
-				// }],
-				// 抽样地区
-				// region: regionData,
 				region: regionData[11].children,
 				sample_address:[],
 				// 机构地域表格数据
@@ -205,10 +183,17 @@ import {
 					// keyWord: '',
 					groupname:'检测机构',
 				},
+				// 地区表格请求参数
+				queryInfo3: {
+					pageNum: 1,
+					pageSize: 10,
+				},
 				//抽样机构列表
 				testList: [],
 				// 检测机构列表
 				testList2: [],
+				// 地区
+				regionList: [],
 				// 表头
 				tableHeader: [{
 						label: '单位名称',
@@ -228,9 +213,22 @@ import {
 						// fixed: 'left'
 					}
 				],
+				// 地区表格表头
+				tableHeader3:[{
+					label: '抽样机构',
+					prop:'sampleOrgId.name',
+				},{
+					label: '检测机构',
+					prop:'checkOrgId.name',
+				},{
+					label: '地区',
+					prop:'sample_address',
+				},
+				],
 				// 总共多少条数据
 				total: 0,
 				total2: 0,
+				total3: 0,
 				// table表格多选选项
 				// multipleSelection: null,
 				getOrganizationsForm1: {},
@@ -249,10 +247,6 @@ import {
 			console.log(this.task_id)
 			this.postTaskProfile()
 		},
-		
-		mounted() {
-			let that = this
-		},
 		methods: {
 			// 添加任务step2
 			async postTaskProfile() {
@@ -266,17 +260,6 @@ import {
 				this.check_org_id = result.data.rows.id
 				console.log(this.sample_org_id)
 			},
-			//搜索
-			// async search(){
-			// 	this.queryInfo1.pageNum = 1
-			// 		this.getOrganizations()
-			// },
-			//搜索
-			// async search2(){
-			// 	this.queryInfo2.pageNum = 1
-			// 		this.getOrganizations()
-			// },
-			
 			// 获取选择抽样地区
 			handleChange() {
 				var that = this
@@ -289,20 +272,24 @@ import {
 			},
 			//保存
 			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['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.$router.push('routineMonitor')
+					this.$message({
+						type: 'success',
+						message: '创建任务成功'
+					})
 				} else {
 					this.$message({
 						type: 'error',
@@ -319,8 +306,8 @@ 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.rows.id
-					console.log(result.data.data.rows.id)
+					// this.sample_org_id = result.data.data.rows.id
+					// console.log(result.data.data.rows.id)
 			},
 
 			// 获取检测机构列表
@@ -331,6 +318,18 @@ import {
 					this.total2 = result.data.data.total
 					// this.check_org_id = result.data.rows.id
 			},
+			//地区表格
+				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)
+				},
 
 			/** 修复当用户在大于1的分页进行数据搜索没有返回值的问题 */
 			setPageNum() {
@@ -369,6 +368,17 @@ import {
 				this.queryInfo2.pageNum = newPage
 				this.getOrganizations2()
 			},
+//地区表格页码
+			/** 监听每页显示多少数据的改变 */
+			handleSizeChange3(newSize) {
+				this.queryInfo3.pageSize = newSize
+				this.getOrganizations3()
+			},
+			/** 监听页码的改变 */
+			handleCurrentChange3(newPage) {
+				this.queryInfo3.pageNum = newPage
+				this.getOrganizations3()
+			},
 
 			//选中抽样(单选)
 			handleSelectionChange1(val) {

+ 14 - 33
src/components/admin/addTaskZx.vue

@@ -71,7 +71,7 @@
 			</el-form-item>
 			<el-form-item>
 				<el-button type="success" @click="onSubmit()">保存</el-button>
-				<el-button type="success" @click="nextStep()">下一步</el-button>
+				<el-button type="success" @click="nextStep(id)">下一步</el-button>
 				<el-button @click="reBack()">返回</el-button>
 			</el-form-item>
 		</el-form>
@@ -91,6 +91,7 @@
 				// 任务表单
 				form: {
 					main_unit: [],	
+					task_id:''
 				},
 				// 优先级选项
 				priority: [{
@@ -129,31 +130,9 @@
 		},
 		created() {
 			 this.task_class = this.$route.params.task_class
+			 this.task_id = this.$route.params.task_id
 			 this.postTasks()
 		},
-		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() {
@@ -163,8 +142,10 @@
 				this.form['releaser'] = window.sessionStorage.getItem('rymc')
 				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)
 				
 				// 判断业务逻辑
 				if (result.code == 0) {
@@ -186,14 +167,14 @@
 				this.$router.push('specialMonitor')
 			},
 			//下一步
-			nextStep(id){
-			console.log(id)
-			this.$router.push({
-				name:'addTaskObjectZx',
-				params:{
-					task_id:id
-				}
-			})
+			nextStep(){
+				this.$router.push({
+					name:'addTaskObjectZx',
+					params:{
+						task_id: this.task_id
+					}
+				})
+				console.log(task_id)
 			},			
 			// 获取任务列表
 			async postTasks() {

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

@@ -51,7 +51,7 @@ export default {
       }
     },
     mounted() {
-         this.drawHistogram();
+        //  this.drawHistogram();
     },
     created() {
 	},

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

@@ -10,9 +10,9 @@
         <div  @click="specialMonitor()">
             <el-button class="block" type="primary" icon="el-icon-aim">专项监测</el-button>
         </div>
-        <div  @click="checkMonitor()">
+        <!-- <div  @click="checkMonitor()">
             <el-button class="block" type="warning" icon="el-icon-edit-outline">监督抽查</el-button>
-        </div>
+        </div> -->
        
     </div>
     <div>

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

@@ -303,7 +303,7 @@ export default {
 			// 查看主体信息详情
 			async readDialogVisible1(row) {
                 this.readForm.name = row.name
-				this.readForm.dtRelyOnUnit = row.userJcjgProfile.dtRelyOnUnit
+                this.readForm.dtRelyOnUnit = row.userJcjgProfile.dtRelyOnUnit
                 this.readForm.flag = row.userJcjgProfile.flag
                 this.readForm.dtCode = row.userJcjgProfile.dtCode
                 this.readForm.address = row.userJcjgProfile.address
@@ -318,7 +318,7 @@ export default {
                 this.readForm.cpfw = row.userJcjgProfile.cpfw
                 this.readForm.shuliang = row.userJcjgProfile.shuliang
                 this.readForm.canshu = row.userJcjgProfile.canshu
-				console.log(this.readForm.dtRelyOnUnit)
+				// console.log(this.readForm.dtRelyOnUnit)
 				this.readDialogVisible = true
 
 			},

+ 42 - 27
src/components/login.vue

@@ -4,18 +4,21 @@
 		<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-item  prop="login_name">
-				<el-input prefix-icon="el-icon-user-solid" class="login_input"  placeholder="用户名称" v-model="loginForm.login_name" clearable />
+				<el-input prefix-icon="el-icon-user-solid" style="width:300px" class="login_input"  placeholder="用户名称" v-model="loginForm.login_name" clearable />
 			</el-form-item>
 			<el-form-item  prop="pwd">
-				<el-input prefix-icon="el-icon-c-scale-to-original" placeholder="密码" v-model="loginForm.pwd" show-password clearable />
+				<el-input prefix-icon="el-icon-c-scale-to-original" style="width:300px" placeholder="密码" v-model="loginForm.pwd" show-password clearable />
 			</el-form-item>
-			<el-radio v-model="loginForm.user_flag" label="1">监管机构</el-radio>
-			<el-radio v-model="loginForm.user_flag" label="2">检测机构</el-radio>
+			<el-radio v-model="loginForm.user_flag" label="jgdw">监管机构</el-radio>
+			<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>
 			<p>技术支持:安徽省北斗精准农业信息工程实验室 农产品安全安徽省重点实验室</p>
@@ -101,11 +104,11 @@ let windowHalfY = window.innerHeight / 2;
 							// window.sessionStorage.setItem('qydm', result.data.data.qydm)
 							// window.sessionStorage.setItem('rybh', result.data.data.rybh)
 							// window.sessionStorage.setItem('rymc', result.data.data.rymc)
-							this.containers.style.cssText=("z-index:-1;height:0px;")
+							// this.containers.style.cssText=("z-index:-1;height:0px;")
 							// this.met.visible=false;
 							// this.rend.setSize(0,0)
-							let di = document.getElementById('3d')
-							di.remove(di.selectedIndex)
+							// let di = document.getElementById('3d')
+							// di.remove(di.selectedIndex)
 							if(result.data.data.groupname=="检测机构"){
 								route.push('/jc')
 							}else{
@@ -114,10 +117,11 @@ let windowHalfY = window.innerHeight / 2;
 							
 						} else if (result.data.code != 0) {
 							// loginButton.loading = false
-							this.containers.style.cssText=("z-index:-1")
-							this.msg = result.data.msg
+							// this.containers.style.cssText=("z-index:-1")
+							// this.msg = result.data.msg
 							message({
-								message: this.msg,
+								// message: this.msg,
+								message: result.data.message,
 								type: 'error',
 								showClose: true,
 								center: true
@@ -133,18 +137,18 @@ let windowHalfY = window.innerHeight / 2;
 				}
 			},
 			init() {
-      container = document.createElement("div");
-      document.body.appendChild(container);
-	  this.containers=container
-      camera = new THREE.THREE.PerspectiveCamera(
-        75,
-        window.innerWidth / window.innerHeight,
-        1,
-        10000
-      );
-      container.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:1";
-	  container.id="3d";
-      camera.position.z = 1000;
+    //   container = document.createElement("div");
+    //   document.body.appendChild(container);
+	//   this.containers=container
+    //   camera = new THREE.THREE.PerspectiveCamera(
+    //     75,
+    //     window.innerWidth / window.innerHeight,
+    //     1,
+    //     10000
+    //   );
+    //   container.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:1";
+	//   container.id="3d";
+    //   camera.position.z = 1000;
 
       scene =new THREE.THREE.Scene();
 
@@ -231,8 +235,17 @@ let windowHalfY = window.innerHeight / 2;
 	}
 	.form{
 		z-index: 100000;
+		// margin-top: 30px;
+		
 	}
-
+	// .box{
+	// 	margin: 0 auto;
+	// 	width:500px;
+	// 	height: 300px;
+	// 	margin-top: 200px;
+	// 	background: rgb(255, 255, 255);
+	// 	text-align: center;
+	// }
 	.header-right {
 		float: right;
 	}
@@ -263,18 +276,20 @@ let windowHalfY = window.innerHeight / 2;
 	}
 
 	.el-form {
-		// padding: 40px 20px 20px 0px;
-		// background-color: rgba(234, 234, 234, 0.7);
+		padding: 40px 20px 20px 0px;
+		background-color: rgba(255, 255, 255, 0.781);
 		margin: 0 auto;
-		width: 400px;
+		width: 500px;
 		height: 250px;
 		margin-top: 200px;
 		color: #333;
 		text-align: center;
 		>div {
-			margin: 28px 0;
+			margin: 18px 0;
 		}
 	}
+
+
 	.login_input{
 		border-radius: 100px;
 	}