|
@@ -9,7 +9,7 @@
|
|
|
label-width="100px"
|
|
|
>
|
|
|
|
|
|
- <el-form-item label="绑定人" prop="bdUserId">
|
|
|
+ <el-form-item label="绑定人" prop="bdUserId">
|
|
|
<el-select
|
|
|
filterable
|
|
|
v-model="queryParams.bdUserId"
|
|
@@ -77,7 +77,8 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
|
|
- >搜索</el-button
|
|
|
+ >搜索
|
|
|
+ </el-button
|
|
|
>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
</el-form-item>
|
|
@@ -120,7 +121,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="粉丝数" align="center" prop="fansNumber"> </el-table-column>
|
|
|
+ <el-table-column label="粉丝数" align="center" prop="fansNumber"></el-table-column>
|
|
|
|
|
|
<el-table-column
|
|
|
label="单视频销售额"
|
|
@@ -204,7 +205,7 @@
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="认领记录" align="center" prop="userName"> </el-table-column>
|
|
|
+ <el-table-column label="认领记录" align="center" prop="userName"></el-table-column>
|
|
|
<el-table-column label="操作" align="center" prop="action">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
@@ -212,10 +213,12 @@
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleAddbroadcast(scope.row)"
|
|
|
- >认领</el-button
|
|
|
+ >认领
|
|
|
+ </el-button
|
|
|
>
|
|
|
<el-button size="mini" type="text" @click="updateOneData(scope.row)"
|
|
|
- >更新</el-button
|
|
|
+ >更新
|
|
|
+ </el-button
|
|
|
>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -381,7 +384,8 @@
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitFormBroadcast" :loading="confirmLoading"
|
|
|
- >确 定</el-button
|
|
|
+ >确 定
|
|
|
+ </el-button
|
|
|
>
|
|
|
<el-button
|
|
|
@click="
|
|
@@ -389,7 +393,8 @@
|
|
|
openAllocation = false;
|
|
|
formBroadcast = {};
|
|
|
"
|
|
|
- >取 消</el-button
|
|
|
+ >取 消
|
|
|
+ </el-button
|
|
|
>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -397,348 +402,303 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { refreshCache } from "@/api/system/dict/type";
|
|
|
-import {getSupplyChainUserList} from "@/api/supplyChain/supplyChain";
|
|
|
-import {
|
|
|
- getPromoterList2,
|
|
|
- addPromoter,
|
|
|
- editPromoter,
|
|
|
- deleteById,
|
|
|
- getGongHaiVideoSales,
|
|
|
-} from "@/api/promoter/promoter";
|
|
|
-export default {
|
|
|
- name: "account-list",
|
|
|
- components: {},
|
|
|
+ import {refreshCache} from "@/api/system/dict/type";
|
|
|
+ import {getSupplyChainUserList} from "@/api/supplyChain/supplyChain";
|
|
|
+ import {
|
|
|
+ getPromoterList2,
|
|
|
+ addPromoter,
|
|
|
+ editPromoter,
|
|
|
+ deleteById,
|
|
|
+ getGongHaiVideoSales,
|
|
|
+ } from "@/api/promoter/promoter";
|
|
|
|
|
|
- data() {
|
|
|
- let validatePhone = (rule, value, callback) => {
|
|
|
- /*console.log(rule);
|
|
|
- console.log(value);
|
|
|
- console.log(callback);*/
|
|
|
- if (!value) {
|
|
|
- callback(new Error("联系方式不能为空!"));
|
|
|
- }
|
|
|
- //使用正则表达式进行验证手机号码
|
|
|
- if (!/^1[3456789]\d{9}$/.test(value)) {
|
|
|
- callback(new Error("手机号不正确!"));
|
|
|
- }
|
|
|
- callback();
|
|
|
- };
|
|
|
- return {
|
|
|
- // 遮罩层
|
|
|
- loading: true,
|
|
|
- // 选中数组
|
|
|
- ids: null,
|
|
|
- // 非单个禁用
|
|
|
- single: true,
|
|
|
- // 非多个禁用
|
|
|
- multiple: true,
|
|
|
- // 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
- // 总条数
|
|
|
- total: 0,
|
|
|
- // 字典表格数据
|
|
|
- typeList: [],
|
|
|
- //上传文件类型
|
|
|
- fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
|
|
|
- // 弹出层标题
|
|
|
- title: "",
|
|
|
- // 是否显示弹出层
|
|
|
- open: false,
|
|
|
- openFp: false,
|
|
|
- formFp: {},
|
|
|
- // 是否可编辑
|
|
|
- edit: false,
|
|
|
- // 分配销售
|
|
|
- openAllocation: false,
|
|
|
- // 选择的销售id
|
|
|
- saleId: undefined,
|
|
|
- // 销售列表
|
|
|
- saleList: [],
|
|
|
- // 分配销售确定loading
|
|
|
- confirmLoadingSale: false,
|
|
|
- // 日期范围
|
|
|
- dateRange: [],
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 10,
|
|
|
- promoterNickName: undefined,
|
|
|
- promoterId: undefined,
|
|
|
- status: undefined,
|
|
|
- },
|
|
|
- //页面所有的下拉数据
|
|
|
- queryParamsList: {
|
|
|
- statusList: [
|
|
|
- { value: 1, label: "已认领" },
|
|
|
- { value: 2, label: "未认领" },
|
|
|
- ],
|
|
|
- },
|
|
|
- // 表单参数
|
|
|
- form: {},
|
|
|
- formBroadcast: {},
|
|
|
- //上传报表下拉数据
|
|
|
- formList: {},
|
|
|
- fileList: [],
|
|
|
- accept: "",
|
|
|
- //获取销售线索文件流
|
|
|
- dateFile: new FormData(),
|
|
|
- //销售线索上传loading
|
|
|
- confirmLoading: false,
|
|
|
- // 表单校验
|
|
|
- rules: {},
|
|
|
- rulesBroadcast: {
|
|
|
- consignee: {
|
|
|
- required: true,
|
|
|
- message: "收货人必填",
|
|
|
- trigger: "blur",
|
|
|
+ export default {
|
|
|
+ name: "account-list",
|
|
|
+ components: {},
|
|
|
+
|
|
|
+ data() {
|
|
|
+ let validatePhone = (rule, value, callback) => {
|
|
|
+ /*console.log(rule);
|
|
|
+ console.log(value);
|
|
|
+ console.log(callback);*/
|
|
|
+ if (!value) {
|
|
|
+ callback(new Error("联系方式不能为空!"));
|
|
|
+ }
|
|
|
+ //使用正则表达式进行验证手机号码
|
|
|
+ if (!/^1[3456789]\d{9}$/.test(value)) {
|
|
|
+ callback(new Error("手机号不正确!"));
|
|
|
+ }
|
|
|
+ callback();
|
|
|
+ };
|
|
|
+ return {
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: null,
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // 字典表格数据
|
|
|
+ typeList: [],
|
|
|
+ //上传文件类型
|
|
|
+ fileType: [".doc", ".xls", ".xlsx", ".ppt", ".pdf", ".csv"],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+ openFp: false,
|
|
|
+ formFp: {},
|
|
|
+ // 是否可编辑
|
|
|
+ edit: false,
|
|
|
+ // 分配销售
|
|
|
+ openAllocation: false,
|
|
|
+ // 选择的销售id
|
|
|
+ saleId: undefined,
|
|
|
+ // 销售列表
|
|
|
+ saleList: [],
|
|
|
+ // 分配销售确定loading
|
|
|
+ confirmLoadingSale: false,
|
|
|
+ // 日期范围
|
|
|
+ dateRange: [],
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ promoterNickName: undefined,
|
|
|
+ promoterId: undefined,
|
|
|
+ status: undefined,
|
|
|
},
|
|
|
- phone: {
|
|
|
- required: true,
|
|
|
- // message: "联系方式必填",
|
|
|
- validator: validatePhone,
|
|
|
- trigger: "blur",
|
|
|
+ //页面所有的下拉数据
|
|
|
+ queryParamsList: {
|
|
|
+ statusList: [
|
|
|
+ {value: 1, label: "已认领"},
|
|
|
+ {value: 2, label: "未认领"},
|
|
|
+ ],
|
|
|
},
|
|
|
- promoterAddress: [
|
|
|
- {
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ formBroadcast: {},
|
|
|
+ //上传报表下拉数据
|
|
|
+ formList: {},
|
|
|
+ fileList: [],
|
|
|
+ accept: "",
|
|
|
+ //获取销售线索文件流
|
|
|
+ dateFile: new FormData(),
|
|
|
+ //销售线索上传loading
|
|
|
+ confirmLoading: false,
|
|
|
+ // 表单校验
|
|
|
+ rules: {},
|
|
|
+ rulesBroadcast: {
|
|
|
+ consignee: {
|
|
|
required: true,
|
|
|
- message: "发货地址必填",
|
|
|
+ message: "收货人必填",
|
|
|
trigger: "blur",
|
|
|
},
|
|
|
- {
|
|
|
- min: 5,
|
|
|
- max: 200,
|
|
|
- message: "发货地址最少输入5个字符",
|
|
|
- trigger: "change",
|
|
|
+ phone: {
|
|
|
+ required: true,
|
|
|
+ // message: "联系方式必填",
|
|
|
+ validator: validatePhone,
|
|
|
+ trigger: "blur",
|
|
|
},
|
|
|
- ],
|
|
|
- },
|
|
|
- // 分配销售展示列表
|
|
|
- ksInfo: null,
|
|
|
- userId: null,
|
|
|
- prop: "",
|
|
|
- sort: "DESC",
|
|
|
- personList: [],
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.userId = this.$store.getters.userId;
|
|
|
- this.getList();
|
|
|
- this.getPersonList();
|
|
|
- },
|
|
|
- filters: {},
|
|
|
- methods: {
|
|
|
- getPersonList() {
|
|
|
- getSupplyChainUserList().then((response) => {
|
|
|
- this.queryParamsList.personList = response.rows;
|
|
|
- });
|
|
|
- },
|
|
|
- toIndexDetail(item) {
|
|
|
- this.$router.replace({
|
|
|
- path: "/promoter/detail",
|
|
|
- query: {
|
|
|
- id: item.id,
|
|
|
+ promoterAddress: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "发货地址必填",
|
|
|
+ trigger: "blur",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ min: 5,
|
|
|
+ max: 200,
|
|
|
+ message: "发货地址最少输入5个字符",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
- });
|
|
|
+ // 分配销售展示列表
|
|
|
+ ksInfo: null,
|
|
|
+ userId: null,
|
|
|
+ prop: "",
|
|
|
+ sort: "DESC",
|
|
|
+ personList: [],
|
|
|
+ };
|
|
|
},
|
|
|
- sortChange(col, prop, order) {
|
|
|
- this.prop = col.prop;
|
|
|
-
|
|
|
- this.sort = !!col.order ? (col.order == "descending" ? "DESC" : "ASC") : "DESC";
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
- /** 查询字典类型列表 */
|
|
|
- getList() {
|
|
|
- this.loading = true;
|
|
|
-
|
|
|
- getPromoterList2({
|
|
|
- userId: this.userId,
|
|
|
- ...this.queryParams,
|
|
|
- parameter: this.prop,
|
|
|
- orderBy: this.sort,
|
|
|
- }).then((response) => {
|
|
|
- this.typeList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
- // 取消按钮
|
|
|
- cancel() {
|
|
|
- this.open = false;
|
|
|
- this.confirmLoading = false;
|
|
|
- this.reset();
|
|
|
- },
|
|
|
- // 表单重置
|
|
|
- reset() {
|
|
|
- this.form = {};
|
|
|
- this.dateFile = null;
|
|
|
- this.resetForm("formBroadcast");
|
|
|
- },
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.queryParams.pageNum = 1;
|
|
|
+ created() {
|
|
|
+ this.userId = this.$store.getters.userId;
|
|
|
this.getList();
|
|
|
+ this.getPersonList();
|
|
|
},
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.dateRange = [];
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
- addNew() {
|
|
|
- this.openAllocation = true;
|
|
|
- this.edit = false;
|
|
|
- this.ids = null;
|
|
|
- this.confirmLoading = false;
|
|
|
- this.formBroadcast = {};
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.formBroadcast.clearValidate();
|
|
|
- }, 0);
|
|
|
- },
|
|
|
- handleDelete(item) {
|
|
|
- this.$modal
|
|
|
- .confirm(`请确认是否解绑此达人?`)
|
|
|
- .then(() => {
|
|
|
- var params = {};
|
|
|
- params.id = item.id;
|
|
|
- params.userId = this.$store.getters.userId;
|
|
|
- deleteById(params)
|
|
|
- .then((res) => {
|
|
|
- this.$modal.msgSuccess("解绑成功");
|
|
|
- this.handleQuery();
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- },
|
|
|
- updateOneData(item) {
|
|
|
- getGongHaiVideoSales({ promoterId: item.promoterId }).then((res) => {
|
|
|
- this.$modal.msgSuccess("更新成功");
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- },
|
|
|
- /** 编辑地址 新增达人*/
|
|
|
- handleAddbroadcast(item) {
|
|
|
- this.ids = item.id;
|
|
|
- this.edit = true;
|
|
|
- this.openAllocation = true;
|
|
|
+ filters: {},
|
|
|
+ methods: {
|
|
|
+ getPersonList() {
|
|
|
+ getSupplyChainUserList().then((response) => {
|
|
|
+ this.queryParamsList.personList = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ toIndexDetail(item) {
|
|
|
+ this.$router.replace({
|
|
|
+ path: "/promoter/detail",
|
|
|
+ query: {
|
|
|
+ id: item.id,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sortChange(col, prop, order) {
|
|
|
+ this.prop = col.prop;
|
|
|
|
|
|
- this.$set(this.formBroadcast, "consignee", item.consignee);
|
|
|
- this.$set(this.formBroadcast, "phone", item.phone);
|
|
|
- this.$set(this.formBroadcast, "promoterAddress", item.promoterAddress);
|
|
|
- this.$set(this.formBroadcast, "promoterNickName", item.promoterNickName);
|
|
|
- this.$set(this.formBroadcast, "promoterId", item.promoterId);
|
|
|
- },
|
|
|
- copyInfomation(item) {
|
|
|
- if (navigator.clipboard && window.isSecureContext) {
|
|
|
- navigator.clipboard
|
|
|
- .writeText(
|
|
|
- `
|
|
|
- 收货人: ${item.consignee}
|
|
|
- 手机号: ${item.phone}
|
|
|
- 收货地址: ${item.promoterAddress}`
|
|
|
- )
|
|
|
+ this.sort = !!col.order ? (col.order == "descending" ? "DESC" : "ASC") : "DESC";
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ /** 查询字典类型列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+
|
|
|
+ getPromoterList2({
|
|
|
+ userId: this.userId,
|
|
|
+ ...this.queryParams,
|
|
|
+ parameter: this.prop,
|
|
|
+ orderBy: this.sort,
|
|
|
+ }).then((response) => {
|
|
|
+ this.typeList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {};
|
|
|
+ this.dateFile = null;
|
|
|
+ this.resetForm("formBroadcast");
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.dateRange = [];
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ addNew() {
|
|
|
+ this.openAllocation = true;
|
|
|
+ this.edit = false;
|
|
|
+ this.ids = null;
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.formBroadcast = {};
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.formBroadcast.clearValidate();
|
|
|
+ }, 0);
|
|
|
+ },
|
|
|
+ handleDelete(item) {
|
|
|
+ this.$modal
|
|
|
+ .confirm(`请确认是否解绑此达人?`)
|
|
|
.then(() => {
|
|
|
- this.$message.success("复制成功");
|
|
|
+ var params = {};
|
|
|
+ params.id = item.id;
|
|
|
+ params.userId = this.$store.getters.userId;
|
|
|
+ deleteById(params)
|
|
|
+ .then((res) => {
|
|
|
+ this.$modal.msgSuccess("解绑成功");
|
|
|
+ this.handleQuery();
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
})
|
|
|
- .catch((err) => {
|
|
|
- this.$message.error("复制失败");
|
|
|
+ .catch(() => {
|
|
|
});
|
|
|
- } else {
|
|
|
- // 创建text area
|
|
|
- const textArea = document.createElement("textarea");
|
|
|
- textArea.value = `
|
|
|
+ },
|
|
|
+ updateOneData(item) {
|
|
|
+ getGongHaiVideoSales({promoterId: item.promoterId}).then((res) => {
|
|
|
+ this.$modal.msgSuccess("更新成功");
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 编辑地址 新增达人*/
|
|
|
+ handleAddbroadcast(item) {
|
|
|
+ this.ids = item.id;
|
|
|
+ this.edit = true;
|
|
|
+ this.openAllocation = true;
|
|
|
+
|
|
|
+ this.$set(this.formBroadcast, "consignee", item.consignee);
|
|
|
+ this.$set(this.formBroadcast, "phone", item.phone);
|
|
|
+ this.$set(this.formBroadcast, "promoterAddress", item.promoterAddress);
|
|
|
+ this.$set(this.formBroadcast, "promoterNickName", item.promoterNickName);
|
|
|
+ this.$set(this.formBroadcast, "promoterId", item.promoterId);
|
|
|
+ },
|
|
|
+ copyInfomation(item) {
|
|
|
+ if (navigator.clipboard && window.isSecureContext) {
|
|
|
+ navigator.clipboard
|
|
|
+ .writeText(
|
|
|
+ `
|
|
|
收货人: ${item.consignee}
|
|
|
手机号: ${item.phone}
|
|
|
- 收货地址: ${item.promoterAddress}`;
|
|
|
- // 使text area不在viewport,同时设置不可见
|
|
|
- document.body.appendChild(textArea);
|
|
|
- textArea.focus();
|
|
|
- textArea.select();
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- // 执行复制命令并移除文本框
|
|
|
- document.execCommand("copy") ? resolve() : reject(new Error("出错了"));
|
|
|
- textArea.remove();
|
|
|
- }).then(
|
|
|
- () => {
|
|
|
- this.$message.success("复制成功");
|
|
|
- },
|
|
|
- () => {
|
|
|
- this.$message.error("复制失败");
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- },
|
|
|
- /** 修改按钮操作 */
|
|
|
- handleUpdate(row) {
|
|
|
- this.reset();
|
|
|
- },
|
|
|
- /** 新增直播确定按钮 */
|
|
|
- submitFormBroadcast: function () {
|
|
|
- this.$refs["formBroadcast"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.confirmLoading = true;
|
|
|
- let formData = {
|
|
|
- userId: this.userId,
|
|
|
- userName: this.$store.getters.name,
|
|
|
- ...this.formBroadcast,
|
|
|
- };
|
|
|
-
|
|
|
- addPromoter(formData)
|
|
|
- .then((res) => {
|
|
|
- this.confirmLoading = false;
|
|
|
- this.$message.success("认领成功");
|
|
|
- this.openAllocation = false;
|
|
|
- this.ids = null;
|
|
|
- this.cancel();
|
|
|
- this.handleQuery();
|
|
|
+ 收货地址: ${item.promoterAddress}`
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ this.$message.success("复制成功");
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
- this.confirmLoading = false;
|
|
|
+ this.$message.error("复制失败");
|
|
|
});
|
|
|
+ } else {
|
|
|
+ // 创建text area
|
|
|
+ const textArea = document.createElement("textarea");
|
|
|
+ textArea.value = `
|
|
|
+ 收货人: ${item.consignee}
|
|
|
+ 手机号: ${item.phone}
|
|
|
+ 收货地址: ${item.promoterAddress}`;
|
|
|
+ // 使text area不在viewport,同时设置不可见
|
|
|
+ document.body.appendChild(textArea);
|
|
|
+ textArea.focus();
|
|
|
+ textArea.select();
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ // 执行复制命令并移除文本框
|
|
|
+ document.execCommand("copy") ? resolve() : reject(new Error("出错了"));
|
|
|
+ textArea.remove();
|
|
|
+ }).then(
|
|
|
+ () => {
|
|
|
+ this.$message.success("复制成功");
|
|
|
+ },
|
|
|
+ () => {
|
|
|
+ this.$message.error("复制失败");
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- /** 提交按钮 */
|
|
|
- submitForm: function () {
|
|
|
- this.$refs["form"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- var fileList = this.$refs.fileUploadDialog.fileList;
|
|
|
- var dapanUrls = this.$refs.fileUpload.fileList;
|
|
|
- var portraitUrls = this.$refs.fileUploadFx.fileList;
|
|
|
- if (fileList.length == 0 && dapanUrls.length == 0 && portraitUrls.length == 0) {
|
|
|
- this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
|
|
|
- return;
|
|
|
- } else {
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ /** 新增直播确定按钮 */
|
|
|
+ submitFormBroadcast: function () {
|
|
|
+ this.$refs["formBroadcast"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
this.confirmLoading = true;
|
|
|
- let formData = new FormData();
|
|
|
- this.ids;
|
|
|
- formData.append("id", this.ids);
|
|
|
- formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
|
|
|
- formData.append(
|
|
|
- "dapanUrls",
|
|
|
- JSON.stringify(
|
|
|
- dapanUrls.map((item) => {
|
|
|
- return item.url;
|
|
|
- })
|
|
|
- )
|
|
|
- );
|
|
|
- formData.append(
|
|
|
- "portraitUrls",
|
|
|
- JSON.stringify(
|
|
|
- portraitUrls.map((item) => {
|
|
|
- return item.url;
|
|
|
- })
|
|
|
- )
|
|
|
- );
|
|
|
- fileList.forEach((file) => formData.append("files", file.raw));
|
|
|
- dataUpload(formData)
|
|
|
+ let formData = {
|
|
|
+ mediaId: 2,
|
|
|
+ userId: this.userId,
|
|
|
+ userName: this.$store.getters.name,
|
|
|
+ ...this.formBroadcast,
|
|
|
+ };
|
|
|
+
|
|
|
+ addPromoter(formData)
|
|
|
.then((res) => {
|
|
|
this.confirmLoading = false;
|
|
|
- this.$message.success("上传成功");
|
|
|
- this.open = false;
|
|
|
+ this.$message.success("认领成功");
|
|
|
+ this.openAllocation = false;
|
|
|
this.ids = null;
|
|
|
this.cancel();
|
|
|
this.handleQuery();
|
|
@@ -747,35 +707,87 @@ export default {
|
|
|
this.confirmLoading = false;
|
|
|
});
|
|
|
}
|
|
|
- console.log(fileList, dapanUrls, portraitUrls);
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm: function () {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ var fileList = this.$refs.fileUploadDialog.fileList;
|
|
|
+ var dapanUrls = this.$refs.fileUpload.fileList;
|
|
|
+ var portraitUrls = this.$refs.fileUploadFx.fileList;
|
|
|
+ if (fileList.length == 0 && dapanUrls.length == 0 && portraitUrls.length == 0) {
|
|
|
+ this.$message.error("直播数据,数据大盘,画像分析必须最少上传一项");
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ this.confirmLoading = true;
|
|
|
+ let formData = new FormData();
|
|
|
+ this.ids;
|
|
|
+ formData.append("id", this.ids);
|
|
|
+ formData.append("actualGmv", this.delcommafy(this.form.actualGmv));
|
|
|
+ formData.append(
|
|
|
+ "dapanUrls",
|
|
|
+ JSON.stringify(
|
|
|
+ dapanUrls.map((item) => {
|
|
|
+ return item.url;
|
|
|
+ })
|
|
|
+ )
|
|
|
+ );
|
|
|
+ formData.append(
|
|
|
+ "portraitUrls",
|
|
|
+ JSON.stringify(
|
|
|
+ portraitUrls.map((item) => {
|
|
|
+ return item.url;
|
|
|
+ })
|
|
|
+ )
|
|
|
+ );
|
|
|
+ fileList.forEach((file) => formData.append("files", file.raw));
|
|
|
+ dataUpload(formData)
|
|
|
+ .then((res) => {
|
|
|
+ this.confirmLoading = false;
|
|
|
+ this.$message.success("上传成功");
|
|
|
+ this.open = false;
|
|
|
+ this.ids = null;
|
|
|
+ this.cancel();
|
|
|
+ this.handleQuery();
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.confirmLoading = false;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ console.log(fileList, dapanUrls, portraitUrls);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
- },
|
|
|
-};
|
|
|
+ };
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.entire-line {
|
|
|
- width: 100%;
|
|
|
- ::v-deep .el-form-item__content {
|
|
|
- width: 60%;
|
|
|
+ .entire-line {
|
|
|
+ width: 100%;
|
|
|
+
|
|
|
+ ::v-deep .el-form-item__content {
|
|
|
+ width: 60%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-form-item__label {
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
-}
|
|
|
-::v-deep .el-form-item__label {
|
|
|
- white-space: nowrap;
|
|
|
-}
|
|
|
</style>
|
|
|
<style scoped lang="scss">
|
|
|
-::v-deep a {
|
|
|
- color: #409eff;
|
|
|
- display: block;
|
|
|
- text-align: left;
|
|
|
-}
|
|
|
-.item-name-calss p {
|
|
|
- margin: 0;
|
|
|
- text-align: left;
|
|
|
-}
|
|
|
-.tableBox {
|
|
|
- width: 100%;
|
|
|
-}
|
|
|
+ ::v-deep a {
|
|
|
+ color: #409eff;
|
|
|
+ display: block;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+
|
|
|
+ .item-name-calss p {
|
|
|
+ margin: 0;
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tableBox {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
</style>
|