437 lines
9.7 KiB
JavaScript
437 lines
9.7 KiB
JavaScript
/**
|
|
* 根据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
|
|
}
|
|
|
|
/**
|
|
* 根据code获取字典选项信息
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getDictState = async (code) => {
|
|
const {data} = await $.get("/platform/vi/common/dictState", {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
|
|
}
|
|
|
|
//查询当前用户管理的院级工会
|
|
const getUnion = async () => {
|
|
const {data} = await $.get("/platform/vi/common/getUnion")
|
|
return data
|
|
}
|
|
|
|
//查询当前用户管理的院级工会下的单位
|
|
const getUnit = async (unionid) => {
|
|
const {data} = await $.get("/platform/vi/common/getUnit", {unionid: unionid})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 获取代表小组
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getGroup = async (jdhId) => {
|
|
const {data} = await $.get("/platform/vi/common/getGroup", {jdhId})
|
|
return data
|
|
}
|
|
|
|
//获取所有开启的教代会
|
|
const getOpenJdh = async () => {
|
|
const {data} = await $.get("/platform/jdh/Common/getOpenJdhxx")
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 获取院级工会
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getUnions = async (delegationId = null, isPermission = false) => {
|
|
const {data} = await $.get("/platform/vi/common/unions", {delegationId, isPermission})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 获取活动院级工会
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getActivityUnions = async () => {
|
|
const {data} = await $.get("/platform/activity/basic/union/getActivityUnions",)
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 获取单位
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getUnits = async (unionId = null) => {
|
|
const {data} = await $.get("/platform/vi/common/units", {unionId})
|
|
return data
|
|
}
|
|
|
|
|
|
const getClubUnits = async () => {
|
|
const {data} = await $.get("/platform/vi/common/getClubUnits", {})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 获取单位
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getActivityUnits = async (unionId) => {
|
|
const {data} = await $.get("/platform/activity/basic/union/getActivityUnits", {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 getClubsByUser = async () => {
|
|
const {data} = await $.get("/platform/vi/common/getClubsByUser", {})
|
|
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
|
|
}
|
|
|
|
/**
|
|
* 获取工代会代表团
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getGdhDbt = async (jdhId) => {
|
|
const {data} = await $.get("/platform/gdh/common/getDbt", {jdhId})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 根据id查用户
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const queryUserByIds = async (ids) => {
|
|
const {data} = await $.get("/platform/vi/common/queryUserByIds", {ids: JSON.stringify(ids)})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 根据id查用户
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const queryUserById = async (id) => {
|
|
const {data} = await $.get("/platform/vi/common/queryUserById", {id: id})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 查询用户
|
|
* @param query
|
|
* @param unionid
|
|
* @param unitid
|
|
* @param sex
|
|
* @param member
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const searchUser = async (query, unionid = null, unitid = null, sex = null, member = null) => {
|
|
const {data} = await $.get("/platform/vi/common/searchUser", {
|
|
query,
|
|
unionid,
|
|
unitid,
|
|
sex,
|
|
member
|
|
})
|
|
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 getGzzllx = async () => {
|
|
const {data} = await $.get("/platform/jdh/Common/getGzzllx")
|
|
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 getUnionList = async (unionId) => {
|
|
const {data} = await $.get("/platform/vi/common/unionList", {unionId})
|
|
return data
|
|
}
|
|
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 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
|
|
}
|
|
|
|
/**
|
|
* 根据code查询活动项目下面的类型
|
|
* @param id
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getActivityTwoLevelType = async (code) => {
|
|
const {data} = await $.get("/platform/activity/basic/basic/settings/getActivityTwoLevelType", {code})
|
|
return data
|
|
}
|
|
|
|
//获取二级教代会(双代会)工作资料类型
|
|
const getJdh2Gzzllx = async () => {
|
|
const {data} = await $.get("/platform/jdh/Common/getJdh2Gzzllx")
|
|
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 getConfigKey = async (key) => {
|
|
const {data} = await $.get('/platform/sys/conf/getValue', {key})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 审核添加已办
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const doCompletes = async () => {
|
|
let obj = unescape(localStorage.getItem('needItems'));
|
|
const {data} = await $.post('/platform/sys/completed/addCompletes', {data:obj})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 根据多个工会获取单位
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getUnitByUnions = async (unionId = null) => {
|
|
const {data} = await $.get("/platform/vi/common/getUnitsByUnions", {unionId})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 多个单位或小组获取三级单位
|
|
* @param unitId
|
|
* @param groupId
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getThreeUnitsByUnionGroupsOrUnitIds = async (unitId, groupId) => {
|
|
const {data} = await $.get("/platform/vi/common/getThreeUnitsByUnionGroupsOrUnitIds", {
|
|
unitId,
|
|
groupId
|
|
})
|
|
return data
|
|
}
|
|
|
|
/**
|
|
* 多个工会获取工会小组
|
|
* @param unionId
|
|
* @returns {Promise<*>}
|
|
*/
|
|
const getUnionGroupsByUnions = async (unionId) => {
|
|
const {data} = await $.get("/platform/vi/common/getUnionGroupsByUnions", {unionId})
|
|
return data
|
|
}
|