|
@@ -124,9 +124,13 @@
|
|
<el-scrollbar>
|
|
<el-scrollbar>
|
|
<div style="display: flex">
|
|
<div style="display: flex">
|
|
<div
|
|
<div
|
|
- v-for="(item, index) in stepComponents"
|
|
|
|
|
|
+ v-for="(item, index) in defaultComponents"
|
|
:key="index"
|
|
:key="index"
|
|
- class="scrollbar-demo-item"
|
|
|
|
|
|
+ :class="
|
|
|
|
+ componentsDisabled
|
|
|
|
+ ? 'scrollbar-demo-item disabled'
|
|
|
|
+ : 'scrollbar-demo-item'
|
|
|
|
+ "
|
|
>
|
|
>
|
|
<router-link :to="{ name: item.name }" replace>
|
|
<router-link :to="{ name: item.name }" replace>
|
|
<div
|
|
<div
|
|
@@ -427,7 +431,8 @@ const defaultComponents = [
|
|
},
|
|
},
|
|
];
|
|
];
|
|
//当前路由在setpComponents中的index
|
|
//当前路由在setpComponents中的index
|
|
-const selectIndex = ref(0);
|
|
|
|
|
|
+const selectIndex = ref(null);
|
|
|
|
+const componentsDisabled = ref(true);
|
|
|
|
|
|
//配置data固定路由参数等
|
|
//配置data固定路由参数等
|
|
const setStepComponents = (data) => {
|
|
const setStepComponents = (data) => {
|
|
@@ -459,7 +464,9 @@ const getOpCompentArray = async () => {
|
|
};
|
|
};
|
|
//设置标签是否被选中
|
|
//设置标签是否被选中
|
|
const setSelectIndex = (index) => {
|
|
const setSelectIndex = (index) => {
|
|
- selectIndex.value = index;
|
|
|
|
|
|
+ if (componentsDisabled.value != true) {
|
|
|
|
+ selectIndex.value = index;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
const init = async (index) => {
|
|
const init = async (index) => {
|
|
if (taskIndex.value == null) {
|
|
if (taskIndex.value == null) {
|
|
@@ -492,9 +499,20 @@ onActivated(async () => {
|
|
//缓存组件数据逻辑
|
|
//缓存组件数据逻辑
|
|
init(selectStepIndex.value);
|
|
init(selectStepIndex.value);
|
|
});
|
|
});
|
|
|
|
+watch(
|
|
|
|
+ () => taskIndex.value,
|
|
|
|
+ (val) => {
|
|
|
|
+ if (val != null) {
|
|
|
|
+ componentsDisabled.value = false;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+);
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.disabled {
|
|
|
|
+ opacity: 0.6 !important;
|
|
|
|
+}
|
|
:deep(.el-input__wrapper) {
|
|
:deep(.el-input__wrapper) {
|
|
background-color: #000;
|
|
background-color: #000;
|
|
}
|
|
}
|