| 1 | <template> | 1 | <template> | 
| 2 | <el-container> | 2 | <el-container> | 
| 3 | <el-main> | 3 | <el-main> | 
|  |  | 4 | + | 
|  |  | 5 | +            <el-row> | 
|  |  | 6 | +                <el-tabs type="border-card" @tab-click="handleClick"> | 
|  |  | 7 | +                    <el-tab-pane label="待办任务"> | 
| 4 | <!--检索条件--> | 8 | <!--检索条件--> | 
| 5 | <el-row class="toolbar" style="background-color: white;margin-bottom: 10px"> | 9 | <el-row class="toolbar" style="background-color: white;margin-bottom: 10px"> | 
| 6 | <el-col :span="6"> | 10 | <el-col :span="6"> | 
|  | @@ -20,14 +24,13 @@ |  | @@ -20,14 +24,13 @@ | 
| 20 |  | 24 |  | 
| 21 | </el-col> | 25 | </el-col> | 
| 22 | </el-row> | 26 | </el-row> | 
| 23 | -            <el-row> |  |  | 
| 24 | <template> | 27 | <template> | 
| 25 | <el-table | 28 | <el-table | 
| 26 | v-loading="tableloading" | 29 | v-loading="tableloading" | 
| 27 | :data="tableData" | 30 | :data="tableData" | 
| 28 | style="width: 100%" | 31 | style="width: 100%" | 
| 29 | :default-sort = "{prop: 'date', order: 'descending'}" | 32 | :default-sort = "{prop: 'date', order: 'descending'}" | 
| 30 | -                            :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | 33 | +                                    :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="mini" | 
| 31 | > | 34 | > | 
| 32 | <el-table-column | 35 | <el-table-column | 
| 33 | prop="name" | 36 | prop="name" | 
|  | @@ -53,19 +56,180 @@ |  | @@ -53,19 +56,180 @@ | 
| 53 | label="开始时间" | 56 | label="开始时间" | 
| 54 | width="160"> | 57 | width="160"> | 
| 55 | </el-table-column> | 58 | </el-table-column> | 
| 56 | -<!--                        <el-table-column--> |  |  | 
| 57 | -<!--                                fixed="right"--> |  |  | 
| 58 | -<!--                                label="操作"--> |  |  | 
| 59 | -<!--                                width="280">--> |  |  | 
| 60 | -<!--                            <template slot-scope="scope">--> |  |  | 
| 61 | -<!--                                <el-button type="success" size="mini" @click="sendForm()">实例管理</el-button>--> |  |  | 
| 62 | -<!--                                <el-button type="warning" size="mini" @click="remove(scope.$index,scope.row)">删除</el-button>--> |  |  | 
| 63 | -<!--                                <el-button type="danger" size="mini" @click="removeDel(scope.$index,scope.row)">彻底删除</el-button>--> |  |  | 
| 64 | -<!--                            </template>--> |  |  | 
| 65 | -<!--                        </el-table-column>--> | 59 | +                                <!--                        <el-table-column--> | 
|  |  | 60 | +                                <!--                                fixed="right"--> | 
|  |  | 61 | +                                <!--                                label="操作"--> | 
|  |  | 62 | +                                <!--                                width="280">--> | 
|  |  | 63 | +                                <!--                            <template slot-scope="scope">--> | 
|  |  | 64 | +                                <!--                                <el-button type="success" size="mini" @click="sendForm()">实例管理</el-button>--> | 
|  |  | 65 | +                                <!--                                <el-button type="warning" size="mini" @click="remove(scope.$index,scope.row)">删除</el-button>--> | 
|  |  | 66 | +                                <!--                                <el-button type="danger" size="mini" @click="removeDel(scope.$index,scope.row)">彻底删除</el-button>--> | 
|  |  | 67 | +                                <!--                            </template>--> | 
|  |  | 68 | +                                <!--                        </el-table-column>--> | 
| 66 | </el-table> | 69 | </el-table> | 
| 67 | </template> | 70 | </template> | 
|  |  | 71 | +                        <!--分页模块--> | 
|  |  | 72 | +                        <el-row style="float: right;margin-top: 20px"> | 
|  |  | 73 | +                            <el-col> | 
|  |  | 74 | +                                <div class="block"> | 
|  |  | 75 | +                                    <el-pagination | 
|  |  | 76 | +                                            @size-change="handleSizeChange" | 
|  |  | 77 | +                                            @current-change="handleCurrentChange" | 
|  |  | 78 | +                                            :current-page="queryinfo.pageNum" | 
|  |  | 79 | +                                            :page-sizes="[10, 20, 30, 40]" | 
|  |  | 80 | +                                            :page-size="queryinfo.pageSize" | 
|  |  | 81 | +                                            layout="total, sizes, prev, pager, next, jumper" | 
|  |  | 82 | +                                            :total="total"> | 
|  |  | 83 | +                                    </el-pagination> | 
|  |  | 84 | +                                </div> | 
|  |  | 85 | +                            </el-col> | 
|  |  | 86 | +                        </el-row> | 
|  |  | 87 | +                    </el-tab-pane> | 
|  |  | 88 | +                    <el-tab-pane label="已办任务"> | 
|  |  | 89 | +                        <!--检索条件--> | 
|  |  | 90 | +                        <el-row class="toolbar" style="background-color: white;margin-bottom: 10px"> | 
|  |  | 91 | +                            <el-col :span="6"> | 
|  |  | 92 | +                                <el-input v-model="queryinfo.name" placeholder="任务名称" style="width: 200px" clearable> | 
|  |  | 93 | +                                    <template slot="prepend">任务名称</template> | 
|  |  | 94 | +                                </el-input> | 
|  |  | 95 | +                            </el-col> | 
|  |  | 96 | +                            <el-col :span="6"> | 
|  |  | 97 | +                                <el-input v-model="queryinfo.taskDefinitionKey " placeholder="关键字" style="width: 200px" clearable> | 
|  |  | 98 | +                                    <template slot="prepend">关键字</template> | 
|  |  | 99 | +                                </el-input> | 
|  |  | 100 | +                            </el-col> | 
|  |  | 101 | + | 
|  |  | 102 | +                            <el-col :span="8"> | 
|  |  | 103 | +                                <el-button type="primary" v-on:click="getAllList">查询</el-button> | 
|  |  | 104 | +                                <!--                    <el-button type="success" v-on:click="toAddDialog">新增</el-button>--> | 
|  |  | 105 | + | 
|  |  | 106 | +                            </el-col> | 
|  |  | 107 | +                        </el-row> | 
|  |  | 108 | +                        <template> | 
|  |  | 109 | +                            <el-table | 
|  |  | 110 | +                                    v-loading="tableloading" | 
|  |  | 111 | +                                    :data="tableData" | 
|  |  | 112 | +                                    style="width: 100%" | 
|  |  | 113 | +                                    :default-sort = "{prop: 'date', order: 'descending'}" | 
|  |  | 114 | +                                    :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="mini" | 
|  |  | 115 | +                            > | 
|  |  | 116 | +                                <el-table-column | 
|  |  | 117 | +                                        prop="name" | 
|  |  | 118 | +                                        label="任务名称" | 
|  |  | 119 | +                                        width="160"> | 
|  |  | 120 | +                                </el-table-column> | 
|  |  | 121 | +                                <el-table-column | 
|  |  | 122 | +                                        prop="taskDefinitionKey " | 
|  |  | 123 | +                                        label="关键字"> | 
|  |  | 124 | +                                </el-table-column> | 
|  |  | 125 | +                                <el-table-column | 
|  |  | 126 | +                                        prop="owner" | 
|  |  | 127 | +                                        label="所有者"> | 
|  |  | 128 | +                                </el-table-column> | 
|  |  | 129 | +                                <el-table-column | 
|  |  | 130 | +                                        prop="assignee " | 
|  |  | 131 | +                                        label="执行者" | 
|  |  | 132 | +                                        width="160" | 
|  |  | 133 | +                                        show-overflow-tooltip> | 
|  |  | 134 | +                                </el-table-column> | 
|  |  | 135 | +                                <el-table-column | 
|  |  | 136 | +                                        prop="createTime" | 
|  |  | 137 | +                                        label="开始时间" | 
|  |  | 138 | +                                        width="160"> | 
|  |  | 139 | +                                </el-table-column> | 
|  |  | 140 | +                                <!--                        <el-table-column--> | 
|  |  | 141 | +                                <!--                                fixed="right"--> | 
|  |  | 142 | +                                <!--                                label="操作"--> | 
|  |  | 143 | +                                <!--                                width="280">--> | 
|  |  | 144 | +                                <!--                            <template slot-scope="scope">--> | 
|  |  | 145 | +                                <!--                                <el-button type="success" size="mini" @click="sendForm()">实例管理</el-button>--> | 
|  |  | 146 | +                                <!--                                <el-button type="warning" size="mini" @click="remove(scope.$index,scope.row)">删除</el-button>--> | 
|  |  | 147 | +                                <!--                                <el-button type="danger" size="mini" @click="removeDel(scope.$index,scope.row)">彻底删除</el-button>--> | 
|  |  | 148 | +                                <!--                            </template>--> | 
|  |  | 149 | +                                <!--                        </el-table-column>--> | 
|  |  | 150 | +                            </el-table> | 
|  |  | 151 | +                        </template> | 
|  |  | 152 | +                        <!--分页模块--> | 
|  |  | 153 | +                        <el-row style="float: right;margin-top: 20px"> | 
|  |  | 154 | +                            <el-col> | 
|  |  | 155 | +                                <div class="block"> | 
|  |  | 156 | +                                    <el-pagination | 
|  |  | 157 | +                                            @size-change="handleSizeChange" | 
|  |  | 158 | +                                            @current-change="handleCurrentChange" | 
|  |  | 159 | +                                            :current-page="queryinfo.pageNum" | 
|  |  | 160 | +                                            :page-sizes="[10, 20, 30, 40]" | 
|  |  | 161 | +                                            :page-size="queryinfo.pageSize" | 
|  |  | 162 | +                                            layout="total, sizes, prev, pager, next, jumper" | 
|  |  | 163 | +                                            :total="total"> | 
|  |  | 164 | +                                    </el-pagination> | 
|  |  | 165 | +                                </div> | 
|  |  | 166 | +                            </el-col> | 
| 68 | </el-row> | 167 | </el-row> | 
|  |  | 168 | +                    </el-tab-pane> | 
|  |  | 169 | +                    <el-tab-pane label="我发起的"> | 
|  |  | 170 | +                        <!--检索条件--> | 
|  |  | 171 | +                        <el-row class="toolbar" style="background-color: white;margin-bottom: 10px"> | 
|  |  | 172 | +                            <el-col :span="6"> | 
|  |  | 173 | +                                <el-input v-model="queryinfo.name" placeholder="任务名称" style="width: 200px" clearable> | 
|  |  | 174 | +                                    <template slot="prepend">任务名称</template> | 
|  |  | 175 | +                                </el-input> | 
|  |  | 176 | +                            </el-col> | 
|  |  | 177 | +                            <el-col :span="6"> | 
|  |  | 178 | +                                <el-input v-model="queryinfo.taskDefinitionKey " placeholder="关键字" style="width: 200px" clearable> | 
|  |  | 179 | +                                    <template slot="prepend">关键字</template> | 
|  |  | 180 | +                                </el-input> | 
|  |  | 181 | +                            </el-col> | 
|  |  | 182 | + | 
|  |  | 183 | +                            <el-col :span="8"> | 
|  |  | 184 | +                                <el-button type="primary"  v-on:click="getMyList">查询</el-button> | 
|  |  | 185 | +                                <!--                    <el-button type="success" v-on:click="toAddDialog">新增</el-button>--> | 
|  |  | 186 | + | 
|  |  | 187 | +                            </el-col> | 
|  |  | 188 | +                        </el-row> | 
|  |  | 189 | +                        <template> | 
|  |  | 190 | +                            <el-table | 
|  |  | 191 | +                                    v-loading="tableloading" | 
|  |  | 192 | +                                    :data="tableData" | 
|  |  | 193 | +                                    style="width: 100%" | 
|  |  | 194 | +                                    :default-sort = "{prop: 'date', order: 'descending'}" | 
|  |  | 195 | +                                    :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="mini" | 
|  |  | 196 | +                            > | 
|  |  | 197 | +                                <el-table-column | 
|  |  | 198 | +                                        prop="name" | 
|  |  | 199 | +                                        label="任务名称" | 
|  |  | 200 | +                                        width="160"> | 
|  |  | 201 | +                                </el-table-column> | 
|  |  | 202 | +                                <el-table-column | 
|  |  | 203 | +                                        prop="taskDefinitionKey " | 
|  |  | 204 | +                                        label="关键字"> | 
|  |  | 205 | +                                </el-table-column> | 
|  |  | 206 | +                                <el-table-column | 
|  |  | 207 | +                                        prop="owner" | 
|  |  | 208 | +                                        label="所有者"> | 
|  |  | 209 | +                                </el-table-column> | 
|  |  | 210 | +                                <el-table-column | 
|  |  | 211 | +                                        prop="assignee " | 
|  |  | 212 | +                                        label="执行者" | 
|  |  | 213 | +                                        width="160" | 
|  |  | 214 | +                                        show-overflow-tooltip> | 
|  |  | 215 | +                                </el-table-column> | 
|  |  | 216 | +                                <el-table-column | 
|  |  | 217 | +                                        prop="createTime" | 
|  |  | 218 | +                                        label="开始时间" | 
|  |  | 219 | +                                        width="160"> | 
|  |  | 220 | +                                </el-table-column> | 
|  |  | 221 | +                                <!--                        <el-table-column--> | 
|  |  | 222 | +                                <!--                                fixed="right"--> | 
|  |  | 223 | +                                <!--                                label="操作"--> | 
|  |  | 224 | +                                <!--                                width="280">--> | 
|  |  | 225 | +                                <!--                            <template slot-scope="scope">--> | 
|  |  | 226 | +                                <!--                                <el-button type="success" size="mini" @click="sendForm()">实例管理</el-button>--> | 
|  |  | 227 | +                                <!--                                <el-button type="warning" size="mini" @click="remove(scope.$index,scope.row)">删除</el-button>--> | 
|  |  | 228 | +                                <!--                                <el-button type="danger" size="mini" @click="removeDel(scope.$index,scope.row)">彻底删除</el-button>--> | 
|  |  | 229 | +                                <!--                            </template>--> | 
|  |  | 230 | +                                <!--                        </el-table-column>--> | 
|  |  | 231 | +                            </el-table> | 
|  |  | 232 | +                        </template> | 
| 69 | <!--分页模块--> | 233 | <!--分页模块--> | 
| 70 | <el-row style="float: right;margin-top: 20px"> | 234 | <el-row style="float: right;margin-top: 20px"> | 
| 71 | <el-col> | 235 | <el-col> | 
|  | @@ -82,12 +246,16 @@ |  | @@ -82,12 +246,16 @@ | 
| 82 | </div> | 246 | </div> | 
| 83 | </el-col> | 247 | </el-col> | 
| 84 | </el-row> | 248 | </el-row> | 
|  |  | 249 | +                    </el-tab-pane> | 
|  |  | 250 | +                </el-tabs> | 
|  |  | 251 | +            </el-row> | 
|  |  | 252 | + | 
| 85 | </el-main> | 253 | </el-main> | 
| 86 | </el-container> | 254 | </el-container> | 
| 87 | </template> | 255 | </template> | 
| 88 |  | 256 |  | 
| 89 | <script> | 257 | <script> | 
| 90 | -    import {allTask} from "../../api/technological"; | 258 | +    import {allTask,allTaskHistory} from "../../api/technological"; | 
| 91 |  | 259 |  | 
| 92 | export default { | 260 | export default { | 
| 93 | name: "task", | 261 | name: "task", | 
|  | @@ -140,6 +308,38 @@ |  | @@ -140,6 +308,38 @@ | 
| 140 |  | 308 |  | 
| 141 | }) | 309 | }) | 
| 142 | }, | 310 | }, | 
|  |  | 311 | +            handleClick(tab, event){ | 
|  |  | 312 | +                if (tab.index == 0) { | 
|  |  | 313 | +                    this.getList(); | 
|  |  | 314 | +                } else if (tab.index == 1) { | 
|  |  | 315 | +                    this.getAllList(); | 
|  |  | 316 | +                } else { | 
|  |  | 317 | +                    this.getMyList(); | 
|  |  | 318 | +                } | 
|  |  | 319 | +            }, | 
|  |  | 320 | +            //查询 | 
|  |  | 321 | +            getAllList() { | 
|  |  | 322 | +                const _this = this | 
|  |  | 323 | +                this.tableloading = true; | 
|  |  | 324 | +                allTaskHistory(this.queryinfo).then((response) => { | 
|  |  | 325 | +                    const res = response.data | 
|  |  | 326 | +                    if (res.code != '200') { | 
|  |  | 327 | +                        return _this.$message.error('获取消息收发记录,失败!') | 
|  |  | 328 | +                    } | 
|  |  | 329 | +                    // 获取列表数据 | 
|  |  | 330 | +                    _this.tableData = res.data | 
|  |  | 331 | +                    // 获取列表的总记录数 | 
|  |  | 332 | +                    _this.total = res.total | 
|  |  | 333 | +                    this.tableloading = false; | 
|  |  | 334 | +                    _this.$message.success('获取消息收发记录,成功!') | 
|  |  | 335 | +                }).catch(error => { | 
|  |  | 336 | + | 
|  |  | 337 | +                    // 关闭加载 | 
|  |  | 338 | +                    _this.$message.error(error.toString()) | 
|  |  | 339 | +                    this.tableloading = false; | 
|  |  | 340 | + | 
|  |  | 341 | +                }) | 
|  |  | 342 | +            }, | 
| 143 | } | 343 | } | 
| 144 |  | 344 |  | 
| 145 | } | 345 | } |