|
@@ -17,21 +17,24 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<div class="left">
|
|
|
+ <!-- <SPuUploadImg v-model="initialData.picUrl" :disabled="isDetail" /> -->
|
|
|
<el-tabs v-model="activeTabName" @tab-click="handleTabClick" tab-position="left">
|
|
|
<el-tab-pane v-for="tab in tabs" :key="tab.name" :label="tab.label" :name="tab.component" />
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <component :is="CurrentComponent" :id="OperationsId" :isDetail="isDetail" :openType="openType" />
|
|
|
+ <component :is="CurrentComponent" :id="OperationsId" :isDetail="isDetail" :openType="openType" :propFormData="initialData" />
|
|
|
</div>
|
|
|
<div style="clear: both;"></div>
|
|
|
- <!-- <template #footer v-if="!isDetail">
|
|
|
- <div>
|
|
|
- <el-button v-for="button in buttons" :type="button.type" :key="button.action" @click="buttonClick(button.action)">
|
|
|
- {{ button.label }}
|
|
|
- </el-button>
|
|
|
+ <template #footer v-if="!isDetail && !mobile">
|
|
|
+ <div class="footer">
|
|
|
+ <div v-for="(button, index) in buttonActions" :key="index">
|
|
|
+ <el-button :type="button.type" v-if="openType == '编辑' || (openType == '新增' && button.isAdd)" @click="button.action">
|
|
|
+ {{ button.name }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </template> -->
|
|
|
+ </template>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
@@ -51,16 +54,19 @@ const props = defineProps({
|
|
|
initialComponent: String,
|
|
|
id: Number,
|
|
|
dialogTitle: String,
|
|
|
- buttons: Array,
|
|
|
isDetail: Boolean,
|
|
|
- openType:String
|
|
|
+ openType:String,
|
|
|
+ initialData: Object,
|
|
|
+ buttonActions: Array,
|
|
|
});
|
|
|
|
|
|
-const emit = defineEmits(['onButtonClick']);
|
|
|
+console.log("子组件",props)
|
|
|
+
|
|
|
+// 从路由中引入store中的app仓库
|
|
|
+import { useAppStore } from '@/store/modules/app'
|
|
|
+const appStore = useAppStore()
|
|
|
+const mobile = computed(() => appStore.getMobile)
|
|
|
|
|
|
-function buttonClick(action) {
|
|
|
- emit('onButtonClick', action);
|
|
|
-}
|
|
|
|
|
|
let OperationsId = ref(props.id);
|
|
|
const dialogVisible = ref(false);
|
|
@@ -161,7 +167,8 @@ defineExpose({ dialogVisible });
|
|
|
float: left;
|
|
|
width: calc(100% - 120px);
|
|
|
padding-left: 10px;
|
|
|
- max-height:700px;
|
|
|
+ max-height:600px;
|
|
|
+ min-height:600px;
|
|
|
overflow:auto;
|
|
|
position: relative;
|
|
|
}
|
|
@@ -200,4 +207,11 @@ defineExpose({ dialogVisible });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.footer{
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ div{
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|