提交 547caa43 authored 作者: 陈志磊's avatar 陈志磊

修改bug

上级 e03690f3
......@@ -66,6 +66,26 @@ function handleUpdate() {
emit('update:modelValue', false)
})
}
const changeFormatType = function (row: any) {
switch (row.type) {
case '1':
row.format = '25'
break
case '2':
row.format = '4'
break
case '3':
row.format = '2'
break
case '4':
row.format = 'yyyy-mm-dd'
break
case '5':
row.format = 'yyyy-mm-dd hh:mm:ss'
break
}
}
</script>
<template>
......@@ -105,7 +125,12 @@ function handleUpdate() {
</el-table-column>
<el-table-column label="字段类型">
<template #default="scope">
<el-select :disabled="scope.row.id !== ''" v-model="scope.row.type" placeholder="请选择">
<el-select
@change="changeFormatType(scope.row)"
:disabled="scope.row.id !== ''"
v-model="scope.row.type"
placeholder="请选择"
>
<el-option
:label="item.label"
:value="item.value"
......
......@@ -74,6 +74,26 @@ const experimentAttributeOptions = $ref(store.getMapValuesByKey('experiment_attr
const formatPlaceholder = computed(() => {
return form.type === '1' ? '请输入字符串长度' : form.type === '3' ? '请输入小数点后位数' : '请输入长度'
})
const changeFormatType = function () {
switch (form.type) {
case '1':
form.format = '25'
break
case '2':
form.format = '4'
break
case '3':
form.format = '2'
break
case '4':
form.format = 'yyyy-mm-dd'
break
case '5':
form.format = 'yyyy-mm-dd hh:mm:ss'
break
}
}
</script>
<template>
......@@ -91,7 +111,7 @@ const formatPlaceholder = computed(() => {
<el-form-item label="属性字段类型" prop="type">
<el-select
:disabled="isUpdate"
@change="form.format = ''"
@change="changeFormatType"
v-model="form.type"
style="width: 100%"
placeholder="请选择"
......
......@@ -56,7 +56,7 @@ const getDate = function (date: string) {
<div class="line"></div>
</div>
<div style="display: flex; justify-content: space-around; width: 100%">
<el-form label-suffix=":" label-width="110px">
<el-form label-suffix=":" label-width="auto">
<el-form-item label="来源链接"
><span>{{ data?.connection_name }}</span></el-form-item
>
......@@ -91,7 +91,7 @@ const getDate = function (date: string) {
<div class="card-box">
<AppCard class="card" title="用户属性">
<div style="display: flex; justify-content: center; padding-right: 20px">
<el-form label-suffix=":" label-width="110px">
<el-form label-suffix=":" label-width="auto">
<el-form-item label="链接来源">{{ data?.connection_name }}</el-form-item>
<el-form-item label="姓名">{{ data?.name }}</el-form-item>
<el-form-item label="状态">{{ data?.status_name }}</el-form-item>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论