Browse Source

fixbug

master
chengkun 2 years ago
parent
commit
235e4dbf32
  1. 2
      src/api/rights/aliPaySigningOrder.js
  2. 5
      src/api/rights/configService.js
  3. 234
      src/views/rights/configService/index.vue
  4. 278
      src/views/rights/link/index.vue

2
src/api/rights/aliPaySigningOrder.js

@ -3,7 +3,7 @@ const serviceTitle = 'http://localhost:8085/rights';
const prefix = '/aliPaySigningOrder';
// 查询用户签约记录分页
export function listaliPaySigningOrder(data) {
export function listAliPaySigningOrder(data) {
return request({
url: `${serviceTitle}${prefix}/page`,
method: 'post',

5
src/api/rights/configService.js

@ -5,9 +5,8 @@ const prefix = '/configService';
// 查询对应的配置内容
export function listConfigService(configName) {
return request({
url: `${serviceTitle}${prefix}/list`,
method: 'post',
data: configName
url: `${serviceTitle}${prefix}/list?configName=`+ configName,
method: 'post'
})
}

234
src/views/rights/configService/index.vue

@ -0,0 +1,234 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--configService数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<el-form-item label="配置名称" prop="configName">
<el-input
v-model="queryParams.configName"
placeholder="请输入配置名称"
clearable
style="width: 200px"
@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="['rights:link:add']"
>新增</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="['img:banner:delete']"
>删除</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="configServiceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="id" align="center" key="id" prop="id" v-if="columns[0].visible" width="150"/>
<el-table-column label="配置名称" align="center" key="configName" prop="configName" v-if="columns[1].visible" width="300"/>
<el-table-column label="配置数据" align="center" key="configValue" prop="configValue" v-if="columns[2].visible" width="300"/>
<el-table-column
label="操作"
align="center"
width="160"
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="['rights:commonConfig:edit']"
>修改</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-col>
</el-row>
<!-- 添加或修改configService对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="链接id" prop="linkId">
<el-input v-model="form.linkId" placeholder="请输入链接id" maxlength="30" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="链接名字" prop="linkName">
<el-input v-model="form.linkName" placeholder="请输入链接名字" maxlength="100" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司" prop="affiliationCompanyName">
<el-input v-model="form.affiliationCompanyName" placeholder="请输入所属公司" maxlength="100" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-row> -->
<!-- </el-row> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listConfigService, editConfigService } from "@/api/rights/configService";
export default {
name: "configService",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
//total: 0,
// configService
configServiceList: null,
//
title: "",
//
open: false,
//
dateRange: [],
//
form: {},
//
queryParams: {
pageNum: 1,
pageSize: 10,
configName: undefined
},
//
columns: [
{ key: 0, label: `id`, visible: true },
{ key: 1, label: `配置名称`, visible: true },
{ key: 2, label: `配置数据`, visible: true }
],
//
rules: {
configName: [
{ required: true, message: "配置名称不能为空", trigger: "blur" },
],
configValue: [
{ required: true, message: "配置数据不能为空", trigger: "blur" }
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询configService列表 */
getList() {
this.loading = true;
listConfigService(this.queryParams).then(response => {
this.configServiceList = response.list;
//this.total = response.total;
this.loading = false;
}
);
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
linkId : undefined,
linkName: undefined,
affiliationCompanyName: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
//this.dateRange = [];
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 = "";
// },
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
editConfigService(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
}
});
},
}
};
</script>

278
src/views/rights/link/index.vue

@ -0,0 +1,278 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<!--link数据-->
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
<!-- <el-form-item label="banner名称" prop="bannerName">
<el-input
v-model="queryParams.bannerName"
placeholder="请输入banner名称"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="来源平台" prop="source" label-width="80px">
<el-select v-model="queryParams.source" placeholder="来源渠道" clearable>
<el-option
v-for="item in source"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="是否显示" prop="isShow" label-width="80px">
<el-select v-model="queryParams.isShow" placeholder="是否显示" clearable>
<el-option
v-for="item in isShow"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</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="['rights:link:add']"
>新增</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="['img:banner:delete']"
>删除</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="linkList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="id" align="center" key="id" prop="id" v-if="columns[0].visible" width="150"/>
<el-table-column label="链接id" align="center" key="linkId" prop="linkId" v-if="columns[1].visible" width="300"/>
<el-table-column label="链接名称" align="center" key="linkName" prop="linkName" v-if="columns[2].visible" width="300"/>
<el-table-column label="所属公司" align="center" key="affiliationCompanyName" prop="affiliationCompanyName" v-if="columns[3].visible" width="200"/>
<!-- <el-table-column
label="操作"
align="center"
width="160"
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="['img:banner:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['img:banner:delete']"
>删除</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-col>
</el-row>
<!-- 添加或修改banner对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
<el-form-item label="链接id" prop="linkId">
<el-input v-model="form.linkId" placeholder="请输入链接id" maxlength="30" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="链接名字" prop="linkName">
<el-input v-model="form.linkName" placeholder="请输入链接名字" maxlength="100" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属公司" prop="affiliationCompanyName">
<el-input v-model="form.affiliationCompanyName" placeholder="请输入所属公司" maxlength="100" />
</el-form-item>
</el-col>
</el-row>
<!-- <el-row> -->
<!-- </el-row> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listLink, addLink } from "@/api/rights/link";
export default {
name: "Link",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
//total: 0,
// link
linkList: null,
//
title: "",
//
open: false,
//
dateRange: [],
//
form: {},
//
// queryParams: {
// pageNum: 1,
// pageSize: 10
// },
//
columns: [
{ key: 0, label: `id`, visible: true },
{ key: 1, label: `链接id`, visible: true },
{ key: 2, label: `链接名称`, visible: true },
{ key: 3, label: `所属公司`, visible: true }
],
//
rules: {
linkId: [
{ required: true, message: "链接id不能为空", trigger: "blur" },
],
linkName: [
{ required: true, message: "链接名称不能为空", trigger: "blur" },
],
affiliationCompanyName: [
{ required: true, message: "所属公司不能为空", trigger: "blur" },
]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询link列表 */
getList() {
this.loading = true;
listLink().then(response => {
this.linkList = response.list;
//this.total = response.total;
this.loading = false;
}
);
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
linkId : undefined,
linkName: undefined,
affiliationCompanyName: undefined
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
//this.dateRange = [];
//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 = "添加链接";
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
addLink(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
// if (this.form.id != undefined) {
// editBanner(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// } else {
// addLink(this.form).then(response => {
// this.$modal.msgSuccess("");
// this.open = false;
// this.getList();
// });
// }
}
});
},
}
};
</script>
Loading…
Cancel
Save