修复积分兑换消费

xuhongjie
许宏杰 1 year ago
parent b98e7e80ea
commit f6b1e98ecf

@ -56,3 +56,81 @@
}
}
}
//
.search {
display: flex;
align-items: center;
justify-content: space-between;
}
//
.book-main {
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
width: 100%;
li {
width: 19%;
height: 49%;
margin-right: calc(1% + (2% / 8));
margin-bottom: 1%;
list-style: none;
background: #fff;
box-shadow: 0px 3px 15px 0px rgba(184, 184, 184, 0.22);
border-radius: 10px;
position: relative;
overflow: hidden;
.integral-num {
position: absolute;
top: 6%;
right: 10%;
font-size: 20px;
font-weight: bold;
color: #2aa984;
z-index: 10;
font-family: "din-bold-2.ttf";
}
.operate {
height: 13%;
width: 100%;
display: flex;
justify-content: space-between;
align-content: center;
padding: 0 10px;
.integral {
flex: 1;
padding: 4px 0;
font-weight: 400;
font-family: "Alibaba-PuHuiTi-Regular";
color: #4d4949;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.exchange-btn {
padding: 4px 10px;
font-size: 14px;
cursor: pointer;
font-family: "Alibaba-PuHuiTi-Regular";
font-weight: 400;
color: $--color-primary;
background: rgba(249, 86, 95, 0.1);
border-radius: 4px;
}
}
}
li:nth-of-type(5n) {
margin-right: 0;
}
li:nth-of-type(n + 2) {
margin-bottom: 0;
}
}
::v-deep .pagination-container {
height: 0 !important;
padding: 0 !important;
background: transparent !important;
.el-pagination {
top: 20px;
}
}

@ -1,76 +1,86 @@
import Vue from 'vue'
import Vue from "vue";
import Cookies from 'js-cookie'
import Cookies from "js-cookie";
import Element from 'element-ui'
import './assets/styles/element-variables.scss'
import Element from "element-ui";
import "./assets/styles/element-variables.scss";
import "@/utils/rem.js"; //计算rem基准
import API from "@/api/index.js";
import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import App from './App'
import store from './store'
import router from './router'
import directive from './directive' // directive
import plugins from './plugins' // plugins
import { download } from '@/utils/request'
import "@/assets/styles/index.scss"; // global css
import "@/assets/styles/ruoyi.scss"; // ruoyi css
import App from "./App";
import store from "./store";
import router from "./router";
import directive from "./directive"; // directive
import plugins from "./plugins"; // plugins
import { download } from "@/utils/request";
import moment from "moment";
import "moment/locale/zh-cn";
moment.locale("zh-cn");
Vue.prototype.$moment = moment;
import './assets/icons' // icon
import './permission' // permission control
import "./assets/icons"; // icon
import "./permission"; // permission control
import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
import {
parseTime,
resetForm,
addDateRange,
selectDictLabel,
selectDictLabels,
handleTree,
} from "@/utils/ruoyi";
// 分页组件
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
import RightToolbar from "@/components/RightToolbar"
import RightToolbar from "@/components/RightToolbar";
// 富文本组件
import Editor from "@/components/Editor"
import Editor from "@/components/Editor";
// 文件上传组件
import FileUpload from "@/components/FileUpload"
import FileUpload from "@/components/FileUpload";
// 图片上传组件
import ImageUpload from "@/components/ImageUpload"
import ImageUpload from "@/components/ImageUpload";
// 图片预览组件
import ImagePreview from "@/components/ImagePreview"
import ImagePreview from "@/components/ImagePreview";
// 字典标签组件
import DictTag from '@/components/DictTag'
import DictTag from "@/components/DictTag";
// 头部标签组件
import VueMeta from 'vue-meta'
import VueMeta from "vue-meta";
// 字典数据组件
import DictData from '@/components/DictData'
import DictData from "@/components/DictData";
//列表搜索框
import MyInput from "@/views/components/myInput";
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
Vue.prototype.$api = API
Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime;
Vue.prototype.resetForm = resetForm;
Vue.prototype.addDateRange = addDateRange;
Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree;
Vue.prototype.$api = API;
// 全局组件挂载
Vue.component('DictTag', DictTag)
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
Vue.component("DictTag", DictTag);
Vue.component("Pagination", Pagination);
Vue.component("RightToolbar", RightToolbar);
Vue.component("Editor", Editor);
Vue.component("FileUpload", FileUpload);
Vue.component("ImageUpload", ImageUpload);
Vue.component("ImagePreview", ImagePreview);
Vue.component("MyInput", MyInput);
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueMeta)
DictData.install()
Vue.use(directive);
Vue.use(plugins);
Vue.use(VueMeta);
DictData.install();
/**
* If you don't want to use mock-server
@ -82,14 +92,14 @@ DictData.install()
*/
Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size
})
size: Cookies.get("size") || "medium", // set element-ui default size
});
Vue.config.productionTip = false
Vue.config.productionTip = false;
new Vue({
el: '#app',
el: "#app",
router,
store,
render: h => h(App)
})
render: (h) => h(App),
});

@ -8,7 +8,7 @@
-->
<template>
<div class="my-inputs">
<el-input v-model="input" :placeholder="placeholder" clearable @change="changeValue"></el-input>
<el-input v-model="input" :placeholder="placeholder" clearable></el-input>
<div class="btn" @click="inputValue"><i class="el-icon-search"></i></div>
</div>
</template>
@ -16,37 +16,36 @@
export default {
data() {
return {
input:'',
}
input: "",
};
},
props:{
placeholder:{
type:String,
default:'请输入内容'
}
props: {
placeholder: {
type: String,
default: "请输入关键字",
},
},
methods:{
inputValue(){
this.$emit('changeInput',this.input)
methods: {
inputValue() {
this.$emit("clickSearch", this.input);
},
changeValue(){
this.$emit('changeValue',this.input)
}
},
}
};
</script>
<style lang="scss" scoped>
.my-inputs {
display: flex;
height: 35px;
margin-bottom: 15px;
::v-deep .el-input {
width: 515px;
height: 40px;
height: 100%;
.el-input__inner {
width: 100%;
height: 100%;
border-right: none;
border-radius: 4px 0 0 4px;
border: 1px solid #DBD7D7;
border: 1px solid #dbd7d7;
}
}
.btn {
@ -54,9 +53,9 @@ export default {
align-items: center;
justify-content: center;
width: 52px;
height: 40px;
height: 100%;
border-radius: 0 4px 4px 0;
background-color: #F8414D;
background-color: #f8414d;
cursor: pointer;
color: #fff;
}

@ -1,25 +1,7 @@
<template>
<div class="app-container" ref="main">
<div ref="search" class="search">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
class="search-container"
>
<el-form-item prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入关键字"
clearable
>
<div class="search-btn" slot="append" @click="handleSearch">
<i class="el-icon-search"></i>
</div>
</el-input>
</el-form-item>
</el-form>
<MyInput v-model="queryParams.name" @clickSearch="handleSearch" />
<el-button
v-hasPermi="['system:certificates:add']"
type="primary"
@ -161,15 +143,18 @@ export default {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight - 40 - this.$refs.search.offsetHeight - 42; //(-40padding , -52top20)
this.$refs.main.offsetHeight - 40 - this.$refs.search.offsetHeight - 42;
this.getList();
});
},
methods: {
/**搜索 */
handleSearch() {
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
handleSearch(keyWord) {
this.queryParams = {
name: keyWord,
pageNum: 1,
pageSize: 10,
};
this.getList();
},
/** 查询证书管理列表 */
@ -272,73 +257,4 @@ export default {
</script>
<style lang="scss" scoped>
@import "@/assets/styles/myTable.scss";
// @import "@/assets/styles/element-variables.scss";
.search {
display: flex;
align-items: center;
justify-content: space-between;
}
//
.book-main {
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
width: 100%;
li {
width: 19%;
height: 49%;
margin-right: calc(1% + (2% / 8));
margin-bottom: 1%;
list-style: none;
background: #fff;
box-shadow: 0px 3px 15px 0px rgba(184, 184, 184, 0.22);
border-radius: 10px;
position: relative;
overflow: hidden;
.integral-num {
position: absolute;
top: 6%;
right: 10%;
font-size: 20px;
font-weight: bold;
color: #2aa984;
z-index: 10;
font-family: "din-bold-2.ttf";
}
.operate {
height: 13%;
width: 100%;
display: flex;
justify-content: space-between;
align-content: center;
padding: 0 10px;
.integral {
flex: 1;
padding: 4px 0;
font-weight: 400;
font-family: "Alibaba-PuHuiTi-Regular";
color: #4d4949;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
li:nth-of-type(5n) {
margin-right: 0;
}
li:nth-of-type(n + 2) {
margin-bottom: 0;
}
}
::v-deep .pagination-container {
height: 0 !important;
padding: 0 !important;
background: transparent !important;
.el-pagination {
top: 20px;
}
}
</style>

@ -1,172 +1,120 @@
<!--
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-18 10:08:30
* @LastEditors: JC9527
* @LastEditTime: 2023-09-24 10:33:30
-->
<template>
<div class="mainBox">
<div class="convert-topBox">
<my-input @changeInput="changeInput" placeholder="请输入证书名称" @changeValue="changeValue"></my-input>
<div class="app-container" ref="main">
<div class="search" ref="search">
<MyInput v-model="queryParams.name" @clickSearch="handleSearch" />
</div>
<div class="convert-content" v-loading="loading">
<div class="integral-lists">
<div class="list" v-for="item in certificateList">
<div class="list-top" :style="{'background-image': 'url(' + basicUrl + item.cover + ')'}"></div>
<div class="list-bottom">
<span class="bottom-left">{{ item.name }}</span>
<span class="bottom-right" @click="conversion(item)"></span>
<ul class="book-main" :style="{ height: tableHeigth + 'px' }">
<li v-for="item in certificatesList" :key="item.id">
<div class="integral-num">50</div>
<el-image
style="width: 100%; height: 87%"
:src="baseUrl + item.cover"
fit="fill"
:preview-src-list="[`${baseUrl + item.cover}`]"
>
</el-image>
<div class="operate">
<div class="integral">
{{ item.name }}
</div>
<div class="operate-child">
<div class="exchange-btn" @click="conversion(item)"> </div>
</div>
</div>
</div>
<div class="pagination">
<my-pagination :total="total" @pagesChange="pagesChange"></my-pagination>
</div>
</div>
</li>
</ul>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import myInput from "@/views/components/myInput/index.vue"
import myPagination from "@/views/components/myPagination/index.vue"
import { listCertificates } from "@/api/volunteer/gxhzs/gxhzsgl/index.js";
export default {
data() {
return {
total:0,
certificateList:[],
basicUrl:process.env.VUE_APP_BASE_API,
baseUrl: process.env.VUE_APP_BASE_API,
certificatesList: [],
tableHeigth: 0,
loading: false,
tableData: [],
total: 0,
queryParams: {
name: undefined,
pageNum: 1,
pageSize: 10,
},
loading:false,
value:{
name:''
},
isClick:false,
form: {},
rules: {},
};
},
components: {
myInput,myPagination
},
mounted() {
this.getList()
created() {
// //
this.$nextTick(() => {
this.tableHeigth =
this.$refs.main.offsetHeight - 40 - this.$refs.search.offsetHeight - 42;
this.getList();
});
},
methods: {
//
pagesChange(pages){
this.queryParams = pages;
this.getList()
/**兑换 */
conversion(item) {
console.log(item);
},
//
changeInput(e){
this.isClick = true;
this.queryParams= {
/**搜索 */
handleSearch(keyWord) {
this.queryParams = {
name: keyWord,
pageNum: 1,
pageSize: 10,
};
this.value.name = e;
this.getList()
},
//
changeValue(value){
if(this.isClick && value == ''){
this.value.name = '';
this.pages= {
pageNum: 1,
pageSize: 10,
};
this.getList();
this.isClick = false;
}
this.getList();
},
//
conversion(item){
console.log(item)
},
getList(){
/** 查询证书管理列表 */
getList() {
this.loading = true;
let obj = { ...this.queryParams,...this.value }
listCertificates(obj).then((response) => {
this.certificateList = response.rows;
listCertificates(this.queryParams).then((response) => {
this.certificatesList = response.rows;
this.total = response.total;
this.loading = false;
});
}
},
//
reset() {
this.form = {
id: null,
name: null,
type: null,
cover: null,
content: null,
datetime: null,
serviceDuration: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
};
this.resetForm("form");
},
//
cancel() {
this.open = false;
this.reset();
},
},
};
</script>
<style lang="scss" scoped>
.mainBox {
height: 100%;
width: 100%;
border-radius: 10px 10px 0 0;
background-color: #fff;
padding: 0 20px 10px 20px;
box-shadow: 0px 0px 15px 0px rgba(229,212,212,0.58);
.convert-topBox {
padding: 20px 0 0 0;
}
.convert-content {
height: 100%;
.integral-lists {
// display: flex;
// flex-wrap: wrap;
margin-top: 30px;
display: grid;
grid-template-columns: repeat(5, 19%);
grid-column-gap: 25px;
grid-row-gap: 25px;
height: 80%;
.list {
width: 100%;
height: 100%;
// background: linear-gradient(0deg, #EFE6D9, #DDC9AC);
box-shadow: 0px 3px 15px 0px rgba(184,184,184,0.22);
border-radius: 10px;
.list-top {
// background: url('../../../assets/images/icon1.png') no-repeat center center;
background-size: 100% 100%;
height: 80%;
width: 100%;
}
// .top-two {
// background: url('../../../assets/images/icon2.png') no-repeat center center;
// background-size: 100% 100%;
// }
// .top-three {
// background: url('../../../assets/images/icon3.png') no-repeat center center;
// background-size: 100% 100%;
// }
.list-bottom {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 20px;
.bottom-left {
font-size: 16px;
font-family: FZDaBiaoSong-B06S;
font-weight: 400;
color: #4D4949;
}
.bottom-right {
padding: 3px 15px;
border-radius: 4px;
background-color: rgba(249,86,95,0.1);
font-size: 14px;
font-family: 'Alibaba PuHuiTi';
font-weight: 400;
color: #F8414D;
cursor: pointer;
}
}
}
}
.pagination {
margin-top: 10px;
}
}
}
</style>
@import "@/assets/styles/myTable.scss";
</style>

Loading…
Cancel
Save