first commit
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
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) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
const uploadFileType = ['jpg', 'png', 'doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
const docType = ['doc', 'docx', 'xls', 'xlsx', 'pdf']
|
||||
|
||||
const FILE_UPLOAD_ADDRESS = '/file_server/uploadFile'
|
||||
const FILE_DELETE_ADDRESS = '/file_server/deleteFile'
|
||||
const FILE_STREAM_PREVIEW_ADDRESS = '/file_server/fileStreamPreview'
|
||||
const FILE_STREAM_DOWNLOAD_ADDRESS = '/file_server/download'
|
||||
|
||||
const preview = async (filename, id) => {
|
||||
const suffix = filename.substring(filename.lastIndexOf('.') + 1)
|
||||
if (!docType.includes(suffix.toLowerCase())) {
|
||||
let image = new Image();
|
||||
image.src = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + id
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
} else {
|
||||
let pdfStreamUrl = encodeURIComponent(FILE_STREAM_PREVIEW_ADDRESS + '?id=' + id) //将路径转码
|
||||
window.open('/assets/platform/plugins/pdfJs/web/viewer.html?file=' + pdfStreamUrl, filename)
|
||||
}
|
||||
}
|
||||
|
||||
const download = (id) => {
|
||||
window.open(FILE_STREAM_DOWNLOAD_ADDRESS + '?id=' + id)
|
||||
}
|
||||
|
||||
|
||||
const PREVIEW_IMAGE = (val) => {
|
||||
let image = new Image();
|
||||
image.src = FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
||||
let viewer = new Viewer(image);
|
||||
viewer.show();
|
||||
}
|
||||
|
||||
const CREATE_PREVIEW_URL = (val) => {
|
||||
return FILE_STREAM_PREVIEW_ADDRESS + "?id=" + val
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 遮盖层颜色
|
||||
* @type {string}
|
||||
*/
|
||||
const COVER_LAYER_COLOR = "rgba(0,0,0,.45)"
|
||||
|
||||
/**
|
||||
* 民族
|
||||
* @type {string[]}
|
||||
*/
|
||||
const nation = [
|
||||
'汉族',
|
||||
'蒙古族',
|
||||
'回族',
|
||||
'藏族',
|
||||
'维吾尔族',
|
||||
'苗族',
|
||||
'彝族',
|
||||
'壮族',
|
||||
'布依族',
|
||||
'朝鲜族',
|
||||
'满族',
|
||||
'侗族',
|
||||
'瑶族',
|
||||
'白族',
|
||||
'土家族',
|
||||
'哈尼族',
|
||||
'哈萨克族',
|
||||
'傣族',
|
||||
'黎族',
|
||||
'傈僳族',
|
||||
'佤族',
|
||||
'畲族',
|
||||
'高山族',
|
||||
'拉祜族',
|
||||
'水族',
|
||||
'东乡族',
|
||||
'纳西族',
|
||||
'景颇族',
|
||||
'柯尔克孜族',
|
||||
'土族',
|
||||
'达翰尔族',
|
||||
'么佬族',
|
||||
'羌族',
|
||||
'布朗族',
|
||||
'撒拉族',
|
||||
'毛南族',
|
||||
'仡佬族',
|
||||
'锡伯族',
|
||||
'阿昌族',
|
||||
'普米族',
|
||||
'塔吉克族',
|
||||
'怒族',
|
||||
'乌孜别克族',
|
||||
'俄罗斯族',
|
||||
'鄂温克族',
|
||||
'德昂族',
|
||||
'保安族',
|
||||
'裕固族',
|
||||
'京族',
|
||||
'塔塔尔族',
|
||||
'独龙族',
|
||||
'鄂伦春族',
|
||||
'赫哲族',
|
||||
'门巴族',
|
||||
'珞巴族',
|
||||
'基诺族'
|
||||
];
|
||||
|
||||
const loc = () => {
|
||||
return location.href.replace(location.search, "").replace(location.hash, "")
|
||||
}
|
||||
|
||||
const clone = (obj) => {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
|
||||
const calcTableHeight = (eleIds = []) => {
|
||||
if (eleIds) {
|
||||
eleIds.forEach(e_id => {
|
||||
const ele = document.querySelector('#' + e_id)
|
||||
if (ele) {
|
||||
ele.style.height = (innerHeight - ele.getBoundingClientRect().top - parseInt(ele.dataset.bottom)) + 'px'
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
window.condolence = {
|
||||
type: {
|
||||
1: '结婚慰问',
|
||||
2: '生育慰问',
|
||||
3: '住院慰问',
|
||||
4: '当年退休慰问',
|
||||
5: '在职会员去世慰问',
|
||||
6: '在职会员直接亲属去世慰问',
|
||||
},
|
||||
way: {
|
||||
1: '慰问金 (A)',
|
||||
2: '提货券 (B)',
|
||||
3: '慰问品 (C)',
|
||||
},
|
||||
diseaseType: {
|
||||
1: '普通疾病',
|
||||
2: '重大疾病',
|
||||
},
|
||||
toFormData: (formData) => {
|
||||
formData.type = formData.type + ""
|
||||
formData.way = formData.way + ""
|
||||
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
|
||||
},
|
||||
doExportBx(id) {
|
||||
window.location.href = "/platform/fw/condolence/read/doExport?id=" + id
|
||||
},
|
||||
doPrint(id) {
|
||||
window.location.href = "/platform/fw/condolence/read/doPrint?id=" + id
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
let contribution = {
|
||||
async getContributionType() {
|
||||
const {data} = await $.get("/platform/contribution/common/getContributionType")
|
||||
return data
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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,64 @@
|
||||
const HonorApi = {
|
||||
honor_type_id: '69dc3d774bf34ccd838a272d7272ae29',
|
||||
honor_single_id: '8a8b455b964a41f2bbf18a4896cbd83e',
|
||||
honor_list_id: '6b9e26a9467f49ae88fbd3951377e0f8',
|
||||
honor_level_id: '3c1058afc91b4e69be46c585b1a48191',
|
||||
honor_award_id: 'afd9dc97cd7e46c3b9cee5893386d202',
|
||||
|
||||
disabledIds:['3c1058afc91b4e69be46c585b1a48191','69dc3d774bf34ccd838a272d7272ae29','afd9dc97cd7e46c3b9cee5893386d202','' +
|
||||
'8a8b455b964a41f2bbf18a4896cbd83e','6b9e26a9467f49ae88fbd3951377e0f8'],
|
||||
|
||||
|
||||
/**
|
||||
* 荣誉类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getHonorType() {
|
||||
const {data} = await $.post('/platform/honor/basic/settings/getData', {parentId: this.honor_type_id})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 荣誉类型
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getHonorNum(stateId) {
|
||||
const {data} = await $.post('/platform/honor/basic/settings/getHonorNum', {stateId: stateId})
|
||||
return data
|
||||
},
|
||||
|
||||
async getEvaluateNum(stateId) {
|
||||
const {data} = await $.post('/platform/honor/basic/settings/getEvaluateNum', {stateId: stateId})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 荣誉获奖等级
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getHonorLevel() {
|
||||
const {data} = await $.post('/platform/honor/basic/settings/getData', {parentId: this.honor_level_id})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 奖项介质
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getHonorAwardType() {
|
||||
const {data} = await $.post('/platform/honor/basic/settings/getData', {parentId: this.honor_award_id})
|
||||
return data
|
||||
},
|
||||
|
||||
/**
|
||||
* 奖项
|
||||
* @param honorType
|
||||
* @returns {Promise<*>}
|
||||
*/
|
||||
async getHonorPrize(honorType) {
|
||||
const {data} = await $.post('/platform/honor/basic/settings/getData', {parentId: honorType})
|
||||
return data
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
const Jsz = {
|
||||
mapCenter: {
|
||||
lng: 118.820223,
|
||||
lat: 32.034854
|
||||
},
|
||||
async getTypes() {
|
||||
const {data} = await $.get("/jsz/common/getTypes")
|
||||
return data
|
||||
},
|
||||
|
||||
async getQuestion() {
|
||||
const {data} = await $.get("/jsz/common/getQuestion")
|
||||
return data
|
||||
},
|
||||
|
||||
async getIssueById(id) {
|
||||
const {data} = await $.get("/jsz/common/getIssueById", {id})
|
||||
return data
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
let manuscript = {
|
||||
async getManuscriptType() {
|
||||
const {data} = await $.get("/platform/manuscript/basic/getManuscriptType")
|
||||
return data
|
||||
}
|
||||
}
|
||||
@@ -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,34 @@
|
||||
const ddmixins = {
|
||||
data(){
|
||||
return{
|
||||
pageForm: {
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
pageOrderName: "",
|
||||
pageOrderBy: ""
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doSearch () {
|
||||
this.pageForm.pageNumber = 1;
|
||||
this.pageData();
|
||||
},
|
||||
pageOrder: function (column) {//按字段排序
|
||||
this.pageForm.pageOrderName = column.prop;
|
||||
this.pageForm.pageOrderBy = column.order;
|
||||
this.pageData();
|
||||
},
|
||||
pageNumberChange: function (val) {//页码更新操作
|
||||
this.pageForm.pageNumber = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageSizeChange: function (val) {//分页大小更新操作
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
const initTableMixins = {
|
||||
data() {
|
||||
return {
|
||||
festival: ['元旦、春节', '劳动节、端午节', '中秋节、国庆节', '其它'],
|
||||
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: ""
|
||||
},
|
||||
guavaIndex: 'index',
|
||||
unionGroups: [],
|
||||
threeUnits: []
|
||||
}
|
||||
},
|
||||
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
|
||||
});
|
||||
},
|
||||
async getThreeUnits() {
|
||||
this.$set(this.pageForm, 'threeUnitId', null)
|
||||
this.threeUnits = []
|
||||
this.threeUnits = await threeUnitsByUnionGroupOrUnitId(this.pageForm.unitId, this.pageForm.unionGroupId)
|
||||
},
|
||||
launchFullscreen() {
|
||||
const element = document.documentElement
|
||||
if (element.requestFullscreen) {
|
||||
element.requestFullscreen();
|
||||
} else if (element.mozRequestFullScreen) {
|
||||
element.mozRequestFullScreen();
|
||||
} else if (element.webkitRequestFullscreen) {
|
||||
element.webkitRequestFullscreen();
|
||||
} else if (element.msRequestFullscreen) {
|
||||
element.msRequestFullscreen();
|
||||
}
|
||||
this.calcSignTableHeight()
|
||||
},
|
||||
exitFullscreen() {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
} else if (document.mozCancelFullScreen) {
|
||||
document.mozCancelFullScreen();
|
||||
} else if (document.webkitExitFullscreen) {
|
||||
document.webkitExitFullscreen();
|
||||
}
|
||||
},
|
||||
toggleFullScreen() {
|
||||
if (!document.fullscreenElement) {
|
||||
document.documentElement.requestFullscreen();
|
||||
} else {
|
||||
if (document.exitFullscreen) {
|
||||
document.exitFullscreen();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,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,197 @@
|
||||
window.proposal = {
|
||||
/*提案状态*/
|
||||
UNSUBMIT: 100,
|
||||
INVIRTE: 150,
|
||||
SECONDARY_UNIT: 160,
|
||||
PARTY_ORGANIZATION: 170,
|
||||
DELEGATION: 200,
|
||||
CASE: 300,
|
||||
PRINCIPALREAD: 330,
|
||||
CASEUNIT: 400,
|
||||
LEADERAUDIT: 500,
|
||||
UNITREPLY: 600,
|
||||
FEEDBACKSCORE: 700,
|
||||
CASE_CHECK: 800,
|
||||
CASE_FILED: 850,
|
||||
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
|
||||
},
|
||||
async getProposalPrevNode(stateCode) {
|
||||
const {data} = await $.get("/platform/proposal/common/getProposalPrevNode", {stateCode})
|
||||
return data
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
window.suggestionApi = {
|
||||
suggestionState: [
|
||||
{state: 1, name: "未提交", color: "#909399"},
|
||||
{state: 2, name: "二级教代会代表采纳中", color: "#409EFF"},
|
||||
{state: 3, name: "本部门协商处理中", color: "#409EFF"},
|
||||
{state: 4, name: "已转交给本单位教代会代表", color: "#67c23a"},
|
||||
],
|
||||
tableColums: [
|
||||
{prop: 'suggestionName', label: '建议名称', sortable: false},
|
||||
{prop: 'createUserLogin', label: '工号',sortable: false},
|
||||
{prop: 'createUserName', label: '姓名',sortable: false},
|
||||
{prop: 'applyTime', label: '撰写时间',sortable: true},
|
||||
{prop: 'typeName', label: '建议类型',sortable: true},
|
||||
{prop: 'createUserUnionName', label: '所属工会',sortable: true},
|
||||
{prop: 'state', label: '状态',sortable: true},
|
||||
// {prop: 'adopt', label: '校工会是否采纳'}
|
||||
]
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user