|
@@ -105,13 +105,7 @@
|
|
|
plain
|
|
|
icon="el-icon-document-add"
|
|
|
size="mini"
|
|
|
- @click="
|
|
|
- openAllocation = true;
|
|
|
- edit = false;
|
|
|
- ids = null;
|
|
|
- confirmLoading = false;
|
|
|
- formBroadcast = {};
|
|
|
- "
|
|
|
+ @click="addNew"
|
|
|
>新增直播</el-button
|
|
|
>
|
|
|
</el-col>
|
|
@@ -147,24 +141,47 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操盘手" align="center" prop="trader">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="!!scope.row.trader">
|
|
|
- {{ scope.row.trader }}
|
|
|
+ <div v-if="!!scope.row.trader&&scope.row.trader!='[]'">
|
|
|
+ <span v-for="(item, index) in JSON.parse(scope.row.trader)">
|
|
|
+ {{ item.name
|
|
|
+ }}{{
|
|
|
+ index == JSON.parse(scope.row.trader).length - 1 ? "" : ","
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="中控" align="center" prop="centralController">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="!!scope.row.centralController">
|
|
|
- {{ scope.row.centralController }}
|
|
|
+ <div v-if="!!scope.row.centralController&&scope.row.centralController!='[]'">
|
|
|
+ <span
|
|
|
+ v-for="(item, index) in JSON.parse(scope.row.centralController)"
|
|
|
+ >
|
|
|
+ {{ item.name
|
|
|
+ }}{{
|
|
|
+ index == JSON.parse(scope.row.centralController).length - 1
|
|
|
+ ? ""
|
|
|
+ : ","
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="场控" align="center" prop="fieldController">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="!!scope.row.fieldController">
|
|
|
- {{ scope.row.fieldController }}
|
|
|
+ <div v-if="!!scope.row.fieldController&&scope.row.fieldController!='[]'">
|
|
|
+ <span
|
|
|
+ v-for="(item, index) in JSON.parse(scope.row.fieldController)"
|
|
|
+ >
|
|
|
+ {{ item.name
|
|
|
+ }}{{
|
|
|
+ index == JSON.parse(scope.row.fieldController).length - 1
|
|
|
+ ? ""
|
|
|
+ : ","
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
@@ -172,8 +189,17 @@
|
|
|
|
|
|
<el-table-column label="内容" align="center" prop="contentController">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="!!scope.row.contentController">
|
|
|
- {{ scope.row.contentController }}
|
|
|
+ <div v-if="!!scope.row.contentController&&scope.row.contentController!='[]'">
|
|
|
+ <span
|
|
|
+ v-for="(item, index) in JSON.parse(scope.row.contentController)"
|
|
|
+ >
|
|
|
+ {{ item.name
|
|
|
+ }}{{
|
|
|
+ index == JSON.parse(scope.row.contentController).length - 1
|
|
|
+ ? ""
|
|
|
+ : ","
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
@@ -181,8 +207,17 @@
|
|
|
|
|
|
<el-table-column label="投流" align="center" prop="inputController">
|
|
|
<template slot-scope="scope">
|
|
|
- <div v-if="!!scope.row.inputController">
|
|
|
- {{ scope.row.inputController }}
|
|
|
+ <div v-if="!!scope.row.inputController&&scope.row.inputController!='[]'">
|
|
|
+ <span
|
|
|
+ v-for="(item, index) in JSON.parse(scope.row.inputController)"
|
|
|
+ >
|
|
|
+ {{ item.name
|
|
|
+ }}{{
|
|
|
+ index == JSON.parse(scope.row.inputController).length - 1
|
|
|
+ ? ""
|
|
|
+ : ","
|
|
|
+ }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
@@ -193,7 +228,11 @@
|
|
|
|
|
|
<el-table-column label="GMV完成度" align="center" prop="gmvRoi">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="本次上传文件/图片数量" align="center" prop="gmvRoi">
|
|
|
+ <el-table-column
|
|
|
+ label="本次上传文件/图片数量"
|
|
|
+ align="center"
|
|
|
+ prop="gmvRoi"
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
{{ scope.row.uploadFileCount }}/{{ scope.row.uploadPictureCount }}
|
|
@@ -389,6 +428,7 @@
|
|
|
v-model="formBroadcast.traderId"
|
|
|
placeholder="请选择操盘手"
|
|
|
clearable
|
|
|
+ multiple
|
|
|
value-key="value"
|
|
|
style="width: 240px"
|
|
|
>
|
|
@@ -405,6 +445,7 @@
|
|
|
v-model="formBroadcast.centralControlId"
|
|
|
placeholder="请选择中控"
|
|
|
clearable
|
|
|
+ multiple
|
|
|
value-key="value"
|
|
|
style="width: 240px"
|
|
|
>
|
|
@@ -421,6 +462,7 @@
|
|
|
v-model="formBroadcast.fieldControlId"
|
|
|
placeholder="请选择场控"
|
|
|
clearable
|
|
|
+ multiple
|
|
|
value-key="value"
|
|
|
style="width: 240px"
|
|
|
>
|
|
@@ -438,6 +480,7 @@
|
|
|
v-model="formBroadcast.contentControlId"
|
|
|
placeholder="请选择内容"
|
|
|
clearable
|
|
|
+ multiple
|
|
|
value-key="value"
|
|
|
style="width: 240px"
|
|
|
>
|
|
@@ -454,6 +497,7 @@
|
|
|
v-model="formBroadcast.inputControlId"
|
|
|
placeholder="请选择投流"
|
|
|
clearable
|
|
|
+ multiple
|
|
|
value-key="value"
|
|
|
style="width: 240px"
|
|
|
>
|
|
@@ -682,7 +726,7 @@ export default {
|
|
|
{ required: true, message: "直播级别不能为空", trigger: "change" },
|
|
|
],
|
|
|
traderId: [
|
|
|
- { required: true, message: "操盘手不能为空", trigger: "blur" },
|
|
|
+ { required: true, message: "操盘手不能为空", trigger: "change" },
|
|
|
],
|
|
|
},
|
|
|
// 分配销售展示列表
|
|
@@ -900,6 +944,16 @@ export default {
|
|
|
this.title = "上传复盘数据";
|
|
|
}
|
|
|
},
|
|
|
+ addNew() {
|
|
|
+ this.openAllocation = true;
|
|
|
+ this.edit = false;
|
|
|
+ this.ids = null;
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.formBroadcast = {};
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.formBroadcast.clearValidate();
|
|
|
+ }, 0);
|
|
|
+ },
|
|
|
/** 编辑直播 */
|
|
|
handleAddbroadcast(item) {
|
|
|
getForEdit({ id: item.id })
|
|
@@ -923,29 +977,62 @@ export default {
|
|
|
this.$set(this.formBroadcast, "liveTime", data.liveTime.split("~"));
|
|
|
this.$set(this.formBroadcast, "liveLevel", data.liveLevel);
|
|
|
this.$set(this.formBroadcast, "anchor", data.anchor);
|
|
|
- this.$set(this.formBroadcast, "traderId", {
|
|
|
- value: +data.traderId,
|
|
|
- label: data.trader,
|
|
|
- });
|
|
|
- this.$set(this.formBroadcast, "centralControlId", {
|
|
|
- value: +data.centralControlId,
|
|
|
- label: data.centralController,
|
|
|
- });
|
|
|
+ this.$set(
|
|
|
+ this.formBroadcast,
|
|
|
+ "traderId",
|
|
|
+ JSON.parse(data.trader).map((item) => {
|
|
|
+ return {
|
|
|
+ value: +item.id,
|
|
|
+ label: item.name,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.formBroadcast,
|
|
|
+ "centralControlId",
|
|
|
+ JSON.parse(data.centralController).map((item) => {
|
|
|
+ return {
|
|
|
+ value: +item.id,
|
|
|
+ label: item.name,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
|
|
|
- this.$set(this.formBroadcast, "fieldControlId", {
|
|
|
- value: +data.fieldControlId,
|
|
|
- label: data.fieldController,
|
|
|
- });
|
|
|
+ this.$set(
|
|
|
+ this.formBroadcast,
|
|
|
+ "fieldControlId",
|
|
|
+ JSON.parse(data.fieldController).map((item) => {
|
|
|
+ return {
|
|
|
+ value: +item.id,
|
|
|
+ label: item.name,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
|
|
|
- this.$set(this.formBroadcast, "contentControlId", {
|
|
|
- value: +data.contentControlId,
|
|
|
- label: data.contentController,
|
|
|
- });
|
|
|
- this.$set(this.formBroadcast, "inputControlId", {
|
|
|
- value: +data.inputControlId,
|
|
|
- label: data.inputController,
|
|
|
- });
|
|
|
+ this.$set(
|
|
|
+ this.formBroadcast,
|
|
|
+ "contentControlId",
|
|
|
+ JSON.parse(data.contentController).map((item) => {
|
|
|
+ return {
|
|
|
+ value: +item.id,
|
|
|
+ label: item.name,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
+ this.$set(
|
|
|
+ this.formBroadcast,
|
|
|
+ "inputControlId",
|
|
|
+ JSON.parse(data.inputController).map((item) => {
|
|
|
+ return {
|
|
|
+ value: +item.id,
|
|
|
+ label: item.name,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ );
|
|
|
this.$set(this.formBroadcast, "goalGmv", data.goalGmv);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.formBroadcast.clearValidate();
|
|
|
+ }, 0);
|
|
|
})
|
|
|
.catch((error) => {});
|
|
|
},
|
|
@@ -1037,37 +1124,66 @@ export default {
|
|
|
|
|
|
formData.liveLevel = this.formBroadcast.liveLevel;
|
|
|
formData.anchor = this.formBroadcast.anchor;
|
|
|
- formData.traderId = !!this.formBroadcast.traderId
|
|
|
- ? this.formBroadcast.traderId.value
|
|
|
- : null;
|
|
|
- formData.trader = !!this.formBroadcast.traderId
|
|
|
- ? this.formBroadcast.traderId.label
|
|
|
- : null;
|
|
|
|
|
|
- formData.centralControlId = !!this.formBroadcast.centralControlId
|
|
|
- ? this.formBroadcast.centralControlId.value
|
|
|
- : null;
|
|
|
- formData.centralController = !!this.formBroadcast.centralControlId
|
|
|
- ? this.formBroadcast.centralControlId.label
|
|
|
- : null;
|
|
|
- formData.fieldControlId = !!this.formBroadcast.fieldControlId
|
|
|
- ? this.formBroadcast.fieldControlId.value
|
|
|
- : null;
|
|
|
- formData.fieldController = !!this.formBroadcast.fieldControlId
|
|
|
- ? this.formBroadcast.fieldControlId.label
|
|
|
- : null;
|
|
|
- formData.contentControlId = !!this.formBroadcast.contentControlId
|
|
|
- ? this.formBroadcast.contentControlId.value
|
|
|
- : null;
|
|
|
- formData.contentController = !!this.formBroadcast.contentControlId
|
|
|
- ? this.formBroadcast.contentControlId.label
|
|
|
- : null;
|
|
|
- formData.inputControlId = !!this.formBroadcast.inputControlId
|
|
|
- ? this.formBroadcast.inputControlId.value
|
|
|
- : null;
|
|
|
- formData.inputController = !!this.formBroadcast.inputControlId
|
|
|
- ? this.formBroadcast.inputControlId.label
|
|
|
- : null;
|
|
|
+ formData.trader =
|
|
|
+ this.formBroadcast.traderId.length > 0
|
|
|
+ ? JSON.stringify(
|
|
|
+ this.formBroadcast.traderId.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.value,
|
|
|
+ name: item.label,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ )
|
|
|
+ : "[]";
|
|
|
+
|
|
|
+ formData.centralController =
|
|
|
+ this.formBroadcast.centralControlId.length > 0
|
|
|
+ ? JSON.stringify(
|
|
|
+ this.formBroadcast.centralControlId.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.value,
|
|
|
+ name: item.label,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ )
|
|
|
+ : "[]";
|
|
|
+
|
|
|
+ formData.fieldController =
|
|
|
+ this.formBroadcast.fieldControlId.length > 0
|
|
|
+ ? JSON.stringify(
|
|
|
+ this.formBroadcast.fieldControlId.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.value,
|
|
|
+ name: item.label,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ )
|
|
|
+ : "[]";
|
|
|
+
|
|
|
+ formData.contentController =
|
|
|
+ this.formBroadcast.contentControlId.length > 0
|
|
|
+ ? JSON.stringify(
|
|
|
+ this.formBroadcast.contentControlId.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.value,
|
|
|
+ name: item.label,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ )
|
|
|
+ : "[]";
|
|
|
+
|
|
|
+ formData.inputController =
|
|
|
+ this.formBroadcast.inputControlId.length > 0
|
|
|
+ ? JSON.stringify(
|
|
|
+ this.formBroadcast.inputControlId.map((item) => {
|
|
|
+ return {
|
|
|
+ id: item.value,
|
|
|
+ name: item.label,
|
|
|
+ };
|
|
|
+ })
|
|
|
+ )
|
|
|
+ : "[]";
|
|
|
|
|
|
if (!this.ids) {
|
|
|
addBroadcast(formData)
|