Browse Source

Merge branch '7.31' into test

dlt_lingshan_12345
mk 1 year ago
parent
commit
d41785b20d
  1. 17
      src/assets/scss/modules/shequzhili/event-info.scss
  2. 27
      src/views/modules/shequzhili/event/cpts/event-info.vue
  3. 81
      src/views/modules/shequzhili/event/cpts/process-form-complete.vue
  4. 16
      src/views/modules/shequzhili/event/cpts/process-form-contact.vue
  5. 33
      src/views/modules/shequzhili/event/cpts/process-form-process.vue

17
src/assets/scss/modules/shequzhili/event-info.scss

@ -604,5 +604,20 @@
width: 250px; width: 250px;
} }
.event{ .uploadList{
width: 99%;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
>div{
display: flex;
color: #606266;
align-items: center;
justify-content: space-between;
width: 100%;
&:hover{
background-color: #f5f7fa;
}
}
} }

27
src/views/modules/shequzhili/event/cpts/event-info.vue

@ -2,9 +2,9 @@
<div class=""> <div class="">
<div v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'info' || pageTypeCopy == 'assign'|| pageTypeCopy == 'check'" class="g-page"> <div v-if="pageTypeCopy == 'dispose' || pageTypeCopy == 'info' || pageTypeCopy == 'assign'|| pageTypeCopy == 'check'" class="g-page">
<!-- 面包屑放到这里--> <!-- 面包屑放到这里-->
<div class="tabs"> <div class="tabs" @click="handleClose">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<el-button class="diy-button--white" style="height: 20px" @click="handleClose"> <el-button class="diy-button--white" style="height: 20px">
查看详情</el-button> 查看详情</el-button>
</div> </div>
<div :class="['g-total', { 'g-left': projectProcess.length > 0, 'g-left-top40': pageType == 'info' }]" <div :class="['g-total', { 'g-left': projectProcess.length > 0, 'g-left-top40': pageType == 'info' }]"
@ -75,6 +75,10 @@
<div class="detail-field">办结时限</div> <div class="detail-field">办结时限</div>
<div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div> <div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div>
</div> </div>
<div class="detail" v-if="item.examineContent">
<div class="detail-field">备注说明</div>
<div class="detail-value">{{ item.examineContent }}</div>
</div>
<template v-if="item.internalFile && item.internalFile.length > 0" <template v-if="item.internalFile && item.internalFile.length > 0"
v-for="i in item.internalFile"> v-for="i in item.internalFile">
<template v-if="i.type === 'image'"> <template v-if="i.type === 'image'">
@ -123,32 +127,37 @@
<div class="detail-field">办结时限</div> <div class="detail-field">办结时限</div>
<div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div> <div class="detail-value">{{ formTimeLimit(item.timeLimit) }}</div>
</div> </div>
<div class="detail" v-if="item.examineContent">
<div class="detail-field">备注说明</div>
<div class="detail-value">{{ item.examineContent }}</div>
</div>
<template v-if="item.internalFile && item.internalFile.length > 0" <template v-if="item.internalFile && item.internalFile.length > 0"
v-for="i in item.internalFile"> v-for="i in item.internalFile">
<template v-if="i.type === 'image'"> <template v-if="i.attachmentType === 'image'">
<div <div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">图片</span> <span class="u-info-title-2">图片</span>
<img :src="i.url" :key="i.url" <img :src="i.attachmentUrl" :key="i.attachmentUrl"
style="width: 150px; height: 150px; padding-right: 10px" style="width: 150px; height: 150px; padding-right: 10px"
@click="watchImg(i.url)" /> @click="watchImg(i.attachmentUrl)" />
</div> </div>
</template> </template>
<template v-if="i.type === 'voice'"> <template v-if="i.attachmentType === 'voice'">
<div <div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">录音</span> <span class="u-info-title-2">录音</span>
<audio controls> <audio controls>
<source :src="i.url" type="" :key="i.url" /> <source :src="i.attachmentUrl" type="" :key="i.attachmentUrl" />
</audio> </audio>
</div> </div>
</template> </template>
<template v-if="i.type === 'doc'"> <template v-if="i.attachmentType === 'doc'">
<div <div
:class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]"> :class="['m-info-prop', { 'm-info-prop-vis': source === 'visiual' },]">
<span class="u-info-title-2">录音</span> <span class="u-info-title-2">录音</span>
<audio controls> <audio controls>
<source :src="i.url" type="" :key="i.url" /> <source :src="i.attachmentUrl" type="" :key="i.attachmentUrl" />
</audio> </audio>
</div> </div>
</template> </template>

81
src/views/modules/shequzhili/event/cpts/process-form-complete.vue

@ -9,22 +9,37 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="上传录音" label-width="118px" :class="{ 'form-item': source === 'visiual' }"> <el-form-item label="上传录音" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="luyin">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr" accept=".mp3" <el-upload v-if="audioList.length < 3" :headers="$getElUploadHeaders()"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleAudioSuccess" :action="uploadUlr" :data="{ customerId: customerId }" :show-file-list="false"
:on-remove="handleAudioRemove" :before-upload="beforeAudioUpload" :file-list="audioList"> :on-success="handleAudioSuccess" :before-upload="beforeAudioUpload"
<el-button type="primary" :disabled="pageType === 'check'">上传音频<i accept=".mp3" >
class="el-icon-upload el-icon--right"></i></el-button> <el-button type="primary" :disabled="pageType === 'check'">上传录音<i
</el-upload> class="el-icon-upload el-icon--right"></i></el-button>
</el-upload>
<section class="uploadList">
<div v-for="file in audioList" :key="file.attachmentUrl" :file="file"
:style="{cursor:pageType === 'check'? 'no-drop':'pointer'}" >
<span>{{ file.attachmentName }}</span>
<span type="text" @click="handleAudioRemove(file)" class="el-icon-close"> </span>
</div>
</section>
</el-form-item> </el-form-item>
<el-form-item label="上传图片" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="files"> <el-form-item label="上传图片" label-width="118px" :class="{ 'form-item': source === 'visiual' }" prop="luyin">
<el-upload :headers="$getElUploadHeaders()" class="avatar-uploader" :action="uploadUlr" <el-upload v-if="audioList.length < 3" :headers="$getElUploadHeaders()"
accept=".jpg,.png,.jpeg" :action="uploadUlr" :data="{ customerId: customerId }" :show-file-list="false"
:data="{ customerId: customerId }" :show-file-list="true" :on-success="handleImgSuccess" :on-success="handleImgSuccess" :before-upload="beforeImgUpload"
:on-remove="handleImgRemove" :before-upload="beforeImgUpload" :file-list="imgList"> accept=".jpg,.png,.jpeg">
<el-button type="primary" :disabled="pageType === 'check'">上传图片<i <el-button type="primary" :disabled="pageType === 'check'">上传图片<i
class="el-icon-upload el-icon--right"></i></el-button> class="el-icon-upload el-icon--right"></i></el-button>
</el-upload> </el-upload>
<section class="uploadList">
<div v-for="file in imgList" :key="file.attachmentUrl" :file="file"
:style="{cursor:pageType === 'check'? 'no-drop':'pointer'}">
<span>{{ file.attachmentName }}</span>
<span type="text" @click="handleImgRemove(file)" class="el-icon-close"> </span>
</div>
</section>
</el-form-item> </el-form-item>
<el-divider></el-divider> <el-divider></el-divider>
<div class="flex"> <div class="flex">
@ -355,8 +370,8 @@ export default {
this.formData = newVal; this.formData = newVal;
console.log(this.formData); console.log(this.formData);
if(this.formData.internalFile){ if(this.formData.internalFile){
this.imgList = this.formData.internalFile.filter(item=>item.type==='image') this.imgList = this.formData.internalFile.filter(item=>item.attachmentType==='image')
this.audioList = this.formData.internalFile.filter(item=>item.type==='voice') this.audioList = this.formData.internalFile.filter(item=>item.attachmentType==='voice')
} }
} }
}, },
@ -390,11 +405,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.audioList.push({ this.audioList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
console.log(this.formData.files); console.log(this.formData.files);
} else { } else {
@ -403,8 +418,9 @@ export default {
}, },
handleAudioRemove(file) { handleAudioRemove(file) {
if(this.pageType === 'check')return
let index = this.audioList.findIndex( let index = this.audioList.findIndex(
(item) => item.url == file.response.data.url (item) => item.attachmentUrl == file.attachmentUrl
); );
this.audioList.splice(index, 1); this.audioList.splice(index, 1);
console.log(this.audioList); console.log(this.audioList);
@ -422,11 +438,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.imgList.push({ this.imgList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
console.log(this.formData.files); console.log(this.formData.files);
} else { } else {
@ -447,11 +463,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.examineImgList.push({ this.examineImgList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
console.log(this.formData.files); console.log(this.formData.files);
} else { } else {
@ -460,8 +476,9 @@ export default {
}, },
handleImgRemove(file) { handleImgRemove(file) {
let index = this.imgList.findIndex( if(this.pageType === 'check')return
(item) => item.url == file.response.data.url let index = this.audioList.findIndex(
(item) => item.attachmentUrl == file.attachmentUrl
); );
this.imgList.splice(index, 1); this.imgList.splice(index, 1);
console.log(this.imgList); console.log(this.imgList);

16
src/views/modules/shequzhili/event/cpts/process-form-contact.vue

@ -179,11 +179,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.audioList.push({ this.audioList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
@ -209,11 +209,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.imgList.push({ this.imgList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);

33
src/views/modules/shequzhili/event/cpts/process-form-process.vue

@ -195,11 +195,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.imgList.push({ this.imgList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
console.log(this.imgList); console.log(this.imgList);
} else { } else {
@ -226,11 +226,11 @@ export default {
if (res.code === 0 && res.msg === "success") { if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url); console.log("res.data.url", res.data.url);
this.audioList.push({ this.audioList.push({
format: file.name.split(".").pop(), attachmentFormat: file.name.split(".").pop(),
name: file.name, attachmentName: file.name,
size: file.size, size: file.size,
type: file.raw.type, attachmentType: file.raw.type,
url: res.data.url, attachmentUrl: res.data.url,
}); });
console.log(this.audioList); console.log(this.audioList);
} else { } else {
@ -253,22 +253,7 @@ export default {
} }
return isLt1M; return isLt1M;
}, },
handleImgSuccess(res, file, fileList) {
console.log("res.data.url", file);
if (res.code === 0 && res.msg === "success") {
console.log("res.data.url", res.data.url);
this.imgList.push({
format: file.name.split(".").pop(),
name: file.name,
size: file.size,
type: file.raw.type,
url: res.data.url,
});
console.log(this.formData.files);
} else {
this.$message.error(res.msg);
}
},
handleImgRemove(file) { handleImgRemove(file) {
let index = this.formData.files.findIndex( let index = this.formData.files.findIndex(

Loading…
Cancel
Save