Commit cb4f2da0 by 匡雅琴

Merge branch 'kuangyq_dev_2.1.0' of http://192.168.3.233:8090/saas/scrm-micro-se…

…ttings into kuangyq_dev_2.1.0
2 parents 009bb1cc 3c8063cc
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
"el-tree-transfer": "^2.2.6", "el-tree-transfer": "^2.2.6",
"element-ui": "^2.4.5", "element-ui": "^2.4.5",
"glsx-common": "^1.4.6", "glsx-common": "^1.4.6",
"glsx-components": "^1.3.6", "glsx-components": "^1.3.9",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"qrcodejs2": "^0.0.2", "qrcodejs2": "^0.0.2",
"vue": "^2.6.10", "vue": "^2.6.10",
...@@ -43,4 +43,4 @@ ...@@ -43,4 +43,4 @@
"> 1%", "> 1%",
"last 2 versions" "last 2 versions"
] ]
}
\ No newline at end of file \ No newline at end of file
}
@import './demo.scss';
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -134,11 +136,12 @@ img { ...@@ -134,11 +136,12 @@ img {
height: 4px; height: 4px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 4px; border-radius: 4px;
background-color: rgba(144, 147, 153, .3); background-color: rgba(144, 147, 153, .3);
} }
.el-message--info { .el-message--info {
height: 40px; height: 40px;
background: #e6e9ff; background: #e6e9ff;
...@@ -147,14 +150,16 @@ img { ...@@ -147,14 +150,16 @@ img {
font-size: 14px; font-size: 14px;
color: rgba(0, 0, 0, 0.65); color: rgba(0, 0, 0, 0.65);
} }
.el-message .el-icon-info { .el-message .el-icon-info {
color: #5850ff; color: #5850ff;
font-size: 16px; font-size: 16px;
} }
.el-cascader-menu { .el-cascader-menu {
max-height:500px; max-height: 500px;
} }
.footer-panel { .footer-panel {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -166,4 +171,4 @@ img { ...@@ -166,4 +171,4 @@ img {
background: #ffffff; background: #ffffff;
z-index: 999; z-index: 999;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1); box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
\ No newline at end of file \ No newline at end of file
}
\ No newline at end of file \ No newline at end of file
import GLCombiForm from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLCombiForm.install = function(Vue) {
Vue.component(GLCombiForm.name, GLCombiForm)
}
// 默认导出组件
export default GLCombiForm
\ No newline at end of file \ No newline at end of file
/**
* 时间控件-限制月份
*/
export const beforeRangePickerOptions = {
disabledDate(date) {
if (date > new Date()) {
return true
}
return false
}
}
export const afterRangePickerOptions = {
disabledDate(date) {
const yesterday = new Date(new Date().setDate(new Date().getDate() - 1))
if (date < yesterday) {
return true
}
return false
}
}
import GLSearch from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearch.install = function(Vue) {
Vue.component(GLSearch.name, GLSearch)
}
// 默认导出组件
export default GLSearch
\ No newline at end of file \ No newline at end of file
<!-- <content> -->
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
<el-button type="warning" @click="toggleShow(1)">显示代码</el-button>
```js {mixin:true}
{
data() {
return {
demo1: true,
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods:{
toggleShow(num){
// console.log(123)
this['demo' + num] = !this['demo' + num]
},
//gl-search 方法
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
```
# 用来作为 markdown 代码的示例部分
<div v-if="demo1">
```vue
<template>
<GLSearch @onOk="handleOkFn" @onRest="handleRestFn">
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-select v-model="value" size="small" placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</GLSearchItem>
<GLSearchItem>
<div slot="name">我是文本输入框</div>
<el-date-picker size="small" v-model="value1" type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</GLSearchItem>
<GLSearchItem>
<el-select v-model="selvalue" placeholder="请选择" size="small" slot="name">
<el-option v-for="item in seloptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-input size="small" v-model="input" placeholder="请输入内容"></el-input>
</GLSearchItem>
</GLSearch>
</template>
<script>
import {GLSearch, GLSearchItem} from 'glsx-components'
// 全局引入一次css即可
import 'glsx-components/dist/glsx-components.css'
export default {
data() {
return {
//gl-search数据
input: '',
options: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎'
},
{
value: '选项4',
label: '龙须面'
},
{
value: '选项5',
label: '北京烤鸭'
}
],
value: '',
value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
seloptions: [
{
value: '选项1',
label: '黄金糕'
},
{
value: '选项2',
label: '双皮奶'
},
{
value: '选项3',
label: '蚵仔煎北京烤鸭'
},
{
value: '选项4',
label: '龙须面北京烤鸭'
},
{
value: '选项5',
label: '北京烤鸭北京烤鸭'
}
],
selvalue: ''
}
},
methods: {
handleOkFn() {
console.log('您点击了确定')
},
handleRestFn() {
console.log('您点击了取消')
}
}
}
</script>
```
</div>
<!-- </content> -->
<template>
<div class="gl-search" id="gl-search" :class="{ transTo: !expand }">
<div class="search-list">
<!-- 默认插槽 -->
<slot></slot>
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
<!-- <div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div>
<div class="search-item">
<div class="name">我是文本输入框</div>
<div class="input">
<el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input>
</div>
</div> -->
</div>
<div class="gl-operate">
<div class="operate">
<el-button size="small" type="primary" @click="handleOk">查询</el-button>
<el-button size="small" @click="handleRest">重置</el-button>
<el-button type="text" size="small" @click="expandFn" v-if="hasExpand">
<span>{{ !expand ? '展开' : '收起' }}</span>
<i class="expand" :class="classIcon"></i>
</el-button>
<!-- <i class="el-icon-arrow-down expand"></i> -->
<!-- <i class="el-icon-arrow-up"></i> -->
</div>
</div>
</div>
</template>
<script>
export default {
name: 'GLSearch',
props: {},
data() {
return {
// input: '',
expand: false,
itemNum: 0,
time: null,
hasExpand: false
}
},
created() {},
mounted() {
this.getItemNum()
// 判断宽度按,是否显示展开收起
this.getClientWith()
window.addEventListener('resize', this.getClientWith, false)
},
computed: {
classIcon() {
return !this.expand ? 'el-icon-arrow-down' : 'el-icon-arrow-up'
}
},
methods: {
// 展开收起
expandFn() {
this.expand = !this.expand
},
// 获取item 输入框 的个数
getItemNum() {
const items = document.getElementById('gl-search').getElementsByClassName('search-item').length
this.itemNum = items
},
// 判断是否有展开收起标志
ifHasExpand(nowCol) {
if (this.itemNum > nowCol) {
return true
}
return false
},
// 监听函数
getClientWith() {
if (this.time) clearTimeout(this.time)
this.time = setTimeout(() => {
const clientWidth = document.documentElement.clientWidth
// console.log('clientWidth: ', clientWidth)
if (clientWidth <= 800) {
// 1列
this.hasExpand = this.ifHasExpand(1)
} else if (clientWidth <= 1440 && clientWidth > 800) {
// 2列
this.hasExpand = this.ifHasExpand(2)
} else if (clientWidth <= 1720 && clientWidth > 1440) {
// 3列
this.hasExpand = this.ifHasExpand(3)
} else {
// 4列
this.hasExpand = this.ifHasExpand(4)
}
}, 300)
},
handleOk() {
// 点击确定的回调
this.$emit('onOk')
},
handleRest() {
// 点击重置的回调
this.$emit('onRest')
}
},
components: {},
watch: {},
beforeDestroy() {
window.removeEventListener('resize', this.getClientWith, false)
this.time = null
}
}
</script>
<style lang="scss">
.gl-search {
&.transTo {
height: 52px;
}
display: flex;
justify-content: space-between;
overflow: hidden;
// @media screen and (max-width: 1062px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1062px) and (max-width: 1440px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1440px) and (max-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
// @media screen and (min-width: 1720px) {
// .search-list {
// .search-item {
// width: 100%;
// }
// }
// }
.search-list {
.search-item {
width: 100%;
}
}
.search-list {
flex: 1;
display: flex;
flex-wrap: wrap;
.search-item {
// flex: 1;
// padding-right: 12px;
margin-bottom: 20px;
min-width: 276px;
display: flex;
align-items: center;
box-sizing: border-box;
.name {
width: 112px;
text-align: right;
font-size: 14px;
font-weight: 400;
color: #666;
}
.input {
flex: 1;
// width:100%;
}
.el-input {
width: 100%;
}
.el-select {
width: 100%;
}
.el-date-editor {
width: 100%;
}
}
}
.gl-operate {
display: flex;
align-items: flex-end;
.operate {
text-align: left;
width: 190px;
margin-bottom: 20px;
.expand {
font-size: 14px;
}
.el-button + .el-button {
margin-left: 8px;
}
}
}
}
</style>
import GLSearchItem from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLSearchItem.install = function(Vue) {
Vue.component(GLSearchItem.name, GLSearchItem)
}
// 默认导出组件
export default GLSearchItem
\ No newline at end of file \ No newline at end of file
<template>
<div :style="{ 'padding-right': spacer + 'px' }" class="search-item">
<div class="name">
<!-- {{ label }} -->
<!-- name 插槽 -->
<slot name="name"></slot>
</div>
<div class="input">
<!-- 默认插槽 -->
<slot></slot>
<!-- <el-input
size="small"
v-model="input"
placeholder="请输入内容"
></el-input> -->
</div>
</div>
</template>
<script>
export default {
name: 'GLSearchItem',
props: {
// 每个项间隙
spacer: {
type: Number,
default: 12
}
},
data () {
return {}
},
created () {},
mounted () {},
computed: {},
methods: {},
components: {},
watch: {}
}
</script>
...@@ -3,22 +3,22 @@ ...@@ -3,22 +3,22 @@
* @version: * @version:
* @Author: limin * @Author: limin
* @Date: 2021-06-07 14:12:32 * @Date: 2021-06-07 14:12:32
* @LastEditors: Please set LastEditors * @LastEditors: huyue
* @LastEditTime: 2022-03-15 10:07:01 * @LastEditTime: 2022-04-12 11:11:32
*/ */
// 根据环境引入不同配置 process.env.VUE_APP_ENV // 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js') // let request = require('@/http/request.js')
let cfg = require('./conf.js') let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) { export const fetchConfig = function (isEnv = true) {
// if (isEnv) { // if (isEnv) {
// let { request } = cfg // let { request } = cfg
// Object.assign(request, { timeout }) // Object.assign(request, { timeout })
// return Promise.resolve(cfg) // return Promise.resolve(cfg)
// } // }
return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') // return new Http().get('https://oss-config.test.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
// return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config') return new Http().get('http://oss-config.dev.glsx.com.cn/mock/617ba1df1072f92988f05a14/account/config')
} }
export const config = { export const config = {
install(vue, cfg) { install(vue, cfg) {
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2022-03-02 15:56:07 * @Date: 2022-03-02 15:56:07
* @LastEditTime: 2022-04-02 14:35:06 * @LastEditTime: 2022-04-12 11:09:56
* @LastEditors: your name * @LastEditors: huyue
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: \scrm-micro-settings\src\setup\qiankun.js * @FilePath: \scrm-micro-settings\src\setup\qiankun.js
*/ */
...@@ -10,14 +10,13 @@ import Vue from 'vue' ...@@ -10,14 +10,13 @@ import Vue from 'vue'
// import { message } from '@/plugins/element.js' // import { message } from '@/plugins/element.js'
import { fetchConfig } from '@/config' import { fetchConfig } from '@/config'
import ElementUI from 'element-ui' import ElementUI from 'element-ui'
import { GLButton, GLTable, GLFooter } from 'glsx-components' //权限按钮 (根据权限动态创建) import { GLButton, GLTable, GLFooter, GLCombiForm } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router' import { getRoutes } from '@/router'
import GlCombiForm from '@/components/GlCombiForm'
import render from './render' import render from './render'
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(GLTable) Vue.use(GLTable)
Vue.use(GLFooter) Vue.use(GLFooter)
Vue.use(GlCombiForm) Vue.use(GLCombiForm)
// import GLTable from '@/components/glsx-table/index' // import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable) // Vue.component('GLTable', GLTable)
import 'glsx-components/dist/glsx-components.css' import 'glsx-components/dist/glsx-components.css'
......
...@@ -7,28 +7,12 @@ ...@@ -7,28 +7,12 @@
</div> </div>
<div class="container"> <div class="container">
<div> <div>
<template v-if="userInfo.accountLevel != 4"> <GLCombiForm :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData" @handleOk="handleSearch" @handleRest="reSetFindData"></GLCombiForm>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData"></glsx-combi-form> </div>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData2"> <GLButton @click="handleExport" fn="导出" :size="size" type="primary" mode="el-button">导出</GLButton>
<span slot="footer" class="footer-btns"> <div class="table-btn">
<el-button size="small" @click="reSetFindData">重置</el-button> <el-button @click="handleExport" :size="size" type="primary" mode="el-button">导出</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<GLButton @click="handleExport" fn="导出" :size="size" type="primary" mode="el-button">导出</GLButton>
<!-- <el-button :size="size" type="primary" @click="handleExport">导出</el-button> -->
</span>
</glsx-combi-form>
</template>
<template v-else>
<glsx-combi-form ref="showSearch" :formObj="searchForm" :searchSelectObj="searchSelectObj" :formData="searchFormData3">
<span slot="footer" class="footer-btns">
<el-button size="small" @click="reSetFindData">重置</el-button>
<el-button :size="size" type="primary" @click="handleSearch">查询</el-button>
<GLButton @click="handleExport" fn="导出" :size="size" type="primary" mode="el-button">导出</GLButton>
</span>
</glsx-combi-form>
</template>
</div> </div>
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun"> <GLTable ref="employeeRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn" @setTableFinishFun="setTableFinishFun">
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
...@@ -65,7 +49,6 @@ ...@@ -65,7 +49,6 @@
<script> <script>
import { utils } from 'glsx-common' import { utils } from 'glsx-common'
import glsxCombiForm from './glsx-combi-form'
// import selectPage from './components/selectPage' // import selectPage from './components/selectPage'
export default { export default {
name: 'index', name: 'index',
...@@ -120,10 +103,7 @@ export default { ...@@ -120,10 +103,7 @@ export default {
optionId: 'dictValue', optionId: 'dictValue',
optionLabel: 'dictLabel', optionLabel: 'dictLabel',
optionsName: 'staffStatusList' optionsName: 'staffStatusList'
} },
],
// 搜索2
searchFormData2: [
{ {
type: 'selectInput', type: 'selectInput',
selectName: 'staffNameOrPhone', selectName: 'staffNameOrPhone',
...@@ -146,7 +126,6 @@ export default { ...@@ -146,7 +126,6 @@ export default {
} }
} }
], ],
searchFormData3: [],
// 表格 // 表格
getListApi: this.$apis.employee.getListApi, getListApi: this.$apis.employee.getListApi,
tableParams: { tableParams: {
...@@ -228,20 +207,14 @@ export default { ...@@ -228,20 +207,14 @@ export default {
} }
}, },
components: {
glsxCombiForm
// selectPage
// glsxTable
},
mounted() { mounted() {
this.userInfo = this.$globalState.session this.userInfo = this.$globalState.session
// 门店 // 门店
if (this.userInfo.accountLevel == 4) { if (this.userInfo.accountLevel == 4) {
this.searchFormData.splice(0, 1) // this.searchFormData.splice(0, 1)
var idx = this.tableParams.tableColumns.findIndex(item => item.prop == 'merchantName') var idx = this.tableParams.tableColumns.findIndex(item => item.prop == 'merchantName')
this.tableParams.tableColumns.splice(idx, 1) this.tableParams.tableColumns.splice(idx, 1)
this.searchFormData3 = [...this.searchFormData, ...this.searchFormData2] this.searchFormData[0].isHide = true
} }
this.getAllMerchantList() this.getAllMerchantList()
this.getStaffStatusList() this.getStaffStatusList()
...@@ -381,13 +354,13 @@ export default { ...@@ -381,13 +354,13 @@ export default {
roleId: '', roleId: '',
status: '' status: ''
} }
this.searchSelectObj = { ;(this.searchSelectObj = {
staffNameOrPhone: { staffNameOrPhone: {
attr: 'staffName', attr: 'staffName',
value: '' value: ''
} }
}, }),
this.$refs.employeeRef.refreshTable() this.$refs.employeeRef.refreshTable()
this.$nextTick(() => { this.$nextTick(() => {
this.distoryTable = true this.distoryTable = true
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!