first commit
This commit is contained in:
@@ -0,0 +1,309 @@
|
||||
/**
|
||||
* 根据enum获取选项
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getEnumOptions = async (enumName) => {
|
||||
const {data} = await $.get("/platform/vi/common/enumOptions", {enumName})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取字典选项
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDictOptions = async (code) => {
|
||||
const {data} = await $.get("/platform/vi/common/dictOptions", {code})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取校区
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getCampus = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getCampus")
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDbt = async (jdhId) => {
|
||||
const {data} = await $.get("/platform/vi/common/getDbt", {jdhId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基层工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnions = async (delegationId) => {
|
||||
const {data} = await $.get("/platform/vi/common/unions", {delegationId})
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取基层工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnionList = async (unionId) => {
|
||||
const {data} = await $.get("/platform/vi/common/unionList", {unionId})
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 获取单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnits = async (unionId) => {
|
||||
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取本分工会的单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnionUnits = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/unionUnits")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取福利单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getWelfareUnits = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/welfareUnits")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取福利单位的二级单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUnitsByWelfareUnit = async (welfareUnitId) => {
|
||||
const {data} = await $.get("/platform/vi/common/unitsByWelfareUnit", {welfareUnitId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubs = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/clubs", {})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取届次
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getJc = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getJcByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前人所管理的协会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubsByRole = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getClubsByRole", {})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文件类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getFileType = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getFileTypeByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取基层干部的角色
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getJcgbJs = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getJcgbJsByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取审批员的角色
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getSpyJs = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getSpyJsByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社团类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getClubType = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getClubTypeByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统名称
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getSystemName = async () => {
|
||||
const {data} = await $.get("/platform/vi/common/getSystemNameByDict")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取工代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getGdh = async (open = true) => {
|
||||
const {data} = await $.get("/platform/vi/common/getGdh", {open})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查用户
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const queryUserByIds = async (ids) => {
|
||||
const {data} = await $.get("/platform/vi/common/queryUserByIds", {ids: JSON.stringify(ids)})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户
|
||||
* @param query
|
||||
* @param unionid
|
||||
* @param unitid
|
||||
* @param sex
|
||||
* @param ishy
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const searchUser = async (query, unionid, unitid, sex, ishy) => {
|
||||
const {data} = await $.get("/platform/vi/common/searchUser", {query, unionid, unitid, sex, ishy})
|
||||
return data.list
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代表可以操作的教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getJdhByDb = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getJdhByDb")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取代表可以操作的开启的教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getOpenJdhByDb = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getOpenMeeting")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取疗休养活动
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getLxyHd = async () => {
|
||||
const {data} = await $.get("/platform/zgfw/lxy/common/getHdList")
|
||||
return data
|
||||
}
|
||||
const getlxyHdCd = async () => {
|
||||
const {data} = await $.get("/platform/zgfw/lxy/common/getlxyHdCd")
|
||||
return data
|
||||
}
|
||||
const getNowLxyHd = async () => {
|
||||
const {data} = await $.get("/platform/zgfw/lxy/common/getNowHdList")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动人员范围
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityGroup = async () => {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getActivityUserScopeGroup')
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 查看该人员是否在活动范围中
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getScopeUser = async (activityGroupId) => {
|
||||
const {data} = await $.get('/platform/activity/basic/scope/getScopeUser', {activityGroupId})
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 获取活动院级工会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityUnions = async () => {
|
||||
const {data} = await $.get("/platform/activity/basic/union/getActivityUnions",)
|
||||
return data
|
||||
}
|
||||
|
||||
const getLocationVariable = (variable) => {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (let i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
const threeUnitsByUnionGroupOrUnitId = async (unitId, groupId) => {
|
||||
const {data} = await $.get("/platform/vi/common/threeUnitsByUnionGroupOrUnitId", {
|
||||
unitId,
|
||||
groupId
|
||||
})
|
||||
return data
|
||||
}
|
||||
const unionGroupsByUnionId = async (unionId) => {
|
||||
const {data} = await $.get("/platform/vi/common/unionGroupsByUnionId", {unionId})
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 获取单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityUnits = async (unionId) => {
|
||||
const {data} = await $.get("/platform/activity/basic/union/getActivityUnits", {unionId})
|
||||
return data
|
||||
}
|
||||
/**
|
||||
* 根据code查询活动项目下面的类型
|
||||
* @param id
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getActivityTwoLevelType = async (code) => {
|
||||
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code})
|
||||
return data
|
||||
}
|
||||
|
||||
const getConfigKey = async (key) => {
|
||||
const {data} = await $.get('/platform/sys/conf/getValue', {key})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查用户
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const queryUserById = async (id) => {
|
||||
const {data} = await $.get("/platform/vi/common/queryUserById", {id: id})
|
||||
return data
|
||||
}
|
||||
Reference in New Issue
Block a user