first commit
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* 根据id查询提案详细详细
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getProposalInfo = async (id) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalInfo", {id})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据code获取字典选项
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDictByCode = async (code) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getDictByCode", {code})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提案类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getProposalType = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalType")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提案状态
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getProposalState = async (stateCode) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalState", {stateCode})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取全部开启的提案状态
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getOpenProposalState = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getOpenProposalState")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提案配置
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getProposalConfig = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalConfig")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 按教代会届次获取承办单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getUndertakeByMeeting = async (meetingId) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getUndertakeByMeeting", {meetingId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有开启的承办单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getProposalUndertake = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalUndertake")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开启的教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getOpenMeeting = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getOpenMeeting")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getAllMeeting = async () => {
|
||||
const {data} = await $.get("/platform/proposal/common/getAllMeeting")
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据教代会获取代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDelegation = async (meetingId) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getDelegation", {meetingId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据教代会获取当前登录用户的代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getDelegationId = async (meetingId) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getDelegationId", {meetingId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据教代会获取委员会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getCommittee = async (meetingId) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getCommittee", {meetingId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询该提案下的承办单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const findOrganizer = async (proposalId) => {
|
||||
const {data} = await $.get("/platform/proposal/common/findOrganizer", {proposalId})
|
||||
return data
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询该提案的立案状态
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
const getProposalResultCode = async (proposalId) => {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalResultCode", {proposalId})
|
||||
return data
|
||||
}
|
||||
|
||||
@@ -0,0 +1,196 @@
|
||||
window.proposal = {
|
||||
/*提案状态*/
|
||||
UNSUBMIT: 100,
|
||||
INVIRTE: 150,
|
||||
DELEGATION: 200,
|
||||
CASE: 300,
|
||||
PRINCIPALREAD: 330,
|
||||
CASEUNIT: 400,
|
||||
LEADERAUDIT: 500,
|
||||
UNITREPLY: 600,
|
||||
FEEDBACKSCORE: 700,
|
||||
CASE_CHECK: 800,
|
||||
FINISH: 900,
|
||||
|
||||
//开启的状态
|
||||
enableState: [],
|
||||
|
||||
//开启签字的状态
|
||||
needSignState: [],
|
||||
|
||||
auditUrl: '/platform/proposal/transact/audit/doAudit',
|
||||
replyUrl: '/platform/proposal/transact/audit/doReply',
|
||||
|
||||
async initData(app) {
|
||||
const allJdhOptions = await proposal.getOpenMeeting()
|
||||
app.pageForm.meetingId = allJdhOptions.length > 0 ? allJdhOptions[0].id : null
|
||||
app.delegationOptions = await proposal.getDelegation(app.pageForm.meetingId)
|
||||
app.pageData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据id查询提案详细详细
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getProposalInfo(id) {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalInfo", {id})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据code获取字典选项
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getDictByCode(code) {
|
||||
const {data} = await $.get("/platform/proposal/common/getDictByCode", {code})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取提案类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getProposalType() {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalType")
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取提案状态
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getProposalState(stateCode) {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalState", {stateCode})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取全部开启的提案状态
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getOpenProposalState() {
|
||||
const {data} = await $.get("/platform/proposal/common/getOpenProposalState")
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取提案配置
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getProposalConfig() {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalConfig")
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 按教代会届次获取承办单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getUndertakeByMeeting(meetingId) {
|
||||
const {data} = await $.get("/platform/proposal/common/getUndertakeByMeeting", {meetingId})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取所有开启的承办单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getProposalUndertake() {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalUndertake")
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取开启的教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getOpenMeeting() {
|
||||
const {data} = await $.get("/platform/proposal/common/getOpenMeeting")
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取所有教代会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getAllMeeting() {
|
||||
const {data} = await $.get("/platform/proposal/common/getAllMeeting")
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据教代会获取代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getDelegation(meetingId) {
|
||||
const {data} = await $.get("/platform/proposal/common/getDelegation", {meetingId})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据教代会获取当前登录用户的代表团
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getDelegationId(meetingId) {
|
||||
const {data} = await $.get("/platform/proposal/common/getDelegationId", {meetingId})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 根据教代会获取委员会
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getCommittee(meetingId) {
|
||||
const {data} = await $.get("/platform/proposal/common/getCommittee", {meetingId})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询该提案下的承办单位
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async findOrganizer(proposalId) {
|
||||
const {data} = await $.get("/platform/proposal/common/findOrganizer", {proposalId})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询该提案的立案状态
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getProposalResultCode(proposalId) {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalResultCode", {proposalId})
|
||||
return data
|
||||
},
|
||||
|
||||
async getProposalAllStateCode() {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalAllStateCode")
|
||||
Object.assign(proposal, data)
|
||||
},
|
||||
|
||||
async getProposalEnableStateCode() {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalEnableStateCode")
|
||||
this.enableState = data
|
||||
},
|
||||
async getProposalNeedSignStateCode() {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalNeedSignStateCode")
|
||||
this.needSignState = data
|
||||
},
|
||||
async getProposalIsNodeState(stateCode) {
|
||||
if (!stateCode) {
|
||||
return false;
|
||||
}
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalIsNodeState", {stateCode})
|
||||
return data
|
||||
},
|
||||
async getProposalNextNode(stateCode) {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalNextNode", {stateCode})
|
||||
return data
|
||||
}
|
||||
}
|
||||
|
||||
proposal.getProposalAllStateCode()
|
||||
proposal.getProposalEnableStateCode()
|
||||
proposal.getProposalNeedSignStateCode()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user