|
@@ -7,7 +7,7 @@
|
|
|
v-show="showSearch"
|
|
|
label-width="120px"
|
|
|
>
|
|
|
- <el-form-item prop="type" class="plantypes" label-width="80px">
|
|
|
+ <el-form-item prop="type" class="plantypes" label-width="80px">
|
|
|
<el-select v-model="queryParams.types" placeholder="请选择计划类型">
|
|
|
<el-option
|
|
|
v-for="(item, i) in ziDian"
|
|
@@ -19,14 +19,14 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item prop="adminId" class="plantypes" label-width="80px">
|
|
|
- <treeselect
|
|
|
- v-model="queryParams.adminId"
|
|
|
- :options="users"
|
|
|
- placeholder="请选择发布单位"
|
|
|
- class="threeselects"
|
|
|
- @select="selectPeo3"
|
|
|
- />
|
|
|
+ <el-form-item prop="adminId" class="plantypes" label-width="80px">
|
|
|
+ <treeselect
|
|
|
+ v-model="queryParams.adminId"
|
|
|
+ :options="users"
|
|
|
+ placeholder="请选择发布单位"
|
|
|
+ class="threeselects"
|
|
|
+ @select="selectPeo3"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
@@ -109,6 +109,11 @@
|
|
|
prop="unitName"
|
|
|
:formatter="unit3Format"
|
|
|
/>
|
|
|
+ <el-table-column
|
|
|
+ label="发布人"
|
|
|
+ align="center"
|
|
|
+ prop="username"
|
|
|
+ />
|
|
|
<el-table-column
|
|
|
label="计划类型"
|
|
|
align="center"
|
|
@@ -227,7 +232,7 @@
|
|
|
<div class="jiben">基本信息</div>
|
|
|
<el-form-item label="计划名称" prop="name">
|
|
|
<el-input
|
|
|
- placeholder="请输入计划名册"
|
|
|
+ placeholder="请输入计划名册"
|
|
|
label="计划名称"
|
|
|
v-model="form.name"
|
|
|
@click.native="planName"
|
|
@@ -235,7 +240,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="任务编号" prop="number">
|
|
|
<el-input
|
|
|
- placeholder="请选择任务编号"
|
|
|
+ placeholder="请选择任务编号"
|
|
|
label="任务编号"
|
|
|
v-model="form.number"
|
|
|
:disabled="true"
|
|
@@ -243,30 +248,14 @@
|
|
|
>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="计划类型" prop="type" class="change_plan_type">
|
|
|
- <el-select
|
|
|
- v-model="form.type"
|
|
|
- placeholder="请选择计划类型"
|
|
|
- ref="dict"
|
|
|
- clearable
|
|
|
- size="small"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="(item, i) in ziDian"
|
|
|
- :key="i"
|
|
|
- :label="item.dictLabel"
|
|
|
- :value="parseInt(item.dictSort)"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="发布单位" prop="adminId" >
|
|
|
+ <el-form-item label="发布单位" prop="adminId">
|
|
|
<treeselect
|
|
|
- placeholder="请选择发布单位"
|
|
|
+ placeholder="请选择发布单位"
|
|
|
v-model="form.adminId"
|
|
|
:options="part"
|
|
|
@select="selectPeo"
|
|
|
class="threeselects"
|
|
|
+ disabled
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="执行单位" prop="unitId">
|
|
@@ -278,6 +267,32 @@
|
|
|
@select="selectPeo1"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="计划类型" prop="type" class="change_plan_type">
|
|
|
+ <el-select
|
|
|
+ v-model="form.type"
|
|
|
+ placeholder="请选择计划类型"
|
|
|
+ ref="dict"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, i) in ziDian"
|
|
|
+ :key="i"
|
|
|
+ :label="item.dictLabel"
|
|
|
+ :value="parseInt(item.dictSort)"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="发布人" prop="username">
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入发布人"
|
|
|
+ v-model="form.username"
|
|
|
+ :disabled="true"
|
|
|
+ class="ipt"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<div>
|
|
|
<el-form-item label="执行人" prop="peopleName" label-width="100px">
|
|
|
<div>
|
|
@@ -305,9 +320,9 @@
|
|
|
clearable
|
|
|
size="small"
|
|
|
v-model="form.startTime"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="请选择开始时间"
|
|
|
+ type="datetime"
|
|
|
+ value-format="yyyy-MM-dd HH-mm-ss"
|
|
|
+ placeholder="请选择开始时间"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -316,10 +331,11 @@
|
|
|
clearable
|
|
|
size="small"
|
|
|
v-model="form.endTime"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
+ type="datetime"
|
|
|
+ value-format="yyyy-MM-dd HH-mm-ss"
|
|
|
placeholder="请选择结束时间"
|
|
|
style="width: 200px"
|
|
|
+ default-time="00:00:00"
|
|
|
>
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
@@ -670,6 +686,7 @@ import {
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
|
|
|
+import Cookies from "js-cookie";
|
|
|
|
|
|
export default {
|
|
|
name: "PlanTask",
|
|
@@ -735,12 +752,28 @@ export default {
|
|
|
peopleName: [
|
|
|
{ required: true, message: "执行人不能为空", trigger: "blur" },
|
|
|
],
|
|
|
- name:[{ required: true, message: "不能为空", trigger: "blur" }],
|
|
|
- adminId:{required:true,message:"发布单位不能为空",trigger:"blur"},
|
|
|
- unitId:{required:true,message:"执行单位不能为空",trigger:"blur"},
|
|
|
- type :{required:true,message:"计划类型不能为空",trigger:"blur"},
|
|
|
- startTime :{required:true,message:"开始时间不能为空",trigger:"blur"},
|
|
|
- endTime :{required:true,message:"结束时间不能为空",trigger:"blur"},
|
|
|
+ name: [{ required: true, message: "不能为空", trigger: "blur" }],
|
|
|
+ adminId: {
|
|
|
+ required: true,
|
|
|
+ message: "发布单位不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ unitId: {
|
|
|
+ required: true,
|
|
|
+ message: "执行单位不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ type: { required: true, message: "计划类型不能为空", trigger: "blur" },
|
|
|
+ startTime: {
|
|
|
+ required: true,
|
|
|
+ message: "开始时间不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ endTime: {
|
|
|
+ required: true,
|
|
|
+ message: "结束时间不能为空",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
},
|
|
|
rules1: {
|
|
|
// planProgress: [
|
|
@@ -799,19 +832,18 @@ export default {
|
|
|
allUser().then((res) => {
|
|
|
this.rylist = res.rows;
|
|
|
});
|
|
|
- getDept2().then((res) => {
|
|
|
- console.log(res)
|
|
|
- this.users = res.data;
|
|
|
- // console.log(this.users)
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
+ getDept2().then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.users = res.data;
|
|
|
+ // console.log(this.users)
|
|
|
+ });
|
|
|
+
|
|
|
getDeptList().then((res) => {
|
|
|
this.getdeptList = res.data;
|
|
|
});
|
|
|
this.getdict();
|
|
|
this.chooseplan();
|
|
|
- this.selectPeo3()
|
|
|
+ this.selectPeo3();
|
|
|
},
|
|
|
methods: {
|
|
|
comPlan() {
|
|
@@ -831,15 +863,15 @@ export default {
|
|
|
this.executor = res.data;
|
|
|
});
|
|
|
},
|
|
|
- // 到访单位选中触发
|
|
|
+ // 到访单位选中触发
|
|
|
selectPeo2(val) {
|
|
|
// 获取执行单位列表
|
|
|
getDept2().then((res) => {
|
|
|
this.users = res.data;
|
|
|
});
|
|
|
this.queryParams.unitId = val.id;
|
|
|
- this.queryParams.name=""
|
|
|
- this.queryParams.unitName=val.label
|
|
|
+ this.queryParams.name = "";
|
|
|
+ this.queryParams.unitName = val.label;
|
|
|
this.getZhuChi(this.queryParams.unitId);
|
|
|
},
|
|
|
// 发布单位选中触发
|
|
@@ -851,12 +883,11 @@ export default {
|
|
|
selectPeo3(val) {
|
|
|
getDept2().then((res) => {
|
|
|
this.users = res.data;
|
|
|
- console.log(this.users)
|
|
|
-
|
|
|
+ console.log(this.users);
|
|
|
});
|
|
|
this.queryParams.adminId = val.id;
|
|
|
this.getZhuChi(this.queryParams.adminId);
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 执行单位选中触发
|
|
|
selectPeo1(val) {
|
|
@@ -914,7 +945,7 @@ export default {
|
|
|
taskProgress: null,
|
|
|
releaseUnit: null,
|
|
|
executableUnit: null,
|
|
|
- comstatus:null
|
|
|
+ comstatus: null,
|
|
|
};
|
|
|
this.Progress = {
|
|
|
schedule: "",
|
|
@@ -926,16 +957,16 @@ export default {
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- console.log(this.queryParams)
|
|
|
+ console.log(this.queryParams);
|
|
|
this.queryParams.pageNum = 1;
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
|
resetQuery() {
|
|
|
- this.queryParams={}
|
|
|
+ this.queryParams = {};
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
- this.getList()
|
|
|
+ this.getList();
|
|
|
},
|
|
|
// 多选框选中数据
|
|
|
handleSelectionChange(selection) {
|
|
@@ -949,6 +980,33 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加工作计划";
|
|
|
+ this.form.adminId = Cookies.get("deptId");
|
|
|
+ this.form.username = Cookies.get("nickName");
|
|
|
+ this.form.userId = Cookies.get("userId");
|
|
|
+ var today = new Date();
|
|
|
+ var y = today.getFullYear();
|
|
|
+ var M = today.getMonth() + 1;
|
|
|
+ var d = today.getDate();
|
|
|
+ var h = today.getHours();
|
|
|
+ var m = today.getMinutes();
|
|
|
+ var s = today.getSeconds();
|
|
|
+ var w = today.getDay();
|
|
|
+ if (M < 10) {
|
|
|
+ M = "0" + M;
|
|
|
+ }
|
|
|
+ if (d < 10) {
|
|
|
+ d = "0" + d;
|
|
|
+ }
|
|
|
+ if (h < 10) {
|
|
|
+ h = "0" + h;
|
|
|
+ }
|
|
|
+ if (m < 10) {
|
|
|
+ m = "0" + m;
|
|
|
+ }
|
|
|
+ if (s < 10) {
|
|
|
+ s = "0" + s;
|
|
|
+ }
|
|
|
+ this.form.startTime = y + "-" + M + "-" + d + " " + h + ":" + m + ":" + s;
|
|
|
// 获取执行单位列表
|
|
|
getDept2().then((res) => {
|
|
|
// console.log(res,2)
|
|
@@ -978,7 +1036,7 @@ export default {
|
|
|
this.title = "进度查看";
|
|
|
// 获取当前行的id
|
|
|
singProgress(row.id).then((res) => {
|
|
|
- console.log(res)
|
|
|
+ console.log(res);
|
|
|
this.singleTable = res.data;
|
|
|
this.singleTable.planProgresses =
|
|
|
this.singleTable.planProgress.schedule;
|
|
@@ -994,13 +1052,14 @@ export default {
|
|
|
this.title = "进度查看";
|
|
|
// 获取当前行的id
|
|
|
// console.log(row.id)
|
|
|
-
|
|
|
+
|
|
|
moreProgress(row.id).then((res) => {
|
|
|
- console.log(res)
|
|
|
- this.comstatus=0
|
|
|
+ console.log(res);
|
|
|
+ this.comstatus = 0;
|
|
|
this.moreTable = res.data;
|
|
|
this.moreTable.planProgresses.forEach((item) => {
|
|
|
- this.comstatus +=item.schedule / this.moreTable.planProgresses.length;
|
|
|
+ this.comstatus +=
|
|
|
+ item.schedule / this.moreTable.planProgresses.length;
|
|
|
});
|
|
|
});
|
|
|
},
|
|
@@ -1015,7 +1074,7 @@ export default {
|
|
|
const id = row.id || this.ids;
|
|
|
getPlanTask(id).then((response) => {
|
|
|
this.form = response.data;
|
|
|
- this.form.type=parseInt(this.form.type)
|
|
|
+ this.form.type = parseInt(this.form.type);
|
|
|
this.getZhuChi(this.form.unitId);
|
|
|
// this.form.type=this.form.type+""
|
|
|
this.form.peopleName = this.form.peopleName.split(",").map(Number);
|
|
@@ -1055,15 +1114,14 @@ export default {
|
|
|
) {
|
|
|
this.getdeptList.map((item) => {
|
|
|
if (item.deptId == row.adminId) {
|
|
|
- console.log(item.deptName)
|
|
|
+ console.log(item.deptName);
|
|
|
deptName = item.deptName;
|
|
|
}
|
|
|
});
|
|
|
} else if (parseInt(this.planTaskList[0].common) == 0) {
|
|
|
this.getdeptList.map((item) => {
|
|
|
- console.log(item)
|
|
|
+ console.log(item);
|
|
|
if (item.deptId == row.adminId) {
|
|
|
-
|
|
|
deptName = item.deptName;
|
|
|
}
|
|
|
});
|
|
@@ -1087,17 +1145,17 @@ export default {
|
|
|
});
|
|
|
return deptName;
|
|
|
},
|
|
|
- zidainType(item){
|
|
|
- this.queryParams.type=item.dictValue
|
|
|
+ zidainType(item) {
|
|
|
+ this.queryParams.type = item.dictValue;
|
|
|
this.getList();
|
|
|
// console.log(item)
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
- console.log(this.form.file)
|
|
|
- if(this.form.file){
|
|
|
- this.form.fileName=this.form.file[0].name
|
|
|
- this.form.file=this.form.file[0].url
|
|
|
+ console.log(this.form.file);
|
|
|
+ if (this.form.file) {
|
|
|
+ this.form.fileName = this.form.file[0].name;
|
|
|
+ this.form.file = this.form.file[0].url;
|
|
|
}
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -1126,15 +1184,15 @@ export default {
|
|
|
},
|
|
|
submitForm1() {
|
|
|
if (this.Progress.file) {
|
|
|
- this.Progress.fileName = this.Progress.file[0].name;
|
|
|
- this.Progress.file = this.Progress.file[0].url;
|
|
|
- }
|
|
|
+ this.Progress.fileName = this.Progress.file[0].name;
|
|
|
+ this.Progress.file = this.Progress.file[0].url;
|
|
|
+ }
|
|
|
// this.Progress.fileName=this.Progress.file[0].name
|
|
|
// this.Progress.file=this.Progress.file[0].url
|
|
|
this.$refs["Progress"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.Progress.schedule = this.Progress.planProgress;
|
|
|
- console.log(this.Progress)
|
|
|
+ console.log(this.Progress);
|
|
|
uploadProgress(this.Progress).then((res1) => {
|
|
|
console.log(res1);
|
|
|
this.$modal.msgSuccess("上传成功");
|
|
@@ -1155,7 +1213,7 @@ export default {
|
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
|
this.$modal
|
|
|
- .confirm('是否确认删除?')
|
|
|
+ .confirm("是否确认删除?")
|
|
|
.then(function () {
|
|
|
return delPlanTask(ids);
|
|
|
})
|
|
@@ -1210,8 +1268,8 @@ export default {
|
|
|
},
|
|
|
// 选择计划
|
|
|
chooseplan(item) {
|
|
|
- console.log(item)
|
|
|
- this.form.type=item.dictValue
|
|
|
+ console.log(item);
|
|
|
+ this.form.type = item.dictValue;
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -1409,7 +1467,7 @@ export default {
|
|
|
top: 5px;
|
|
|
}
|
|
|
/* 表格 */
|
|
|
- .tabless .el-table__row {
|
|
|
+.tabless .el-table__row {
|
|
|
background-color: #004d86;
|
|
|
}
|
|
|
.tabless table {
|
|
@@ -1466,31 +1524,31 @@ export default {
|
|
|
white-space: nowrap;
|
|
|
}
|
|
|
/* table表格 */
|
|
|
-::v-deep .el-table th.el-table__cell{
|
|
|
+::v-deep .el-table th.el-table__cell {
|
|
|
background-color: pink !important;
|
|
|
}
|
|
|
-.el-table__empty-block{
|
|
|
+.el-table__empty-block {
|
|
|
border-bottom: 1px solid white;
|
|
|
}
|
|
|
-.vue-treeselect__control{
|
|
|
+.vue-treeselect__control {
|
|
|
background-color: transparent !important;
|
|
|
}
|
|
|
-.threeselects .vue-treeselect__input{
|
|
|
+.threeselects .vue-treeselect__input {
|
|
|
background-color: transparent !important;
|
|
|
}
|
|
|
-.el-table__body-wrapper .el-table__empty-block{
|
|
|
+.el-table__body-wrapper .el-table__empty-block {
|
|
|
border: none !important;
|
|
|
-}
|
|
|
-.plantypes .el-form-item__label{
|
|
|
+}
|
|
|
+.plantypes .el-form-item__label {
|
|
|
text-align: center;
|
|
|
}
|
|
|
-.vue-treeselect__placeholder{
|
|
|
+.vue-treeselect__placeholder {
|
|
|
color: #ccc;
|
|
|
}
|
|
|
-.el-form-item__content{
|
|
|
+.el-form-item__content {
|
|
|
border-bottom: none !important;
|
|
|
}
|
|
|
-.jinduchakan .el-table__body-wrapper .el-table__empty-block{
|
|
|
+.jinduchakan .el-table__body-wrapper .el-table__empty-block {
|
|
|
border-bottom: 2px solid white !important;
|
|
|
border-left: 2px solid white !important;
|
|
|
border-right: 2px solid white !important;
|
|
@@ -1498,10 +1556,10 @@ export default {
|
|
|
/* 去除默认字体 */
|
|
|
/* .el-select .el-input__inner */
|
|
|
.el-select-dropdown__item.selected {
|
|
|
- color: #000;
|
|
|
- font-weight: bold;
|
|
|
+ color: #000;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
-.vue-treeselect__menu{
|
|
|
+.vue-treeselect__menu {
|
|
|
color: #606266;
|
|
|
}
|
|
|
</style>
|