Commit 7f58a138 by 张杰

修改按照组织授权数据

1 parent ac5ee9f8
...@@ -70,6 +70,17 @@ export const GET_USER_ASSIGN_INFO = params => { ...@@ -70,6 +70,17 @@ export const GET_USER_ASSIGN_INFO = params => {
return request(params,'/trialdrive/vehicle/permit/assigndetails') return request(params,'/trialdrive/vehicle/permit/assigndetails')
} }
// 用户管理-指定数据-按组织授权-获取详情
export const GET_ORGZ_ASSIGN_INFO = params => {
return request(params,'/trialdrive/vehicle/orgz/assigndetails')
}
// 用户管理-指定数据-按组织授权-保存数据
export const SAVE_ORGZ_ASSIGN_INFO = params => {
return request(params,'/trialdrive/vehicle/orgz/assign','POST')
}
// 用户管理-指定数据-文件导入接口 // 用户管理-指定数据-文件导入接口
export const IMPORT_VEHICLE_TEMPLATE = '/trialdrive/vehicle/permit/import' export const IMPORT_VEHICLE_TEMPLATE = '/trialdrive/vehicle/permit/import'
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</div> </div>
</template> </template>
<script> <script>
import { GET_ORGZ_ASSIGN_INFO, SAVE_ORGZ_ASSIGN_INFO } from "@/services/user";
import { GET_ORIGINIZATION_LIST } from "@/services/orginizaManage"; import { GET_ORIGINIZATION_LIST } from "@/services/orginizaManage";
import { deepClone, showToast, broadcast, received } from "@/utils/util"; import { deepClone, showToast, broadcast, received } from "@/utils/util";
export default { export default {
...@@ -41,13 +42,15 @@ export default { ...@@ -41,13 +42,15 @@ export default {
isLeaf: "leaf", isLeaf: "leaf",
["node-key"]: "id", ["node-key"]: "id",
}, },
checkKeys: ["1837"], checkKeys: [],
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
mounted() {}, mounted() {
this.getInfo();
},
methods: { methods: {
// 获取组织树列表 // 获取组织树列表
getList() { getList() {
...@@ -73,10 +76,31 @@ export default { ...@@ -73,10 +76,31 @@ export default {
}, },
// 保存数据 // 保存数据
saveInfo() { async saveInfo() {
let _keys = this.$refs.elTree.getCheckedKeys(); let _keys = this.$refs.elTree.getCheckedKeys();
let oParams = {};
oParams.receiverId = this.id;
oParams.orgzIds = _keys;
console.log(_keys); console.log(_keys);
let res = await SAVE_ORGZ_ASSIGN_INFO(oParams);
console.log(res);
broadcast("cancel-loading"); broadcast("cancel-loading");
if (res.code == 200) {
showToast({
message: "保存成功",
type: "success",
});
broadcast("assign-success");
}
},
// 获取详情
getInfo() {
let oParams = {};
oParams.receiverId = this.id;
GET_ORGZ_ASSIGN_INFO(oParams).then((res) => {
this.checkKeys = res.data || [];
});
}, },
}, },
}; };
......
...@@ -685,6 +685,7 @@ export default { ...@@ -685,6 +685,7 @@ export default {
type: "success", type: "success",
}); });
_this.closeCarDialog(); _this.closeCarDialog();
_this.getList(1);
} }
console.log(res); console.log(res);
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!