fix:1,修改
parent
9eba581f57
commit
05598451be
|
|
@ -31,6 +31,14 @@ export function createTenantCreate(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//谷歌验证解除
|
||||||
|
export function updateSuperResetGoogleCode(data) {
|
||||||
|
return request({
|
||||||
|
url: '/super/tenant/resetGoogleCode',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
//更新商户
|
//更新商户
|
||||||
export function updateSuperTenantEdit(data) {
|
export function updateSuperTenantEdit(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
<!-- 字典下拉框选择组件 -->
|
||||||
|
<template>
|
||||||
|
<el-select v-model="model" :placeholder="t('请选择')">
|
||||||
|
<el-option v-for="item in optionsData" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { getLocalStorage } from "@/utils/auth";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
// 字典key
|
||||||
|
dictKey: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
// localStorage的key值
|
||||||
|
localKey: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
// 是否需要设置默认值
|
||||||
|
isDefault: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// 满足添加全选的选项
|
||||||
|
addOptions: {
|
||||||
|
type: Object
|
||||||
|
},
|
||||||
|
config: { // 更多配置
|
||||||
|
type: Object,
|
||||||
|
default: {
|
||||||
|
hasCheckAll: true,
|
||||||
|
filterValue: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const model = defineModel(); // 选中值
|
||||||
|
const optionsData = ref([]); // 下拉框选项
|
||||||
|
|
||||||
|
// 初始化下拉框数据
|
||||||
|
const { dictKey, localKey, addOptions, isDefault } = props;
|
||||||
|
|
||||||
|
// localStorage或者字典取值
|
||||||
|
if (localKey) {
|
||||||
|
const _optionsData = [];
|
||||||
|
|
||||||
|
switch (localKey) {
|
||||||
|
case 'langList':
|
||||||
|
const langList = getLocalStorage('langList')?.filter(v => v.langType == 1 && v.langStatus); // 语种选项
|
||||||
|
langList.forEach(v => {
|
||||||
|
_optionsData.push({
|
||||||
|
label: v.name,
|
||||||
|
value: v.id
|
||||||
|
});
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
optionsData.value = _optionsData?.filter(item => {
|
||||||
|
return !props.config.filterValue.includes(item.value);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
optionsData.value = proxy.useDict(dictKey)[dictKey]?.filter(item => {
|
||||||
|
return !props.config.filterValue.includes(item.value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 增加全选
|
||||||
|
if (addOptions) {
|
||||||
|
optionsData.value.unshift(addOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认值
|
||||||
|
if (isDefault) {
|
||||||
|
model.value = optionsData.value[0].value;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
@ -0,0 +1,115 @@
|
||||||
|
<template>
|
||||||
|
<el-form-item :prop="keyName">
|
||||||
|
<el-select v-model="queryParams[keyName]" :placeholder="t('请选择')" :style="'width:' + width[0] + 'px'"
|
||||||
|
@change="keyChange('selectChange')">
|
||||||
|
<el-option v-for="item in queryParamsList" :key="item.value" :label="t(item.label)" :value="item.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item :prop="queryParams[keyName]" v-if="queryParams[keyName]" :style="'width:' + width[1] + 'px'">
|
||||||
|
<!-- 数字输入框 -->
|
||||||
|
<NumberInput v-if="inputType === 'number'" v-model="queryParams[queryParams[keyName]]"
|
||||||
|
:placeholder="t(inputPlaceholder || `请输入${currentLabel}`)" @keyup.enter="handleQuery" clearable
|
||||||
|
@clear="handleQuery" :maxlength="inputConfig.maxlength" :isCalculable="false" :show-word-limit="inputConfig.showWordLimit">
|
||||||
|
</NumberInput>
|
||||||
|
<!-- 下拉选择框字典放到inputConfig.dictKey -->
|
||||||
|
<custom-select v-else-if="inputType === 'select' && showLoding" :placeholder="t(inputPlaceholder || `请选择${currentLabel}`)" v-model="queryParams[queryParams[keyName]]" @change="handleQuery" clearable
|
||||||
|
@clear="handleQuery" :options="inputConfig.options"></custom-select>
|
||||||
|
<!-- 普通输入框 -->
|
||||||
|
<el-input v-else v-model="queryParams[queryParams[keyName]]"
|
||||||
|
:placeholder="t(inputPlaceholder || `请输入${currentLabel}`)" @keyup.enter="handleQuery" clearable
|
||||||
|
@clear="handleQuery" :maxlength="inputConfig.maxlength" :show-word-limit="inputConfig.showWordLimit" />
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import NumberInput from "@/components/NumberInput/index.vue"; // 数字输入框
|
||||||
|
import DictSelect from "@/components/DictSelect/index.vue"; // 字典选择框
|
||||||
|
import CustomSelect from "@/components/CustomSelect/index.vue";
|
||||||
|
import { el } from "element-plus/es/locales.mjs";
|
||||||
|
import { nextTick } from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
width: {
|
||||||
|
type: Array,
|
||||||
|
default: [120, 160]
|
||||||
|
},
|
||||||
|
keyName: {
|
||||||
|
type: String,
|
||||||
|
default: 'searchType'
|
||||||
|
},
|
||||||
|
queryParamsList: {
|
||||||
|
type: Array,
|
||||||
|
default: []
|
||||||
|
},
|
||||||
|
queryParams: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const queryParams = defineModel();
|
||||||
|
queryParams.value = props.queryParams;
|
||||||
|
|
||||||
|
const currentLabel = ref(''), inputPlaceholder = ref(''); // 输入框提示
|
||||||
|
const inputType = ref(''); // 输入框类型
|
||||||
|
const inputConfig = ref({}); // input框配置
|
||||||
|
const showLoding = ref(true);
|
||||||
|
// 参数切换
|
||||||
|
const keyChange = (type) => {
|
||||||
|
props.queryParamsList.forEach(item => {
|
||||||
|
if (item.value === queryParams.value[props.keyName]) {
|
||||||
|
// placeholder设置
|
||||||
|
if (item.placeholder) {
|
||||||
|
inputPlaceholder.value = item.placeholder
|
||||||
|
} else {
|
||||||
|
inputPlaceholder.value = '';
|
||||||
|
currentLabel.value = item.label;
|
||||||
|
}
|
||||||
|
// value和输入框配置
|
||||||
|
inputType.value = item.inputType || '';
|
||||||
|
inputConfig.value = item.inputConfig || {}
|
||||||
|
} else {
|
||||||
|
// 把其他的值清空
|
||||||
|
queryParams.value[item.value] = null
|
||||||
|
}
|
||||||
|
});
|
||||||
|
showLoding.value = false;
|
||||||
|
setTimeout(() => {
|
||||||
|
showLoding.value = true;
|
||||||
|
},500)
|
||||||
|
if (type === 'selectChange') handleQuery();
|
||||||
|
}
|
||||||
|
//清空所有
|
||||||
|
const clearAll = () => {
|
||||||
|
props.queryParamsList.forEach(item => {
|
||||||
|
//除了searchType这个字段其他都清空了
|
||||||
|
if (item.value !== 'searchType') {
|
||||||
|
delete queryParams.value[item.value];
|
||||||
|
}else {
|
||||||
|
queryParams.value[item.value] = props.queryParams.searchType;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 初始时监听,监听只执行一次
|
||||||
|
let flag = true;
|
||||||
|
watch(() => queryParams.value[props.keyName], val => {
|
||||||
|
if (val && flag) {
|
||||||
|
keyChange();
|
||||||
|
flag = false;
|
||||||
|
}
|
||||||
|
}, { immediate: true });
|
||||||
|
|
||||||
|
// 输入框值改变
|
||||||
|
const emits = defineEmits(['handleQuery']);
|
||||||
|
const handleQuery = () => {
|
||||||
|
emits('handleQuery');
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
keyChange,
|
||||||
|
clearAll,
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
<tags-view v-if="needTagsView" />
|
<tags-view v-if="needTagsView" />
|
||||||
</div>
|
</div>
|
||||||
<app-main />
|
<app-main />
|
||||||
|
<settings ref="settingRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,7 @@ function handleView(row) {
|
||||||
currencyAgreement:row.currencyAgreement,
|
currencyAgreement:row.currencyAgreement,
|
||||||
tenantType: 1,
|
tenantType: 1,
|
||||||
}
|
}
|
||||||
getSelectPlatform();
|
// getSelectPlatform();
|
||||||
openView.value = true;
|
openView.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -408,7 +408,7 @@ function getSelectPlatform() {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset();
|
reset();
|
||||||
getSelectPlatform();
|
// getSelectPlatform();
|
||||||
open.value = true;
|
open.value = true;
|
||||||
form.value.proportion = 20;
|
form.value.proportion = 20;
|
||||||
title.value = proxy.t('添加代理');
|
title.value = proxy.t('添加代理');
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<table-search-card :leftSpan="24" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
<table-search-card :leftSpan="24" :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||||
<template #left>
|
<template #left>
|
||||||
<table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
|
<table-search-date ref="searchDateRef" v-model:dateRange="dateRange" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||||
<el-form-item :label="t('商户账号')" prop="tenantKey">
|
<el-form-item :label="t('商户账号')" prop="tenantKey">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.tenantKey"
|
v-model="queryParams.tenantKey"
|
||||||
|
|
@ -199,12 +199,13 @@
|
||||||
queryParams.value.pageNo = 1;
|
queryParams.value.pageNo = 1;
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
const searchDateRef = ref(null);
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
dateRange.value = [];
|
dateRange.value = [];
|
||||||
|
operateTimeType.value = "day";
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm("queryRef");
|
||||||
handleQuery();
|
searchDateRef.value.timeTypeChange(operateTimeType.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
<div class="card-title">{{ card.title }}</div>
|
<div class="card-title">{{ card.title }}</div>
|
||||||
|
|
||||||
<div class="card-value">
|
<div class="card-value">
|
||||||
<span class="" :style="card.cardClass =='pink' ? '':card.cardClass =='green'?'':'cursor: pointer;'" @click="goPage(card.cardClass)">{{ card.value }}</span>
|
<span class="" :style="card.cardClass =='pink' ? 'cursor: pointer;':card.cardClass =='green'?'cursor: pointer;':'cursor: pointer;'" @click="goPage(card.cardClass)">{{ card.value }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-subtitle" v-html="card.subtitle" @click="handleClick"></div>
|
<div class="card-subtitle" v-html="card.subtitle" @click="handleClick"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -57,9 +57,9 @@
|
||||||
title: proxy.t('新增商户数'),
|
title: proxy.t('新增商户数'),
|
||||||
value: props?.cardData?.newTenants || 0,
|
value: props?.cardData?.newTenants || 0,
|
||||||
percentage: '',
|
percentage: '',
|
||||||
subtitle: proxy.t('新增会员数')+`<a href="#" class="link" data-type="first" >${props?.cardData?.newMembers || 0}</a>`+proxy.t('人')
|
subtitle: proxy.t('新增会员数')+`<a class="link" data-type="first" >${props?.cardData?.newMembers || 0}</a>`+proxy.t('人')
|
||||||
+proxy.t('新增商户数')+ `<a href="#" class="link" data-type="proxy">${props?.cardData?.newTenants || 0}</a>`
|
+' '+proxy.t('新增商户数')+ `<a class="link" data-type="newTenants">${props?.cardData?.newTenants || 0}</a>`
|
||||||
+proxy.t('新增代理数')+`<a href="#" class="link" data-type="bigR">${props?.cardData?.newAgents||0}</a> `,
|
+' '+proxy.t('新增代理数')+`<a class="link" data-type="bigR">${props?.cardData?.newAgents||0}</a> `,
|
||||||
cardClass: 'orange'
|
cardClass: 'orange'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -106,92 +106,58 @@
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const handleClick = (e) => {
|
const handleClick = (e) => {
|
||||||
// const type = e.target.dataset.type
|
const type = e.target.dataset.type
|
||||||
// let path = '';
|
let path = '';
|
||||||
// let typeDay = '';
|
let typeDay = '';
|
||||||
// let activeName = '';
|
let activeName = '';
|
||||||
// let timeType = '';
|
let timeType = '';
|
||||||
// if (type == 'first') {
|
if (type == 'first') {
|
||||||
// path = '/member/member';
|
path = '/member';
|
||||||
// typeDay = 'day';
|
}else if (type == 'newTenants') {
|
||||||
// timeType = 3;
|
path = '/Merchant/businessInformation';
|
||||||
// }else if (type == 'proxy') {
|
}else if (type == 'bigR') {
|
||||||
// path = '/agent/agent-info';
|
path = '/Agents/agentInformation';
|
||||||
// typeDay = 'day';
|
}
|
||||||
// timeType = '';
|
proxy.$router.push({
|
||||||
// }else if (type == 'totalCharge') {
|
path: path,
|
||||||
// path = '/member/member';
|
query: {
|
||||||
// typeDay = '';
|
activeName: activeName,
|
||||||
// timeType = 3;
|
operateTimeType: typeDay,
|
||||||
// }else if (type == 'totalAgent') {
|
timeType:timeType,
|
||||||
// path = '/agent/agent-info';
|
currencyType:props.currencyType,
|
||||||
// typeDay = '';
|
}
|
||||||
// timeType = '';
|
});
|
||||||
// }else if (type == 'differenceRecharge') {
|
|
||||||
// path = '/finance/recharge-order';
|
|
||||||
// typeDay = 'day';
|
|
||||||
// timeType = '';
|
|
||||||
// }else if (type == 'differenceWithdrawal') {
|
|
||||||
// path = '/finance/withdrawal';
|
|
||||||
// typeDay = 'day';
|
|
||||||
// timeType = '';
|
|
||||||
// activeName = 'allWithdrawal';
|
|
||||||
// }else if (type == 'betOnNoteOrder') {
|
|
||||||
// path = '/game/details';
|
|
||||||
// typeDay = 'day';
|
|
||||||
// timeType = '';
|
|
||||||
// activeName = 'details';
|
|
||||||
// }else if (type == 'discountParticipants') {
|
|
||||||
// path = '/discounts/discount-details';
|
|
||||||
// typeDay = 'day';
|
|
||||||
// timeType = '';
|
|
||||||
// activeName = '';
|
|
||||||
// }
|
|
||||||
// else if (type == 'discountTask') {
|
|
||||||
// path = '/discounts/task';
|
|
||||||
// typeDay = '';
|
|
||||||
// timeType = '';
|
|
||||||
// activeName = '';
|
|
||||||
// }else if (type == 'discountActivity') {
|
|
||||||
// path = '/discounts/activity-center';
|
|
||||||
// typeDay = '';
|
|
||||||
// timeType = '';
|
|
||||||
// activeName = '';
|
|
||||||
// }
|
|
||||||
// proxy.$router.push({
|
|
||||||
// path: path,
|
|
||||||
// query: {
|
|
||||||
// activeName: activeName,
|
|
||||||
// operateTimeType: typeDay,
|
|
||||||
// timeType:timeType,
|
|
||||||
// currencyType:props.currencyType,
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
// proxy.t('利润')+(props?.cardData?.profit||0)+' '+
|
// proxy.t('利润')+(props?.cardData?.profit||0)+' '+
|
||||||
const goPage = (cardClass) => {
|
const goPage = (cardClass) => {
|
||||||
// let path = '';
|
let path = '';
|
||||||
// let typeDay = '';
|
let typeDay = '';
|
||||||
// if (cardClass == 'orange'){
|
if (cardClass == 'orange'){
|
||||||
// path = '/member/member';
|
path = '/Merchant/businessInformation';
|
||||||
// typeDay = 'day';
|
typeDay = 'day';
|
||||||
// }else if (cardClass == 'blue'){
|
}else if (cardClass == 'blue'){
|
||||||
// path = '/member/member';
|
path = '/Merchant/businessInformation';
|
||||||
// typeDay = '';
|
typeDay = '';
|
||||||
// }else if (cardClass == 'yellow'){
|
}else if (cardClass == 'pink'){
|
||||||
// path = '/game/details';
|
path = '/Finance/prepaymentRecord';
|
||||||
// typeDay = 'day';
|
typeDay = 'day';
|
||||||
// }else if (cardClass == 'purple'){
|
}else if (cardClass == 'yellow'){
|
||||||
// path = '/discounts/discount-details';
|
path = '/gameRecords';
|
||||||
// typeDay = 'day';
|
typeDay = 'day';
|
||||||
// }
|
}else if (cardClass == 'green'){
|
||||||
// proxy.$router.push({
|
path = '/Merchant/businessInformation';
|
||||||
// path: path,
|
typeDay = 'day';
|
||||||
// query: {
|
}else if (cardClass == 'purple'){
|
||||||
// activeName: 'details',
|
path = '/Agents/agentInformation';
|
||||||
// operateTimeType: typeDay
|
typeDay = 'day';
|
||||||
// }
|
}
|
||||||
// });
|
proxy.$router.push({
|
||||||
|
path: path,
|
||||||
|
query: {
|
||||||
|
activeName: 'details',
|
||||||
|
operateTimeType: typeDay
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ const timeTypeChange = (val) => {
|
||||||
case 'week':
|
case 'week':
|
||||||
dateRange.value = [
|
dateRange.value = [
|
||||||
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
dayjs().subtract(6, 'day').startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss.SSS')
|
||||||
]
|
]
|
||||||
break
|
break
|
||||||
case 'month':
|
case 'month':
|
||||||
|
|
@ -150,9 +150,9 @@ const dateRangeChange = (dataValue) => {
|
||||||
const end = new Date(dataValue[1]);
|
const end = new Date(dataValue[1]);
|
||||||
|
|
||||||
start.setHours(0, 0, 0); // 设置开始时间为当天的00:00:00点
|
start.setHours(0, 0, 0); // 设置开始时间为当天的00:00:00点
|
||||||
end.setHours(23, 59, 59); // 设置结束时间为当天的23:59:59
|
end.setHours(23, 59, 59,999); // 设置结束时间为当天的23:59:59
|
||||||
dateRange.value[0] = dayjs(start).format('YYYY-MM-DD HH:mm:ss');
|
dateRange.value[0] = dayjs(start).format('YYYY-MM-DD HH:mm:ss');
|
||||||
dateRange.value[1] = dayjs(end).format('YYYY-MM-DD HH:mm:ss');
|
dateRange.value[1] = dayjs(end).format('YYYY-MM-DD HH:mm:ss.SSS');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化时不触发父组件的查询
|
// 初始化时不触发父组件的查询
|
||||||
|
|
@ -163,7 +163,7 @@ const dateRangeChange = (dataValue) => {
|
||||||
|
|
||||||
// 生成日期区间
|
// 生成日期区间
|
||||||
const getTimeFn = (startTime) => {
|
const getTimeFn = (startTime) => {
|
||||||
return [startTime.format('YYYY-MM-DD HH:mm:ss'), dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')];
|
return [startTime.format('YYYY-MM-DD HH:mm:ss'), dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss.SSS')];
|
||||||
}
|
}
|
||||||
|
|
||||||
// 父组件重置
|
// 父组件重置
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||||
<template #left>
|
<template #left>
|
||||||
<table-search-date v-model:dateRange="dateRange" v-model:operateTimeType="operateTimeType"></table-search-date>
|
<table-search-date ref="searchDateRef" v-model:dateRange="dateRange" @dateChange="handleQuery" v-model:operateTimeType="operateTimeType"></table-search-date>
|
||||||
<el-form-item :label="t('商户账号')" prop="tenantKey">
|
<el-form-item :label="t('商户账号')" prop="tenantKey">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.tenantKey"
|
v-model="queryParams.tenantKey"
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
<el-table v-loading="loading" class="c-table-main" :data="agentList" border>
|
<el-table v-loading="loading" class="c-table-main" :data="agentList" border>
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||||
<el-table-column :label="t('订单号')" width="160" align="center" prop="orderId" :show-overflow-tooltip="true" />
|
<el-table-column :label="t('订单号')" width="160" align="center" prop="orderId" :show-overflow-tooltip="true" />
|
||||||
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" :show-overflow-tooltip="true" />
|
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" min-width="150" />
|
||||||
<!-- <el-table-column :label="t('前缀')" width="100" align="center" prop="tenantSn" /> -->
|
<!-- <el-table-column :label="t('前缀')" width="100" align="center" prop="tenantSn" /> -->
|
||||||
<el-table-column :label="t('平台币种')" align="center" prop="currencyCode" :show-overflow-tooltip="true" />
|
<el-table-column :label="t('平台币种')" align="center" prop="currencyCode" :show-overflow-tooltip="true" />
|
||||||
<el-table-column :label="t('汇率')" width="100" align="center" prop="exchangeRate" >
|
<el-table-column :label="t('汇率')" width="100" align="center" prop="exchangeRate" >
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="t('创建时间')" align="center" prop="createTime" :show-overflow-tooltip="true">
|
<el-table-column :label="t('创建时间')" align="center" prop="createTime" min-width="180">
|
||||||
<template #default="scope">{{ parseTime(scope.row.createTime) }}</template>
|
<template #default="scope">{{ parseTime(scope.row.createTime) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="t('操作')" align="center" width="200" class-name="small-padding fixed-width">
|
<el-table-column :label="t('操作')" align="center" width="200" class-name="small-padding fixed-width">
|
||||||
|
|
@ -220,7 +220,7 @@
|
||||||
import TableSearchDate from '@/components/TableSearchDate'
|
import TableSearchDate from '@/components/TableSearchDate'
|
||||||
import Crontab from '@/components/Crontab'
|
import Crontab from '@/components/Crontab'
|
||||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||||
import { nextTick } from "vue";
|
import { nextTick, onMounted } from "vue";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const { ff_tenant_type, ff_tenant_status } = proxy.useDict("ff_tenant_type", "ff_tenant_status");
|
const { ff_tenant_type, ff_tenant_status } = proxy.useDict("ff_tenant_type", "ff_tenant_status");
|
||||||
|
|
@ -339,13 +339,14 @@ const usdtSelect = ref([
|
||||||
queryParams.value.pageNum = 1;
|
queryParams.value.pageNum = 1;
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
const searchDateRef = ref(null);
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
dateRange.value = [];
|
dateRange.value = [];
|
||||||
operateTimeType.value = "";
|
operateTimeType.value = "day";
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm("queryRef");
|
||||||
handleQuery();
|
searchDateRef.value.timeTypeChange(operateTimeType.value)
|
||||||
}
|
}
|
||||||
//取消订单
|
//取消订单
|
||||||
const forcedCancel = (row) => {
|
const forcedCancel = (row) => {
|
||||||
|
|
@ -482,8 +483,12 @@ const paymentOpen = ref(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getsuperCommonCurrencySelect();
|
//初始化
|
||||||
getList();
|
onMounted(() => {
|
||||||
|
getsuperCommonCurrencySelect();
|
||||||
|
getList();
|
||||||
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-form-item prop="username" class="el-form-item-class">
|
<el-form-item prop="username" class="el-form-item-class">
|
||||||
<el-input v-model="loginForm.username" type="text" size="large" style="height: 52px;" class="backgr-class"
|
<el-input v-model="loginForm.username" type="text" size="large" style="height: 52px;" class="backgr-class"
|
||||||
:autocomplete="'new-password'" auto-complete="off" placeholder="账号">
|
:autocomplete="'new-password'" auto-complete="off" placeholder="账号">
|
||||||
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
<template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -151,8 +151,8 @@ const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
|
|
||||||
const loginForm = ref({
|
const loginForm = ref({
|
||||||
username: "admin",
|
username: "",
|
||||||
password: "aaa111",
|
password: "",
|
||||||
rememberMe: false,
|
rememberMe: false,
|
||||||
isShowEnabled: false,
|
isShowEnabled: false,
|
||||||
code: "",
|
code: "",
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,15 @@
|
||||||
<el-button type="primary" @click="queryCode('add')" :disabled="!formAll.tenantSystemPlatforms.length">+0.5</el-button>
|
<el-button type="primary" @click="queryCode('add')" :disabled="!formAll.tenantSystemPlatforms.length">+0.5</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex;margin-left: 120px;justify-content: space-between;margin-bottom: 10px;">
|
||||||
|
<div>
|
||||||
|
<CustomSelect v-if="showLoding2" v-model="searchPlatformCode" clearable :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||||
|
<CustomSelect v-model="searchCurrencyCode" :options="currencySelectArr" clearable placeholder="请选择币种" style="width: 200px"/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" @click="searchSystemPlatforms">{{ t('搜索') }}</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-table :data="formAll.tenantSystemPlatforms" loading="loading2" class="scoreRatioTable">
|
<el-table :data="formAll.tenantSystemPlatforms" loading="loading2" class="scoreRatioTable">
|
||||||
|
|
||||||
<el-table-column :label="t('平台')" align="center" prop="platformCode" />
|
<el-table-column :label="t('平台')" align="center" prop="platformCode" />
|
||||||
|
|
@ -134,6 +143,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,superCommonTimeZone } from "@/api/super/tenant.js";
|
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,superCommonTimeZone } from "@/api/super/tenant.js";
|
||||||
|
import { getPlatformShowSelect } from "@/api/super/platform.js";
|
||||||
import { nextTick, ref } from "vue";
|
import { nextTick, ref } from "vue";
|
||||||
import { getLocalStorage } from "@/utils/auth";
|
import { getLocalStorage } from "@/utils/auth";
|
||||||
import NumberInput from '@/components/NumberInput'
|
import NumberInput from '@/components/NumberInput'
|
||||||
|
|
@ -180,6 +190,7 @@ const formAll = reactive({ // 表单验证数据
|
||||||
realBalance: [],
|
realBalance: [],
|
||||||
})
|
})
|
||||||
const currencySelectArr = ref([]);
|
const currencySelectArr = ref([]);
|
||||||
|
const PlatformRatioAll = ref([]);
|
||||||
let res = getLocalStorage('currencySelect');
|
let res = getLocalStorage('currencySelect');
|
||||||
currencySelectArr.value = res.map(item => {
|
currencySelectArr.value = res.map(item => {
|
||||||
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
||||||
|
|
@ -218,6 +229,8 @@ const rules = ref({
|
||||||
numbers.value = Number(itemObj.useCost)- Number(itemObj.cost);
|
numbers.value = Number(itemObj.useCost)- Number(itemObj.cost);
|
||||||
totalPlatform.value = resData.length;
|
totalPlatform.value = resData.length;
|
||||||
tenantSystemPlatforms.value = JSON.parse(JSON.stringify(resData));
|
tenantSystemPlatforms.value = JSON.parse(JSON.stringify(resData));
|
||||||
|
PlatformRatioAll.value = JSON.parse(JSON.stringify(resData));
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
changeCurrency('VND')
|
changeCurrency('VND')
|
||||||
});
|
});
|
||||||
|
|
@ -225,11 +238,20 @@ const rules = ref({
|
||||||
function findByConditions(arr, conditions = {}) {
|
function findByConditions(arr, conditions = {}) {
|
||||||
// 如果 conditions 为空对象,就直接返回全部
|
// 如果 conditions 为空对象,就直接返回全部
|
||||||
if (conditions.currencyCode == '') {
|
if (conditions.currencyCode == '') {
|
||||||
let arr11 = [];
|
// ✅ 用 ref 包装成响应式
|
||||||
arr.map(item => {
|
const arr11 = ref([]);
|
||||||
arr11.push(...item.list);
|
// 异步小步处理,避免一次性塞太多
|
||||||
})
|
const mergeData = async () => {
|
||||||
return arr11||[];
|
for (let i = 0; i < arr.length; i++) {
|
||||||
|
arr11.value.push(...arr[i].list);
|
||||||
|
if (i % 1 == 0) {
|
||||||
|
// 每处理20组,给浏览器一点空闲时间
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
mergeData();
|
||||||
|
return arr11.value || [];
|
||||||
}
|
}
|
||||||
const found = arr.find(item => item.currencyCode == conditions.currencyCode);
|
const found = arr.find(item => item.currencyCode == conditions.currencyCode);
|
||||||
return found ? found.list : [];
|
return found ? found.list : [];
|
||||||
|
|
@ -240,11 +262,35 @@ const loading2 = ref(false);
|
||||||
const changeCurrency = (val) => {
|
const changeCurrency = (val) => {
|
||||||
loading2.value = true;
|
loading2.value = true;
|
||||||
formAll.tenantSystemPlatforms = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
formAll.tenantSystemPlatforms = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||||
|
PlatformRatioAll.value = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||||
|
|
||||||
totalPlatform.value = formAll.tenantSystemPlatforms.length;
|
totalPlatform.value = formAll.tenantSystemPlatforms.length;
|
||||||
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
loading2.value = false;
|
loading2.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const searchPlatformCode = ref('');
|
||||||
|
const searchCurrencyCode = ref('');
|
||||||
|
//搜索平台费
|
||||||
|
const searchSystemPlatforms = () => {
|
||||||
|
const result = [];
|
||||||
|
|
||||||
|
PlatformRatioAll.value.forEach(item => {
|
||||||
|
// 两个条件都填写时,同时匹配;只填写一个条件时,匹配对应条件
|
||||||
|
const match =
|
||||||
|
(searchPlatformCode.value && searchCurrencyCode.value)
|
||||||
|
? item.platformCode === searchPlatformCode.value && item.currencyCode === searchCurrencyCode.value
|
||||||
|
: (searchPlatformCode.value ? item.platformCode === searchPlatformCode.value : false) ||
|
||||||
|
(searchCurrencyCode.value ? item.currencyCode === searchCurrencyCode.value : false);
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
result.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
formAll.tenantSystemPlatforms = result;
|
||||||
|
};
|
||||||
const loading1 = ref(false);
|
const loading1 = ref(false);
|
||||||
/** 获取货币 */
|
/** 获取货币 */
|
||||||
function getSuperCommonCurrencySelect() {
|
function getSuperCommonCurrencySelect() {
|
||||||
|
|
@ -313,11 +359,24 @@ const handleBlur = (row) => {
|
||||||
// this.$message.warning(`不能小于最小成本:${cost}`);
|
// this.$message.warning(`不能小于最小成本:${cost}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const sys_job_status = ref([]);
|
||||||
|
const showLoding2 = ref(true);
|
||||||
|
const getsuperCommonPlatformTypeSelect = async () => {
|
||||||
|
showLoding2.value = false;
|
||||||
|
getPlatformShowSelect().then(response => {
|
||||||
|
sys_job_status.value = response.data.map(item => {
|
||||||
|
return { label: item.platformName, value: item.platformCode }
|
||||||
|
});
|
||||||
|
showLoding2.value = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
//修改时数据更新区域
|
//修改时数据更新区域
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
getSelectPlatform();
|
getSelectPlatform();
|
||||||
getSuperCommonCurrencySelect();
|
getSuperCommonCurrencySelect();
|
||||||
superCommonTimeZones();
|
superCommonTimeZones();
|
||||||
|
getsuperCommonPlatformTypeSelect();
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// DEMO加载完成后
|
// DEMO加载完成后
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div>
|
<div>
|
||||||
<el-button @click="handleAddType" type="primary" v-h="['super:tenant:quota:add']" plain icon="Plus">新增</el-button>
|
<el-button @click="handleAddType" type="primary" v-hasPermi="['super:tenant:quota:add']" plain icon="Plus">新增</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-table :data="platAdjustmentList" class="" border>
|
<el-table :data="platAdjustmentList" class="" border>
|
||||||
|
|
@ -44,10 +44,8 @@
|
||||||
<el-table-column :label="t('操作')" align="center" prop="balance" width="130px">
|
<el-table-column :label="t('操作')" align="center" prop="balance" width="130px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div style="display: flex;justify-content: space-between;align-items: center;">
|
<div style="display: flex;justify-content: space-between;align-items: center;">
|
||||||
|
|
||||||
<el-button @click="handleAdd($event,row)">调额</el-button>
|
<el-button @click="handleAdd($event,row)">调额</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -99,6 +97,11 @@
|
||||||
</NumberInput>
|
</NumberInput>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="平台额度" prop="platformBalanceJson">
|
||||||
|
<div style="width: 100%;">
|
||||||
|
{{sumPlatformBalance(formAdjustment.platformBalanceJson)}}
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="平台额度" prop="platformBalanceJson">
|
<el-form-item label="平台额度" prop="platformBalanceJson">
|
||||||
<el-table :data="parsePlatformBalance(formAdjustment.platformBalanceJson)" height="200" ref="myTable" >
|
<el-table :data="parsePlatformBalance(formAdjustment.platformBalanceJson)" height="200" ref="myTable" >
|
||||||
<el-table-column :label="t('平台')" align="center" prop="name" />
|
<el-table-column :label="t('平台')" align="center" prop="name" />
|
||||||
|
|
@ -152,9 +155,13 @@ const props = defineProps({ // 父组件向子组件传值
|
||||||
})
|
})
|
||||||
let resData = getLocalStorage('currencySelect');
|
let resData = getLocalStorage('currencySelect');
|
||||||
const currencyCodesOptions = ref([]);
|
const currencyCodesOptions = ref([]);
|
||||||
currencyCodesOptions.value = resData.map(item => {
|
currencyCodesOptions.value = [
|
||||||
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
{ label: '全部', value: '0' },
|
||||||
})
|
...resData.map(item => ({
|
||||||
|
label: `${item.currencyName}(${item.currencyCode})`,
|
||||||
|
value: item.currencyCode
|
||||||
|
}))
|
||||||
|
];
|
||||||
const currencySelectAll = getLocalStorage('currencySelect').map(item => {
|
const currencySelectAll = getLocalStorage('currencySelect').map(item => {
|
||||||
return {...item, label: item.currencyCode, value: item.currencyCode }
|
return {...item, label: item.currencyCode, value: item.currencyCode }
|
||||||
});
|
});
|
||||||
|
|
@ -281,16 +288,20 @@ const platAdjustment = ref({
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
orderByColumn: 'currencyCode',
|
orderByColumn: 'currencyCode',
|
||||||
isAsc: 'asc',
|
isAsc: 'asc',
|
||||||
tenantKey: ''
|
tenantKey: '',
|
||||||
|
currencyCode:'0',
|
||||||
});
|
});
|
||||||
const totalAdjustment = ref(0);
|
const totalAdjustment = ref(0);
|
||||||
const platAdjustmentList = ref([]);
|
const platAdjustmentList = ref([]);
|
||||||
const handleAdjustment = (row) => {
|
const handleAdjustment = (row) => {
|
||||||
platAdjustment.value.tenantKey = row.tenantKey;
|
platAdjustment.value.tenantKey = row.tenantKey;
|
||||||
superTenantQuotaList(platAdjustment.value).then(response => {
|
let obj = {
|
||||||
|
...platAdjustment.value,
|
||||||
|
currencyCode: platAdjustment.value.currencyCode == 0 ? '' : platAdjustment.value.currencyCode,
|
||||||
|
}
|
||||||
|
superTenantQuotaList(obj).then(response => {
|
||||||
platAdjustmentList.value = response.rows;
|
platAdjustmentList.value = response.rows;
|
||||||
totalAdjustment.value = response.total;
|
totalAdjustment.value = response.total;
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -384,31 +395,48 @@ superCommonCurrencySelects();
|
||||||
superCommonQuotaTypeSelects();
|
superCommonQuotaTypeSelects();
|
||||||
const openCreditType = ref(false);
|
const openCreditType = ref(false);
|
||||||
const handleAddType = (value) => {
|
const handleAddType = (value) => {
|
||||||
if (!platAdjustment.value.currencyCode){
|
if (!platAdjustment.value.currencyCode || platAdjustment.value.currencyCode == 0){
|
||||||
ElMessage.warning('请选择币种!');
|
ElMessage.warning('请选择币种!');
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// openCreditType.value = true;
|
// openCreditType.value = true;
|
||||||
visible.value = true;
|
|
||||||
formAdjustment.value.id = '';
|
formAdjustment.value.id = '';
|
||||||
formAdjustment.value.platformBalanceJson = '{}';
|
if ( platAdjustmentList.value.length == 0 ){
|
||||||
formAdjustment.value.realBalance = 0;
|
formAdjustment.value.realBalance = 0;
|
||||||
formAdjustment.value.creditBalance = 0;
|
formAdjustment.value.creditBalance = 0;
|
||||||
|
formAdjustment.value.platformBalanceJson = '{}';
|
||||||
|
}else{
|
||||||
|
formAdjustment.value.id = platAdjustmentList.value[0]?.id;
|
||||||
|
formAdjustment.value.realBalance = platAdjustmentList.value[0]?.realBalance;
|
||||||
|
formAdjustment.value.platformBalanceJson = platAdjustmentList.value[0]?.platformBalanceJson;
|
||||||
|
formAdjustment.value.creditBalance = platAdjustmentList.value[0]?.creditBalance;
|
||||||
|
}
|
||||||
|
formAdjustment.value.balanceReal = 0;
|
||||||
|
formAdjustment.value.balanceCredit = 0;
|
||||||
formAdjustment.value.tenantKey = props.modifyDate.tenantKey;
|
formAdjustment.value.tenantKey = props.modifyDate.tenantKey;
|
||||||
formAdjustment.value.currencyCode = platAdjustment.value.currencyCode;
|
formAdjustment.value.currencyCode = platAdjustment.value.currencyCode;
|
||||||
|
visible.value = false;
|
||||||
|
setTimeout(() => {
|
||||||
|
visible.value = true;
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
const handleAdd = (value,row) => {
|
const handleAdd = (value,row) => {
|
||||||
let rowOpen = JSON.parse(JSON.stringify(row));
|
let rowOpen = JSON.parse(JSON.stringify(row));
|
||||||
visible.value = true;
|
|
||||||
formAdjustment.value.id = rowOpen.id;
|
formAdjustment.value.id = rowOpen.id;
|
||||||
formAdjustment.value = rowOpen;
|
formAdjustment.value = rowOpen;
|
||||||
|
formAdjustment.value.balanceReal = 0;
|
||||||
|
formAdjustment.value.balanceCredit = 0;
|
||||||
|
visible.value = false;
|
||||||
|
nextTick(()=>{
|
||||||
|
visible.value = true;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const onSubmit = () => {
|
const onSubmit = () => {
|
||||||
proxy.$refs["formAdjustmentRef"].validate(valid => {
|
proxy.$refs["formAdjustmentRef"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let numBalance = 0;
|
let numBalance = 0;
|
||||||
if(Number(formAdjustment.value.balanceReal) <= 0 || Number(formAdjustment.value.balanceCredit) <= 0){
|
if(Number(formAdjustment.value.balanceReal) < 0 || Number(formAdjustment.value.balanceCredit) < 0){
|
||||||
formAdjustment.value.isOut = false;
|
formAdjustment.value.isOut = false;
|
||||||
if (formAdjustment.value.balanceReal !=0){
|
if (formAdjustment.value.balanceReal !=0){
|
||||||
numBalance = Math.abs(formAdjustment.value.balanceReal);
|
numBalance = Math.abs(formAdjustment.value.balanceReal);
|
||||||
|
|
@ -427,6 +455,9 @@ const onSubmit = () => {
|
||||||
id: formAdjustment.value.id,
|
id: formAdjustment.value.id,
|
||||||
balance:numBalance,
|
balance:numBalance,
|
||||||
googleCode: formAdjustment.value.googleCode,
|
googleCode: formAdjustment.value.googleCode,
|
||||||
|
tenantKey: formAdjustment.value.tenantKey,
|
||||||
|
currencyCode: formAdjustment.value.currencyCode,
|
||||||
|
quotaType: props.modifyDate.tenantType == 1?'BALANCE':'REPUTATION',
|
||||||
isOut: formAdjustment.value.isOut,
|
isOut: formAdjustment.value.isOut,
|
||||||
remark: formAdjustment.value.remark
|
remark: formAdjustment.value.remark
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,15 @@
|
||||||
:disabled="!formAll.tenantSystemPlatforms.length">+0.5</el-button>
|
:disabled="!formAll.tenantSystemPlatforms.length">+0.5</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex;margin-left: 120px;justify-content: space-between;margin-bottom: 10px;">
|
||||||
|
<div>
|
||||||
|
<CustomSelect v-if="showLoding2" v-model="searchPlatformCode" clearable :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||||
|
<CustomSelect v-model="searchCurrencyCode" :options="currencySelectArr" clearable placeholder="请选择币种" style="width: 200px"/>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" @click="searchSystemPlatforms">{{ t('搜索') }}</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-table :data="formAll.tenantSystemPlatforms" ref="myTable" class="scoreRatioTable" >
|
<el-table :data="formAll.tenantSystemPlatforms" ref="myTable" class="scoreRatioTable" >
|
||||||
<!-- <el-table-column :label="t('id')" align="center" >
|
<!-- <el-table-column :label="t('id')" align="center" >
|
||||||
<template #default="{row,$index}">
|
<template #default="{row,$index}">
|
||||||
|
|
@ -106,6 +115,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { updateSuperTenantEdit } from "@/api/super/tenant.js";
|
import { updateSuperTenantEdit } from "@/api/super/tenant.js";
|
||||||
|
import { getPlatformShowSelect } from "@/api/super/platform.js";
|
||||||
import { superPlatformSystem } from "@/api/agent";
|
import { superPlatformSystem } from "@/api/agent";
|
||||||
import { getLocalStorage } from "@/utils/auth";
|
import { getLocalStorage } from "@/utils/auth";
|
||||||
import { nextTick, ref } from "vue";
|
import { nextTick, ref } from "vue";
|
||||||
|
|
@ -145,7 +155,7 @@ const forceUpdateTable = async () => {
|
||||||
// 假设 allData 已经有 1000 条数据
|
// 假设 allData 已经有 1000 条数据
|
||||||
// 每次塞 10 条进去
|
// 每次塞 10 条进去
|
||||||
let index = 0
|
let index = 0
|
||||||
const batchSize = 20
|
const batchSize = 100
|
||||||
|
|
||||||
const loadBatch = () => {
|
const loadBatch = () => {
|
||||||
if (index < props.modifyDate.tenantSystemPlatforms.length) {
|
if (index < props.modifyDate.tenantSystemPlatforms.length) {
|
||||||
|
|
@ -156,6 +166,7 @@ const forceUpdateTable = async () => {
|
||||||
// 下一帧再加载,避免阻塞 UI
|
// 下一帧再加载,避免阻塞 UI
|
||||||
requestAnimationFrame(loadBatch)
|
requestAnimationFrame(loadBatch)
|
||||||
}
|
}
|
||||||
|
PlatformRatioAll.value = props.modifyDate.tenantSystemPlatforms;
|
||||||
oldForm.value = JSON.stringify(formAll);
|
oldForm.value = JSON.stringify(formAll);
|
||||||
}
|
}
|
||||||
loadBatch()
|
loadBatch()
|
||||||
|
|
@ -179,6 +190,7 @@ const formAll = reactive({ // 表单验证数据
|
||||||
realBalance: [],
|
realBalance: [],
|
||||||
})
|
})
|
||||||
const currencySelectArr = ref([]);
|
const currencySelectArr = ref([]);
|
||||||
|
const PlatformRatioAll = ref([]);
|
||||||
let res = getLocalStorage('currencySelect');
|
let res = getLocalStorage('currencySelect');
|
||||||
currencySelectArr.value = res.map(item => {
|
currencySelectArr.value = res.map(item => {
|
||||||
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
return { label:`${item.currencyName}(${item.currencyCode})`, value: item.currencyCode }
|
||||||
|
|
@ -198,7 +210,30 @@ function getSelectPlatform() {
|
||||||
let resData = getLocalStorage('tenantSystemPlatforms');
|
let resData = getLocalStorage('tenantSystemPlatforms');
|
||||||
tenantSystemPlatforms.value = resData;
|
tenantSystemPlatforms.value = resData;
|
||||||
}
|
}
|
||||||
|
const searchPlatformCode = ref('');
|
||||||
|
const searchCurrencyCode = ref('');
|
||||||
|
//搜索平台
|
||||||
|
const searchSystemPlatforms = () => {
|
||||||
|
const result = [];
|
||||||
|
PlatformRatioAll.value.forEach(item => {
|
||||||
|
// 两个条件都填写时,同时匹配;只填写一个条件时,匹配对应条件
|
||||||
|
const match =
|
||||||
|
(searchPlatformCode.value && searchCurrencyCode.value)
|
||||||
|
? item.platformCode === searchPlatformCode.value && item.currencyCode === searchCurrencyCode.value
|
||||||
|
: (searchPlatformCode.value ? item.platformCode === searchPlatformCode.value : false) ||
|
||||||
|
(searchCurrencyCode.value ? item.currencyCode === searchCurrencyCode.value : false);
|
||||||
|
|
||||||
|
if (match) {
|
||||||
|
result.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (result.length > 0) {
|
||||||
|
formAll.tenantSystemPlatforms = result;
|
||||||
|
}else{
|
||||||
|
formAll.tenantSystemPlatforms = PlatformRatioAll.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
const loading1 = ref(false);
|
const loading1 = ref(false);
|
||||||
/** 获取货币 */
|
/** 获取货币 */
|
||||||
function getSuperCommonCurrencySelect() {
|
function getSuperCommonCurrencySelect() {
|
||||||
|
|
@ -246,21 +281,35 @@ const changeCurrency = (val) => {
|
||||||
loading2.value = true;
|
loading2.value = true;
|
||||||
console.log(tenantSystemPlatforms.value.length);
|
console.log(tenantSystemPlatforms.value.length);
|
||||||
formAll.tenantSystemPlatforms = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
formAll.tenantSystemPlatforms = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||||
|
PlatformRatioAll.value = findByConditions(tenantSystemPlatforms.value, { currencyCode: val });
|
||||||
totalPlatform.value = formAll.tenantSystemPlatforms.length;
|
totalPlatform.value = formAll.tenantSystemPlatforms.length;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
loading2.value = false;
|
loading2.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
const sys_job_status = ref([]);
|
||||||
|
const showLoding2 = ref(true);
|
||||||
|
const getsuperCommonPlatformTypeSelect = async () => {
|
||||||
|
showLoding2.value = false;
|
||||||
|
getPlatformShowSelect().then(response => {
|
||||||
|
sys_job_status.value = response.data.map(item => {
|
||||||
|
return { label: item.platformName, value: item.platformCode }
|
||||||
|
});
|
||||||
|
showLoding2.value = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
//修改时数据更新区域
|
//修改时数据更新区域
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
getSelectPlatform();
|
getSelectPlatform();
|
||||||
getSuperCommonCurrencySelect();
|
getSuperCommonCurrencySelect();
|
||||||
|
getsuperCommonPlatformTypeSelect();
|
||||||
})
|
})
|
||||||
|
|
||||||
// DEMO加载完成后
|
// DEMO加载完成后
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// 监听自定义语言
|
// 监听自定义语言
|
||||||
// formAll.tenantSystemPlatforms = props.modifyDate.tenantSystemPlatforms;
|
// formAll.tenantSystemPlatforms = props.modifyDate.tenantSystemPlatforms;
|
||||||
|
PlatformRatioAll.value = props.modifyDate.tenantSystemPlatforms;
|
||||||
formAll.account = props.modifyDate.account;
|
formAll.account = props.modifyDate.account;
|
||||||
formAll.tenantType = props.modifyDate.tenantType;
|
formAll.tenantType = props.modifyDate.tenantType;
|
||||||
formAll.scoreRatio = props.modifyDate.scoreRatio;
|
formAll.scoreRatio = props.modifyDate.scoreRatio;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,17 @@
|
||||||
<span v-if="row.agentAccount">{{ t('代理') }}: {{ row.agentAccount }}</span>
|
<span v-if="row.agentAccount">{{ t('代理') }}: {{ row.agentAccount }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" width="160px" :show-overflow-tooltip="true" />
|
<el-table-column :label="t('商户账号')" align="center" prop="tenantKey" width="170px" >
|
||||||
|
<template #default="{row}">
|
||||||
|
<div style="width: 100%;text-align: left;">{{ t('账号') }}: {{ row.tenantKey }}</div>
|
||||||
|
<div style="width: 100%;text-align: left;">{{ t('谷歌') }}:
|
||||||
|
<span v-if="row.googleCode == null || row.googleCode == ''" style="color: #909399;">{{ t('未绑定') }}</span>
|
||||||
|
<span v-else style="color: #1ab394;">{{ t('已绑定') }} <el-button link type="primary" @click="handleUnbindGoogle(row)" v-hasPermi="['super:tenant:resetGoogleCode']">{{ t('解除') }}</el-button></span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column :label="t('商户额度')" width="100" align="center" >
|
<el-table-column :label="t('商户额度')" width="100" align="center" >
|
||||||
<template #default="{row}">
|
<template #default="{row}">
|
||||||
<el-button link type="primary" @click="handleAdjustment(row)" v-hasPermi="['super:tenant:quota:update']">{{ t('调额') }}</el-button>
|
<el-button link type="primary" @click="handleAdjustment(row)" v-hasPermi="['super:tenant:quota:update']">{{ t('调额') }}</el-button>
|
||||||
|
|
@ -183,7 +193,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Agent">
|
<script setup name="Agent">
|
||||||
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,updateSuperTenantSwitch } from "@/api/super/tenant.js";
|
import { superTenantList, createTenantCreate,updateSuperTenantResetPwd,updateSuperResetGoogleCode,getSuperTenant,superTenantQuotaList,updateSuperTenantQuotaUpdate,updateSuperTenantSwitch } from "@/api/super/tenant.js";
|
||||||
import { superPlatformSystem } from "@/api/agent";
|
import { superPlatformSystem } from "@/api/agent";
|
||||||
import { getLocalStorage } from "@/utils/auth";
|
import { getLocalStorage } from "@/utils/auth";
|
||||||
import AddMerchantsDialog from './components/AddMerchantsDialog'
|
import AddMerchantsDialog from './components/AddMerchantsDialog'
|
||||||
|
|
@ -316,6 +326,25 @@ const beforeSwitchChange = async (row, undateKeys) => {
|
||||||
openResetTiele.value = "对接信息";
|
openResetTiele.value = "对接信息";
|
||||||
ConnectionArr.value = row;
|
ConnectionArr.value = row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//解除
|
||||||
|
const handleUnbindGoogle = (row) => {
|
||||||
|
proxy.$confirm('确定解除绑定吗?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
console.log(row)
|
||||||
|
|
||||||
|
updateSuperResetGoogleCode({
|
||||||
|
id: row.id,
|
||||||
|
}).then(res => {
|
||||||
|
proxy.$modal.msgSuccess(proxy.t('解除成功'));
|
||||||
|
getList();
|
||||||
|
})
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
const handleCopy = async(text) => {
|
const handleCopy = async(text) => {
|
||||||
// 支持现代 API:需 HTTPS 或 localhost
|
// 支持现代 API:需 HTTPS 或 localhost
|
||||||
if (navigator.clipboard && window.isSecureContext) {
|
if (navigator.clipboard && window.isSecureContext) {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
<el-table-column :label="t('操作')" align="center">
|
<el-table-column :label="t('操作')" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleView(scope.row)">{{ t('详情') }}</el-button>
|
<el-button link type="primary" @click="handleView(scope.row)">{{ t('详情') }}</el-button>
|
||||||
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['sys:notice:remove']">{{ t('删除') }}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -72,7 +73,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="Commission">
|
<script setup name="Commission">
|
||||||
import { listNotice,createSysNotice } from "@/api/notice";
|
import { listNotice,createSysNotice,sysNoticeDelete } from "@/api/notice";
|
||||||
import Crontab from '@/components/Crontab'
|
import Crontab from '@/components/Crontab'
|
||||||
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
import { parseTime } from '@/utils/ruoyi'; // 时间格式化
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -109,10 +110,13 @@ const data = reactive({
|
||||||
isAsc:'desc'
|
isAsc:'desc'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
account: [{ required: true, message: proxy.t('商户账号不能为空'), trigger: "blur" }],
|
title: [
|
||||||
password: [{ required: true, message: proxy.t('密码不能为空'), trigger: "blur" }],
|
{ required: true, message: "请输入标题", trigger: "change" }
|
||||||
scoreRatio: [{ required: true, message: proxy.t('买分比例不能为空'), trigger: "blur" }],
|
],
|
||||||
tenantType: [{ required: true, message: proxy.t('商户模式不能为空'), trigger: "change" }],
|
content: [
|
||||||
|
{ required: true, message: "请输入内容", trigger: "change" }
|
||||||
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -165,6 +169,16 @@ function handleView(row) {
|
||||||
openView.value = true;
|
openView.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除
|
||||||
|
function handleDelete(row) {
|
||||||
|
proxy.$modal.confirm(proxy.t('确认删除标题名称为“ ' + row?.title + ' ”的数据?')).then(() => {
|
||||||
|
return sysNoticeDelete(row.id);
|
||||||
|
}).then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess(proxy.t('删除成功!'));
|
||||||
|
}).catch(() => { });
|
||||||
|
}
|
||||||
|
|
||||||
function queryCode(type) {
|
function queryCode(type) {
|
||||||
form.value.tenantAgentPlatforms = form.value.tenantAgentPlatforms.map((item, index) => {
|
form.value.tenantAgentPlatforms = form.value.tenantAgentPlatforms.map((item, index) => {
|
||||||
if (type === 'del' && item.cost > tenantAgentPlatforms.value[index].cost) {
|
if (type === 'del' && item.cost > tenantAgentPlatforms.value[index].cost) {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,13 @@
|
||||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||||
<template #left>
|
<template #left>
|
||||||
<el-form-item :label="t('游戏平台')" prop="platformCode">
|
<el-form-item :label="t('游戏平台')" prop="platformCode">
|
||||||
<CustomSelect v-if="showLoding2" v-model="queryParams.platformCode" :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
<CustomSelect v-if="showLoding2" v-model="queryParams.platformCode" :options="sys_job_status" filterable placeholder="请选择游戏平台" style="width: 200px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<select-input-form ref="selectInputFormRef" :queryParamsList="queryParamsList" :queryParams="queryParams">
|
||||||
|
</select-input-form>
|
||||||
|
<el-form-item :label="t('状态')" prop="stopStatus">
|
||||||
|
<CustomSelect v-model="queryParams.stopStatus" :options="stopStatusOptions" filterable placeholder="请选择状态" style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
@ -228,6 +233,7 @@
|
||||||
import NumberInput from '@/components/NumberInput'
|
import NumberInput from '@/components/NumberInput'
|
||||||
import CustomSelect from '@/components/CustomSelect'
|
import CustomSelect from '@/components/CustomSelect'
|
||||||
import BaseSwitch from '@/components/BaseSwitch'
|
import BaseSwitch from '@/components/BaseSwitch'
|
||||||
|
import SelectInputForm from '@/components/SelectInputForm';
|
||||||
import { id } from "element-plus/es/locales.mjs";
|
import { id } from "element-plus/es/locales.mjs";
|
||||||
import { nextTick, ref } from "vue";
|
import { nextTick, ref } from "vue";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
@ -257,7 +263,20 @@ import { nextTick, ref } from "vue";
|
||||||
|
|
||||||
});
|
});
|
||||||
const oldForm = shallowRef({ });
|
const oldForm = shallowRef({ });
|
||||||
|
const queryParamsList = reactive([{
|
||||||
|
label: proxy.t('游戏ID'),
|
||||||
|
value: 'gameId',
|
||||||
|
},{ //查询条件选择
|
||||||
|
label: proxy.t('游戏编码'),
|
||||||
|
value: 'gameCode',
|
||||||
|
},{ //查询条件选择
|
||||||
|
label: proxy.t('游戏名称'),
|
||||||
|
value: 'gameName',
|
||||||
|
}])
|
||||||
|
const stopStatusOptions = [
|
||||||
|
{ label: proxy.t('启用'), value: false },
|
||||||
|
{ label: proxy.t('关闭'), value: true },
|
||||||
|
]
|
||||||
const rulesInterface = reactive({
|
const rulesInterface = reactive({
|
||||||
})
|
})
|
||||||
const platformTypeOptions = [
|
const platformTypeOptions = [
|
||||||
|
|
@ -308,7 +327,8 @@ import { nextTick, ref } from "vue";
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
platformCode: "",
|
platformCode: "AE",
|
||||||
|
searchType:'gameId'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
account: [{ required: true, message: proxy.t('商户账号不能为空'), trigger: "blur" }],
|
account: [{ required: true, message: proxy.t('商户账号不能为空'), trigger: "blur" }],
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
<table-search-card :model="queryParams" @getList="getList" @handleQuery="handleQuery" @resetQuery="resetQuery">
|
||||||
<template #left>
|
<template #left>
|
||||||
<el-form-item :label="t('接口名称')" prop="platformName">
|
<el-form-item :label="t('厂商名称')" prop="platformName">
|
||||||
<el-input v-model="queryParams.platformName" style="width: 200px" placeholder="请输入接口名称" clearable />
|
<el-input v-model="queryParams.platformName" style="width: 200px" placeholder="请输入厂商名称" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="t('游戏平台')" prop="platformShowCode">
|
<el-form-item :label="t('平台编码')" prop="platformShowCode">
|
||||||
<CustomSelect v-if="showLoding2" v-model="queryParams.platformShowCode" filterable :options="sys_job_status" placeholder="请选择游戏平台" style="width: 200px" />
|
<CustomSelect v-if="showLoding2" v-model="queryParams.platformShowCode" filterable :options="sys_job_status" placeholder="请选择游戏平台" style="width: 200px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="t('开启状态')" prop="stopStatus">
|
<el-form-item :label="t('开启状态')" prop="stopStatus">
|
||||||
|
|
@ -127,7 +127,9 @@
|
||||||
|
|
||||||
<!-- 修改平台 -->
|
<!-- 修改平台 -->
|
||||||
<el-dialog v-if="openRevise" :title="rowOpenRevise.id == '' ? t('新增平台') : t('修改平台')" align-center v-model="openRevise" width="1300px" append-to-body>
|
<el-dialog v-if="openRevise" :title="rowOpenRevise.id == '' ? t('新增平台') : t('修改平台')" align-center v-model="openRevise" width="1300px" append-to-body>
|
||||||
|
|
||||||
<el-form ref="openReviseRef" :model="rowOpenRevise" :rules="ruleForm" label-width="120px">
|
<el-form ref="openReviseRef" :model="rowOpenRevise" :rules="ruleForm" label-width="120px">
|
||||||
|
<custom-select v-if="versionItem.length !=0" v-model="versionValue" :options="versionItem" @change="switchingVersions" style="width: 200px;margin-bottom: 10px;"></custom-select>
|
||||||
<el-descriptions border :column="2" class="c-descriptions" >
|
<el-descriptions border :column="2" class="c-descriptions" >
|
||||||
<el-descriptions-item label-width="150" label-align="right">
|
<el-descriptions-item label-width="150" label-align="right">
|
||||||
<template #label>
|
<template #label>
|
||||||
|
|
@ -235,7 +237,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 详情/修改对话框 -->
|
<!-- 详情/修改对话框 -->
|
||||||
<el-dialog v-model="openView" align-center width="1300px" append-to-body>
|
<el-dialog v-if="openView" v-model="openView" align-center width="1300px" append-to-body>
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="width: 100%;text-align: center;">{{ titlePlatForm }}</div>
|
<div style="width: 100%;text-align: center;">{{ titlePlatForm }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -317,9 +319,8 @@ import { ref } from "vue";
|
||||||
{ label: "开启", value: false },
|
{ label: "开启", value: false },
|
||||||
{ label: "关闭", value: true },
|
{ label: "关闭", value: true },
|
||||||
])
|
])
|
||||||
|
const versionItem = ref([]);// 版本
|
||||||
const formInterface = reactive({
|
const formInterface = reactive({
|
||||||
|
|
||||||
});
|
});
|
||||||
const oldForm = shallowRef({ });
|
const oldForm = shallowRef({ });
|
||||||
|
|
||||||
|
|
@ -650,23 +651,34 @@ const switchBeforeChange = () => {
|
||||||
const titlePlatForm = ref('');
|
const titlePlatForm = ref('');
|
||||||
const handleRevise = (row) => {
|
const handleRevise = (row) => {
|
||||||
titlePlatForm.value = proxy.t('修改');
|
titlePlatForm.value = proxy.t('修改');
|
||||||
tenantSystemPlatformDTOSRow.value = row.tenantSystemPlatformDTOS;
|
let objForm = JSON.parse(JSON.stringify(row.tenantSystemPlatformDTOS));
|
||||||
|
tenantSystemPlatformDTOSRow.value = objForm;
|
||||||
|
|
||||||
oldForm.value = JSON.stringify(tenantSystemPlatformDTOSRow.value);
|
oldForm.value = JSON.stringify(tenantSystemPlatformDTOSRow.value);
|
||||||
openView.value = true;
|
openView.value = false;
|
||||||
|
setTimeout(() => {
|
||||||
|
openView.value = true;
|
||||||
|
}, 100);
|
||||||
}
|
}
|
||||||
const openInterface = ref(false);
|
const openInterface = ref(false);
|
||||||
const rowInterface = ref({});
|
const rowInterface = ref({});
|
||||||
|
|
||||||
|
|
||||||
//接口信息
|
//接口信息
|
||||||
const handleInterface = (row) => {
|
const handleInterface = (row) => {
|
||||||
getSuperPlatformInf(row.id).then(response => {
|
getSuperPlatformInf(row.id).then(response => {
|
||||||
Object.assign(formInterface, response.data);
|
Object.assign(formInterface, response.data);
|
||||||
oldForm.value = JSON.stringify(formInterface);
|
oldForm.value = JSON.stringify(formInterface);
|
||||||
openInterface.value = true;
|
openInterface.value = true;
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const openRevise = ref(false);
|
const openRevise = ref(false);
|
||||||
|
const versionValue = ref('');
|
||||||
|
const formInterfaceVersion = ref({});
|
||||||
|
const platformHistoryList = ref([]);
|
||||||
const rowOpenRevise = reactive({});
|
const rowOpenRevise = reactive({});
|
||||||
const handleOpenRevise = (row) => {
|
const handleOpenRevise = (row) => {
|
||||||
getSuperPlatformInf(row.id).then(response => {
|
getSuperPlatformInf(row.id).then(response => {
|
||||||
|
|
@ -678,11 +690,45 @@ const switchBeforeChange = () => {
|
||||||
rowOpenRevise.extInfo = JSON.stringify(rowOpenRevise.extInfo);
|
rowOpenRevise.extInfo = JSON.stringify(rowOpenRevise.extInfo);
|
||||||
rowOpenRevise.urlInfo = JSON.stringify(rowOpenRevise.urlInfo);
|
rowOpenRevise.urlInfo = JSON.stringify(rowOpenRevise.urlInfo);
|
||||||
oldForm.value = JSON.stringify(rowOpenRevise);
|
oldForm.value = JSON.stringify(rowOpenRevise);
|
||||||
|
formInterfaceVersion.value = response.data;
|
||||||
|
let arr = [];
|
||||||
|
|
||||||
|
arr.push({
|
||||||
|
label: proxy.t('当前版本'),
|
||||||
|
value: 0
|
||||||
|
});
|
||||||
|
|
||||||
|
platformHistoryList.value = response.data.platformHistoryList;
|
||||||
|
response.data.platformHistoryList.map(item => {
|
||||||
|
arr.push({
|
||||||
|
label: proxy.t('历史版本')+item.versionCode,
|
||||||
|
value: item.versionCode
|
||||||
|
})
|
||||||
|
});
|
||||||
|
versionItem.value = arr;
|
||||||
openRevise.value = true;
|
openRevise.value = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// 切换版本
|
||||||
|
const switchingVersions = (value) =>{
|
||||||
|
if (value == 0){
|
||||||
|
Object.assign(formInterface, formInterfaceVersion.value);
|
||||||
|
}else{
|
||||||
|
platformHistoryList.value.map(item => {
|
||||||
|
if (item.versionCode == value){
|
||||||
|
let objitem = JSON.parse(item.content);
|
||||||
|
Object.assign(formInterface, objitem);
|
||||||
|
rowOpenRevise.platformInfo = JSON.stringify(objitem.platformInfo);
|
||||||
|
rowOpenRevise.keyInfo = JSON.stringify(objitem.keyInfo);
|
||||||
|
rowOpenRevise.langInfo = JSON.stringify(objitem.langInfo);
|
||||||
|
rowOpenRevise.currencyInfo = JSON.stringify(objitem.currencyInfo);
|
||||||
|
rowOpenRevise.extInfo = JSON.stringify(objitem.extInfo);
|
||||||
|
rowOpenRevise.urlInfo = JSON.stringify(objitem.urlInfo);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 详细信息 */
|
/** 详细信息 */
|
||||||
function handleView(row) {
|
function handleView(row) {
|
||||||
titlePlatForm.value = proxy.t('详情');
|
titlePlatForm.value = proxy.t('详情');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue