提交 7afc9c57 authored 作者: lihuihui's avatar lihuihui

update

上级 287f44d7
......@@ -138,7 +138,8 @@ defineExpose({ refetch, tableRef })
clearable
@change="search"
style="width: 200px"
v-if="item.type === 'input'" />
v-if="item.type === 'input'"
/>
<!-- select -->
<el-select
v-model="params[item.prop]"
......@@ -146,12 +147,14 @@ defineExpose({ refetch, tableRef })
filterable
clearable
@change="search"
v-if="item.type === 'select'">
v-if="item.type === 'select'"
>
<el-option
v-for="(option, index) in item.options"
:label="option[item.labelKey] || option.label || option"
:value="option[item.valueKey] || option.value || option"
:key="index" />
:key="index"
/>
</el-select>
</template>
</el-form-item>
......@@ -170,12 +173,12 @@ defineExpose({ refetch, tableRef })
<div class="table-list-bd">
<slot name="body" v-bind="{ data: dataList }">
<el-table
stripe
:header-cell-style="{ background: '#ededed' }"
:data="dataList"
v-loading="loading"
v-bind="$attrs"
ref="tableRef">
ref="tableRef"
>
<el-table-column align="center" v-bind="item || {}" v-for="item in columns" :key="item.prop">
<template #default="scope" v-if="item.slots || item.computed">
<slot :name="item.slots" v-bind="scope" v-if="item.slots"></slot>
......@@ -201,7 +204,8 @@ defineExpose({ refetch, tableRef })
@size-change="pageSizeChange"
@current-change="fetchList()"
:hide-on-single-page="true"
v-if="hasPagination">
v-if="hasPagination"
>
</el-pagination>
</div>
</div>
......
......@@ -22,7 +22,7 @@ const form = $ref(
props.data || {
name: '',
content: '',
status: ''
status: '1'
}
)
......
<script setup lang="ts">
import { Delete, Edit } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import Icon from '../components/Icon.vue'
import Icon from '@/components/ConnectionIcon.vue'
import { deleteConnection } from '../api'
const props = defineProps<{ data: { id: string; type_name: string; type: string } }>()
......@@ -39,9 +39,9 @@ const edit = function () {
</div>
<div @click="routerView" style="display: flex; width: 100%; flex-direction: column; align-items: center">
<div class="connect-item__icon">
<Icon class="svg" :name="data?.type"></Icon>
<Icon w="40" h="40" :multicolour="true" class="svg" :name="data?.type"></Icon>
</div>
<p>{{ data?.type_name }}</p>
<p style="font-size: 18px;margin-top: 8px;">{{ data?.type_name }}</p>
</div>
</div>
</template>
......
<script setup lang="ts">
import type { IconProp } from '../types'
import Icon from '../components/Icon.vue'
import Icon from '@/components/ConnectionIcon.vue'
// icon
const iconItems = $ref<IconProp[]>([
......@@ -37,7 +37,7 @@ defineExpose({ getData })
<div class="connect-from_icon__box">
<div v-for="item in iconItems" :key="item.name" :class="item.checkbox ? 'mr20-mt20 active' : 'mr20-mt20'">
<div @click="handleIcon(item)" class="connect-form_icon">
<Icon class="svg" :name="item.name"></Icon>
<Icon :multicolour="item.checkbox" class="svg" :name="item.name"></Icon>
</div>
<div class="name">{{ item.label }}</div>
</div>
......@@ -57,8 +57,7 @@ defineExpose({ getData })
color: #ba143e;
}
.connect-form_icon {
box-shadow: 0 0 10px rgb(186, 20, 62, 0.5);
border: 1px solid #ba143e;
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.2);
}
}
}
......@@ -70,14 +69,11 @@ defineExpose({ getData })
width: 70px;
height: 70px;
border-radius: 50%;
border: 1px solid #000;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
&:hover {
box-shadow: 0 0 10px rgb(0 0 0 / 50%);
}
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.2);
}
}
</style>
<script setup lang="ts">
import Icon from '../components/Icon.vue'
import Icon from '@/components/ConnectionIcon.vue'
import { ElMessageBox } from 'element-plus'
import { getConnectionDetails } from '../api'
......@@ -452,7 +452,7 @@ const abilityItem = computed(() => {
<AppCard title="查看链接">
<div class="view-info">
<div class="view-info_icon">
<Icon :name="dataDetail?.type || '0'" w="50" h="50"></Icon>
<Icon :multicolour="true" :name="dataDetail?.type || '0'" w="50" h="50"></Icon>
</div>
<div class="view-info_content">
<p>链接名称:{{ dataDetail?.type_name }}</p>
......@@ -479,10 +479,11 @@ const abilityItem = computed(() => {
width: 100px;
height: 100px;
border-radius: 50%;
border: 1px solid #000;
// border: 1px solid #000;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.2);
}
.view-info_content {
margin-left: 20px;
......
......@@ -8,23 +8,31 @@ defineProps<Props>()
<template>
<el-dialog title="查看事件属性" :close-on-click-modal="false" width="600px">
<el-form label-suffix=":" label-width="120px">
<el-form-item label="事件ID">
{{ data.id }}
</el-form-item>
<el-form-item label="事件英文名称">
{{ data.english_name }}
</el-form-item>
<el-form-item label="事件名称">
{{ data.name }}
</el-form-item>
<el-form-item label="所属连接">
{{ data.connection_name }}
</el-form-item>
<el-form-item label="状态">
{{ data.status_name }}
</el-form-item>
</el-form>
<div style="display: flex; justify-content: center">
<el-form label-suffix=":" label-width="120px">
<el-form-item label="事件ID">
{{ data.id }}
</el-form-item>
<el-form-item label="事件英文名称">
{{ data.english_name }}
</el-form-item>
<el-form-item label="事件名称">
{{ data.name }}
</el-form-item>
<el-form-item label="所属连接">
{{ data.connection_name }}
</el-form-item>
<el-form-item label="状态">
{{ data.status_name }}
</el-form-item>
<el-form-item label="更新人">
{{ data.updated_operator_name }}
</el-form-item>
<el-form-item label="更新时间">
{{ data.updated_time }}
</el-form-item>
</el-form>
</div>
<template #footer>
<el-row justify="center">
<el-button round auto-insert-space @click="$emit('update:modelValue', false)">关闭</el-button>
......
......@@ -6,6 +6,8 @@ export interface EventProp {
status: string
connection_name: string
status_name: string
updated_operator_name: string
updated_time: string
}
export interface ConnectionOptionProp { type_name: string; id: string }
......
......@@ -8,26 +8,34 @@ defineProps<Props>()
<template>
<el-dialog title="查看用户属性" :close-on-click-modal="false" width="600px">
<el-form label-suffix=":" label-width="110px">
<el-form-item label="属性ID">
{{ data.id }}
</el-form-item>
<el-form-item label="属性英文名称">
{{ data.english_name }}
</el-form-item>
<el-form-item label="属性名称">
{{ data.name }}
</el-form-item>
<el-form-item label="属性字段类型">
{{ data.type_name }}
</el-form-item>
<el-form-item label="属性字段格式">
{{ data.format }}
</el-form-item>
<el-form-item label="状态">
{{ data.status_name }}
</el-form-item>
</el-form>
<div style="display: flex; justify-content: center">
<el-form label-suffix=":" label-width="110px">
<el-form-item label="属性ID">
{{ data.id }}
</el-form-item>
<el-form-item label="属性英文名称">
{{ data.english_name }}
</el-form-item>
<el-form-item label="属性名称">
{{ data.name }}
</el-form-item>
<el-form-item label="属性字段类型">
{{ data.type_name }}
</el-form-item>
<el-form-item label="属性字段格式">
{{ data.format }}
</el-form-item>
<el-form-item label="状态">
{{ data.status_name }}
</el-form-item>
<el-form-item label="更新人">
{{ data.updated_operator_name }}
</el-form-item>
<el-form-item label="更新时间">
{{ data.updated_time }}
</el-form-item>
</el-form>
</div>
<template #footer>
<el-row justify="center">
<el-button round auto-insert-space @click="$emit('update:modelValue', false)">关闭</el-button>
......
......@@ -7,4 +7,6 @@ export interface UserProp {
status: string
type_name: string
status_name: string
updated_operator_name: string
updated_time: string
}
......@@ -49,8 +49,8 @@ const listOptions = computed(() => {
prop: 'status_name',
computed: (row: any) => {
return row.row.status === '0'
? `<span style="color: #00ac27">${row.row.status_name}</span>`
: `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>`
? `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>`
: `<span style="color: #00ac27">${row.row.status_name}</span>`
}
},
{ label: '更新人', prop: 'updated_operator_name' },
......
......@@ -26,10 +26,11 @@ const getConnectionsList = function () {
let fieldsList = $ref<MemberFieldsProp[]>([])
const getFieldsList = function () {
getMemberFieldsList().then((res: { data: MemberFieldsProp[] }) => {
fieldsList = res.data.map(item => {
console.log(res, 'res', props.data?.fields)
fieldsList = res.data.map((item: any) => {
item.value = ''
if (props.data) {
item.value = JSON.parse(props.data?.fields)[item.id]
item.value = props.data?.fields[item.id]
}
return item
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论