Commit 0336298c by zhouzy

create

0 parents
> 1%
last 2 versions
not ie <= 8
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
/build/
/config/
/dist/
/*.js
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/prettier'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
parserOptions: {
parser: 'babel-eslint'
}
}
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: 'eslint:recommended',
// required to lint *.vue files
plugins: [
'html'
],
// check if imports actually resolve
'settings': {
'import/resolver': {
'webpack': {
'config': 'build/webpack.base.conf.js'
}
}
},
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': [2, 'allow-null'],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 2,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
module.exports = {
plugins: {
autoprefixer: {}
}
}
{
"semi": false,
"singleQuote": true
}
\ No newline at end of file
module.exports = {
presets: ["@vue/app"]
};
This diff could not be displayed because it is too large.
{
"name": "equity",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "zhouzy <962305455@qq.com>",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.18.0",
"element-ui": "^2.15.1",
"glsx-vue-common": "^1.2.1",
"node-sass": "^4.9.3",
"sass-loader": "^7.1.0",
"vue": "^2.5.17"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.1",
"@vue/cli-plugin-eslint": "^3.0.1",
"@vue/cli-service": "^3.0.1",
"@vue/eslint-config-prettier": "^3.0.1",
"eslint-plugin-html": "^4.0.5",
"less": "^3.0.4",
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.5.17"
}
}
No preview for this file type
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- <link rel="icon" href="<%= BASE_URL %>favicon.ico"> -->
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but multiple-pages doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
import request from './request'
//查询权益卡详情
export function memberCardDetails(data) {
data.method = 'memberInfo/detailsMemberInfo'
return request(data)
}
//权益卡导出
export function memberCardExport(data) {
data.method = 'memberInfo/exportMemberCard'
return request(data)
}
//批量生成权益卡
export function generateMemberBatch(data) {
data.method = 'memberInfo/generateMemberBatch'
return request(data)
}
//查询权益卡详情
export function getMemberCardDetail(data) {
data.method = 'memberInfo/getMemberCardDetail'
return request(data)
}
//查询用户操作日志
export function getUserLog(data) {
data.method = 'memberInfo/getUserLog'
return request(data)
}
//新增权益卡定义、权益项以及权益关系
export function insertMemberCardDefineRf(data) {
data.method = 'memberInfo/insertMemberCardDefineRf'
return request(data)
}
//查询权益卡名称
export function listByCardName(data) {
data.method = 'memberInfo/listByCardName'
return request(data)
}
//查询权益套餐和批次
export function listMemberBatch(data) {
data.method = 'memberInfo/listMemberBatch'
return request(data)
}
//根据批次号查询权益明细以及分页
export function listMemberCard(data) {
data.method = 'memberInfo/listMemberCard'
return request(data)
}
//查询权益项相关信息
export function listMemberCardDefine(data) {
data.method = 'memberInfo/listMemberCardDefine'
return request(data)
}
//查询权益卡列表
export function listMemberInfo(data) {
data.method = 'memberInfo/listMemberInfo'
return request(data)
}
//领取权益项
export function receiveRights(data) {
data.method = 'memberInfo/receiveRights'
return request(data)
}
//查询备注
export function remarkMemberInfo(data) {
data.method = 'memberInfo/remarkMemberInfo'
return request(data)
}
//修改或新增权益卡备注
export function updateRemarkMemberInfo(data) {
data.method = 'memberInfo/updateRemarkMemberInfo'
return request(data)
}
//升级权益套餐
export function upgradeMember(data) {
data.method = 'memberInfo/upgradeMember'
return request(data)
}
\ No newline at end of file
/*
* @Author: limin
* @Date: 2019-08-26 18:02:41
* @Last Modified by: chenwq
* @Last Modified time: 2020-12-22 11:54:03
*/
// import sign from './sign'
import RequestMethods from './request.methods'
// import util from '@/libs/util.js'
const request = (params = {}, method = RequestMethods.GET, noSignAttr = []) => {
// params.source = 'glsx'
// params.appKey = window.location.href.includes('dj.glsx.com.cn') ? 'd7ffc3346fc9a45bccaaa35300d59022' : '48e5e13229b82c1b4e6e8c96151f0637'
// params.timestamp = new Date().getTime()
// params.v = '1.0.0'
// params.format = 'json'
// params.locale = 'zh_CN'
// if (params.method !== 'dj.api.user.login') {
// params.sessionId = util.cookies.get('token')
// }
/**
* mock - url = params.method
* 调后端接口 - url = ''
*/
const url = baseConfig.axios.baseURL + params.method
/**
* 调后端接口,请使用以下代码。
*/
var reqData = (method === RequestMethods.POST) ? {
// baseURL: process.env.VUE_APP_API + '?method=' + params.method,
// baseURL: process.env.VUE_APP_API,
// data: sign(params, noSignAttr)
data: params
} : {
// params: sign(params, noSignAttr)
params: params
}
return axios({
url,
method,
...reqData
})
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
}
export default request
/*
* @Author: limin
* @Date: 2019-08-26 18:01:59
* @Last Modified by: limin
* @Last Modified time: 2019-08-26 18:02:32
*/
const RequestMethods = {
POST: 'post',
GET: 'get',
PUT: 'put',
DELETE: 'delete'
}
export default RequestMethods
import {
GlAxios
} from 'glsx-vue-common'
const path = 'memberInfo'
function memberCardDetails(params) {
return GlAxios.get(`${path}/detailsMemberInfo`, { params })
}
function getdetailsMemberInfo(params) {
return GlAxios.get(`${path}/detailsMemberInfo`, { params })
}
function getlistMemberInfo(params) {
return GlAxios.get(`${path}/listMemberInfo`, { params })
}
function generateMemberBatch(params) {
return GlAxios.post(`${path}/generateMemberBatch`, { params })
}
function insertMemberCardDefineRf(params) {
return GlAxios.post(`${path}/insertMemberCardDefineRf`, params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString' })
}
function generateMemberBatch(params) {
return GlAxios.post(`${path}/generateMemberBatch`, params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString' })
}
function listMemberCardDefine(params) {
return GlAxios.post(`${path}/listMemberCardDefine`, params, { headers: { 'Content-Type': 'application/json; charset=utf-8' }, requestType: 'jsonString' })
}
//查询权益卡详情
// export function memberCardDetails(data) {
// data.method = 'memberInfo/detailsMemberInfo'
// return request(data)
// }
export {
memberCardDetails,
getdetailsMemberInfo,
getlistMemberInfo,
generateMemberBatch,
insertMemberCardDefineRf,
listMemberCardDefine
}
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// import GlsxVueComponents from 'glsx-vue-components'
// import 'glsx-vue-components/dist/glsx-vue-components.css'
import { Request as request } from 'glsx-vue-common'
// import '@/styles/index.scss'
// 组件
import '@/components'
// import axios from 'axios'
Vue.use(ElementUI)
// var mixin = {
// mounted() {
// const _this = this
// const theme = new this.$Theme()
// const connection = this.$Penpal.connectToParent({
// methods: {
// setTheme(color) {
// theme.change(color)
// },
// height() {
// return document.height || document.body.offsetHeight // document.documentElement.clientHeight || document.body.clientHeight //
// }
// }
// })
// connection.promise.then(parent => {
// const cfg = _this.$get_session_config()
// if (cfg) return
// parent.getResources().then(config => {
// _this.$set_session_config(config)
// })
// })
// }
// }
const URL = ' https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/oss_rightsAndInterests') => {
return new Promise((resolve, reject) => {
request({ url }).then(res => {
if (res.status === 'success') {
resolve({ 'vue': Vue, 'config': JSON.parse(res.data) })
} else {
reject('ERROR.')
}
})
})
}
/* eslint-disable no-new */
const render = App => {
new Vue({
el: '#app',
// mixins: [mixin],
render: h => h(App)
})
}
export default { render, getConfig }
<!-- 表格+分页 -->
<template>
<div class="d2-table">
<el-table
:ref="tableParams.mutiSelectName + 'MutiTable' || 'mutiTable'"
:data="getListApi ? data : tableData"
:row-key="tableParams.mutiSelectUniqueKey || ''"
v-loading="loading"
border
:highlight-current-row="true"
:stripe="true"
@sort-change="sortChange"
@selection-change="handleSelect"
size="medium"
>
<el-table-column
v-if="tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type="selection"
width="55"
:reserve-selection="true"
>
</el-table-column>
<el-table-column
v-if="hasNum"
align="center"
width="60px"
label="序号"
type='index'
:index="index=>index+(page.currentPage - 1) * page.pageSize + 1"
></el-table-column>
<el-table-column
v-for="(item, index) in tableParams.tableColumns"
:key="index"
:label="item.label"
:prop="item.prop"
:width="item.width"
:min-width="item.minWidth"
:align="item.align||'center'"
:sortable="item.sortable"
>
<template slot-scope="scope">
<slot
v-if="item.addHtml"
:name="item.addHtml"
:scope="scope.row"
:prop="item.prop"
:width="item.width"
></slot>
<template v-else-if="item.tagLabel">
<el-tag
v-if="!item.tagName"
:type="tableParams.tag.type[scope.row[item.prop]]"
v-text="tableParams.tag.label[scope.row[item.prop]]"
>
</el-tag>
<el-tag
v-else
:type="tableParams[item.tagName].type[scope.row[item.prop]]"
v-text="tableParams[item.tagName].label[scope.row[item.prop]]"
></el-tag>
</template>
<template v-else-if="item.formatter">
<span v-text="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span v-text="scope.row[item.prop]"></span>
</template>
<template v-else>
<span v-text="tableData[scope.$index][item.prop]"></span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
</el-table-column>
<el-table-column
v-if="tableParams.tableOption"
label="操作"
:align="tableParams.tableOption.align||'center'"
:width="tableParams.tableOption.width||'200'"
fixed="right"
>
<template slot-scope="scope">
<slot
name="auth-button"
:scope="scope.row"
></slot>
</template>
</el-table-column>
</el-table>
<el-pagination
v-if="hasPage"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="page.currentPage"
:page-sizes="[10,20,30,40]"
:page-size="page.pageSize"
:total="getListApi ? total : tableTotal"
:layout="layout"
>
</el-pagination>
</div>
</template>
<script>
export default {
name: 'd2-table',
data() {
return {
loading: false,
data: [],
// 页码
page: {
pageSize: 10,
pageNum: 1
// currentPage: 1
},
total: 10,
// 排序
sortColum: '',
sort: '',
// 多选数组
mutiSelectArr: {}
}
},
props: {
// 搜索条件
searchForm: {
type: Object,
default: () => []
},
// 表格数据-外部传入
tableData: {
type: Array,
default: () => []
},
tableTotal: {
type: Number,
default: 0
},
// 获取列表接口
getListApi: {
type: Function,
default: null
},
// 搜索前操作
beforeSearchFn: {
type: Function,
default: () => {
return new Promise((resolve, reject) => {
resolve()
})
}
},
// 分页,默认有
hasPage: {
type: Boolean,
default: true
},
// 分页组件配置
layout: {
type: String,
default: 'sizes,total,->,prev,pager,next,jumper'
},
// 序号,默认有
hasNum: {
type: Boolean,
default: true
},
tableParams: {
type: Object,
default: () => {
return {
// 多选-判断来自哪个页面
// mutiSelectName: {
// type: String,
// default: ''
// },
// 多选-唯一标识
// mutiSelectUniqueKey: {
// type: String,
// default: ''
// },
// 搜索按钮id;new Date().getTime() + parseInt(Math.random() * 1000)
// btnId: {
// type: String,
// default: ''
// },
// 后端返回列表参数名
listName: {
type: String,
default: ''
},
// 标签-默认标签名为tag;若有多个,那么需要在表格栏的列中加“tagName”
// tag: {
// type: Array,
// default: () => []
// },
// 表格操作,默认没有
// tableOption: {
// type: Object,
// default: null
// },
// 表格栏
tableColumns: {
type: Array,
default: () => []
}
}
}
}
},
mounted() {
const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit)
this.getListApi && this.refreshTable()
},
methods: {
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : ''
this.sort = order
this.refreshTable()
},
// 多选
handleSelect(val) {
this.mutiSelectArr[this.tableParams.mutiSelectName] = val
},
// 清空多选
clearMutiSelect() {
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
},
// 发布事件,以期查询条件改变后,页面图表需要刷新
refreshEmit() {
this.$emit('searchChange')
this.refreshTable(true, true)
},
refreshTable(clearMuti = true, resetCurrentPage = false) {
this.beforeSearchFn().then(res => {
// console.log(res)
// 清空多选
clearMuti && this.clearMutiSelect()
this.loading = true
resetCurrentPage && (this.page.currentPage = 1)
var params = {
...this.page,
...this.searchForm
}
if (this.sort) {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
this.getListApi(params).then(res => {
this.data = res[this.tableParams.listName]
this.total = res.pagination.totalCount
this.loading = false
}).catch(() => {
this.loading = false
})
})
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
}
}
}
</script>
<style>
.a-click {
cursor: pointer;
}
.el-table .cell {
line-height: 14px;
}
.d2-table p {
margin: 10px 0;
}
</style>
import Vue from 'vue'
// 注意 有些组件使用异步加载会有影响
Vue.component('d2-table', () => import('./d2-table/index.vue'))
body {
overflow: hidden;
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
hr {
height:1px;
border:0px;
background-color:#e7eaec
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
outline: none;
text-decoration: none;
}
div:focus {
outline: none;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
//main-container全局样式
.app-main {
overflow: auto;
}
.app-container {
padding: 20px;
}
// element
.el-table--medium td {
padding: 4px 0 !important;
}
.el-table .cell {
padding: 0 0;
}
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- -->
<template>
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleForm"
label-width="200px"
class="demo-ruleForm"
label-position="right"
>
<div class="baseinformation">基础信息</div>
<div class="itemContainer">
<el-form-item label="权益卡名称:" prop="name">
<el-input v-model="ruleForm.name" style="width: 60%"></el-input>
</el-form-item>
<el-form-item label="权益卡说明:" prop="explain">
<el-input
type="textarea"
v-model="ruleForm.explain"
style="width: 60%"
></el-input>
</el-form-item>
<el-form-item label="套餐有效期:" prop="validity"
>领卡时起
<el-input-number
v-model="ruleForm.validity"
controls-position="right"
:min="0"
:max="10"
size="mini"
></el-input-number>
月内有效
</el-form-item>
</div>
<div>权益配置</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.currencyCheckbox">停驶返嘀币</el-checkbox>
</el-form-item>
<el-form-item label="返嘀币(每小时):" prop="currencyInpution">
<el-input
v-model="ruleForm.currencyInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.currencyCheckbox"
></el-input
>个
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.oilCheckbox">加油无忧</el-checkbox>
</el-form-item>
<el-form-item label="油站推荐半径:" prop="oilInpution">
<el-input
v-model="ruleForm.oilInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.oilCheckbox"
></el-input
>公里
</el-form-item>
<el-form-item label="加油优惠推送最长间隔 :" prop="timeInpution">
<el-input
v-model="ruleForm.timeInpution"
size="middle"
style="width: 60%"
:disabled="!ruleForm.oilCheckbox"
></el-input
>天
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.worryFreeCheckbox">出险无忧</el-checkbox>
</el-form-item>
<el-form-item label="启用碰撞推送:" prop="pushCollision">
<el-switch
v-model="ruleForm.pushCollision"
active-color="#13ce66"
inactive-color="#ff4949"
:disabled="!ruleForm.worryFreeCheckbox"
>
</el-switch>
</el-form-item>
</div>
<div class="itemContainer">
<el-form-item>
<el-checkbox v-model="ruleForm.specialOfferCheckbox">特惠商品</el-checkbox>
</el-form-item>
<el-form-item label="嘀币返利比例(%):" prop="rebateRatio">
<el-input
v-model="ruleForm.rebateRatio"
size="middle"
style="width: 60%"
:disabled="!ruleForm.specialOfferCheckbox"
></el-input>
</el-form-item>
<el-form-item>
<el-checkbox v-model="ruleForm.rescueCheckbox">救援无忧</el-checkbox>
</el-form-item>
<el-form-item>
<el-checkbox v-model="ruleForm.creditCheckbox">微众车主信用分期</el-checkbox>
</el-form-item>
<el-form-item>
<el-checkbox v-model="ruleForm.meituanCheckbox">美团外卖,天天好劵</el-checkbox>
</el-form-item>
</div>
<div class="buttonContainer">
<el-button size="middle" >取消</el-button>
<el-button size="middle" type="primary" @click="jump" >提交</el-button>
</div>
</el-form>
</template>
<script>
import { insertMemberCardDefineRf } from "@/api/test";
export default {
data() {
return {
// MemberCardDefineRightsVo:{
// description:ruleForm.explain,
// equityItemJson:,
// name:ruleForm.name,
// validitVaule:""
// },
ruleForm: {
name: "",
explain: "",
validity: 1,
date1: "",
date2: "",
delivery: false,
type: [],
resource: "",
currencyCheckbox: false,
currencyInpution: "",
oilCheckbox: false,
oilInpution: "",
timeInpution: "",
worryFreeCheckbox: false,
pushCollision: false,
rebateRatio: "",
specialOfferCheckbox: false,
exchangeStandard: false,
rescueCheckbox: false,
creditCheckbox: false,
rescueWorryFree: null,
creditInstallment: null,
meiTuan: null,
meituanCheckbox: false,
},
rules: {
name: [
{ required: true, message: "请输入权益卡名字", trigger: "blur" },
{ min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
],
explain: [{ required: true, message: "请填写说明", trigger: "blur" }],
validity: [{ required: true, message: "请选择有效期", trigger: "blur" }],
currencyInpution: [
{ required: true, message: "请填写返回的嘀币数", trigger: "blur" },
],
oilInpution: [{ required: true, message: "请填写推荐半径", trigger: "blur" }],
timeInpution: [{ required: true, message: "请填写最大天数", trigger: "blur" }],
rebateRatio: [{ required: true, message: "请填写返利比例", trigger: "blur" }],
},
};
},
methods: {
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
alert("submit!");
} else {
console.log("error submit!!");
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
},
jump() {
// window.location.href='http://localhost:8080/customer/rightsCardManagement.html
var params = {
description: this.ruleForm.explain +'',
name: this.ruleForm.name +'',
validitVaule: this.ruleForm.validity,
equityItemJson: {
returnDicoins: this.ruleForm.currencyInpution + '',
oilWorry: this.ruleForm.oilInpution + '',
oioilInterval: this.ruleForm.timeInpution + '',
collisionPush: this.ruleForm.pushCollision + '',
dicoinRatio: this.ruleForm.rebateRatio + '',
rescueWorryFree: this.ruleForm.rescueWorryFree + '',
creditInstallment: this.ruleForm.creditInstallment + '',
meiTuan: this.ruleForm.meiTuan + ''
}
}
insertMemberCardDefineRf(params).then((res) => {
console.log(res)
})
}
// inableInpution(checkStatus, inputStatus) {
// this[inputStatus] = !this[checkStatus]
// // if(this.stopdriving==true){
// // this. stopdrivingInpution=false
// // }else{
// // this. stopdrivingInpution=true
// // }
// }
}
}
</script>
<style>
* {
padding: 0;
margin: 0;
border: 0;
}
.itemContainer {
margin-left: 20px;
margin-top: 20px;
}
.buttonContainer {
margin-left: 40%;
margin-top: 50px;
}
</style>
import App from './index.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<!-- -->
<template>
<div class="contianer">
<div class="button">
<el-button
type="primary"
@click="addCard"
>新建权益卡</el-button>
</div>
<div class="tablecontainer">
<d2-table
ref="recordTable"
:searchForm="searchForm"
:tableParams="tableParams"
:getListApi="getListApi"
>
<span
slot="auth-button"
slot-scope="scope"
:data="scope.scope"
>
<el-button type="text">新增</el-button>
</span>
</d2-table>
</div>
</div>
</template>
<script>
// import { getListApi } from '@/api/test'
// import {memberCardDetails} from "@/api/test";
import { listMemberCardDefine} from "@/api/test";
// import selectbotton from '@/components/selectbotton'
export default {
// components: {
// selectbotton
// },
data() {
return {
getListApi: listMemberCardDefine,
cardId: "2473",
// getListApi: none,
searchForm: null,
tableParams: {
btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'list',
tableOption: true,
tableColumns: [
{
label: '权益卡名称',
prop: 'memberName',
// minWidth: '200'
},
{
label: '有效期',
prop: 'validitDate'
},
{
label: '权益内容',
prop: 'name'
},
{
label: '领卡人数',
prop: 'activationCount',
// width: 110,
// tagLabel: true
},
{
label: '创建时间',
prop: 'createdDateStr',
// minWidth: '200'
},
{
label: '状态',
prop: 'status',
// formatter: (cellValue) => {
// return {
// 0: '进行中',
// 1: '未完成',
// 2: '已过期',
// 3: '线下关闭',
// 4: '线上关闭'
// }[cellValue.status]
// }
},
{
label: '备注',
prop: 'remarks',
minWidth: '200'
},
]
},
}
},
mounted() {
},
methods: {
addCard() {
window.location.href = 'http://localhost:8080/customer/newEquityCard.html'
},
// handleEdit() {
// // },
// updateRightCardTable(params = {}) {
// var _this = this;
// request
// .req("/rightCardManagement", params)
// .then(function (res) {
// console.log(res);
// _this. = res. rightsCardManagement;
// })
// .catch(function (error) {
// console.log(error);
// });
// },
}
}
</script>
<style>
* {
padding: 0;
margin: 0;
border: 0;
}
.button {
margin-left: 20px;
margin-top: 20px;
}
.tablecontainer {
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
}
</style>
\ No newline at end of file
import App from './app.vue'
import base from '@/base'
import GlsxVueCommon from 'glsx-vue-common'
base.getConfig().then(data => {
const { vue, config } = data
vue.use(GlsxVueCommon, config)
base.render(App)
})
<template>
<div id="app" class="outsider">
<el-card class="index-card">
<div slot="header">
广联运营平台
</div>
<ul>
<li>
<a href="../customer/newEquityCard.html" target="_self">
新增权益卡
</a>
</li>
<li>
<a href="../customer/collectionManagement.html" target="_self">
领用管理
</a>
</li>
<li>
<a href="../customer/rightsCardManagement.html" target="_self">
权益卡管理
</a>
</li>
</ul>
</el-card>
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
<style scoped>
.outsider{
background-color: #FFF;
padding: 20px 0px 40px 0px;
/* margin: 20px 20px; */
}
</style>
File mode changed
File mode changed
module.exports = {
index: '主页',
'customer/glsx': '广联赛讯'
}
'use strict'
const titles = require('./title.js')
const glob = require('glob')
const pages = {}
// const mode = process.env.NODE_ENV || 'development'
glob.sync('./src/views/**/app.js').forEach(path => {
const chunk = path.split('./src/views/')[1].split('/app.js')[0]
pages[chunk] = {
entry: path,
template: 'public/index.html',
title: titles[chunk],
chunks: ['chunk-vendors', 'chunk-common', chunk]
}
})
module.exports = {
pages,
chainWebpack: config => config.plugins.delete('named-chunks'),
configureWebpack: (config) => {
// config.devtool = (mode === 'development') ? 'inline-source-map' : false
// config.mode = mode
},
devServer: {
port: 8080,
host: '192.168.1.169',
open: true,
proxy: {
'/api': {
target: 'http://127.0.0.1:8080',
changeOrigin: true,
pathRewrite: { '^/api': '' }
}
}
}
}
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!