Commit 9e0fa98e by chenwq

格式化

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