Commit 6d158c26 by 胡悦

Merge branch 'master' of 192.168.3.233:saas/scrm-micro-settings

2 parents e918451a 7dad7c14
......@@ -11,7 +11,6 @@
"axios": "^0.21.1",
"core-js": "^3.4.4",
"el-tree-transfer": "^2.2.6",
"glsx-components": "^1.0.6",
"vue": "^2.6.10",
"vue-router": "^3.1.3",
"vuex": "^3.1.2"
......@@ -28,7 +27,8 @@
"eslint": "^5.16.0",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-vue": "^5.0.0",
"glsx-common": "^1.4.4",
"glsx-common": "^1.4.6",
"glsx-components": "^1.0.8",
"node-sass": "^4.14.1",
"prettier": "^1.19.1",
"sass-loader": "^8.0.0",
......
......@@ -4,7 +4,7 @@ import { fetchConfig } from '@/config'
import { GLButton, GLTable, GLExternal } from 'glsx-components' //权限按钮 (根据权限动态创建)
import { getRoutes } from '@/router'
import render from './render'
import 'glsx-components/dist/glsx-components.css'
import 'glsx-components/src/theme/theme.scss'
import ElementUI from 'element-ui'
let routes = []
let router = null
......
......@@ -175,8 +175,10 @@ export default {
overflow-x: hidden;
}
.bloc-info-module /deep/ .el-table__body-wrapper::-webkit-scrollbar {
display: none;
height: 1px;
width: 8px;
}
.bloc-info-module /deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
background: #E9E8FF;
border-radius: 7px;
}
......
......@@ -42,7 +42,6 @@ export default {
}
},
created() {
console.log(this.$globalState)
const { session } = this.$globalState
this.platform = session.merchantModel
this.loginInfo = session
......@@ -60,23 +59,19 @@ export default {
item.date = `${this.dateFormat(item.starttime, 'YYYY.MM.DD')}--${this.dateFormat(item.endtime, 'YYYY.MM.DD')}`
return item
})
let aaa = this.storesList[0]
for (let i = 0; i < 30; i++) {
this.storesList.push(aaa)
}
})
},
dateFormat: function (dateTime, format = 'yyyy-MM-dd') {
const date = new Date(dateTime)
const config = {
const date = new Date(dateTime)
const config = {
YYYY: date.getFullYear(),
MM: date.getMonth()+1,//getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
MM: date.getMonth() + 1, //getMonth() 方法根据本地时间返回指定日期的月份(从 0 到 11)
DD: date.getDate(),
HH: date.getHours(),
mm: date.getMinutes(),
ss: date.getSeconds(),
ss: date.getSeconds()
}
for(const key in config){
for (const key in config) {
format = format.replace(key, config[key])
}
return format
......@@ -85,7 +80,7 @@ export default {
}
</script>
<style lang="scss" scoped>
.out_main{
.out_main {
box-sizing: border-box;
padding: 0 20px 64px 40px;
}
......@@ -98,8 +93,12 @@ export default {
overflow-y: scroll;
}
.base-info-index::-webkit-scrollbar {
display: none;
width: 0px;
height: 1px;
width: 8px;
}
.base-info-index::-webkit-scrollbar-thumb {
background: #e9e8ff;
border-radius: 7px;
}
.top_widget {
width: 100%;
......
......@@ -74,14 +74,15 @@ export default {
value: 'id',
label: 'label',
children: 'children',
disabled:'entmicroName'
checkStrictly: true,
disabled: 'entmicroName'
},
mypropsParam: {
label: 'departmentName',
value: 'id',
children: 'children',
checkStrictly: true,
disabled:'relevanceMerchant'
disabled: 'relevanceMerchant'
},
dataList: [],
customWidth: 113,
......@@ -111,7 +112,7 @@ export default {
merchantId: id,
merchantName: curLabel
}
this.$refs.cascaderRef1.dropDownVisible = false
},
// 获取当前选择的部门
getCurDepartment(val) {
......@@ -120,7 +121,7 @@ export default {
let curLabel = labels[labels.length - 1]
this.tempDepart = {
departmentId: ids,
departmentName: curLabel,
departmentName: curLabel
}
this.$refs.cascaderRef.dropDownVisible = false
},
......@@ -136,23 +137,23 @@ export default {
},
// 关联当前选择的
handlerGL() {
if(!this.curTempMerchant){
if (!this.curTempMerchant) {
this.$message({
message: '请选择门店/商户',
type: 'warning'
})
return;
return
}
if(!this.tempDepart){
if (!this.tempDepart) {
this.$message({
message: '请选择企微门店',
type: 'warning'
})
return;
return
}
this.curGLData = {
...this.curTempMerchant,
...this.tempDepart,
...this.tempDepart
}
let flag = false
this.dataList.forEach(item => {
......@@ -170,37 +171,59 @@ export default {
this.dataList.push(this.curGLData)
this.setBtnWidth()
},
closeCurRouter(){
closeCurRouter() {
history.go(-1)
},
// 批量关联
handleMutiGL() {
if(!this.dataList.length){
if (!this.dataList.length) {
this.$message({
message: '请选择',
type: 'warning'
})
return;
return
}
let merchantIds = []
let departmentIds = []
let departNames = []
let arrpara1 = []
let arrpara2 = []
let arrpara3 = []
this.dataList.forEach(item => {
merchantIds.push(item.merchantId)
departmentIds.push(item.departmentId)
departNames.push(item.departmentName)
})
let para = {
'list.merchantId': merchantIds,
'list.departmentId': departmentIds,
'list.departName': departNames,
}
merchantIds.forEach((item, index) => {
let keyval = `list[${index}].merchantId`
let val = item
arrpara1.push({
[keyval]: val
})
})
departmentIds.forEach((item, index) => {
let keyval = `list[${index}].departmentId`
let val = item
arrpara2.push({
[keyval]: val
})
})
departNames.forEach((item, index) => {
let keyval = `list[${index}].departName`
let val = item
arrpara3.push({
[keyval]: val
})
})
let all = [...arrpara1, ...arrpara2, ...arrpara3]
let para = Object.assign({}, ...all)
toGL(para).then(res => {
if (res) {
this.$message({
message: '操作成功',
type: 'success'
})
history.go(-1)
}
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!