|
@@ -69,7 +69,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="adminId" class="plantypes" label-width="80px">
|
|
|
<treeselect
|
|
|
- v-model="queryParams.unitId"
|
|
|
+ v-model="queryParams.adminId"
|
|
|
:options="users"
|
|
|
placeholder="请选择发布单位"
|
|
|
class="threeselects"
|
|
@@ -308,15 +308,6 @@
|
|
|
placeholder="请选择发布单位"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="执行单位" prop="unitId">
|
|
|
- <treeselect
|
|
|
- v-model="form.unitId"
|
|
|
- :options="users"
|
|
|
- class="threeselects"
|
|
|
- @select="selectPeo1"
|
|
|
- placeholder="请选择执行单位"
|
|
|
- />
|
|
|
- </el-form-item>
|
|
|
<el-form-item label="任务类型" prop="type">
|
|
|
<!-- <el-select
|
|
|
v-model="form.type"
|
|
@@ -347,11 +338,36 @@
|
|
|
class="ipt"
|
|
|
></el-input>
|
|
|
</el-form-item>
|
|
|
+ <div>
|
|
|
+ <el-form-item label="执行单位" prop="unitId" label-width="100px">
|
|
|
+ <div>
|
|
|
+ <el-select
|
|
|
+ multiple
|
|
|
+ filterable
|
|
|
+ v-model="form.unitId"
|
|
|
+ id="execute"
|
|
|
+ ref="peoplenames"
|
|
|
+ placeholder="请选择执行单位"
|
|
|
+ @remove-tag="selent"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item,i) in danWeisList"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId"
|
|
|
+ id="execute"
|
|
|
+ @click.native="danFn()"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+
|
|
|
<div>
|
|
|
<el-form-item label="执行人" prop="peopleName" label-width="100px">
|
|
|
<div>
|
|
|
<el-select
|
|
|
multiple
|
|
|
+ filterable
|
|
|
v-model="form.peopleName"
|
|
|
id="execute"
|
|
|
ref="peoplenames"
|
|
@@ -359,11 +375,9 @@
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in executor"
|
|
|
- :key="item.deptId"
|
|
|
:label="item.nickName"
|
|
|
:value="item.userId"
|
|
|
id="execute"
|
|
|
- @click.native="returnExecutor(item.deptId, item.nickName)"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</div>
|
|
@@ -764,7 +778,7 @@
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in executor"
|
|
|
- :key="item.deptId"
|
|
|
+ :key="item.userId"
|
|
|
:label="item.nickName"
|
|
|
:value="item.userId"
|
|
|
@click.native="returnExecutor(item.deptId, item.nickName)"
|
|
@@ -976,6 +990,7 @@ import {
|
|
|
singProgress,
|
|
|
moreProgress,
|
|
|
uploadProgress,
|
|
|
+ getUnitUsers
|
|
|
} from "@/api/workingArrangements/workTask";
|
|
|
import {
|
|
|
deptUser,
|
|
@@ -984,6 +999,7 @@ import {
|
|
|
getDeptList,
|
|
|
} from "@/api/workingArrangements/workTask";
|
|
|
import { getDicts } from "@/api/system/dict/data";
|
|
|
+import { listDept } from "@/api/system/dept";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { getDept2 } from "@/api/grassrootsregistration/bdglmeeting";
|
|
@@ -1149,6 +1165,8 @@ export default {
|
|
|
},
|
|
|
// 导出文件的路径
|
|
|
daoChu: "",
|
|
|
+ //获取单位所有不是树形结构
|
|
|
+ danWeisList:[]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -1167,6 +1185,30 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
+ //点击多选单位
|
|
|
+ danFn(){
|
|
|
+ this.renyuanEs();
|
|
|
+ },
|
|
|
+ //获取多选单位下的人员
|
|
|
+ renyuanEs(){
|
|
|
+ if(this.form.unitId.length>0){
|
|
|
+ var ids=this.form.unitId.join(',');
|
|
|
+getUnitUsers(ids).then(res=>{
|
|
|
+this.executor=res.data
|
|
|
+})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //删除所有单位的某一个触发
|
|
|
+ selent(){
|
|
|
+ this.renyuanEs();
|
|
|
+
|
|
|
+ },
|
|
|
+ //获取所有单位
|
|
|
+ danWeis(){
|
|
|
+ listDept().then(res=>{
|
|
|
+ this.danWeisList=res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
// 导出重置
|
|
|
resets() {
|
|
|
this.queryParamsTime = {
|
|
@@ -1335,9 +1377,10 @@ export default {
|
|
|
},
|
|
|
// 发布单位选中触发
|
|
|
selectPeo3(val) {
|
|
|
- this.queryParams.unitId = val.id;
|
|
|
- this.getZhuChi(this.queryParams.unitId);
|
|
|
+ this.queryParams.adminId = val.id;
|
|
|
this.getList();
|
|
|
+ // this.queryParams.unitId = val.id;
|
|
|
+ //this.getZhuChi(this.queryParams.unitId);
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
@@ -1387,6 +1430,7 @@ export default {
|
|
|
this.reset();
|
|
|
this.open = true;
|
|
|
this.title = "添加工作任务";
|
|
|
+ this.danWeis();
|
|
|
this.form.adminId = Cookies.get("deptId");
|
|
|
this.form.username = Cookies.get("nickName");
|
|
|
this.form.userId = Cookies.get("userId");
|
|
@@ -1432,8 +1476,11 @@ export default {
|
|
|
this.form = response.data;
|
|
|
// this.form.type = parseInt(this.form.type);
|
|
|
// this.getDept2()
|
|
|
- this.getZhuChi(this.form.unitId);
|
|
|
+ //this.getZhuChi(this.form.unitId);
|
|
|
this.form.peopleName = this.form.peopleName.split(",").map(Number);
|
|
|
+ this.form.unitId =this.form.unitId.split(",").map(Number);
|
|
|
+ this.danWeis();
|
|
|
+ this.renyuanEs()
|
|
|
this.open = true;
|
|
|
this.title = "修改工作计划";
|
|
|
});
|
|
@@ -1510,6 +1557,9 @@ export default {
|
|
|
this.form.peopleId = this.form.peopleName;
|
|
|
|
|
|
if (this.form.id != null) {
|
|
|
+ if(this.form.unitId.length>0){
|
|
|
+ this.form.unitId =this.form.unitId.join(',')
|
|
|
+ }
|
|
|
updateWorkTask(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.queryParams.type = "";
|
|
@@ -1517,11 +1567,14 @@ export default {
|
|
|
this.getList();
|
|
|
});
|
|
|
} else {
|
|
|
- addWorkTask(this.form).then((response) => {
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ if(this.form.unitId.length>0){
|
|
|
+ this.form.unitId =this.form.unitId.join(',')
|
|
|
+ }
|
|
|
+ addWorkTask(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|