improve: 整理/标签展示

This commit is contained in:
From-wh 2023-05-17 16:13:51 +08:00
parent 19a6cbcf4f
commit b40ec41aa8
2 changed files with 16 additions and 24 deletions

View File

@ -16,13 +16,11 @@ import router from './router';
import store from './store';
import ViewUI from 'view-design';
// import ViewUI from 'view-design'
Vue.prototype.bus = new Vue();
import Router from 'vue-router';
import Auth from '@/libs/wechat';
import 'view-design/dist/styles/iview.css';
import { i18n } from '@/i18n/index.js';
// import i18n from '@/locale';
import config from '@/config';
import importDirective from '@/directive';
@ -31,7 +29,6 @@ import installPlugin from '@/plugin';
import './index.less';
import '@/assets/icons/iconfont.css';
import '@/assets/iconfont/iconfont.css';
import './assets/iconfont/iconfont.css';
import '@/theme/index.scss';
import Element from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
@ -73,8 +70,6 @@ import timeOptions from '@/libs/timeOptions';
import scroll from '@/libs/loading';
import * as tools from '@/libs/tools';
import VueTreeList from 'vue-tree-list';
import { getHeaderName, getHeaderSider, getMenuSider, getSiderSubmenu } from '@/libs/system';
import { getMenuopen } from '@/libs/util';
// 复制到粘贴板插件
import VueClipboard from 'vue-clipboard2';
@ -101,9 +96,6 @@ import settings from '@/setting';
Vue.prototype.$routeProStr = settings.routePre;
// 实际打包时应该不引入mock
/* eslint-disable */
if (process.env.NODE_ENV !== 'production') require('@/mock');
window.Promise = Promise;
Vue.prototype.$modalForm = modalForm;
Vue.prototype.$modalSure = modalSure;
@ -168,7 +160,7 @@ import vuescroll from 'vuescroll';
Vue.use(vuescroll);
// register global utility filters
// 注册全局 过滤器
Object.keys(filters).forEach((key) => {
Vue.filter(key, filters[key]);
});
@ -204,8 +196,15 @@ new Vue({
}
});
}
if (to.name == 'product_productAdd') {
console.log(to.name);
if (
[
'product_productAdd',
'marketing_bargainCreate',
'marketing_storeSeckillCreate',
'marketing_storeIntegralCreate',
].includes(to.name)
) {
let route = to.matched[1].path.split(':')[0];
this.$store.state.menus.oneLvRoutes.map((e) => {
if (route.indexOf(e.path) != -1) {

View File

@ -83,9 +83,9 @@
</i-switch>
</template>
<template slot-scope="{ row, index }" slot="action">
<a v-if="row.stop_status === 0" @click="edit(row)">编辑</a>
<a v-if="row.stop_status === 0" @click="edit(row, 0)">编辑</a>
<Divider v-if="row.stop_status === 0" type="vertical" />
<a @click="copy(row)">复制</a>
<a @click="edit(row, 1)">复制</a>
<Divider type="vertical" />
<a @click="del(row, '删除砍价商品', index)">删除</a>
<Divider type="vertical" />
@ -234,9 +234,8 @@ export default {
methods: {
// 添加
add() {
this.$router.push({ path: this.$routeProStr + '/marketing/store_bargain/create/0/0' });
this.$router.push({ path: this.$routeProStr + '/marketing/store_bargain/create' });
},
// 导出
// 用户导出
async exportList() {
this.tableFrom.status = this.tableFrom.status || '';
@ -267,16 +266,10 @@ export default {
});
});
},
// 编辑
edit(row) {
// 编辑 / 复制 type 0 编辑 1 复制
edit(row, type) {
this.$router.push({
path: this.$routeProStr + '/marketing/store_bargain/create/' + row.id + '/0',
});
},
// 一键复制
copy(row) {
this.$router.push({
path: this.$routeProStr + '/marketing/store_bargain/create/' + row.id + '/1',
path: this.$routeProStr + `/marketing/store_bargain/create/${row.id}/${type}`,
});
},
// 删除