From 3aedad63dd01f1fc5154cb520af32edab967d6e0 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周一, 12 5月 2025 09:15:26 +0800
Subject: [PATCH] Merge branch 'master' of http://222.71.245.114:9086/r/HIA24016N_PipeLineDemo
---
PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/OrderManagement.vue | 145 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 145 insertions(+), 0 deletions(-)
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/OrderManagement.vue b/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/OrderManagement.vue
new file mode 100644
index 0000000..a3fde43
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/OrderManagement.vue
@@ -0,0 +1,145 @@
+<template>
+ <div class="OrderManagement">
+ <Tab :data="headOptions" type="list" @Tab="changeTabFn" />
+ </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref, markRaw, shallowRef, computed } from 'vue'
+import head from 'lodash/head'
+import sdk from 'sdk'
+const { models } = sdk
+const { CanvasNode } = models
+import OrderManagement from './views/order-management/index.vue'
+import OrderRecords from './views/order-records/index.vue'
+import { createProvider } from './hooks/use-permission'
+import Tab from '@/components/Tab/Tab'
+import { useEditionFeature } from '@/libs/Permission/Permission'
+import { _t } from './app'
+
+export default defineComponent({
+ name: '宸ュ簭绠$悊',
+ components: {
+ OrderManagement,
+ OrderRecords,
+ Tab,
+ },
+ props: {
+ node: CanvasNode,
+ },
+ setup(props) {
+ useEditionFeature()
+ const changeTabFn = (type: any) => {
+ changeTab(type)
+ }
+
+ const { permissionCodes, showTabs, initPermission, changeTab } =
+ createProvider(props)
+ initPermission()
+ const headOptions = shallowRef([
+ {
+ label: '宸ュ崟绠$悊',
+ name: 'OrderManagement',
+ component: markRaw(OrderManagement),
+ },
+ {
+ label: '宸ュ崟璁板綍',
+ name: 'OrderRecords',
+ component: markRaw(OrderRecords),
+ },
+ ])
+
+ const headActive = ref(head(headOptions.value)?.name)
+
+ const headMap = headOptions.value.reduce((acc, item) => {
+ // @ts-ignore
+ acc[item.name] = item.component
+ return acc
+ }, {})
+ // @ts-ignore
+ const activeComponent = computed(() => headMap[headActive.value])
+
+ // @ts-ignore
+ const removeComponentsFromHeadOptions = (showTabs, headOptions) => {
+ // @ts-ignore
+ return headOptions.filter((option) => {
+ if (option.name === 'OrderManagement')
+ return showTabs.includes('Order-tabs-management')
+ else if (option.name === 'OrderRecords')
+ return showTabs.includes('Order-tabs-records')
+ else return false
+ })
+ }
+
+ headOptions.value = removeComponentsFromHeadOptions(
+ showTabs.value,
+ headOptions.value
+ )
+
+ return {
+ headOptions,
+ headActive,
+ activeComponent,
+ permissionCodes,
+ showTabs,
+ changeTabFn,
+ }
+ },
+})
+</script>
+<style lang="scss" scoped>
+$borderRadius: 4px;
+
+.OrderManagement {
+ background-color: #fff;
+ border-radius: 5px 5px 0 0;
+ width: 100%;
+ height: 100%;
+ border: 1px solid #dbdbdb;
+}
+
+.head {
+ width: 100%;
+ height: 46px;
+ display: flex;
+ align-items: center;
+ padding: 0 16px;
+ background-color: #e8e8e8;
+
+ &-item {
+ width: 128px;
+ height: 34px;
+ box-sizing: border-box;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: #666666;
+ cursor: pointer;
+ transition: all 0.3s;
+ font-size: 16px;
+ }
+
+ &-active {
+ color: #5a84ff;
+ background-color: #fff;
+ border: 1px solid #cfcfcf;
+ border-radius: 4px;
+ transition: all 0.3s;
+ }
+}
+
+.container-box {
+ height: auto;
+ box-sizing: border-box;
+ padding: 20px;
+ overflow-y: scroll;
+ background-color: #fff;
+}
+
+.permission-btn {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+}
+</style>
--
Gitblit v1.9.3