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 { export default {
name: 'StaffIndex', name: "StaffIndex",
components: {
ImportOne: importOne,
ImportTwo: importTwo,
ImportThree: importThree,
},
data() { data() {
return { return {
userInfo: this.$store.state.d2admin.user.info, userInfo: this.$store.state.d2admin.user.info,
activeName: 'one', activeName: "one",
taskInfo: null, taskInfo: null,
resultInfo: null resultInfo: null,
} };
},
components: {
importOne,
importTwo,
importThree
}, },
mounted() { mounted() {
if (this.$route.query.step) { if (this.$route.query.step) {
console.log('step', this.$route.query.step) console.log("step", this.$route.query.step);
this.activeName = this.$route.query.step this.activeName = this.$route.query.step;
this.taskInfo = this.$route.query.taskInfo this.taskInfo = this.$route.query.taskInfo;
} }
}, },
methods: { methods: {
...mapActions({ ...mapActions({
get: 'd2admin/base/get', get: "d2admin/base/get",
close: 'd2admin/page/close' close: "d2admin/page/close",
}), }),
oneStepComplete(data) { oneStepComplete(data) {
console.log('data', data) console.log("data", data);
this.activeName = 'two' this.activeName = "two";
}, },
goBackOneStep() { goBackOneStep() {
this.activeName = 'one' this.activeName = "one";
}, },
twoStepComplete(data) { twoStepComplete(data) {
this.resultInfo = data this.resultInfo = data;
this.activeName = 'three' this.activeName = "three";
}, },
importAgain() { importAgain() {
this.activeName = 'one' this.activeName = "one";
}, },
goBackListPage() { goBackListPage() {
this.close({ tagName: "/importDetailControl" }) this.close({ tagName: "/importDetailControl" });
this.$router.push({ this.$router.push({
name: "theAssetData" name: "theAssetData",
}) });
} },
}
}
},
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.importDetail { .importDetail {
padding: 0 20px; padding: 0 20px;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!