Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
cb7fd58a
Commit
cb7fd58a
authored
Dec 08, 2022
by
liuguorong93
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
从编辑页面保存返回列表页面 保持在当前页
parent
233ebbfc
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
6 deletions
+41
-6
src/utils/getJsonData.js
+10
-0
src/views/artisanManage/index.vue
+11
-2
src/views/poDogJobManage/index.vue
+10
-2
src/views/teUnitManage/index.vue
+10
-2
No files found.
src/utils/getJsonData.js
View file @
cb7fd58a
...
...
@@ -5,21 +5,31 @@ export const getJsonDataApi = (fileName) => {
let
datas
if
(
!
fileName
)
return
[]
let
enumKey
=
fileName
+
'_at_jingquanSys'
let
options
=
window
.
localStorage
.
getItem
(
enumKey
)
return
new
Promise
((
resolve
)
=>
{
if
(
options
)
{
resolve
(
JSON
.
parse
(
options
))
}
else
{
axios
.
get
(
`JsonData/
${
fileName
}
.json`
).
then
((
res
)
=>
{
try
{
let
result
=
res
.
data
.
data
.
rows
||
[]
window
.
localStorage
.
setItem
(
enumKey
,
JSON
.
stringify
(
result
))
datas
=
result
resolve
(
datas
)
}
catch
(
e
)
{
datas
=
[]
window
.
localStorage
.
removeItem
(
enumKey
)
resolve
(
datas
)
}
}).
catch
((
e
)
=>
{
datas
=
[]
window
.
localStorage
.
removeItem
(
enumKey
)
resolve
(
datas
)
})
}
})
}
...
...
src/views/artisanManage/index.vue
View file @
cb7fd58a
...
...
@@ -264,14 +264,16 @@ export default {
},
};
},
async
mounted
()
{
mounted
()
{},
async
activated
()
{
this
.
jwjsxlOptions
=
await
getJsonDataApi
(
"CODE_JWJXXL"
);
this
.
shifouOptions
=
await
getJsonDataApi
(
"CODE_YN"
);
this
.
shifouOptions
.
unshift
({
id
:
""
,
label
:
"全部"
,
});
this
.
getLists
(
1
);
this
.
getLists
(
this
.
currentPage
);
},
methods
:
{
indexMethod
(
index
)
{
...
...
@@ -422,6 +424,13 @@ export default {
this
.
showImportBox
=
true
;
},
},
beforeRouteLeave
(
to
,
form
,
next
)
{
let
toName
=
to
.
name
;
if
(
toName
!==
"artisanManageEdit"
)
{
this
.
currentPage
=
1
;
}
next
();
},
watch
:
{},
};
</
script
>
...
...
src/views/poDogJobManage/index.vue
View file @
cb7fd58a
...
...
@@ -336,12 +336,13 @@ export default {
},
};
},
async
mounted
()
{
mounted
()
{},
async
activated
()
{
this
.
zyfxOptions
=
await
getJsonDataApi
(
"CODE_WORKINGDOGCLASSIFICA"
);
this
.
gzqdjOptions
=
await
getJsonDataApi
(
"CODE_GZQDJ"
);
this
.
jyjqOptions
=
await
getJsonDataApi
(
"CODE_SPECIES"
);
this
.
getLists
(
1
);
this
.
getLists
(
this
.
currentPage
);
},
methods
:
{
resetForm
()
{
...
...
@@ -516,6 +517,13 @@ export default {
});
},
},
beforeRouteLeave
(
to
,
form
,
next
)
{
let
toName
=
to
.
name
;
if
(
toName
!==
"poDogJobManageEdit"
)
{
this
.
currentPage
=
1
;
}
next
();
},
watch
:
{},
};
</
script
>
...
...
src/views/teUnitManage/index.vue
View file @
cb7fd58a
...
...
@@ -204,8 +204,9 @@ export default {
},
};
},
mounted
()
{
this
.
getLists
(
1
);
mounted
()
{},
async
activated
()
{
this
.
getLists
(
this
.
currentPage
);
},
methods
:
{
// 重置
...
...
@@ -336,6 +337,13 @@ export default {
});
},
},
beforeRouteLeave
(
to
,
form
,
next
)
{
let
toName
=
to
.
name
;
if
(
toName
!==
"teUnitManageEdit"
)
{
this
.
currentPage
=
1
;
}
next
();
},
watch
:
{},
};
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment