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

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

@ -60,7 +60,8 @@
:label="item.schoolName" :label="item.schoolName"
:value="item.schoolId"></el-option> :value="item.schoolId"></el-option>
</el-select> </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> @click="addCustomer"></i>
</div> </div>
</el-form-item> </el-form-item>
@ -864,7 +865,7 @@ export default {
data.map((e, i) => { data.map((e, i) => {
e.id = i e.id = i
const list = e.startAndEndTimeList const list = e.startAndEndTimeList
if (list) { if (list && list.length) {
let connect = true // let connect = true //
list.map((n, i) => { list.map((n, i) => {
// //

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

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

Loading…
Cancel
Save