first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -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();
},
}
}