zhanbo.xu

feat: 缓存页面

......@@ -69,23 +69,33 @@ export default {
textareaVisible: false,
};
},
watch: {
formData: {
handler(val) {
if (!val[this.dataKey]) {
this.textareaVisible = false;
let inputInner = document.querySelector(
"#inputInner--" + this.dataKey
);
inputInner.classList.remove("inputFocus");
}
},
deep: true,
},
},
methods: {
//文本域展示状态切换
textareaFocus(val) {
this.textareaVisible = true;
this.$nextTick(() => {
document
.querySelector("#popoverInput" + val.target.name.split("-")[0])
.focus();
document.querySelector(
"#inputInner--" + val.target.name.split("-")[0]
).style.display = "none";
document.querySelector("#popoverInput" + this.dataKey).focus();
document.querySelector("#inputInner--" + this.dataKey).style.display =
"none";
});
},
textareaBlur(val) {
let inputInner = document.querySelector(
"#inputInner--" + val.target.name.split("-")[0]
);
let inputInner = document.querySelector("#inputInner--" + this.dataKey);
this.textareaVisible = false;
inputInner.style.display = "block";
this.$nextTick(() => {
......@@ -101,7 +111,7 @@ export default {
}
});
let arr = [];
this.formData[val.target.name.split("-")[0]]
this.formData[this.dataKey]
.replace(/[\n\,\;\;]/g, ",")
.replace(/[\t]/g, "")
.split(",")
......@@ -110,7 +120,7 @@ export default {
arr.push(str.trim());
}
});
this.formData[val.target.name.split("-")[0]] = arr.join("\n");
this.formData[this.dataKey] = arr.join("\n");
this.$emit("formChange", this.formData);
this.$forceUpdate();
},
......
<template>
<section class="app-main">
<transition name="fade-transform" mode="out-in">
<keep-alive :include="cachedViews">
<!-- <keep-alive :include="cachedViews">
<router-view :key="key" />
</keep-alive> -->
<router-view v-if="!cachedViews.includes(cachesName)"></router-view>
<keep-alive v-else>
<router-view :key="key"></router-view>
</keep-alive>
</transition>
</section>
......@@ -13,11 +17,16 @@ export default {
name: "AppMain",
computed: {
cachedViews() {
console.log(this.$store.state.tagsView);
return this.$store.state.tagsView.cachedViews;
},
key() {
console.log(this.$route, this.$route.fullPath);
return this.$route.fullPath;
},
cachesName() {
return this.$route.name;
},
},
};
</script>
......@@ -42,7 +51,7 @@ export default {
.hasTagsView {
.app-main {
/* 84 = navbar + tags-view = 50 + 34 */
min-height: calc(100vh - 84px);
min-height: calc(100vh - 98px);
}
.fixed-header + .app-main {
......
......@@ -5,39 +5,41 @@
</template>
<script>
import { isExternal } from '@/utils/validate'
import { isExternal } from "@/utils/validate";
export default {
props: {
to: {
type: String,
required: true
}
required: true,
},
},
computed: {
isExternal() {
return isExternal(this.to)
return isExternal(this.to);
},
type() {
if (this.isExternal) {
return 'a'
}
return 'router-link'
return "a";
}
return "router-link";
},
},
methods: {
linkProps(to) {
console.log(to);
if (this.isExternal) {
return {
href: to,
target: '_blank',
rel: 'noopener'
}
target: "_blank",
rel: "noopener",
};
}
return {
to: to
}
}
}
}
to: to,
};
},
},
};
</script>
......
<template>
<div id="tags-view-container" class="tags-view-container">
<scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
<router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item"
:style="activeStyle(tag)" @click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent.native="openMenu(tag, $event)">
<scroll-pane
ref="scrollPane"
class="tags-view-wrapper"
@scroll="handleScroll"
>
<router-link
v-for="tag in visitedViews"
ref="tag"
:key="tag.path"
:class="isActive(tag) ? 'active' : ''"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span"
class="tags-view-item"
:style="activeStyle(tag)"
@click.middle.native="!isAffix(tag) ? closeSelectedTag(tag) : ''"
@contextmenu.prevent.native="openMenu(tag, $event)"
>
{{ tag.title }}
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
<span
v-if="!isAffix(tag)"
class="el-icon-close"
@click.prevent.stop="closeSelectedTag(tag)"
/>
</router-link>
</scroll-pane>
<ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu">
<ul
v-show="visible"
:style="{ left: left + 'px', top: top + 'px' }"
class="contextmenu"
>
<li @click="refreshSelectedTag(selectedTag)">刷新页面</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">关闭当前</li>
<li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)">
关闭当前
</li>
<li @click="closeOthersTags">关闭其他</li>
<li v-if="!isLastView()" @click="closeRightTags">关闭右侧</li>
<li @click="closeAllTags(selectedTag)">关闭所有</li>
......@@ -20,8 +42,8 @@
</template>
<script>
import ScrollPane from './ScrollPane'
import path from 'path'
import ScrollPane from "./ScrollPane";
import path from "path";
export default {
components: { ScrollPane },
......@@ -31,188 +53,200 @@ export default {
top: 0,
left: 0,
selectedTag: {},
affixTags: []
}
affixTags: [],
};
},
computed: {
visitedViews() {
return this.$store.state.tagsView.visitedViews
return this.$store.state.tagsView.visitedViews;
},
routes() {
return this.$store.state.permission.routes
return this.$store.state.permission.routes;
},
theme() {
return this.$store.state.settings.theme;
}
},
},
watch: {
$route() {
this.addTags()
this.moveToCurrentTag()
this.addTags();
this.moveToCurrentTag();
},
visible(value) {
if (value) {
document.body.addEventListener('click', this.closeMenu)
document.body.addEventListener("click", this.closeMenu);
} else {
document.body.removeEventListener('click', this.closeMenu)
}
document.body.removeEventListener("click", this.closeMenu);
}
},
},
mounted() {
this.initTags()
this.addTags()
this.initTags();
this.addTags();
},
methods: {
isActive(route) {
return route.path === this.$route.path
return route.path === this.$route.path;
},
activeStyle(tag) {
if (!this.isActive(tag)) return {};
return {
"background-color": this.theme,
"border-color": this.theme
"border-color": this.theme,
};
},
isAffix(tag) {
return tag.meta && tag.meta.affix
return tag.meta && tag.meta.affix;
},
isLastView() {
try {
return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath
return (
this.selectedTag.fullPath ===
this.visitedViews[this.visitedViews.length - 1].fullPath
);
} catch (err) {
return false
return false;
}
},
filterAffixTags(routes, basePath = '/') {
let tags = []
routes.forEach(route => {
filterAffixTags(routes, basePath = "/") {
let tags = [];
routes.forEach((route) => {
if (route.meta && route.meta.affix) {
const tagPath = path.resolve(basePath, route.path)
const tagPath = path.resolve(basePath, route.path);
tags.push({
fullPath: tagPath,
path: tagPath,
name: route.name,
meta: { ...route.meta }
})
meta: { ...route.meta },
});
}
if (route.children) {
const tempTags = this.filterAffixTags(route.children, route.path)
const tempTags = this.filterAffixTags(route.children, route.path);
if (tempTags.length >= 1) {
tags = [...tags, ...tempTags]
tags = [...tags, ...tempTags];
}
}
})
return tags
});
return tags;
},
initTags() {
const affixTags = this.affixTags = this.filterAffixTags(this.routes)
const affixTags = (this.affixTags = this.filterAffixTags(this.routes));
for (const tag of affixTags) {
// Must have tag name
if (tag.name) {
this.$store.dispatch('tagsView/addVisitedView', tag)
this.$store.dispatch("tagsView/addVisitedView", tag);
}
}
},
addTags() {
const { name } = this.$route
const { name } = this.$route;
if (name) {
this.$store.dispatch('tagsView/addView', this.$route)
this.$store.dispatch("tagsView/addView", this.$route);
}
return false
return false;
},
moveToCurrentTag() {
const tags = this.$refs.tag
const tags = this.$refs.tag;
this.$nextTick(() => {
for (const tag of tags) {
if (tag.to.path === this.$route.path) {
this.$refs.scrollPane.moveToTarget(tag)
this.$refs.scrollPane.moveToTarget(tag);
// when query is different then update
if (tag.to.fullPath !== this.$route.fullPath) {
this.$store.dispatch('tagsView/updateVisitedView', this.$route)
this.$store.dispatch("tagsView/updateVisitedView", this.$route);
}
break
break;
}
}
})
});
},
refreshSelectedTag(view) {
this.$store.dispatch('tagsView/delCachedView', view).then(() => {
const { fullPath } = view
this.$store.dispatch("tagsView/delCachedView", view).then(() => {
const { fullPath } = view;
this.$nextTick(() => {
this.$router.replace({
path: '/redirect' + fullPath
})
})
})
// path: fullPath,
path: "/redirect" + fullPath,
});
});
});
},
closeSelectedTag(view) {
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
this.$store
.dispatch("tagsView/delView", view)
.then(({ visitedViews }) => {
if (this.isActive(view)) {
this.toLastView(visitedViews, view)
this.toLastView(visitedViews, view);
}
})
});
},
closeRightTags() {
this.$store.dispatch('tagsView/delRightTags', this.selectedTag).then(visitedViews => {
if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) {
this.toLastView(visitedViews)
this.$store
.dispatch("tagsView/delRightTags", this.selectedTag)
.then((visitedViews) => {
if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) {
this.toLastView(visitedViews);
}
})
});
},
closeOthersTags() {
this.$router.push(this.selectedTag).catch(() => { });
this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => {
this.moveToCurrentTag()
})
this.$router.push(this.selectedTag).catch(() => {});
this.$store
.dispatch("tagsView/delOthersViews", this.selectedTag)
.then(() => {
this.moveToCurrentTag();
});
},
closeAllTags(view) {
this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => {
if (this.affixTags.some(tag => tag.path === this.$route.path)) {
return
this.$store.dispatch("tagsView/delAllViews").then(({ visitedViews }) => {
console.log(this.affixTags, visitedViews, view);
if (this.affixTags.some((tag) => tag.path === this.$route.path)) {
return;
}
this.toLastView(visitedViews, view)
})
this.toLastView(visitedViews, view);
});
},
toLastView(visitedViews, view) {
const latestView = visitedViews.slice(-1)[0]
const latestView = visitedViews.slice(-1)[0];
if (latestView) {
this.$router.push(latestView.fullPath)
this.$router.push(latestView.fullPath);
} else {
// now the default is to redirect to the home page if there is no tags-view,
// you can adjust it according to your needs.
if (view.name === 'Dashboard') {
// if (view.name === "Dashboard") {
// to reload home page
this.$router.replace({ path: '/redirect' + view.fullPath })
} else {
this.$router.push('/')
}
this.$router.replace({ path: "/redirect" + view.fullPath });
// } else {
// this.$router.push("/");
// }
}
},
openMenu(tag, e) {
const menuMinWidth = 105
const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
const offsetWidth = this.$el.offsetWidth // container width
const maxLeft = offsetWidth - menuMinWidth // left boundary
const left = e.clientX - offsetLeft + 15 // 15: margin right
const menuMinWidth = 105;
const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
const offsetWidth = this.$el.offsetWidth; // container width
const maxLeft = offsetWidth - menuMinWidth; // left boundary
const left = e.clientX - offsetLeft + 15; // 15: margin right
if (left > maxLeft) {
this.left = maxLeft
this.left = maxLeft;
} else {
this.left = left
this.left = left;
}
this.top = e.clientY
this.visible = true
this.selectedTag = tag
this.top = e.clientY;
this.visible = true;
this.selectedTag = tag;
},
closeMenu() {
this.visible = false
this.visible = false;
},
handleScroll() {
this.closeMenu()
}
}
}
this.closeMenu();
},
},
};
</script>
<style lang="scss" scoped>
......@@ -221,7 +255,7 @@ export default {
width: 100%;
background: #fff;
border-bottom: 1px solid #d8dce5;
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
.tags-view-wrapper {
.tags-view-item {
......@@ -252,7 +286,7 @@ export default {
border-color: #42b983;
&::before {
content: '';
content: "";
background: #fff;
display: inline-block;
width: 8px;
......@@ -276,7 +310,7 @@ export default {
font-size: 12px;
font-weight: 400;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
li {
margin: 0;
......@@ -301,11 +335,11 @@ export default {
vertical-align: 2px;
border-radius: 50%;
text-align: center;
transition: all .3s cubic-bezier(.645, .045, .355, 1);
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
transform-origin: 100% 50%;
&:before {
transform: scale(.6);
transform: scale(0.6);
display: inline-block;
vertical-align: -3px;
}
......
export const routeNameMap = {
"/reportingData": "ReportingData", // 分单级申报数据
"/editReportingData": "EditReportingData", // 申报数据编辑
"/arrival-declare": "ArrivalDeclare", // 总单级申报数据
"/receipt-management": "ReceiptManagement", //模拟回执管理
"/exportBillQuery": "ExportBillQuery",
"/exportBillDetail": "ExportBillDetail",
"/exportTransportBillQuery": "ExportTransportBillQuery",
"/exportTransportDetail": "ExportTransportDetail", //出口运单详情
"/exportListQuery": "ExportListQuery",
"/exportListDetail": "ExportListDetail",
"/listBranchQuery": "ListBranchQuery",
"/listBranchDetail": "ListBranchDetail",
"/arrival-list": "ArrivalList",
"/arrival-list-detail": "ArrivalListDetail",
"/logisticsExitQuery": "LogisticsExitQuery",
"/logisticsExitDetail": "LogisticsExitDetail",
"/exportRevokeBillQuery": "ExportRevokeBillQuery",
"/pdd-info": "PddList",
"/pdd-detail": "PddListDetail",
"/summaryEdit": "SummaryEdit",
"/summaryDetail": "SummaryDetail",
"/summaryDataSearch": "SummaryDataSearch",
"/log-search": "LogSearch",
"/portConfig": "PortConfig",
"/customerConfig": "CustomerConfig",
"/hs-code": "HsCode",
"/cipherMachineConfig": "CipherMachineConfig",
"/api-key": "ApiKey",
"/supervise-place-manage": "SupervisePlaceManage",
"/userRoleConfig": "UserRoleConfig",
"/roleConfig": "RoleConfig",
};
......@@ -99,15 +99,15 @@ export default {
watch: {
$route(val) {
this.activeRoute = val;
this.setMainHeight();
// this.setMainHeight();
},
},
mounted() {},
methods: {
setMainHeight(val) {
document.querySelector(".main-container").style.height =
"calc(100% - 64px)";
},
// setMainHeight(val) {
// document.querySelector(".main-container").style.height =
// "calc(100% - 64px)";
// },
handleClickOutside() {
this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
},
......@@ -127,6 +127,10 @@ export default {
@import "~@/assets/styles/mixin.scss";
@import "~@/assets/styles/variables.scss";
.main-container {
height: calc(100vh - 98px) !important;
}
.app-wrapper {
@include clearfix;
position: relative;
......
module.exports = {
title: '跨境电商在线申报',
title: "跨境电商在线申报",
/**
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
*/
sideTheme: 'theme-light',
sideTheme: "theme-light",
/**
* 是否系统布局配置
......@@ -19,7 +19,7 @@ module.exports = {
/**
* 是否显示 tagsView
*/
tagsView: false,
tagsView: true,
/**
* 是否固定头部
......@@ -37,5 +37,5 @@ module.exports = {
* The default is only used in the production env
* If you want to also use it in dev, you can pass ['production', 'development']
*/
errorLog: 'production'
}
errorLog: "production",
};
......
const state = {
visitedViews: [],
cachedViews: []
}
cachedViews: [],
};
const mutations = {
ADD_VISITED_VIEW: (state, view) => {
if (state.visitedViews.some(v => v.path === view.path)) return
if (state.visitedViews.some((v) => v.path === view.path)) return;
state.visitedViews.push(
Object.assign({}, view, {
title: view.meta.title || 'no-name'
title: view.meta.title || "no-name",
})
)
);
},
ADD_CACHED_VIEW: (state, view) => {
if (state.cachedViews.includes(view.name)) return
if (state.cachedViews.includes(view.name)) return;
if (!view.meta.noCache) {
state.cachedViews.push(view.name)
state.cachedViews.push(view.name);
}
},
DEL_VISITED_VIEW: (state, view) => {
for (const [i, v] of state.visitedViews.entries()) {
if (v.path === view.path) {
state.visitedViews.splice(i, 1)
break
state.visitedViews.splice(i, 1);
break;
}
}
},
DEL_CACHED_VIEW: (state, view) => {
const index = state.cachedViews.indexOf(view.name)
index > -1 && state.cachedViews.splice(index, 1)
const index = state.cachedViews.indexOf(view.name);
index > -1 && state.cachedViews.splice(index, 1);
},
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
state.visitedViews = state.visitedViews.filter(v => {
return v.meta.affix || v.path === view.path
})
state.visitedViews = state.visitedViews.filter((v) => {
return v.meta.affix || v.path === view.path;
});
},
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
const index = state.cachedViews.indexOf(view.name)
const index = state.cachedViews.indexOf(view.name);
if (index > -1) {
state.cachedViews = state.cachedViews.slice(index, index + 1)
state.cachedViews = state.cachedViews.slice(index, index + 1);
} else {
state.cachedViews = []
state.cachedViews = [];
}
},
DEL_ALL_VISITED_VIEWS: state => {
DEL_ALL_VISITED_VIEWS: (state) => {
// keep affix tags
const affixTags = state.visitedViews.filter(tag => tag.meta.affix)
state.visitedViews = affixTags
const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
state.visitedViews = affixTags;
},
DEL_ALL_CACHED_VIEWS: state => {
state.cachedViews = []
DEL_ALL_CACHED_VIEWS: (state) => {
state.cachedViews = [];
},
UPDATE_VISITED_VIEW: (state, view) => {
for (let v of state.visitedViews) {
if (v.path === view.path) {
v = Object.assign(v, view)
break
v = Object.assign(v, view);
break;
}
}
},
DEL_RIGHT_VIEWS: (state, view) => {
const index = state.visitedViews.findIndex(v => v.path === view.path)
const index = state.visitedViews.findIndex((v) => v.path === view.path);
if (index === -1) {
return
return;
}
state.visitedViews = state.visitedViews.filter((item, idx) => {
if (idx <= index || (item.meta && item.meta.affix)) {
return true
return true;
}
const i = state.cachedViews.indexOf(item.name)
const i = state.cachedViews.indexOf(item.name);
if (i > -1) {
state.cachedViews.splice(i, 1)
}
return false
})
state.cachedViews.splice(i, 1);
}
}
return false;
});
},
};
const actions = {
addView({ dispatch }, view) {
dispatch('addVisitedView', view)
dispatch('addCachedView', view)
dispatch("addVisitedView", view);
dispatch("addCachedView", view);
console.log("addView", view);
},
addVisitedView({ commit }, view) {
commit('ADD_VISITED_VIEW', view)
commit("ADD_VISITED_VIEW", view);
},
addCachedView({ commit }, view) {
commit('ADD_CACHED_VIEW', view)
commit("ADD_CACHED_VIEW", view);
},
delView({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delVisitedView', view)
dispatch('delCachedView', view)
return new Promise((resolve) => {
dispatch("delVisitedView", view);
dispatch("delCachedView", view);
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
cachedViews: [...state.cachedViews],
});
});
},
delVisitedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_VISITED_VIEW', view)
resolve([...state.visitedViews])
})
return new Promise((resolve) => {
commit("DEL_VISITED_VIEW", view);
resolve([...state.visitedViews]);
});
},
delCachedView({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_CACHED_VIEW', view)
resolve([...state.cachedViews])
})
return new Promise((resolve) => {
commit("DEL_CACHED_VIEW", view);
resolve([...state.cachedViews]);
});
},
delOthersViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delOthersVisitedViews', view)
dispatch('delOthersCachedViews', view)
return new Promise((resolve) => {
dispatch("delOthersVisitedViews", view);
dispatch("delOthersCachedViews", view);
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
cachedViews: [...state.cachedViews],
});
});
},
delOthersVisitedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_VISITED_VIEWS', view)
resolve([...state.visitedViews])
})
return new Promise((resolve) => {
commit("DEL_OTHERS_VISITED_VIEWS", view);
resolve([...state.visitedViews]);
});
},
delOthersCachedViews({ commit, state }, view) {
return new Promise(resolve => {
commit('DEL_OTHERS_CACHED_VIEWS', view)
resolve([...state.cachedViews])
})
return new Promise((resolve) => {
commit("DEL_OTHERS_CACHED_VIEWS", view);
resolve([...state.cachedViews]);
});
},
delAllViews({ dispatch, state }, view) {
return new Promise(resolve => {
dispatch('delAllVisitedViews', view)
dispatch('delAllCachedViews', view)
return new Promise((resolve) => {
dispatch("delAllVisitedViews", view);
dispatch("delAllCachedViews", view);
resolve({
visitedViews: [...state.visitedViews],
cachedViews: [...state.cachedViews]
})
})
cachedViews: [...state.cachedViews],
});
});
},
delAllVisitedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_VISITED_VIEWS')
resolve([...state.visitedViews])
})
return new Promise((resolve) => {
commit("DEL_ALL_VISITED_VIEWS");
resolve([...state.visitedViews]);
});
},
delAllCachedViews({ commit, state }) {
return new Promise(resolve => {
commit('DEL_ALL_CACHED_VIEWS')
resolve([...state.cachedViews])
})
return new Promise((resolve) => {
commit("DEL_ALL_CACHED_VIEWS");
resolve([...state.cachedViews]);
});
},
updateVisitedView({ commit }, view) {
commit('UPDATE_VISITED_VIEW', view)
commit("UPDATE_VISITED_VIEW", view);
},
delRightTags({ commit }, view) {
return new Promise(resolve => {
commit('DEL_RIGHT_VIEWS', view)
resolve([...state.visitedViews])
})
}
}
return new Promise((resolve) => {
commit("DEL_RIGHT_VIEWS", view);
resolve([...state.visitedViews]);
});
},
};
export default {
namespaced: true,
state,
mutations,
actions
}
actions,
};
......
......@@ -35,7 +35,7 @@
<!-- 提运单号 -->
<el-col :span="5">
<Formitem label="提运单号" prop="billNo">
<el-input
<!-- <el-input
type="text"
class="inputShadow"
id="inputInner--billNo"
......@@ -43,7 +43,12 @@
v-model="sreachFormData.billNo"
clearable
placeholder=""
></el-input>
></el-input> -->
<FormTextareaInput
:formData="sreachFormData"
dataKey="billNo"
@formChange="formChange"
/>
</Formitem>
</el-col>
......@@ -350,7 +355,7 @@ import { getCurrUserPortInfo } from "@/api/system/user.js";
import PopoverComponent from "./popover-component.vue";
export default {
name: "SupervisePlaceManage",
name: "ArrivalDeclare",
components: {
DialogVue,
DataPreview,
......@@ -546,6 +551,10 @@ export default {
methods: {
getTotalDocumentsLevelLog: getTotalDocumentsLevelLog,
getOperationLogByBillNo: getOperationLogByBillNo,
formChange(val) {
this.sreachFormData = val;
},
//申报日志
popperClose() {
this.optionsVisible = false;
......
......@@ -317,7 +317,7 @@ import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue";
import ProductDetailTable from "../components/ProductDetailTable/index.vue";
import { getExportArrivalInDetails } from "@/api/arrivalList-api";
export default {
name: "",
name: "ArrivalListDetail",
components: { ProductDetailTable, ReceiptInfoTable },
data() {
return {
......@@ -378,8 +378,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -298,7 +298,8 @@ export default {
view(val) {
this.$router.push({
name: "ArrivalListDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
formChange(val) {
......
......@@ -175,7 +175,7 @@ import { getDictData } from "@/api/system/dict-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "PortConfig",
name: "CustomerConfig",
components: {
DialogVue,
},
......
......@@ -668,7 +668,7 @@ import {
updateDeclareData,
} from "@/api/declareData-api.js";
export default {
name: "",
name: "EditReportingData",
components: { RowDataEditForm },
data() {
var checkNegativeNum = (rule, value, callback) => {
......@@ -972,8 +972,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.declareId = this.$route.params.data.declareId;
if (this.$route.query.declareId) {
this.declareId = this.$route.query.declareId;
this.queryDeclareData(this.declareId);
this.queryCustomerList();
this.queryPortList();
......
......@@ -247,7 +247,7 @@ import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue";
import ProductDetailTable from "../components/ProductDetailTable/index.vue";
import { getOrderDetailData } from "@/api/exportDetail-api.js";
export default {
name: "",
name: "ExportBillDetail",
components: { ProductDetailTable, ReceiptInfoTable },
data() {
return {
......@@ -352,8 +352,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -361,7 +361,8 @@ export default {
view(val) {
this.$router.push({
name: "ExportBillDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
popoverChange(val) {
......
......@@ -747,7 +747,7 @@ import DialogVue from "./dialog.vue";
import { isHasAuth } from "../../utils/auth";
export default {
name: "",
name: "ExportListDetail",
components: { ProductDetailTable, ReceiptInfoTable, DialogVue },
data() {
return {
......@@ -874,8 +874,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -274,7 +274,7 @@ import CustomDialog from "./custom-dialog.vue";
import { formatDateNew } from "../../utils";
export default {
name: "ExportBillQuery",
name: "ExportListQuery",
components: {
CustomDialog,
},
......@@ -507,7 +507,8 @@ export default {
view(val) {
this.$router.push({
name: "ExportListDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
popoverChange(val) {
......
......@@ -287,7 +287,8 @@ export default {
view(val) {
this.$router.push({
name: "ExportTransportDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
//查询
......
......@@ -272,7 +272,8 @@ export default {
view(val) {
this.$router.push({
name: "ExportTransportDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
//查询
......
......@@ -99,7 +99,6 @@
></el-input>
</Formitem>
</el-col>
</el-row>
<el-row :gutter="5">
<!-- 币制 -->
......@@ -283,7 +282,7 @@
import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue";
import { getTransportDetail } from "@/api/exportDetail-api.js";
export default {
name: "",
name: "ExportTransportDetail",
components: { ReceiptInfoTable },
data() {
return {
......@@ -388,8 +387,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -149,7 +149,7 @@ import { getHsCodeList, getHsCodeSingleSync } from "@/api/arrivalList-api.js";
import DialogVue from "./dialog.vue";
import TimeDialog from "./time-dialog.vue";
export default {
name: "SupervisePlaceManage",
name: "HsCode",
components: {
DialogVue,
TimeDialog,
......@@ -429,5 +429,7 @@ export default {
}
.name-wrapper-content {
max-width: 400px;
max-height: 400px;
overflow-y: scroll;
}
</style>
......
......@@ -13,12 +13,8 @@ export default {
fcl: false,
};
},
created() {
},
methods: {
},
created() {},
methods: {},
};
</script>
......
......@@ -333,7 +333,7 @@ import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue";
import ProductDetailTable from "../components/ProductDetailTable/index.vue";
import { getListBranchDetail } from "@/api/exportDetail-api.js";
export default {
name: "",
name: "ListBranchDetail",
components: { ProductDetailTable, ReceiptInfoTable },
data() {
return {
......@@ -400,8 +400,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -284,7 +284,8 @@ export default {
view(val) {
this.$router.push({
name: "ListBranchDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
//查询
......
......@@ -152,7 +152,7 @@ import { getOperationLogList } from "@/api/logSearch-api.js";
import { getDictData } from "@/api/system/dict-api.js";
export default {
name: "SupervisePlaceManage",
name: "LogSearch",
components: {},
data() {
return {
......
......@@ -104,7 +104,6 @@
></el-input>
</Formitem>
</el-col>
</el-row>
<el-row :gutter="5">
<!-- 申报地海关代码 -->
......@@ -229,7 +228,7 @@ import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue";
import ProductDetailTable from "../components/ProductDetailTable/index.vue";
import { getLogisticsExitDetail } from "@/api/exportDetail-api.js";
export default {
name: "index.vue",
name: "LogisticsExitDetail",
components: { ProductDetailTable, ReceiptInfoTable },
data() {
return {
......@@ -290,8 +289,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -290,7 +290,8 @@ export default {
view(val) {
this.$router.push({
name: "LogisticsExitDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
//查询
......
......@@ -91,7 +91,7 @@ import { getRoleList } from "@/api/system/user.js";
import DialogVue from "./dialog.vue";
export default {
name: "SupervisePlaceManage",
name: "MenuList",
components: {
DialogVue,
},
......
......@@ -660,7 +660,7 @@
import { getCustomerDeclareDataId } from "@/api/pdd-info";
import { getCustomerList, getPortList } from "@/api/declareData-api.js";
export default {
name: "",
name: "PddListDetail",
// components: { RowDataEditForm },
data() {
var checkNegativeNum = (rule, value, callback) => {
......@@ -965,8 +965,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.declareId = this.$route.params.data.id;
if (this.$route.query.id) {
this.declareId = this.$route.query.id;
this.queryDeclareData(this.declareId);
this.queryCustomerList();
this.queryPortList();
......
......@@ -162,7 +162,7 @@
<script>
import { getPddInfo, getResend } from "@/api/pdd-info";
export default {
name: "ArrivalList",
name: "PddList",
components: {},
data() {
return {
......@@ -268,7 +268,8 @@ export default {
view(val) {
this.$router.push({
name: "PddListDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
// 清空
......
......@@ -138,7 +138,7 @@ import { getDictData } from "@/api/system/dict-api.js";
import DialogVue from "./dialog.vue";
export default {
name: "SupervisePlaceManage",
name: "ReceiptManagement",
components: {
DialogVue,
},
......
......@@ -39,7 +39,7 @@
<!-- 提运单号 -->
<el-col :span="5">
<Formitem label="提运单号" prop="billNo">
<el-input
<!-- <el-input
type="text"
class="inputShadow"
id="inputInner--billNo"
......@@ -47,7 +47,12 @@
v-model="sreachFormData.billNo"
clearable
placeholder=""
></el-input>
></el-input> -->
<FormTextareaInput
:formData="sreachFormData"
dataKey="billNo"
@formChange="formChange"
/>
</Formitem>
</el-col>
<!-- 物流运单编号 -->
......@@ -63,7 +68,7 @@
<!-- 订单编号 -->
<el-col :span="5">
<Formitem label="订单编号" prop="orderNo">
<el-input
<!-- <el-input
type="text"
class="inputShadow"
id="inputInner--orderNo"
......@@ -71,7 +76,12 @@
v-model="sreachFormData.orderNo"
clearable
placeholder=""
></el-input>
></el-input> -->
<FormTextareaInput
:formData="sreachFormData"
dataKey="orderNo"
@formChange="formChange"
/>
</Formitem>
</el-col>
......@@ -929,7 +939,7 @@ export default {
console.log(error);
} finally {
this.search(0);
this.tableMaxheight = window.innerHeight - 335;
this.tableMaxheight = window.innerHeight - 360;
}
},
mounted() {
......@@ -1166,11 +1176,7 @@ export default {
datasDownload(dataSource) {
let obj = {
// billNo: this.sreachFormData.billNo,
declareId: [],
// logisticsNo: this.sreachFormData.logisticsNo,
// orderNo: this.sreachFormData.orderNo,
// receiptStatus: this.sreachFormData.receiptStatus,
dataSourceTemplate: dataSource,
...this.sreachFormData,
};
......@@ -1513,7 +1519,8 @@ export default {
update(val) {
this.$router.push({
name: "EditReportingData",
params: { data: val },
// params: { data: val },
query: { declareId: val.declareId },
});
},
//申报日志
......
......@@ -8,26 +8,6 @@
size="small"
>
<el-row class="row-border">
<!-- 提运单号 -->
<!-- <el-col :span="5">-->
<!-- <Formitem label="提运单号" prop="billNo">-->
<!-- <el-input-->
<!-- type="text"-->
<!-- class="inputShadow"-->
<!-- id="inputInner&#45;&#45;billNo"-->
<!-- resize="none"-->
<!-- v-model="sreachFormData.billNo"-->
<!-- clearable-->
<!-- placeholder=""-->
<!-- ></el-input>-->
<!--&lt;!&ndash; <FormTextareaInput&ndash;&gt;-->
<!--&lt;!&ndash; :formData="sreachFormData"&ndash;&gt;-->
<!--&lt;!&ndash; dataKey="billNo"&ndash;&gt;-->
<!--&lt;!&ndash; @formChange="formChange"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!-- </Formitem>-->
<!-- </el-col>-->
<!-- 预录入编号 -->
<el-col :span="5">
<Formitem label="预录入编号" prop="preNo">
<el-input
......@@ -249,7 +229,7 @@ import {
getExportSummaryReceiptData,
} from "@/api/exportSummary-api";
export default {
name: "ExportBillQuery",
name: "SummaryDataSearch",
data() {
return {
sreachFormData: {
......@@ -435,7 +415,8 @@ export default {
view(val) {
this.$router.push({
name: "SummaryDetail",
params: { data: val },
// params: { data: val },
query: { id: val.id },
});
},
popoverChange(val) {
......
......@@ -15,20 +15,6 @@
size="small"
>
<el-row :gutter="5">
<!-- 提运单号 -->
<!-- <el-col :span="3">-->
<!-- <Formitem label="提运单号" prop="billNo">-->
<!-- <el-input-->
<!-- type="text"-->
<!-- class="inputShadow"-->
<!-- id="inputInner&#45;&#45;billNo"-->
<!-- resize="none"-->
<!-- v-model="formData.billNo"-->
<!-- clearable-->
<!-- placeholder=""-->
<!-- ></el-input>-->
<!-- </Formitem>-->
<!-- </el-col>-->
<!-- 电子口岸编号 -->
<el-col :span="6">
<Formitem label="电子口岸编号" prop="preNo">
......@@ -350,7 +336,7 @@ import ReceiptInfoTable from "../components/ReceiptInfoTable/index.vue";
import ProductDetailTable from "../components/ProductDetailTable/index.vue";
import { getExportSummaryDetail } from "@/api/exportSummary-api.js";
export default {
name: "",
name: "SummaryDetail",
components: { ProductDetailTable, ReceiptInfoTable },
data() {
return {
......@@ -405,8 +391,8 @@ export default {
};
},
created() {
if (this.$route.params.data) {
this.id = this.$route.params.data.id;
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.searchData();
} else {
this.back();
......
......@@ -174,7 +174,7 @@ export default {
components: {
DialogVue,
},
name: "",
name: "SummaryEdit",
data() {
return {
formRules: {
......