|
@@ -14,8 +14,8 @@
|
|
|
:rules="approveRules"
|
|
:rules="approveRules"
|
|
|
label-width="170px"
|
|
label-width="170px"
|
|
|
>
|
|
>
|
|
|
- <el-form-item label="尽调审核人员" prop="investigatePerson">
|
|
|
|
|
- <el-select v-model="approveForm.investigatePerson" placeholder="全部" style="width: 400px;"
|
|
|
|
|
|
|
+ <el-form-item label="尽调审核人员" prop="userIds">
|
|
|
|
|
+ <el-select v-model="approveForm.userIds" placeholder="全部" style="width: 400px;"
|
|
|
clearable
|
|
clearable
|
|
|
multiple
|
|
multiple
|
|
|
filterable
|
|
filterable
|
|
@@ -34,27 +34,17 @@
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
-
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="cancelApproveForm">取 消</el-button>
|
|
<el-button @click="cancelApproveForm">取 消</el-button>
|
|
|
<el-button type="primary" @click="submitApproveForm(true)" v-preventReClick>提 交</el-button>
|
|
<el-button type="primary" @click="submitApproveForm(true)" v-preventReClick>提 交</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
- <!--选择人员-->
|
|
|
|
|
- <selecUser
|
|
|
|
|
- ref="flowUser"
|
|
|
|
|
- :checkType="checkType"
|
|
|
|
|
- :selectValues="selectValues"
|
|
|
|
|
- :selectNameValues="selectNameValues"
|
|
|
|
|
- @handleUserSelect="handleUserSelect"
|
|
|
|
|
- ></selecUser>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
|
|
|
|
|
-import {findApproveUser,saveApproveUser} from "@/api/project/investigate/pool";
|
|
|
|
|
-import { listUserNew } from "@/api/system/user";
|
|
|
|
|
|
|
+import {allUserList,findApproveUser,saveApproveUser} from "@/api/project/investigate/pool";
|
|
|
import projectItem from "./projectItem";
|
|
import projectItem from "./projectItem";
|
|
|
import fileItem from "../../invest/components/fileItem";
|
|
import fileItem from "../../invest/components/fileItem";
|
|
|
import selecDept from "../../invest/components/selecDept";
|
|
import selecDept from "../../invest/components/selecDept";
|
|
@@ -78,15 +68,15 @@ export default {
|
|
|
selectValues: null,
|
|
selectValues: null,
|
|
|
selectNameValues: null,
|
|
selectNameValues: null,
|
|
|
userVisible: false,
|
|
userVisible: false,
|
|
|
- approveList: [],
|
|
|
|
|
|
|
+ approveList: [],//全部用户列表
|
|
|
total: null,
|
|
total: null,
|
|
|
approveDiligenceTit: "",
|
|
approveDiligenceTit: "",
|
|
|
approveDiligenceOpen: false,
|
|
approveDiligenceOpen: false,
|
|
|
approveForm: {
|
|
approveForm: {
|
|
|
id: null,
|
|
id: null,
|
|
|
- userId: null,
|
|
|
|
|
|
|
+ userId: [],
|
|
|
loginId: null,
|
|
loginId: null,
|
|
|
- investigatePerson:[],
|
|
|
|
|
|
|
+ userIds:null//下拉框绑定值
|
|
|
},
|
|
},
|
|
|
approveRules: {
|
|
approveRules: {
|
|
|
investigatePerson: [
|
|
investigatePerson: [
|
|
@@ -108,80 +98,23 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- // this.getList();
|
|
|
|
|
- // 人员
|
|
|
|
|
- listUserNew({
|
|
|
|
|
- pageNum: 1,
|
|
|
|
|
- pageSize: 100,
|
|
|
|
|
- }).then((response) => {
|
|
|
|
|
- this.approveList = response.rows;
|
|
|
|
|
- });
|
|
|
|
|
- this.queryApproveUser();
|
|
|
|
|
|
|
+ // 页面加载时先查询全部用户,再查询已存在用户并回显
|
|
|
|
|
+ this.fetchAllUsers();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- //展示人员
|
|
|
|
|
- /*handleProjectItem() {
|
|
|
|
|
- this.$refs.projectItem.showProjectItem = true;
|
|
|
|
|
- // 2. 调用子组件的刷新方法,重新加载项目列表
|
|
|
|
|
- // 确保子组件已加载且存在刷新方法
|
|
|
|
|
- if (this.$refs.projectItem && typeof this.$refs.projectItem.refreshProjectList === 'function') {
|
|
|
|
|
- this.$refs.projectItem.refreshProjectList();
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- handleSelectPeople() {
|
|
|
|
|
- this.$refs.flowUser.handleUserVisible(true);
|
|
|
|
|
- },*/
|
|
|
|
|
- /*用户选中赋值*/
|
|
|
|
|
- /* checkUserComplete() {
|
|
|
|
|
- this.userVisible = false;
|
|
|
|
|
- },*/
|
|
|
|
|
-
|
|
|
|
|
- // 用户选中数据
|
|
|
|
|
- handleUserSelect(selection) {
|
|
|
|
|
- const that = this;
|
|
|
|
|
- if (selection) {
|
|
|
|
|
- if (selection instanceof Array) {
|
|
|
|
|
- const userIds = selection.map((item) => item.userId);
|
|
|
|
|
- const nickName = selection.map((item) => item.nickName);
|
|
|
|
|
- const userName = selection.map((item) => item.userName);
|
|
|
|
|
- const deptId = selection.map((item) => item.deptId);
|
|
|
|
|
- const deptName = selection.map((item) => item.deptName);
|
|
|
|
|
- this.approveForm.investigatePerson = nickName.join(",");
|
|
|
|
|
- this.approveForm.userId = userIds.join(",");
|
|
|
|
|
- this.approveForm.loginId = userName.join(",");
|
|
|
|
|
- this.approveForm.deptId = deptId.join(",");
|
|
|
|
|
- this.approveForm.deptName = deptName.join(",");
|
|
|
|
|
- this.selectNameValues = nickName.join(",");
|
|
|
|
|
- this.selectValues = userIds.join(",");
|
|
|
|
|
- } else {
|
|
|
|
|
- this.approveForm.investigatePerson = selection.nickName;
|
|
|
|
|
- this.approveForm.investigatePersonId = selection.userId;
|
|
|
|
|
- this.selectNameValues = selection.nickName;
|
|
|
|
|
- this.selectValues = selection.userId;
|
|
|
|
|
- }
|
|
|
|
|
- this.$refs.approveForm.clearValidate(["investigatePerson"]);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 1. 查询全部用户(下拉框选项)
|
|
|
|
|
+ async fetchAllUsers() {
|
|
|
|
|
+ allUserList().then((response) => {
|
|
|
|
|
+ this.approveList = response.rows;
|
|
|
|
|
+ // 全部用户加载完成后,再查询已存在的用户
|
|
|
|
|
+ this.fetchExistingUsers();
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
- // 查询已设置的背调审批人员
|
|
|
|
|
- queryApproveUser(){
|
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
|
- console.log(this.approveList.length);
|
|
|
|
|
-
|
|
|
|
|
- findApproveUser().then((response) => {
|
|
|
|
|
- console.log(this.approveList)
|
|
|
|
|
- const approveIds = Array.from(response.rows).map(userId => Number(userId));
|
|
|
|
|
- console.log("选中值格式:", approveIds);
|
|
|
|
|
- this.approveForm.investigatePerson = approveIds;
|
|
|
|
|
-
|
|
|
|
|
- // 关键:数据更新后,等待 DOM 渲染完成,再触发 Chosen 更新
|
|
|
|
|
- /*this.$nextTick(() => {
|
|
|
|
|
- // 通过 $refs 获取元素,触发 chosen:updated 事件
|
|
|
|
|
- $(this.$refs.investigatePerson).trigger("chosen:updated");
|
|
|
|
|
- });*/
|
|
|
|
|
- /*alert(this.approveForm.investigatePerson);
|
|
|
|
|
- console.log(approveIds);*/
|
|
|
|
|
- });
|
|
|
|
|
|
|
|
|
|
|
|
+ // 2. 查询已存在的用户(用于回显)
|
|
|
|
|
+ async fetchExistingUsers() {
|
|
|
|
|
+ findApproveUser().then((response) => {
|
|
|
|
|
+ this.approveForm.userIds=response.rows;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 设置背调审批人员
|
|
// 设置背调审批人员
|
|
@@ -190,6 +123,7 @@ export default {
|
|
|
this.resetApproveForm();
|
|
this.resetApproveForm();
|
|
|
this.approveDiligenceTit = "指定审批人员";
|
|
this.approveDiligenceTit = "指定审批人员";
|
|
|
this.approveDiligenceOpen = true;
|
|
this.approveDiligenceOpen = true;
|
|
|
|
|
+ this.fetchAllUsers();
|
|
|
},
|
|
},
|
|
|
// 尽调申请-提交
|
|
// 尽调申请-提交
|
|
|
submitApproveForm(flag) {
|
|
submitApproveForm(flag) {
|
|
@@ -217,11 +151,8 @@ export default {
|
|
|
resetApproveForm() {
|
|
resetApproveForm() {
|
|
|
this.approveForm = {
|
|
this.approveForm = {
|
|
|
id: null,
|
|
id: null,
|
|
|
- investigateName: null,
|
|
|
|
|
- investigateCode: null,
|
|
|
|
|
- investigatePerson: null,
|
|
|
|
|
- investigatePersonId: null,
|
|
|
|
|
- investigateCost: null,
|
|
|
|
|
|
|
+ userId: null,
|
|
|
|
|
+ deptName:null,
|
|
|
};
|
|
};
|
|
|
this.resetForm("approveForm");
|
|
this.resetForm("approveForm");
|
|
|
},
|
|
},
|