基础设置新增配置
This commit is contained in:
@@ -273,6 +273,50 @@
|
||||
编辑</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>用户W级列表</span>
|
||||
<!-- @input="handleInput" -->
|
||||
<!-- <el-input
|
||||
v-model="inquire.whiteErbanNoProductionRatioMap"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input> -->
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
detailsDialog = true;
|
||||
type = 14;
|
||||
value = inquire.whiteErbanNoProductionRatioMap;
|
||||
"
|
||||
>
|
||||
查看详情</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>用户B级列表</span>
|
||||
<!-- @input="handleInput" -->
|
||||
<el-input
|
||||
v-model="inquire.blackErbanNoList"
|
||||
placeholder=""
|
||||
class="input"
|
||||
disabled
|
||||
></el-input>
|
||||
<el-button
|
||||
class="primary"
|
||||
type="primary"
|
||||
@click="
|
||||
editDialog = true;
|
||||
butClick = false;
|
||||
type = 13;
|
||||
editDialogTitle = '用户B级列表';
|
||||
value = inquire.blackErbanNoList;
|
||||
"
|
||||
>
|
||||
编辑</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="inquire">
|
||||
<span>赠送1000倍奖励</span>
|
||||
<el-button
|
||||
@@ -325,6 +369,51 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 详情弹窗 -->
|
||||
<el-dialog v-model="detailsDialog" title="用户W级列表" width="36%" center>
|
||||
<el-button class="primary" type="primary" @click="addDetail">
|
||||
新增</el-button
|
||||
>
|
||||
<el-table :data="detailsTable" style="width: 100%">
|
||||
<el-table-column label="用户ID">
|
||||
<template v-slot="scope">
|
||||
<el-input
|
||||
v-model="scope.row.userId"
|
||||
@blur="handleEdit(scope.$index, scope.row)"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="值">
|
||||
<template v-slot="scope">
|
||||
<el-input
|
||||
v-model="scope.row.val"
|
||||
@blur="handleEdit(scope.$index, scope.row)"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
class="danger"
|
||||
type="danger"
|
||||
@click="delDetail(scope.$index, scope.row)"
|
||||
>
|
||||
删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 其他列 -->
|
||||
</el-table>
|
||||
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="detailsDialog = false">取消</el-button>
|
||||
<el-button type="primary" :disabled="butClick" @click="sevaDetail()">
|
||||
保存
|
||||
</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -376,11 +465,17 @@ export default {
|
||||
},
|
||||
warnMulti: "",
|
||||
followErbanNoList: "",
|
||||
whiteErbanNoProductionRatioMap: "",
|
||||
blackErbanNoList: "",
|
||||
},
|
||||
editDialog: false,
|
||||
editDialogTitle: "",
|
||||
detailsDialog: false,
|
||||
value: "",
|
||||
type: null,
|
||||
// 详情
|
||||
detailsTable: [],
|
||||
whiteErbanNoProductionRatioMap:null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -397,8 +492,43 @@ export default {
|
||||
this.inquire.supplement = res.data.supplement;
|
||||
this.inquire.warnMulti = res.data.warnMulti;
|
||||
this.inquire.followErbanNoList = res.data.followErbanNoList.join();
|
||||
// this.inquire.whiteErbanNoProductionRatioMap = res.data.whiteErbanNoProductionRatioMap.join();
|
||||
this.inquire.blackErbanNoList = res.data.blackErbanNoList.join();
|
||||
var obj = res.data.whiteErbanNoProductionRatioMap;
|
||||
const arr = Object.keys(obj).map((key) => ({
|
||||
userId: key,
|
||||
val: obj[key],
|
||||
}));
|
||||
arr.forEach((res, i) => {
|
||||
this.detailsTable[i] = res;
|
||||
});
|
||||
});
|
||||
},
|
||||
// 详情新增按钮
|
||||
addDetail() {
|
||||
this.detailsTable.unshift([]);
|
||||
},
|
||||
// 详情删除按钮
|
||||
delDetail(index, val) {
|
||||
this.detailsTable.splice(index, 1);
|
||||
},
|
||||
// 详情确认保存按钮
|
||||
sevaDetail() {
|
||||
var map = {};
|
||||
this.detailsTable.forEach((res) => {
|
||||
map[res.userId] = res.val;
|
||||
});
|
||||
console.log(map);
|
||||
this.type = 14;
|
||||
this.whiteErbanNoProductionRatioMap = map;
|
||||
this.editDialogClick();
|
||||
},
|
||||
// 详情编辑监听
|
||||
handleEdit(index, row) {
|
||||
// 这里可以添加保存逻辑,例如调用API更新服务器数据等。
|
||||
console.log(index, "保存行数据", row);
|
||||
// 示例:更新本地数据或其他操作...
|
||||
},
|
||||
// 确认保存
|
||||
editDialogClick() {
|
||||
var obj = {};
|
||||
@@ -409,7 +539,7 @@ export default {
|
||||
if (res.code == 200) {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message:'赠送成功',
|
||||
message: "赠送成功",
|
||||
type: "success",
|
||||
});
|
||||
setTimeout(() => {
|
||||
@@ -435,7 +565,7 @@ export default {
|
||||
obj.platformRatio = this.value;
|
||||
} else if (this.type == 4) {
|
||||
obj.receiverRatio = this.value;
|
||||
}else if (this.type == 5) {
|
||||
} else if (this.type == 5) {
|
||||
obj.supplement = this.inquire.supplement;
|
||||
obj.supplement.supplementRatio = this.value;
|
||||
} else if (this.type == 6) {
|
||||
@@ -448,6 +578,10 @@ export default {
|
||||
obj.warnMulti = this.value;
|
||||
} else if (this.type == 11) {
|
||||
obj.followErbanNoList = this.value.split(",");
|
||||
} else if (this.type == 14) {
|
||||
obj.whiteErbanNoProductionRatioMap = this.whiteErbanNoProductionRatioMap;
|
||||
} else if (this.type == 13) {
|
||||
obj.blackErbanNoList = this.value.split(",");
|
||||
}
|
||||
updateSet(obj).then((res) => {
|
||||
if (res.code == 200) {
|
||||
@@ -457,6 +591,7 @@ export default {
|
||||
type: "success",
|
||||
});
|
||||
this.editDialog = false;
|
||||
// this.detailsDialog = false;
|
||||
this.getData();
|
||||
} else {
|
||||
ElMessage({
|
||||
|
Reference in New Issue
Block a user