From 9b2cede515af4fe957f9a6a2577299685f784d49 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 08 Nov 2021 19:46:02 +0800
Subject: [PATCH] 派遣批量新增,社保人员选择接口调整
---
src/api/social/social.js | 101 ++++++++++++------------
src/api/system/user.js | 11 ++
src/api/dispatch/dispatch.js | 19 ++++
src/views/securityUnitChild/social.vue | 34 +++----
src/views/dispatch/dispatchChildoperable.vue | 37 ++++++--
5 files changed, 120 insertions(+), 82 deletions(-)
diff --git a/src/api/dispatch/dispatch.js b/src/api/dispatch/dispatch.js
index bc4474f..e9283f4 100644
--- a/src/api/dispatch/dispatch.js
+++ b/src/api/dispatch/dispatch.js
@@ -31,6 +31,14 @@
})
}
+export const saveDispatcher = (row) => {
+ return request({
+ url: '/api/dispatcher/saveDispatcher',
+ method: 'post',
+ data: row
+ })
+}
+
export const update = (row) => {
return request({
url: '/api/dispatcherUnit/submit',
@@ -81,7 +89,16 @@
export const update1 = (row) => {
return request({
- url: '/api/dispatcher/submit',
+ url: '/api/dispatcher/update',
+ method: 'post',
+ data: row
+ })
+}
+
+
+export const updateDispatcher = (row) => {
+ return request({
+ url: '/api/dispatcher/updateDispatcher',
method: 'post',
data: row
})
diff --git a/src/api/social/social.js b/src/api/social/social.js
index c02e8fe..890e730 100644
--- a/src/api/social/social.js
+++ b/src/api/social/social.js
@@ -2,75 +2,74 @@
export const getListJurisdiction = (current, size, params) => {
- return request({
- url: '/api/social/page',
- method: 'get',
- params: {
- ...params,
- current,
- size,
- }
- })
+ return request({
+ url: '/api/social/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
}
export const getuseList = (id) => {
- return request({
- url: '/api/blade-user/detail',
- method: 'get',
- params: {
- id
- }
- })
+ return request({
+ url: '/api/blade-user/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
}
export const getList = (current, size, params) => {
- return request({
- url: '/api/social/list',
- method: 'get',
- params: {
- ...params,
- current,
- size,
- }
- })
+ return request({
+ url: '/api/social/list',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
}
export const getDetail = (id) => {
- return request({
- url: '/api/social/detail',
- method: 'get',
- params: {
- id
- }
- })
+ return request({
+ url: '/api/social/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
}
export const remove = (ids) => {
- return request({
- url: '/api/social/remove',
- method: 'post',
- params: {
- ids,
- }
- })
+ return request({
+ url: '/api/social/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
}
export const add = (row) => {
- return request({
- url: '/api/social/save',
- method: 'post',
- data: row
- })
+ return request({
+ url: '/api/social/save',
+ method: 'post',
+ data: row
+ })
}
export const update = (row) => {
- return request({
- url: '/api/social/submit',
- method: 'post',
- data: row
- })
-}
-
+ return request({
+ url: '/api/social/submit',
+ method: 'post',
+ data: row
+ })
+}
\ No newline at end of file
diff --git a/src/api/system/user.js b/src/api/system/user.js
index 2df0fdc..87d1eb9 100644
--- a/src/api/system/user.js
+++ b/src/api/system/user.js
@@ -44,6 +44,17 @@
})
}
+export const getSecurityDispatcherTree = (deptId, status) => {
+ return request({
+ url: '/api/blade-user/security-dispatcher-tree',
+ method: 'get',
+ params: {
+ deptId,
+ status
+ }
+ })
+}
+
export const remove = (ids) => {
return request({
url: '/api/blade-user/remove',
diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index e9b30ae..5b12252 100644
--- a/src/views/dispatch/dispatchChildoperable.vue
+++ b/src/views/dispatch/dispatchChildoperable.vue
@@ -25,13 +25,13 @@
<script>
import {
getdata1,
- adddata1,
- update1,
+ saveDispatcher,
+ updateDispatcher,
remove1,
getDispatcherUnitByDeptId,
overDispatcher,
} from "@/api/dispatch/dispatch";
-import { update, getListByDeptId } from "@/api/system/user";
+import { update, getSecurityDispatcherTree } from "@/api/system/user";
import { mapState } from "vuex";
export default {
@@ -133,13 +133,20 @@
searchSpan: 3,
search: true,
hide: true,
+ // props: {
+ // label: "realName",
+ // value: "id",
+ // },
+ // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
+ dicUrl: `/api/blade-user/security-dispatcher-tree?deptId={{key}}`,
+ dicData: [],
props: {
- label: "realName",
+ label: "name",
value: "id",
},
- // dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
- dicUrl: `/api/blade-user/page-security-units?status=1&deptId={{key}}`,
- dicData: [],
+ //不包含父节点值
+ leafOnly:true,
+ multiple: true,
rules: [
{
required: true,
@@ -162,7 +169,6 @@
// value: "id",
// },
// dicUrl: `/api/blade-user/page-security-units?dispatch=1&deptId={{key}}`,
- dicData: [],
rules: [
{
required: true,
@@ -353,7 +359,11 @@
if (this.useifid != 266) {
form["deptId"] = this.useifid;
}
- adddata1(form).then(
+ console.log(form,123456);
+ form["ids"] = form.userIds.join(","),
+ delete form.userIds;
+ console.log(form,321);
+ saveDispatcher(form).then(
(res) => {
this.onLoad1(this.page1);
this.$message({
@@ -387,7 +397,7 @@
if (this.useifid != 266) {
row["deptId"] = this.useifid;
}
- update1(row).then(
+ updateDispatcher(row).then(
() => {
this.onLoad1(this.page1);
this.$message({
@@ -450,6 +460,11 @@
beforeOpen(done, type) {
this.initFlag = true;
+ if(type=="edit"){
+ // alert(1);
+ const userColumn = this.findObject(this.option1.column, "userIds");
+ userColumn.multiple = false;
+ }
done();
},
@@ -543,7 +558,7 @@
);
dispatcherUnitIdColumn.dicData = res.data.data;
});
- getListByDeptId(that.userInfo.dept_id, 1).then((res) => {
+ getSecurityDispatcherTree(that.userInfo.dept_id, 1).then((res) => {
const userIdsColumn = that.findObject(this.option1.column, "userIds");
userIdsColumn.dicData = res.data.data;
});
diff --git a/src/views/securityUnitChild/social.vue b/src/views/securityUnitChild/social.vue
index 54a2354..fdd6a98 100644
--- a/src/views/securityUnitChild/social.vue
+++ b/src/views/securityUnitChild/social.vue
@@ -147,10 +147,6 @@
label: "女",
value: 2,
},
- {
- label: "未知",
- value: 3,
- },
],
labelWidth: 110,
addDisabled: true,
@@ -163,21 +159,21 @@
},
],
},
- {
- label: "民族",
- prop: "nation",
- addDisabled: true,
- editDisabled: true,
- width: 55,
- labelWidth: 110,
- rules: [
- {
- required: true,
- message: "请输入民族",
- trigger: "blur",
- },
- ],
- },
+ // {
+ // label: "民族",
+ // prop: "nation",
+ // addDisabled: true,
+ // editDisabled: true,
+ // width: 55,
+ // labelWidth: 110,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入民族",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
// {
// label: "出生日期",
// labelWidth: 110,
--
Gitblit v1.9.3