清单发布流程
This commit is contained in:
@@ -21,113 +21,128 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import listOfCountries from "../accessStandardsAndRegulations/page/listOfCountries";
|
||||
import listProject from "../accessStandardsAndRegulations/page/listProject";
|
||||
import listTracking from "../accessStandardsAndRegulations/page/listTracking";
|
||||
import listOther from "../accessStandardsAndRegulations/page/listOther";
|
||||
export default {
|
||||
name: "AccessStandardsAndRegulations",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
tabValue: ''
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
components: {
|
||||
listOfCountries,
|
||||
listProject,
|
||||
listTracking,
|
||||
listOther
|
||||
},
|
||||
props: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted() {
|
||||
var list = []
|
||||
const menuList = this.$store.getters.getMenuList
|
||||
menuList.forEach(item => {
|
||||
if (item.id === 'b05b562950cb6d0aef539fad30b7386a') {
|
||||
list.push({
|
||||
label: '国家/地区清单',
|
||||
name: 'listOfCountries'
|
||||
})
|
||||
} else if (item.id === '63e05705d0c8013162caa34f9fe52865') {
|
||||
list.push({
|
||||
label: '项目类清单',
|
||||
name: 'listProject'
|
||||
})
|
||||
} else if (item.id === '418123d180abf67bd2c46d5a694baaa5') {
|
||||
list.push({
|
||||
label: '重点标准跟踪清单',
|
||||
name: 'listTracking'
|
||||
})
|
||||
} else if (item.id === '5a75523729b04102a565167004d640e9') {
|
||||
list.push({
|
||||
label: '其他清单',
|
||||
name: 'listOther'
|
||||
})
|
||||
import listOfCountries from "../accessStandardsAndRegulations/page/listOfCountries";
|
||||
import listProject from "../accessStandardsAndRegulations/page/listProject";
|
||||
import listTracking from "../accessStandardsAndRegulations/page/listTracking";
|
||||
import listOther from "../accessStandardsAndRegulations/page/listOther";
|
||||
|
||||
export default {
|
||||
name: "AccessStandardsAndRegulations",
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
tabValue: "",
|
||||
menuName: ["国家/地区清单", "项目类清单", "重点标准跟踪清单", "其他清单"]
|
||||
};
|
||||
},
|
||||
methods: {},
|
||||
components: {
|
||||
listOfCountries,
|
||||
listProject,
|
||||
listTracking,
|
||||
listOther
|
||||
},
|
||||
props: {},
|
||||
computed: {},
|
||||
watch: {},
|
||||
mounted() {
|
||||
var list = [];
|
||||
const menuList = this.$store.getters.getMenuList;
|
||||
let menuData = [];
|
||||
let menuID = ["b05b562950cb6d0aef539fad30b7386a", "63e05705d0c8013162caa34f9fe52865", "418123d180abf67bd2c46d5a694baaa5", "5a75523729b04102a565167004d640e9"];
|
||||
this.menuName.forEach(item => {
|
||||
for (let i = 0; i < menuList.length; i++) {
|
||||
let entity = menuList[i];
|
||||
if (item != entity.menuName) continue;
|
||||
if (menuID.indexOf(entity.id) >= 0 && menuData.indexOf(entity.id) == -1) {
|
||||
menuData.push(entity.id);
|
||||
if (entity.id === "b05b562950cb6d0aef539fad30b7386a") {
|
||||
list.push({
|
||||
label: "国家/地区清单",
|
||||
name: "listOfCountries"
|
||||
});
|
||||
continue;
|
||||
} else if (entity.id === "63e05705d0c8013162caa34f9fe52865") {
|
||||
list.push({
|
||||
label: "项目类清单",
|
||||
name: "listProject"
|
||||
});
|
||||
continue;
|
||||
} else if (entity.id === "418123d180abf67bd2c46d5a694baaa5") {
|
||||
list.push({
|
||||
label: "重点标准跟踪清单",
|
||||
name: "listTracking"
|
||||
});
|
||||
continue;
|
||||
} else if (entity.id === "5a75523729b04102a565167004d640e9") {
|
||||
list.push({
|
||||
label: "其他清单",
|
||||
name: "listOther"
|
||||
});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
})
|
||||
this.list = list
|
||||
this.tabValue = this.list[0].name
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
const toName = ['ListOfStandardsAndRegulationsDetails', 'Details', 'ProjectAddEit', 'OtherAddEit']
|
||||
// 离开此页面之前,记录tabName以便返回使用,如果将要访问的页面不是这两个,则清空tabName
|
||||
if (toName.includes(to.name)) {
|
||||
this.$store.commit('SET_ACCESS_STANDARD_REG_TABS', this.tabValue)
|
||||
} else {
|
||||
this.$store.commit('SET_ACCESS_STANDARD_REG_TABS')
|
||||
}
|
||||
setTimeout(() => {
|
||||
next()
|
||||
}, 100)
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
if (vm.$store.state.accessStandRegTabName !== '') {
|
||||
vm.tabValue = vm.$store.state.accessStandRegTabName
|
||||
}
|
||||
})
|
||||
});
|
||||
this.list = list;
|
||||
this.tabValue = this.list[0].name;
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
const toName = ["ListOfStandardsAndRegulationsDetails", "Details", "ProjectAddEit", "OtherAddEit"];
|
||||
// 离开此页面之前,记录tabName以便返回使用,如果将要访问的页面不是这两个,则清空tabName
|
||||
if (toName.includes(to.name)) {
|
||||
this.$store.commit("SET_ACCESS_STANDARD_REG_TABS", this.tabValue);
|
||||
} else {
|
||||
this.$store.commit("SET_ACCESS_STANDARD_REG_TABS");
|
||||
}
|
||||
};
|
||||
setTimeout(() => {
|
||||
next();
|
||||
}, 100);
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
if (vm.$store.state.accessStandRegTabName !== "") {
|
||||
vm.tabValue = vm.$store.state.accessStandRegTabName;
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
@import '~@/assets/styles/style';
|
||||
@import '~@/assets/styles/mixins';
|
||||
|
||||
#accessStandardsAndRegulations {
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
background: #fff;
|
||||
#accessStandardsAndRegulations {
|
||||
height: 100%;
|
||||
padding: 0 10px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
/deep/ .el-tabs {
|
||||
flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
/deep/ .el-tabs {
|
||||
/deep/ .el-tabs__header {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
height: 100% !important;
|
||||
flex: auto;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
/deep/ .el-tabs__header {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.el-tabs__content {
|
||||
height: 100% !important;
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
flex: auto;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
flex: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user