server_commit

This commit is contained in:
zhaoxinyu
2024-10-22 17:01:19 +08:00
parent 1a8ef82cc4
commit 4cf61c13a7
3 changed files with 20 additions and 5 deletions
@@ -496,7 +496,7 @@ module.exports = {
showSource(showItem, e) { showSource(showItem, e) {
const viewFileParent = $(e.target).closest(".viewFile") const viewFileParent = $(e.target).closest(".viewFile")
const show = this.resolvingShowByFileName(showItem.filename) const show = this.resolvingShowByFileName(showItem.filename)
if (show == 1 || show == 2 || show == 3) { if (show == 1) {
const fileArray = this.files.filter(item => { const fileArray = this.files.filter(item => {
const show = this.resolvingShowByFileName(item.filename) const show = this.resolvingShowByFileName(item.filename)
return show === 1 || show === 2 || show === 3 return show === 1 || show === 2 || show === 3
@@ -134,7 +134,7 @@ layout("/mobile/platform.html"){
top: 28px; top: 28px;
} }
.custom-image { .custom-image1 {
height: 50% !important; height: 50% !important;
} }
@@ -376,7 +376,7 @@ layout("/mobile/platform.html"){
</van-cell-group> </van-cell-group>
<van-empty <van-empty
v-else v-else
class="custom-image" class="custom-image1"
image="/none.svg" image="/none.svg"
description="暂无数据" description="暂无数据"
></van-empty> ></van-empty>
@@ -574,6 +574,7 @@ layout("/layouts/platform.html"){
fileList: [], fileList: [],
viewData: {}, viewData: {},
imgtype: ['gif', 'jpg', 'png', 'jpeg'], imgtype: ['gif', 'jpg', 'png', 'jpeg'],
ziptype: ['rar', 'zip'],
videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'], videotype: ['flv', 'swf', 'mkv', 'avi', 'rm', 'rmvb', 'wmv', 'mp4', 'mov', 'mpg', 'mpeg'],
doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'], doctype: ['doc', 'docx', 'xlsx', 'xls', 'txt'],
audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'], audiotype: ['mp3', 'wma', 'flac', 'wav', 'm4a', 'amr', 'au'],
@@ -736,6 +737,7 @@ layout("/layouts/platform.html"){
this.formhdchange(this.AddFormData.hdid) this.formhdchange(this.AddFormData.hdid)
this.picturelist = []; this.picturelist = [];
this.vadlist = []; this.vadlist = [];
this.ziplist = [];
this.$refs.guava.edit() this.$refs.guava.edit()
if (this.$refs['AddForm']) { if (this.$refs['AddForm']) {
this.$refs['AddForm'].resetFields(); this.$refs['AddForm'].resetFields();
@@ -745,7 +747,8 @@ layout("/layouts/platform.html"){
this.$refs['AddForm'].validate((valid) => { this.$refs['AddForm'].validate((valid) => {
if (valid) { if (valid) {
if (flag && ((this.zplb2Config.isUploadPhoto && this.picturelist.length === 0) || if (flag && ((this.zplb2Config.isUploadPhoto && this.picturelist.length === 0) ||
(this.zplb2Config.isUploadOther && this.vadlist.length === 0))) { (this.zplb2Config.isUploadOther && this.vadlist.length === 0) ||
(this.zplb2Config.isUploadZip && this.ziplist.length === 0))) {
this.$message.warning('请上传您的作品'); this.$message.warning('请上传您的作品');
return; return;
} }
@@ -764,6 +767,9 @@ layout("/layouts/platform.html"){
this.vadlist.forEach(val => { this.vadlist.forEach(val => {
formdata.append("file", val.raw); formdata.append("file", val.raw);
}); });
this.ziplist.forEach(val => {
formdata.append("file", val.raw);
});
$.ajax({ $.ajax({
url: "/platform/hd/jzghd/sczp/doSubmit", url: "/platform/hd/jzghd/sczp/doSubmit",
type: "post", type: "post",
@@ -788,6 +794,7 @@ layout("/layouts/platform.html"){
this.readytodelfile = []; this.readytodelfile = [];
this.picturelist = []; this.picturelist = [];
this.vadlist = []; this.vadlist = [];
this.ziplist = [];
$.post('/platform/hd/wmhd/findOne', {id: scope.row.id}).then(res => { $.post('/platform/hd/wmhd/findOne', {id: scope.row.id}).then(res => {
if (res.code == 0) { if (res.code == 0) {
@@ -801,6 +808,7 @@ layout("/layouts/platform.html"){
this.picturelist.push({url: APP_DOMAIN + '/file_server/fileStreamPreview?id=' + v.id}) this.picturelist.push({url: APP_DOMAIN + '/file_server/fileStreamPreview?id=' + v.id})
}) })
this.vadlist = res.data.vadlist; this.vadlist = res.data.vadlist;
this.ziplist = res.data.ziplist;
} }
}); });
this.$refs.guava.public() this.$refs.guava.public()
@@ -811,7 +819,8 @@ layout("/layouts/platform.html"){
this.$refs['EditForm'].validate((valid) => { this.$refs['EditForm'].validate((valid) => {
if (valid) { if (valid) {
if (flag && ((this.zplb2Config.isUploadPhoto && this.picturelist.length === 0) || if (flag && ((this.zplb2Config.isUploadPhoto && this.picturelist.length === 0) ||
(this.zplb2Config.isUploadOther && this.vadlist.length === 0))) { (this.zplb2Config.isUploadOther && this.vadlist.length === 0) ||
(this.zplb2Config.isUploadZip && this.ziplist.length === 0))) {
this.$message.warning('请上传您的作品'); this.$message.warning('请上传您的作品');
return; return;
} }
@@ -836,6 +845,11 @@ layout("/layouts/platform.html"){
formdata.append("file", val.raw); formdata.append("file", val.raw);
} }
}); });
this.ziplist.forEach(val => {
if (val.status === 'ready') {
formdata.append("file", val.raw);
}
});
$.ajax({ $.ajax({
url: "/platform/hd/jzghd/sczp/doEdit", url: "/platform/hd/jzghd/sczp/doEdit",
type: "post", type: "post",
@@ -846,6 +860,7 @@ layout("/layouts/platform.html"){
if (res.code == 0) { if (res.code == 0) {
this.picturelist = []; this.picturelist = [];
this.vadlist = []; this.vadlist = [];
this.ziplist = [];
this.doSearch(); this.doSearch();
this.$refs.guava.index() this.$refs.guava.index()
this.$message.success('上传成功'); this.$message.success('上传成功');