葡萄牙语
This commit is contained in:
@@ -4,6 +4,7 @@ const partitionInfoMap = {
|
||||
4: '华语区',
|
||||
8: '土耳其区',
|
||||
16: '英语2区',
|
||||
32: '葡萄牙语区',
|
||||
}
|
||||
|
||||
export const partitionDesc = (val) => {
|
||||
|
@@ -4,100 +4,85 @@
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">选择分区</span>
|
||||
<el-select
|
||||
v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
@change="handleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<el-select v-model="inquire.partitionId"
|
||||
style="width: 75%"
|
||||
placeholder="请选择"
|
||||
@change="handleChange">
|
||||
<el-option v-for="item in inquire.inquireonInfos"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="seq" align="center" label="排序" />
|
||||
<el-table-column prop="name" align="center" label="礼物面板类型" />
|
||||
<el-table-column prop="enable" align="center" label="是否生效">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="seq"
|
||||
align="center"
|
||||
label="排序" />
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="礼物面板类型" />
|
||||
<el-table-column prop="enable"
|
||||
align="center"
|
||||
label="是否生效">
|
||||
<template v-slot="scope">{{ scope.row.enable ? "是" : "否" }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<el-table-column align="center"
|
||||
label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="ediClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button @click="ediClick(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="eidDialog" :title="eidDialogTitle" width="30%" center>
|
||||
<el-dialog v-model="eidDialog"
|
||||
:title="eidDialogTitle"
|
||||
width="30%"
|
||||
center>
|
||||
<!-- 礼物面板类型 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼物面板类型</span
|
||||
>
|
||||
<el-input
|
||||
v-model="eidObj.type"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
disabled
|
||||
></el-input>
|
||||
<span style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label">礼物面板类型</span>
|
||||
<el-input v-model="eidObj.type"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
disabled></el-input>
|
||||
</div>
|
||||
<!-- 面板排序 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>面板排序-{{ eidText }}</span
|
||||
>
|
||||
<el-input
|
||||
v-model="eidObj.seq"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"
|
||||
></el-input>
|
||||
<span style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label">面板排序-{{ eidText }}</span>
|
||||
<el-input v-model="eidObj.seq"
|
||||
style="width: 60%"
|
||||
class="input"
|
||||
placeholder="请输入"></el-input>
|
||||
</div>
|
||||
<!-- 是否生效 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span
|
||||
style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label"
|
||||
>是否生效</span
|
||||
>
|
||||
<el-select
|
||||
v-model="eidObj.value"
|
||||
style="width: 60%"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in eidObj.option"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
<span style="display: inline-block; white-space: nowrap; margin-right: 70px"
|
||||
class="col-sm-2 control-label">是否生效</span>
|
||||
<el-select v-model="eidObj.value"
|
||||
style="width: 60%"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in eidObj.option"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="eidDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="eidDialogClick()"> 确认 </el-button>
|
||||
<el-button type="primary"
|
||||
@click="eidDialogClick()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -105,19 +90,19 @@
|
||||
</template>
|
||||
<script>
|
||||
import { list, update } from "@/api/GiftPanelManagement/GiftPanelManagement";
|
||||
import { listAll} from "@/api/partition/partitionInfo";
|
||||
import { listAll } from "@/api/partition/partitionInfo";
|
||||
// @ts-ignore
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
// @ts-ignore
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GiftPanelManagement",
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
inquire: {
|
||||
partitionId: 4,
|
||||
partitionId: 1,
|
||||
inquireonInfos: [
|
||||
// { desc: "英语区", id: 1 },
|
||||
// { desc: "阿拉伯区", id: 2 },
|
||||
@@ -150,7 +135,7 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||
this.eidText = `华语区`;
|
||||
this.getData();
|
||||
@@ -160,7 +145,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
list({
|
||||
partitionId: this.inquire.partitionId,
|
||||
@@ -169,14 +154,14 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
ediClick(val) {
|
||||
ediClick (val) {
|
||||
this.eidDialog = true;
|
||||
this.eidObj.type = val.name;
|
||||
this.eidObj.seq = val.seq;
|
||||
this.eidObj.value = val.enable;
|
||||
this.eidObjNew = val;
|
||||
},
|
||||
eidDialogClick() {
|
||||
eidDialogClick () {
|
||||
update({
|
||||
enable: this.eidObj.value,
|
||||
id: this.eidObjNew.id,
|
||||
@@ -200,7 +185,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChange(val) {
|
||||
handleChange (val) {
|
||||
console.log(val);
|
||||
if (val == 1) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-英语区`;
|
||||
@@ -211,9 +196,15 @@ export default {
|
||||
} else if (val == 4) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-华语区`;
|
||||
this.eidText = `华语区`;
|
||||
}else if (val == 8) {
|
||||
} else if (val == 8) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-土耳其区`;
|
||||
this.eidText = `土耳其区`;
|
||||
} else if (val == 16) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-英语2区`;
|
||||
this.eidText = `英语2区`;
|
||||
} else if (val == 32) {
|
||||
this.eidDialogTitle = `编辑礼物面板信息-葡萄牙语区`;
|
||||
this.eidText = `葡萄牙语区`;
|
||||
}
|
||||
this.getData();
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,167 +4,187 @@
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">开始时间</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time[0]"
|
||||
type="dates"
|
||||
placeholder="开始时间"
|
||||
>
|
||||
<el-date-picker v-model="inquire.time[0]"
|
||||
type="dates"
|
||||
placeholder="开始时间">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<div class="block">
|
||||
<span class="demonstration">结束时间</span>
|
||||
<el-date-picker
|
||||
v-model="inquire.time[1]"
|
||||
type="dates"
|
||||
placeholder="结束时间"
|
||||
>
|
||||
<el-date-picker v-model="inquire.time[1]"
|
||||
type="dates"
|
||||
placeholder="结束时间">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button style=""
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<!-- <el-button style="" type="primary" @click="exportDate()">导出</el-button> -->
|
||||
</div>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column align="center" label="全平台真实消耗" width="">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="date"
|
||||
align="center"
|
||||
label="日期" />
|
||||
<el-table-column align="center"
|
||||
label="全平台真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '全平台金币明细';
|
||||
edi(scope.row, 0);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.totalDiamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="阿拉伯区真实消耗" width="">
|
||||
<el-table-column align="center"
|
||||
label="阿拉伯区真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '阿拉伯区金币明细';
|
||||
edi(scope.row, 2);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.arDiamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语区真实消耗" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语区真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语区金币明细';
|
||||
edi(scope.row, 1);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.enDiamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="华语区真实消耗" width="">
|
||||
<el-table-column align="center"
|
||||
label="华语区真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '华语区金币明细';
|
||||
edi(scope.row, 4);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.zhDiamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="土耳其区真实消耗" width="">
|
||||
<el-table-column align="center"
|
||||
label="土耳其区真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '土耳其区金币明细';
|
||||
edi(scope.row, 8);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.trDiamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="英语2区真实消耗" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语2区真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语区2金币明细';
|
||||
edi(scope.row, 16);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.en2Diamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="totalRemainDiamond"
|
||||
align="center"
|
||||
label="全平台库存"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.totalRemainDiamond) }}
|
||||
</template>
|
||||
<el-table-column align="center"
|
||||
label="葡萄牙语区真实消耗"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="
|
||||
detailsTitle = '葡萄牙语区金币明细';
|
||||
edi(scope.row, 32);p
|
||||
"
|
||||
type="text"
|
||||
size="small">
|
||||
{{ formattedNumber(scope.row.prDiamond) }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="arRemainDiamond"
|
||||
align="center"
|
||||
label="阿拉伯区库存"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.arRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="enRemainDiamond" align="center" label="英语区库存" >
|
||||
<el-table-column prop="totalRemainDiamond"
|
||||
align="center"
|
||||
label="全平台库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.enRemainDiamond) }}
|
||||
</template>
|
||||
{{ formattedNumber(scope.row.totalRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="zhRemainDiamond" align="center" label="华语区库存" >
|
||||
|
||||
<el-table-column prop="arRemainDiamond"
|
||||
align="center"
|
||||
label="阿拉伯区库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.zhRemainDiamond) }}
|
||||
</template>
|
||||
{{ formattedNumber(scope.row.arRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="trRemainDiamond"
|
||||
align="center"
|
||||
label="土耳其区库存"
|
||||
>
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.trRemainDiamond) }}
|
||||
</template>
|
||||
<el-table-column prop="enRemainDiamond"
|
||||
align="center"
|
||||
label="英语区库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.enRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="en2RemainDiamond" align="center" label="英语2区库存" >
|
||||
<el-table-column prop="zhRemainDiamond"
|
||||
align="center"
|
||||
label="华语区库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.zhRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="trRemainDiamond"
|
||||
align="center"
|
||||
label="土耳其区库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.trRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="en2RemainDiamond"
|
||||
align="center"
|
||||
label="英语2区库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.en2RemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="prRemainDiamond"
|
||||
align="center"
|
||||
label="葡萄牙语区库存">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.prRemainDiamond) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
@@ -181,40 +201,49 @@
|
||||
/> -->
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="30%" center>
|
||||
<el-dialog v-model="detailsDialog"
|
||||
:title="detailsTitle"
|
||||
width="30%"
|
||||
center>
|
||||
<!-- 内表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="domainDesc" align="center" label="类型" />
|
||||
<el-table-column prop="addDiamond" align="center" label="增加" >
|
||||
<el-table v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="domainDesc"
|
||||
align="center"
|
||||
label="类型" />
|
||||
<el-table-column prop="addDiamond"
|
||||
align="center"
|
||||
label="增加">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.addDiamond) }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="subDiamond" align="center" label="消耗" >
|
||||
<el-table-column prop="subDiamond"
|
||||
align="center"
|
||||
label="消耗">
|
||||
<template v-slot="scope">
|
||||
{{ formattedNumber(scope.row.subDiamond) }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="subDiamond" align="center" label="留存" >
|
||||
<el-table-column prop="subDiamond"
|
||||
align="center"
|
||||
label="留存">
|
||||
<template #default="row">
|
||||
{{ formattedNumber(totalDiamonds(row.row)) }}
|
||||
<div v-if="row.row.domainDesc ==='小游戏' || row.row.domainDesc ==='幸运数字礼物' || row.row.domainDesc ==='Bravo礼物'">
|
||||
{{ percentage(row.row) }}%
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 操作 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" class="primary" @click="detailsDialog = false"
|
||||
>关闭</el-button
|
||||
>
|
||||
<el-button type="primary"
|
||||
class="primary"
|
||||
@click="detailsDialog = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -225,7 +254,7 @@ import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "dailyCoinStatistics",
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
// 查询条件
|
||||
@@ -244,40 +273,40 @@ export default {
|
||||
tableDataIn: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
// this.getData();
|
||||
},
|
||||
computed: {
|
||||
// 千分位
|
||||
formattedNumber() {
|
||||
formattedNumber () {
|
||||
return (num) => {
|
||||
if (num === null || num === undefined) return '';
|
||||
return Math.floor(num).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
totalDiamonds(row) {
|
||||
totalDiamonds (row) {
|
||||
const subDiamond = Number(row.subDiamond || 0);
|
||||
const addDiamond = Number(row.addDiamond || 0);
|
||||
return subDiamond + addDiamond;
|
||||
},
|
||||
// 计算百分比,防止除零异常
|
||||
percentage(row) {
|
||||
percentage (row) {
|
||||
const subDiamond = Number(row.subDiamond || 0);
|
||||
const addDiamond = Number(row.addDiamond || 0);
|
||||
|
||||
if (subDiamond === 0) {
|
||||
return '0.00'; // 防止除零错误
|
||||
}
|
||||
|
||||
|
||||
|
||||
const result = (addDiamond / subDiamond) * 100;
|
||||
return result.toFixed(2); // 格式化为两位小数
|
||||
},
|
||||
// 查询
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = null;
|
||||
@@ -310,30 +339,32 @@ export default {
|
||||
});
|
||||
},
|
||||
// 详情
|
||||
edi(res, type) {
|
||||
edi (res, type) {
|
||||
var jsonArr =
|
||||
type == 0
|
||||
? res.totalDiamondDetail
|
||||
: type == 1
|
||||
? res.enDomainDetail
|
||||
: type == 2
|
||||
? res.arDomainDetail
|
||||
: type == 4
|
||||
? res.zhDomainDetail
|
||||
: type == 8
|
||||
? res.trDomainDetail
|
||||
: type == 16
|
||||
? res.en2DomainDetail
|
||||
: `"[""]"`;
|
||||
? res.enDomainDetail
|
||||
: type == 2
|
||||
? res.arDomainDetail
|
||||
: type == 4
|
||||
? res.zhDomainDetail
|
||||
: type == 8
|
||||
? res.trDomainDetail
|
||||
: type == 16
|
||||
? res.en2DomainDetail
|
||||
: type == 32
|
||||
? res.prDomainDetail
|
||||
: `"[""]"`;
|
||||
|
||||
this.tableDataIn = JSON.parse(jsonArr);
|
||||
this.detailsDialog = true;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
|
@@ -1,170 +1,195 @@
|
||||
<template>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column align="center" label="日期" width="220px">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column align="center"
|
||||
label="日期"
|
||||
width="220px">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.date }} ~ {{ scope.row.endDate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="totalNewCount"
|
||||
align="center"
|
||||
label="全服公会总新增"
|
||||
/>
|
||||
<el-table-column prop="totalNewCount"
|
||||
align="center"
|
||||
label="全服公会总新增" />
|
||||
|
||||
<el-table-column align="center" label="阿拉伯公会总新增" width="">
|
||||
<el-table-column align="center"
|
||||
label="阿拉伯公会总新增"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '阿拉伯公会总新增' + scope.row.date;
|
||||
edi(scope.row.arNewCountDetail, false);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.arNewCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语区总新增" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语区总新增"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语区总新增' + scope.row.date;
|
||||
edi(scope.row.enNewCountDetail, false);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.enNewCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="华语区总新增" width="">
|
||||
<el-table-column align="center"
|
||||
label="华语区总新增"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '华语区总新增' + scope.row.date;
|
||||
edi(scope.row.zhNewCountDetail, false);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.zhNewCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="土耳其区总新增" width="">
|
||||
<el-table-column align="center"
|
||||
label="土耳其区总新增"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '土耳其区总新增' + scope.row.date;
|
||||
edi(scope.row.trNewCountDetail, false);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.trNewCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语2区总新增" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语2区总新增"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语2区总新增' + scope.row.date;
|
||||
edi(scope.row.en2NewCountDetail, false);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.en2NewCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop="totalActiveCount"
|
||||
align="center"
|
||||
label="全服公会活跃度"
|
||||
/>
|
||||
|
||||
<el-table-column align="center" label="阿拉伯公会活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="葡萄牙语区总新增"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '葡萄牙语区总新增' + scope.row.date;
|
||||
edi(scope.row.prNewCountDetail, false);
|
||||
"
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.prNewCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="totalActiveCount"
|
||||
align="center"
|
||||
label="全服公会活跃度" />
|
||||
|
||||
<el-table-column align="center"
|
||||
label="阿拉伯公会活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="
|
||||
detailsTitle = '阿拉伯公会活跃度' + scope.row.date;
|
||||
edi(scope.row.arActiveCountDetail, true);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.arActiveCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语区活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语区活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语区活跃度' + scope.row.date;
|
||||
edi(scope.row.enActiveCountDetail, true);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.enActiveCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="华语区活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="华语区活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '华语区活跃度' + scope.row.date;
|
||||
edi(scope.row.zhActiveCountDetail, true);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.zhActiveCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="土耳其区活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="土耳其区活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '土耳其区活跃度' + scope.row.date;
|
||||
edi(scope.row.trActiveCountDetail, true);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.trActiveCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语2区活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语2区活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语2区活跃度' + scope.row.date;
|
||||
edi(scope.row.en2ActiveCountDetail, true);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.en2ActiveCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
label="葡萄牙语区活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="
|
||||
detailsTitle = '葡萄牙语区活跃度' + scope.row.date;
|
||||
edi(scope.row.prActiveCountDetail, true);
|
||||
"
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.prActiveCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
@@ -181,45 +206,44 @@
|
||||
/> -->
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="50%" center>
|
||||
<el-dialog v-model="detailsDialog"
|
||||
:title="detailsTitle"
|
||||
width="50%"
|
||||
center>
|
||||
<!-- 内表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="endDate" align="center" label="结束时间" />
|
||||
<el-table-column prop="guildId" align="center" label="公会ID" />
|
||||
<el-table-column prop="ownErbanNo" align="center" label="公会长ID" />
|
||||
<el-table-column
|
||||
prop="activeMemberCount"
|
||||
align="center"
|
||||
label="本周收礼主播数"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="guildGoldFlow"
|
||||
align="center"
|
||||
label="本周公会钻石流水"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="guildDiamondFlow"
|
||||
align="center"
|
||||
label="本周公会金币流水"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="lastGuildGoldFlow"
|
||||
align="center"
|
||||
label="上周公会钻石流水"
|
||||
v-if="detailsIsShow"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="guildGoldFlowWow"
|
||||
align="center"
|
||||
label="周环比"
|
||||
v-if="detailsIsShow"
|
||||
>
|
||||
<el-table v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="date"
|
||||
align="center"
|
||||
label="日期" />
|
||||
<el-table-column prop="endDate"
|
||||
align="center"
|
||||
label="结束时间" />
|
||||
<el-table-column prop="guildId"
|
||||
align="center"
|
||||
label="公会ID" />
|
||||
<el-table-column prop="ownErbanNo"
|
||||
align="center"
|
||||
label="公会长ID" />
|
||||
<el-table-column prop="activeMemberCount"
|
||||
align="center"
|
||||
label="本周收礼主播数" />
|
||||
<el-table-column prop="guildGoldFlow"
|
||||
align="center"
|
||||
label="本周公会钻石流水" />
|
||||
<el-table-column prop="guildDiamondFlow"
|
||||
align="center"
|
||||
label="本周公会金币流水" />
|
||||
<el-table-column prop="lastGuildGoldFlow"
|
||||
align="center"
|
||||
label="上周公会钻石流水"
|
||||
v-if="detailsIsShow" />
|
||||
<el-table-column prop="guildGoldFlowWow"
|
||||
align="center"
|
||||
label="周环比"
|
||||
v-if="detailsIsShow">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.lastGuildGoldFlow === 0 ? '--'
|
||||
@@ -231,9 +255,9 @@
|
||||
<!-- 操作 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" class="primary" @click="detailsDialog = false"
|
||||
>关闭</el-button
|
||||
>
|
||||
<el-button type="primary"
|
||||
class="primary"
|
||||
@click="detailsDialog = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -244,7 +268,7 @@ import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "guildStatisticsData",
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
// 查询条件
|
||||
@@ -264,12 +288,12 @@ export default {
|
||||
detailsIsShow: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = null;
|
||||
@@ -300,19 +324,19 @@ export default {
|
||||
});
|
||||
},
|
||||
// 详情
|
||||
edi(res, type) {
|
||||
edi (res, type) {
|
||||
this.detailsIsShow = type;
|
||||
this.tableDataIn = JSON.parse(res);
|
||||
this.detailsDialog = true;
|
||||
},
|
||||
formatPercentage(value) {
|
||||
formatPercentage (value) {
|
||||
return parseFloat((value * 100).toFixed(2));
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
|
@@ -1,113 +1,138 @@
|
||||
<template>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="accountCount" align="center" label="新总注册" />
|
||||
<el-table-column prop="userCount" align="center" label="新完善资料" />
|
||||
<el-table-column prop="userRatio" align="center" label="完善率" />
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="date"
|
||||
align="center"
|
||||
label="日期" />
|
||||
<el-table-column prop="accountCount"
|
||||
align="center"
|
||||
label="新总注册" />
|
||||
<el-table-column prop="userCount"
|
||||
align="center"
|
||||
label="新完善资料" />
|
||||
<el-table-column prop="userRatio"
|
||||
align="center"
|
||||
label="完善率" />
|
||||
|
||||
<el-table-column align="center" label="阿拉伯区新注册(完善资料)" width="">
|
||||
<el-table-column align="center"
|
||||
label="阿拉伯区新注册(完善资料)"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '阿拉伯区注册明细' + scope.row.date;
|
||||
edi(scope.row.arCountDetail, 2);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.arCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语区新注册(完善资料)" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语区新注册(完善资料)"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语区注册明细' + scope.row.date;
|
||||
edi(scope.row.enCountDetail, 1);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.enCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="华语区新注册(完善资料)" width="">
|
||||
<el-table-column align="center"
|
||||
label="华语区新注册(完善资料)"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '华语区注册明细' + scope.row.date;
|
||||
edi(scope.row.zhCountDetail, 4);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.zhCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="土耳其区新注册(完善资料)" width="">
|
||||
<el-table-column align="center"
|
||||
label="土耳其区新注册(完善资料)"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '土耳其区注册明细' + scope.row.date;
|
||||
edi(scope.row.trCountDetailt, 8);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.trCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语2区新注册(完善资料)" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语2区新注册(完善资料)"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语2区注册明细' + scope.row.date;
|
||||
edi(scope.row.en2CountDetail, 1);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.en2Count }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
label="葡萄牙语区新注册(完善资料)"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="
|
||||
detailsTitle = '葡萄牙语区注册明细' + scope.row.date;
|
||||
edi(scope.row.prCountDetailt, 32);
|
||||
"
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.prCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[20, 50, 100, 200, 500]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[20, 50, 100, 200, 500]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="30%" center>
|
||||
<el-dialog v-model="detailsDialog"
|
||||
:title="detailsTitle"
|
||||
width="30%"
|
||||
center>
|
||||
<!-- 内表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="regionDesc" align="center" label="国家" />
|
||||
<el-table-column prop="count" align="center" label="新注册(完善资料)" />
|
||||
<el-table-column prop="ratio" align="center" label="占比">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="regionDesc"
|
||||
align="center"
|
||||
label="国家" />
|
||||
<el-table-column prop="count"
|
||||
align="center"
|
||||
label="新注册(完善资料)" />
|
||||
<el-table-column prop="ratio"
|
||||
align="center"
|
||||
label="占比">
|
||||
<template v-slot="scope">
|
||||
{{ formatPercentage(scope.row.ratio) }}%
|
||||
</template>
|
||||
@@ -116,20 +141,19 @@
|
||||
<!-- 操作 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" class="primary" @click="detailsDialog = false"
|
||||
>关闭</el-button
|
||||
>
|
||||
<el-button type="primary"
|
||||
class="primary"
|
||||
@click="detailsDialog = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { dnuPage } from "@/api/statistics/statistics";
|
||||
import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "newOverview",
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
// 查询条件
|
||||
@@ -148,12 +172,12 @@ export default {
|
||||
tableDataIn: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
dnuPage({
|
||||
page: this.currentPage,
|
||||
@@ -173,7 +197,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 详情
|
||||
edi(res, type) {
|
||||
edi (res, type) {
|
||||
var jsonArr =
|
||||
// type == 0
|
||||
// ? res.totalDiamondDetail
|
||||
@@ -189,14 +213,14 @@ export default {
|
||||
(this.tableDataIn = JSON.parse(res));
|
||||
this.detailsDialog = true;
|
||||
},
|
||||
formatPercentage(value) {
|
||||
formatPercentage (value) {
|
||||
return parseFloat((value * 100).toFixed(2));
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
|
@@ -1,124 +1,143 @@
|
||||
<template>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="date" align="center" label="日期" />
|
||||
<el-table-column prop="totalCount" align="center" label="当天总活跃度">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="date"
|
||||
align="center"
|
||||
label="日期" />
|
||||
<el-table-column prop="totalCount"
|
||||
align="center"
|
||||
label="当天总活跃度">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '当天总活跃度' + scope.row.date;
|
||||
edi(scope.row.totalCountDetail, 2);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.totalCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="阿拉伯区总活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="阿拉伯区总活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '阿拉伯区总活跃度' + scope.row.date;
|
||||
edi(scope.row.arCountDetail, 2);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.arCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语区总活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语区总活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语区总活跃度' + scope.row.date;
|
||||
edi(scope.row.enCountDetail, 1);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.enCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="华语区总活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="华语区总活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '华语区总活跃度' + scope.row.date;
|
||||
edi(scope.row.zhCountDetail, 4);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.zhCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="土耳其区总活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="土耳其区总活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '土耳其区总活跃度' + scope.row.date;
|
||||
edi(scope.row.trCountDetail, 8);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.trCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="英语2区总活跃度" width="">
|
||||
<el-table-column align="center"
|
||||
label="英语2区总活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
detailsTitle = '英语2区总活跃度' + scope.row.date;
|
||||
edi(scope.row.en2CountDetail, 16);
|
||||
"
|
||||
type="text"
|
||||
size="small"
|
||||
>
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.en2Count }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
label="葡萄牙语区总活跃度"
|
||||
width="">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="
|
||||
detailsTitle = '葡萄牙语区总活跃度' + scope.row.date;
|
||||
edi(scope.row.prCountDetail, 32);
|
||||
"
|
||||
type="text"
|
||||
size="small">
|
||||
{{ scope.row.prCount }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[20, 50, 100, 200, 500]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[20, 50, 100, 200, 500]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
|
||||
<!-- 详情 -->
|
||||
<el-dialog v-model="detailsDialog" :title="detailsTitle" width="30%" center>
|
||||
<el-dialog v-model="detailsDialog"
|
||||
:title="detailsTitle"
|
||||
width="30%"
|
||||
center>
|
||||
<!-- 内表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="regionDesc" align="center" label="国家" />
|
||||
<el-table-column prop="count" align="center" label="活跃度" />
|
||||
<el-table-column prop="ratio" align="center" label="占比">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableDataIn"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="regionDesc"
|
||||
align="center"
|
||||
label="国家" />
|
||||
<el-table-column prop="count"
|
||||
align="center"
|
||||
label="活跃度" />
|
||||
<el-table-column prop="ratio"
|
||||
align="center"
|
||||
label="占比">
|
||||
<template v-slot="scope">
|
||||
{{ formatPercentage(scope.row.ratio) }}%
|
||||
</template>
|
||||
@@ -127,9 +146,9 @@
|
||||
<!-- 操作 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button type="primary" class="primary" @click="detailsDialog = false"
|
||||
>关闭</el-button
|
||||
>
|
||||
<el-button type="primary"
|
||||
class="primary"
|
||||
@click="detailsDialog = false">关闭</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -140,7 +159,7 @@ import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "overviewActiveStatistics",
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
// 查询条件
|
||||
@@ -159,12 +178,12 @@ export default {
|
||||
tableDataIn: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
dauPage({
|
||||
page: this.currentPage,
|
||||
@@ -184,7 +203,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 详情
|
||||
edi(res, type) {
|
||||
edi (res, type) {
|
||||
var jsonArr =
|
||||
// type == 0
|
||||
// ? res.totalDiamondDetail
|
||||
@@ -200,14 +219,14 @@ export default {
|
||||
(this.tableDataIn = JSON.parse(res));
|
||||
this.detailsDialog = true;
|
||||
},
|
||||
formatPercentage(value) {
|
||||
formatPercentage (value) {
|
||||
return parseFloat((value * 100).toFixed(2));
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,73 +2,100 @@
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>用户ID:</span>
|
||||
<el-input v-model="formData.erbanNo" placeholder="" class="input" />
|
||||
<el-input v-model="formData.erbanNo"
|
||||
placeholder=""
|
||||
class="input" />
|
||||
</div>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="packId" align="center" label="礼包ID" />
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-华语区">
|
||||
<el-button style=""
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<el-table v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="packId"
|
||||
align="center"
|
||||
label="礼包ID" />
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-华语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "zh")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-英语区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-英语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "en")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-阿语区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-阿语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "ar")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-土耳其区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-土耳其区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "tr")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||
<el-table-column prop="packNum" align="center" label="数量" />
|
||||
<el-table-column prop="remark" align="center" label="理由" />
|
||||
<el-table-column prop="createTime" align="center" label="发放时间">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-葡萄牙语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "pr")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="erbanNo"
|
||||
align="center"
|
||||
label="用户ID" />
|
||||
<el-table-column prop="packNum"
|
||||
align="center"
|
||||
label="数量" />
|
||||
<el-table-column prop="remark"
|
||||
align="center"
|
||||
label="理由" />
|
||||
<el-table-column prop="createTime"
|
||||
align="center"
|
||||
label="发放时间">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.createTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adminUser" align="center" label="操作人" />
|
||||
<el-table-column align="center" label="操作" width="220">
|
||||
<el-table-column prop="adminUser"
|
||||
align="center"
|
||||
label="操作人" />
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="packRecall(scope.row.id)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
v-if="scope.row.status == 1"
|
||||
>
|
||||
<el-button @click="packRecall(scope.row.id)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
v-if="scope.row.status == 1">
|
||||
撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -81,7 +108,7 @@ import {
|
||||
} from "@/api/giftPackCenter/giftPackCenter";
|
||||
export default {
|
||||
name: "distributionRecord",
|
||||
setup() {
|
||||
setup () {
|
||||
const formData = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -132,13 +159,13 @@ export default {
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
};
|
||||
const handleSizeChange = (val) => {
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.pageNo = val;
|
||||
getData();
|
||||
};
|
||||
formData.pageSize = val;
|
||||
getData();
|
||||
};
|
||||
const handleCurrentChange = (val) => {
|
||||
formData.pageNo = val;
|
||||
getData();
|
||||
};
|
||||
return {
|
||||
formData,
|
||||
tableData,
|
||||
|
@@ -1,358 +1,335 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button
|
||||
style=""
|
||||
type="primary"
|
||||
@click="
|
||||
<el-button style=""
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<el-button style=""
|
||||
type="primary"
|
||||
@click="
|
||||
addDialog = true;
|
||||
resetaddFormData();
|
||||
"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="packId" align="center" label="礼包ID" />
|
||||
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-华语区">
|
||||
">新增</el-button>
|
||||
<el-table v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="packId"
|
||||
align="center"
|
||||
label="礼包ID" />
|
||||
<el-table-column prop="partitionDesc"
|
||||
align="center"
|
||||
label="分区" />
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-华语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "zh")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-英语区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-英语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "en")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-阿语区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-阿语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "ar")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-土耳其区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-土耳其区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "tr")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" align="center" label="礼包状态">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-葡萄牙语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "pr")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status"
|
||||
align="center"
|
||||
label="礼包状态">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.status == 1 ? "有效" : "无效" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="imgUrl" align="center" label="礼包样式">
|
||||
<el-table-column prop="imgUrl"
|
||||
align="center"
|
||||
label="礼包样式">
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.imgUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.imgUrl ?? '']"
|
||||
fit="scale-down"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
<el-image style="width: 100px; height: 100px"
|
||||
:src="scope.row.imgUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.imgUrl ?? '']"
|
||||
fit="scale-down"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="创建时间">
|
||||
<el-table-column prop="createTime"
|
||||
align="center"
|
||||
label="创建时间">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.createTime }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="expireDay" align="center" label="礼包过期时间" />
|
||||
<el-table-column align="center" label="操作" width="220">
|
||||
<el-table-column prop="expireDay"
|
||||
align="center"
|
||||
label="礼包过期时间" />
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="detailPageFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>
|
||||
<el-button @click="detailPageFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">
|
||||
编辑礼包
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="getRewardList(scope.row.packId)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>
|
||||
<el-button @click="getRewardList(scope.row.packId)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">
|
||||
奖品列表
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
getAwardsFun(scope.row.partitionId);
|
||||
addFormData.packId = scope.row.packId;
|
||||
"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
style="margin-left: 0; margin-top: 10px"
|
||||
>
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
style="margin-left: 0; margin-top: 10px">
|
||||
添加奖品
|
||||
</el-button>
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
addFormData.packId = scope.row.packId;
|
||||
sendPackCenterDialog = true;
|
||||
"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
style="margin-top: 10px"
|
||||
>
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
style="margin-top: 10px">
|
||||
赠送礼包
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-dialog
|
||||
v-model="addDialog"
|
||||
:title="addFormData.packId == '' ? '新增' : '编辑'"
|
||||
width="28%"
|
||||
center
|
||||
>
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
<el-dialog v-model="addDialog"
|
||||
:title="addFormData.packId == '' ? '新增' : '编辑'"
|
||||
width="28%"
|
||||
center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼包名称-华语</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.packNameZh"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包名称-华语</span>
|
||||
<el-input v-model="addFormData.packNameZh"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼包名称-英语</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.packNameEn"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包名称-英语</span>
|
||||
<el-input v-model="addFormData.packNameEn"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼包名称-阿语</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.packNameAr"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包名称-阿语</span>
|
||||
<el-input v-model="addFormData.packNameAr"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼包名称-土耳其</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.packNameTr"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包名称-土耳其</span>
|
||||
<el-input v-model="addFormData.packNameTr"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包名称-葡萄牙语</span>
|
||||
<el-input v-model="addFormData.packNamePr"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="selectBox selectBoxImg">
|
||||
<span
|
||||
class="left"
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
>礼包样式</span
|
||||
>
|
||||
<span class="left"
|
||||
style="display: inline-block; margin-right: 20px; width: 100px">礼包样式</span>
|
||||
<!-- action="/admin/tencent/cos/upload/file" -->
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<img
|
||||
v-if="addFormData.imgUrl"
|
||||
:src="addFormData.imgUrl"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon">
|
||||
<el-upload class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError">
|
||||
<img v-if="addFormData.imgUrl"
|
||||
:src="addFormData.imgUrl"
|
||||
class="avatar" />
|
||||
<el-icon v-else
|
||||
class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>状态</span
|
||||
>
|
||||
<el-select v-model="addFormData.status" placeholder="请选择">
|
||||
<el-option label="有效" :value="1"></el-option>
|
||||
<el-option label="无效" :value="0"></el-option>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">状态</span>
|
||||
<el-select v-model="addFormData.status"
|
||||
placeholder="请选择">
|
||||
<el-option label="有效"
|
||||
:value="1"></el-option>
|
||||
<el-option label="无效"
|
||||
:value="0"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>分区</span
|
||||
>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">分区</span>
|
||||
<partition-select v-model:partition-id="addFormData.partitionId" />
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼包过期时间</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.expireDay"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包过期时间</span>
|
||||
<el-input v-model="addFormData.expireDay"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addFun()"> 确认 </el-button>
|
||||
<el-button type="primary"
|
||||
@click="addFun()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 详情表格 -->
|
||||
<el-dialog v-model="detailsDialog" title="奖品列表" width="50%" center>
|
||||
<el-dialog v-model="detailsDialog"
|
||||
title="奖品列表"
|
||||
width="50%"
|
||||
center>
|
||||
<!-- 内表格 -->
|
||||
<el-table
|
||||
v-loading="tableDetailData.loading"
|
||||
:data="tableDetailData.data"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="awardTypeName" align="center" label="类型">
|
||||
<el-table v-loading="tableDetailData.loading"
|
||||
:data="tableDetailData.data"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="awardTypeName"
|
||||
align="center"
|
||||
label="类型">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.awardTypeName + "-" + scope.row.awardName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="awardId" align="center" label="ID" />
|
||||
<el-table-column prop="awardNum" align="center" label="天数/数量" />
|
||||
<el-table-column prop="awardPic" align="center" label="样式">
|
||||
<el-table-column prop="awardId"
|
||||
align="center"
|
||||
label="ID" />
|
||||
<el-table-column prop="awardNum"
|
||||
align="center"
|
||||
label="天数/数量" />
|
||||
<el-table-column prop="awardPic"
|
||||
align="center"
|
||||
label="样式">
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="scope.row.awardPic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.awardPic ?? '']"
|
||||
fit="scale-down"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
<el-image style="width: 100px; height: 100px"
|
||||
:src="scope.row.awardPic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.awardPic ?? '']"
|
||||
fit="scale-down"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220">
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="delPageFun(scope.row.itemId)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>
|
||||
<el-button @click="delPageFun(scope.row.itemId)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="addRewardDialog" title="添加奖品" width="28%" center>
|
||||
<el-dialog v-model="addRewardDialog"
|
||||
title="添加奖品"
|
||||
width="28%"
|
||||
center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>添加奖品</span
|
||||
>
|
||||
<el-select v-model="addFormData.awardId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in awardsList"
|
||||
:key="item.awardId"
|
||||
:label="item.awardTypeName + '-' + item.awardName"
|
||||
:value="item.awardId"
|
||||
>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">添加奖品</span>
|
||||
<el-select v-model="addFormData.awardId"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in awardsList"
|
||||
:key="item.awardId"
|
||||
:label="item.awardTypeName + '-' + item.awardName"
|
||||
:value="item.awardId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="addRewardDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="addRewardFun()"> 确认 </el-button>
|
||||
<el-button type="primary"
|
||||
@click="addRewardFun()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="sendPackCenterDialog"
|
||||
title="赠送礼包"
|
||||
width="28%"
|
||||
center
|
||||
>
|
||||
<el-dialog v-model="sendPackCenterDialog"
|
||||
title="赠送礼包"
|
||||
width="28%"
|
||||
center>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>平台ID</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.erbanNo"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">平台ID</span>
|
||||
<el-input v-model="addFormData.erbanNo"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>礼包数量</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.packNum"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">礼包数量</span>
|
||||
<el-input v-model="addFormData.packNum"
|
||||
style="width: 50%"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px">
|
||||
<span
|
||||
style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label"
|
||||
>赠送理由</span
|
||||
>
|
||||
<el-input
|
||||
v-model="addFormData.remark"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
:rows="5"
|
||||
type="textarea"
|
||||
></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px; width: 100px"
|
||||
class="col-sm-2 control-label">赠送理由</span>
|
||||
<el-input v-model="addFormData.remark"
|
||||
style="width: 50%"
|
||||
class="input"
|
||||
:rows="5"
|
||||
type="textarea"></el-input>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="sendPackCenterDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="sendPackCenterFun()">
|
||||
<el-button type="primary"
|
||||
@click="sendPackCenterFun()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -379,7 +356,7 @@ export default {
|
||||
components: {
|
||||
PartitionSelect,
|
||||
},
|
||||
setup() {
|
||||
setup () {
|
||||
const formData = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -394,6 +371,7 @@ export default {
|
||||
packNameEn: "",
|
||||
packNameAr: "",
|
||||
packNameTr: "",
|
||||
packNamePr: "",
|
||||
awardId: "",
|
||||
erbanNo: "",
|
||||
packNum: "",
|
||||
@@ -439,6 +417,7 @@ export default {
|
||||
en: addFormData.packNameEn,
|
||||
ar: addFormData.packNameAr,
|
||||
tr: addFormData.packNameTr,
|
||||
pr: addFormData.packNamePr,
|
||||
}),
|
||||
partitionId: addFormData.partitionId,
|
||||
};
|
||||
@@ -473,6 +452,7 @@ export default {
|
||||
packNameEn: "",
|
||||
packNameAr: "",
|
||||
packNameTr: "",
|
||||
packNamePr: "",
|
||||
awardId: "",
|
||||
erbanNo: "",
|
||||
packNum: "",
|
||||
@@ -487,6 +467,7 @@ export default {
|
||||
addFormData.packNameEn = JSON.parse(row.packName).en;
|
||||
addFormData.packNameAr = JSON.parse(row.packName).ar;
|
||||
addFormData.packNameTr = JSON.parse(row.packName).tr;
|
||||
addFormData.packNamePr = JSON.parse(row.packName).pr;
|
||||
}
|
||||
addDialog.value = true;
|
||||
};
|
||||
|
@@ -2,63 +2,96 @@
|
||||
<div class="box">
|
||||
<div class="inquire">
|
||||
<span>用户ID:</span>
|
||||
<el-input v-model="formData.erbanNo" placeholder="" class="input" />
|
||||
<el-input v-model="formData.erbanNo"
|
||||
placeholder=""
|
||||
class="input" />
|
||||
</div>
|
||||
<el-button style="" type="primary" @click="getData()">查询</el-button>
|
||||
<el-table
|
||||
v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="packId" align="center" label="礼包ID" />
|
||||
<el-table-column prop="partitionDesc" align="center" label="分区" />
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-华语区">
|
||||
<el-button style=""
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<el-table v-loading="tableData.loading"
|
||||
:data="tableData.data"
|
||||
ref="multipleTable"
|
||||
@selection-change="handleSelectionChange"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="packId"
|
||||
align="center"
|
||||
label="礼包ID" />
|
||||
<el-table-column prop="partitionDesc"
|
||||
align="center"
|
||||
label="分区" />
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-华语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "zh")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-英语区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-英语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "en")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-阿语区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-阿语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "ar")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="packName" align="center" label="礼包名称-土耳其区">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-土耳其区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "tr")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="erbanNo" align="center" label="用户ID" />
|
||||
<el-table-column prop="nick" align="center" label="用户昵称" />
|
||||
<el-table-column prop="targeErbanNo" align="center" label="赠送用户ID" />
|
||||
<el-table-column prop="targeNick" align="center" label="赠送用户昵称" />
|
||||
<el-table-column prop="packNum" align="center" label="赠送/使用数量" />
|
||||
<el-table-column prop="packNum" align="center" label="赠送/使用数量" />
|
||||
<el-table-column prop="createTime" align="center" label="使用时间">
|
||||
<el-table-column prop="packName"
|
||||
align="center"
|
||||
label="礼包名称-葡萄牙语区">
|
||||
<template v-slot="scope">{{
|
||||
getJsonField(scope.row.packName, "pr")
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="erbanNo"
|
||||
align="center"
|
||||
label="用户ID" />
|
||||
<el-table-column prop="nick"
|
||||
align="center"
|
||||
label="用户昵称" />
|
||||
<el-table-column prop="targeErbanNo"
|
||||
align="center"
|
||||
label="赠送用户ID" />
|
||||
<el-table-column prop="targeNick"
|
||||
align="center"
|
||||
label="赠送用户昵称" />
|
||||
<el-table-column prop="packNum"
|
||||
align="center"
|
||||
label="赠送/使用数量" />
|
||||
<el-table-column prop="packNum"
|
||||
align="center"
|
||||
label="赠送/使用数量" />
|
||||
<el-table-column prop="createTime"
|
||||
align="center"
|
||||
label="使用时间">
|
||||
<template v-slot="scope">{{
|
||||
convertTimestamp(scope.row.createTime)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
:current-page="formData.pageNo"
|
||||
:page-size="formData.pageSize"
|
||||
:page-sizes="[20, 50, 100, 200]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="tableData.total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -68,7 +101,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { getUseRecordList } from "@/api/giftPackCenter/giftPackCenter";
|
||||
export default {
|
||||
name: "usageRecord",
|
||||
setup() {
|
||||
setup () {
|
||||
const formData = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -103,16 +136,16 @@ export default {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
const convertTimestamp = (time) => {
|
||||
const convertTimestamp = (time) => {
|
||||
let date = new Date(time);
|
||||
return date.format("yyyy-MM-dd hh:mm:ss");
|
||||
};
|
||||
return {
|
||||
formData,
|
||||
tableData,
|
||||
getData,
|
||||
getJsonField,
|
||||
convertTimestamp
|
||||
formData,
|
||||
tableData,
|
||||
getData,
|
||||
getJsonField,
|
||||
convertTimestamp
|
||||
};
|
||||
},
|
||||
};
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -6,60 +6,62 @@
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div id="toolbar" style="height: auto">
|
||||
<form
|
||||
id="searchForm"
|
||||
class=""
|
||||
action=""
|
||||
method="post"
|
||||
target="_blank"
|
||||
>
|
||||
<div id="toolbar"
|
||||
style="height: auto">
|
||||
<form id="searchForm"
|
||||
class=""
|
||||
action=""
|
||||
method="post"
|
||||
target="_blank">
|
||||
<div class="col-sm-12">
|
||||
<label for="type" class="col-sm-1 control-label"
|
||||
>资料卡类型:</label
|
||||
>
|
||||
<label for="type"
|
||||
class="col-sm-1 control-label">资料卡类型:</label>
|
||||
<div class="col-sm-2">
|
||||
<select
|
||||
name="type"
|
||||
id="type"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
>
|
||||
<option value="" selected="selected">全部</option>
|
||||
<select name="type"
|
||||
id="type"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control">
|
||||
<option value=""
|
||||
selected="selected">全部</option>
|
||||
<option value="1">普通</option>
|
||||
<option value="2">贵族</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label for="id" class="col-sm-1 control-label">资料卡id:</label>
|
||||
<label for="id"
|
||||
class="col-sm-1 control-label">资料卡id:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="id" id="id" />
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="id"
|
||||
id="id" />
|
||||
</div>
|
||||
|
||||
<label for="name" class="col-sm-1 control-label"
|
||||
>资料卡名称:</label
|
||||
>
|
||||
<label for="name"
|
||||
class="col-sm-1 control-label">资料卡名称:</label>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" name="name" id="name" />
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="name"
|
||||
id="name" />
|
||||
</div>
|
||||
|
||||
<label for="partitionId" class="col-sm-1 control-label"
|
||||
>地区:</label
|
||||
>
|
||||
<label for="partitionId"
|
||||
class="col-sm-1 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select
|
||||
name="partitionId"
|
||||
id="partitionId"
|
||||
class="form-control"
|
||||
></select>
|
||||
<select name="partitionId"
|
||||
id="partitionId"
|
||||
class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="col-sm-12">
|
||||
<button id="btnSearch" class="btn btn-default">
|
||||
<button id="btnSearch"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
<button id="btnAdd" class="btn btn-default">
|
||||
<button id="btnAdd"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-plus"></i>新增
|
||||
</button>
|
||||
</div>
|
||||
@@ -70,208 +72,198 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div
|
||||
class="modal fade"
|
||||
id="addModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content" style="width: 500px">
|
||||
<div class="modal fade"
|
||||
id="addModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content"
|
||||
style="width: 500px">
|
||||
<div class="modal-header">
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">新增资料卡</h4>
|
||||
<h4 class="modal-title"
|
||||
id="modalLabel">新增资料卡</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<input type="hidden" name="id" id="modal_id" />
|
||||
<form class="form-horizontal"
|
||||
id="addForm">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
id="modal_id" />
|
||||
<div class="form-group">
|
||||
<label for="partitionFlag" class="col-sm-4 control-label"
|
||||
>选择分区</label
|
||||
>
|
||||
<label for="partitionFlag"
|
||||
class="col-sm-4 control-label">选择分区</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="1"
|
||||
/>英语区<br />
|
||||
<input
|
||||
type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="2"
|
||||
/>阿拉伯语区<br />
|
||||
<input
|
||||
type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="4"
|
||||
/>华语区<br />
|
||||
<input
|
||||
type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="8"
|
||||
/>土耳其<br />
|
||||
<input
|
||||
type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="16"
|
||||
/>英语2区<br />
|
||||
<input type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="1" />英语区<br />
|
||||
<input type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="2" />阿拉伯语区<br />
|
||||
<input type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="4" />华语区<br />
|
||||
<input type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="8" />土耳其<br />
|
||||
<input type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="16" />英语2区<br />
|
||||
<input type="checkbox"
|
||||
name="partitionFlag"
|
||||
value="32" />葡萄牙语区<br />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_type" class="col-sm-4 control-label"
|
||||
>装扮类型:</label
|
||||
>
|
||||
<label for="modal_type"
|
||||
class="col-sm-4 control-label">装扮类型:</label>
|
||||
<div class="col-sm-6">
|
||||
<select
|
||||
name="type"
|
||||
id="modal_type"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
>
|
||||
<select name="type"
|
||||
id="modal_type"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control">
|
||||
<option value="1">普通装扮</option>
|
||||
<option value="2">贵族装扮</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_name" class="col-sm-4 control-label"
|
||||
>装扮名称:</label
|
||||
>
|
||||
<label for="modal_name"
|
||||
class="col-sm-4 control-label">装扮名称:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="modal_name"
|
||||
placeholder="请输入资料卡名称"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="modal_name"
|
||||
placeholder="请输入资料卡名称" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ar_modal_name" class="col-sm-4 control-label"
|
||||
>阿语装扮名称:</label
|
||||
>
|
||||
<label for="en_modal_name"
|
||||
class="col-sm-4 control-label">英语装扮名称:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="ar_modal_name"
|
||||
placeholder="请输入资料卡名称"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="en_modal_name"
|
||||
placeholder="请输入资料卡名称" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="en_modal_name" class="col-sm-4 control-label"
|
||||
>英语装扮名称:</label
|
||||
>
|
||||
<label for="ar_modal_name"
|
||||
class="col-sm-4 control-label">阿语装扮名称:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="en_modal_name"
|
||||
placeholder="请输入资料卡名称"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="ar_modal_name"
|
||||
placeholder="请输入资料卡名称" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tr_modal_name" class="col-sm-4 control-label"
|
||||
>土耳其装扮名称:</label
|
||||
>
|
||||
<label for="tr_modal_name"
|
||||
class="col-sm-4 control-label">土耳其装扮名称:</label>
|
||||
<div class="col-sm-6">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="tr_modal_name"
|
||||
placeholder="请输入资料卡名称"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="tr_modal_name"
|
||||
placeholder="请输入资料卡名称" />
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" id="addForm1">
|
||||
<div class="form-group">
|
||||
<label for="pr_modal_name"
|
||||
class="col-sm-4 control-label">葡萄牙语装扮名称:</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="pr_modal_name"
|
||||
placeholder="请输入资料卡名称" />
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal"
|
||||
id="addForm1">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">图片:</label>
|
||||
<div class="col-sm-6">
|
||||
<img src="" id="addIconPicUrl" style="height: 44px" alt="" />
|
||||
<input
|
||||
type="file"
|
||||
id="addUploadIconPic"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,.mp4"
|
||||
/>
|
||||
<button class="btn btn-success" type="button" id="uploadBtn">
|
||||
<img src=""
|
||||
id="addIconPicUrl"
|
||||
style="height: 44px"
|
||||
alt="" />
|
||||
<input type="file"
|
||||
id="addUploadIconPic"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,.mp4" />
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
id="uploadBtn">
|
||||
上传
|
||||
</button>
|
||||
<input
|
||||
type="hidden"
|
||||
id="pic"
|
||||
name="pic"
|
||||
class="form-control"
|
||||
/>
|
||||
<a href="javascript:void(0)" id="removeIconPic">清除</a>
|
||||
<input type="hidden"
|
||||
id="pic"
|
||||
name="pic"
|
||||
class="form-control" />
|
||||
<a href="javascript:void(0)"
|
||||
id="removeIconPic">清除</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group">
|
||||
<label for="effectType" class="col-sm-4 control-label"
|
||||
>装扮动效图片类型:</label
|
||||
>
|
||||
<label for="effectType"
|
||||
class="col-sm-4 control-label">装扮动效图片类型:</label>
|
||||
<div class="col-sm-6">
|
||||
<select
|
||||
name="effectType"
|
||||
id="effectType"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
>
|
||||
<select name="effectType"
|
||||
id="effectType"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control">
|
||||
<option value="0">图片</option>
|
||||
<option value="1">MP4</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<form class="form-horizontal" id="addForm2">
|
||||
<form class="form-horizontal"
|
||||
id="addForm2">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">装扮动效图片:</label>
|
||||
<div class="col-sm-6">
|
||||
<img src="" id="addIconPicUrl2" style="height: 44px" alt="" />
|
||||
<input
|
||||
type="file"
|
||||
id="addEffect"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,.mp4"
|
||||
/>
|
||||
<button class="btn btn-success" type="button" id="uploadBtn2">
|
||||
<img src=""
|
||||
id="addIconPicUrl2"
|
||||
style="height: 44px"
|
||||
alt="" />
|
||||
<input type="file"
|
||||
id="addEffect"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg,.mp4" />
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
id="uploadBtn2">
|
||||
上传
|
||||
</button>
|
||||
<input
|
||||
type="hidden"
|
||||
id="effect"
|
||||
name="effect"
|
||||
class="form-control"
|
||||
/>
|
||||
<a href="javascript:void(0)" id="removeIconPic2">清除</a>
|
||||
<input type="hidden"
|
||||
id="effect"
|
||||
name="effect"
|
||||
class="form-control" />
|
||||
<a href="javascript:void(0)"
|
||||
id="removeIconPic2">清除</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="form-group">
|
||||
<label for="status" class="col-sm-4 control-label"
|
||||
>装扮状态:</label
|
||||
>
|
||||
<label for="status"
|
||||
class="col-sm-4 control-label">装扮状态:</label>
|
||||
<div class="col-sm-6">
|
||||
<select
|
||||
name="status"
|
||||
id="status"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
>
|
||||
<select name="status"
|
||||
id="status"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control">
|
||||
<option value="1">有效</option>
|
||||
<option value="2">无效</option>
|
||||
</select>
|
||||
@@ -281,10 +273,14 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="button-save">
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="button-save">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
@@ -293,71 +289,71 @@
|
||||
</div>
|
||||
|
||||
<!-- 为用户赠送铭牌弹窗 -->
|
||||
<div
|
||||
class="modal fade"
|
||||
id="sendModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal fade"
|
||||
id="sendModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">x</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalSendLabel">赠送装扮</h4>
|
||||
<h4 class="modal-title"
|
||||
id="modalSendLabel">赠送装扮</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="sendForm">
|
||||
<input type="hidden" name="id" id="sendId" />
|
||||
<form class="form-horizontal"
|
||||
id="sendForm">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
id="sendId" />
|
||||
<div class="form-group">
|
||||
<label for="sendErbanNo" class="col-sm-3 control-label">ID</label>
|
||||
<label for="sendErbanNo"
|
||||
class="col-sm-3 control-label">ID</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea
|
||||
name="erbanNos"
|
||||
id="sendErbanNo"
|
||||
class="form-control validate[required]"
|
||||
placeholder="多个ID使用,分隔,一次性不得超过100个"
|
||||
></textarea>
|
||||
<textarea name="erbanNos"
|
||||
id="sendErbanNo"
|
||||
class="form-control validate[required]"
|
||||
placeholder="多个ID使用,分隔,一次性不得超过100个"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDays" class="col-sm-3 control-label"
|
||||
>赠送天数</label
|
||||
>
|
||||
<label for="sendDays"
|
||||
class="col-sm-3 control-label">赠送天数</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
name="days"
|
||||
id="sendDays"
|
||||
class="form-control validate[required]"
|
||||
/>
|
||||
<input type="text"
|
||||
name="days"
|
||||
id="sendDays"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDesc" class="col-sm-3 control-label">备注</label>
|
||||
<label for="sendDesc"
|
||||
class="col-sm-3 control-label">备注</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
name="remake"
|
||||
id="sendDesc"
|
||||
class="form-control validate[required]"
|
||||
/>
|
||||
<input type="text"
|
||||
name="remake"
|
||||
id="sendDesc"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="send">提交</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="send">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -371,17 +367,17 @@ import { buildSelectOption } from "@/utils/system-helper";
|
||||
|
||||
export default {
|
||||
name: "InfocardManageView",
|
||||
setup() {
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
initData () {
|
||||
$(function () {
|
||||
$("#table").bootstrapTable("destroy");
|
||||
$("#table").bootstrapTable({
|
||||
@@ -409,6 +405,9 @@ export default {
|
||||
if ((val & 16) != 0) {
|
||||
value += "英语2区<br>";
|
||||
}
|
||||
if ((val & 32) != 0) {
|
||||
value += "葡萄牙语<br>";
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
@@ -436,6 +435,12 @@ export default {
|
||||
align: "middle",
|
||||
width: "5%",
|
||||
},
|
||||
{
|
||||
field: "name.pr",
|
||||
title: "葡萄牙语装扮名称",
|
||||
align: "middle",
|
||||
width: "5%",
|
||||
},
|
||||
{
|
||||
field: "pic",
|
||||
title: "装扮图片",
|
||||
@@ -560,14 +565,14 @@ export default {
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [10, 20, 30, 50],
|
||||
pageList: [20, 50],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "-",
|
||||
uniqueId: "id",
|
||||
queryParams: function queryParams(params) {
|
||||
queryParams: function queryParams (params) {
|
||||
//设置查询参数
|
||||
var param = {
|
||||
page: params.pageNumber,
|
||||
@@ -599,6 +604,8 @@ export default {
|
||||
zh: value,
|
||||
ar: value,
|
||||
en: value,
|
||||
tr: value,
|
||||
pr: value,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
@@ -640,7 +647,9 @@ export default {
|
||||
name &&
|
||||
Object.prototype.hasOwnProperty.call(name, "zh") &&
|
||||
Object.prototype.hasOwnProperty.call(name, "ar") &&
|
||||
Object.prototype.hasOwnProperty.call(name, "en")
|
||||
Object.prototype.hasOwnProperty.call(name, "en") &&
|
||||
Object.prototype.hasOwnProperty.call(name, "tr") &&
|
||||
Object.prototype.hasOwnProperty.call(name, "pr")
|
||||
) {
|
||||
$("#addForm #modal_name").val(row.name.zh);
|
||||
// 阿语
|
||||
@@ -649,6 +658,7 @@ export default {
|
||||
$("#addForm #en_modal_name").val(row.name.en);
|
||||
// 土耳其
|
||||
$("#addForm #tr_modal_name").val(row.name.tr);
|
||||
$("#addForm #pr_modal_name").val(row.name.pr);
|
||||
} else {
|
||||
$("#addForm #modal_name").val(name);
|
||||
// 阿语
|
||||
@@ -657,6 +667,7 @@ export default {
|
||||
$("#addForm #en_modal_name").val(name);
|
||||
// 土耳其
|
||||
$("#addForm #tr_modal_name").val(name);
|
||||
$("#addForm #pr_modal_name").val(name);
|
||||
}
|
||||
$("#addIconPicUrl").attr("src", row.pic);
|
||||
$("#addIconPicUrl2").attr("src", row.effect);
|
||||
@@ -691,6 +702,11 @@ export default {
|
||||
} else {
|
||||
$("input:checkbox[name='partitionFlag']")[4].checked = false;
|
||||
}
|
||||
if ((partitionFlag & 32) != 0) {
|
||||
$("input:checkbox[name='partitionFlag']")[5].checked = true;
|
||||
} else {
|
||||
$("input:checkbox[name='partitionFlag']")[5].checked = false;
|
||||
}
|
||||
$("#addModal").modal("show");
|
||||
});
|
||||
|
||||
@@ -755,6 +771,7 @@ export default {
|
||||
var arName = $("#ar_modal_name").val();
|
||||
var enName = $("#en_modal_name").val();
|
||||
var trName = $("#tr_modal_name").val();
|
||||
var prName = $("#pr_modal_name").val();
|
||||
//做下数据校验
|
||||
if (isEmpty(name)) {
|
||||
$("#tipMsg").text("装扮名字不能为空");
|
||||
@@ -776,6 +793,11 @@ export default {
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
if (isEmpty(prName)) {
|
||||
$("#tipMsg").text("葡萄牙装扮名字不能为空");
|
||||
$("#tipModal").modal("show");
|
||||
return;
|
||||
}
|
||||
if (isEmpty(pic)) {
|
||||
$("#tipMsg").text("图片不能为空");
|
||||
$("#tipModal").modal("show");
|
||||
@@ -792,7 +814,7 @@ export default {
|
||||
}, {});
|
||||
|
||||
// 国际化字段
|
||||
var jsonName = { zh: name, ar: arName, en: enName, tr: trName };
|
||||
var jsonName = { zh: name, ar: arName, en: enName, tr: trName, pr: prName };
|
||||
const nameValue = JSON.stringify(jsonName);
|
||||
// 修改属性值
|
||||
formData.name = nameValue; // 将giftName修改为"newGiftName"
|
||||
@@ -809,7 +831,7 @@ export default {
|
||||
// 将修改后的对象转换回序列化字符串
|
||||
formData.pic = $('#addIconPicUrl').attr('src');
|
||||
formData.effect = $('#addIconPicUrl2').attr('src');
|
||||
console.log(formData,2222222222222);
|
||||
console.log(formData, 2222222222222);
|
||||
let newSerializeStr = $.param(formData);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
@@ -915,7 +937,7 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
initPartition() {
|
||||
initPartition () {
|
||||
getPartitionInfoList().then((res) => {
|
||||
let data = res.data;
|
||||
buildSelectOption(
|
||||
@@ -940,7 +962,7 @@ export default {
|
||||
},
|
||||
};
|
||||
|
||||
function cleanModal() {
|
||||
function cleanModal () {
|
||||
$("#id").val("");
|
||||
$("#addIconPicUrl").attr("src", "");
|
||||
$("#addIconPicUrl2").attr("src", "");
|
||||
@@ -958,7 +980,7 @@ function cleanModal() {
|
||||
});
|
||||
}
|
||||
//判断空值
|
||||
function isEmpty(data) {
|
||||
function isEmpty (data) {
|
||||
if (data == null || data == undefined || data == "") {
|
||||
return true;
|
||||
}
|
||||
|
@@ -3,75 +3,136 @@
|
||||
<!-- 查询 -->
|
||||
<div class="inquire">
|
||||
<span>勋章ID</span>
|
||||
<el-input v-model="inquire.id" placeholder="" class="input"></el-input>
|
||||
<el-input v-model="inquire.id"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>勋章昵称</span>
|
||||
<el-input v-model="inquire.nick" placeholder="" class="input"></el-input>
|
||||
<el-input v-model="inquire.nick"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span class="demonstration">分区</span>
|
||||
<partition-select v-model:partition-id="inquire.partitionId" v-model:partition-infos="inquire.options"
|
||||
v-model:after-init="afterPartitionInit" />
|
||||
<partition-select v-model:partition-id="inquire.partitionId"
|
||||
v-model:partition-infos="inquire.options"
|
||||
v-model:after-init="afterPartitionInit" />
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()">
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="getData()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button class="primary" type="primary" @click="add()"> 新增 </el-button>
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="add()"> 新增 </el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table v-loading="loading" :data="tableData" border style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="id" align="center" label="勋章ID" />
|
||||
<el-table-column prop="partitionFlag" align="center" label="地区">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="id"
|
||||
align="center"
|
||||
label="勋章ID" />
|
||||
<el-table-column prop="partitionFlag"
|
||||
align="center"
|
||||
label="地区">
|
||||
<template v-slot="scope">{{
|
||||
partitionFlagFun(scope.row.partitionFlag, 1)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-华语区">
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="勋章名称-华语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.name, 'zh') }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-英语区">
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="勋章名称-英语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.name, 'en') }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-阿语区">
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="勋章名称-阿语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.name, 'ar') }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" align="center" label="勋章名称-土耳其区">
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="勋章名称-土耳其区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.name, 'tr') }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="medalDesc" align="center" label="勋章获得方式-华语区">
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="勋章名称-葡萄牙语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.name, 'pr') }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="medalDesc"
|
||||
align="center"
|
||||
label="勋章获得方式-华语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.medalDesc, 'zh')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="medalDesc" align="center" label="勋章获得方式-英语区">
|
||||
<el-table-column prop="medalDesc"
|
||||
align="center"
|
||||
label="勋章获得方式-英语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.medalDesc, 'en')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="medalDesc" align="center" label="勋章获得方式-阿语区">
|
||||
<el-table-column prop="medalDesc"
|
||||
align="center"
|
||||
label="勋章获得方式-阿语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.medalDesc, 'ar')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="medalDesc" align="center" label="勋章获得方式-土耳其区">
|
||||
<el-table-column prop="medalDesc"
|
||||
align="center"
|
||||
label="勋章获得方式-土耳其区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.medalDesc, 'tr')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="picUrl" label="勋章图片" width="120">
|
||||
<el-table-column prop="medalDesc"
|
||||
align="center"
|
||||
label="勋章获得方式-葡萄牙语区">
|
||||
<template v-slot="scope">{{ getJsonField(scope.row.medalDesc, 'pr')}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center"
|
||||
prop="picUrl"
|
||||
label="勋章图片"
|
||||
width="120">
|
||||
<template v-slot="scope">
|
||||
<el-image style="width: 100px; height: 100px" :src="scope.row.picUrl" :zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.picUrl ?? '']" fit="scale-down" preview-teleported="true"
|
||||
hide-on-click-modal="true" />
|
||||
<el-image style="width: 100px; height: 100px"
|
||||
:src="scope.row.picUrl"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.picUrl ?? '']"
|
||||
fit="scale-down"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="enable" align="center" label="状态">
|
||||
<el-table-column prop="enable"
|
||||
align="center"
|
||||
label="状态">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.enable ? "生效" : "不生效"
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="添加时间" />
|
||||
<el-table-column align="center" label="操作" width="220">
|
||||
<el-table-column prop="createTime"
|
||||
align="center"
|
||||
label="添加时间" />
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="eidFun(scope.row)" class="primary" type="primary" size="default">
|
||||
<el-button @click="eidFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button @click="grantFun(scope.row)" class="primary" type="primary" size="default"
|
||||
:disabled="!scope.row.enable">
|
||||
<el-button @click="grantFun(scope.row)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
:disabled="!scope.row.enable">
|
||||
发放
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -79,95 +140,172 @@
|
||||
</el-table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination style="margin-top: 10px" class="paginationClass" v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next" :total="total" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[20, 30, 50, 100, 200, 500]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
|
||||
<!-- 新增&编辑弹窗 -->
|
||||
<el-dialog destroy-on-close class="pub" v-model="controlsDialog" :title="controlsTitle" width="32%" center>
|
||||
<el-dialog destroy-on-close
|
||||
class="pub"
|
||||
v-model="controlsDialog"
|
||||
:title="controlsTitle"
|
||||
width="32%"
|
||||
center>
|
||||
<!-- 地区 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">地区</span>
|
||||
<el-select multiple filterable v-model="controlsObj.value" placeholder="请选择" style="width: 100%">
|
||||
<el-option v-for="item in controlsObj.options" :key="item.id" :label="item.desc" :value="item.id">
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">地区</span>
|
||||
<el-select multiple
|
||||
filterable
|
||||
v-model="controlsObj.value"
|
||||
placeholder="请选择"
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in controlsObj.options"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 勋章名称-华语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章名称-华语</span>
|
||||
<el-input v-model="controlsObj.nickZh" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章名称-华语</span>
|
||||
<el-input v-model="controlsObj.nickZh"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章名称-英语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章名称-英语</span>
|
||||
<el-input v-model="controlsObj.nickEn" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章名称-英语</span>
|
||||
<el-input v-model="controlsObj.nickEn"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章名称-阿语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章名称-阿语</span>
|
||||
<el-input v-model="controlsObj.nickAr" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章名称-阿语</span>
|
||||
<el-input v-model="controlsObj.nickAr"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<!-- 勋章名称-土耳其 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章名称-土耳其</span>
|
||||
<el-input v-model="controlsObj.nickTr" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章名称-土耳其</span>
|
||||
<el-input v-model="controlsObj.nickTr"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章名称-葡萄牙语</span>
|
||||
<el-input v-model="controlsObj.nickPr"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章获得方式-华语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章获得方式-华语</span>
|
||||
<el-input v-model="controlsObj.medalDescZh" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章获得方式-华语</span>
|
||||
<el-input v-model="controlsObj.medalDescZh"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章获得方式-英语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章获得方式-英语</span>
|
||||
<el-input v-model="controlsObj.medalDescEn" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章获得方式-英语</span>
|
||||
<el-input v-model="controlsObj.medalDescEn"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章获得方式-阿语 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章获得方式-阿语</span>
|
||||
<el-input v-model="controlsObj.medalDescAr" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章获得方式-阿语</span>
|
||||
<el-input v-model="controlsObj.medalDescAr"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<!-- 勋章获得方式-土耳其 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章获得方式-土耳其</span>
|
||||
<el-input v-model="controlsObj.medalDescTr" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章获得方式-土耳其</span>
|
||||
<el-input v-model="controlsObj.medalDescTr"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章获得方式-葡萄牙语</span>
|
||||
<el-input v-model="controlsObj.medalDescPr"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 勋章图片 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章图片</span>
|
||||
<el-upload class="avatar-uploader" action="/admin/tencent/cos/upload/file" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload" :on-error="handleAvatarError">
|
||||
<img :src="controlsObj.imageUrl1" class="avatar" />
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章图片</span>
|
||||
<el-upload class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError">
|
||||
<img :src="controlsObj.imageUrl1"
|
||||
class="avatar" />
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
<!-- 动态图 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章动态图</span>
|
||||
<el-upload class="avatar-uploader input" action="/admin/tencent/cos/upload/file" :show-file-list="false"
|
||||
:on-success="handleAvatarSuccess2" :before-upload="beforeAvatarUploadMp4" :on-error="handleAvatarError">
|
||||
<video v-if="controlsObj.imageUrl2" :key="controlsObj.imageUrl2" autoplay width="320" height="240"
|
||||
controls="controls">
|
||||
<source :src="controlsObj.imageUrl2" type="video/mp4" />
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章动态图</span>
|
||||
<el-upload class="avatar-uploader input"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess2"
|
||||
:before-upload="beforeAvatarUploadMp4"
|
||||
:on-error="handleAvatarError">
|
||||
<video v-if="controlsObj.imageUrl2"
|
||||
:key="controlsObj.imageUrl2"
|
||||
autoplay
|
||||
width="320"
|
||||
height="240"
|
||||
controls="controls">
|
||||
<source :src="controlsObj.imageUrl2"
|
||||
type="video/mp4" />
|
||||
</video>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
<!-- 状态 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">状态</span>
|
||||
<el-select filterable v-model="controlsObj.value2" placeholder="请选择">
|
||||
<el-option v-for="item in controlsObj.options2" :key="item.id" :label="item.desc"
|
||||
:value="item.id"></el-option>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">状态</span>
|
||||
<el-select filterable
|
||||
v-model="controlsObj.value2"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in controlsObj.options2"
|
||||
:key="item.id"
|
||||
:label="item.desc"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
@@ -175,7 +313,8 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="controlsDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="controlsDialogOut()">
|
||||
<el-button type="primary"
|
||||
@click="controlsDialogOut()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -183,37 +322,57 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 发放勋章弹窗 -->
|
||||
<el-dialog destroy-on-close class="pub" v-model="grantDialog" title="发放勋章" width="32%" center>
|
||||
<el-dialog destroy-on-close
|
||||
class="pub"
|
||||
v-model="grantDialog"
|
||||
title="发放勋章"
|
||||
width="32%"
|
||||
center>
|
||||
<!-- 勋章名称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">勋章名称</span>
|
||||
<el-input v-model="grantObj.nick" placeholder="默认展示的是中文勋章名称" class="input" disabled></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">勋章名称</span>
|
||||
<el-input v-model="grantObj.nick"
|
||||
placeholder="默认展示的是中文勋章名称"
|
||||
class="input"
|
||||
disabled></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 发放对象平台号 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">发放对象平台号</span>
|
||||
<el-input type="textarea" :rows="2" v-model="grantObj.userId" placeholder="多个平台号用英文“,”号分开分隔"
|
||||
class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">发放对象平台号</span>
|
||||
<el-input type="textarea"
|
||||
:rows="2"
|
||||
v-model="grantObj.userId"
|
||||
placeholder="多个平台号用英文“,”号分开分隔"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 发放天数 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">发放天数</span>
|
||||
<el-input v-model="grantObj.days" placeholder="输入天数,不输入则视为无限制" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">发放天数</span>
|
||||
<el-input v-model="grantObj.days"
|
||||
placeholder="输入天数,不输入则视为无限制"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 备注 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px; display: flex">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">备注</span>
|
||||
<el-input v-model="grantObj.desc" placeholder="" class="input"></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">备注</span>
|
||||
<el-input v-model="grantObj.desc"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
|
||||
<!-- 弹窗按钮 -->
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="grantDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="grantOut()"> 确认 </el-button>
|
||||
<el-button type="primary"
|
||||
@click="grantOut()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -230,7 +389,7 @@ import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||
export default {
|
||||
name: "MedalInfo",
|
||||
components: { PartitionSelect },
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
@@ -238,7 +397,7 @@ export default {
|
||||
id: "",
|
||||
nick: "",
|
||||
partitionId: undefined,
|
||||
options:[]
|
||||
options: []
|
||||
},
|
||||
// 表格
|
||||
tableData: [],
|
||||
@@ -257,6 +416,7 @@ export default {
|
||||
nickEn: "",
|
||||
nickAr: "",
|
||||
nickTr: "",
|
||||
nickPr: "",
|
||||
imageUrl1: "",
|
||||
imageUrl2: '',
|
||||
value2: "",
|
||||
@@ -264,6 +424,7 @@ export default {
|
||||
medalDescEn: '',
|
||||
medalDescAr: '',
|
||||
medalDescTr: '',
|
||||
medalDescPr: '',
|
||||
options2: [
|
||||
{
|
||||
desc: "生效",
|
||||
@@ -288,12 +449,12 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
afterPartitionInit() {
|
||||
afterPartitionInit () {
|
||||
this.controlsObj.options = this.inquire.options;
|
||||
this.getData();
|
||||
},
|
||||
// 查询接口
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
medalPage({
|
||||
id: this.inquire.id,
|
||||
@@ -316,7 +477,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
add() {
|
||||
add () {
|
||||
this.controlsTitle = "新增";
|
||||
this.controlsType = 1;
|
||||
this.controlsObj.value = [];
|
||||
@@ -324,17 +485,19 @@ export default {
|
||||
this.controlsObj.nickEn = "";
|
||||
this.controlsObj.nickAr = "";
|
||||
this.controlsObj.nickTr = "";
|
||||
this.controlsObj.nickPr = "";
|
||||
this.controlsObj.imageUrl1 = "";
|
||||
this.controlsObj.imageUrl2 = "";
|
||||
this.controlsObj.medalDescZh = "";
|
||||
this.controlsObj.medalDescEn = "";
|
||||
this.controlsObj.medalDescAr = "";
|
||||
this.controlsObj.medalDescTr = "";
|
||||
this.controlsObj.medalDescPr = "";
|
||||
this.controlsObj.value2 = "";
|
||||
this.controlsDialog = true;
|
||||
},
|
||||
// 编辑
|
||||
eidFun(val) {
|
||||
eidFun (val) {
|
||||
this.controlsTitle = "编辑";
|
||||
this.controlsType = 2;
|
||||
this.controlsObj.value = this.partitionFlagFun(val.partitionFlag, 2);
|
||||
@@ -342,11 +505,13 @@ export default {
|
||||
this.controlsObj.nickEn = JSON.parse(val.name).en;
|
||||
this.controlsObj.nickAr = JSON.parse(val.name).ar;
|
||||
this.controlsObj.nickTr = JSON.parse(val.name).tr;
|
||||
this.controlsObj.nickPr = JSON.parse(val.name).pr;
|
||||
if (val.medalDesc) {
|
||||
this.controlsObj.medalDescZh = JSON.parse(val.medalDesc).zh;
|
||||
this.controlsObj.medalDescEn = JSON.parse(val.medalDesc).en;
|
||||
this.controlsObj.medalDescAr = JSON.parse(val.medalDesc).ar;
|
||||
this.controlsObj.medalDescTr = JSON.parse(val.medalDesc).tr;
|
||||
this.controlsObj.medalDescPr = JSON.parse(val.medalDesc).pr;
|
||||
}
|
||||
this.controlsObj.imageUrl1 = val.picUrl;
|
||||
this.controlsObj.imageUrl2 = val.mp4Url;
|
||||
@@ -355,7 +520,7 @@ export default {
|
||||
this.controlsDialog = true;
|
||||
},
|
||||
// 确认保存按钮
|
||||
controlsDialogOut() {
|
||||
controlsDialogOut () {
|
||||
if (this.controlsType == 1) {
|
||||
// 新增
|
||||
var obj = {};
|
||||
@@ -371,6 +536,7 @@ export default {
|
||||
en: this.controlsObj.nickEn,
|
||||
ar: this.controlsObj.nickAr,
|
||||
tr: this.controlsObj.nickTr,
|
||||
pr: this.controlsObj.nickPr,
|
||||
});
|
||||
|
||||
obj.medalDesc = JSON.stringify({
|
||||
@@ -378,6 +544,7 @@ export default {
|
||||
en: this.controlsObj.medalDescEn,
|
||||
ar: this.controlsObj.medalDescAr,
|
||||
tr: this.controlsObj.medalDescTr,
|
||||
pr: this.controlsObj.medalDescPr,
|
||||
});
|
||||
obj.picUrl = this.controlsObj.imageUrl1;
|
||||
obj.mp4Url = this.controlsObj.imageUrl2;
|
||||
@@ -408,20 +575,20 @@ export default {
|
||||
en: this.controlsObj.nickEn,
|
||||
ar: this.controlsObj.nickAr,
|
||||
tr: this.controlsObj.nickTr,
|
||||
pr: this.controlsObj.nickPr,
|
||||
});
|
||||
obj1.medalDesc = JSON.stringify({
|
||||
zh: this.controlsObj.medalDescZh,
|
||||
en: this.controlsObj.medalDescEn,
|
||||
ar: this.controlsObj.medalDescAr,
|
||||
tr: this.controlsObj.medalDescTr,
|
||||
pr: this.controlsObj.medalDescPr,
|
||||
});
|
||||
obj1.picUrl = this.controlsObj.imageUrl1;
|
||||
obj1.mp4Url = this.controlsObj.imageUrl2;
|
||||
obj1.enable = this.controlsObj.value2;
|
||||
obj1.id = this.controlsObj.id;
|
||||
console.log(1111111111, this.controlsObj.value);
|
||||
console.log(this.controlsObj.options);
|
||||
console.log(obj1);
|
||||
|
||||
medalSave(obj1).then((res) => {
|
||||
if (res.code == 200) {
|
||||
this.getData();
|
||||
@@ -437,13 +604,13 @@ export default {
|
||||
}
|
||||
},
|
||||
//发放按钮
|
||||
grantFun(val) {
|
||||
grantFun (val) {
|
||||
this.grantObjNew = val;
|
||||
this.grantObj.nick = JSON.parse(val.name).zh;
|
||||
this.grantDialog = true;
|
||||
},
|
||||
// 确认发放
|
||||
grantOut() {
|
||||
grantOut () {
|
||||
medalSend({
|
||||
days: this.grantObj.days,
|
||||
erbanNoStr: this.grantObj.userId,
|
||||
@@ -466,7 +633,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
partitionFlagFun(num, type) {
|
||||
partitionFlagFun (num, type) {
|
||||
//1 2 4
|
||||
var val = '';
|
||||
let valArr = [];
|
||||
@@ -486,6 +653,9 @@ export default {
|
||||
if ((num & 16) != 0) {
|
||||
valArr.push(16);
|
||||
}
|
||||
if ((num & 32) != 0) {
|
||||
valArr.push(32);
|
||||
}
|
||||
return valArr;
|
||||
} else {
|
||||
if ((num & 1) != 0) {
|
||||
@@ -503,25 +673,28 @@ export default {
|
||||
if ((num & 16) != 0) {
|
||||
val += '英语2区 ';
|
||||
}
|
||||
if ((num & 32) != 0) {
|
||||
val += '葡萄牙语区';
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
beforeAvatarUpload() {
|
||||
beforeAvatarUpload () {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传中~",
|
||||
type: "warning",
|
||||
});
|
||||
},
|
||||
handleAvatarError() {
|
||||
handleAvatarError () {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: "上传失败!",
|
||||
type: "error",
|
||||
});
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
handleAvatarSuccess (res, file) {
|
||||
console.log(file);
|
||||
this.controlsObj.imageUrl1 = file.response.data;
|
||||
ElMessage({
|
||||
@@ -530,8 +703,7 @@ export default {
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
handleAvatarSuccess2(res, file) {
|
||||
console.log(file);
|
||||
handleAvatarSuccess2 (res, file) {
|
||||
this.controlsObj.imageUrl2 = file.response.data;
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
@@ -539,7 +711,7 @@ export default {
|
||||
type: "success",
|
||||
});
|
||||
},
|
||||
beforeAvatarUploadMp4(file) {
|
||||
beforeAvatarUploadMp4 (file) {
|
||||
const dotIndex = (file.name).indexOf('.'); // 找到 '.' 的位置
|
||||
if (dotIndex !== -1) {
|
||||
const result = (file.name).substring(dotIndex + 1); // 从 '.' 之后开始截取
|
||||
@@ -561,21 +733,21 @@ export default {
|
||||
}
|
||||
},
|
||||
// 解析json字段
|
||||
getJsonField(jsonStr, field) {
|
||||
try {
|
||||
if (!jsonStr) return '';
|
||||
const obj = JSON.parse(jsonStr);
|
||||
return obj?.[field] || '';
|
||||
} catch (e) {
|
||||
console.error('JSON 解析失败:', jsonStr);
|
||||
return '';
|
||||
}
|
||||
},
|
||||
getJsonField (jsonStr, field) {
|
||||
try {
|
||||
if (!jsonStr) return '';
|
||||
const obj = JSON.parse(jsonStr);
|
||||
return obj?.[field] || '';
|
||||
} catch (e) {
|
||||
console.error('JSON 解析失败:', jsonStr);
|
||||
return '';
|
||||
}
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,34 +5,33 @@
|
||||
<span>地区</span>
|
||||
<partition-select v-model:partition-id="inquire.partitionId"
|
||||
v-model:partition-infos="inquire.partitionArr"
|
||||
v-model:after-init="getData"
|
||||
/>
|
||||
v-model:after-init="getData" />
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>名称</span>
|
||||
<el-input v-model="inquire.name" placeholder="" class="input"></el-input>
|
||||
<el-input v-model="inquire.name"
|
||||
placeholder=""
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>状态</span>
|
||||
<el-select v-model="inquire.status" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in inquire.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-select v-model="inquire.status"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in inquire.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
<!-- 新增按钮 -->
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
operationValue.partitionVal = [];
|
||||
operationValue.nameZh = '';
|
||||
operationValue.nameEn = '';
|
||||
@@ -43,61 +42,75 @@
|
||||
operationValue.imageUrl = '';
|
||||
operationValue.status = '';
|
||||
operationType = 1;
|
||||
filePreview: null; // 文件预览 URL
|
||||
filePreview = undefined; // 文件预览 URL
|
||||
isImage = false;
|
||||
isVideo = false;
|
||||
isSVGA = false;
|
||||
operationDialogTitle = '新增';
|
||||
operationDialog = true;
|
||||
"
|
||||
>新增</el-button
|
||||
>
|
||||
">新增</el-button>
|
||||
<!-- 表格 -->
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px"
|
||||
>
|
||||
<el-table-column prop="id" align="center" label="id" />
|
||||
<el-table-column prop="partitionFlag" align="center" label="地区">
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="id"
|
||||
align="center"
|
||||
label="id" />
|
||||
<el-table-column prop="partitionFlag"
|
||||
align="center"
|
||||
label="地区">
|
||||
<template v-slot="scope">
|
||||
{{ partitionDesc(scope.row.partitionFlag) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="中文名称">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="中文名称">
|
||||
<template v-slot="scope">
|
||||
{{ jsonFun(scope.row.name).zh }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="阿语名称">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="阿语名称">
|
||||
<template v-slot="scope">
|
||||
{{ jsonFun(scope.row.name).ar }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="英语名称"
|
||||
><template v-slot="scope">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="英语名称"><template v-slot="scope">
|
||||
{{ jsonFun(scope.row.name).en }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="土耳其名称"
|
||||
><template v-slot="scope">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="土耳其名称"><template v-slot="scope">
|
||||
{{ jsonFun(scope.row.name).tr }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="图片">
|
||||
<template v-slot="scope">
|
||||
<el-image
|
||||
:src="scope.row.pic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.pic]"
|
||||
fit="contain"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true"
|
||||
/>
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="葡萄牙语名称"><template v-slot="scope">
|
||||
{{ jsonFun(scope.row.name).pr }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="装扮动效图片类型">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="图片">
|
||||
<template v-slot="scope">
|
||||
<el-image :src="scope.row.pic"
|
||||
:zoom-rate="1.1"
|
||||
:preview-src-list="[scope.row.pic]"
|
||||
fit="contain"
|
||||
preview-teleported="true"
|
||||
hide-on-click-modal="true" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="装扮动效图片类型">
|
||||
<template v-slot="scope">
|
||||
{{
|
||||
scope.row.effectType == 0
|
||||
@@ -109,28 +122,22 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
prop=""
|
||||
width="300"
|
||||
max-height="100"
|
||||
align="center"
|
||||
label="装扮动效图片"
|
||||
>
|
||||
<el-table-column prop=""
|
||||
width="300"
|
||||
max-height="100"
|
||||
align="center"
|
||||
label="装扮动效图片">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.effectType == 0">无</div>
|
||||
<!-- 视频预览 -->
|
||||
<video
|
||||
v-if="scope.row.effectType == 1"
|
||||
:src="scope.row.effect"
|
||||
controls
|
||||
style="width: 300px; max-height: 300px; display: block"
|
||||
></video>
|
||||
<video v-if="scope.row.effectType == 1"
|
||||
:src="scope.row.effect"
|
||||
controls
|
||||
style="width: 300px; max-height: 300px; display: block"></video>
|
||||
<!-- SVGA 预览 -->
|
||||
<div
|
||||
v-if="scope.row.effectType == 2"
|
||||
:id="`svga-player${scope.row.id}`"
|
||||
style="width: 300px; max-height: 300px; display: block"
|
||||
>
|
||||
<div v-if="scope.row.effectType == 2"
|
||||
:id="`svga-player${scope.row.id}`"
|
||||
style="width: 300px; max-height: 300px; display: block">
|
||||
{{
|
||||
scope.row.effect && scope.row.id
|
||||
? initSVGAList(scope.row.effect, scope.row.id)
|
||||
@@ -142,21 +149,28 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="" align="center" label="状态">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="状态">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.status == 1 ? "有效" : "无效" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="" align="center" label="贵族限定">
|
||||
<el-table-column prop=""
|
||||
align="center"
|
||||
label="贵族限定">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.type == 1 ? "普通" : "贵族" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateTime" align="center" label="操作时间" />
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<el-table-column prop="updateTime"
|
||||
align="center"
|
||||
label="操作时间" />
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
operationValue.partitionVal = partitionIdArr(
|
||||
scope.row.partitionFlag
|
||||
);
|
||||
@@ -164,12 +178,13 @@
|
||||
operationValue.nameEn = jsonFun(scope.row.name).en;
|
||||
operationValue.nameAr = jsonFun(scope.row.name).ar;
|
||||
operationValue.nameTr = jsonFun(scope.row.name).tr;
|
||||
operationValue.namePr = jsonFun(scope.row.name).pr;
|
||||
operationValue.imageUrl = scope.row.pic;
|
||||
operationValue.status = scope.row.status;
|
||||
operationType = 2;
|
||||
operationValueId = scope.row.id;
|
||||
operationDialogTitle = '编辑';
|
||||
filePreview: scope.row.effect; // 文件预览 URL
|
||||
filePreview = scope.row.effect; // 文件预览 URL
|
||||
scope.row.effectType == 1
|
||||
? (isVideo = true)
|
||||
: scope.row.effectType == 2
|
||||
@@ -179,32 +194,25 @@
|
||||
initSVGA(scope.row.effect);
|
||||
operationDialog = true;
|
||||
"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">编辑</el-button>
|
||||
<el-button @click="
|
||||
sendDialog = true;
|
||||
sendObj.erbanNos = send.days = send.remark = null;
|
||||
sendObj.personalBackgroundId = scope.row.id;
|
||||
"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default"
|
||||
>赠送</el-button
|
||||
>
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">赠送</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 新增&编辑弹窗 -->
|
||||
<el-dialog
|
||||
v-model="operationDialog"
|
||||
:title="operationDialogTitle"
|
||||
width="28%"
|
||||
center
|
||||
>
|
||||
<el-dialog v-model="operationDialog"
|
||||
:title="operationDialogTitle"
|
||||
width="28%"
|
||||
center>
|
||||
<!-- <div class="operation">
|
||||
<span style="margin-right: 20px">地区</span>
|
||||
<el-select v-model="operationValue.partitionId" placeholder="请选择">
|
||||
@@ -219,47 +227,44 @@
|
||||
</div> -->
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">地区</span>
|
||||
<el-checkbox-group
|
||||
v-model="operationValue.partitionVal"
|
||||
v-for="(val, i) in inquire.partitionArr"
|
||||
:key="i"
|
||||
>
|
||||
<el-checkbox style="margin-right: 10px" :label="val.id">{{
|
||||
<el-checkbox-group v-model="operationValue.partitionVal"
|
||||
v-for="(val, i) in inquire.partitionArr"
|
||||
:key="i">
|
||||
<el-checkbox style="margin-right: 10px"
|
||||
:label="val.id">{{
|
||||
val.desc
|
||||
}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">华语名称</span>
|
||||
<el-input
|
||||
v-model="operationValue.nameZh"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
></el-input>
|
||||
<el-input v-model="operationValue.nameZh"
|
||||
style="width: 200px"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">英语名称</span>
|
||||
<el-input
|
||||
v-model="operationValue.nameEn"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
></el-input>
|
||||
<el-input v-model="operationValue.nameEn"
|
||||
style="width: 200px"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">阿拉伯名称</span>
|
||||
<el-input
|
||||
v-model="operationValue.nameAr"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
></el-input>
|
||||
<el-input v-model="operationValue.nameAr"
|
||||
style="width: 200px"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">土耳其名称</span>
|
||||
<el-input
|
||||
v-model="operationValue.nameTr"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
></el-input>
|
||||
<el-input v-model="operationValue.nameTr"
|
||||
style="width: 200px"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">葡萄牙语名称</span>
|
||||
<el-input v-model="operationValue.namePr"
|
||||
style="width: 200px"
|
||||
class="input"></el-input>
|
||||
</div>
|
||||
<!-- <div class="operation">
|
||||
<span style="margin-right: 20px">价格</span>
|
||||
@@ -278,151 +283,133 @@
|
||||
></el-input>
|
||||
</div> -->
|
||||
<div class="operation">
|
||||
<span class="left" style="margin-right: 20px">图片</span>
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<img
|
||||
v-if="operationValue.imageUrl"
|
||||
:src="operationValue.imageUrl"
|
||||
class="avatar"
|
||||
/>
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
<span class="left"
|
||||
style="margin-right: 20px">图片</span>
|
||||
<el-upload class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError">
|
||||
<img v-if="operationValue.imageUrl"
|
||||
:src="operationValue.imageUrl"
|
||||
class="avatar" />
|
||||
<el-icon v-else
|
||||
class="avatar-uploader-icon">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">装扮动效图片类型</span>
|
||||
<el-select v-model="operationValue.effectType" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in operationValue.effectTypeArr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-select v-model="operationValue.effectType"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in operationValue.effectTypeArr"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span class="left" style="margin-right: 20px">装扮动效图片</span>
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
accept="image/*,.mp4,.svga"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess1"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError"
|
||||
>
|
||||
<span class="left"
|
||||
style="margin-right: 20px">装扮动效图片</span>
|
||||
<el-upload class="avatar-uploader"
|
||||
action="/admin/tencent/cos/upload/file"
|
||||
accept="image/*,.mp4,.svga"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess1"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
:on-error="handleAvatarError">
|
||||
<!-- 文件预览 -->
|
||||
<div style="margin-top: 20px">
|
||||
<!-- 图片预览 -->
|
||||
<img
|
||||
v-if="isImage"
|
||||
:src="filePreview"
|
||||
alt="Uploaded Image"
|
||||
style="max-width: 300px"
|
||||
/>
|
||||
<img v-if="isImage"
|
||||
:src="filePreview"
|
||||
alt="Uploaded Image"
|
||||
style="max-width: 300px" />
|
||||
|
||||
<!-- 视频预览 -->
|
||||
<video
|
||||
v-else-if="isVideo"
|
||||
:src="filePreview"
|
||||
controls
|
||||
style="max-width: 300px"
|
||||
></video>
|
||||
<video v-else-if="isVideo"
|
||||
:src="filePreview"
|
||||
controls
|
||||
style="max-width: 300px"></video>
|
||||
|
||||
<!-- SVGA 预览 -->
|
||||
<div
|
||||
v-else-if="isSVGA"
|
||||
:id="`svga-player`"
|
||||
style="width: 200px; height: 200px"
|
||||
></div>
|
||||
<div v-else-if="isSVGA"
|
||||
:id="`svga-player`"
|
||||
style="width: 200px; height: 200px"></div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">状态</span>
|
||||
<el-select v-model="operationValue.status" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in operationValue.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
<el-select v-model="operationValue.status"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in operationValue.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button
|
||||
@click="
|
||||
<el-button @click="
|
||||
operationDialog = false;
|
||||
isImage = false;
|
||||
isVideo = false;
|
||||
isSVGA = false;
|
||||
"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="operation(type == 1 ? null : operationValueId)"
|
||||
>
|
||||
">取消</el-button>
|
||||
<el-button type="primary"
|
||||
@click="operation(type == 1 ? null : operationValueId)">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 分页 -->
|
||||
<el-pagination
|
||||
style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
/>
|
||||
<el-pagination style="margin-top: 10px"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 50, 100, 200, 500]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
<!-- 赠送 -->
|
||||
<el-dialog v-model="sendDialog" title="赠送" width="28%" center>
|
||||
<el-dialog v-model="sendDialog"
|
||||
title="赠送"
|
||||
width="28%"
|
||||
center>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">用户平台ID</span>
|
||||
<el-input
|
||||
v-model="sendObj.erbanNos"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
placeholder="多个请用英文“,”隔开"
|
||||
></el-input>
|
||||
<el-input v-model="sendObj.erbanNos"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
placeholder="多个请用英文“,”隔开"></el-input>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">天数</span>
|
||||
<el-input
|
||||
v-model="sendObj.days"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
placeholder=""
|
||||
></el-input>
|
||||
<el-input v-model="sendObj.days"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
placeholder=""></el-input>
|
||||
</div>
|
||||
<div class="operation">
|
||||
<span style="margin-right: 20px">备注</span>
|
||||
<el-input
|
||||
v-model="sendObj.remark"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
placeholder=""
|
||||
></el-input>
|
||||
<el-input v-model="sendObj.remark"
|
||||
style="width: 200px"
|
||||
class="input"
|
||||
placeholder=""></el-input>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="sendDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="send()"> 确认 </el-button>
|
||||
<el-button type="primary"
|
||||
@click="send()"> 确认 </el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -441,8 +428,8 @@ import SVGA from "svgaplayerweb";
|
||||
import PartitionSelect from "@/views/common/partitionSelect.vue";
|
||||
export default {
|
||||
name: "personalHomepageResourceManagement",
|
||||
components: {PartitionSelect},
|
||||
setup() {
|
||||
components: { PartitionSelect },
|
||||
setup () {
|
||||
// 响应式数据
|
||||
const file = ref(null);
|
||||
const filePreview = ref(null);
|
||||
@@ -474,6 +461,7 @@ export default {
|
||||
nameEn: "",
|
||||
nameAr: "",
|
||||
nameTr: "",
|
||||
namePr: "",
|
||||
price: "",
|
||||
day: "",
|
||||
imageUrl: "",
|
||||
@@ -538,6 +526,7 @@ export default {
|
||||
zh: operationValue.nameZh,
|
||||
en: operationValue.nameEn,
|
||||
tr: operationValue.nameTr,
|
||||
pr: operationValue.namePr,
|
||||
}),
|
||||
pic: operationValue.imageUrl,
|
||||
effectType: operationValue.effectType,
|
||||
@@ -675,7 +664,6 @@ export default {
|
||||
const initializedIds = new Set();
|
||||
const initSVGAList = (url, id) => {
|
||||
if (initializedIds.has(id)) return; // 避免重复初始化
|
||||
console.log('SVGASVGASVGASVGASVGASVGA',url,id);
|
||||
nextTick(() => {
|
||||
const container = document.getElementById("svga-player" + id);
|
||||
if (!container) {
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,30 +1,48 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<!-- 查询 -->
|
||||
<div class="inquire" style="display: inline-block; margin-right: 20px">
|
||||
<div class="inquire"
|
||||
style="display: inline-block; margin-right: 20px">
|
||||
<span class="demonstration">地区:</span>
|
||||
<el-select v-model="inquire.partitionFlag" placeholder="请选择">
|
||||
<el-option v-for="item in options" :key="item.partitionFlag" :label="item.label" :value="item.partitionFlag">
|
||||
<el-select v-model="inquire.partitionFlag"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in options"
|
||||
:key="item.partitionFlag"
|
||||
:label="item.label"
|
||||
:value="item.partitionFlag">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<el-button class="primary" type="primary" @click="getData()">查询</el-button>
|
||||
<el-button class="primary"
|
||||
type="primary"
|
||||
@click="getData()">查询</el-button>
|
||||
|
||||
<!-- 表格 -->
|
||||
<el-table v-loading="loading" :data="tableData" border style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="mgId" align="center" label="游戏ID" />
|
||||
<el-table v-loading="loading"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%; margin-top: 25px">
|
||||
<el-table-column prop="mgId"
|
||||
align="center"
|
||||
label="游戏ID" />
|
||||
|
||||
<el-table-column prop="name" align="center" label="游戏名称" />
|
||||
<el-table-column prop="name"
|
||||
align="center"
|
||||
label="游戏名称" />
|
||||
|
||||
<el-table-column prop="partitionFlag" align="center" label="所属地区">
|
||||
<el-table-column prop="partitionFlag"
|
||||
align="center"
|
||||
label="所属地区">
|
||||
<template v-slot="scope">{{
|
||||
partitionFlagFun(scope.row.partitionFlag)
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="isShow" align="center" label="是否展示">
|
||||
<el-table-column prop="isShow"
|
||||
align="center"
|
||||
label="是否展示">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.isShow == 0 ? "否" : scope.row.isShow == 1 ? "是" : "/"
|
||||
}}</template>
|
||||
@@ -42,7 +60,9 @@
|
||||
}}</template>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column prop="isAuthority" align="center" label="是否限制">
|
||||
<el-table-column prop="isAuthority"
|
||||
align="center"
|
||||
label="是否限制">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.isAuthority == 0
|
||||
? "否"
|
||||
@@ -52,7 +72,9 @@
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="roleFlag" align="center" label="可开启角色">
|
||||
<el-table-column prop="roleFlag"
|
||||
align="center"
|
||||
label="可开启角色">
|
||||
<template v-slot="scope">{{
|
||||
scope.row.roleFlag == 1
|
||||
? "房主"
|
||||
@@ -64,55 +86,86 @@
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" width="300">
|
||||
<el-table-column align="center"
|
||||
label="操作"
|
||||
width="300">
|
||||
<template v-slot="scope">
|
||||
<el-button @click="ediClick(scope)" class="primary" type="primary" size="default">编辑</el-button>
|
||||
<el-button @click="ediClick(scope)"
|
||||
class="primary"
|
||||
type="primary"
|
||||
size="default">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 编辑弹窗 -->
|
||||
<el-dialog v-model="editDialog" title="编辑" width="28%" center>
|
||||
<el-dialog v-model="editDialog"
|
||||
title="编辑"
|
||||
width="28%"
|
||||
center>
|
||||
<!-- 游戏ID -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">游戏ID</span>
|
||||
<el-input v-model="ediObj.gameId" style="width: 75%" class="input" disabled></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">游戏ID</span>
|
||||
<el-input v-model="ediObj.gameId"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled></el-input>
|
||||
</div>
|
||||
<!-- 游戏昵称 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">游戏昵称(中文)</span>
|
||||
<el-input v-model="ediObj.gameNick" style="width: 75%" class="input" disabled></el-input>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">游戏昵称(中文)</span>
|
||||
<el-input v-model="ediObj.gameNick"
|
||||
style="width: 75%"
|
||||
class="input"
|
||||
disabled></el-input>
|
||||
</div>
|
||||
<!-- 所属地区 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">所属地区</span>
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">所属地区</span>
|
||||
<el-checkbox-group v-model="ediObj.checkList">
|
||||
<el-checkbox label="华语区"></el-checkbox>
|
||||
<el-checkbox label="英语区"></el-checkbox>
|
||||
<el-checkbox label="阿拉伯语区"></el-checkbox>
|
||||
<el-checkbox label="土耳其区"></el-checkbox>
|
||||
<el-checkbox label="英语2区"></el-checkbox>
|
||||
<el-checkbox label="葡萄牙语区"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<!-- 是否展示 -->
|
||||
<div style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">是否展示</span>
|
||||
<el-select v-model="ediObj.value1" placeholder="请选择">
|
||||
<el-option v-for="item in ediObj.options" :key="item.value" :label="item.label" :value="item.value">
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">是否展示</span>
|
||||
<el-select v-model="ediObj.value1"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in ediObj.options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 是否限制 -->
|
||||
<div v-show="ediObj.value1" style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">是否限制</span>
|
||||
<el-select v-model="ediObj.value2" placeholder="请选择">
|
||||
<el-option v-for="item in ediObj.options2" :key="item.value" :label="item.label" :value="item.value">
|
||||
<div v-show="ediObj.value1"
|
||||
style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">是否限制</span>
|
||||
<el-select v-model="ediObj.value2"
|
||||
placeholder="请选择">
|
||||
<el-option v-for="item in ediObj.options2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 可开启角色 -->
|
||||
<div v-show="ediObj.value1" style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px" class="col-sm-2 control-label">可开启角色</span>
|
||||
<div v-show="ediObj.value1"
|
||||
style="margin-bottom: 25px; margin-top: 10px">
|
||||
<span style="display: inline-block; margin-right: 20px"
|
||||
class="col-sm-2 control-label">可开启角色</span>
|
||||
<el-checkbox-group v-model="ediObj.checkList2">
|
||||
<el-checkbox label="房主"></el-checkbox>
|
||||
<el-checkbox label="管理员"></el-checkbox>
|
||||
@@ -121,7 +174,8 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="editDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="editDialogClick()">
|
||||
<el-button type="primary"
|
||||
@click="editDialogClick()">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
@@ -129,10 +183,15 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- 分页 -->
|
||||
<el-pagination style="margin-top: 10px; display: none" class="paginationClass" v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize" :page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next" :total="total" @size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
<el-pagination style="margin-top: 10px; display: none"
|
||||
class="paginationClass"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:page-sizes="[10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 999999999]"
|
||||
layout="sizes, prev, pager, next"
|
||||
:total="total"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -143,7 +202,7 @@ import { dateFormat } from "@/utils/system-helper";
|
||||
import { ElMessage } from "element-plus";
|
||||
export default {
|
||||
name: "GameAdmin",
|
||||
data() {
|
||||
data () {
|
||||
return {
|
||||
loading: false,
|
||||
//查询所需条件对象
|
||||
@@ -173,6 +232,10 @@ export default {
|
||||
partitionFlag: 16,
|
||||
label: "英语2区",
|
||||
},
|
||||
{
|
||||
partitionFlag: 32,
|
||||
label: "葡萄牙语区",
|
||||
},
|
||||
{
|
||||
partitionFlag: "",
|
||||
label: "全部",
|
||||
@@ -218,12 +281,12 @@ export default {
|
||||
pageSize: 10, //条数
|
||||
};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
// 查询接口
|
||||
getData() {
|
||||
getData () {
|
||||
this.loading = true;
|
||||
let time = this.inquire.time;
|
||||
let startTime = "";
|
||||
@@ -253,7 +316,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 编辑按钮
|
||||
ediClick(scope) {
|
||||
ediClick (scope) {
|
||||
this.editDialog = true;
|
||||
this.editDiaData = scope.row;
|
||||
var obj = this.editDiaData;
|
||||
@@ -292,7 +355,7 @@ export default {
|
||||
console.log(obj);
|
||||
},
|
||||
// 确认编辑按钮
|
||||
editDialogClick() {
|
||||
editDialogClick () {
|
||||
var obj = {
|
||||
mgIdStr: this.ediObj.gameId,
|
||||
name: this.ediObj.gameNick,
|
||||
@@ -321,7 +384,7 @@ export default {
|
||||
});
|
||||
},
|
||||
// 计算数值
|
||||
districtFun(type) {
|
||||
districtFun (type) {
|
||||
console.log("ssss", this.ediObj);
|
||||
var num = 0;
|
||||
var district;
|
||||
@@ -331,7 +394,8 @@ export default {
|
||||
英语区: 1,
|
||||
阿拉伯语区: 2,
|
||||
土耳其区: 8,
|
||||
英语2区: 16
|
||||
英语2区: 16,
|
||||
葡萄牙语区: 32
|
||||
};
|
||||
this.ediObj.checkList.forEach((res, i) => {
|
||||
num += district[res];
|
||||
@@ -348,7 +412,7 @@ export default {
|
||||
return num;
|
||||
},
|
||||
// 展示所属地区
|
||||
partitionFlagFun(val) {
|
||||
partitionFlagFun (val) {
|
||||
let value = '';
|
||||
if ((val & 1) != 0) {
|
||||
value += '英语区 ';
|
||||
@@ -365,10 +429,13 @@ export default {
|
||||
if ((val & 16) != 0) {
|
||||
value += '英语2区 ';
|
||||
}
|
||||
if ((val & 32) != 0) {
|
||||
value += '葡萄牙语区 ';
|
||||
}
|
||||
return value;
|
||||
},
|
||||
// 编辑回显分区
|
||||
partitionFlagCheckFun(val){
|
||||
partitionFlagCheckFun (val) {
|
||||
let arr = [];
|
||||
if ((val & 1) != 0) {
|
||||
arr.push('英语区');
|
||||
@@ -385,13 +452,16 @@ export default {
|
||||
if ((val & 16) != 0) {
|
||||
arr.push('英语2区');
|
||||
}
|
||||
if ((val & 32) != 0) {
|
||||
arr.push('葡萄牙语区');
|
||||
}
|
||||
return arr;
|
||||
},
|
||||
// 分页导航
|
||||
handleSizeChange() {
|
||||
handleSizeChange () {
|
||||
this.getData();
|
||||
},
|
||||
handleCurrentChange() {
|
||||
handleCurrentChange () {
|
||||
this.getData();
|
||||
},
|
||||
},
|
||||
|
@@ -7,24 +7,31 @@
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<div class="col-sm-12">
|
||||
<label for="partitionId" class="col-sm-1 control-label">地区:</label>
|
||||
<label for="partitionId"
|
||||
class="col-sm-1 control-label">地区:</label>
|
||||
<div class="col-sm-2">
|
||||
<select name="partitionId" id="partitionId" class="form-control">
|
||||
<option value="4" selected>华语区</option>
|
||||
<select name="partitionId"
|
||||
id="partitionId"
|
||||
class="form-control">
|
||||
<option value="4"
|
||||
selected>华语区</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="toolbar">
|
||||
<div class="col-sm-12">
|
||||
<button id="btnSearch" class="btn btn-default">
|
||||
<button id="btnSearch"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-search"></i>查询
|
||||
</button>
|
||||
<button id="btnAdd" class="btn btn-default">
|
||||
<button id="btnAdd"
|
||||
class="btn btn-default">
|
||||
<i class="glyphicon glyphicon-plus"></i>增加
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="currentPageNum" />
|
||||
<input type="hidden"
|
||||
id="currentPageNum" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -33,105 +40,98 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div
|
||||
class="modal fade"
|
||||
id="roomTabModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal fade"
|
||||
id="roomTabModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="modalLabel">编辑房间标签</h4>
|
||||
<h4 class="modal-title"
|
||||
id="modalLabel">编辑房间标签</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="addForm">
|
||||
<input type="hidden" name="id" id="id" />
|
||||
<form class="form-horizontal"
|
||||
id="addForm">
|
||||
<input type="hidden"
|
||||
name="id"
|
||||
id="id" />
|
||||
<div class="form-group">
|
||||
<label for="modal_seq" class="col-sm-3 control-label"
|
||||
>排序<font color="red">*</font>:</label
|
||||
>
|
||||
<label for="modal_seq"
|
||||
class="col-sm-3 control-label">排序<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[custom[integer]]"
|
||||
name="seq"
|
||||
id="modal_seq"
|
||||
placeholder="数字小的排前面,必填"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[custom[integer]]"
|
||||
name="seq"
|
||||
id="modal_seq"
|
||||
placeholder="数字小的排前面,必填" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="modal_name" class="col-sm-3 control-label"
|
||||
>名称<font color="red">*</font>:</label
|
||||
>
|
||||
<label for="modal_name"
|
||||
class="col-sm-3 control-label">名称<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="modal_name"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="modal_name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ar_modal_name" class="col-sm-3 control-label"
|
||||
>阿语名称<font color="red">*</font>:</label
|
||||
>
|
||||
<label for="ar_modal_name"
|
||||
class="col-sm-3 control-label">阿语名称<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="ar_modal_name"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="ar_modal_name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="en_modal_name" class="col-sm-3 control-label"
|
||||
>英语名称<font color="red">*</font>:</label
|
||||
>
|
||||
<label for="en_modal_name"
|
||||
class="col-sm-3 control-label">英语名称<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="en_modal_name"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="en_modal_name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tr_modal_name" class="col-sm-3 control-label"
|
||||
>土耳其名称<font color="red">*</font>:</label
|
||||
>
|
||||
<label for="tr_modal_name"
|
||||
class="col-sm-3 control-label">土耳其语名称<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="tr_modal_name"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="tr_modal_name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="status" class="col-sm-3 control-label"
|
||||
>显示状态<font color="red">*</font>:</label
|
||||
>
|
||||
<label for="pr_modal_name"
|
||||
class="col-sm-3 control-label">葡萄牙语名称<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select
|
||||
name="status"
|
||||
id="modal_status"
|
||||
class="form-control validate[required]"
|
||||
>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="name"
|
||||
id="pr_modal_name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="status"
|
||||
class="col-sm-3 control-label">显示状态<font color="red">*</font>:</label>
|
||||
<div class="col-sm-9">
|
||||
<select name="status"
|
||||
id="modal_status"
|
||||
class="form-control validate[required]">
|
||||
<option value=""></option>
|
||||
<option value="1">显示</option>
|
||||
<option value="0">不显示</option>
|
||||
@@ -139,54 +139,52 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="room_tab_show" class="col-sm-3 control-label"
|
||||
>房间管理列表展示状态<font color="red">*</font> :</label
|
||||
>
|
||||
<label for="room_tab_show"
|
||||
class="col-sm-3 control-label">房间管理列表展示状态<font color="red">*</font> :</label>
|
||||
<div class="col-sm-9">
|
||||
<select
|
||||
name="room_tab_show"
|
||||
id="modal_room_tab_show"
|
||||
class="form-control validate[required]"
|
||||
>
|
||||
<select name="room_tab_show"
|
||||
id="modal_room_tab_show"
|
||||
class="form-control validate[required]">
|
||||
<option value=""></option>
|
||||
<option value="true">展示</option>
|
||||
<option value="false">不展示</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="imgBox">
|
||||
<div class="form-group"
|
||||
id="imgBox">
|
||||
<label class="col-sm-3 control-label">icon</label>
|
||||
<div class="col-sm-8">
|
||||
<img
|
||||
src=""
|
||||
id="iconImgUrl"
|
||||
style="width: 108px; height: 45px"
|
||||
alt=""
|
||||
/>
|
||||
<input
|
||||
type="file"
|
||||
id="iconFile"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
|
||||
/>
|
||||
<button class="btn btn-success" type="button" id="iconBtn">
|
||||
<img src=""
|
||||
id="iconImgUrl"
|
||||
style="width: 108px; height: 45px"
|
||||
alt="" />
|
||||
<input type="file"
|
||||
id="iconFile"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" />
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
id="iconBtn">
|
||||
上传
|
||||
</button>
|
||||
<input
|
||||
type="hidden"
|
||||
id="iconUrl"
|
||||
name="alertWinPic"
|
||||
class="form-control validate[required]"
|
||||
/>
|
||||
<input type="hidden"
|
||||
id="iconUrl"
|
||||
name="alertWinPic"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
关闭
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="add">确定</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="add">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,17 +197,17 @@ import { getPartitionInfoList } from "@/api/partition/partitionInfo";
|
||||
import { buildSelectOption } from "@/utils/system-helper";
|
||||
export default {
|
||||
name: "RoomTabView",
|
||||
setup() {
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
initData () {
|
||||
$(function () {
|
||||
$("#table").bootstrapTable("destroy");
|
||||
$("#table").bootstrapTable({
|
||||
@@ -239,6 +237,12 @@ export default {
|
||||
align: "center",
|
||||
width: "10%",
|
||||
},
|
||||
{
|
||||
field: "name.pr",
|
||||
title: "葡萄牙语Tab名称",
|
||||
align: "center",
|
||||
width: "10%",
|
||||
},
|
||||
{
|
||||
field: "status",
|
||||
title: "显示状态",
|
||||
@@ -308,11 +312,11 @@ export default {
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
pageList: [20, 50, 100, 200, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams(params) {
|
||||
queryParams: function queryParams (params) {
|
||||
//设置查询参数
|
||||
$("#currentPageNum").val(params.pageNumber);
|
||||
var param = {
|
||||
@@ -342,6 +346,8 @@ export default {
|
||||
zh: i.name,
|
||||
ar: i.name,
|
||||
en: i.name,
|
||||
tr: i.name,
|
||||
pr: i.name,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
@@ -376,6 +382,7 @@ export default {
|
||||
$("#ar_modal_name").val("");
|
||||
$("#en_modal_name").val("");
|
||||
$("#tr_modal_name").val("");
|
||||
$("#pr_modal_name").val("");
|
||||
$("#modal_seq").val("");
|
||||
$("#modal_status").val("");
|
||||
$("#modal_room_tab_show").val("");
|
||||
@@ -396,8 +403,9 @@ export default {
|
||||
// 英语名称
|
||||
var en_name = $("#en_modal_name").val();
|
||||
var tr_name = $("#tr_modal_name").val();
|
||||
var pr_name = $("#pr_modal_name").val();
|
||||
// 国际化字段
|
||||
var jsonName = { zh: name, ar: ar_name, en: en_name, tr: tr_name };
|
||||
var jsonName = { zh: name, ar: ar_name, en: en_name, tr: tr_name, pr: pr_name };
|
||||
const nameValue = JSON.stringify(jsonName);
|
||||
var seq = $("#modal_seq").val();
|
||||
var status = $("#modal_status").val();
|
||||
@@ -450,7 +458,7 @@ export default {
|
||||
var json = ret.data.roomTab;
|
||||
$("#id").val(id);
|
||||
let name = json.name;
|
||||
$('#iconImgUrl').attr('src',json.icon);
|
||||
$('#iconImgUrl').attr('src', json.icon);
|
||||
if (name.startsWith("{") && name.endsWith("}")) {
|
||||
var jsonName = JSON.parse(json.name);
|
||||
$("#modal_name").val(jsonName.zh);
|
||||
@@ -460,6 +468,7 @@ export default {
|
||||
$("#en_modal_name").val(jsonName.en);
|
||||
// 土耳其名称
|
||||
$("#tr_modal_name").val(jsonName.tr);
|
||||
$("#pr_modal_name").val(jsonName.pr);
|
||||
} else {
|
||||
$("#modal_name").val(name);
|
||||
// 阿语名称
|
||||
@@ -468,6 +477,7 @@ export default {
|
||||
$("#en_modal_name").val(name);
|
||||
// 土耳其名称
|
||||
$("#tr_modal_name").val(name);
|
||||
$("#pr_modal_name").val(name);
|
||||
}
|
||||
$("#modal_seq").val(json.seq);
|
||||
if (json.status == 1) {
|
||||
@@ -550,7 +560,7 @@ export default {
|
||||
});
|
||||
});
|
||||
|
||||
function clearModal() {
|
||||
function clearModal () {
|
||||
$("#iconImgUrl").attr("src", "");
|
||||
|
||||
$("#addForm")
|
||||
@@ -563,12 +573,12 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
initPartition() {
|
||||
initPartition () {
|
||||
getPartitionInfoList().then((res) => {
|
||||
let data = res.data;
|
||||
buildSelectOption(
|
||||
"#partitionId",
|
||||
4,
|
||||
1,
|
||||
data.map((v) => {
|
||||
return {
|
||||
value: v.id,
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,58 +1,83 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- 为用户赠送头饰弹窗 -->
|
||||
<div class="modal fade" id="sendHeadwearModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">x</span></button>
|
||||
<h4 class="modal-title" id="modalSendLabel">赠送头饰</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="headwearSendForm">
|
||||
<input type="hidden" name="sendHeadwearId" id="sendHeadwearId" />
|
||||
<div class="form-group">
|
||||
<label for="sendErbanNo" class="col-sm-3 control-label">平台号</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea name="sendErbanNo" id="sendErbanNo" class="form-control validate[required]"
|
||||
placeholder="多个平台号使用换行符分隔"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDays" class="col-sm-3 control-label">赠送天数</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="days" id="sendDays" class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDesc" class="col-sm-3 control-label">备注</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="desc" id="sendDesc" class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" id="send">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 为用户赠送头饰弹窗 -->
|
||||
<div class="modal fade"
|
||||
id="sendHeadwearModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"><span aria-hidden="true">x</span></button>
|
||||
<h4 class="modal-title"
|
||||
id="modalSendLabel">赠送头饰</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal"
|
||||
id="headwearSendForm">
|
||||
<input type="hidden"
|
||||
name="sendHeadwearId"
|
||||
id="sendHeadwearId" />
|
||||
<div class="form-group">
|
||||
<label for="sendErbanNo"
|
||||
class="col-sm-3 control-label">平台号</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea name="sendErbanNo"
|
||||
id="sendErbanNo"
|
||||
class="form-control validate[required]"
|
||||
placeholder="多个平台号使用换行符分隔"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDays"
|
||||
class="col-sm-3 control-label">赠送天数</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
name="days"
|
||||
id="sendDays"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDesc"
|
||||
class="col-sm-3 control-label">备注</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
name="desc"
|
||||
id="sendDesc"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">关闭</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="send">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -61,231 +86,234 @@ import TableHelper from '@/utils/bootstrap-table-helper';
|
||||
import { buildSelectOption } from '@/utils/system-helper';
|
||||
|
||||
export default {
|
||||
name: "HeadwearAdminViewSuper",
|
||||
setup() {
|
||||
function uploadfile(file, image, path, info) {
|
||||
$(this).attr('disabled', "true");
|
||||
$.ajaxFileUpload({
|
||||
fileElementId: file, //需要上传的文件域的ID,即<input type="file">的ID。
|
||||
url: '/admin/upload/img', //后台方法的路径
|
||||
type: 'post', //当要提交自定义参数时,这个参数要设置成post
|
||||
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写,jQuery会自动判断。
|
||||
secureuri: false, //是否启用安全提交,默认为false。
|
||||
async: true, //是否是异步
|
||||
success: function (json) { //提交成功后自动执行的处理函数,参数data就是服务器返回的数据。
|
||||
if (json.path) {
|
||||
$('#' + path).val(json.path);
|
||||
$('#' + image).attr("src", json.path);
|
||||
if (json.path != '') {
|
||||
$("#" + info).html('已上传成功');
|
||||
} else {
|
||||
$("#" + info).html('未上传成功');
|
||||
}
|
||||
console.log(json.path);
|
||||
name: "HeadwearAdminViewSuper",
|
||||
setup () {
|
||||
function uploadfile (file, image, path, info) {
|
||||
$(this).attr('disabled', "true");
|
||||
$.ajaxFileUpload({
|
||||
fileElementId: file, //需要上传的文件域的ID,即<input type="file">的ID。
|
||||
url: '/admin/upload/img', //后台方法的路径
|
||||
type: 'post', //当要提交自定义参数时,这个参数要设置成post
|
||||
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写,jQuery会自动判断。
|
||||
secureuri: false, //是否启用安全提交,默认为false。
|
||||
async: true, //是否是异步
|
||||
success: function (json) { //提交成功后自动执行的处理函数,参数data就是服务器返回的数据。
|
||||
if (json.path) {
|
||||
$('#' + path).val(json.path);
|
||||
$('#' + image).attr("src", json.path);
|
||||
if (json.path != '') {
|
||||
$("#" + info).html('已上传成功');
|
||||
} else {
|
||||
$("#" + info).html('未上传成功');
|
||||
}
|
||||
console.log(json.path);
|
||||
|
||||
} else {
|
||||
$("#tipMsg").text(json.msg);
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
},
|
||||
error: function (data, status, e) { //提交失败自动执行的处理函数。
|
||||
$(this).removeAttr("disabled");
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
window.uploadfile = uploadfile;
|
||||
return {
|
||||
uploadfile
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
// this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
//{field: 'id', title: 'id', align: 'center', width: '5%'},
|
||||
// { field: 'tmp', title: 'headwearId', align: 'center', checkbox: true, width: '5%' },
|
||||
{ field: 'headwearId', title: '头饰ID', align: 'center', width: '5%' },
|
||||
{field: 'name.zh', title: '头饰名称', align: 'center', width: '5%'},
|
||||
{field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%'},
|
||||
{field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%'},
|
||||
{field: 'name.tr', title: '土耳其头饰名称', align: 'center', width: '5%'},
|
||||
{
|
||||
field: 'pic',
|
||||
title: '头饰图片',
|
||||
align: 'center',
|
||||
valign: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return "<img style='max-width: 100px;max-height: 100px' src='" + val + "'>";
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'headwearId',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnSend" name="btnSend" class="btn btn-sm btn-success opt-send" data-id=' + val + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 赠送</button> ';
|
||||
}
|
||||
}
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||
//设置为limit可以获取limit, offset, search, sort, order
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
var param = {
|
||||
page: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax:function(request){ //使用ajax请求
|
||||
$.ajax({
|
||||
type:"GET",
|
||||
url:'/admin/superCenter/headwearList',
|
||||
contentType:'application/json;charset=utf-8',
|
||||
dataType:'json',
|
||||
data: request.data,
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
request.success({
|
||||
"rows": res.rows.map(i=>{
|
||||
let value = i.name;
|
||||
if (value.startsWith('{') && value.endsWith('}')) {
|
||||
i.name = JSON.parse(value);
|
||||
} else {
|
||||
i.name = {
|
||||
zh: value,
|
||||
ar: value,
|
||||
en: value,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
}),
|
||||
"total": res.total
|
||||
});
|
||||
},
|
||||
error:function(error){
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
// url: '/admin/headwear/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
//打开赠送头饰弹窗
|
||||
$("#table").on('click', '.opt-send', function () {
|
||||
//清除数据
|
||||
$('#sendHeadwearModal').find('input').val('');
|
||||
$('#sendHeadwearModal').find('textarea').val('');
|
||||
//设置数据
|
||||
var headWearId = $(this).attr("data-id");
|
||||
$('#sendHeadwearId').val(headWearId);
|
||||
$('#sendHeadwearModal').modal('show');
|
||||
});
|
||||
|
||||
//赠送头饰
|
||||
$("#send").click(function () {
|
||||
debugger;
|
||||
var erbanNo = $('#sendErbanNo').val().trim();//去掉首尾的空格和换行符
|
||||
if (!(erbanNo.length > 0)) {
|
||||
$("#tipMsg").text("请输入平台号");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$('#sendDays').val()) {
|
||||
$("#tipMsg").text("请输入体验天数");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
var sendDays = $('#sendDays').val();
|
||||
var sendDesc = $('#sendDesc').val();
|
||||
var headwearId = $('#sendHeadwearId').val();
|
||||
$("#tipMsg").text("赠送中,请稍后...");
|
||||
$("#tipModal").modal('show');
|
||||
if ($("#HeadwearSendForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/superCenter/headwearSend",
|
||||
data: {
|
||||
headwearId: headwearId,
|
||||
erbanNo: erbanNo,
|
||||
sendDesc: sendDesc,
|
||||
days: sendDays
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 100) {
|
||||
$('#sendHeadwearModal').modal('hide');
|
||||
$("#tipMsg").text("全部赠送成功");
|
||||
TableHelper.doRefresh("#table");
|
||||
} else if (json.code == 200) {
|
||||
$("#tipMsg").text("部分用户赠送失败,赠送失败平台号:" + json.erban + ",赠送失败原因:" + json.message);
|
||||
} else {
|
||||
$("#tipMsg").text("全部赠送失败,赠送失败原因:" + json.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
$("#tipMsg").text(json.msg);
|
||||
$("#tipModal").modal('show');
|
||||
}
|
||||
},
|
||||
// initPartition() {
|
||||
// getPartitionInfoList().then(res => {
|
||||
// let data = res.data;
|
||||
// buildSelectOption(
|
||||
// "#partitionId",
|
||||
// null,
|
||||
// [{
|
||||
// value: '',
|
||||
// text: '全部',
|
||||
// }].concat(data.map((v) => {
|
||||
// return {
|
||||
// value: v.id,
|
||||
// text: v.desc,
|
||||
// };
|
||||
// }))
|
||||
// );
|
||||
// });
|
||||
// },
|
||||
error: function (data, status, e) { //提交失败自动执行的处理函数。
|
||||
$(this).removeAttr("disabled");
|
||||
console.error(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
window.uploadfile = uploadfile;
|
||||
return {
|
||||
uploadfile
|
||||
};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
// this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
$('#table').bootstrapTable('destroy');
|
||||
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
//{field: 'id', title: 'id', align: 'center', width: '5%'},
|
||||
// { field: 'tmp', title: 'headwearId', align: 'center', checkbox: true, width: '5%' },
|
||||
{ field: 'headwearId', title: '头饰ID', align: 'center', width: '5%' },
|
||||
{ field: 'name.zh', title: '头饰名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.ar', title: '阿语头饰名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.en', title: '英语头饰名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.tr', title: '土耳其语头饰名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.pr', title: '葡萄牙语头饰名称', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'pic',
|
||||
title: '头饰图片',
|
||||
align: 'center',
|
||||
valign: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return "<img style='max-width: 100px;max-height: 100px' src='" + val + "'>";
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'headwearId',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
return '<button id="btnSend" name="btnSend" class="btn btn-sm btn-success opt-send" data-id=' + val + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 赠送</button> ';
|
||||
}
|
||||
}
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 50, 100, 200, 300, 500],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||
//设置为limit可以获取limit, offset, search, sort, order
|
||||
queryParamsType: "undefined",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
page: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/superCenter/headwearList',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
request.success({
|
||||
"rows": res.rows.map(i => {
|
||||
let value = i.name;
|
||||
if (value.startsWith('{') && value.endsWith('}')) {
|
||||
i.name = JSON.parse(value);
|
||||
} else {
|
||||
i.name = {
|
||||
zh: value,
|
||||
ar: value,
|
||||
en: value,
|
||||
tr: value,
|
||||
pr: value,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
}),
|
||||
"total": res.total
|
||||
});
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
// url: '/admin/headwear/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
//打开赠送头饰弹窗
|
||||
$("#table").on('click', '.opt-send', function () {
|
||||
//清除数据
|
||||
$('#sendHeadwearModal').find('input').val('');
|
||||
$('#sendHeadwearModal').find('textarea').val('');
|
||||
//设置数据
|
||||
var headWearId = $(this).attr("data-id");
|
||||
$('#sendHeadwearId').val(headWearId);
|
||||
$('#sendHeadwearModal').modal('show');
|
||||
});
|
||||
|
||||
//赠送头饰
|
||||
$("#send").click(function () {
|
||||
debugger;
|
||||
var erbanNo = $('#sendErbanNo').val().trim();//去掉首尾的空格和换行符
|
||||
if (!(erbanNo.length > 0)) {
|
||||
$("#tipMsg").text("请输入平台号");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$('#sendDays').val()) {
|
||||
$("#tipMsg").text("请输入体验天数");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
var sendDays = $('#sendDays').val();
|
||||
var sendDesc = $('#sendDesc').val();
|
||||
var headwearId = $('#sendHeadwearId').val();
|
||||
$("#tipMsg").text("赠送中,请稍后...");
|
||||
$("#tipModal").modal('show');
|
||||
if ($("#HeadwearSendForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/superCenter/headwearSend",
|
||||
data: {
|
||||
headwearId: headwearId,
|
||||
erbanNo: erbanNo,
|
||||
sendDesc: sendDesc,
|
||||
days: sendDays
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 100) {
|
||||
$('#sendHeadwearModal').modal('hide');
|
||||
$("#tipMsg").text("全部赠送成功");
|
||||
TableHelper.doRefresh("#table");
|
||||
} else if (json.code == 200) {
|
||||
$("#tipMsg").text("部分用户赠送失败,赠送失败平台号:" + json.erban + ",赠送失败原因:" + json.message);
|
||||
} else {
|
||||
$("#tipMsg").text("全部赠送失败,赠送失败原因:" + json.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// initPartition() {
|
||||
// getPartitionInfoList().then(res => {
|
||||
// let data = res.data;
|
||||
// buildSelectOption(
|
||||
// "#partitionId",
|
||||
// null,
|
||||
// [{
|
||||
// value: '',
|
||||
// text: '全部',
|
||||
// }].concat(data.map((v) => {
|
||||
// return {
|
||||
// value: v.id,
|
||||
// text: v.desc,
|
||||
// };
|
||||
// }))
|
||||
// );
|
||||
// });
|
||||
// },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@@ -1,58 +1,83 @@
|
||||
<template>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
</div>
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- 为用户赠送铭牌弹窗 -->
|
||||
<div class="modal fade" id="sendNameplateModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
|
||||
aria-hidden="true">x</span></button>
|
||||
<h4 class="modal-title" id="modalSendLabel">赠送铭牌</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="nameplateSendForm">
|
||||
<input type="hidden" name="sendNameplateId" id="sendNameplateId" />
|
||||
<div class="form-group">
|
||||
<label for="sendErbanNo" class="col-sm-3 control-label">平台号</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea name="sendErbanNo" id="sendErbanNo" class="form-control validate[required]"
|
||||
placeholder="多个平台号使用换行符分隔"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDays" class="col-sm-3 control-label">赠送天数</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="days" id="sendDays" class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDesc" class="col-sm-3 control-label">备注</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" name="desc" id="sendDesc" class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" id="send">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1 id="itemTitle"></h1>
|
||||
</section>
|
||||
</div>
|
||||
<!-- .content -->
|
||||
<div id="table"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- 为用户赠送铭牌弹窗 -->
|
||||
<div class="modal fade"
|
||||
id="sendNameplateModal"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"><span aria-hidden="true">x</span></button>
|
||||
<h4 class="modal-title"
|
||||
id="modalSendLabel">赠送铭牌</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal"
|
||||
id="nameplateSendForm">
|
||||
<input type="hidden"
|
||||
name="sendNameplateId"
|
||||
id="sendNameplateId" />
|
||||
<div class="form-group">
|
||||
<label for="sendErbanNo"
|
||||
class="col-sm-3 control-label">平台号</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea name="sendErbanNo"
|
||||
id="sendErbanNo"
|
||||
class="form-control validate[required]"
|
||||
placeholder="多个平台号使用换行符分隔"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDays"
|
||||
class="col-sm-3 control-label">赠送天数</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
name="days"
|
||||
id="sendDays"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sendDesc"
|
||||
class="col-sm-3 control-label">备注</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text"
|
||||
name="desc"
|
||||
id="sendDesc"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">关闭</button>
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="send">提交</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -62,304 +87,312 @@ import { getConfigValueByKey } from '@/api/system/sysconf';
|
||||
// import { buildSelectOption } from '@/utils/system-helper';
|
||||
|
||||
export default {
|
||||
name: "NameplateInfoViewSuper",
|
||||
setup() {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(function () {
|
||||
// this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
$(function () {
|
||||
setStatusSelectOption();
|
||||
setTypeSelectOption();
|
||||
setStyleTypeSelectOption();
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'id', title: '铭牌id', align: 'center', width: '5%' },
|
||||
{ field: 'nameplateTypeStr', title: '铭牌类型', align: 'center', width: '5%' },
|
||||
{field: 'name.zh', title: '铭牌名称', align: 'center', width: '5%'},
|
||||
{field: 'name.ar', title: '阿语铭牌名称', align: 'center', width: '5%'},
|
||||
{field: 'name.en', title: '英语铭牌名称', align: 'center', width: '5%'},
|
||||
{field: 'name.tr', title: '土耳其名称', align: 'center', width: '5%'},
|
||||
{
|
||||
field: 'iconPic',
|
||||
title: '铭牌图片',
|
||||
align: 'center',
|
||||
valign: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return "<img style='max-width: 200px;max-height: 200px' src='" + val + "'>";
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
let isSendDisabled = false;
|
||||
if (row.nameplateType == 3) {
|
||||
isSendDisabled = true;
|
||||
}
|
||||
return '<button id="btnSend" name="btnSend" class="btn btn-sm btn-success opt-send" data-id=' + val + `${isSendDisabled ? ' disabled ' : ''}` + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 赠送</button>'
|
||||
}
|
||||
}
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 30, 50],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "-",
|
||||
queryParams: function queryParams(params) { //设置查询参数
|
||||
var param = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax:function(request){ //使用ajax请求
|
||||
$.ajax({
|
||||
type:"GET",
|
||||
url:'/admin/superCenter/nameplateList',
|
||||
contentType:'application/json;charset=utf-8',
|
||||
dataType:'json',
|
||||
data: request.data,
|
||||
success:function (res) {
|
||||
console.log(res);
|
||||
request.success({
|
||||
"rows": res.rows.map(i=>{
|
||||
let nameValue = i.name;
|
||||
if (nameValue && nameValue.startsWith('{') && nameValue.endsWith('}')) {
|
||||
i.name = JSON.parse(i.name);
|
||||
} else {
|
||||
i.name = {
|
||||
zh: nameValue,
|
||||
ar: nameValue,
|
||||
en: nameValue,
|
||||
};
|
||||
}
|
||||
let fixedWordValue = i.fixedWord;
|
||||
if (fixedWordValue && fixedWordValue.startsWith('{') && fixedWordValue.endsWith('}')) {
|
||||
i.fixedWord = JSON.parse(i.fixedWord);
|
||||
} else {
|
||||
i.fixedWord = {
|
||||
zh: fixedWordValue,
|
||||
ar: fixedWordValue,
|
||||
en: fixedWordValue,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
}),
|
||||
"total": res.total
|
||||
});
|
||||
},
|
||||
error:function(error){
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
// url: '/admin/nameplate/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
|
||||
//是否自定义文案变化
|
||||
$('input[type=radio][name=isCustomWord]').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#fixedWord-div').removeClass("hidden");
|
||||
name: "NameplateInfoViewSuper",
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
// this.initPartition();
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData () {
|
||||
$(function () {
|
||||
setStatusSelectOption();
|
||||
setTypeSelectOption();
|
||||
setStyleTypeSelectOption();
|
||||
$('#table').bootstrapTable('destroy');
|
||||
$('#table').bootstrapTable({
|
||||
columns: [
|
||||
{ field: 'id', title: '铭牌id', align: 'center', width: '5%' },
|
||||
{ field: 'nameplateTypeStr', title: '铭牌类型', align: 'center', width: '5%' },
|
||||
{ field: 'name.zh', title: '铭牌名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.ar', title: '阿语铭牌名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.en', title: '英语铭牌名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.tr', title: '土耳其语名称', align: 'center', width: '5%' },
|
||||
{ field: 'name.pr', title: '葡萄牙语名称', align: 'center', width: '5%' },
|
||||
{
|
||||
field: 'iconPic',
|
||||
title: '铭牌图片',
|
||||
align: 'center',
|
||||
valign: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
if (val) {
|
||||
return "<img style='max-width: 200px;max-height: 200px' src='" + val + "'>";
|
||||
} else {
|
||||
return '-';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '5%',
|
||||
formatter: function (val, row, index) {
|
||||
let isSendDisabled = false;
|
||||
if (row.nameplateType == 3) {
|
||||
isSendDisabled = true;
|
||||
}
|
||||
return '<button id="btnSend" name="btnSend" class="btn btn-sm btn-success opt-send" data-id=' + val + `${isSendDisabled ? ' disabled ' : ''}` + '>' +
|
||||
'<i class="glyphicon glyphicon-edit"></i> 赠送</button>'
|
||||
}
|
||||
}
|
||||
],
|
||||
cache: false,
|
||||
striped: true,
|
||||
showRefresh: false,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [20, 30, 50],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "-",
|
||||
queryParams: function queryParams (params) { //设置查询参数
|
||||
var param = {
|
||||
pageNumber: params.pageNumber,
|
||||
pageSize: params.pageSize,
|
||||
};
|
||||
return param;
|
||||
},
|
||||
ajax: function (request) { //使用ajax请求
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: '/admin/superCenter/nameplateList',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
dataType: 'json',
|
||||
data: request.data,
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
request.success({
|
||||
"rows": res.rows.map(i => {
|
||||
let nameValue = i.name;
|
||||
if (nameValue && nameValue.startsWith('{') && nameValue.endsWith('}')) {
|
||||
i.name = JSON.parse(i.name);
|
||||
} else {
|
||||
$('#fixedWord-div').addClass("hidden");
|
||||
i.name = {
|
||||
zh: nameValue,
|
||||
ar: nameValue,
|
||||
en: nameValue,
|
||||
tr: nameValue,
|
||||
pr: nameValue,
|
||||
};
|
||||
}
|
||||
let fixedWordValue = i.fixedWord;
|
||||
if (fixedWordValue && fixedWordValue.startsWith('{') && fixedWordValue.endsWith('}')) {
|
||||
i.fixedWord = JSON.parse(i.fixedWord);
|
||||
} else {
|
||||
i.fixedWord = {
|
||||
zh: fixedWordValue,
|
||||
ar: fixedWordValue,
|
||||
en: fixedWordValue,
|
||||
tr: fixedWordValue,
|
||||
pr: fixedWordValue,
|
||||
};
|
||||
}
|
||||
return i;
|
||||
}),
|
||||
"total": res.total
|
||||
});
|
||||
},
|
||||
error: function (error) {
|
||||
console.log(error);
|
||||
}
|
||||
})
|
||||
},
|
||||
toolbar: '#toolbar',
|
||||
// url: '/admin/nameplate/list',
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
console.log("load success");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.log("load fail");
|
||||
}
|
||||
});
|
||||
|
||||
//打开赠送铭牌弹窗
|
||||
$("#table").on('click', '.opt-send', function () {
|
||||
//清除数据
|
||||
$('#sendNameplateModal').find('input').val('');
|
||||
$('#sendNameplateModal').find('textarea').val('');
|
||||
//设置数据
|
||||
var headWearId = $(this).attr("data-id");
|
||||
$('#sendNameplateId').val(headWearId);
|
||||
$('#sendNameplateModal').modal('show');
|
||||
});
|
||||
// 查询刷新
|
||||
$('#btnSearch').on('click', function () {
|
||||
TableHelper.doRefresh('#table');
|
||||
});
|
||||
|
||||
//赠送铭牌
|
||||
$("#send").click(function () {
|
||||
// debugger;
|
||||
var erbanNo = $('#sendErbanNo').val().trim();//去掉首尾的空格和换行符
|
||||
if (!(erbanNo.length > 0)) {
|
||||
$("#tipMsg").text("请输入平台号");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$('#sendDays').val()) {
|
||||
$("#tipMsg").text("请输入体验天数");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
var sendDays = $('#sendDays').val();
|
||||
var sendDesc = $('#sendDesc').val();
|
||||
var nameplateId = $('#sendNameplateId').val();
|
||||
$("#tipMsg").text("赠送中,请稍后...");
|
||||
$("#tipModal").modal('show');
|
||||
if ($("#NameplateSendForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/superCenter/nameplateSend",
|
||||
data: {
|
||||
nameplateId: nameplateId,
|
||||
erbanNo: erbanNo,
|
||||
sendDesc: sendDesc,
|
||||
days: sendDays
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 100) {
|
||||
$('#sendNameplateModal').modal('hide');
|
||||
$("#tipMsg").text("全部赠送成功");
|
||||
TableHelper.doRefresh("#table");
|
||||
} else if (json.code == 200) {
|
||||
$("#tipMsg").text("部分用户赠送失败,赠送失败平台号:" + json.erban + ",赠送失败原因:" + json.message);
|
||||
} else {
|
||||
$("#tipMsg").text("全部赠送失败,赠送失败原因:" + json.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
//是否自定义文案变化
|
||||
$('input[type=radio][name=isCustomWord]').change(function () {
|
||||
if ($(this).val() == 1) {
|
||||
$('#fixedWord-div').removeClass("hidden");
|
||||
} else {
|
||||
$('#fixedWord-div').addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
//打开赠送铭牌弹窗
|
||||
$("#table").on('click', '.opt-send', function () {
|
||||
//清除数据
|
||||
$('#sendNameplateModal').find('input').val('');
|
||||
$('#sendNameplateModal').find('textarea').val('');
|
||||
//设置数据
|
||||
var headWearId = $(this).attr("data-id");
|
||||
$('#sendNameplateId').val(headWearId);
|
||||
$('#sendNameplateModal').modal('show');
|
||||
});
|
||||
|
||||
//赠送铭牌
|
||||
$("#send").click(function () {
|
||||
// debugger;
|
||||
var erbanNo = $('#sendErbanNo').val().trim();//去掉首尾的空格和换行符
|
||||
if (!(erbanNo.length > 0)) {
|
||||
$("#tipMsg").text("请输入平台号");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$('#sendDays').val()) {
|
||||
$("#tipMsg").text("请输入体验天数");
|
||||
$("#tipModal").modal('show');
|
||||
return;
|
||||
}
|
||||
var sendDays = $('#sendDays').val();
|
||||
var sendDesc = $('#sendDesc').val();
|
||||
var nameplateId = $('#sendNameplateId').val();
|
||||
$("#tipMsg").text("赠送中,请稍后...");
|
||||
$("#tipModal").modal('show');
|
||||
if ($("#NameplateSendForm").validationEngine('validate')) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/admin/superCenter/nameplateSend",
|
||||
data: {
|
||||
nameplateId: nameplateId,
|
||||
erbanNo: erbanNo,
|
||||
sendDesc: sendDesc,
|
||||
days: sendDays
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (json) {
|
||||
if (json.code == 100) {
|
||||
$('#sendNameplateModal').modal('hide');
|
||||
$("#tipMsg").text("全部赠送成功");
|
||||
TableHelper.doRefresh("#table");
|
||||
} else if (json.code == 200) {
|
||||
$("#tipMsg").text("部分用户赠送失败,赠送失败平台号:" + json.erban + ",赠送失败原因:" + json.message);
|
||||
} else {
|
||||
$("#tipMsg").text("全部赠送失败,赠送失败原因:" + json.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
function cleanNamePlateModal() {
|
||||
$('#id').val('');
|
||||
$('#addIconPicUrl').attr('src', '');
|
||||
$('#addUploadIconPic').val('');
|
||||
$('#iconPic').val('');
|
||||
$('#status1').val('');
|
||||
$('#type1').val('');
|
||||
$('#days').val('');
|
||||
$('#zhFixedWord').val('');
|
||||
$('#arFixedWord').val('');
|
||||
$('#enFixedWord').val('');
|
||||
$('#trFixedWord').val('');
|
||||
$('input[name="isCustomWord"]').each(function () {
|
||||
$(this).removeAttr("checked");
|
||||
});
|
||||
$('#name1').val('');
|
||||
$('#ar_name1').val('');
|
||||
$('#en_name1').val('');
|
||||
$('#tr_name1').val('');
|
||||
$('#nameplateType1').val('');
|
||||
$('#name1').removeAttr("readonly");
|
||||
$('#nameplateType1').removeAttr("disabled");
|
||||
$('#fixedWord-div').removeClass("hidden");
|
||||
$('input[name="partitionFlag"]').each(function() {
|
||||
$(this).checked = false;
|
||||
});
|
||||
function cleanNamePlateModal () {
|
||||
$('#id').val('');
|
||||
$('#addIconPicUrl').attr('src', '');
|
||||
$('#addUploadIconPic').val('');
|
||||
$('#iconPic').val('');
|
||||
$('#status1').val('');
|
||||
$('#type1').val('');
|
||||
$('#days').val('');
|
||||
$('#zhFixedWord').val('');
|
||||
$('#arFixedWord').val('');
|
||||
$('#enFixedWord').val('');
|
||||
$('#trFixedWord').val('');
|
||||
$('#prFixedWord').val('');
|
||||
$('input[name="isCustomWord"]').each(function () {
|
||||
$(this).removeAttr("checked");
|
||||
});
|
||||
$('#name1').val('');
|
||||
$('#ar_name1').val('');
|
||||
$('#en_name1').val('');
|
||||
$('#tr_name1').val('');
|
||||
$('#pr_name1').val('');
|
||||
$('#nameplateType1').val('');
|
||||
$('#name1').removeAttr("readonly");
|
||||
$('#nameplateType1').removeAttr("disabled");
|
||||
$('#fixedWord-div').removeClass("hidden");
|
||||
$('input[name="partitionFlag"]').each(function () {
|
||||
$(this).checked = false;
|
||||
});
|
||||
}
|
||||
//判断空值
|
||||
function isEmpty(data) {
|
||||
if (data == null || data == undefined || data == "") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
function isEmpty (data) {
|
||||
if (data == null || data == undefined || data == "") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function setStatusSelectOption() {
|
||||
var rows = {
|
||||
"0": '待上架',
|
||||
"1": '上架',
|
||||
"2": '下架',
|
||||
"3": '已删除'
|
||||
};
|
||||
console.log(rows);
|
||||
for (var key in rows) {
|
||||
$('#status').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
$('#status1').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
}
|
||||
function setStatusSelectOption () {
|
||||
var rows = {
|
||||
"0": '待上架',
|
||||
"1": '上架',
|
||||
"2": '下架',
|
||||
"3": '已删除'
|
||||
};
|
||||
console.log(rows);
|
||||
for (var key in rows) {
|
||||
$('#status').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
$('#status1').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
}
|
||||
}
|
||||
|
||||
function setStyleTypeSelectOption() {
|
||||
getConfigValueByKey({
|
||||
'configId': 'heartbeat_nameplate',
|
||||
}).then(res => {
|
||||
let sysConf = res.data;
|
||||
if (sysConf && sysConf.configValue) {
|
||||
let data = JSON.parse(sysConf.configValue);
|
||||
let floor = 52000;
|
||||
let upper = 131400;
|
||||
if (data.length == 2) {
|
||||
floor = data[0];
|
||||
upper = data[1];
|
||||
}
|
||||
var rows = {
|
||||
'1': floor + '~' + (upper - 1) + '送出',
|
||||
'2': floor + '~' + (upper - 1) + '收到',
|
||||
'3': upper + '+送出',
|
||||
'4': upper + '+收到',
|
||||
'5': 'CP铭牌审核送出',
|
||||
'6': '粉丝团铭牌送出',
|
||||
'7': '贵族等级铭牌送出'
|
||||
};
|
||||
console.log(rows);
|
||||
for (var key in rows) {
|
||||
$('#type').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
$('#type1').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
}
|
||||
}
|
||||
});
|
||||
function setStyleTypeSelectOption () {
|
||||
getConfigValueByKey({
|
||||
'configId': 'heartbeat_nameplate',
|
||||
}).then(res => {
|
||||
let sysConf = res.data;
|
||||
if (sysConf && sysConf.configValue) {
|
||||
let data = JSON.parse(sysConf.configValue);
|
||||
let floor = 52000;
|
||||
let upper = 131400;
|
||||
if (data.length == 2) {
|
||||
floor = data[0];
|
||||
upper = data[1];
|
||||
}
|
||||
var rows = {
|
||||
'1': floor + '~' + (upper - 1) + '送出',
|
||||
'2': floor + '~' + (upper - 1) + '收到',
|
||||
'3': upper + '+送出',
|
||||
'4': upper + '+收到',
|
||||
'5': 'CP铭牌审核送出',
|
||||
'6': '粉丝团铭牌送出',
|
||||
'7': '贵族等级铭牌送出'
|
||||
};
|
||||
console.log(rows);
|
||||
for (var key in rows) {
|
||||
$('#type').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
$('#type1').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setTypeSelectOption() {
|
||||
var rows = {
|
||||
"0": '官方主播',
|
||||
"1": '普通',
|
||||
"3": '贵族铭牌'
|
||||
function setTypeSelectOption () {
|
||||
var rows = {
|
||||
"0": '官方主播',
|
||||
"1": '普通',
|
||||
"3": '贵族铭牌'
|
||||
|
||||
};
|
||||
console.log(rows);
|
||||
for (var key in rows) {
|
||||
$('#nameplateType').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
$('#nameplateType1').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
}
|
||||
};
|
||||
console.log(rows);
|
||||
for (var key in rows) {
|
||||
$('#nameplateType').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
$('#nameplateType1').append('<option value="' + key + '">' + rows[key] + '</option>');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.fixed-table-body {
|
||||
height: auto !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.pull-left {
|
||||
width: 100% !important;
|
||||
}</style>
|
||||
width: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ar"
|
||||
<label for="tr"
|
||||
class="col-sm-2 control-label">土耳其</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control validate[required]"
|
||||
@@ -100,6 +100,17 @@
|
||||
v-model="i18nMessage.tr" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pr"
|
||||
class="col-sm-2 control-label">葡萄牙语</label>
|
||||
<div class="col-sm-9">
|
||||
<textarea class="form-control validate[required]"
|
||||
name="pr"
|
||||
id="pr"
|
||||
rows="3"
|
||||
v-model="i18nMessage.pr" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -129,6 +140,7 @@ export default {
|
||||
{ field: 'en', title: '英语', align: 'center', width: '17%' },
|
||||
{ field: 'ar', title: '阿语', align: 'center', width: '17%' },
|
||||
{ field: 'tr', title: '土耳其', align: 'center', width: '17%' },
|
||||
{ field: 'pr', title: '葡萄牙语', align: 'center', width: '17%' },
|
||||
{
|
||||
field: 'key',
|
||||
title: '操作',
|
||||
@@ -145,6 +157,7 @@ export default {
|
||||
zh: '',
|
||||
en: '',
|
||||
ar: '',
|
||||
pr: '',
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -177,9 +190,9 @@ export default {
|
||||
striped: true,
|
||||
showRefresh: true,
|
||||
search: true,
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
pagination: true,
|
||||
pageList: [10, 20, 30, 50],
|
||||
pageList: [20, 50, 100],
|
||||
sidePagination: "client",
|
||||
queryParamsType: "undefined",
|
||||
toolbar: '#toolbar',
|
||||
@@ -197,6 +210,7 @@ export default {
|
||||
this.i18nMessage.en = '';
|
||||
this.i18nMessage.ar = '';
|
||||
this.i18nMessage.tr = '';
|
||||
this.i18nMessage.pr = '';
|
||||
$('#editModal').modal('show');
|
||||
},
|
||||
edit (obj) {
|
||||
@@ -207,6 +221,7 @@ export default {
|
||||
this.i18nMessage.en = record.en;
|
||||
this.i18nMessage.ar = record.ar;
|
||||
this.i18nMessage.tr = record.tr;
|
||||
this.i18nMessage.pr = record.pr;
|
||||
$('#editModal').modal('show');
|
||||
},
|
||||
save () {
|
||||
@@ -217,7 +232,8 @@ export default {
|
||||
zh: $this.trimTextArea(form.zh),
|
||||
en: $this.trimTextArea(form.en),
|
||||
ar: $this.trimTextArea(form.ar),
|
||||
tr: $this.trimTextArea(form.tr)
|
||||
tr: $this.trimTextArea(form.tr),
|
||||
pr: $this.trimTextArea(form.pr),
|
||||
};
|
||||
|
||||
saveI18nMessage(params).then(res => {
|
||||
|
@@ -160,6 +160,7 @@
|
||||
<input type="checkbox" name="partitionFlag" value="4"/>华语区<br>
|
||||
<input type="checkbox" name="partitionFlag" value="8"/>土耳其区<br>
|
||||
<input type="checkbox" name="partitionFlag" value="16"/>英语2区<br>
|
||||
<input type="checkbox" name="partitionFlag" value="32"/>葡萄牙语区<br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -198,6 +199,12 @@
|
||||
<input type="text" class="form-control validate[required]" name="giftName" id="giftTrName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="giftPrName" class="col-sm-2 control-label">葡萄牙语礼物名称</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control validate[required]" name="giftName" id="giftPrName">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="goldPrice" class="col-sm-2 control-label">礼物价格</label>
|
||||
<div class="col-sm-10">
|
||||
@@ -682,7 +689,8 @@ export default {
|
||||
{field: 'giftName.zh', title: '礼物名称', align: 'center', width: '15%'},
|
||||
{field: 'giftName.ar', title: '阿语礼物名称', align: 'center', width: '10%'},
|
||||
{field: 'giftName.en', title: '英语礼物名称', align: 'center', width: '10%'},
|
||||
{field: 'giftName.tr', title: '土耳其礼物名称', align: 'center', width: '10%'},
|
||||
{field: 'giftName.tr', title: '土耳其语礼物名称', align: 'center', width: '10%'},
|
||||
{field: 'giftName.pr', title: '葡萄牙语礼物名称', align: 'center', width: '10%'},
|
||||
{
|
||||
field: 'partitionFlag',
|
||||
title: '地区',
|
||||
@@ -705,6 +713,9 @@ export default {
|
||||
if ((val & 16) != 0) {
|
||||
value += '英语2区<br>';
|
||||
}
|
||||
if ((val & 32) != 0) {
|
||||
value += '葡萄牙语区<br>';
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
@@ -892,7 +903,7 @@ export default {
|
||||
showRefresh: false,
|
||||
pageSize: 10,
|
||||
pagination: true,
|
||||
pageList: [1, 10, 20, 30, 50],
|
||||
pageList: [10, 20, 50],
|
||||
search: false,
|
||||
sidePagination: "server", //表示服务端请求
|
||||
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
|
||||
@@ -932,6 +943,8 @@ export default {
|
||||
zh: value,
|
||||
ar: value,
|
||||
en: value,
|
||||
tr: value,
|
||||
pr: value
|
||||
};
|
||||
}
|
||||
return i;
|
||||
@@ -1293,7 +1306,8 @@ export default {
|
||||
$("input:checkbox[name='partitionFlag']")[2].checked = false;
|
||||
$("input:checkbox[name='partitionFlag']")[3].checked = false;
|
||||
$("input:checkbox[name='partitionFlag']")[4].checked = false;
|
||||
console.log("btnEdit");
|
||||
$("input:checkbox[name='partitionFlag']")[5].checked = false;
|
||||
|
||||
var id = $(this).attr("data-id");
|
||||
$this.files = {};
|
||||
$.ajax({
|
||||
@@ -1321,6 +1335,7 @@ export default {
|
||||
$("#giftEnName").val(jsonName.en);
|
||||
// 土耳其
|
||||
$("#giftTrName").val(jsonName.tr);
|
||||
$("#giftPrName").val(jsonName.pr);
|
||||
} else {
|
||||
$("#giftName").val(giftName);
|
||||
// 阿语名称
|
||||
@@ -1329,6 +1344,7 @@ export default {
|
||||
$("#giftEnName").val(giftName);
|
||||
// 土耳其名称
|
||||
$("#giftTrName").val(giftName);
|
||||
$("#giftPrName").val(giftName);
|
||||
}
|
||||
$("#goldPrice").val(json.entity.goldPrice);
|
||||
|
||||
@@ -1434,8 +1450,6 @@ export default {
|
||||
}
|
||||
|
||||
//分区
|
||||
console.log(partitionFlag & 2);
|
||||
console.log(partitionFlag & 4);
|
||||
if ((partitionFlag & 1) != 0) {
|
||||
$("input:checkbox[name='partitionFlag']")[0].checked = true;
|
||||
} else {
|
||||
@@ -1461,6 +1475,11 @@ export default {
|
||||
} else {
|
||||
$("input:checkbox[name='partitionFlag']")[4].checked = false;
|
||||
}
|
||||
if ((partitionFlag & 32) != 0) {
|
||||
$("input:checkbox[name='partitionFlag']")[5].checked = true;
|
||||
} else {
|
||||
$("input:checkbox[name='partitionFlag']")[5].checked = false;
|
||||
}
|
||||
// 打开编辑弹窗
|
||||
$("#giftModal").modal('show');
|
||||
} else {
|
||||
@@ -1487,8 +1506,9 @@ export default {
|
||||
var en_name = $("#giftEnName").val();
|
||||
// 土耳其名称
|
||||
var tr_name = $("#giftTrName").val();
|
||||
var pr_name = $("#giftPrName").val();
|
||||
// 国际化字段
|
||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,'tr':tr_name}
|
||||
var jsonName = {"zh":name,"ar":ar_name,"en":en_name,'tr':tr_name, 'pr':pr_name}
|
||||
const nameValue = JSON.stringify(jsonName);
|
||||
// 修改属性值
|
||||
formData.giftName = nameValue; // 将giftName修改为"newGiftName"
|
||||
|
@@ -8,34 +8,36 @@
|
||||
<section class="content">
|
||||
<div id="table"></div>
|
||||
<div id="toolbar">
|
||||
<label for="erbanNum" class="col-sm-2 control-label"
|
||||
>消息类型:</label
|
||||
>
|
||||
<label for="erbanNum"
|
||||
class="col-sm-2 control-label">消息类型:</label>
|
||||
<div class="col-sm-3">
|
||||
<span>
|
||||
<select name="msgType" id="type" class="form-control input-m">
|
||||
<select name="msgType"
|
||||
id="type"
|
||||
class="form-control input-m">
|
||||
<option value="0">文本</option>
|
||||
<option value="1">图片</option>
|
||||
<option value="100">图文</option>
|
||||
</select>
|
||||
</span>
|
||||
</div>
|
||||
<label for="erbanNum" class="col-sm-2 control-label">平台号:</label>
|
||||
<label for="erbanNum"
|
||||
class="col-sm-2 control-label">平台号:</label>
|
||||
<div class="col-sm-3">
|
||||
<span>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control validate[required]"
|
||||
name="erbanNo"
|
||||
id="erbanNum"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control validate[required]"
|
||||
name="erbanNo"
|
||||
id="erbanNum" />
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<button id="btnSearch" class="btn btn-sm btn-primary">
|
||||
<button id="btnSearch"
|
||||
class="btn btn-sm btn-primary">
|
||||
查询
|
||||
</button>
|
||||
<button id="add" class="btn btn-sm btn-default">
|
||||
<button id="add"
|
||||
class="btn btn-sm btn-default">
|
||||
<i class="glyphicon glyphicon-plus"></i>增加
|
||||
</button>
|
||||
</div>
|
||||
@@ -45,62 +47,59 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div
|
||||
class="modal fade"
|
||||
id="addSendMessage"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel2"
|
||||
>
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal fade"
|
||||
id="addSendMessage"
|
||||
tabindex="-1"
|
||||
role="dialog"
|
||||
aria-labelledby="modalLabel2">
|
||||
<div class="modal-dialog"
|
||||
role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">x</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="addModalLabel">新增消息</h4>
|
||||
<h4 class="modal-title"
|
||||
id="addModalLabel">新增消息</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="addMsgForm" class="form-horizontal">
|
||||
<form id="addMsgForm"
|
||||
class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="receiver" class="col-sm-3 control-label"
|
||||
>选择分区:</label
|
||||
>
|
||||
<label for="receiver"
|
||||
class="col-sm-3 control-label">选择分区:</label>
|
||||
<div class="col-sm-8">
|
||||
<select
|
||||
name="partitionId"
|
||||
id="partitionId"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"
|
||||
></select>
|
||||
<select name="partitionId"
|
||||
id="partitionId"
|
||||
data-btn-class="btn-warning"
|
||||
class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="receiver" class="col-sm-3 control-label"
|
||||
>接收者:</label
|
||||
>
|
||||
<label for="receiver"
|
||||
class="col-sm-3 control-label">接收者:</label>
|
||||
<div class="col-sm-8">
|
||||
<select
|
||||
name="receivers"
|
||||
id="receiver"
|
||||
class="col-sm-3 form-control"
|
||||
>
|
||||
<select name="receivers"
|
||||
id="receiver"
|
||||
class="col-sm-3 form-control">
|
||||
<option value="1">所有用户</option>
|
||||
<option value="0">指定用户</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="appIdDiv">
|
||||
<label for="appId" class="col-sm-3 control-label">渠道:</label>
|
||||
<div class="form-group"
|
||||
id="appIdDiv">
|
||||
<label for="appId"
|
||||
class="col-sm-3 control-label">渠道:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="appId" id="appId" class="col-sm-3 form-control">
|
||||
<select name="appId"
|
||||
id="appId"
|
||||
class="col-sm-3 form-control">
|
||||
<option value="">全部</option>
|
||||
<option value="official">安卓官方包</option>
|
||||
<option value="google">安卓谷歌包</option>
|
||||
@@ -111,15 +110,12 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="msgType" class="col-sm-3 control-label"
|
||||
>消息类型:</label
|
||||
>
|
||||
<label for="msgType"
|
||||
class="col-sm-3 control-label">消息类型:</label>
|
||||
<div class="col-sm-8">
|
||||
<select
|
||||
name="msgTypeList"
|
||||
id="msgType"
|
||||
class="col-sm-3 form-control"
|
||||
>
|
||||
<select name="msgTypeList"
|
||||
id="msgType"
|
||||
class="col-sm-3 form-control">
|
||||
<option value="0">文本</option>
|
||||
<option value="1">图片</option>
|
||||
<option value="100">图文</option>
|
||||
@@ -127,173 +123,152 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="skipUrlDiv">
|
||||
<label for="skip" class="col-sm-3 control-label"
|
||||
>跳转来源:</label
|
||||
>
|
||||
<div class="form-group"
|
||||
id="skipUrlDiv">
|
||||
<label for="skip"
|
||||
class="col-sm-3 control-label">跳转来源:</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="skip" id="skip" class="col-sm-3 form-control">
|
||||
<select name="skip"
|
||||
id="skip"
|
||||
class="col-sm-3 form-control">
|
||||
<option value="">无</option>
|
||||
<option value="2">跳H5页面</option>
|
||||
<option value="1" id="skipRoomType">跳转房间</option>
|
||||
<option value="1"
|
||||
id="skipRoomType">跳转房间</option>
|
||||
</select>
|
||||
</div>
|
||||
<label
|
||||
for="skipUrlContent"
|
||||
class="col-sm-3 control-label"
|
||||
></label>
|
||||
<label for="skipUrlContent"
|
||||
class="col-sm-3 control-label"></label>
|
||||
<div class="col-sm-8">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
name="skipUri"
|
||||
id="skipUrlContent"
|
||||
/>
|
||||
<input type="text"
|
||||
class="form-control"
|
||||
name="skipUri"
|
||||
id="skipUrlContent" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="mmm">
|
||||
<label for="aimErbanNo" class="col-sm-3 control-label"
|
||||
>请输入指定平台号,多个平台号用逗号隔开:</label
|
||||
>
|
||||
<div class="form-group"
|
||||
id="mmm">
|
||||
<label for="aimErbanNo"
|
||||
class="col-sm-3 control-label">请输入指定平台号,多个平台号用逗号隔开:</label>
|
||||
<div class="col-sm-8">
|
||||
<input
|
||||
class="form-control validate[required]"
|
||||
name="aimErbanNo"
|
||||
id="aimErbanNo"
|
||||
/>
|
||||
<input class="form-control validate[required]"
|
||||
name="aimErbanNo"
|
||||
id="aimErbanNo" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="nnn">
|
||||
<label for="words" class="col-sm-3 control-label">文本:</label>
|
||||
<div class="col-sm-8" style="padding: 0px 7px 0 22px">
|
||||
<textarea
|
||||
class="form-control validate[required]"
|
||||
name="words"
|
||||
id="words"
|
||||
rows="16"
|
||||
></textarea>
|
||||
<div class="form-group"
|
||||
id="nnn">
|
||||
<label for="words"
|
||||
class="col-sm-3 control-label">文本:</label>
|
||||
<div class="col-sm-8"
|
||||
style="padding: 0px 7px 0 22px">
|
||||
<textarea class="form-control validate[required]"
|
||||
name="words"
|
||||
id="words"
|
||||
rows="16"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="ppp">
|
||||
<label for="pic" class="col-sm-3 control-label">图片:</label>
|
||||
<div class="form-group"
|
||||
id="ppp">
|
||||
<label for="pic"
|
||||
class="col-sm-3 control-label">图片:</label>
|
||||
<div class="col-sm-8">
|
||||
<img
|
||||
src=""
|
||||
id="imgUrl"
|
||||
style="width: 250px; height: 90px"
|
||||
alt=""
|
||||
/>
|
||||
<input
|
||||
type="file"
|
||||
id="uploadFile"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
|
||||
/>
|
||||
<button class="btn btn-success" type="button" id="uploadBtn">
|
||||
<img src=""
|
||||
id="imgUrl"
|
||||
style="width: 250px; height: 90px"
|
||||
alt="" />
|
||||
<input type="file"
|
||||
id="uploadFile"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" />
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
id="uploadBtn">
|
||||
上传
|
||||
</button>
|
||||
<span class="attention"
|
||||
>注意:图片尺寸请注意在750*250,选择图片后请点击上传按钮</span
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
id="pic"
|
||||
name="pic"
|
||||
class="form-control validate[required]"
|
||||
/>
|
||||
<span class="attention">注意:图片尺寸请注意在750*250,选择图片后请点击上传按钮</span>
|
||||
<input type="hidden"
|
||||
id="pic"
|
||||
name="pic"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="ooo">
|
||||
<label for="wordsAndPic1" class="col-sm-3 control-label"
|
||||
>图文:</label
|
||||
>
|
||||
<div class="form-group"
|
||||
id="ooo">
|
||||
<label for="wordsAndPic1"
|
||||
class="col-sm-3 control-label">图文:</label>
|
||||
<div class="col-sm-8">
|
||||
标题:<input
|
||||
class="form-control validate[required]"
|
||||
name="title"
|
||||
id="title"
|
||||
/>
|
||||
内容:<input
|
||||
class="form-control validate[required]"
|
||||
name="desc"
|
||||
id="desc"
|
||||
/>
|
||||
标题:<input class="form-control validate[required]"
|
||||
name="title"
|
||||
id="title" />
|
||||
内容:<input class="form-control validate[required]"
|
||||
name="desc"
|
||||
id="desc" />
|
||||
<!--封面图-->
|
||||
<img
|
||||
src=""
|
||||
id="imgUrl1"
|
||||
style="width: 250px; height: 90px"
|
||||
alt=""
|
||||
/>
|
||||
<input
|
||||
type="file"
|
||||
id="uploadFile1"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"
|
||||
/>
|
||||
<button class="btn btn-success" type="button" id="uploadBtn1">
|
||||
<img src=""
|
||||
id="imgUrl1"
|
||||
style="width: 250px; height: 90px"
|
||||
alt="" />
|
||||
<input type="file"
|
||||
id="uploadFile1"
|
||||
name="uploadFile"
|
||||
accept="image/gif,image/jpeg,image/jpg,image/png,image/svg" />
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
id="uploadBtn1">
|
||||
上传
|
||||
</button>
|
||||
封面图:<span class="attention"
|
||||
>尺寸小于750*250,选择图片后请点击上传按钮</span
|
||||
>
|
||||
<input
|
||||
type="hidden"
|
||||
id="wordsAndPic1"
|
||||
name="wordsAndPic1"
|
||||
class="form-control validate[required]"
|
||||
/>
|
||||
封面图:<span class="attention">尺寸小于750*250,选择图片后请点击上传按钮</span>
|
||||
<input type="hidden"
|
||||
id="wordsAndPic1"
|
||||
name="wordsAndPic1"
|
||||
class="form-control validate[required]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="pushTime" class="col-sm-3 control-label"
|
||||
>推送时间(非必填):</label
|
||||
>
|
||||
<label for="pushTime"
|
||||
class="col-sm-3 control-label">推送时间(非必填):</label>
|
||||
<div class="col-sm-8">
|
||||
<input
|
||||
type="text"
|
||||
class="input-sm form-control datetime"
|
||||
name="pushTime"
|
||||
id="pushTime"
|
||||
/>
|
||||
<input type="text"
|
||||
class="input-sm form-control datetime"
|
||||
name="pushTime"
|
||||
id="pushTime" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ignoreVersion" class="col-sm-3 control-label"
|
||||
>不接收用户版本(非必填):</label
|
||||
>
|
||||
<label for="ignoreVersion"
|
||||
class="col-sm-3 control-label">不接收用户版本(非必填):</label>
|
||||
<div class="col-sm-8">
|
||||
<input
|
||||
type="text"
|
||||
class="input-sm form-control"
|
||||
name="ignoreVersion"
|
||||
id="ignoreVersion"
|
||||
/>
|
||||
<input type="text"
|
||||
class="input-sm form-control"
|
||||
name="ignoreVersion"
|
||||
id="ignoreVersion" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="ignoreChannel" class="col-sm-3 control-label"
|
||||
>不接收用户渠道(非必填):</label
|
||||
>
|
||||
<label for="ignoreChannel"
|
||||
class="col-sm-3 control-label">不接收用户渠道(非必填):</label>
|
||||
<div class="col-sm-8">
|
||||
<input
|
||||
type="text"
|
||||
class="input-sm form-control"
|
||||
name="ignoreChannel"
|
||||
id="ignoreChannel"
|
||||
/>
|
||||
<input type="text"
|
||||
class="input-sm form-control"
|
||||
name="ignoreChannel"
|
||||
id="ignoreChannel" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">
|
||||
<button type="button"
|
||||
class="btn btn-default"
|
||||
data-dismiss="modal">
|
||||
取消
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" id="addSave">
|
||||
<button type="button"
|
||||
class="btn btn-primary"
|
||||
id="addSave">
|
||||
保存
|
||||
</button>
|
||||
</div>
|
||||
@@ -307,19 +282,19 @@ import TableHelper from "@/utils/bootstrap-table-helper";
|
||||
var partitionArray;
|
||||
export default {
|
||||
name: "MessageAdminView",
|
||||
setup() {
|
||||
setup () {
|
||||
return {};
|
||||
},
|
||||
created() {
|
||||
created () {
|
||||
this.$nextTick(function () {
|
||||
this.initData();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
initData() {
|
||||
initData () {
|
||||
$(function () {
|
||||
//分区
|
||||
partitionArray = listPartitionInfo();
|
||||
//分区
|
||||
partitionArray = listPartitionInfo();
|
||||
$("#table").bootstrapTable("destroy");
|
||||
$("#table").bootstrapTable({
|
||||
columns: [
|
||||
@@ -366,6 +341,9 @@ export default {
|
||||
if ((val & 16) != 0) {
|
||||
value += '英语2区<br>';
|
||||
}
|
||||
if ((val & 32) != 0) {
|
||||
value += '葡萄牙语<br>';
|
||||
}
|
||||
return value;
|
||||
},
|
||||
},
|
||||
@@ -540,10 +518,7 @@ export default {
|
||||
var date = new Date(pushTime);
|
||||
let format = date.format("yyyy-MM-dd hh:mm");
|
||||
let now = new Date().format("yyyy-MM-dd hh:mm");
|
||||
console.log("format: " + format);
|
||||
console.log("now: " + now);
|
||||
let condition = format > now;
|
||||
console.log("condition: " + condition);
|
||||
if (condition && row.pushStatus == 0) {
|
||||
var str =
|
||||
"<button class='btn btn-sm btn-danger opt-del' data-id=" +
|
||||
@@ -565,7 +540,7 @@ export default {
|
||||
sidePagination: "server", //表示服务端请求
|
||||
queryParamsType: "undefined",
|
||||
|
||||
queryParams: function queryParams(params) {
|
||||
queryParams: function queryParams (params) {
|
||||
var param = {
|
||||
pageSize: params.pageSize,
|
||||
pageNumber: params.pageNumber,
|
||||
@@ -588,7 +563,7 @@ export default {
|
||||
});
|
||||
|
||||
//分区
|
||||
function listPartitionInfo() {
|
||||
function listPartitionInfo () {
|
||||
var array;
|
||||
$.ajax({
|
||||
type: "get",
|
||||
@@ -698,9 +673,9 @@ export default {
|
||||
} else {
|
||||
$("#tipMsg").text(
|
||||
"撤销失败,错误码:" +
|
||||
res.code +
|
||||
", 错误信息: " +
|
||||
res.message
|
||||
res.code +
|
||||
", 错误信息: " +
|
||||
res.message
|
||||
);
|
||||
$("#tipModal").modal("show");
|
||||
}
|
||||
@@ -810,7 +785,7 @@ export default {
|
||||
},
|
||||
};
|
||||
|
||||
function clear() {
|
||||
function clear () {
|
||||
$("#imgUrl").attr("src", "");
|
||||
$("#imgUrl1").attr("src", "");
|
||||
$("#imgUrl2").attr("src", "");
|
||||
|
Reference in New Issue
Block a user