yujialong 1 year ago
parent 117dcd2537
commit 0c93095d1e
  1. 54
      src/components/Sidebar.vue
  2. 6
      src/components/img-upload/Cropper.vue
  3. 5
      src/views/customer/AddCustomer.vue
  4. 3
      src/views/parnerOperation/schemeSet.vue
  5. 10
      src/views/shop/addProduct/index.vue

@ -1,7 +1,6 @@
<template>
<div>
<el-menu
class="sidebar-el-menu"
<el-menu class="sidebar-el-menu"
:default-active="onRoutes"
background-color="#324157"
text-color="#bfcbd9"
@ -9,38 +8,33 @@
unique-opened
mode="horizontal"
router
@select="handleSelect"
>
@select="handleSelect">
<template v-for="item in menus">
<template v-if="item.subs">
<el-submenu :index="item.index" :key="item.index">
<el-submenu :index="item.index"
:key="item.index">
<template slot="title">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</template>
<template v-for="subItem in item.subs">
<el-submenu
v-if="subItem.subs"
<el-submenu v-if="subItem.subs"
:index="subItem.index"
:key="subItem.index"
>
:key="subItem.index">
<template slot="title">{{ subItem.title }}</template>
<el-menu-item
v-for="(threeItem,i) in subItem.subs"
<el-menu-item v-for="(threeItem,i) in subItem.subs"
:key="i"
:index="threeItem.index"
>{{ threeItem.title }}</el-menu-item>
:index="threeItem.index">{{ threeItem.title }}</el-menu-item>
</el-submenu>
<el-menu-item
v-else
<el-menu-item v-else
:index="subItem.index"
:key="subItem.index"
>{{ subItem.title }}</el-menu-item>
:key="subItem.index">{{ subItem.title }}</el-menu-item>
</template>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="item.index" :key="item.index">
<el-menu-item :index="item.index"
:key="item.index">
<i :class="item.icon"></i>
<span slot="title">{{ item.title }}</span>
</el-menu-item>
@ -54,7 +48,7 @@
import Setting from '@/setting'
import addRoutes from '@/libs/route/addRoutes'
export default {
data() {
data () {
return {
menuList: [
{
@ -127,29 +121,29 @@ export default {
onRoutes: this.$route.path
};
},
watch:{
"$route.path":function(val){
this.menuList.map(e=>{
if(val.replace('/', '')===e.index){
watch: {
"$route.path": function (val) {
this.menuList.map(e => {
if (val.replace('/', '') === e.index) {
this.handleSelect(val.replace('/', ''))
this.$forceUpdate();
}
})
}
},
mounted() {
sessionStorage.getItem('sideBar') && this.handleSelect(sessionStorage.getItem('sideBar'))
mounted () {
// sessionStorage.getItem('sideBar') && this.handleSelect(sessionStorage.getItem('sideBar'))
sessionStorage.getItem('token') && this.getPer() //
},
methods:{
handleSelect(index){
methods: {
handleSelect (index) {
this.onRoutes = index
this.$store.commit('setOrderParam', null)
this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '')
sessionStorage.setItem('sideBar',index)
sessionStorage.setItem('sideBar', index)
},
initMenu() {
initMenu () {
if (Setting.dynamicRoute) {
const routes = this.$store.state.routes
const menus = []
@ -162,7 +156,7 @@ export default {
}
},
//
getPer() {
getPer () {
this.$get(`${this.api.getUserRolesPermissionMenu}?platformId=${Setting.platformId}`).then(res => {
const routes = res.permissionMenu[0].children
addRoutes(routes)

@ -92,7 +92,7 @@ export default {
previews: {}, //
option: {
img: '', // ()
size: 0.8, // (:1)
size: 1, // (:1)
full: true, // true (:false)
outputType: 'jpg', // (:jpg)
canMove: true, // (:true)
@ -125,7 +125,7 @@ export default {
},
updateImg (file) {
this.option.img = file.url
this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95
// this.option.size = file.size / 1024 > 200 ? 0.9 : 0.95
},
realTime (data) {
//
@ -139,7 +139,7 @@ export default {
const that = this
if (type === 'blob') {
this.$refs.cropper.getCropBlob(data => {
compress(data, 0.8).then(res => {
compress(data, 1).then(res => {
that.$emit('upload', res)
})
})

@ -60,7 +60,8 @@
:label="item.schoolName"
:value="item.schoolId"></el-option>
</el-select>
<i class="el-icon-circle-plus-outline plus-cus"
<i v-if="!isDetail"
class="el-icon-circle-plus-outline plus-cus"
@click="addCustomer"></i>
</div>
</el-form-item>
@ -864,7 +865,7 @@ export default {
data.map((e, i) => {
e.id = i
const list = e.startAndEndTimeList
if (list) {
if (list && list.length) {
let connect = true //
list.map((n, i) => {
//

@ -515,7 +515,7 @@ export default {
},
handleCurrentChange (val) {
this.page = val;
this.getData();
this.getProduct();
},
handleSelectionChange (val) {
console.log("🚀 ~ file: schemeSet.vue:516 ~ handleSelectionChange ~ val:", val)
@ -529,7 +529,6 @@ export default {
}).then(() => {
this.checkeds.splice(i, 1)
}).catch(() => { })
},
//
productSubmit () {

@ -283,6 +283,7 @@
:limit="1"
:action="api.fileupload"
:headers="headers"
:file-list="appletList"
name="file">
<img v-if="form.mall.appletIcon"
:src="form.mall.appletIcon"
@ -807,7 +808,8 @@ export default {
submiting: false,
pass: false,
updateTime: 0,
nameRepeat: false
nameRepeat: false,
appletList: []
};
},
watch: {
@ -864,6 +866,12 @@ export default {
if (e.typeIds && e.typeIds.length) e.typeIds = e.typeIds[0]
e.mall.interfaceDiagrams = e.mall.interfaceDiagram ? e.mall.interfaceDiagram.split(',') : []
e.mallAnnex.forEach(e => e.name = e.fileName)
if (e.mall.appletIcon) this.appletList = [
{
name: e.mall.appletIcon,
url: e.mall.appletIcon
}
]
this.form = e
this.getOp()
this.$nextTick(() => {

Loading…
Cancel
Save