|
@@ -2,28 +2,33 @@
|
|
|
<ModalView
|
|
<ModalView
|
|
|
ref="mv"
|
|
ref="mv"
|
|
|
cname="ElDialog"
|
|
cname="ElDialog"
|
|
|
|
|
+ :title="title"
|
|
|
:viewProps="{
|
|
:viewProps="{
|
|
|
- width: '50%',
|
|
|
|
|
|
|
+ width: '45%',
|
|
|
customClass: 'auditModal',
|
|
customClass: 'auditModal',
|
|
|
}"
|
|
}"
|
|
|
|
|
+ @close="close"
|
|
|
>
|
|
>
|
|
|
- <!-- 动态信息展示区域 -->
|
|
|
|
|
<div class="dynamic-info">
|
|
<div class="dynamic-info">
|
|
|
- <div class="dynamic-title">{{ oForm.projectName }}</div>
|
|
|
|
|
|
|
+ <div class="dynamic-title">{{ auditForm.title }}</div>
|
|
|
<div class="dynamic-content">
|
|
<div class="dynamic-content">
|
|
|
- {{ oForm.projectContent || '暂无内容' }}
|
|
|
|
|
|
|
+ {{ auditForm.content }}
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 图片展示区域 -->
|
|
|
|
|
- <div class="media-section" v-if="oForm.cImgList">
|
|
|
|
|
- <ImageUpload v-model="oForm.cImgList" :limit="9" :readonly="true" />
|
|
|
|
|
|
|
+ <!-- 图片 -->
|
|
|
|
|
+ <div class="media-section" v-if="auditForm.mediaType === 1">
|
|
|
|
|
+ <ImageUpload
|
|
|
|
|
+ v-model="auditForm.mediaUrls"
|
|
|
|
|
+ :limit="9"
|
|
|
|
|
+ :readonly="true"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- 视频展示区域 -->
|
|
|
|
|
- <div class="media-section" v-if="oForm.cVideoUrl">
|
|
|
|
|
|
|
+ <!-- 视频 -->
|
|
|
|
|
+ <div class="media-section" v-if="auditForm.mediaType === 2">
|
|
|
<div class="video-container">
|
|
<div class="video-container">
|
|
|
<video
|
|
<video
|
|
|
class="video-preview"
|
|
class="video-preview"
|
|
|
- v-if="oForm.cVideoUrl"
|
|
|
|
|
- :src="getVideoUrl(oForm.cVideoUrl)"
|
|
|
|
|
|
|
+ v-if="auditForm.videoUrl"
|
|
|
|
|
+ :src="getVideoUrl(auditForm.videoUrl)"
|
|
|
controls
|
|
controls
|
|
|
></video>
|
|
></video>
|
|
|
</div>
|
|
</div>
|
|
@@ -33,32 +38,41 @@
|
|
|
<!-- 审核表单 -->
|
|
<!-- 审核表单 -->
|
|
|
<el-form ref="uForm" :model="form" :rules="rules" label-width="80px">
|
|
<el-form ref="uForm" :model="form" :rules="rules" label-width="80px">
|
|
|
<el-form-item label="审核状态" prop="auditStatus">
|
|
<el-form-item label="审核状态" prop="auditStatus">
|
|
|
- <el-radio-group v-model="form.auditStatus">
|
|
|
|
|
- <el-radio :label="1">通过</el-radio>
|
|
|
|
|
- <el-radio :label="2">拒绝</el-radio>
|
|
|
|
|
|
|
+ <el-radio-group
|
|
|
|
|
+ v-model="form.auditStatus"
|
|
|
|
|
+ :disabled="params.status !== 1"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-radio :label="2">通过</el-radio>
|
|
|
|
|
+ <el-radio :label="3">拒绝</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="审核备注" prop="auditReason">
|
|
|
|
|
|
|
+ <el-form-item label="审核备注" prop="rejectReason">
|
|
|
<el-input
|
|
<el-input
|
|
|
type="textarea"
|
|
type="textarea"
|
|
|
placeholder="请输入审核备注/拒绝理由,审核拒绝时必填"
|
|
placeholder="请输入审核备注/拒绝理由,审核拒绝时必填"
|
|
|
- v-model="form.auditReason"
|
|
|
|
|
|
|
+ v-model="form.rejectReason"
|
|
|
maxlength="50"
|
|
maxlength="50"
|
|
|
show-word-limit
|
|
show-word-limit
|
|
|
|
|
+ :disabled="params.status !== 1"
|
|
|
>
|
|
>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm('uForm')">确 定</el-button>
|
|
|
|
|
- <el-button @click="resetForm('uForm')">取 消</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="params.status === 1"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="submitForm('uForm')"
|
|
|
|
|
+ >确 定</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button @click="close">取 消</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</ModalView>
|
|
</ModalView>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
import ModalView from '@/components/ZModalView/index.vue'
|
|
import ModalView from '@/components/ZModalView/index.vue'
|
|
|
-import { auditComment, batchAuditComment } from '@/api/system/comment'
|
|
|
|
|
|
|
+import { getDynamicDetail, auditDynamic } from '@/api/system/dynamic'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -68,22 +82,16 @@ export default {
|
|
|
return {
|
|
return {
|
|
|
title: '审核动态',
|
|
title: '审核动态',
|
|
|
form: {},
|
|
form: {},
|
|
|
- oForm: {
|
|
|
|
|
- id: 2323,
|
|
|
|
|
- projectName: '测试项目',
|
|
|
|
|
- projectContent: '这是一个测试项目',
|
|
|
|
|
- cImgList: [
|
|
|
|
|
- '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
|
|
|
|
|
- '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
|
|
|
|
|
- '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
|
|
|
|
|
- '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
|
|
|
|
|
- '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
|
|
|
|
|
- '/profile/upload/2025/04/29/66d42a234b578_20250429085118A009.jpg',
|
|
|
|
|
- ],
|
|
|
|
|
- cVideoUrl:
|
|
|
|
|
- 'https://test.baoxianzhanggui.com/nightFragrance/profile/upload/2025/05/23/WeChat_20250523101737_20250523151440A001.mp4',
|
|
|
|
|
|
|
+ params: {},
|
|
|
|
|
+ auditForm: {
|
|
|
|
|
+ title: '',
|
|
|
|
|
+ content: '',
|
|
|
|
|
+ mediaType: 1,
|
|
|
|
|
+ mediaUrls: [],
|
|
|
|
|
+ videoUrl: '',
|
|
|
|
|
+ auditStatus: 0,
|
|
|
|
|
+ rejectReason: '',
|
|
|
},
|
|
},
|
|
|
- loading: false,
|
|
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -92,9 +100,9 @@ export default {
|
|
|
auditStatus: [
|
|
auditStatus: [
|
|
|
{ required: true, message: '请选择审核状态', trigger: 'change' },
|
|
{ required: true, message: '请选择审核状态', trigger: 'change' },
|
|
|
],
|
|
],
|
|
|
- auditReason: [
|
|
|
|
|
|
|
+ rejectReason: [
|
|
|
{
|
|
{
|
|
|
- required: this.form.auditStatus === 2,
|
|
|
|
|
|
|
+ required: this.form.auditStatus === 3,
|
|
|
message: '请输入拒绝理由',
|
|
message: '请输入拒绝理由',
|
|
|
trigger: 'change',
|
|
trigger: 'change',
|
|
|
},
|
|
},
|
|
@@ -103,31 +111,36 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- /** 辅助函数:处理视频URL回显(如果是相对路径则加上base_api) */
|
|
|
|
|
- getVideoUrl(url) {
|
|
|
|
|
- if (!url) return ''
|
|
|
|
|
- if (url.indexOf('http') === 0) return url
|
|
|
|
|
- return process.env.VUE_APP_BASE_API + url
|
|
|
|
|
|
|
+ getDetails(id) {
|
|
|
|
|
+ getDynamicDetail(id).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.auditForm = res.data
|
|
|
|
|
+ // 回显审核状态和原因(1待审核)
|
|
|
|
|
+ if (res.data.auditStatus !== 1) {
|
|
|
|
|
+ this.form.auditStatus = res.data.auditStatus
|
|
|
|
|
+ this.form.rejectReason = res.data.rejectReason
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ if (this.$refs.uForm) {
|
|
|
|
|
+ this.$refs.uForm.clearValidate()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
submitForm(formName) {
|
|
submitForm(formName) {
|
|
|
this.$refs[formName].validate(valid => {
|
|
this.$refs[formName].validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- console.log(this.form)
|
|
|
|
|
- let api = auditComment,
|
|
|
|
|
- params = {
|
|
|
|
|
- ...this.form,
|
|
|
|
|
- commentId: this.oForm.id,
|
|
|
|
|
- }
|
|
|
|
|
- if (Array.isArray(this.oForm.id)) {
|
|
|
|
|
- api = batchAuditComment
|
|
|
|
|
- params = {
|
|
|
|
|
- ...this.form,
|
|
|
|
|
- commentIds: this.oForm.id,
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ ...this.form,
|
|
|
|
|
+ momentId: this.params.momentId,
|
|
|
}
|
|
}
|
|
|
- api(params).then(res => {
|
|
|
|
|
- this.$modal.msgSuccess(res.msg)
|
|
|
|
|
- this.resetForm('uForm', true)
|
|
|
|
|
|
|
+ auditDynamic(params).then(res => {
|
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
|
+ this.$modal.msgSuccess(res.msg)
|
|
|
|
|
+ this.$emit('refreshList')
|
|
|
|
|
+ this.close()
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
console.log('error submit!!')
|
|
console.log('error submit!!')
|
|
@@ -140,16 +153,21 @@ export default {
|
|
|
this.close(f)
|
|
this.close(f)
|
|
|
},
|
|
},
|
|
|
open(e) {
|
|
open(e) {
|
|
|
- // if (e) {
|
|
|
|
|
- // this.oForm = e
|
|
|
|
|
- // }
|
|
|
|
|
- this.$refs.mv.open(this.title)
|
|
|
|
|
|
|
+ if (e) this.params = { ...e }
|
|
|
|
|
+ this.form = {}
|
|
|
|
|
+ this.getDetails(e.momentId)
|
|
|
|
|
+ this.$refs.mv.open(this.params.status === 1 ? '审核动态' : '查看详情')
|
|
|
},
|
|
},
|
|
|
- // 关闭弹窗
|
|
|
|
|
- close(f = false) {
|
|
|
|
|
- if (f) this.$emit('close')
|
|
|
|
|
|
|
+ close() {
|
|
|
|
|
+ this.form = {}
|
|
|
this.$refs.mv.close()
|
|
this.$refs.mv.close()
|
|
|
},
|
|
},
|
|
|
|
|
+ /** 辅助函数:处理视频URL回显(如果是相对路径则加上base_api) */
|
|
|
|
|
+ getVideoUrl(url) {
|
|
|
|
|
+ if (!url) return ''
|
|
|
|
|
+ if (url.indexOf('http') === 0) return url
|
|
|
|
|
+ return process.env.VUE_APP_BASE_API + url
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -167,14 +185,16 @@ export default {
|
|
|
border-bottom: 1px solid #e5e5e5;
|
|
border-bottom: 1px solid #e5e5e5;
|
|
|
|
|
|
|
|
.dynamic-title {
|
|
.dynamic-title {
|
|
|
- font-size: 18px;
|
|
|
|
|
|
|
+ font-size: 22px;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
|
|
|
+ padding-bottom: 5px;
|
|
|
color: #333;
|
|
color: #333;
|
|
|
|
|
+ border-bottom: 1px solid #e5e5e5;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dynamic-content {
|
|
.dynamic-content {
|
|
|
- font-size: 14px;
|
|
|
|
|
|
|
+ font-size: 16px;
|
|
|
line-height: 1.5;
|
|
line-height: 1.5;
|
|
|
color: #666;
|
|
color: #666;
|
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|