|
@@ -1,73 +1,84 @@
|
|
|
+
|
|
|
<template>
|
|
|
<div style="width: 100%">
|
|
|
-
|
|
|
- <div slot="header" class="clearfix">
|
|
|
- <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
-
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <el-breadcrumb separator-class="el-icon-arrow-right">
|
|
|
<el-breadcrumb-item >首页</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>监测任务</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>专项监测</el-breadcrumb-item>
|
|
|
<el-breadcrumb-item>任务列表</el-breadcrumb-item>
|
|
|
</el-breadcrumb>
|
|
|
</div>
|
|
|
- <!-- 头部搜查询栏 -->
|
|
|
+
|
|
|
+ <!-- 头部查询栏 -->
|
|
|
<div class="headSearch">
|
|
|
<el-row :gutter="120" style="margin-right: 0px;">
|
|
|
- <!-- <el-form style="display: flex; flex-direction: row;"> -->
|
|
|
<el-form :inline="true">
|
|
|
- <el-form-item label="年度" class="select" size="mini">
|
|
|
- <el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy" type="year"
|
|
|
- clearable />
|
|
|
+ <el-form-item label="年度" class="select" size="small">
|
|
|
+ <el-date-picker v-model="queryInfo.year" style="width: 110px;" value-format="yyyy" type="year" clearable />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="任务状态" class="select" size="mini">
|
|
|
+
|
|
|
+ <el-form-item label="任务状态" class="select" size="small">
|
|
|
<el-select v-model="queryInfo.ispublic" style="width: 110px;" clearable>
|
|
|
- <el-option v-for="item in taskispublic" :key="item.value" :label="item.label"
|
|
|
+ <el-option
|
|
|
+ v-for="item in taskispublic"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
:value="item.value" >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="任务时间" class="select" size="mini">
|
|
|
+
|
|
|
+ <el-form-item label="任务时间" class="select" size="small">
|
|
|
<el-date-picker v-model="queryInfo.starttime" style="width: 180px;" align="right" type="date"
|
|
|
:picker-options="pickerOptions" clearable value-format="yyyy-MM-dd" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="--" class="select" style="margin-left: 10px;" size="mini">
|
|
|
+
|
|
|
+ <el-form-item label="--" class="select" style="margin-left: 8px;" size="small">
|
|
|
<el-date-picker v-model="queryInfo.endtime" style="width: 180px;" align="right" type="date"
|
|
|
:picker-options="pickerOptions" clearable />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="任务名称" class="select" size="mini">
|
|
|
+
|
|
|
+ <el-form-item label="任务名称" class="select" size="small">
|
|
|
<el-input v-model="queryInfo.task_name"></el-input>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
<!-- 查询 -->
|
|
|
<el-button size="mini" style="height: 40px;margin-left: 10px;" type="success" @click="searchData()">查询</el-button>
|
|
|
<!-- 重置 -->
|
|
|
<el-button size="mini" style="height: 40px;margin-left: 5px;" type="success" @click="reset()">重置</el-button>
|
|
|
- </el-form>
|
|
|
- </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
- <!-- 头部右边按钮区域-->
|
|
|
+
|
|
|
+ <!--头部右侧按钮区域-->
|
|
|
<div class="rightButton">
|
|
|
<el-row :gutter="90" style="margin-right: 0px;">
|
|
|
- <div style="display: flex;flex-direction: row;float: right;">
|
|
|
- <el-button type="primary" size="small" plain icon="el-icon-plus" @click="add()">新增</el-button>
|
|
|
- <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="ispublic()">发布
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" size="small" plain icon="el-icon-scissors" @click="repeal()">废止</el-button>
|
|
|
- <el-button type="primary" size="small" plain icon="el-icon-delete" @click="delArray()">删除</el-button>
|
|
|
- <!-- <el-button type="primary" size="small" plain icon="el-icon-download">导出</el-button> -->
|
|
|
- </div>
|
|
|
+ <div style="display: flex;flex-direction: row;float: right;">
|
|
|
+ <el-button type="primary" size="small" plain icon="el-icon-plus" @click="add()">新增</el-button>
|
|
|
+ <el-button type="primary" size="small" plain icon="el-icon-edit-outline" @click="ispublic()">发布
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="small" plain icon="el-icon-scissors" @click="repeal()">废止</el-button>
|
|
|
+ <el-button type="primary" size="small" plain icon="el-icon-delete" @click="delArray()">删除</el-button>
|
|
|
+ <!-- <el-button type="primary" size="small" plain icon="el-icon-download">导出</el-button> -->
|
|
|
+ </div>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
- <!-- 表格数据区域-->
|
|
|
- <el-table ref="multipleTable" :data="tableData" border stripe highlight-current-row style="width: 100%"
|
|
|
- :row-style="rowStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange">
|
|
|
- <el-table-column type="selection" width="50"></el-table-column>
|
|
|
- <el-table-column label="序号" width="50px">
|
|
|
- <template slot-scope="scope">
|
|
|
- {{ scope.$index+1 }}
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <!-- 表格数据区域-->
|
|
|
+ <el-table ref="multipleTable"
|
|
|
+ :data="tableData"
|
|
|
+ border stripe highlight-current-row
|
|
|
+ style="width: 100%"
|
|
|
+ :row-style="rowStyle"
|
|
|
+ :cell-style="cellStyle"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="50"></el-table-column>
|
|
|
+ <el-table-column label="序号" width="50px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.$index+1 }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column :key="table.label" v-for="table in tableHeader" :label="table.label" :prop="table.prop" align="center"
|
|
|
:width="table.width" :fixed="table.fixed" />
|
|
|
<el-table-column prop="status" label="任务状态" width="130" align="center" >
|
|
@@ -80,7 +91,7 @@
|
|
|
<el-tag type="success" effect="plain" v-if="scope.row.ispublic==5">执行中</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="level" label="任务优先级" width="85">
|
|
|
+ <el-table-column prop="level" label="任务优先级" width="95" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-tag type="success" v-if="scope.row.level==0">一般</el-tag>
|
|
|
<el-tag type="warning" v-if="scope.row.level==1">紧急</el-tag>
|
|
@@ -91,12 +102,14 @@
|
|
|
<!-- 操作按钮区域的作用域插槽 -->
|
|
|
<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 @click="leadReport()">牵头单位报告</el-button>
|
|
|
+ <el-button type="success" size="mini" @click="readDialogVisible1(scope.row)" style="margin-top:5px">详情</el-button>
|
|
|
+ <el-button type="success" size="mini" @click="sendBack(scope.row)" style="margin-top:5px">退回</el-button>
|
|
|
</el-col>
|
|
|
<el-col style="margin-bottom: 5px;">
|
|
|
- <el-button type="success" size="mini" plain @click="undertakeReportZx()">承担单位报告</el-button>
|
|
|
- <el-button type="success" size="mini" plain @click="taskSampleZx()">抽样单</el-button>
|
|
|
+ <!-- <el-button type="success" size="mini" plain @click="takeTheLeadReportList(scope.row.id)" style="margin-top:5px">牵头单位报告</el-button> -->
|
|
|
+ <el-button type="success" size="mini" plain @click="getJcds(scope.row.id)" style="margin-top:5px">检测单</el-button>
|
|
|
+ <!-- <el-button type="success" size="mini" plain @click="undertakeReport(scope.row.id)">承担单位报告</el-button> -->
|
|
|
+ <el-button type="success" size="mini" plain @click="sampleList(scope.row.id)">抽样单</el-button>
|
|
|
</el-col>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -132,17 +145,17 @@
|
|
|
<el-form-item label="任务时间:" prop="starttime" width="200px" class="labelItem">
|
|
|
<div>{{readForm.starttime}} 至 {{readForm.endtime}}</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="发布单位:" prop="releaser" class="labelItem">
|
|
|
- <div>{{readForm.releaser}}</div>
|
|
|
+ <el-form-item label="发布单位:" prop="creater" class="labelItem">
|
|
|
+ <div>{{readForm.creater.name}}</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="牵头单位:" prop="main_unit" class="labelItem">
|
|
|
+ <!-- <el-form-item label="牵头单位:" prop="main_unit" class="labelItem">
|
|
|
<div>{{readForm.main_unit}}</div>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
<el-form-item label="附件:" prop="file_url" class="labelItem">
|
|
|
<!-- <div>{{readForm.file_url}}</div> -->
|
|
|
<el-link :href="readForm.file_url" type="primary">{{readForm.file_name}}</el-link>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="文件号:" prop="filenum" width="200px" class="labelItem">
|
|
|
+ <el-form-item label="文件号:" prop="filenum" width="230px" class="labelItem">
|
|
|
<div v-if="readForm.filenum==null">无</div>
|
|
|
<div v-else>{{readForm.filenum}}</div>
|
|
|
</el-form-item>
|
|
@@ -157,15 +170,13 @@
|
|
|
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
-
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
-
|
|
|
const token = window.sessionStorage.getItem('token')
|
|
|
+ const rybh = window.sessionStorage.getItem('rybh')
|
|
|
const rymc = window.sessionStorage.getItem('rymc')
|
|
|
export default {
|
|
|
- name: 'specialMonitor',
|
|
|
+ name: '',
|
|
|
data() {
|
|
|
return {
|
|
|
queryInfo:{
|
|
@@ -176,9 +187,60 @@
|
|
|
ispublic:'',
|
|
|
pageSize:10,
|
|
|
pageNum:1,
|
|
|
- task_class:'专项监测'
|
|
|
+ task_class:'专项监测',
|
|
|
+ task_id:'',
|
|
|
+ task_profile_id:''
|
|
|
+ },
|
|
|
+ total:0,
|
|
|
+ cellStyle: {
|
|
|
+ padding: 2 + 'px'
|
|
|
+ },
|
|
|
+ rowStyle: {
|
|
|
+ height: 35 + 'px'
|
|
|
},
|
|
|
- // 任务状态选项
|
|
|
+ tableHeader: [{
|
|
|
+ label: '任务名称',
|
|
|
+ prop: 'task_name',
|
|
|
+ width: 150
|
|
|
+ // fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '开始时间',
|
|
|
+ prop: 'starttime',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '结束时间',
|
|
|
+ prop: 'endtime',
|
|
|
+ width: 120
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '年度',
|
|
|
+ prop: 'year',
|
|
|
+ width: 80
|
|
|
+ // fixed: 'left'
|
|
|
+ }, {
|
|
|
+ label: '文件号',
|
|
|
+ prop: 'filenum',
|
|
|
+ width: 180
|
|
|
+ // fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建者',
|
|
|
+ prop: 'creater.name',
|
|
|
+ width: 140
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '创建时间',
|
|
|
+ prop: 'create_time',
|
|
|
+ width: 180
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 数据表格数据
|
|
|
+ tableData: [],
|
|
|
+ // 批量删除选中数据
|
|
|
+ multipleSelection: [],
|
|
|
+ // 任务状态选项
|
|
|
taskispublic: [{
|
|
|
value: '',
|
|
|
label: '全部'
|
|
@@ -227,97 +289,72 @@
|
|
|
}
|
|
|
}]
|
|
|
},
|
|
|
- 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
|
|
|
- }
|
|
|
- ],
|
|
|
- // 数据表格数据
|
|
|
- tableData: [],
|
|
|
- total:0,
|
|
|
- // 批量选中数据
|
|
|
- multipleSelection: [],
|
|
|
// 查看任务详情
|
|
|
readDialogVisible: false,
|
|
|
readForm: {},
|
|
|
+ multipleSelection: [],
|
|
|
delarr: [],
|
|
|
- pubarr: [],
|
|
|
+ pubarr: []
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.gettaskList()
|
|
|
+ this.getTasks()
|
|
|
},
|
|
|
methods: {
|
|
|
- //跳转抽样单
|
|
|
- taskSampleZx(id){
|
|
|
- console.log(id)
|
|
|
+ //新增
|
|
|
+ add() {
|
|
|
+ this.$router.push('addTask')
|
|
|
+ },
|
|
|
+ //查看抽样机构
|
|
|
+ sampleList(id){
|
|
|
this.$router.push({
|
|
|
- name:'taskSampleZx',
|
|
|
+ name:'setTaskJg',
|
|
|
params: {
|
|
|
- task_id: id,
|
|
|
+ task_id:id,
|
|
|
}
|
|
|
})
|
|
|
- },
|
|
|
- //跳转承担单位
|
|
|
- undertakeReportZx(id){
|
|
|
+ },
|
|
|
+ //查看检测机构
|
|
|
+ getJcds(id,profile_id) {
|
|
|
console.log(id)
|
|
|
this.$router.push({
|
|
|
- name:'undertakeReportZx',
|
|
|
+ name:'getJcds',
|
|
|
params: {
|
|
|
task_id: id,
|
|
|
+ task_profile_id:profile_id
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // takeTheLeadReportList(id) {
|
|
|
+ // console.log(id)
|
|
|
+ // this.$router.push({
|
|
|
+ // name:'takeTheLeadReportList',
|
|
|
+ // params: {
|
|
|
+ // task_id: id,
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ //承担单位报告
|
|
|
+ // undertakeReport(id){
|
|
|
+ // console.log(id)
|
|
|
+ // this.$router.push({
|
|
|
+ // name:'undertakeReport',
|
|
|
+ // params: {
|
|
|
+ // task_id: id,
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+
|
|
|
+ // },
|
|
|
+
|
|
|
// 搜索
|
|
|
async searchData() {
|
|
|
this.queryInfo.pageNum = 1
|
|
|
this.gettaskList()
|
|
|
},
|
|
|
- undertakeReportZx(){
|
|
|
- this.$router.push('undertakeReportZx')
|
|
|
- },
|
|
|
- taskSampleZx(){
|
|
|
- this.$router.push('taskSampleZx')
|
|
|
- },
|
|
|
// 重置
|
|
|
reset(){
|
|
|
this.queryInfo={
|
|
@@ -328,19 +365,109 @@
|
|
|
ispublic:'',
|
|
|
pageSize:10,
|
|
|
pageNum:1,
|
|
|
- task_class:'专项监测'
|
|
|
+ task_class:'例行监测',
|
|
|
+ task_id
|
|
|
}
|
|
|
- this.gettaskList()
|
|
|
+ this.getTasks()
|
|
|
+ },
|
|
|
+ //退回
|
|
|
+ sendBack(){
|
|
|
+
|
|
|
+ },
|
|
|
+ /** 监听页码的改变 */
|
|
|
+ handleCurrentChange(newPage) {
|
|
|
+ this.queryInfo.pageNum = newPage
|
|
|
+ this.getTasks()
|
|
|
+ },
|
|
|
+ /** 监听每页显示多少数据的改变 */
|
|
|
+ handleSizeChange(newSize) {
|
|
|
+ this.queryInfo.pageSize = newSize
|
|
|
+ this.getTasks()
|
|
|
},
|
|
|
- // 新增
|
|
|
- add() {
|
|
|
- this.$router.push('addSpecialTask')
|
|
|
+ // 获取任务列表
|
|
|
+ async getTasks() {
|
|
|
+ for (var key in this.queryInfo) {
|
|
|
+ if (this.queryInfo[key] == '') {
|
|
|
+ delete this.queryInfo[key]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const {
|
|
|
+ data: res
|
|
|
+ } = await this.$http.post(
|
|
|
+ "getTasks", this.queryInfo
|
|
|
+ );
|
|
|
+ this.tableData = res.data.rows
|
|
|
+ this.total = res.data.total
|
|
|
+ },
|
|
|
+ // 查看任务详情
|
|
|
+ async readDialogVisible1(row) {
|
|
|
+ this.readForm.batch = row.batch
|
|
|
+ this.readForm.task_name = row.task_name
|
|
|
+ this.readForm.task_class = row.task_class
|
|
|
+ this.readForm.level = row.level
|
|
|
+ // console.log(this.readForm.level)
|
|
|
+ this.readForm.year = row.year
|
|
|
+ this.readForm.starttime = row.starttime
|
|
|
+ this.readForm.endtime = row.endtime
|
|
|
+ this.readForm.releaser = row.releaser
|
|
|
+ this.readForm.creater = row.creater
|
|
|
+ this.readForm.main_unit = row.main_unit
|
|
|
+ this.readForm.file_url = row.file_url
|
|
|
+ this.readForm.file_name = row.file_name
|
|
|
+ this.readForm.filenum = row.filenum
|
|
|
+ this.readForm.log = row.log
|
|
|
+ this.readDialogVisible = true
|
|
|
+
|
|
|
+ },
|
|
|
+ // 批量删除
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val;
|
|
|
+ // console.log(this.multipleSelection)
|
|
|
+ },
|
|
|
+ // 删除任务
|
|
|
+ async delArray() {
|
|
|
+ // 判断任务是否为该创建者创建
|
|
|
+ // for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
+ // if (rybh != this.multipleSelection[i].releaser) {
|
|
|
+ // this.$alert('任务仅创建者可以删除!', {
|
|
|
+ // confirmButtonText: '确定',
|
|
|
+ // callback: action => {
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ var that = this;
|
|
|
+ const length = this.multipleSelection.length;
|
|
|
+ for (let i = 0; i < length; i++) {
|
|
|
+ this.delarr.push(this.multipleSelection[i].id);
|
|
|
+ }
|
|
|
+ const result = await this.$http.post('deleteTasks', {
|
|
|
+ delarr: that.delarr,
|
|
|
+ token: token
|
|
|
+ })
|
|
|
+ console.log(that.delarr);
|
|
|
+ if (result.data.code == 0) {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ that.getTasks()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: '删除失败!'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // console.log(this.$refs.multipleTable);
|
|
|
+ this.$refs.multipleTable.clearSelection();
|
|
|
+ that.delarr = [];
|
|
|
+ // this.$refs.multipleTable.clearSelectionFun();
|
|
|
},
|
|
|
// 发布任务
|
|
|
async ispublic() {
|
|
|
// 判断任务是否为该创建者创建
|
|
|
// for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
- // if (rymc != this.multipleSelection[i].releaser) {
|
|
|
+ // if (rybh != this.multipleSelection[i].releaser) {
|
|
|
// this.$alert('任务仅创建者可以发布!', {
|
|
|
// confirmButtonText: '确定',
|
|
|
// callback: action => {
|
|
@@ -350,7 +477,7 @@
|
|
|
// }
|
|
|
// }
|
|
|
var that = this;
|
|
|
- let canPub = 0;
|
|
|
+ let canPub = 0
|
|
|
const length = this.multipleSelection.length;
|
|
|
// var val = this.selectedData;
|
|
|
console.log(this.multipleSelection)
|
|
@@ -369,16 +496,21 @@
|
|
|
}
|
|
|
}
|
|
|
if(canPub==1){
|
|
|
- const result = await this.$http.post('isPublicTask', {
|
|
|
+ const result = await this.$http.post('putTaskPublic', {
|
|
|
pubarr: that.multipleSelection,
|
|
|
token: token,
|
|
|
})
|
|
|
+ console.log(result.data.code)
|
|
|
if (result.data.code == 0) {
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '发布成功!'
|
|
|
});
|
|
|
- that.gettaskList()
|
|
|
+ that.getTasks()
|
|
|
+ }else{
|
|
|
+ this.$message({
|
|
|
+ type: 'error',
|
|
|
+ message: result.data.message})
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -386,7 +518,7 @@
|
|
|
async repeal() {
|
|
|
// 判断任务是否为该创建者创建
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
- if (rymc != this.multipleSelection[i].releaser) {
|
|
|
+ if (rybh != this.multipleSelection[i].releaser) {
|
|
|
this.$alert('任务仅创建者可以废止!', {
|
|
|
confirmButtonText: '确定',
|
|
|
callback: action => {}
|
|
@@ -399,19 +531,18 @@
|
|
|
// var val = this.selectedData;
|
|
|
this.pubarr = this.multipleSelection;
|
|
|
for (let i = 0; i < length; i++) {
|
|
|
- if (this.pubarr[i].ispublic == '1') {
|
|
|
+ if (this.pubarr[i].ispublic == 1) {
|
|
|
this.pubarr[i].ispublic = 2
|
|
|
canPub = 1
|
|
|
} else {
|
|
|
this.$alert('任务不在可废止状态!', {
|
|
|
confirmButtonText: '确定',
|
|
|
callback: action => {
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
if(canPub==1){
|
|
|
- const result = await this.$http.post('isPublicTask', {
|
|
|
+ const result = await this.$http.post('putTaskPublic', {
|
|
|
pubarr: that.pubarr,
|
|
|
token: token
|
|
|
})
|
|
@@ -420,112 +551,14 @@
|
|
|
type: 'success',
|
|
|
message: '任务已废止!'
|
|
|
});
|
|
|
- that.gettaskList()
|
|
|
+ that.getTasks()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- },
|
|
|
- leadReport() {
|
|
|
- this.$router.push('leadReport')
|
|
|
- },
|
|
|
- // 批量删除
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.multipleSelection = val;
|
|
|
- // console.log(this.multipleSelection)
|
|
|
- },
|
|
|
- // 删除任务
|
|
|
- async delArray() {
|
|
|
- // 判断任务是否为该创建者创建
|
|
|
- for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
- if (rymc != 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();
|
|
|
- },
|
|
|
- /** 监听页码的改变 */
|
|
|
- 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);
|
|
|
- this.tableData = res.data.rows
|
|
|
- this.total = res.data.total
|
|
|
- },
|
|
|
- // 查看任务详情
|
|
|
- async readDialogVisible1(row) {
|
|
|
- this.readForm.batch = row.batch
|
|
|
- this.readForm.task_name = row.task_name
|
|
|
- this.readForm.task_class = row.task_class
|
|
|
- this.readForm.level = row.level
|
|
|
- console.log(this.readForm.level)
|
|
|
- this.readForm.year = row.year
|
|
|
- this.readForm.starttime = row.starttime
|
|
|
- this.readForm.endtime = row.endtime
|
|
|
- this.readForm.releaser = row.releaser
|
|
|
- this.readForm.main_unit = row.main_unit
|
|
|
- this.readForm.file_url = row.file_url
|
|
|
- this.readForm.file_name = row.file_name
|
|
|
- this.readForm.filenum = row.filenum
|
|
|
- this.readForm.log = row.log
|
|
|
- this.readDialogVisible = true
|
|
|
- },
|
|
|
- taskSample() {
|
|
|
- this.$router.push('taskSample')
|
|
|
- },
|
|
|
- // takeTheLeadReporList() {
|
|
|
- // this.$router.push('takeTheLeadReporList')
|
|
|
- // },
|
|
|
- }
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|
|
@@ -533,23 +566,7 @@
|
|
|
.el-breadcrumb {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
-
|
|
|
- .el-select {
|
|
|
- width: 210px;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- .select {
|
|
|
- // display: flex;
|
|
|
- flex-direction: row;
|
|
|
- margin-left: 35px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-form-item {
|
|
|
- margin-bottom: 8px;
|
|
|
- }
|
|
|
-
|
|
|
- .el-table {
|
|
|
+ .el-table {
|
|
|
align-items: center;
|
|
|
margin-top: 25px;
|
|
|
}
|
|
@@ -567,7 +584,23 @@
|
|
|
margin-top: 25px;
|
|
|
}
|
|
|
|
|
|
- .dialogItem /deep/ .el-dialog__body {
|
|
|
+ // .el-cascader {
|
|
|
+ // width: 290px;
|
|
|
+ // }
|
|
|
+
|
|
|
+ .el-select {
|
|
|
+ width: 210px;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .select {
|
|
|
+ // display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ margin-left: 35px;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .dialogItem /deep/ .el-dialog__body {
|
|
|
padding: 15px 12px 0;
|
|
|
color: #606266;
|
|
|
font-size: 14px;
|
|
@@ -603,9 +636,6 @@
|
|
|
border-top: 1px solid #e5e5e5;
|
|
|
text-align: center;
|
|
|
}
|
|
|
- .headSearch{
|
|
|
- margin-left: 15px;
|
|
|
- }
|
|
|
.rightButton{
|
|
|
margin-top: 20px;
|
|
|
}
|