Commit 967f4ad0 authored by guoyou's avatar guoyou

峰会,公众号分公司

parent de3398b3
module.exports = {
NODE_ENV: '"development"',
BASE_API:'"https://xxtest.upyuns.com"',//'"https://dev.dfangche.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
BASE_API:'"https://dev.dfangche.com"',//'"https://xxtest.upyuns.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
APP_ORIGIN: '"https://wallstreetcn.com"'
}
......@@ -2,7 +2,7 @@ import fetch from 'utils/fetch';
export function one(activityId) {
return fetch({
url: '/api/summit/activityShow/one/'+activityId,
url: '/api/summit/activityShow/app/unauth/one/'+activityId,
method: 'get'
})
}
......
......@@ -461,6 +461,7 @@
this.page = 1;
this.list = [];
this.nomore = false;
this.loading = false;
this.loadMore();
},
/**
......@@ -510,6 +511,7 @@
if(res.data.length< this.listQuery.limit && this.list.length>0){
//已加载全部
this.nomore = true;
this.loading = false;
}
}
this.list = [...this.list, ...allList];
......
......@@ -78,14 +78,13 @@
<el-button
size="small"
class="el-button el-button--text el-button--small"
v-if
@click="enrollData(scope.row)"
>报名信息</el-button>
<el-button
<!-- <el-button
size="small"
class="el-button el-button--text el-button--small"
@click="applyPage(scope.row)"
>报名页面</el-button>
>报名页面</el-button> -->
<el-button
class="el-button el-button--text el-button--small"
size="small"
......@@ -94,7 +93,6 @@
<el-button
size="small"
class="el-button el-button--text el-button--small"
v-if
@click="review(scope.row)"
>回顾页面</el-button>
<el-button
......@@ -136,7 +134,7 @@
v-on:reviewDialogEvent="reviewDialogEvent"
/>
<applyPage :applyInfo='applyInfo'></applyPage>
<!-- <applyPage :applyInfo='applyInfo'></applyPage> -->
</div>
</template>
<script>
......@@ -146,7 +144,7 @@ import { page, update } from "src/api/summit/activity";
import summitPopup from "src/views/summit/model/summitPopup";
import enrollDataPopup from "src/views/summit/model/enrollDataPopup";
import reviewPopup from "src/views/summit/model/reviewPopup";
import applyPage from "src/views/summit/model/applyPage";
// import applyPage from "src/views/summit/model/applyPage";
import { getToken } from "src/utils/auth";
......@@ -156,7 +154,7 @@ export default {
summitPopup,
enrollDataPopup,
reviewPopup,
applyPage
// applyPage
},
data() {
return {
......@@ -210,9 +208,9 @@ export default {
},
methods: {
//报名页面
applyPage(){
this.applyInfo.dialogVisible = true;
},
// applyPage(){
// this.applyInfo.dialogVisible = true;
// },
getList() {
this.listLoading = true;
page(this.query).then(res => {
......
......@@ -37,11 +37,12 @@
<el-col>
<el-form-item label="峰会图片:">
<el-upload
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:action="BASE_API+'/api/universal/file/app/unauth/pictureZip'"
list-type="picture-card"
:file-list="list"
:on-success="handlePictureCardPreview"
:on-remove="handleRemove"
:before-upload="beforeAvatarUpload"
>
<i class="el-icon-plus"></i>
</el-upload>
......@@ -53,11 +54,13 @@
<el-col>
<el-form-item label="峰会视频:">
<el-upload
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:action="BASE_API+'/api/universal/file/app/unauth/uploadVideo'"
list-type="picture-card"
:headers="getHeaderWithToken"
:on-preview="handlePreview"
:on-remove="handleRemove"
:before-upload="videoUpload"
:on-success="vidioSuccess"
>
<i class="el-icon-plus"></i>
</el-upload>
......@@ -76,7 +79,7 @@
<el-col>
<el-form-item>
<el-button class="button" @click="cancelHandel">取 消</el-button>
<el-button class="button" type="primary" @click="cre">确 定</el-button>
<!-- <el-button class="button" type="primary" @click="cre">确 定</el-button> -->
</el-form-item>
</el-col>
</el-row>
......@@ -88,17 +91,17 @@
</template>
<script>
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import { getToken } from "src/utils/auth";
import { mapGetters } from "vuex";
import { one, save } from "src/api/summit/activityShow";
import ElRow from 'element-ui/packages/row/src/row'
import ElInput from '../../../../node_modules/element-ui/packages/input/src/input.vue'
import ElCol from 'element-ui/packages/col/src/col'
import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
import { getToken } from 'src/utils/auth'
import { mapGetters } from 'vuex'
import { one, save } from 'src/api/summit/activityShow'
export default {
props: ["reviewRow"],
name: "reviewPopup",
props: ['reviewRow'],
name: 'reviewPopup',
components: {
ElFormItem,
ElCol,
......@@ -123,102 +126,135 @@ export default {
videoPath: undefined,
picturePath: undefined
}
};
}
},
watch: {
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit("reviewDialogEvent", this.result);
this.$emit('reviewDialogEvent', this.result)
}
}
},
computed: {
...mapGetters(["elements"]),
...mapGetters(['elements']),
getHeaderWithToken() {
return { Authorization: getToken() };
return { Authorization: getToken() }
}
},
watch: {
dialogVisible(newValue, oldValue) {
if (!newValue) {
this.$emit("summitDialogEvent", this.result);
this.$emit('summitDialogEvent', this.result)
}
}
},
mounted() {
this.getOrderInfo();
this.getOrderInfo()
},
methods: {
vidioSuccess(res) {
console.log(res)
this.$notify({
title: '成功',
message: res.message,
type: 'success',
duration: 2000
})
},
beforeAvatarUpload(file) {
const zip = file.type === 'application/zip'
if (!zip) {
this.$message.error('上传头像图片只能是 zip 格式!')
}
return zip
},
videoUpload(file) {
console.log(file.type)
const isJPG = file.type === 'video/mp4'
if (!isJPG) {
this.$message.error('上传头像图片只能是 mp4 格式!')
}
return isJPG
},
getOrderInfo() {
console.log(this.reviewRow.id)
one(this.reviewRow.id).then(res => {
this.form = res.data;
this.dialogVisible = true;
this.imgDialogVisible = true;
});
this.form = res.data
this.dialogVisible = true
this.imgDialogVisible = true
})
},
cre() {
console.log(this.form.picturePath);
console.log(this.form.picturePath)
save(this.form).then(res => {
this.responseResult(res);
});
this.responseResult(res)
})
},
responseResult(res) {
if (res.status === 200) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
})
this.setSummitDialogEvent(true);
this.setSummitDialogEvent(true)
} else {
this.$notify({
title: "失败",
message: "操作失败!",
type: "error",
title: '失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
})
}
},
/**
* 弹框-取消
* */
cancelHandel() {
this.setSummitDialogEvent(false);
this.setSummitDialogEvent(false)
},
setSummitDialogEvent(e) {
this.cleanForm();
this.result = e;
this.dialogVisible = false;
this.cleanForm()
this.result = e
this.dialogVisible = false
},
/**
* 封面图上传
* **/
handleAvatarSuccess(res, file) {
this.percent = 0;
this.imgFlag = false;
this.form.banner = res.data;
this.percent = 0
this.imgFlag = false
this.form.banner = res.data
},
/**
* 封面图上传进度
* */
uploadProcess(event, file, fileList) {
this.imgFlag = true;
this.percent = Math.floor(event.percent);
this.imgFlag = true
this.percent = Math.floor(event.percent)
},
handlePreview(file) {
this.form.videoPath = file.data;
this.imgDialogVisible = true;
this.form.videoPath = file.data
this.imgDialogVisible = true
},
handleRemove(file, fileList) {
// console.log(file)
console.log(file, fileList);
console.log(file, fileList)
},
handlePictureCardPreview(res, file) {
this.list.push({ url: res.data });
this.$notify({
title: '成功',
message: res.message,
type: 'success',
duration: 2000
})
this.list.push({ url: res.data })
// this.imgDialogVisible = true;
},
cleanForm() {
......@@ -229,10 +265,10 @@ export default {
banner: undefined,
videoPath: undefined,
picturePath: undefined
};
}
}
};
}
}
</script>
<style>
.label-text {
......
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" class="order-details">
<div>
<el-form :model="form" ref="form" label-width="120px">
<!-- <el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-width="100px" class="demo-ruleForm"> -->
<el-form :model="form" ref="form" :rules="rules" label-width="120px">
<div>
<p style="padding:20px 0;border-bottom:1px solid #d9d9d9">基础信息</p>
<div class="steLine">
......@@ -53,12 +54,7 @@
:editable="true"
placeholder="开始时间"
></el-date-picker>-
<el-date-picker
v-model="form.endTime"
type="datetime"
:editable="true"
placeholder="选择日期"
></el-date-picker>
<el-date-picker v-model="form.endTime" type="datetime" :editable="true" placeholder="选择日期"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
......@@ -76,20 +72,10 @@
</el-form-item>
</el-col>
<el-form-item style="display:inline-block;margin-left:-120px">
<el-input
class="content"
v-model="form.longitude"
placeholder="经度"
style="width:100px"
></el-input>
<el-input class="content" v-model="form.longitude" placeholder="经度" style="width:100px"></el-input>
</el-form-item>
<el-form-item style="display:inline-block;margin-left:-120px">
<el-input
class="content"
v-model="form.latitude"
placeholder="纬度"
style="width:100px"
></el-input>
<el-input class="content" v-model="form.latitude" placeholder="纬度" style="width:100px"></el-input>
</el-form-item>
<!-- <el-col :span="6" class="content">
<el-form-item>
......@@ -141,7 +127,7 @@
<el-form-item label="诚邀莅临:" prop="name">
<UE
:editorId="activeNameShare"
:defaultMsg="form.share"
:defaultMsg="form.actDesc "
:config="config"
ref="ue"
@ready="editorReadyEventShare"
......@@ -150,7 +136,7 @@
<el-form-item label="公司简章:" prop="name">
<UE
:editorId="activeNameFirm"
:defaultMsg="form.contentFirm"
:defaultMsg="form.companyDesc"
:config="config"
ref="ue"
@ready="editorReadyEventFirm"
......@@ -160,6 +146,22 @@
</el-row>
<el-row>
<el-col>
<el-form-item label="房车介绍:">
<el-upload
class="upload-demo"
:headers="getHeaderWithToken"
:action="BASE_API+'/api/universal/file/app/unauth/admin/upload'"
:on-remove="handleRemove"
:file-list="fileList2"
:on-success="handleBannerSuccess"
list-type="picture"
>
<div slot="tip" class="el-upload__tip">
<span style="color: red;">建议尺寸:1080*644px</span>
</div>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
<el-form-item label="峰会流程:">
<el-row class="height" v-for="(item, index) in processJson" :key="index">
<el-col :span="6">
......@@ -192,29 +194,33 @@
</el-row>
</div>
</div>
</el-form>
</div>
<div slot="footer" class="dialog-footer1">
<el-row>
<el-col>
<el-button class="button" @click="cancelHandel">取 消</el-button>
<el-button class="button" type="primary" v-if="titleNme=='创建峰会'" @click="create()">确 定</el-button>
<el-button class="button" type="primary" v-if="titleNme=='创建峰会'" @click="create('form')">确 定</el-button>
<el-button class="button" type="primary" v-if="titleNme=='编辑峰会'" @click="update1()">确 定</el-button>
</el-col>
</el-row>
</el-form>
</div>
<!-- <div class="modal_modal" v-show="resetCarVisible"></div>-->
</el-dialog>
</template>
<script>
import ElRow from "element-ui/packages/row/src/row";
import ElInput from "../../../../node_modules/element-ui/packages/input/src/input.vue";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../../node_modules/element-ui/packages/form/src/form-item.vue";
import { getOne, update, add } from "src/api/summit/activity";
import { getToken } from "src/utils/auth";
import { mapGetters } from "vuex";
import UE from "../../modal/Ueditor"; //百度ue富文本
import ElRow from 'element-ui/packages/row/src/row'
import ElInput from '../../../../node_modules/element-ui/packages/input/src/input.vue'
import ElCol from 'element-ui/packages/col/src/col'
import ElFormItem from '../../../../node_modules/element-ui/packages/form/src/form-item.vue'
import { getOne, update, add } from 'src/api/summit/activity'
import { getToken } from 'src/utils/auth'
import { mapGetters } from 'vuex'
import UE from '../../modal/Ueditor' // 百度ue富文本
import { formatDate } from 'utils/dateFormattor'
export default {
props: ["popupShow", "popupRow", "titleNme"],
name: "summitPopup",
props: ['popupShow', 'popupRow', 'titleNme'],
name: 'summitPopup',
components: {
ElFormItem,
ElCol,
......@@ -224,18 +230,22 @@ export default {
},
data() {
return {
fileList2: [],
config: {
initialFrameWidth: null,
initialFrameHeight: 350
},
dialogVisible: false,
title: "",
title: '',
BASE_API: process.env.BASE_API,
percent: 0, //上传进度
percent: 0, // 上传进度
percents: 0, // 上传进度
imgFlag: false,
activeName: "first",
activeNameShare: "second",
activeNameFirm: "three",
imgFlags: false,
activeName: '',
activeNameShare: '',
activeNameFirm: '',
rules: {},
form: {
title: undefined,
banner: undefined,
......@@ -245,135 +255,188 @@ export default {
address: undefined,
longitude: undefined,
latitude: undefined,
state: "默认",
state: '默认',
rid: undefined,
content: "",
share: "",
contentFirm: ""
content: '', // 峰会主题
contentFirm: '',
actDesc: '', // 诚邀莅临
companyDesc: '', // 公司简章
vehicleImgs: [] // 房车介绍
},
result: false,
processJson: [{ time: undefined, content: "" }]
};
processJson: []
}
},
mounted() {
this.cleanForm();
this.getOrderInfo();
this.cleanForm()
this.getOrderInfo()
},
computed: {
...mapGetters(["elements"]),
...mapGetters(['elements']),
getHeaderWithToken() {
return { Authorization: getToken() };
return { Authorization: getToken() }
}
},
watch: {
dialogVisible(newValue, oldValue) {
dialogVisible(newValue) {
if (!newValue) {
this.$emit("summitDialogEvent", this.result);
this.$emit('summitDialogEvent', this.result)
}
}
},
methods: {
handleBannerSuccess(res, file) {
this.fileList2.push({ url: res.data })
this.form.vehicleImgs = this.fileList2
},
handleRemove() {},
getOrderInfo() {
this.title = this.titleNme;
if (this.title === "编辑峰会") {
this.title = this.titleNme
if (this.title === '编辑峰会') {
this.$nextTick(() => {
this.dialogVisible = true
this.activeName = 'first'
this.activeNameShare = 'second'
this.activeNameFirm = 'three'
})
getOne(this.popupRow.id).then(res => {
res.data.state = this.getState(res.data.status);
res.data.bmCloseTime = res.data.bmCloseTime;
this.form = res.data;
res.data.state = this.getState(res.data.status)
this.form = res.data
this.form.bmCloseTime = Number(res.data.bmCloseTime)
let introduce = this.form.vehicleImgs.split(',');
introduce.forEach(element => {
this.fileList2.push({name:'峰会介绍',url:element})
});
if (res.data.processJson) {
this.processJson = JSON.parse(res.data.processJson);
this.processJson = JSON.parse(res.data.processJson)
}
this.dialogVisible = true;
});
})
}
if (this.title === "创建峰会") {
this.dialogVisible = true;
if (this.title === '创建峰会') {
this.dialogVisible = true
this.activeName = 'first'
this.activeNameShare = 'second'
this.activeNameFirm = 'three'
}
},
editorReadyEvent(instance) {
let t = this;
instance.addListener("contentChange", () => {
if (t.activeName == "first") {
t.from.content = instance.getContent();
const t = this
instance.addListener('contentChange', () => {
console.log(t.activeName)
if (t.activeName === 'first') {
t.form.content = instance.getContent()
}
});
})
},
editorReadyEventShare(instance) {
let t = this;
instance.addListener("contentChange", () => {
if (t.activeNameShare == "second") {
t.from.share = instance.getContent();
const t = this
instance.addListener('contentChange', () => {
if (t.activeNameShare === 'second') {
t.form.actDesc = instance.getContent()
}
});
})
},
editorReadyEventFirm(instance) {
let t = this;
instance.addListener("contentChange", () => {
if (t.activeNameFirm == "three") {
t.from.contentFirm = instance.getContent();
const t = this
instance.addListener('contentChange', () => {
if (t.activeNameFirm == 'three') {
t.form.companyDesc = instance.getContent()
}
});
})
},
/**
* 封面图上传进度
* */
uploadProcess(event, file, fileList) {
this.imgFlag = true;
this.percent = Math.floor(event.percent);
this.imgFlag = true
this.percent = Math.floor(event.percent)
},
/**
* 封面图上传
* **/
handleAvatarSuccess(res, file) {
this.percent = 0;
this.imgFlag = false;
this.form.banner = res.data;
this.percent = 0
this.imgFlag = false
this.form.banner = res.data
},
getState(status) {
if (this.$utils.isInteger(status)) {
if (status == 0) {
return "默认";
return '默认'
} else {
return "自定义";
return '自定义'
}
}
return "";
return ''
},
setSummitDialogEvent(e) {
this.cleanForm();
this.result = e;
this.dialogVisible = false;
this.cleanForm()
this.result = e
this.dialogVisible = false
},
addTag() {
let t = {
const t = {
time: undefined,
content: ""
};
this.processJson.push(t);
content: ''
}
this.processJson.push(t)
},
/**
* 保存修改
*
* */
update1() {
this.dataProcessing();
this.dataProcessing()
update(this.form).then(res => {
this.responseResult(res);
});
this.responseResult(res)
})
},
create() {
this.dataProcessing();
create(formName) {
if (
!this.form.title ||
!this.form.startTime ||
!this.form.endTime
) {
this.$notify({
title: '失败',
message: '必填项不能为空',
type: 'error',
duration: 2000
})
return false
} else {
this.form.endTime = this.form.endTime.getTime()
this.form.startTime = this.form.startTime.getTime()
this.form.bmCloseTime = this.form.bmCloseTime.getTime()
let pic = []
this.form.vehicleImgs.forEach(element => {
pic.push(element.url)
})
this.form.vehicleImgs = pic.join(',')
let demo = []
this.processJson.forEach(element => {
demo.push({
time:
formatDate(element.time, 'yyyy-MM-dd hh') +
':00:00',
content: element.content
})
})
this.form.processJson = demo
add(this.form).then(res => {
this.responseResult(res);
});
this.responseResult(res)
})
this.dataProcessing()
}
},
dataProcessing() {
if (this.form.state === "默认") {
this.form.status = 0;
if (this.form.state === '默认') {
this.form.status = 0
}
this.form.processJson = JSON.stringify(this.processJson);
this.form.processJson = JSON.stringify(this.processJson)
},
/**
* 请求结果判断
......@@ -381,33 +444,33 @@ export default {
responseResult(res) {
if (res.status === 200) {
this.$notify({
title: "成功",
message: "操作成功",
type: "success",
title: '成功',
message: '操作成功',
type: 'success',
duration: 2000
});
})
this.setSummitDialogEvent(true);
this.setSummitDialogEvent(true)
} else {
this.$notify({
title: "失败",
message: "操作失败!",
type: "error",
title: '失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
})
}
},
/**
* 删除时间
* */
deleteItem(obj, index) {
this.processJson.splice(index, 1);
this.processJson.splice(index, 1)
},
/**
* 弹框-取消
* */
cancelHandel() {
this.setSummitDialogEvent(false);
this.setSummitDialogEvent(false)
},
cleanForm() {
......@@ -420,12 +483,17 @@ export default {
address: undefined,
longitude: undefined,
latitude: undefined,
state: "默认",
rid: undefined
};
state: '默认',
rid: undefined,
content: '', // 峰会主题
contentFirm: '',
actDesc: '', // 诚邀莅临
companyDesc: '', // 公司简章
vehicleImgs: [] // 房车介绍
}
}
};
}
}
</script>
<style>
.label-text {
......
......@@ -48,7 +48,7 @@
<el-row>
<el-col :span="8">
<el-form-item label="发布人" prop="publisher">
<el-input v-model="form.publisher" type="text" placeholder="请输入发布人"></el-input>
<el-input v-model="form.publisher" type="text"placeholder="请输入发布人"></el-input>
</el-form-item>
</el-col>
</el-row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment