|
@@ -5,16 +5,13 @@
|
|
|
<el-card style="margin-bottom: 20px">
|
|
|
<div class="top-card-box">
|
|
|
<div class="tabs-box">
|
|
|
- <span
|
|
|
- v-for="(item, index) in listTitle"
|
|
|
- :key="item.ChartPermissionId"
|
|
|
- @click="tabsBoxBtn(item, index)"
|
|
|
- :class="index == tabsPitchon ? 'pitch' : ''"
|
|
|
- >{{ item.PermissionName }}</span
|
|
|
- >
|
|
|
+ <span v-for="(item, index) in listTitle" :key="item.ChartPermissionId" @click="tabsBoxBtn(item, index)" :class="index == tabsPitchon ? 'pitch' : ''">{{ item.PermissionName }}</span>
|
|
|
</div>
|
|
|
- <div>
|
|
|
- <el-button type="primary" @click="$router.push(!isResearch?'/addActivity':'/addPurchaserActivity')">添加活动</el-button>
|
|
|
+ <div style="display: flex">
|
|
|
+ <el-upload ref="imgUpload" :action="baseApi + '/resource/image/upload'" :show-file-list="false" accept="image/*" :on-success="handleUploadPosterSuccess">
|
|
|
+ <el-button type="primary">识图建会</el-button>
|
|
|
+ </el-upload>
|
|
|
+ <el-button style="margin-left: 20px" type="primary" @click="$router.push('/addActivity')">添加活动</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
|
@@ -23,47 +20,18 @@
|
|
|
<!-- 选择部分 -->
|
|
|
<div class="screen-box">
|
|
|
<div>
|
|
|
- <el-select placeholder="行业" clearable v-model="industry" @change="conditionChange" style="margin-bottom: 20px"
|
|
|
- v-if="!isResearch">
|
|
|
- <el-option
|
|
|
- v-for="item in chartPermissionList"
|
|
|
- :label="item.PermissionName"
|
|
|
- :key="item.ChartPermissionId"
|
|
|
- :value="item.ChartPermissionId"
|
|
|
- ></el-option>
|
|
|
+ <el-select placeholder="行业" clearable v-model="industry" @change="conditionChange" style="margin-bottom: 20px">
|
|
|
+ <el-option v-for="item in chartPermissionList" :label="item.PermissionName" :key="item.ChartPermissionId" :value="item.ChartPermissionId"></el-option>
|
|
|
</el-select>
|
|
|
<el-select placeholder="活动类型" clearable v-model="cactivityTypeVal" @change="conditionChange">
|
|
|
- <el-option
|
|
|
- v-for="item in cactivityTypeList"
|
|
|
- :label="item.ActivityTypeName"
|
|
|
- :key="item.ActivityTypeId"
|
|
|
- :value="item.ActivityTypeId"
|
|
|
- ></el-option>
|
|
|
+ <el-option v-for="item in cactivityTypeList" :label="item.ActivityTypeName" :key="item.ActivityTypeId" :value="item.ActivityTypeId"></el-option>
|
|
|
</el-select>
|
|
|
- <el-date-picker
|
|
|
- v-model="publishDate"
|
|
|
- type="date"
|
|
|
- placeholder="发布时间"
|
|
|
- format="yyyy 年 MM 月 dd 日"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- @change="conditionChange"
|
|
|
- >
|
|
|
- </el-date-picker>
|
|
|
- <date-picker
|
|
|
- style="margin-bottom: 20px"
|
|
|
- v-model="issueTime"
|
|
|
- type="date"
|
|
|
- range
|
|
|
- placeholder="活动时间"
|
|
|
- value-type="format"
|
|
|
- @change="conditionChange"
|
|
|
- >
|
|
|
- </date-picker>
|
|
|
+ <el-date-picker v-model="publishDate" type="date" placeholder="发布时间" format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" @change="conditionChange"> </el-date-picker>
|
|
|
+ <date-picker style="margin-bottom: 20px" v-model="issueTime" type="date" range placeholder="活动时间" value-type="format" @change="conditionChange"> </date-picker>
|
|
|
<el-select placeholder="发布状态" clearable v-model="status" @change="conditionChange" style="margin-bottom: 20px">
|
|
|
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
- <el-input v-model="activityLabel" @input="titleInput" placeholder="请输入活动标签" clearable
|
|
|
- style="display: inline-block; width: 220px;margin-bottom: 20px">
|
|
|
+ <el-input v-model="activityLabel" @input="titleInput" placeholder="请输入活动标签" clearable style="display: inline-block; width: 220px; margin-bottom: 20px">
|
|
|
<i slot="prefix" class="el-input__icon el-icon-search"></i>
|
|
|
</el-input>
|
|
|
</div>
|
|
@@ -102,7 +70,7 @@
|
|
|
<span class="editsty" @click="editBtn(row.ActivityId, row.PublishStatus)">编辑</span>
|
|
|
|
|
|
<span class="deletesty" v-if="row.PublishStatus == 0 && tabsPitchon == 0" @click="operationBtn(row.ActivityId, '删除')">删除</span>
|
|
|
- <span class="editsty" v-if="row.IsShowSigninButton " @click="handleDownLoadImg(row)">下载签到码</span>
|
|
|
+ <span class="editsty" v-if="row.IsShowSigninButton" @click="handleDownLoadImg(row)">下载签到码</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -112,22 +80,27 @@
|
|
|
</el-col>
|
|
|
</el-card>
|
|
|
<atc-particulars :dialogVisible.sync="dialogVisible" :detailData.sync="detailData" />
|
|
|
+ <imgMeeting :isShowImgMeetingDlg.sync="isShowImgMeetingDlg" :imgMeetingData.sync="imgMeetingData" @childrenImgMeetingHandler="childrenImgMeetingHandler" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import * as OpenCC from "opencc-js";
|
|
|
+// 将繁体中文(香港)转换为简体中文(中国大陆)
|
|
|
+const converter = OpenCC.Converter({ from: "hk", to: "cn" });
|
|
|
import mPage from "@/components/mPage.vue";
|
|
|
import { raiInterface } from "@/api/api.js";
|
|
|
import AtcParticulars from "../components/atcParticulars.vue";
|
|
|
+import imgMeeting from "./components/imgMeeting.vue";
|
|
|
export default {
|
|
|
name: "",
|
|
|
components: { mPage, AtcParticulars },
|
|
|
props: {
|
|
|
- Type:{
|
|
|
- type:String,
|
|
|
- emnu:['hongze','purchaser'], // 弘则,研选
|
|
|
- default:'hongze'
|
|
|
- }
|
|
|
+ Type: {
|
|
|
+ type: String,
|
|
|
+ emnu: ["hongze", "purchaser"], // 弘则,研选
|
|
|
+ default: "hongze",
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -167,6 +140,9 @@ export default {
|
|
|
detailData: {}, //
|
|
|
activityLabel: "",
|
|
|
publishDate: "",
|
|
|
+ baseApi: process.env.API_ROOT,
|
|
|
+ isShowImgMeetingDlg: false,
|
|
|
+ imgMeetingData: [],
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -174,9 +150,9 @@ export default {
|
|
|
return this.status >= 0 && typeof this.status == "number" ? this.status : 2;
|
|
|
},
|
|
|
// 弘则 研选 是否是研选
|
|
|
- isResearch(){
|
|
|
- return this.$route.path.indexOf("purchaser")!=-1?true:false
|
|
|
- }
|
|
|
+ isResearch() {
|
|
|
+ return this.$route.path.indexOf("purchaser") != -1 ? true : false;
|
|
|
+ },
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
@@ -260,7 +236,7 @@ export default {
|
|
|
//编辑
|
|
|
editBtn(id, show) {
|
|
|
this.$router.push({
|
|
|
- path: !this.isResearch?'/editActivity':'/editPurchaserActivity',
|
|
|
+ path: !this.isResearch ? "/editActivity" : "/editPurchaserActivity",
|
|
|
query: {
|
|
|
id: id,
|
|
|
isShow: show,
|
|
@@ -274,7 +250,7 @@ export default {
|
|
|
},
|
|
|
//获取行业
|
|
|
chartPermission() {
|
|
|
- raiInterface.chartPermission({IsHideResearch:!this.isResearch}).then((res) => {
|
|
|
+ raiInterface.chartPermission({ IsHideResearch: !this.isResearch }).then((res) => {
|
|
|
if (res.Ret === 200) {
|
|
|
this.chartPermissionList = res.Data.List;
|
|
|
}
|
|
@@ -282,7 +258,7 @@ export default {
|
|
|
},
|
|
|
//活动类型
|
|
|
activityType() {
|
|
|
- raiInterface.getActivityType({IsResearch:this.isResearch}).then((res) => {
|
|
|
+ raiInterface.getActivityType({ IsResearch: this.isResearch }).then((res) => {
|
|
|
if (res.Ret === 200) {
|
|
|
this.cactivityTypeList = res.Data.List;
|
|
|
}
|
|
@@ -303,7 +279,7 @@ export default {
|
|
|
ActiveState: this.activeStateId,
|
|
|
ActivityLabel: this.activityLabel,
|
|
|
PublishStartDate: this.publishDate,
|
|
|
- IsResearch:this.isResearch
|
|
|
+ IsResearch: this.isResearch,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.Ret !== 200) return;
|
|
@@ -345,6 +321,28 @@ export default {
|
|
|
a.click();
|
|
|
};
|
|
|
},
|
|
|
+ // 上传成功
|
|
|
+ async handleUploadPosterSuccess(res, file) {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ const resImg = await raiInterface.activityImgToText({
|
|
|
+ ImgUrl: res.Data.ResourceUrl,
|
|
|
+ });
|
|
|
+ if (resImg.Ret === 200) {
|
|
|
+ console.log(res, resImg);
|
|
|
+ this.isShowImgMeetingDlg = true;
|
|
|
+ this.imgMeetingData = resImg.Data.List.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ Company: converter(item.Company),
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 点击取消的回调事件
|
|
|
+ childrenImgMeetingHandler() {
|
|
|
+ this.$refs.imgUpload.clearFiles();
|
|
|
+ },
|
|
|
},
|
|
|
/* 页面跳转前记录参数 */
|
|
|
beforeRouteLeave(to, form, next) {
|