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