init
This commit is contained in:
@@ -1,31 +1,13 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询协议设置列表
|
||||
export function listAgreementSetting(query) {
|
||||
return request({
|
||||
url: '/xq/agreementSetting/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询协议设置详细
|
||||
export function getAgreementSetting(id) {
|
||||
export function getAgreementSetting() {
|
||||
return request({
|
||||
url: '/xq/agreementSetting/' + id,
|
||||
url: '/xq/agreementSetting/info',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增协议设置
|
||||
export function addAgreementSetting(data) {
|
||||
return request({
|
||||
url: '/xq/agreementSetting',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改协议设置
|
||||
export function updateAgreementSetting(data) {
|
||||
return request({
|
||||
@@ -34,11 +16,3 @@ export function updateAgreementSetting(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除协议设置
|
||||
export function delAgreementSetting(id) {
|
||||
return request({
|
||||
url: '/xq/agreementSetting/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 查询敏感词列表
|
||||
export function listWord(query) {
|
||||
return request({
|
||||
url: '/xq/word/list',
|
||||
url: '/sensitive/word/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@@ -12,7 +12,7 @@ export function listWord(query) {
|
||||
// 查询敏感词详细
|
||||
export function getWord(id) {
|
||||
return request({
|
||||
url: '/xq/word/' + id,
|
||||
url: '/sensitive/word/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -20,7 +20,7 @@ export function getWord(id) {
|
||||
// 新增敏感词
|
||||
export function addWord(data) {
|
||||
return request({
|
||||
url: '/xq/word',
|
||||
url: '/sensitive/word',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@@ -29,7 +29,7 @@ export function addWord(data) {
|
||||
// 修改敏感词
|
||||
export function updateWord(data) {
|
||||
return request({
|
||||
url: '/xq/word',
|
||||
url: '/sensitive/word',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@@ -38,7 +38,7 @@ export function updateWord(data) {
|
||||
// 删除敏感词
|
||||
export function delWord(id) {
|
||||
return request({
|
||||
url: '/xq/word/' + id,
|
||||
url: '/sensitive/word/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,298 +1,83 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户协议" prop="userAgreement">
|
||||
<el-input
|
||||
v-model="queryParams.userAgreement"
|
||||
placeholder="请输入用户协议"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="主播入驻协议" prop="anchorJoinAgreement">
|
||||
<el-input
|
||||
v-model="queryParams.anchorJoinAgreement"
|
||||
placeholder="请输入主播入驻协议"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="隐私协议" prop="privacyAgreement">
|
||||
<el-input
|
||||
v-model="queryParams.privacyAgreement"
|
||||
placeholder="请输入隐私协议"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['xq:agreementSetting:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['xq:agreementSetting:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['xq:agreementSetting:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['xq:agreementSetting:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="agreementSettingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="ID" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="用户协议" align="center" prop="userAgreement" />
|
||||
<el-table-column label="主播入驻协议" align="center" prop="anchorJoinAgreement" />
|
||||
<el-table-column label="隐私协议" align="center" prop="privacyAgreement" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['xq:agreementSetting:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:agreementSetting:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改协议设置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户协议" prop="userAgreement">
|
||||
<el-input v-model="form.userAgreement" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="主播入驻协议" prop="anchorJoinAgreement">
|
||||
<el-input v-model="form.anchorJoinAgreement" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="隐私协议" prop="privacyAgreement">
|
||||
<el-input v-model="form.privacyAgreement" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="用户协议" name="loansAgreement">
|
||||
<el-button type="primary" size="mini" v-hasPermi="['cai:agreementSetting:edit']" v-if="!userAgreement" @click="showEdit('userAgreement')">编辑</el-button>
|
||||
<el-button :loading="buttonLoading" v-if="userAgreement" type="primary" size="mini" @click="submitForm2('userAgreement')">保存</el-button>
|
||||
<div v-if="!userAgreement" v-html="form.userAgreement" style="width: 98%" />
|
||||
<wang-edit v-if="userAgreement" v-model="form.userAgreement" :min-height="800" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="主播入驻协议" name="anchorJoinAgreement">
|
||||
<el-button type="primary" size="mini" v-hasPermi="['cai:agreementSetting:edit']" v-if="!anchorJoinAgreement" @click="showEdit('anchorJoinAgreement')">编辑</el-button>
|
||||
<el-button :loading="buttonLoading" v-if="anchorJoinAgreement" type="primary" size="mini" @click="submitForm2('anchorJoinAgreement')">保存</el-button>
|
||||
<div v-if="!anchorJoinAgreement" v-html="form.anchorJoinAgreement" style="width: 98%" />
|
||||
<editor v-if="anchorJoinAgreement" v-model="form.anchorJoinAgreement" :min-height="192"></editor>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="隐私协议" name="privacyAgreement">
|
||||
<el-button type="primary" size="mini" v-hasPermi="['cai:agreementSetting:edit']" v-if="!privacyAgreement" @click="showEdit('privacyAgreement')">编辑</el-button>
|
||||
<el-button :loading="buttonLoading" v-if="privacyAgreement" type="primary" size="mini" @click="submitForm2('privacyAgreement')">保存</el-button>
|
||||
<div v-if="!privacyAgreement" v-html="form.privacyAgreement" style="width: 98%" />
|
||||
<editor v-if="privacyAgreement" v-model="form.privacyAgreement" :min-height="192"></editor>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAgreementSetting, getAgreementSetting, delAgreementSetting, addAgreementSetting, updateAgreementSetting } from "@/api/xq/agreementSetting";
|
||||
import Editor from '@/components/Editor'
|
||||
import WangEdit from '@/components/WangEdit'
|
||||
import {getAgreementSetting, updateAgreementSetting} from "@/api/xq/agreementSetting";
|
||||
|
||||
export default {
|
||||
name: "AgreementSetting",
|
||||
components: {
|
||||
Editor,WangEdit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
//按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 协议设置表格数据
|
||||
agreementSettingList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userAgreement: undefined,
|
||||
anchorJoinAgreement: undefined,
|
||||
privacyAgreement: undefined
|
||||
form: {
|
||||
id: undefined,
|
||||
userAgreement:undefined,
|
||||
anchorJoinAgreement:undefined,
|
||||
privacyAgreement: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
activeName:'loansAgreement',
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "ID不能为空", trigger: "blur" }
|
||||
],
|
||||
userAgreement: [
|
||||
{ required: true, message: "用户协议不能为空", trigger: "blur" }
|
||||
],
|
||||
anchorJoinAgreement: [
|
||||
{ required: true, message: "主播入驻协议不能为空", trigger: "blur" }
|
||||
],
|
||||
privacyAgreement: [
|
||||
{ required: true, message: "隐私协议不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
},
|
||||
formDisable:true,
|
||||
userAgreement:false,
|
||||
anchorJoinAgreement:false,
|
||||
privacyAgreement: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
/** 查询协议设置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listAgreementSetting(this.queryParams).then(response => {
|
||||
this.agreementSettingList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
userAgreement: undefined,
|
||||
anchorJoinAgreement: undefined,
|
||||
privacyAgreement: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加协议设置";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAgreementSetting(id).then(response => {
|
||||
this.loading = false;
|
||||
init(){
|
||||
getAgreementSetting().then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改协议设置";
|
||||
});
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.id != null) {
|
||||
updateAgreementSetting(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addAgreementSetting(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
showEdit(key){
|
||||
this[key] = true;
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除协议设置编号为"' + ids + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delAgreementSetting(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
submitForm2(key){
|
||||
const params = {
|
||||
id: this.form.id,
|
||||
[key]: this.form[key],
|
||||
};
|
||||
this.buttonLoading = true;
|
||||
updateAgreementSetting(params).then(response => {
|
||||
this.buttonLoading = false;
|
||||
this[key] = false;
|
||||
this.msgSuccess("修改成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('xq/agreementSetting/export', {
|
||||
...this.queryParams
|
||||
}, `agreementSetting_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="提现金额" prop="money">
|
||||
<el-input
|
||||
v-model="queryParams.money"
|
||||
placeholder="请输入提现金额"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -18,110 +10,97 @@
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['xq:withdrawSetting:add']"
|
||||
>新增</el-button>
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['xq:withdrawSetting:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['xq:withdrawSetting:edit']"
|
||||
>修改</el-button>
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['xq:withdrawSetting:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['xq:withdrawSetting:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['xq:withdrawSetting:export']"
|
||||
>导出</el-button>
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['xq:withdrawSetting:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="withdrawSettingList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="提现金额" align="center" prop="money" />
|
||||
<el-table-column label="0=开启 1=关闭" align="center" prop="status" />
|
||||
<el-table-column label="说明" align="center" prop="remark" />
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="提现金额" align="center" prop="money"/>
|
||||
<el-table-column label="状态" align="center" prop="enableStatus">
|
||||
<template v-slot="scope">
|
||||
<cai-dict-tag :options="enableStatusList" :value="scope.row.enableStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" align="center" prop="remark" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<template v-slot="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['xq:withdrawSetting:edit']"
|
||||
>修改</el-button>
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['xq:withdrawSetting:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:withdrawSetting:remove']"
|
||||
>删除</el-button>
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:withdrawSetting:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改提现配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="提现金额" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入提现金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="说明" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入说明" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<withdraw-setting-add-update-dialog v-if="withdrawSettingAddUpdateDialogVisible" ref="withdrawSettingAddUpdateDialog" @refreshDataList="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWithdrawSetting, getWithdrawSetting, delWithdrawSetting, addWithdrawSetting, updateWithdrawSetting } from "@/api/xq/withdrawSetting";
|
||||
import { delWithdrawSetting, listWithdrawSetting } from '@/api/xq/withdrawSetting'
|
||||
import WithdrawSettingAddUpdateDialog from '@/views/xq/withdrawSetting/withdraw-setting-add-update-dialog.vue'
|
||||
import { enableStatusList } from '@/constant/statusMap'
|
||||
|
||||
export default {
|
||||
name: "WithdrawSetting",
|
||||
name: 'WithdrawSetting',
|
||||
components: { WithdrawSettingAddUpdateDialog },
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
enableStatusList,
|
||||
withdrawSettingAddUpdateDialogVisible: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@@ -136,144 +115,72 @@ export default {
|
||||
total: 0,
|
||||
// 提现配置表格数据
|
||||
withdrawSettingList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
money: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: "提现金额不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "0=开启 1=关闭不能为空", trigger: "change" }
|
||||
],
|
||||
remark: [
|
||||
{ required: true, message: "说明不能为空", trigger: "blur" }
|
||||
]
|
||||
enableStatus: undefined
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询提现配置列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.loading = true
|
||||
listWithdrawSetting(this.queryParams).then(response => {
|
||||
this.withdrawSettingList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
money: undefined,
|
||||
status: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
this.withdrawSettingList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加提现配置";
|
||||
this.withdrawSettingAddUpdateDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.withdrawSettingAddUpdateDialog.init()
|
||||
})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWithdrawSetting(id).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改提现配置";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.id != null) {
|
||||
updateWithdrawSetting(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addWithdrawSetting(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.withdrawSettingAddUpdateDialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.withdrawSettingAddUpdateDialog.init(row.id)
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
const ids = row.id || this.ids
|
||||
this.$modal.confirm('是否确认删除提现配置编号为"' + ids + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delWithdrawSetting(ids);
|
||||
this.loading = true
|
||||
return delWithdrawSetting(ids)
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
this.loading = false
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('xq/withdrawSetting/export', {
|
||||
...this.queryParams
|
||||
}, `withdrawSetting_${new Date().getTime()}.xlsx`)
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="提现价格" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入提现价格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="enableStatus">
|
||||
<el-select v-model="form.enableStatus" placeholder="状态" size="small">
|
||||
<el-option
|
||||
v-for="dict in enableStatusList"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea" :rows="2"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { enableStatusList } from '@/constant/statusMap'
|
||||
import { addWithdrawSetting, getWithdrawSetting, updateWithdrawSetting } from '@/api/xq/withdrawSetting'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
enableStatusList,
|
||||
open: false,
|
||||
title: '',
|
||||
form:{
|
||||
id: undefined,
|
||||
money: undefined,
|
||||
remark: undefined,
|
||||
enableStatus: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
money: [
|
||||
{ required: true, message: "数据不能为空", trigger: "blur" }
|
||||
],
|
||||
enableStatus: [
|
||||
{ required: true, message: "数据不能为空", trigger: "change" }
|
||||
],
|
||||
},
|
||||
buttonLoading: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.form.id = id || undefined;
|
||||
this.title = (id ? "修改" : "新增") + "提现配置";
|
||||
this.open = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['form'].resetFields();
|
||||
if(this.form.id){
|
||||
getWithdrawSetting(id).then(response => {
|
||||
this.form = response.data;
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
submitForm () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.id != null) {
|
||||
updateWithdrawSetting(this.form).then(data => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$modal.buttonLoading = false;
|
||||
this.open = false
|
||||
this.$emit('refreshDataList')
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}else{
|
||||
addWithdrawSetting(this.form).then(data => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.buttonLoading = false;
|
||||
this.open = false
|
||||
this.$emit('refreshDataList')
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,310 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="单词" prop="word">
|
||||
<el-input
|
||||
v-model="queryParams.word"
|
||||
placeholder="请输入单词"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员名称" prop="operatorId">
|
||||
<el-input
|
||||
v-model="queryParams.operatorId"
|
||||
placeholder="请输入操作员名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['xq:word:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['xq:word:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['xq:word:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['xq:word:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="wordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="应用自增主键" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="单词" align="center" prop="word" />
|
||||
<el-table-column label="1-白名单 2-黑名单" align="center" prop="type" />
|
||||
<el-table-column label="启用状态" align="center" prop="enableStatus" />
|
||||
<el-table-column label="配置描述" align="center" prop="remark" />
|
||||
<el-table-column label="操作员名称" align="center" prop="operatorId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['xq:word:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['xq:word:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改敏感词对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="单词" prop="word">
|
||||
<el-input v-model="form.word" placeholder="请输入单词" />
|
||||
</el-form-item>
|
||||
<el-form-item label="配置描述" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入配置描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="操作员名称" prop="operatorId">
|
||||
<el-input v-model="form.operatorId" placeholder="请输入操作员名称" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listWord, getWord, delWord, addWord, updateWord } from "@/api/xq/word";
|
||||
|
||||
export default {
|
||||
name: "Word",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 敏感词表格数据
|
||||
wordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
word: undefined,
|
||||
type: undefined,
|
||||
enableStatus: undefined,
|
||||
operatorId: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "应用自增主键不能为空", trigger: "blur" }
|
||||
],
|
||||
word: [
|
||||
{ required: true, message: "单词不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "1-白名单 2-黑名单不能为空", trigger: "change" }
|
||||
],
|
||||
enableStatus: [
|
||||
{ required: true, message: "启用状态不能为空", trigger: "change" }
|
||||
],
|
||||
remark: [
|
||||
{ required: true, message: "配置描述不能为空", trigger: "blur" }
|
||||
],
|
||||
operatorId: [
|
||||
{ required: true, message: "操作员名称不能为空", trigger: "blur" }
|
||||
],
|
||||
createTime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
],
|
||||
updateTime: [
|
||||
{ required: true, message: "更新时间不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询敏感词列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listWord(this.queryParams).then(response => {
|
||||
this.wordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
word: undefined,
|
||||
type: undefined,
|
||||
enableStatus: undefined,
|
||||
remark: undefined,
|
||||
operatorId: undefined,
|
||||
createTime: undefined,
|
||||
updateTime: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加敏感词";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getWord(id).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改敏感词";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.id != null) {
|
||||
updateWord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addWord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除敏感词编号为"' + ids + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delWord(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('xq/word/export', {
|
||||
...this.queryParams
|
||||
}, `word_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user