jiangyu 3 ani în urmă
părinte
comite
271cb3436e

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

@@ -99,7 +99,7 @@
 	</div>
 </template>
 <script>
-	const groupname = window.sessionStorage.getItem('groupname')
+	const groupname = window.sessionStorage.getItem('rymc')
 	const token = window.sessionStorage.getItem('token')
 	export default {
 		data() {
@@ -199,7 +199,7 @@
 				this.form['token'] = token
 				this.form['groupname'] = this.groupname
 				this.form['orgs'] = this.orgs
-				this.form['releaser'] = window.sessionStorage.getItem('rybh')
+				this.form['releaser'] = window.sessionStorage.getItem('rymc')
 				this.form['task_class'] = '专项监测'
 				this.form['ispublic'] = 0
 				console.log(this.form)

+ 19 - 18
src/components/admin/routineMonitor.vue

@@ -157,6 +157,7 @@
 <script>
 	const token = window.sessionStorage.getItem('token')
 	const rybh = window.sessionStorage.getItem('rybh')
+	const rymc = window.sessionStorage.getItem('rymc')
 	export default {
 		name: '',
 		data() {
@@ -367,16 +368,16 @@
 			// 删除任务
 			async delArray() {
 				// 判断任务是否为该创建者创建
-				for (let i = 0; i < this.multipleSelection.length; i++) {
-					if (rybh != this.multipleSelection[i].releaser) {
-						this.$alert('任务仅创建者可以删除!', {
-							confirmButtonText: '确定',
-							callback: action => {
+				// for (let i = 0; i < this.multipleSelection.length; i++) {
+				// 	if (rybh != this.multipleSelection[i].releaser) {
+				// 		this.$alert('任务仅创建者可以删除!', {
+				// 			confirmButtonText: '确定',
+				// 			callback: action => {
 
-							}
-						});
-					}
-				}
+				// 			}
+				// 		});
+				// 	}
+				// }
 				var that = this;
 				const length = this.multipleSelection.length;
 				// var val = this.selectedData;
@@ -409,16 +410,16 @@
 			// 发布任务
 			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;

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

@@ -308,16 +308,16 @@
 			// 发布任务
 			async ispublic() {
 				// 判断任务是否为该创建者创建
-				for (let i = 0; i < this.multipleSelection.length; i++) {
-					if (rymc != this.multipleSelection[i].releaser) {
-						this.$alert('任务仅创建者可以发布!', {
-							confirmButtonText: '确定',
-							callback: action => {
+				// for (let i = 0; i < this.multipleSelection.length; i++) {
+				// 	if (rymc != this.multipleSelection[i].releaser) {
+				// 		this.$alert('任务仅创建者可以发布!', {
+				// 			confirmButtonText: '确定',
+				// 			callback: action => {
 
-							}
-						});
-					}
-				}
+				// 			}
+				// 		});
+				// 	}
+				// }
 				var that = this;
 				let canPub = 0;
 				const length = this.multipleSelection.length;

+ 9 - 6
src/components/jc/setTask.vue

@@ -280,9 +280,8 @@
 					task_class: '',
 					year: '',
 					releaserInfo:{
-						groupname: '',
-					},
-						
+						groupname: ''
+					},						
 					endtime: '',
 					file_url: '',
 					filenum: '',
@@ -291,7 +290,6 @@
 				queryInfo: {
 					pageNum: 1,
 					pageSize: 10,
-					task_id: ''
 				},
 				queryInfos: {
 					pageNum: 1,
@@ -404,7 +402,13 @@
 		components: {
 			taskdetail
 		},
-		mounted() {},
+		mounted() {
+			this.task_id = this.$route.params.id
+			console.log(this.$route.params.id)
+			this.getTaskDetail()
+			this.getmodelList()
+			this.getUnderTask()
+		},
 		created() {
 			this.task_id = this.$route.params.id
 			console.log(this.$route.params.id)
@@ -639,7 +643,6 @@
 				}
 				this.readForm = res.data
 				console.log(this.readForm)
-
 				this.bindForm.is_divide = res.data.is_divide
 				this.bindForm.test_model_id = Number(res.data.test_model_id)
 				this.bindForm.endtime_cydsb = res.data.endtime_cydsb

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

@@ -136,11 +136,11 @@
 						<el-form-item label="抽样机构" class="select" size="small">
 							<el-input v-model="queryInfo.task_name"></el-input>
 						</el-form-item>
-						<el-button style="height: 30px;margin-left: 10px;" size="mini" type="success"
+						<el-button style="height: 32px;margin-left: 10px;" size="mini" type="success"
 							@click="searchData()">查询
 						</el-button>
 						<!-- 重置 -->
-						<el-button style="height: 30px;margin-left: 5px;" size="mini" type="success" @click="reset()">
+						<el-button style="height: 32px;margin-left: 5px;" size="mini" type="success" @click="reset()">
 							重置
 						</el-button>
 					</el-form>

+ 51 - 48
src/components/jc/specialMonitorqt.vue

@@ -1,5 +1,4 @@
 <template>
-
 	<div style="width: 100%">
 
 			<div slot="header" class="clearfix">
@@ -13,45 +12,45 @@
 			<!-- 头部搜索栏 -->
 			<el-row :gutter="50" style="margin-right: 0px;">
 				<el-form style="display: flex; flex-direction: row;" size="mini">
-					<el-form-item label="年度" class="select">
+					<el-form-item label="年度" class="select" size="mini">
 						<el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy"
 							type="year" clearable />
 					</el-form-item>
-					<el-form-item label="任务状态" class="select">
+					<el-form-item label="任务状态" class="select" size="mini">
 						<el-select v-model="queryInfo.ispublic" style="width: 110px;">
 							<el-option v-for="item in taskstatus" :key="item.value" :label="item.label"
 								:value="item.value">
 							</el-option>
 						</el-select>
 					</el-form-item>
-					<el-form-item label="任务时间" class="select">
+					<el-form-item label="任务时间" class="select" size="mini">
 						<el-date-picker v-model="queryInfo.starttime" style="width: 180px;" align="right" type="date"
 							:picker-options="pickerOptions" clearable />
 					</el-form-item>
-					<el-form-item label="--" class="select" style="margin-left: 10px; padding-left: 0px;">
+					<el-form-item label="--" class="select" style="margin-left: 10px;" size="mini">
 						<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-form-item label="任务名称" class="select" size="mini">
 						<el-input v-model="queryInfo.task_name"></el-input>
 					</el-form-item>
 					<!-- 查询 -->
-					<el-button style="height: 28px;margin-left: 10px;" type="success"  size="mini"  @click="searchData()">查询</el-button>
+					<el-button style="height: 28px;margin-left: 10px;" type="success"  size="mini" @click="searchData()">查询</el-button>
 					<!-- 重置 -->
 					<el-button style="height: 28px;margin-left: 5px;" type="success"  size="mini" @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-download" @click="exportData">导出Excel</el-button>
 				</div>
 			</el-row>
 			<!--  表格数据区域-->
-					<el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%"
+			<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" align="center"></el-table-column>
-				<el-table-column label="序号" width="50px" align="center">
+				<el-table-column type="selection" width="50"></el-table-column>
+				<el-table-column label="序号" width="50px">
 					<template slot-scope="scope">
 						{{ scope.$index+1 }}
 					</template>
@@ -85,7 +84,6 @@
 					<!-- 操作按钮区域的作用域插槽 -->
 					<template slot-scope="scope">
 						<!-- <el-button type="warning" plain  size="small" @click="bindDialogShow1(scope.row)">绑定模型</el-button> -->
-						<!-- <el-button type="success"  size="mini" @click="runtask(scope.row.id)" v-if="this.queryInfo.ispublic == 5">导出word</el-button> -->
 						<el-button type="success"  size="mini" @click="runtask(scope.row.id)">执行任务</el-button>
 					</template>
 				</el-table-column>
@@ -94,13 +92,13 @@
 				:current-page="queryInfo.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="queryInfo.pageSize"
 				layout="total, sizes, prev, pager, next, jumper" :total="total">
 			</el-pagination>
-		
+
 	</div>
 
 </template>
 
 <script>
-	const qee = require('qf-export-excel')
+		const qee = require('qf-export-excel')
 		const HeadersList = [{
 				title: '任务名称',
 				key: 'task_name'
@@ -247,12 +245,36 @@
 				console.log(`当前页: ${val}`);
 				this.gettaskList()
 			},
-			// 批量选中
+
+				// 批量选中
 			handleSelectionChange(val) {
 				this.multipleSelection = val;
 				console.log(this.multipleSelection)
 			},
 
+			// 搜索
+			async searchData() {
+				console.log(this.queryInfo)
+				this.queryInfo.pageNum = 1
+				this.gettaskList()
+			},
+
+			// 重置
+			reset(){
+				this.queryInfo={
+					year:'',
+					task_name:'',
+					starttime:'',
+					endtime:'',
+					ispublic:'',
+					pageSize:10,
+					pageNum:1,
+					task_class:'专项监测'
+				}
+				this.gettaskList()
+			},
+
+		
 			// 获取任务列表
 			async gettaskList() {
 				console.log(this.queryInfo)
@@ -266,6 +288,7 @@
 				} = await this.$http.post(
 					"getTaskListTest", this.queryInfo
 				);
+				console.log(res)
 				this.tableData = res.data.rows
 				this.total = res.data.total
 			},
@@ -279,37 +302,7 @@
 					this.total = result.data.data.total
 				}
 			},
-
-			runtask(id) {
-				console.log(id)
-				this.$router.push({
-					name: 'setTask',
-					params: {
-						id:id
-					}
-				})
-			},
-            // 搜索
-			async searchData() {
-				this.queryInfo.pageNum = 1
-				console.log(this.queryInfo)
-				this.gettaskList()
-			},
-			// 重置
-			reset(){
-				this.queryInfo={
-					year:'',
-					task_name:'',
-					starttime:'',
-					endtime:'',
-					ispublic:'',
-					pageSize:10,
-					pageNum:1,
-					task_class:'专项监测'
-				}
-				this.gettaskList()
-			},
-				// 导出Excel
+			// 导出Excel
 			async exportData() {
 			
 				// for (var key in this.exportInfo) {
@@ -360,13 +353,23 @@
 					// console.log(columns)
 					const list = exportList
 					const data = this.formatJson(filterVal, list)
-					export_json_to_excel(tHeader, data, '例行监测任务')
+					export_json_to_excel(tHeader, data, '专项监测任务')
 				
 				})
 			},
 			formatJson(filterVal, jsonData) {
 				return jsonData.map(v => filterVal.map(j => v[j]))
 			},
+			// 执行任务
+			runtask(id) {
+				// console.log(id)
+				this.$router.push({
+					name: 'setTask',
+					params: {
+						id:id
+					}
+				})
+			}
 
 		},
 	}
@@ -417,7 +420,7 @@
 	}
 
 	.el-form-item {
-		margin-bottom: 8px;
+		margin-bottom: 30px;
 		padding-left: 18px;
 	}