+
-
-
+
+
@@ -212,55 +214,58 @@
@@ -404,13 +458,14 @@
介绍
- 报名
+ 参加活动
@@ -478,11 +533,24 @@
},
imgtype: ['gif', 'jpg', 'png', 'jpeg'],
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
- doctype: ['doc', 'docx', 'txt'],
+ doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'],
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg', 'quicktime'],
+ chooseLb: {},
}
},
methods: {
+ zplbClick(val, fd, i) {
+ this.chooseLb = val
+ fd[i].zplb = val.zid;
+ fd[i].zplb_name = val.zname;
+ this.showPicker = false
+ },
+ activeChange() {
+ if (this.subDis) {
+ this.active = 0
+ this.$toast.fail("不在活动时间范围内!");
+ }
+ },
imgDelete(idx, i, filepath) {
this.fd[i].imgList.splice(idx, 1)
this.readytodelfile.push(filepath);
@@ -499,7 +567,7 @@
,
getPlaceholder(formData, key) {
if (this.isNull(formData.userid)) {
- return "输入工资号后自动匹配"
+ return "输入工号后自动匹配"
} else {
if (this.isNull(formData[key])) {
return '暂无'
@@ -517,22 +585,36 @@
this.$set(this.formData, 'username', userName)
this.$set(this.formData, 'unitname', unitName)
this.$set(this.formData, 'userid', userId)
+ this.$set(this.formData, 'mobile', "${@shiro.getPrincipalProperty('mobile')}")
},
- async doSubmit() {
+ async doSubmit(flag) {
if (this.isNull(this.formData.userid)) {
- this.$toast.fail("请正确填写您的工资号!")
+ this.$toast.fail("请正确填写您的工号!")
return
}
const i = this.formData.hdlb_i
- if (this.fd[i].videoList.length == 0 && this.fd[i].imgList.length == 0) {
- this.$toast.fail("请您选择要上传的作品!")
- return
+ if (flag === true) {
+ if (this.fd[i].imgList.length === 0) {
+ this.$toast.fail("请您选择要上传的作品!")
+ return
+ }
+ if (!this.fd[i].zplb || !this.fd[i].zpmc || !this.fd[i].zpms) {
+ this.$toast.fail("请您填写完整再提交!")
+ return
+ }
+ /* if (this.chooseLb.isUploadPhoto === true || this.chooseLb.isUploadOther === true) {
+ if (this.fd[i].videoList.length == 0 || this.fd[i].imgList.length == 0) {
+ this.$toast.fail("请您选择要上传的作品!")
+ return
+ }
+ }*/
}
+ const msg = '您当前选择的是“' + this.boxData.lbs[i].lname + '”,是否确认上传?' + (flag ? '上传后您将不能对已上传的作品进行更改' : '保存后如需提交请到我的作品进行提交')
const confirm = await this.$dialog.confirm({
title: '提醒',
- message: '您当前选择的是“' + this.boxData.lbs[i].lname + '”,是否确认上传?上传后您将不能对已上传的作品进行更改'
+ message: msg
})
if (confirm === "confirm") {
setTimeout(() => {
@@ -543,7 +625,8 @@
let formData1 = {}
let formData2 = new FormData();
-
+ formData1.flag = flag
+ formData2.append("flag", flag)
if (this.formData.id) {
this.$set(formData1, "id", getQueryVariable("zpid"))
@@ -551,32 +634,34 @@
this.$set(formData1, "hdsbrid", this.isNull(this.formData.userid) ? '' : this.formData.userid)
this.$set(formData1, "mobile", this.isNull(this.formData.mobile) ? '' : this.formData.mobile)
this.$set(formData1, "step_count", this.isNull(this.fd[i].step_count) ? '' : this.fd[i].step_count)
+ this.$set(formData1, "zpmc", this.isNull(this.fd[i].zpmc) ? '' : this.fd[i].zpmc)
this.$set(formData1, "hdzplx", this.isNull(this.boxData.lbs[i].lid) ? '' : this.boxData.lbs[i].lid)
this.$set(formData1, "hdzplx2", this.isNull(this.fd[i].zplb) ? '' : this.fd[i].zplb)
this.$set(formData1, "hdsbzpzt", this.isNull(this.fd[i].zpzt) ? '' : this.fd[i].zpzt)
this.$set(formData1, "hdsbzpms", this.isNull(this.fd[i].zpms) ? '' : this.fd[i].zpms)
- this.$set(formData1, "hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'))
+ //this.$set(formData1, "hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'))
} else {
formData2.append("hdid", getQueryVariable("id"))
formData2.append("hdsbrid", this.isNull(this.formData.userid) ? '' : this.formData.userid);
formData2.append("mobile", this.isNull(this.formData.mobile) ? '' : this.formData.mobile);
formData2.append("step_count", this.isNull(this.fd[i].step_count) ? '' : this.fd[i].step_count);
+ formData2.append("zpmc", this.isNull(this.fd[i].zpmc) ? '' : this.fd[i].zpmc);
formData2.append("hdzplx", this.isNull(this.boxData.lbs[i].lid) ? '' : this.boxData.lbs[i].lid)
formData2.append("hdzplx2", this.isNull(this.fd[i].zplb) ? '' : this.fd[i].zplb);
formData2.append("hdsbzpzt", this.isNull(this.fd[i].zpzt) ? '' : this.fd[i].zpzt);
formData2.append("hdsbzpms", this.isNull(this.fd[i].zpms) ? '' : this.fd[i].zpms);
- formData2.append("hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'));
this.fd[i].imgList.forEach(val => {
formData2.append("files", val.file, this.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
});
this.fd[i].videoList.forEach(val => {
formData2.append("files", val.file, this.isNull(val.ms) ? val.file.name : val.ms + getSuffix(val.file.name));
- });
+ })
+ formData2.append("hdsbsj", moment().format('YYYY-MM-DD HH:mm:ss'));
}
-
if (!this.isNull(this.formData.id)) {
formData2.append("data", JSON.stringify(formData1));
+ formData2.append("flag", flag);
formData2.append("readytodelfile", JSON.stringify(this.readytodelfile));
this.fd[i].imgList.forEach(val => {
formData2.append("file", val.file);
@@ -604,6 +689,7 @@
vue.fd[i].zpzt = ''
vue.fd[i].zpms = ''
vue.fd[i].step_count = ''
+ vue.fd[i].zpmc = ''
vue.fd[i].sbsj = ''
vue.fd[i].imgList = []
vue.fd[i].videoList = []
@@ -621,7 +707,7 @@
this.flag = false
}
vue.showPlan = false
- window.history.back()
+ location.href = '/mobile/wmhd/list'
},
error: function (data) {
vue.msg = '
非常抱歉对您造成的不便!
请联系系统管理员进行修复!
'
@@ -652,6 +738,7 @@
vue.fd[i].zpzt = ''
vue.fd[i].zpms = ''
vue.fd[i].step_count = ''
+ vue.fd[i].zpmc = ''
vue.fd[i].sbsj = ''
vue.fd[i].imgList = []
vue.fd[i].videoList = []
@@ -686,22 +773,32 @@
,
// 返回布尔值
beforeReadImg: function (file) {
- return true;
+ var suffix = getSuffix(file.name)
+ if (suffix == null) {
+ this.$toast('获取不到后缀名!')
+ return false
+ }
+ const suf = file.name.split('.').pop().toLowerCase()
+ if (this.chooseLb.photoType.indexOf(suf) === -1) {
+ this.$toast('支持的图片类型:' + this.chooseLb.photoType.toString())
+ return false
+ }
+ return true
}
,
// 返回布尔值
beforeReadVideo: function (file, detail) {
var suffix = getSuffix(file.name)
if (suffix == null) {
- this.$toast('获取不到后缀名!');
- return false;
+ this.$toast('获取不到后缀名!')
+ return false
}
- // var type = suffix.toString().substring(suffix.lastIndexOf(".") + 2)
- // if (this.videotype.indexOf(type) == -1 && this.audiotype.indexOf(type) == -1 && this.doctype.indexOf(type) == -1) {
- // this.$toast('不支持的文件类型!');
- // return false;
- // }
- return true;
+ const suf = file.name.split('.').pop().toLowerCase()
+ if (this.chooseLb.otherType.indexOf(suf) === -1) {
+ this.$toast('支持的文件类型:' + this.chooseLb.otherType.toString())
+ return false
+ }
+ return true
}
,
},
@@ -752,11 +849,15 @@
this.$set(this.formData, "mobile", refs[0].mobile)
this.$set(this.formData, "hdlb_i", refs[0].llocation - 1)
this.$set(this.fd[refs[0].llocation - 1], "step_count", this.isNull(refs[0].step_count) ? "" : refs[0].step_count)
+ this.$set(this.fd[refs[0].llocation - 1], "zpmc", this.isNull(refs[0].zpmc) ? "" : refs[0].zpmc)
this.$set(this.boxData.lbs[refs[0].llocation - 1], "lid", refs[0].hdzplx)
this.$set(this.fd[refs[0].llocation - 1], "zplb", refs[0].hdzplx2)
+ this.$set(this.fd[refs[0].llocation - 1], "zplb_name", refs[0].zname)
this.$set(this.fd[refs[0].llocation - 1], "zpzt", refs[0].hdsbzpzt)
this.$set(this.fd[refs[0].llocation - 1], "hdsbsj", refs[0].hdsbsj)
this.$set(this.fd[refs[0].llocation - 1], "zpms", refs[0].hdsbzpms)
+ const o = this.boxData.lbs[refs[0].llocation - 1].zplbs.find(o => o.zid === refs[0].hdzplx2)
+ this.chooseLb = o !== undefined ? o : {}
data.forEach((v, i) => {
v.filename = v.filename
v.fjurl = v.filepath
@@ -764,10 +865,13 @@
v.content = FILE_DOMAIN + "/fileStreamPreview?id=" + v.id
const filetype = v.filename.substring(v.filename.lastIndexOf(".") + 1)
const aa = this.audiotype.concat(this.videotype)
+ const bb = this.doctype.concat(this.doctype)
if (this.imgtype.indexOf(filetype) > -1) {
this.fd[refs[0].llocation - 1].imgList.push(v)
} else if (aa.indexOf(filetype) > -1) {
this.fd[refs[0].llocation - 1].videoList.push(v);
+ } else if (bb.indexOf(filetype) > -1) {
+ this.fd[refs[0].llocation - 1].videoList.push(v);
}
})
@@ -794,4 +898,4 @@
}
-
\ No newline at end of file
+
diff --git a/src/main/resources/views/platform/hd/wmhd/mobile/wmMobile.html b/src/main/resources/views/platform/hd/wmhd/mobile/wmMobile.html
index 4310d54..1e83ef3 100644
--- a/src/main/resources/views/platform/hd/wmhd/mobile/wmMobile.html
+++ b/src/main/resources/views/platform/hd/wmhd/mobile/wmMobile.html
@@ -228,10 +228,10 @@
@input="doInput"
required
v-model="formData.loginname"
- name="工资号"
+ name="工号"
label="工 号"
- placeholder="工资号"
- :rules="[{ required: true, message: '请填写工资号' }]"
+ placeholder="工号"
+ :rules="[{ required: true, message: '请填写工号' }]"
>
-