zhengyiming
9 天以前 1ba3a11308cf59c513d70fbc3608961f19a02621
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<template>
  <ProDialog title="配置保险产品" v-model="innerVisible" destroy-on-close width="900px">
    <el-scrollbar max-height="400px">
      <el-collapse
        v-model="activeNames"
        @change="handleChange"
        class="configure-insure-product-dialog-collapse"
      >
        <el-collapse-item title="已授权产品" name="Authorized">
          <div class="configure-insure-product-wrapper">
            <div class="configure-insure-product-left">
              <div class="configure-insure-product-item">
                {{ '雇主安心保8020-5人款' }}
                <el-button type="primary" link @click="handleShow()">{{ `共${2}方案` }}</el-button>
              </div>
              <div class="configure-insure-product-scheme">
                <TextOverTooltip
                  >雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款雇主安心保8020-5人款</TextOverTooltip
                >
              </div>
            </div>
            <div class="configure-insure-product-right">
              <el-switch v-model="value3" inline-prompt active-text="开" inactive-text="关" />
            </div>
          </div>
        </el-collapse-item>
        <el-collapse-item title="未授权产品" name="Unauthorized"></el-collapse-item>
      </el-collapse>
    </el-scrollbar>
 
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="emit('onCancel')">取 消</el-button>
        <el-button type="primary" @click="handleConfirm">确 定</el-button>
      </span>
    </template>
  </ProDialog>
</template>
 
<script setup lang="ts">
import { ProDialog, TextOverTooltip } from '@bole-core/components';
import { FormInstance } from 'element-plus';
 
defineOptions({
  name: 'ConfigureInsureProductDialog',
});
 
type Props = {
  modelValue: boolean;
};
 
const props = withDefaults(defineProps<Props>(), {
  modelValue: false,
});
 
const emit = defineEmits<{
  (e: 'update:modelValue', value: boolean): void;
  (e: 'onCancel'): void;
  (e: 'onSelect', value: API.HelpQuestionDto[]): void;
}>();
 
const innerVisible = computed({
  get() {
    return props.modelValue;
  },
  set(val) {
    emit('update:modelValue', val);
  },
});
 
const activeNames = ref();
const value3 = ref(true);
 
function handleChange(val: string[]) {}
function handleShow() {}
 
const formRef = ref<FormInstance>();
function handleConfirm() {
  if (!formRef.value) return;
  formRef.value.validate((valid) => {
    if (valid) {
      //   handleCreateOrUpdate();
    } else {
      return;
    }
  });
}
</script>
 
<style lang="scss" scoped>
@use '@/style/common.scss' as *;
 
.configure-insure-product-dialog-collapse {
  --bole-pro-form-input-height: 20px;
 
  :deep() {
    .el-collapse-item__header {
      font-size: 14px;
      font-weight: bold;
 
      &::before {
        margin-right: 8px;
        width: 2px;
        height: 14px;
        background-color: getCssVar('color', 'primary');
        content: '';
      }
    }
  }
 
  .configure-insure-product-wrapper {
    display: flex;
    justify-content: space-between;
 
    .configure-insure-product-left {
      display: flex;
      flex: 1;
      min-width: 0;
      flex-direction: column;
    }
  }
 
  .configure-insure-product-item {
    display: flex;
    align-items: center;
  }
 
  .configure-insure-product-scheme {
    margin-top: 15px;
    padding: 10px 8px;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    line-height: 20px;
  }
}
</style>
<style lang="scss">
.text-over-tooltip-content {
  max-width: 600px;
}
</style>