first commit
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
window.activity = {
|
||||
getType: async () => {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getType")
|
||||
return data
|
||||
},
|
||||
getTeam: async () => {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getTeam")
|
||||
return data
|
||||
},
|
||||
getEvents: async (type) => {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getEvents", {type})
|
||||
return data
|
||||
},
|
||||
getSchoolActivityPlan: async (type) => {
|
||||
const {code, data, msg} = await $.get("/platform/activity/common/getSchoolActivityPlan", {type})
|
||||
return data
|
||||
},
|
||||
school: {
|
||||
gameStyle: {
|
||||
1: '竞赛类',
|
||||
2: '非竞赛类'
|
||||
},
|
||||
awardsMode: {
|
||||
1: '单项',
|
||||
2: '团体'
|
||||
},
|
||||
activityLevel: {
|
||||
1: '校级',
|
||||
2: '分工会',
|
||||
3: '社团或协会'
|
||||
},
|
||||
combinationMethod: {
|
||||
1: '单项报名人数',
|
||||
2: '团体报名人数'
|
||||
},
|
||||
applyWay: {
|
||||
1: '个人报名',
|
||||
2: '分工会报名',
|
||||
3: '小程序报名'
|
||||
},
|
||||
getStatus(close, applyStartTime, applyEndTime, startTime, endTime, isSave) {
|
||||
if (isSave) {
|
||||
return `<span class="text-danger">活动未开始</span>`
|
||||
}
|
||||
if (close) {
|
||||
return `<span class="text-danger">活动已关闭</span>`
|
||||
}
|
||||
const now = moment().valueOf()
|
||||
const dateNow = moment(moment(moment().format('YYYY-MM-DD')).valueOf()).valueOf()
|
||||
|
||||
if (now < moment(applyStartTime).valueOf()) {
|
||||
return `<span class="text-info">未开始报名</span>`
|
||||
} else if (moment(applyStartTime).valueOf() <= now && now <= moment(applyEndTime).valueOf()) {
|
||||
return `<span class="text-success">活动报名中</span>`
|
||||
} else if (moment(applyEndTime).valueOf() < now && now < moment(startTime).valueOf()) {
|
||||
return `<span class="text-info">报名已结束</span>`
|
||||
} else if (moment(startTime).valueOf() < now && now < moment(endTime).valueOf()) {
|
||||
return `<span class="text-primary">活动进行中</span>`
|
||||
} else if (moment(endTime).valueOf() < now) {
|
||||
return `<span class="text-danger">活动已结束</span>`
|
||||
}
|
||||
},
|
||||
canApply(close, applyStartTime, applyEndTime) {
|
||||
if (close) {
|
||||
return false
|
||||
}
|
||||
if (moment(applyStartTime).valueOf() < now < moment(applyEndTime).valueOf()) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
window.site = {
|
||||
reverseRankingDate(data) {
|
||||
for (let i = 0; i < data.length - 1; i++) {
|
||||
for (let j = 0; j < data.length - 1 - i; j++) {
|
||||
if (moment().format(data[j].start_time) > moment().format(data[j + 1].start_time)) {
|
||||
let temp = data[j];
|
||||
data[j] = data[j + 1];
|
||||
data[j + 1] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
window.condolence = {
|
||||
type: {
|
||||
1: '生日慰问',
|
||||
2: '结婚慰问',
|
||||
3: '生育慰问',
|
||||
4: '退休离岗慰问',
|
||||
5: '会员直系去世慰问',
|
||||
6: '住院慰问',
|
||||
7: '其他',
|
||||
},
|
||||
way: {
|
||||
1: '慰问金 (A)',
|
||||
2: '提货券 (B)',
|
||||
3: '慰问品 (C)',
|
||||
},
|
||||
diseaseType: {
|
||||
1: '普通疾病',
|
||||
2: '重大疾病',
|
||||
},
|
||||
toFormData: (formData) => {
|
||||
formData.type = formData.type + ""
|
||||
formData.way = formData.way + ""
|
||||
formData.disease_type = formData.disease_type + ""
|
||||
if (formData.files) {
|
||||
formData.files = JSON.parse(formData.files)
|
||||
}
|
||||
},
|
||||
doExport(id) {
|
||||
window.location.href = "/platform/fw/condolence/doExport?id=" + id
|
||||
},
|
||||
export(id) {
|
||||
window.location.href = "/platform/fw/condolence/export?id=" + id
|
||||
},
|
||||
doPrint(id) {
|
||||
window.location.href = "/platform/fw/condolence/read/doPrint?id=" + id
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
window.difficulty = {
|
||||
sq_knlx: {
|
||||
1: "会员因病住院",
|
||||
2: "家庭重大意外事故",
|
||||
3: "会员去世",
|
||||
4: "重大疾病(癌症)",
|
||||
5: "困难家庭",
|
||||
6: "精神疾病",
|
||||
7: "长期病休",
|
||||
8: "其它"
|
||||
},
|
||||
|
||||
|
||||
subsidy: {
|
||||
1: "日常补助慰问",
|
||||
2: "“元旦、春节”困难补助慰问"
|
||||
},
|
||||
hard1: {
|
||||
1: "会员因病住院",
|
||||
2: "家庭重大意外事故",
|
||||
3: "会员去世",
|
||||
},
|
||||
hard2: {
|
||||
4: "重大疾病(癌症)",
|
||||
5: "困难家庭",
|
||||
6: "精神疾病",
|
||||
7: "长期病休",
|
||||
8: "其它"
|
||||
},
|
||||
hard: {
|
||||
1: "会员因病住院",
|
||||
2: "家庭重大意外事故",
|
||||
3: "会员去世",
|
||||
4: "重大疾病(癌症)",
|
||||
5: "困难家庭",
|
||||
6: "精神疾病",
|
||||
7: "长期病休",
|
||||
8: "其它"
|
||||
},
|
||||
/**
|
||||
* 金额提示
|
||||
*/
|
||||
subsidyAmountPrompt: {
|
||||
1: "会员因病住院(500-1000元)",
|
||||
2: "家庭重大意外事故(1000元)",
|
||||
3: "会员去世(1000元)",
|
||||
4: "重大疾病(癌症)(1000元)",
|
||||
5: "困难家庭(1000元)",
|
||||
6: "精神疾病(800元)",
|
||||
7: "长期病休(800元)",
|
||||
8: "其它(800元)"
|
||||
},
|
||||
jobTitle: [
|
||||
'事业编制职工(正式职工)',
|
||||
'合同制职工',
|
||||
'人事代理职工',
|
||||
'集体职工',
|
||||
'流动编制职工',
|
||||
'非事业编制职工',
|
||||
'博士后进站人员',
|
||||
'劳务派遣人员',
|
||||
'聘用工(各二级单位聘用)'
|
||||
],
|
||||
zcOptions: [
|
||||
'教授',
|
||||
'副教授',
|
||||
'讲师',
|
||||
'助教'],
|
||||
getHard(sid) {
|
||||
return sid == 1 ? this.hard1 : this.hard2
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
window.medicalAid = {
|
||||
toFormData: v => {
|
||||
if (v.hospital_time) {
|
||||
v.hospital_time = v.hospital_time.split(",")
|
||||
}
|
||||
v.files_medical_certificate = JSON.parse(v.files_medical_certificate)
|
||||
v.files_medicare_settlement = JSON.parse(v.files_medicare_settlement)
|
||||
v.files_invoice = JSON.parse(v.files_invoice)
|
||||
v.files_summary_discharge = JSON.parse(v.files_summary_discharge)
|
||||
}
|
||||
,
|
||||
elementType: type => {
|
||||
if (type === 1) {
|
||||
return `<span v-if="type==1" class="text-primary">医疗补助</span>`
|
||||
} else if (type === 2) {
|
||||
return `<span v-if="type==2" class="text-danger">重疾补助</span>`
|
||||
} else {
|
||||
return `<span v-if="type==3" class="text-info">特殊补助</span>`
|
||||
}
|
||||
},
|
||||
med_types: [{val: 1, lab: '医疗补助'}, {val: 2, lab: '重疾补助'}]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
window.member = {
|
||||
async getChangeType() {
|
||||
const changeType = {}
|
||||
const changeTypeOptions = await getDictOptions("MemberChangeType")
|
||||
changeTypeOptions.forEach(v => {
|
||||
changeType[v.code] = v.name
|
||||
})
|
||||
return changeType
|
||||
},
|
||||
async getChangeOrigin() {
|
||||
const changeOrigin = {}
|
||||
const changeOriginOptions = await getEnumOptions("MemberChangeOrigin")
|
||||
changeOriginOptions.forEach(v => {
|
||||
changeOrigin[v.code] = v.description
|
||||
})
|
||||
return changeOrigin
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
const initTableMixins = {
|
||||
data() {
|
||||
return {
|
||||
submitLoading: false,
|
||||
searchMore: false,
|
||||
tableSize: '',
|
||||
tableKey: '',
|
||||
formData: {},
|
||||
formRules: {},
|
||||
formLoading: false,
|
||||
tableLoading: false,
|
||||
tableData: [],
|
||||
tableColumns: [],
|
||||
pageForm: {
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
filters: {
|
||||
date(value) {
|
||||
return value ? moment(value).format('YYYY-MM-DD') : ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
dropdownCommand({action, value}) {
|
||||
if (action) action(value)
|
||||
},
|
||||
|
||||
fileHandleRemove(file, fileList) {
|
||||
return fileList;
|
||||
},
|
||||
fileHandleChange(file, fileList, {type, size}) {
|
||||
const removeFile = () => {
|
||||
fileList.splice(fileList.findIndex(v => v === file))
|
||||
}
|
||||
|
||||
if (!file.size) {
|
||||
this.notifyWarning('您选择的是空文件!')
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (type && type.length && !type.includes(file.name.split('.').pop().toLowerCase())) {
|
||||
this.notifyWarning(`文件只能是 ${type.map(v => v.toUpperCase()).join('/')} 格式!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
if (size && !file.size < size) {
|
||||
this.notifyWarning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
|
||||
removeFile()
|
||||
}
|
||||
|
||||
return fileList;
|
||||
},
|
||||
|
||||
columnChange(val) {
|
||||
this.tableLoading = true
|
||||
this.tableColumns = val
|
||||
this.tableLoading = false
|
||||
},
|
||||
tableSizeChange(size) {
|
||||
this.tableSize = size
|
||||
},
|
||||
indexMethod(index) {
|
||||
return index + (this.pageForm.pageNumber - 1) * this.pageForm.pageSize + 1
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
},
|
||||
pageOrder(column) {
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange(val) {
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange(val) {
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData(url) {
|
||||
const address = url ? url : loc() + "/pageData"
|
||||
sublime.showLoadingbar();
|
||||
this.tableLoading = true
|
||||
$.post(address, this.pageForm, (data) => {
|
||||
sublime.closeLoadingbar();
|
||||
this.tableLoading = false
|
||||
if (data.code == 0) {
|
||||
this.tableData = data.data.list;
|
||||
this.pageForm.totalCount = data.data.totalCount;
|
||||
} else {
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
}, "json");
|
||||
},
|
||||
notifySuccess(msg) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: msg,
|
||||
type: 'success'
|
||||
});
|
||||
},
|
||||
notifyWarning(msg) {
|
||||
this.$notify({
|
||||
title: '警告',
|
||||
message: msg,
|
||||
type: 'warning'
|
||||
});
|
||||
},
|
||||
notifyError(msg) {
|
||||
this.$notify.error({
|
||||
title: '错误',
|
||||
message: msg
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
const memberMixins = {
|
||||
data() {
|
||||
return {
|
||||
showBzPicker: false,
|
||||
showMzPicker: false,
|
||||
showXlPicker: false,
|
||||
showCsPicker: false,
|
||||
currentDate: new Date(1990, 0, 1),
|
||||
maxDate: new Date(),
|
||||
minDate: new Date(1950, 0, 1),
|
||||
formData: {},
|
||||
bzColumns: [
|
||||
'事业编制职工(正式职工)', '合同制职工', '人事代理职工', '集体职工', '流动编制职工',
|
||||
'非事业编制职工', '博士后进站人员', '劳务派遣人员', '聘用工(各二级单位聘用)'
|
||||
],
|
||||
xlColumns: [
|
||||
'博士', '硕士', '本科', '专科', '其他'
|
||||
],
|
||||
mzColumns: [],
|
||||
imageList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onBzConfirm(value) {
|
||||
this.formData.rsbz = value;
|
||||
this.showBzPicker = false;
|
||||
},
|
||||
onMzConfirm(value) {
|
||||
this.formData.mz = value;
|
||||
this.showMzPicker = false;
|
||||
},
|
||||
onXlConfirm(value) {
|
||||
this.formData.xl = value;
|
||||
this.showXlPicker = false;
|
||||
},
|
||||
onCsConfirm(value) {
|
||||
this.formData.birthday = moment(value).format('YYYY-MM-DD');
|
||||
this.showCsPicker = false;
|
||||
},
|
||||
onOversize(file) {
|
||||
vant.Toast('文件大小不能超过2MB');
|
||||
},
|
||||
beforeRead(file) {
|
||||
if (file.type !== 'image/jpeg' && file.type !== 'image/png') {
|
||||
vant.Toast('只能上传jpg/png文件,且不超过2MB的一寸电子照片')
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
afterRead(file) {
|
||||
file.status = 'uploading';
|
||||
file.message = '上传中...';
|
||||
|
||||
let formData = new FormData();
|
||||
formData.append("file", file.file, file.file.name);
|
||||
|
||||
$.ajax({
|
||||
url: "/platform/Common/uploadFile",
|
||||
type: "post",
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code === 0) {
|
||||
file.status = 'success';
|
||||
this.formData.imgUrl = data.filepath
|
||||
}
|
||||
},
|
||||
error: (err) => {
|
||||
file.status = 'failed';
|
||||
file.message = '上传失败';
|
||||
}
|
||||
});
|
||||
},
|
||||
pageData() {
|
||||
$.post("/mobile/hy/apply/join/pageData", (res) => {
|
||||
const {code, data, msg} = res
|
||||
if (code === 0) {
|
||||
this.formData = data
|
||||
this.imageList = [{url: FILE_DOMAIN + data.imgurl, status: 'success'}]
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$toast.loading('提交中...');
|
||||
$.post(location.href + "/doAdd", {user: JSON.stringify(this.formData)}, (res) => {
|
||||
if (res.code === 0) {
|
||||
setTimeout(() => {
|
||||
this.$toast.success('提交成功');
|
||||
setTimeout(() => {
|
||||
location.replace('/mobile/index')
|
||||
}, 300)
|
||||
}, 500)
|
||||
} else {
|
||||
setTimeout(() => {
|
||||
this.$toast.fail('提交失败');
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
},
|
||||
async getAllNation() {
|
||||
const {data} = await $.get("/mobile/hy/apply/join/getAllNation");
|
||||
return data.map(v => {
|
||||
return v.mzmc
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
const proposalMixins = {
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.view()
|
||||
this.$refs.info.openView(row.id)
|
||||
},
|
||||
async doAudit() {
|
||||
this.submitDisabled = true
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在提交...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: COVER_LAYER_COLOR
|
||||
});
|
||||
|
||||
const resp = await $.post(base + "/platform/proposal/transact/audit/doAudit", this.formData)
|
||||
|
||||
requestLaterFun(resp, () => {
|
||||
this.$notify.success({title: '成功', message: resp.msg});
|
||||
this.pageData()
|
||||
this.$refs.guava.index()
|
||||
}, () => {
|
||||
this.$notify.error({title: '失败', message: resp.msg});
|
||||
}, () => {
|
||||
loading.close()
|
||||
this.submitDisabled = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
const refreshSearchMixins = {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
finished: false,
|
||||
refreshing: false,
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
pageNumber: 0,
|
||||
pageSize: 5,
|
||||
totalCount: 0,
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async pageData() {
|
||||
this.pageForm.pageNumber++
|
||||
$.post(loc() + "/pageData", this.pageForm, (res) => {
|
||||
const {code, data} = res
|
||||
if (this.refreshing) {
|
||||
this.tableData = [];
|
||||
this.refreshing = false;
|
||||
}
|
||||
this.loading = false;
|
||||
|
||||
if (code === 0) {
|
||||
this.tableData = this.tableData.concat(data.list)
|
||||
this.pageForm.totalCount = data.totalCount
|
||||
|
||||
if (this.tableData.length == 0) {
|
||||
this.finished = true;
|
||||
} else {
|
||||
this.none_data = false
|
||||
if (this.tableData.length >= this.pageForm.totalCount) {
|
||||
this.finished = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
async onRefresh() {
|
||||
this.refreshing = true;
|
||||
this.finished = false;
|
||||
this.pageForm.pageNumber = 0
|
||||
this.loading = true;
|
||||
await this.pageData();
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
let physicalsCommonUrl = "/platform/physicals/common";
|
||||
|
||||
const sexOptions = ['男', '女']
|
||||
|
||||
let exportPhysicalsList = (projectId) => {
|
||||
location.href = physicalsCommonUrl + "/exportPhysicalsList?projectId=" + projectId
|
||||
}
|
||||
|
||||
let getWelfareUnitPhysicals = async () => {
|
||||
const {code, data} = await $.get(physicalsCommonUrl + "/welfareUnit")
|
||||
if (!code) {
|
||||
return data
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
let getComponentUnitPhysicals = async (unitId) => {
|
||||
const {code, data} = await $.get(physicalsCommonUrl + "/componentUnit", {unitId})
|
||||
if (!code) {
|
||||
return data
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
let getPhysicalsProjects = async () => {
|
||||
const {code, data} = await $.get(physicalsCommonUrl + "/physicalsProjects")
|
||||
if (!code) {
|
||||
return data
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
let physicalsCommonColumns = [
|
||||
{prop: 'loginname', label: '工号'},
|
||||
{prop: 'username', label: '姓名'},
|
||||
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
|
||||
{prop: 'marriage', label: '结婚状态', sortable: true},
|
||||
{prop: 'mobile', label: '手机号'},
|
||||
{prop: 'idcard', label: '身份证号', width: '180px'},
|
||||
{prop: 'personType', label: '人员类型', sortable: true},
|
||||
{prop: 'userState', label: '在职状态', sortable: true},
|
||||
{prop: 'unitname', label: '所在单位', sortable: true},
|
||||
{prop: 'unionname', label: '所属工会', sortable: true},
|
||||
{prop: 'campusName', label: '所属校区', sortable: true}]
|
||||
@@ -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