|
@@ -1,120 +1,5 @@
|
|
<template>
|
|
<template>
|
|
<div class="app-container workTask">
|
|
<div class="app-container workTask">
|
|
- <!-- <el-form
|
|
|
|
- :model="queryParams"
|
|
|
|
- ref="queryForm"
|
|
|
|
- :inline="true"
|
|
|
|
- v-show="showSearch"
|
|
|
|
- label-width="120px"
|
|
|
|
- >
|
|
|
|
- <el-form-item label="名称" prop="name">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.name"
|
|
|
|
- placeholder="请输入名称"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="任务编号" prop="number">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.number"
|
|
|
|
- placeholder="请输入任务编号"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="执行单位" prop="executableUnit">
|
|
|
|
- <el-select v-model="queryParams.executableUnit" placeholder="大队">
|
|
|
|
- <el-option label="大队" value="productionBrigade"></el-option>
|
|
|
|
- <el-option label="发射一营" value="launch1"></el-option>
|
|
|
|
- <el-option label="发射二营" value="launch2"></el-option>
|
|
|
|
- <el-option label="发射三营" value="launch3"></el-option>
|
|
|
|
- <el-option label="发射四营" value="launch4"></el-option>
|
|
|
|
- <el-option label="技术部" value="technology"></el-option>
|
|
|
|
- <el-option label="后勤部" value="logistics"></el-option>
|
|
|
|
- <el-option label="后勤营一连" value="logistics1"></el-option>
|
|
|
|
- <el-option label="后勤营二连" value="logistics2"></el-option>
|
|
|
|
- <el-option label="后勤营三连" value="logistics3"></el-option>
|
|
|
|
- <el-option label="参谋部" value="adviser"></el-option>
|
|
|
|
- <el-option label="保障部" value="safeguard"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <br />
|
|
|
|
- <el-form-item label="执行人" prop="peopleId">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.peopleId"
|
|
|
|
- placeholder="请输入执行人"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item label="发布单位" prop="unitId">
|
|
|
|
- <el-select v-model="queryParams.unitId" placeholder="大队">
|
|
|
|
- <el-option label="大队" value="productionBrigade"></el-option>
|
|
|
|
- <el-option label="发射一营" value="launch1"></el-option>
|
|
|
|
- <el-option label="发射二营" value="launch2"></el-option>
|
|
|
|
- <el-option label="发射三营" value="launch3"></el-option>
|
|
|
|
- <el-option label="发射四营" value="launch4"></el-option>
|
|
|
|
- <el-option label="技术部" value="technology"></el-option>
|
|
|
|
- <el-option label="后勤部" value="logistics"></el-option>
|
|
|
|
- <el-option label="后勤营一连" value="logistics1"></el-option>
|
|
|
|
- <el-option label="后勤营二连" value="logistics2"></el-option>
|
|
|
|
- <el-option label="后勤营三连" value="logistics3"></el-option>
|
|
|
|
- <el-option label="参谋部" value="adviser"></el-option>
|
|
|
|
- <el-option label="保障部" value="safeguard"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item label="任务类型" prop="type">
|
|
|
|
- <el-radio-group v-model="queryParams.type">
|
|
|
|
- <el-radio label="年任务" value="year"></el-radio>
|
|
|
|
- <el-radio label="月任务" value="month"></el-radio>
|
|
|
|
- <el-radio label="周任务" value="week"></el-radio>
|
|
|
|
- </el-radio-group>
|
|
|
|
- </el-form-item>
|
|
|
|
- <br />
|
|
|
|
-
|
|
|
|
- <el-form-item label="任务开始时间" prop="startTime">
|
|
|
|
- <el-date-picker
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- v-model="queryParams.startTime"
|
|
|
|
- type="date"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- placeholder="选择任务开始时间"
|
|
|
|
- >
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item label="任务结束时间" prop="endTime">
|
|
|
|
- <el-date-picker
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- v-model="queryParams.endTime"
|
|
|
|
- type="date"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- placeholder="选择任务结束时间"
|
|
|
|
- >
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
-
|
|
|
|
- <el-form-item>
|
|
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="el-icon-search"
|
|
|
|
- size="mini"
|
|
|
|
- @click="handleQuery"
|
|
|
|
- >搜索</el-button
|
|
|
|
- >
|
|
|
|
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
|
- >重置</el-button
|
|
|
|
- >
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form> -->
|
|
|
|
<el-form
|
|
<el-form
|
|
:model="queryParams"
|
|
:model="queryParams"
|
|
ref="queryForm"
|
|
ref="queryForm"
|
|
@@ -238,7 +123,6 @@
|
|
:header-cell-style="{ background: '#003C69', color: 'white' }"
|
|
:header-cell-style="{ background: '#003C69', color: 'white' }"
|
|
>
|
|
>
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
- <el-table-column label="序号" align="center" prop="serialNumber" />
|
|
|
|
<el-table-column label="名称" align="center" prop="name" />
|
|
<el-table-column label="名称" align="center" prop="name" />
|
|
<el-table-column
|
|
<el-table-column
|
|
label="发布单位"
|
|
label="发布单位"
|
|
@@ -246,11 +130,12 @@
|
|
prop="adminId"
|
|
prop="adminId"
|
|
:formatter="unit3Format"
|
|
:formatter="unit3Format"
|
|
/>
|
|
/>
|
|
- <el-table-column label="任务类型" align="center" prop="type" >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <dict-tag :options="dict.type.work_type" :value="scope.row.type" />
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ label="任务类型"
|
|
|
|
+ align="center"
|
|
|
|
+ prop="type"
|
|
|
|
+ :formatter="unit4Format"
|
|
|
|
+ />
|
|
<el-table-column
|
|
<el-table-column
|
|
label="执行人"
|
|
label="执行人"
|
|
align="center"
|
|
align="center"
|
|
@@ -279,24 +164,46 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="描述" align="center" prop="contents" />
|
|
<el-table-column label="描述" align="center" prop="contents" />
|
|
-
|
|
|
|
<el-table-column
|
|
<el-table-column
|
|
label="操作"
|
|
label="操作"
|
|
align="center"
|
|
align="center"
|
|
class-name="small-padding fixed-width"
|
|
class-name="small-padding fixed-width"
|
|
>
|
|
>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
|
+ <el-button size="btlook" type="text" @click="ViewProgress(scope.row)" v-if="scope.row.common == 1">
|
|
|
|
+ <span>进度录入</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="btlook"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="handleChakan(scope.row)"
|
|
|
|
+ v-if="scope.row.common == 1"
|
|
|
|
+ >
|
|
|
|
+ <!-- 单人进度 -->
|
|
|
|
+ <span class="chakan">查看</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ size="btlook"
|
|
|
|
+ type="text"
|
|
|
|
+ @click="handleChakan1(scope.row)"
|
|
|
|
+ v-if="scope.row.common == 2 || scope.row.common == 0"
|
|
|
|
+ >
|
|
|
|
+ <!-- 多人进度 -->
|
|
|
|
+ <span class="chakan">进度查看</span>
|
|
|
|
+ </el-button>
|
|
<el-button
|
|
<el-button
|
|
size="btu"
|
|
size="btu"
|
|
type="text"
|
|
type="text"
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
v-hasPermi="['workingArrangements:planTask:edit']"
|
|
v-hasPermi="['workingArrangements:planTask:edit']"
|
|
|
|
+ v-if="scope.row.common == 2"
|
|
>修改</el-button
|
|
>修改</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
size="btd"
|
|
size="btd"
|
|
type="text"
|
|
type="text"
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
|
|
+ v-if="scope.row.common == 2"
|
|
v-hasPermi="['workingArrangements:planTask:remove']"
|
|
v-hasPermi="['workingArrangements:planTask:remove']"
|
|
>删除</el-button
|
|
>删除</el-button
|
|
>
|
|
>
|
|
@@ -337,34 +244,22 @@
|
|
</el-input>
|
|
</el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="发布单位" prop="unitName2">
|
|
<el-form-item label="发布单位" prop="unitName2">
|
|
- <el-select
|
|
|
|
- v-model="form.unitName2"
|
|
|
|
- placeholder="请选择发布单位"
|
|
|
|
- style="width: 200px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in part"
|
|
|
|
- :key="item.id"
|
|
|
|
- :label="item.label"
|
|
|
|
- :value="item.label"
|
|
|
|
- @click.native="issueunit(item.id)"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <treeselect
|
|
|
|
+ v-model="form.adminId"
|
|
|
|
+ :options="part"
|
|
|
|
+ placeholder="选择单位"
|
|
|
|
+ @select="selectPeo"
|
|
|
|
+ class="threeselects"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="执行单位" prop="unitName">
|
|
<el-form-item label="执行单位" prop="unitName">
|
|
- <el-select
|
|
|
|
- v-model="form.unitName"
|
|
|
|
|
|
+ <treeselect
|
|
|
|
+ v-model="form.unitId"
|
|
|
|
+ :options="users"
|
|
placeholder="请选择执行单位"
|
|
placeholder="请选择执行单位"
|
|
- style="width: 200px"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="item in ExecutableUnit"
|
|
|
|
- :key="item.deptId"
|
|
|
|
- :label="item.deptName"
|
|
|
|
- :value="item.deptId"
|
|
|
|
- @click.native="choosedeptid(item.deptId)"
|
|
|
|
- />
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ class="threeselects"
|
|
|
|
+ @select="selectPeo1"
|
|
|
|
+ />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="任务类型" prop="type">
|
|
<el-form-item label="任务类型" prop="type">
|
|
<el-select
|
|
<el-select
|
|
@@ -373,17 +268,19 @@
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
clearable
|
|
clearable
|
|
size="small"
|
|
size="small"
|
|
|
|
+
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="dict in dict.type.work_type"
|
|
v-for="dict in dict.type.work_type"
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
:label="dict.label"
|
|
:label="dict.label"
|
|
:value="dict.value"
|
|
:value="dict.value"
|
|
|
|
+ @click.native="chooseplan"
|
|
/>
|
|
/>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<div>
|
|
<div>
|
|
- <el-form-item label="执行人" prop="peopleId" label-width="100px">
|
|
|
|
|
|
+ <el-form-item label="执行人" prop="peopleName" label-width="100px">
|
|
<div>
|
|
<div>
|
|
<el-select
|
|
<el-select
|
|
multiple
|
|
multiple
|
|
@@ -393,10 +290,10 @@
|
|
ref="peoplenames"
|
|
ref="peoplenames"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in executor"
|
|
|
|
|
|
+ v-for="item in executor"
|
|
:key="item.deptId"
|
|
:key="item.deptId"
|
|
:label="item.nickName"
|
|
:label="item.nickName"
|
|
- :value="item.deptId"
|
|
|
|
|
|
+ :value="item.userId"
|
|
id="execute"
|
|
id="execute"
|
|
@click.native="returnExecutor(item.deptId, item.nickName)"
|
|
@click.native="returnExecutor(item.deptId, item.nickName)"
|
|
/>
|
|
/>
|
|
@@ -455,6 +352,89 @@
|
|
<el-button @click="cancel">取 消</el-button>
|
|
<el-button @click="cancel">取 消</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <!-- 进度查看弹框 -->
|
|
|
|
+ <el-dialog
|
|
|
|
+ :title="title"
|
|
|
|
+ :visible.sync="open2"
|
|
|
|
+ width="980px"
|
|
|
|
+ append-to-body
|
|
|
|
+ class="el-dialog__header"
|
|
|
|
+ >
|
|
|
|
+ <el-form
|
|
|
|
+ ref="singleTable"
|
|
|
|
+ :model="singleTable"
|
|
|
|
+ :rules="rules"
|
|
|
|
+ label-width="100px"
|
|
|
|
+ :inline="true"
|
|
|
|
+ >
|
|
|
|
+ <div class="jiben">完成进度</div>
|
|
|
|
+ <!-- <el-form-item prop="comPlan"> -->
|
|
|
|
+ <!-- <el-input
|
|
|
|
+ label="计划名称"
|
|
|
|
+ v-model="ProgressLook.comPlan"
|
|
|
|
+ class="big"
|
|
|
|
+ /> -->
|
|
|
|
+ <!-- </el-form-item> -->
|
|
|
|
+ <el-progress
|
|
|
|
+ :text-inside="true"
|
|
|
|
+ :stroke-width="24"
|
|
|
|
+ :percentage="singleTable.planProgresses"
|
|
|
|
+ style="margin-bottom: 20px"
|
|
|
|
+ color="rgba(41, 231, 205, 1)"
|
|
|
|
+ ></el-progress>
|
|
|
|
+ <div class="jiben">任务周期</div>
|
|
|
|
+ <el-form-item prop="comWeek">
|
|
|
|
+ <!-- <el-input
|
|
|
|
+ v-model="singleTable."
|
|
|
|
+ class="big"
|
|
|
|
+ /> -->
|
|
|
|
+ <div class="thistext">
|
|
|
|
+ {{ singleTable.startTime }} 至 {{ singleTable.endTime }}
|
|
|
|
+ </div>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- <div class="thistext"></div> -->
|
|
|
|
+ <div class="jiben">附件文档</div>
|
|
|
|
+ <el-form-item prop="file">
|
|
|
|
+ <el-input
|
|
|
|
+ label="附件名称"
|
|
|
|
+ v-model="singleTable.fileName"
|
|
|
|
+ style="width: 820px"
|
|
|
|
+ />
|
|
|
|
+ <!-- <div>{{singleTableb.fileName}}</div> -->
|
|
|
|
+ <a
|
|
|
|
+ :href="singleTable.file"
|
|
|
|
+ download
|
|
|
|
+ title="下载"
|
|
|
|
+ style="color: white; margin-left: 10px"
|
|
|
|
+ class="downloadfile"
|
|
|
|
+ >下载附件</a
|
|
|
|
+ >
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- <a :href="singleTable.planProgress.file" style="color:white">下载附件</a> -->
|
|
|
|
+ <div class="jiben">备注</div>
|
|
|
|
+ <!-- <el-form-item prop="remark">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="ProgressLook.remark"
|
|
|
|
+ type="textarea"
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <div class="thistext">{{ singleTable.remark }}</div>
|
|
|
|
+ <div class="jiben">任务描述</div>
|
|
|
|
+ <!-- <el-form-item prop="contents">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="ProgressLook.contents"
|
|
|
|
+ type="textarea"
|
|
|
|
+ placeholder="请输入内容"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item> -->
|
|
|
|
+ <div class="thistext">{{ singleTable.contents }}</div>
|
|
|
|
+ </el-form>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="submitForm2">确 定</el-button>
|
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -467,16 +447,16 @@ import {
|
|
updateWorkTask,
|
|
updateWorkTask,
|
|
exportWorkTask,
|
|
exportWorkTask,
|
|
} from "@/api/workingArrangements/workTask";
|
|
} from "@/api/workingArrangements/workTask";
|
|
-
|
|
|
|
-import {
|
|
|
|
- getDeptList,
|
|
|
|
- deptUser,
|
|
|
|
- allUser,
|
|
|
|
- getDept,
|
|
|
|
-} from "@/api/workingArrangements/workTask";
|
|
|
|
|
|
+import {singProgress,moreProgress} from "@/api/workingArrangements/planTask";
|
|
|
|
+import { deptUser, allUser, getDept ,getDeptList} from "@/api/workingArrangements/workTask";
|
|
|
|
+import { getDicts } from "@/api/system/dict/data";
|
|
|
|
+import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
+import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
|
|
export default {
|
|
export default {
|
|
name: "WorkTask",
|
|
name: "WorkTask",
|
|
dicts: ["work_type"],
|
|
dicts: ["work_type"],
|
|
|
|
+ components: { Treeselect },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
// 遮罩层
|
|
// 遮罩层
|
|
@@ -499,6 +479,12 @@ export default {
|
|
title: "",
|
|
title: "",
|
|
// 是否显示弹出层
|
|
// 是否显示弹出层
|
|
open: false,
|
|
open: false,
|
|
|
|
+ // 显示进度录入框
|
|
|
|
+ open1: false,
|
|
|
|
+ // 显示进度查看框
|
|
|
|
+ open2: false,
|
|
|
|
+ // 显示多人进度查看框
|
|
|
|
+ open3: false,
|
|
// 查询参数
|
|
// 查询参数
|
|
queryParams: {
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -532,26 +518,72 @@ export default {
|
|
// 发布单位
|
|
// 发布单位
|
|
part: [],
|
|
part: [],
|
|
// 执行单位
|
|
// 执行单位
|
|
- ExecutableUnit: [],
|
|
|
|
|
|
+ users: [],
|
|
// 执行人
|
|
// 执行人
|
|
executor: [],
|
|
executor: [],
|
|
rylist: [],
|
|
rylist: [],
|
|
|
|
+ // 查询字典
|
|
|
|
+ dictType: {
|
|
|
|
+ dictType: "work_type",
|
|
|
|
+ },
|
|
|
|
+ ziDian:[],
|
|
|
|
+ // 部门列表
|
|
|
|
+ getdeptList:[],
|
|
|
|
+ // 单人进度查看框
|
|
|
|
+ singleTable:[],
|
|
|
|
+ // 多人进度查看框
|
|
|
|
+ moreTable:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList();
|
|
this.getList();
|
|
this.getdept();
|
|
this.getdept();
|
|
- this.getdeptlist();
|
|
|
|
allUser().then((res) => {
|
|
allUser().then((res) => {
|
|
this.rylist = res.rows;
|
|
this.rylist = res.rows;
|
|
});
|
|
});
|
|
|
|
+ this.getdict();
|
|
|
|
+ this.chooseplan();
|
|
|
|
+ getDeptList().then((res)=>{
|
|
|
|
+ this.getdeptList=res.data
|
|
|
|
+ })
|
|
|
|
+
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 进度查看单人进度
|
|
|
|
+ handleChakan(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ this.open2 = true;
|
|
|
|
+ this.title = "进度查看";
|
|
|
|
+ // 获取当前行的id
|
|
|
|
+ singProgress(row.id).then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ // this.singleTable = res.data;
|
|
|
|
+ // this.singleTable.planProgresses =this.singleTable.planProgress.schedule;
|
|
|
|
+ // console.log(this.singleTable);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 多人进度查看
|
|
|
|
+ handleChakan1(row) {
|
|
|
|
+ this.reset();
|
|
|
|
+ this.open3 = true;
|
|
|
|
+ this.title = "进度查看";
|
|
|
|
+ // 获取当前行的id
|
|
|
|
+ moreProgress(row.id).then((res) => {
|
|
|
|
+ this.moreTable = res.data;
|
|
|
|
+ console.log(this.moreTable);
|
|
|
|
+ this.moreTable.planProgresses.forEach((item) => {
|
|
|
|
+ this.comstatus +=
|
|
|
|
+ item.schedule / this.moreTable.planProgresses.length;
|
|
|
|
+ // this.comstatus=0
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
/** 查询工作任务列表 */
|
|
/** 查询工作任务列表 */
|
|
getList() {
|
|
getList() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
listWorkTask(this.queryParams).then((response) => {
|
|
listWorkTask(this.queryParams).then((response) => {
|
|
this.workTaskList = response.rows;
|
|
this.workTaskList = response.rows;
|
|
|
|
+ console.log(this.workTaskList)
|
|
this.total = response.total;
|
|
this.total = response.total;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
@@ -559,7 +591,11 @@ export default {
|
|
// 取消按钮
|
|
// 取消按钮
|
|
cancel() {
|
|
cancel() {
|
|
this.open = false;
|
|
this.open = false;
|
|
|
|
+ this.comstatus = 0;
|
|
this.reset();
|
|
this.reset();
|
|
|
|
+ this.open1 = false;
|
|
|
|
+ this.open2 = false;
|
|
|
|
+ this.open3 = false;
|
|
},
|
|
},
|
|
// 表单重置
|
|
// 表单重置
|
|
reset() {
|
|
reset() {
|
|
@@ -604,66 +640,179 @@ export default {
|
|
this.single = selection.length !== 1;
|
|
this.single = selection.length !== 1;
|
|
this.multiple = !selection.length;
|
|
this.multiple = !selection.length;
|
|
},
|
|
},
|
|
|
|
+ // 获取执行人
|
|
|
|
+ getZhuChi(id) {
|
|
|
|
+ deptUser(id).then((res) => {
|
|
|
|
+ // this.renYuan = res.data;
|
|
|
|
+ this.executor = res.data;
|
|
|
|
+ console.log(this.executor)
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 发布单位选中触发
|
|
|
|
+ selectPeo(val) {
|
|
|
|
+ this.form.adminId = val.id;
|
|
|
|
+ this.getZhuChi(this.form.adminId);
|
|
|
|
+ },
|
|
|
|
+ // 执行单位选中触发
|
|
|
|
+ selectPeo1(val) {
|
|
|
|
+ this.form.unitId = val.id;
|
|
|
|
+ this.form.peopleName=""
|
|
|
|
+ this.getZhuChi(this.form.unitId);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 查询计划类型
|
|
|
|
+ getdict() {
|
|
|
|
+ getDicts(this.dictType.dictType).then((res) => {
|
|
|
|
+ this.ziDian = res.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
/** 新增按钮操作 */
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
handleAdd() {
|
|
this.reset();
|
|
this.reset();
|
|
this.open = true;
|
|
this.open = true;
|
|
this.title = "添加工作任务";
|
|
this.title = "添加工作任务";
|
|
|
|
+ // 获取执行单位列表
|
|
|
|
+ getDept2().then((res) => {
|
|
|
|
+ // console.log(res,2)
|
|
|
|
+ this.users = res.data;
|
|
|
|
+ console.log(this.users);
|
|
|
|
+ });
|
|
},
|
|
},
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
this.reset();
|
|
this.reset();
|
|
|
|
+ getDept2().then((res) => {
|
|
|
|
+ // console.log(res,2)
|
|
|
|
+ this.users = res.data;
|
|
|
|
+ console.log(this.users);
|
|
|
|
+ });
|
|
const id = row.id || this.ids;
|
|
const id = row.id || this.ids;
|
|
getWorkTask(id).then((response) => {
|
|
getWorkTask(id).then((response) => {
|
|
- this.choosedeptid(this.form.unitId);
|
|
|
|
- this.form.peopleName = this.form.peopleName.split(",").map(Number);
|
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
|
+ // this.getDept2()
|
|
|
|
+ this.getZhuChi(this.form.unitId);
|
|
|
|
+ this.form.peopleName = this.form.peopleName.split(",").map(Number);
|
|
this.open = true;
|
|
this.open = true;
|
|
- this.title = "修改工作任务";
|
|
|
|
|
|
+ this.title = "修改工作计划";
|
|
});
|
|
});
|
|
},
|
|
},
|
|
unit2Format(row, column) {
|
|
unit2Format(row, column) {
|
|
var deptName = "";
|
|
var deptName = "";
|
|
- this.rylist.map((item) => {
|
|
|
|
|
|
+ if(parseInt(this.workTaskList[0].common)==1 || this.workTaskList[0].common==2){
|
|
|
|
+ this.rylist.map((item) => {
|
|
row.peopleName.split(",").forEach((items, index) => {
|
|
row.peopleName.split(",").forEach((items, index) => {
|
|
- if (item.deptId == items) {
|
|
|
|
|
|
+ if (item.userId == items) {
|
|
|
|
+ deptName += item.nickName + " ";
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }else if(parseInt(this.workTaskList[0].common)==0){
|
|
|
|
+ this.rylist.map((item) => {
|
|
|
|
+ row.peopleName.split(",").forEach((items, index) => {
|
|
|
|
+ if (item.userId == items) {
|
|
deptName += item.nickName + " ";
|
|
deptName += item.nickName + " ";
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
+ }
|
|
return deptName;
|
|
return deptName;
|
|
|
|
+
|
|
|
|
+ // var deptName = "";
|
|
|
|
+ // console.log(this.rylist)
|
|
|
|
+ // console.log(row)
|
|
|
|
+ // this.rylist.map((item) => {
|
|
|
|
+ // row.peopleName.split(",").forEach((items, index) => {
|
|
|
|
+ // if (item.deptId == items) {
|
|
|
|
+ // deptName += item.nickName + " ";
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // });
|
|
|
|
+ // return deptName;
|
|
},
|
|
},
|
|
unit3Format(row, column) {
|
|
unit3Format(row, column) {
|
|
var deptName = "";
|
|
var deptName = "";
|
|
- this.part.map((item) => {
|
|
|
|
- if (item.id == row.adminId) {
|
|
|
|
|
|
+ if(parseInt(this.workTaskList[0].common)==1){
|
|
|
|
+ console.log(111)
|
|
|
|
+ this.getdeptList.map((item) => {
|
|
|
|
+ console.log(item.deptId)
|
|
|
|
+ console.log(row)
|
|
|
|
+ if (item.deptId == row.adminId) {
|
|
|
|
+ deptName = item.deptName;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }else if(parseInt(this.workTaskList[0].common)==0){
|
|
|
|
+ this.part[0].children.map((item) => {
|
|
|
|
+ if (item.id == row.adminId) {
|
|
deptName = item.label;
|
|
deptName = item.label;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
+ }
|
|
return deptName;
|
|
return deptName;
|
|
},
|
|
},
|
|
|
|
+ unit4Format(row,column) {
|
|
|
|
+ var deptName = "";
|
|
|
|
+ this.ziDian.map((item) => {
|
|
|
|
+ if (item.dictSort == row.type) {
|
|
|
|
+ deptName = item.dictLabel;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ return deptName;
|
|
|
|
+ },
|
|
|
|
+ // 选择计划
|
|
|
|
+ chooseplan() {
|
|
|
|
+ this.form.type = this.queryParams.type;
|
|
|
|
+ },
|
|
/** 提交按钮 */
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
submitForm() {
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
|
- if (valid) {
|
|
|
|
- this.form.peopleName = this.form.peopleName.join(",");
|
|
|
|
- this.form.peopleId = this.form.peopleName;
|
|
|
|
- console.log(this.form);
|
|
|
|
- if (this.form.id != null) {
|
|
|
|
- updateWorkTask(this.form).then((response) => {
|
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
|
|
+ console.log(this.form)
|
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.form.adminId === this.form.unitId) {
|
|
|
|
+ alert("发布单位和执行单位不能相同");
|
|
} else {
|
|
} else {
|
|
- addWorkTask(this.form).then((response) => {
|
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
|
- this.open = false;
|
|
|
|
- this.getList();
|
|
|
|
- });
|
|
|
|
|
|
+ this.form.peopleName = this.form.peopleName.join(",");
|
|
|
|
+ this.form.peopleId = this.form.peopleName;
|
|
|
|
+ console.log(this.form)
|
|
|
|
+ if (this.form.id != null) {
|
|
|
|
+ updateWorkTask(this.form).then((response) => {
|
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
|
+ this.queryParams.type=""
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ addWorkTask(this.form).then((response) => {
|
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
|
+ this.open = false;
|
|
|
|
+ this.getList();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ })
|
|
|
|
+ // this.$refs["form"].validate((valid) => {
|
|
|
|
+ // if (valid) {
|
|
|
|
+ // this.form.peopleName = this.form.peopleName.join(",");
|
|
|
|
+ // this.form.peopleId = this.form.peopleName;
|
|
|
|
+ // console.log(this.form);
|
|
|
|
+ // if (this.form.id != null) {
|
|
|
|
+ // updateWorkTask(this.form).then((response) => {
|
|
|
|
+ // this.$modal.msgSuccess("修改成功");
|
|
|
|
+ // this.open = false;
|
|
|
|
+ // this.getList();
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // addWorkTask(this.form).then((response) => {
|
|
|
|
+ // this.$modal.msgSuccess("新增成功");
|
|
|
|
+ // this.open = false;
|
|
|
|
+ // this.getList();
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ },
|
|
|
|
+ submitForm2(){
|
|
|
|
+
|
|
},
|
|
},
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
@@ -694,25 +843,28 @@ export default {
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
},
|
|
},
|
|
- // 发布单位
|
|
|
|
|
|
+ // 发布单位接口
|
|
getdept() {
|
|
getdept() {
|
|
getDept().then((res) => {
|
|
getDept().then((res) => {
|
|
- this.part = res.data[0].children;
|
|
|
|
|
|
+ this.part = res.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 获取执行单位列表
|
|
// 获取执行单位列表
|
|
getdeptlist() {
|
|
getdeptlist() {
|
|
getDeptList().then((res) => {
|
|
getDeptList().then((res) => {
|
|
this.ExecutableUnit = res.data;
|
|
this.ExecutableUnit = res.data;
|
|
|
|
+ console.log(this.ExecutableUnit)
|
|
});
|
|
});
|
|
},
|
|
},
|
|
// 选中执行人id
|
|
// 选中执行人id
|
|
- choosedeptid(id) {
|
|
|
|
- this.form.unitId = id;
|
|
|
|
- deptUser(id).then((res) => {
|
|
|
|
- this.executor = res.data;
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
|
|
+ // choosedeptid(id) {
|
|
|
|
+ // console.log(id)
|
|
|
|
+ // this.form.unitId = id;
|
|
|
|
+ // deptUser(id).then((res) => {
|
|
|
|
+ // this.executor = res.data;
|
|
|
|
+ // });
|
|
|
|
+ // },
|
|
|
|
+
|
|
// 计划编号
|
|
// 计划编号
|
|
planName() {
|
|
planName() {
|
|
let date = new Date();
|
|
let date = new Date();
|
|
@@ -829,16 +981,145 @@ export default {
|
|
.el-upload-list__item:hover {
|
|
.el-upload-list__item:hover {
|
|
background-color: #00365f;
|
|
background-color: #00365f;
|
|
}
|
|
}
|
|
-/* 修改计划类型样式 */
|
|
|
|
-.el-input--small .el-input__inner {
|
|
|
|
|
|
+/* 修改编号样式 */
|
|
|
|
+.ipt .el-input__inner {
|
|
|
|
+ background-color: #004d86 !important;
|
|
|
|
+}
|
|
|
|
+/* 进度查看 */
|
|
|
|
+.el-button--btlook.is-active,
|
|
|
|
+.el-button--btlook:active {
|
|
|
|
+ background: #32a5d3;
|
|
|
|
+ border-color: #32a5d3;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+}
|
|
|
|
+.el-button--btlook:focus,
|
|
|
|
+.el-button--btlook:hover {
|
|
|
|
+ background: #32a5d3;
|
|
|
|
+ border-color: #32a5d3;
|
|
|
|
+ color: #ffffff;
|
|
|
|
+}
|
|
|
|
+.el-button--btlook {
|
|
|
|
+ width: 70px !important;
|
|
|
|
+ border: 1px solid transparent;
|
|
|
|
+ padding: 3px 8px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ line-height: 1.5;
|
|
|
|
+ border-radius: 3px;
|
|
|
|
+ color: #fff;
|
|
|
|
+ background-color: #32a5d3;
|
|
|
|
+}
|
|
|
|
+.big .el-input__inner {
|
|
|
|
+ width: 940px;
|
|
|
|
+}
|
|
|
|
+/* 树形 */
|
|
|
|
+.threeselects {
|
|
|
|
+ width: 200px;
|
|
|
|
+}
|
|
|
|
+.threeselects .vue-treeselect__input {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+ /* color: white; */
|
|
|
|
+}
|
|
|
|
+.el-form-item__content {
|
|
|
|
+ /* color: white; */
|
|
|
|
+ border-bottom: 1px solid #004d86;
|
|
|
|
+}
|
|
|
|
+.vue-treeselect__control {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+ border-bottom: 1px solid white;
|
|
|
|
+ /* color: whi; */
|
|
|
|
+ /* color: white; */
|
|
|
|
+}
|
|
|
|
+.vue-treeselect__placeholder {
|
|
|
|
+ color: white;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.change_plan_type .el-input__inner {
|
|
|
|
+ width: 200px;
|
|
|
|
+}
|
|
|
|
+/* 表格样式 */
|
|
|
|
+.el-table__empty-block {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+.el-table {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+.comtimer .el-input__inner {
|
|
|
|
+ width: 940px;
|
|
|
|
+}
|
|
|
|
+/* 备注 */
|
|
|
|
+.thistext {
|
|
|
|
+ color: white;
|
|
|
|
+ width: 940px;
|
|
|
|
+ border: 1px solid #fff;
|
|
|
|
+ border-radius: 4px;
|
|
height: 36px;
|
|
height: 36px;
|
|
line-height: 36px;
|
|
line-height: 36px;
|
|
|
|
+ text-indent: 1em;
|
|
|
|
+ margin-bottom: 20px;
|
|
}
|
|
}
|
|
-.el-input--medium .el-input__inner {
|
|
|
|
- background-color: rgba(0, 0, 0, 0);
|
|
|
|
|
|
+/* 完成进度 */
|
|
|
|
+.complue .el-input__inner {
|
|
|
|
+ width: 940px;
|
|
}
|
|
}
|
|
-/* 修改编号样式 */
|
|
|
|
-.ipt .el-input__inner {
|
|
|
|
- background-color: #004d86 !important;
|
|
|
|
|
|
+.complue {
|
|
|
|
+ width: 940px;
|
|
|
|
+}
|
|
|
|
+/* 进度 */
|
|
|
|
+.jinduProgress {
|
|
|
|
+ width: 740px;
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 210px;
|
|
|
|
+ top: 5px;
|
|
|
|
+}
|
|
|
|
+/* 表格 */
|
|
|
|
+.tabless .el-table__row {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+.tabless table {
|
|
|
|
+ border: 1px solid white;
|
|
|
|
+}
|
|
|
|
+.has-gutter {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+.el-table tr:nth-child(odd) {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+.el-table tr:nth-child(even) {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+/* 下载按钮 */
|
|
|
|
+.downloadfile {
|
|
|
|
+ border: 1px solid white;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ width: 100px;
|
|
|
|
+ height: 33px;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ line-height: 33px;
|
|
|
|
+ text-align: center;
|
|
|
|
+}
|
|
|
|
+.el-table__row {
|
|
|
|
+ border-bottom: 1px solid white;
|
|
|
|
+}
|
|
|
|
+.el-input-number__increase {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+.el-input-number__decrease {
|
|
|
|
+ background-color: #004d86;
|
|
|
|
+}
|
|
|
|
+/* 进度条百分比 */
|
|
|
|
+.el-progress-bar__innerText {
|
|
|
|
+ color: #004d86;
|
|
|
|
+ /* font-weight: 200; */
|
|
|
|
+}
|
|
|
|
+.el-progress-bar__outer {
|
|
|
|
+ background-color: rgba(25, 98, 153, 1);
|
|
|
|
+}
|
|
|
|
+/* 上下箭头 */
|
|
|
|
+.el-icon-arrow-up,
|
|
|
|
+.el-icon-arrow-down {
|
|
|
|
+ color: white;
|
|
|
|
+}
|
|
|
|
+.vue-treeselect__single-value {
|
|
|
|
+ color: white;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|