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/components/VariableInput/index.vue | 121 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 121 insertions(+), 0 deletions(-)
diff --git a/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/components/VariableInput/index.vue b/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/components/VariableInput/index.vue
new file mode 100644
index 0000000..8a58d9e
--- /dev/null
+++ b/PipeLineLems/pipelinelems_web/src/widgets/OrderManagement-main/components/VariableInput/index.vue
@@ -0,0 +1,121 @@
+<template>
+ <div class="variable">
+ <div class="variable--title" :style="{ width: width }" v-show="title">
+ {{ title }}
+ </div>
+ <el-input :model-value="modelValue" v-bind="combineAttrs($attrs, $props)">
+ <template #append>
+ <div class="variable__icon" @click="handleButtonClick">
+ <img
+ src="@/assets/images/variable.png"
+ style="width: 25px; height: 15px"
+ alt=""
+ />
+ </div>
+ </template>
+ </el-input>
+ </div>
+</template>
+
+<script lang="ts">
+import { defineComponent } from 'vue'
+import { omit } from 'lodash'
+import sdk from 'sdk'
+const { utils } = sdk
+const { openVariableDialog } = utils
+
+export default defineComponent({
+ name: 'VariableInput',
+ props: {
+ title: {
+ type: String,
+ default: '',
+ },
+ UUID: {
+ type: String,
+ default: '',
+ },
+ modelValue: {
+ type: String,
+ default: '',
+ },
+ config: {
+ type: Object,
+ default: () => ({}),
+ },
+ width: {
+ type: String,
+ default: '80px',
+ },
+ },
+ setup(props) {
+ // const { variableList } = createInjector()
+
+ const handleButtonClick = async () => {
+ // 澶勭悊鎸夐挳鐐瑰嚮浜嬩欢
+ const data = await openVariableDialog({
+ isMultiple: false,
+ })
+ const params = {
+ ...data,
+ value: data.name,
+ }
+ }
+
+ const combineAttrs = (
+ attrs: Record<string, unknown>,
+ props: Record<string, unknown>,
+ omitPropNames: Array<string> = []
+ ) => {
+ const newObject = { ...attrs, ...props }
+ return omit(newObject, omitPropNames)
+ }
+
+ return {
+ combineAttrs,
+ handleButtonClick,
+ }
+ },
+})
+</script>
+<style lang="scss" scoped>
+.variable {
+ display: inline-flex;
+ align-items: center;
+
+ &--title {
+ font-size: 14px;
+ font-weight: bold;
+ width: 80px;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ }
+
+ &__icon {
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 10px 0;
+ margin-right: 8px;
+ }
+
+ :deep .cs-input__inner {
+ height: 30px;
+ }
+
+ :deep(.cs-input__wrapper) {
+ border: 1px solid var(--el-border-color);
+ border-right: none;
+ box-shadow: none;
+ }
+
+ :deep(.cs-input-group__append) {
+ box-shadow: none;
+ border: 1px solid var(--el-border-color);
+ border-left: none;
+ background-color: #fff;
+ }
+}
+</style>
--
Gitblit v1.9.3