Commit 9e0fa98e by chenwq

格式化

1 parent c0a82e69
<!-- 导入明细&回单主页面 -->
<template>
<div class="importDetail">
<div class="header"
slot="header">
<div slot="header"
class="header">
<div>
<import-one ref="importOne"
v-if="activeName === 'one'"
@oneStepComplete="oneStepComplete" />
<import-two v-if="activeName === 'two'"
:task-info="taskInfo"
@twoStepComplete="twoStepComplete"
@goBackOneStep="goBackOneStep" />
<import-three v-if="activeName === 'three'"
:result-info="resultInfo"
@importAgain="importAgain"
@goBackListPage="goBackListPage" />
<ImportOne v-if="activeName === 'one'"
ref="importOne"
@oneStepComplete="oneStepComplete" />
<ImportTwo v-if="activeName === 'two'"
:task-info="taskInfo"
@goBackOneStep="goBackOneStep"
@twoStepComplete="twoStepComplete" />
<ImportThree v-if="activeName === 'three'"
:result-info="resultInfo"
@goBackListPage="goBackListPage"
@importAgain="importAgain" />
</div>
</div>
</div>
</template>
<script>
import importOne from './components/importOne'
import importTwo from './components/importTwo'
import importThree from './components/importThree'
import { mapActions } from 'vuex'
export default {
name: 'StaffIndex',
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: 'one',
taskInfo: null,
resultInfo: null
}
},
import { mapActions } from "vuex";
import importOne from "./components/importOne";
import importThree from "./components/importThree";
import importTwo from "./components/importTwo";
components: {
importOne,
importTwo,
importThree
},
export default {
name: "StaffIndex",
mounted() {
if (this.$route.query.step) {
console.log('step', this.$route.query.step)
this.activeName = this.$route.query.step
this.taskInfo = this.$route.query.taskInfo
}
},
components: {
ImportOne: importOne,
ImportTwo: importTwo,
ImportThree: importThree,
},
data() {
return {
userInfo: this.$store.state.d2admin.user.info,
activeName: "one",
taskInfo: null,
resultInfo: null,
};
},
methods: {
...mapActions({
get: 'd2admin/base/get',
close: 'd2admin/page/close'
}),
oneStepComplete(data) {
console.log('data', data)
this.activeName = 'two'
},
goBackOneStep() {
this.activeName = 'one'
},
twoStepComplete(data) {
this.resultInfo = data
this.activeName = 'three'
},
importAgain() {
this.activeName = 'one'
},
goBackListPage() {
this.close({ tagName: "/importDetailControl" })
this.$router.push({
name: "theAssetData"
})
}
mounted() {
if (this.$route.query.step) {
console.log("step", this.$route.query.step);
this.activeName = this.$route.query.step;
this.taskInfo = this.$route.query.taskInfo;
}
},
}
}
methods: {
...mapActions({
get: "d2admin/base/get",
close: "d2admin/page/close",
}),
oneStepComplete(data) {
console.log("data", data);
this.activeName = "two";
},
goBackOneStep() {
this.activeName = "one";
},
twoStepComplete(data) {
this.resultInfo = data;
this.activeName = "three";
},
importAgain() {
this.activeName = "one";
},
goBackListPage() {
this.close({ tagName: "/importDetailControl" });
this.$router.push({
name: "theAssetData",
});
},
},
};
</script>
<style lang="scss" scoped>
.importDetail {
padding: 0 20px;
padding: 0 20px;
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
.header {
::v-deep .el-tabs__header {
margin: 0;
padding: 0 20px;
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!