提交 5b3d7288 authored 作者: 王鹏飞's avatar 王鹏飞

bump deps

上级 679b78fa
差异被折叠。
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"cert": "node ./cert.js" "cert": "node ./cert.js"
}, },
"dependencies": { "dependencies": {
"@element-plus/icons-vue": "^2.1.0", "@element-plus/icons-vue": "^2.3.1",
"@fortaine/fetch-event-source": "^3.0.6", "@fortaine/fetch-event-source": "^3.0.6",
"@tinymce/tinymce-vue": "^5.0.1", "@tinymce/tinymce-vue": "^5.0.1",
"@vue-flow/controls": "^1.0.4", "@vue-flow/controls": "^1.0.4",
...@@ -26,30 +26,32 @@ ...@@ -26,30 +26,32 @@
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"echarts": "^5.4.3", "echarts": "^5.4.3",
"echarts-wordcloud": "^2.1.0", "echarts-wordcloud": "^2.1.0",
"element-plus": "^2.3.14", "element-plus": "^2.7.0",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"nanoid": "^4.0.2", "nanoid": "^4.0.2",
"pinia": "^2.1.6", "pinia": "^2.1.6",
"vue": "^3.3.4", "vue": "^3.4.23",
"vue-echarts": "^6.6.1", "vue-echarts": "^6.6.1",
"vue-router": "^4.2.4", "vue-router": "^4.3.1",
"xss": "^1.0.15" "xss": "^1.0.15"
}, },
"devDependencies": { "devDependencies": {
"@rushstack/eslint-patch": "^1.2.0", "@rushstack/eslint-patch": "^1.2.0",
"@tsconfig/node20": "^20.1.4",
"@types/blueimp-md5": "^2.18.0", "@types/blueimp-md5": "^2.18.0",
"@types/node": "^20.3.1", "@types/node": "^20.3.1",
"@vitejs/plugin-vue": "^4.6.2", "@vitejs/plugin-vue": "^4.6.2",
"@vue-macros/reactivity-transform": "^0.4.4",
"@vue/eslint-config-typescript": "^12.0.0", "@vue/eslint-config-typescript": "^12.0.0",
"@vue/tsconfig": "^0.1.3", "@vue/tsconfig": "^0.5.1",
"ali-oss": "^6.18.1", "ali-oss": "^6.18.1",
"chalk": "^5.2.0", "chalk": "^5.2.0",
"eslint": "^8.43.0", "eslint": "^8.43.0",
"eslint-plugin-vue": "^9.17.0", "eslint-plugin-vue": "^9.17.0",
"sass": "^1.67.0", "sass": "^1.67.0",
"typescript": "~4.9.5", "typescript": "~5.4.5",
"unplugin-auto-import": "^0.16.7", "unplugin-auto-import": "^0.16.7",
"vite": "^4.5.2", "vite": "^4.5.3",
"vue-tsc": "^1.8.11" "vue-tsc": "^1.8.27"
} }
} }
...@@ -14,3 +14,15 @@ ...@@ -14,3 +14,15 @@
// 如果只是按需导入,则可以忽略以下内容。 // 如果只是按需导入,则可以忽略以下内容。
// 如果你想导入所有样式: // 如果你想导入所有样式:
@use 'element-plus/theme-chalk/src/index.scss' as *; @use 'element-plus/theme-chalk/src/index.scss' as *;
.el-form--inline {
.el-form-item {
.el-input,
.el-cascader,
.el-select,
.el-date-editor,
.el-autocomplete {
width: 200px;
}
}
}
...@@ -23,12 +23,8 @@ const remoteMethod = (q: string) => { ...@@ -23,12 +23,8 @@ const remoteMethod = (q: string) => {
</script> </script>
<template> <template>
<el-select remote filterable value-key="id" :loading="loading" :remote-method="remoteMethod" style="width: 100%"> <el-select remote filterable value-key="id" :loading="loading" :remote-method="remoteMethod">
<el-option <el-option v-for="item in userList" :key="item.id" :label="item.realname || item.nickname || item.username" :value="item.id">
v-for="item in userList"
:key="item.id"
:label="item.realname || item.nickname || item.username"
:value="item.id">
<span>{{ item.realname || item.nickname || item.username }}</span> <span>{{ item.realname || item.nickname || item.username }}</span>
<template v-if="item.mobile"> <template v-if="item.mobile">
<el-divider direction="vertical" /> <el-divider direction="vertical" />
......
...@@ -132,29 +132,14 @@ defineExpose({ refetch, tableRef }) ...@@ -132,29 +132,14 @@ defineExpose({ refetch, tableRef })
</template> </template>
<template v-else> <template v-else>
<!-- input --> <!-- input -->
<el-input <el-input v-model="params[item.prop]" v-bind="item" clearable @change="search" v-if="item.type === 'input'" />
v-model="params[item.prop]"
v-bind="item"
clearable
@change="search"
style="width: 200px"
v-if="item.type === 'input'"
/>
<!-- select --> <!-- select -->
<el-select <el-select v-model="params[item.prop]" v-bind="item" filterable clearable @change="search" v-if="item.type === 'select'">
v-model="params[item.prop]"
v-bind="item"
filterable
clearable
@change="search"
v-if="item.type === 'select'"
>
<el-option <el-option
v-for="(option, index) in item.options" v-for="(option, index) in item.options"
:label="option[item.labelKey] || option.label || option" :label="option[item.labelKey] || option.label || option"
:value="option[item.valueKey] || option.value || option" :value="option[item.valueKey] || option.value || option"
:key="index" :key="index" />
/>
</el-select> </el-select>
</template> </template>
</el-form-item> </el-form-item>
...@@ -172,13 +157,7 @@ defineExpose({ refetch, tableRef }) ...@@ -172,13 +157,7 @@ defineExpose({ refetch, tableRef })
<!-- 主体 --> <!-- 主体 -->
<div class="table-list-bd"> <div class="table-list-bd">
<slot name="body" v-bind="{ data: dataList }"> <slot name="body" v-bind="{ data: dataList }">
<el-table <el-table :header-cell-style="{ background: '#ededed' }" :data="dataList" v-loading="loading" v-bind="$attrs" ref="tableRef">
:header-cell-style="{ background: '#ededed' }"
:data="dataList"
v-loading="loading"
v-bind="$attrs"
ref="tableRef"
>
<el-table-column align="center" v-bind="item || {}" v-for="item in columns" :key="item.prop"> <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"> <template #default="scope" v-if="item.slots || item.computed">
<slot :name="item.slots" v-bind="scope" v-if="item.slots"></slot> <slot :name="item.slots" v-bind="scope" v-if="item.slots"></slot>
...@@ -204,8 +183,7 @@ defineExpose({ refetch, tableRef }) ...@@ -204,8 +183,7 @@ defineExpose({ refetch, tableRef })
@size-change="pageSizeChange" @size-change="pageSizeChange"
@current-change="fetchList()" @current-change="fetchList()"
:hide-on-single-page="true" :hide-on-single-page="true"
v-if="hasPagination" v-if="hasPagination">
>
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
......
...@@ -84,7 +84,7 @@ const typeName = computed(() => { ...@@ -84,7 +84,7 @@ const typeName = computed(() => {
:title="props.data ? (props.data?.isView ? `查看${typeName}资料` : `编辑${typeName}资料`) : `新建${typeName}资料`" :title="props.data ? (props.data?.isView ? `查看${typeName}资料` : `编辑${typeName}资料`) : `新建${typeName}资料`"
:close-on-click-modal="false" :close-on-click-modal="false"
width="800px" width="800px"
@update:modelValue="$emit('update:modelValue')"> @update:modelValue="value => $emit('update:modelValue', value)">
<el-form <el-form
:disabled="props.data?.isView" :disabled="props.data?.isView"
ref="ruleFormRef" ref="ruleFormRef"
......
...@@ -52,7 +52,7 @@ const handleInputConfirm = () => { ...@@ -52,7 +52,7 @@ const handleInputConfirm = () => {
v-for="(rule, index) in rules" v-for="(rule, index) in rules"
size="large" size="large"
effect="light" effect="light"
:type="index !== activeIndex ? 'info' : ''" :type="index !== activeIndex ? 'info' : 'primary'"
:key="rule.level" :key="rule.level"
closable closable
:disable-transitions="false" :disable-transitions="false"
......
...@@ -35,7 +35,7 @@ async function handelSubmit() { ...@@ -35,7 +35,7 @@ async function handelSubmit() {
</script> </script>
<template> <template>
<el-dialog title="创建营销漏斗分析" width="600" @update:modelValue="$emit('update:modelValue')"> <el-dialog title="创建营销漏斗分析" width="600" @update:modelValue="value => $emit('update:modelValue', value)">
<el-button type="primary" @click="handleAdd">添加漏斗步数</el-button> <el-button type="primary" @click="handleAdd">添加漏斗步数</el-button>
<div class="rule-item" v-for="(item, index) in rules" :key="index"> <div class="rule-item" v-for="(item, index) in rules" :key="index">
<el-button type="primary">{{ index + 1 }}</el-button> <el-button type="primary">{{ index + 1 }}</el-button>
......
...@@ -54,16 +54,11 @@ const refetch = function () { ...@@ -54,16 +54,11 @@ const refetch = function () {
class="data-form" class="data-form"
title="数据生成进度" title="数据生成进度"
:close-on-click-modal="false" :close-on-click-modal="false"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="value => $emit('update:modelValue', value)">
>
<AppList v-bind="listOptions" ref="appList"> <AppList v-bind="listOptions" ref="appList">
<template #table-x="{ row }"> <template #table-x="{ row }">
<el-button type="primary" plain @click="refetch" v-permission="'v1-experiment-member-delete'" <el-button type="primary" plain @click="refetch" v-permission="'v1-experiment-member-delete'">刷新</el-button>
>刷新</el-button <el-button type="primary" plain @click="handleDelete(row)" v-permission="'v1-experiment-member-delete'">删除</el-button>
>
<el-button type="primary" plain @click="handleDelete(row)" v-permission="'v1-experiment-member-delete'"
>删除</el-button
>
</template></AppList </template></AppList
> >
</el-dialog> </el-dialog>
......
...@@ -116,18 +116,9 @@ const option = computed(() => { ...@@ -116,18 +116,9 @@ const option = computed(() => {
class="data-form" class="data-form"
title="自动生成用户事件数据" title="自动生成用户事件数据"
:close-on-click-modal="false" :close-on-click-modal="false"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="value => $emit('update:modelValue', value)">
>
<div class="button-flex"> <div class="button-flex">
<el-form <el-form :disabled="userStore.role?.id === 1" label-suffix=":" ref="ruleFormRef" :model="ruleForm" label-width="auto" class="demo-ruleForm" status-icon>
:disabled="userStore.role?.id === 1"
label-suffix=":"
ref="ruleFormRef"
:model="ruleForm"
label-width="auto"
class="demo-ruleForm"
status-icon
>
<el-form :model="ruleForm" label-suffix=":"> <el-form :model="ruleForm" label-suffix=":">
<el-form-item label="用户事件" :rules="rules" label-width="205"> <el-form-item label="用户事件" :rules="rules" label-width="205">
<el-select @change="eventChange" v-model="ruleForm.event_id" placeholder="请选择"> <el-select @change="eventChange" v-model="ruleForm.event_id" placeholder="请选择">
......
...@@ -215,7 +215,7 @@ async function handleSave() { ...@@ -215,7 +215,7 @@ async function handleSave() {
:title="props.data?.id ? '编辑连接' : '新建连接'" :title="props.data?.id ? '编辑连接' : '新建连接'"
:close-on-click-modal="false" :close-on-click-modal="false"
width="1050px" width="1050px"
@update:modelValue="$emit('update:modelValue')"> @update:modelValue="value => $emit('update:modelValue', value)">
<el-tabs v-model="stepActive" class="demo-tabs"> <el-tabs v-model="stepActive" class="demo-tabs">
<!-- 第一步 --> <!-- 第一步 -->
<el-tab-pane disabled lazy label="选择连接类型" :name="1" v-if="!props.data?.id"> <el-tab-pane disabled lazy label="选择连接类型" :name="1" v-if="!props.data?.id">
......
...@@ -99,8 +99,7 @@ const sendChat = function () { ...@@ -99,8 +99,7 @@ const sendChat = function () {
title="关注" title="关注"
:close-on-click-modal="false" :close-on-click-modal="false"
:style="`width: fit-content; ${step === 4 ? 'background-color: #f1f1f1;' : 'background-color: #fff;'}`" :style="`width: fit-content; ${step === 4 ? 'background-color: #f1f1f1;' : 'background-color: #fff;'}`"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="value => $emit('update:modelValue', value)">
>
<div class="step1" v-if="step === 1"> <div class="step1" v-if="step === 1">
<div class="connect-item__icon"> <div class="connect-item__icon">
<Icon w="60" h="60" :multiColor="true" class="svg" :name="props.data?.type || '1'"></Icon> <Icon w="60" h="60" :multiColor="true" class="svg" :name="props.data?.type || '1'"></Icon>
...@@ -111,19 +110,8 @@ const sendChat = function () { ...@@ -111,19 +110,8 @@ const sendChat = function () {
</div> </div>
</div> </div>
<div class="step2" v-if="step === 2"> <div class="step2" v-if="step === 2">
<el-form <el-form ref="ruleFormRef" style="width: 400px" :model="ruleForm" :rules="rules" label-width="auto" class="demo-ruleForm" status-icon center>
ref="ruleFormRef" <p style="color: #ccc; font-size: 12px; text-align: center; margin-bottom: 20px">注:填写信息保存之后,关注成功</p>
style="width: 400px"
:model="ruleForm"
:rules="rules"
label-width="auto"
class="demo-ruleForm"
status-icon
center
>
<p style="color: #ccc; font-size: 12px; text-align: center; margin-bottom: 20px">
注:填写信息保存之后,关注成功
</p>
<el-form-item label="性别" prop="gender"> <el-form-item label="性别" prop="gender">
<el-radio-group v-model="ruleForm.gender"> <el-radio-group v-model="ruleForm.gender">
<el-radio label="1"></el-radio> <el-radio label="1"></el-radio>
......
...@@ -23,7 +23,7 @@ function handleSubmit() { ...@@ -23,7 +23,7 @@ function handleSubmit() {
<div class="surveyKing-tips" @click="modelValue = true"> <div class="surveyKing-tips" @click="modelValue = true">
<el-icon><Lock /></el-icon> <el-icon><Lock /></el-icon>
</div> </div>
<el-dialog title="账号密码" width="500" v-model="modelValue" @update:modelValue="$emit('update:modelValue')"> <el-dialog title="账号密码" width="500" v-model="modelValue" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form labelWidth="140" labelSuffix=":"> <el-form labelWidth="140" labelSuffix=":">
<el-form-item label="账号">{{ account }} <el-button text type="primary" @click="handleCopy(account)">复制</el-button></el-form-item> <el-form-item label="账号">{{ account }} <el-button text type="primary" @click="handleCopy(account)">复制</el-button></el-form-item>
<el-form-item label="密码">{{ password }} <el-button text type="primary" @click="handleCopy(password)">复制</el-button></el-form-item> <el-form-item label="密码">{{ password }} <el-button text type="primary" @click="handleCopy(password)">复制</el-button></el-form-item>
......
...@@ -36,7 +36,7 @@ async function handleSubmit() { ...@@ -36,7 +36,7 @@ async function handleSubmit() {
</script> </script>
<template> <template>
<el-dialog title="字段映射" width="500" @update:modelValue="$emit('update:modelValue')"> <el-dialog title="字段映射" width="500" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form labelWidth="240" labelPosition="left"> <el-form labelWidth="240" labelPosition="left">
<el-form-item v-for="item in form" :key="item.survey_field_id" :label="item.title"> <el-form-item v-for="item in form" :key="item.survey_field_id" :label="item.title">
<el-select v-model="item.field_id" style="width: 220px"> <el-select v-model="item.field_id" style="width: 220px">
......
...@@ -84,18 +84,9 @@ const rules = [{ required: true }] ...@@ -84,18 +84,9 @@ const rules = [{ required: true }]
class="data-form" class="data-form"
title="自动生成用户数据" title="自动生成用户数据"
:close-on-click-modal="false" :close-on-click-modal="false"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="value => $emit('update:modelValue', value)">
>
<div class="button-flex"> <div class="button-flex">
<el-form <el-form :disabled="userStore.role?.id === 1" label-suffix=":" ref="ruleFormRef" :model="ruleForm" label-width="auto" class="demo-ruleForm" status-icon>
:disabled="userStore.role?.id === 1"
label-suffix=":"
ref="ruleFormRef"
:model="ruleForm"
label-width="auto"
class="demo-ruleForm"
status-icon
>
<el-form-item label="请输入需要生成的数据量" :rules="rules"> <el-form-item label="请输入需要生成的数据量" :rules="rules">
<el-radio-group v-model="ruleForm.size"> <el-radio-group v-model="ruleForm.size">
<el-radio :label="1000">1000</el-radio> <el-radio :label="1000">1000</el-radio>
...@@ -142,7 +133,7 @@ const rules = [{ required: true }] ...@@ -142,7 +133,7 @@ const rules = [{ required: true }]
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<OtherFields :data="props.data?.other_fields || []"></OtherFields> <OtherFields :data="props.data?.other_fields || []"></OtherFields>
<el-form :model="ruleForm"> <el-form :model="ruleForm">
<el-form-item style="justify-content: center"> <el-form-item style="justify-content: center">
<div style="justify-content: center; display: flex; width: 100%"> <div style="justify-content: center; display: flex; width: 100%">
<el-button @click="$emit('update:modelValue', false)">取消</el-button> <el-button @click="$emit('update:modelValue', false)">取消</el-button>
......
...@@ -56,7 +56,7 @@ function handleAdd() { ...@@ -56,7 +56,7 @@ function handleAdd() {
</script> </script>
<template> <template>
<el-dialog title="添加群组用户" width="800px" append-to-body @update:modelValue="$emit('update:modelValue')"> <el-dialog title="添加群组用户" width="800px" append-to-body @update:modelValue="value => $emit('update:modelValue', value)">
<el-form label-suffix=":" label-width="82px"> <el-form label-suffix=":" label-width="82px">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
...@@ -85,9 +85,7 @@ function handleAdd() { ...@@ -85,9 +85,7 @@ function handleAdd() {
<template #footer> <template #footer>
<el-row justify="center"> <el-row justify="center">
<el-button plain auto-insert-space @click="$emit('update:modelValue', false)">关闭</el-button> <el-button plain auto-insert-space @click="$emit('update:modelValue', false)">关闭</el-button>
<el-button type="primary" plain auto-insert-space @click="handleAdd" :disabled="!multipleSelection.length" <el-button type="primary" plain auto-insert-space @click="handleAdd" :disabled="!multipleSelection.length">添加</el-button>
>添加</el-button
>
</el-row> </el-row>
</template> </template>
</el-dialog> </el-dialog>
......
...@@ -153,7 +153,7 @@ async function handleUpdate() { ...@@ -153,7 +153,7 @@ async function handleUpdate() {
</script> </script>
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" width="800px" @update:modelValue="$emit('update:modelValue')"> <el-dialog :title="title" :close-on-click-modal="false" width="800px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="100px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="100px">
<el-form-item label="群组名称" prop="name"> <el-form-item label="群组名称" prop="name">
<el-input v-model="form.name" placeholder="请输入" /> <el-input v-model="form.name" placeholder="请输入" />
......
...@@ -99,7 +99,7 @@ function handleRefresh() { ...@@ -99,7 +99,7 @@ function handleRefresh() {
</script> </script>
<template> <template>
<el-dialog title="查看群组信息" width="800px" @update:modelValue="$emit('update:modelValue')"> <el-dialog title="查看群组信息" width="800px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form label-suffix=":" label-width="82px"> <el-form label-suffix=":" label-width="82px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
...@@ -149,14 +149,7 @@ function handleRefresh() { ...@@ -149,14 +149,7 @@ function handleRefresh() {
<dt>更新状态</dt> <dt>更新状态</dt>
<dd> <dd>
<span style="margin-right: 10px">{{ getNameByValue(detail.status.toString(), updateStatusList) }}</span> <span style="margin-right: 10px">{{ getNameByValue(detail.status.toString(), updateStatusList) }}</span>
<el-button <el-button type="primary" plain @click="handleUpdate" size="small" :disabled="['2', '4'].includes(detail.status.toString())">立即更新</el-button>
type="primary"
plain
@click="handleUpdate"
size="small"
:disabled="['2', '4'].includes(detail.status.toString())"
>立即更新</el-button
>
</dd> </dd>
</dl> </dl>
</template> </template>
...@@ -172,11 +165,7 @@ function handleRefresh() { ...@@ -172,11 +165,7 @@ function handleRefresh() {
<el-button plain auto-insert-space @click="$emit('update:modelValue', false)">关闭</el-button> <el-button plain auto-insert-space @click="$emit('update:modelValue', false)">关闭</el-button>
</el-row> </el-row>
</template> </template>
<BindMembers <BindMembers :data="data" v-model="selectMembersVisible" @update="handleRefresh" v-if="selectMembersVisible"></BindMembers>
:data="data"
v-model="selectMembersVisible"
@update="handleRefresh"
v-if="selectMembersVisible"></BindMembers>
</el-dialog> </el-dialog>
</template> </template>
......
...@@ -75,7 +75,7 @@ function handleUpdate() { ...@@ -75,7 +75,7 @@ function handleUpdate() {
</script> </script>
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="$emit('update:modelValue')"> <el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="100px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="100px">
<el-form-item label="标签名称" prop="name"> <el-form-item label="标签名称" prop="name">
<el-input v-model="form.name" placeholder="请输入" /> <el-input v-model="form.name" placeholder="请输入" />
......
...@@ -56,7 +56,7 @@ function handleUpdate() { ...@@ -56,7 +56,7 @@ function handleUpdate() {
</script> </script>
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="$emit('update:modelValue')"> <el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="100px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="100px">
<el-form-item label="目录名称" prop="name"> <el-form-item label="目录名称" prop="name">
<el-input v-model="form.name" placeholder="请输入" /> <el-input v-model="form.name" placeholder="请输入" />
......
...@@ -89,7 +89,7 @@ const changeFormatType = function (row: any) { ...@@ -89,7 +89,7 @@ const changeFormatType = function (row: any) {
</script> </script>
<template> <template>
<el-dialog title="事件属性" :close-on-click-modal="false" width="800px" @update:modelValue="$emit('update:modelValue')"> <el-dialog title="事件属性" :close-on-click-modal="false" width="800px" @update:modelValue="value => $emit('update:modelValue', value)">
<div style="display: flex; justify-content: space-around"> <div style="display: flex; justify-content: space-around">
<el-form label-width="120px"> <el-form label-width="120px">
<el-form-item label="事件英文名称:">{{ eventDetail?.english_name }}</el-form-item> <el-form-item label="事件英文名称:">{{ eventDetail?.english_name }}</el-form-item>
......
...@@ -64,7 +64,7 @@ function handleUpdate() { ...@@ -64,7 +64,7 @@ function handleUpdate() {
</script> </script>
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="$emit('update:modelValue')"> <el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="140px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="140px">
<el-form-item label="事件ID" prop="id" v-if="isUpdate"> <el-form-item label="事件ID" prop="id" v-if="isUpdate">
<span>{{ props.data?.id }}</span> <span>{{ props.data?.id }}</span>
......
...@@ -97,7 +97,7 @@ const changeFormatType = function () { ...@@ -97,7 +97,7 @@ const changeFormatType = function () {
</script> </script>
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="$emit('update:modelValue')"> <el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="122px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="122px">
<el-form-item label="属性ID" v-if="isUpdate"> <el-form-item label="属性ID" v-if="isUpdate">
{{ props.data?.id }} {{ props.data?.id }}
......
...@@ -20,9 +20,7 @@ const { connectionList } = useConnection() ...@@ -20,9 +20,7 @@ const { connectionList } = useConnection()
const multipleSelection = ref<string[]>([]) const multipleSelection = ref<string[]>([])
function toggleSelection(data: ConnectionType) { function toggleSelection(data: ConnectionType) {
multipleSelection.value.includes(data.id) multipleSelection.value.includes(data.id) ? multipleSelection.value.filter(id => id !== data.id) : multipleSelection.value.push(data.id)
? multipleSelection.value.filter(id => id !== data.id)
: multipleSelection.value.push(data.id)
} }
function isActive(data: ConnectionType) { function isActive(data: ConnectionType) {
...@@ -40,14 +38,9 @@ function handleSave() { ...@@ -40,14 +38,9 @@ function handleSave() {
</script> </script>
<template> <template>
<el-dialog title="配置连接" width="800px" append-to-body @update:modelValue="$emit('update:modelValue')"> <el-dialog title="配置连接" width="800px" append-to-body @update:modelValue="value => $emit('update:modelValue', value)">
<div class="connection-list"> <div class="connection-list">
<div <div class="connection-item" v-for="item in connectionList" :key="item.id" :class="{ 'is-active': isActive(item) }" @click="toggleSelection(item)">
class="connection-item"
v-for="item in connectionList"
:key="item.id"
:class="{ 'is-active': isActive(item) }"
@click="toggleSelection(item)">
<el-checkbox @change="toggleSelection(item)" :model-value="isActive(item)" /> <el-checkbox @change="toggleSelection(item)" :model-value="isActive(item)" />
<div class="connection-item__icon"><ConnectionIcon :name="item.type + ''" /></div> <div class="connection-item__icon"><ConnectionIcon :name="item.type + ''" /></div>
<p>{{ item.name }}</p> <p>{{ item.name }}</p>
......
...@@ -47,7 +47,7 @@ function handleSave() { ...@@ -47,7 +47,7 @@ function handleSave() {
</script> </script>
<template> <template>
<el-dialog title="配置连接" width="800px" append-to-body @update:modelValue="$emit('update:modelValue')"> <el-dialog title="配置连接" width="800px" append-to-body @update:modelValue="value => $emit('update:modelValue', value)">
<div class="connection-list"> <div class="connection-list">
<div class="connection-item" v-for="item in connectionList" :key="item.id" :class="{ 'is-active': isActive(item) }" @click="toggleSelection(item)"> <div class="connection-item" v-for="item in connectionList" :key="item.id" :class="{ 'is-active': isActive(item) }" @click="toggleSelection(item)">
<el-checkbox @change="toggleSelection(item)" :model-value="isActive(item)" /> <el-checkbox @change="toggleSelection(item)" :model-value="isActive(item)" />
......
...@@ -61,7 +61,7 @@ function handleUpdate() { ...@@ -61,7 +61,7 @@ function handleUpdate() {
</script> </script>
<template> <template>
<el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="$emit('update:modelValue')"> <el-dialog :title="title" :close-on-click-modal="false" width="600px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="170px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="170px">
<el-form-item label="模板名称" prop="name"> <el-form-item label="模板名称" prop="name">
<el-input v-model="form.name" placeholder="请输入" /> <el-input v-model="form.name" placeholder="请输入" />
...@@ -72,21 +72,10 @@ function handleUpdate() { ...@@ -72,21 +72,10 @@ function handleUpdate() {
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="旅程分值" prop="score"> <el-form-item label="旅程分值" prop="score">
<el-input-number <el-input-number v-model="form.score" step-strictly :min="0" :max="100" placeholder="请输入不超过100的整数数值" style="width: 100%"></el-input-number>
v-model="form.score"
step-strictly
:min="0"
:max="100"
placeholder="请输入不超过100的整数数值"
style="width: 100%"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="是否允许学生查看解析" prop="is_view_answer"> <el-form-item label="是否允许学生查看解析" prop="is_view_answer">
<el-switch <el-switch v-model="form.is_view_answer" active-text="允许" active-value="1" inactive-text="不允许" inactive-value="0" />
v-model="form.is_view_answer"
active-text="允许"
active-value="1"
inactive-text="不允许"
inactive-value="0" />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-switch v-model="form.status" active-text="生效" active-value="1" inactive-text="失效" inactive-value="0" /> <el-switch v-model="form.status" active-text="生效" active-value="1" inactive-text="失效" inactive-value="0" />
......
...@@ -105,7 +105,7 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -105,7 +105,7 @@ const submitForm = (formEl: FormInstance | undefined) => {
:title="props.data ? (props.data?.isView ? '查看用户' : '编辑用户') : '新建用户'" :title="props.data ? (props.data?.isView ? '查看用户' : '编辑用户') : '新建用户'"
:close-on-click-modal="false" :close-on-click-modal="false"
width="800px" width="800px"
@update:modelValue="$emit('update:modelValue')"> @update:modelValue="value => $emit('update:modelValue', value)">
<el-form <el-form
:disabled="props.data?.isView" :disabled="props.data?.isView"
ref="ruleFormRef" ref="ruleFormRef"
...@@ -135,7 +135,13 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -135,7 +135,13 @@ const submitForm = (formEl: FormInstance | undefined) => {
</el-form-item> </el-form-item>
<el-form-item :label="item.name" v-for="item in fieldsList" :key="item.id"> <el-form-item :label="item.name" v-for="item in fieldsList" :key="item.id">
<template v-if="item.type === '4' || item.type === '5'"> <template v-if="item.type === '4' || item.type === '5'">
<el-date-picker v-if="item.format === 'yyyy-mm-dd'" v-model="item.value" type="date" placeholder="请选择" style="width: 100%" value-format="YYYY-MM-DD" /> <el-date-picker
v-if="item.format === 'yyyy-mm-dd'"
v-model="item.value"
type="date"
placeholder="请选择"
style="width: 100%"
value-format="YYYY-MM-DD" />
<el-date-picker value-format="YYYY-MM-DD HH:mm:ss" v-else v-model="item.value" type="datetime" placeholder="请选择" style="width: 100%" /> <el-date-picker value-format="YYYY-MM-DD HH:mm:ss" v-else v-model="item.value" type="datetime" placeholder="请选择" style="width: 100%" />
</template> </template>
<el-input v-else v-model="item.value" style="width: 100%" placeholder="请输入"></el-input> <el-input v-else v-model="item.value" style="width: 100%" placeholder="请输入"></el-input>
......
...@@ -32,7 +32,8 @@ let eventList = $ref<EventProp[]>() ...@@ -32,7 +32,8 @@ let eventList = $ref<EventProp[]>()
onMounted(() => { onMounted(() => {
getEventList().then(res => { getEventList().then(res => {
eventList = res.data.map( eventList = res.data.map(
(item: any) => item.attributes.map((cItem: any) => (props.data ? (cItem.value = JSON.parse(props.data.fields)[cItem.id]) : (cItem.value = '') && cItem)) && item (item: any) =>
item.attributes.map((cItem: any) => (props.data ? (cItem.value = JSON.parse(props.data.fields)[cItem.id]) : (cItem.value = '') && cItem)) && item
) )
}) })
}) })
...@@ -83,7 +84,11 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -83,7 +84,11 @@ const submitForm = (formEl: FormInstance | undefined) => {
</script> </script>
<template> <template>
<el-dialog :title="!props.data ? '新建用户事件属性' : '修改用户事件属性'" :close-on-click-modal="false" width="500px" @update:modelValue="$emit('update:modelValue')"> <el-dialog
:title="!props.data ? '新建用户事件属性' : '修改用户事件属性'"
:close-on-click-modal="false"
width="500px"
@update:modelValue="value => $emit('update:modelValue', value)">
<div class="update-event_info"> <div class="update-event_info">
<span>姓名:{{ props.info?.name }}</span> <span>姓名:{{ props.info?.name }}</span>
<span>来源链接:{{ props.info?.connection_name }}</span> <span>来源链接:{{ props.info?.connection_name }}</span>
...@@ -97,7 +102,13 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -97,7 +102,13 @@ const submitForm = (formEl: FormInstance | undefined) => {
<!-- 属性字段 --> <!-- 属性字段 -->
<el-form-item :label="item.name" v-for="item in eventAttributes" :key="item.id"> <el-form-item :label="item.name" v-for="item in eventAttributes" :key="item.id">
<template v-if="item.type === '4' || item.type === '5'"> <template v-if="item.type === '4' || item.type === '5'">
<el-date-picker v-if="item.format === 'yyyy-mm-dd'" v-model="item.value" type="date" placeholder="请选择" style="width: 100%" value-format="YYYY-MM-DD" /> <el-date-picker
v-if="item.format === 'yyyy-mm-dd'"
v-model="item.value"
type="date"
placeholder="请选择"
style="width: 100%"
value-format="YYYY-MM-DD" />
<el-date-picker value-format="YYYY-MM-DD HH:mm:ss" v-else v-model="item.value" type="datetime" placeholder="请选择" style="width: 100%" /> <el-date-picker value-format="YYYY-MM-DD HH:mm:ss" v-else v-model="item.value" type="datetime" placeholder="请选择" style="width: 100%" />
</template> </template>
<el-input v-else v-model="item.value" style="width: 100%" placeholder="请输入"></el-input> <el-input v-else v-model="item.value" style="width: 100%" placeholder="请输入"></el-input>
......
...@@ -61,7 +61,12 @@ const fileData = $ref<any>([]) ...@@ -61,7 +61,12 @@ const fileData = $ref<any>([])
</script> </script>
<template> <template>
<el-dialog class="connect-form" title="导入用户事件数据" :close-on-click-modal="false" width="500px" @update:modelValue="$emit('update:modelValue')"> <el-dialog
class="connect-form"
title="导入用户事件数据"
:close-on-click-modal="false"
width="500px"
@update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="122px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="122px">
<el-form-item label="请选择事件" prop="event_id"> <el-form-item label="请选择事件" prop="event_id">
<el-select v-model="form.event_id" style="width: 100%"> <el-select v-model="form.event_id" style="width: 100%">
......
...@@ -55,7 +55,12 @@ const fileData = $ref<any>([]) ...@@ -55,7 +55,12 @@ const fileData = $ref<any>([])
</script> </script>
<template> <template>
<el-dialog class="connect-form" title="导入用户数据" :close-on-click-modal="false" width="500px" @update:modelValue="$emit('update:modelValue')"> <el-dialog
class="connect-form"
title="导入用户数据"
:close-on-click-modal="false"
width="500px"
@update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="142px"> <el-form ref="formRef" :model="form" :rules="rules" label-suffix=":" label-width="142px">
<el-form-item label="请选择所属链接" prop="connection_id"> <el-form-item label="请选择所属链接" prop="connection_id">
<el-select v-model="form.connection_id" style="width: 100%"> <el-select v-model="form.connection_id" style="width: 100%">
......
...@@ -47,7 +47,12 @@ const bytesToSize = (bytes: number) => { ...@@ -47,7 +47,12 @@ const bytesToSize = (bytes: number) => {
} }
</script> </script>
<template> <template>
<el-dialog class="connect-form" title="导入用户数据" :close-on-click-modal="false" width="700px" @update:modelValue="$emit('update:modelValue')"> <el-dialog
class="connect-form"
title="导入用户数据"
:close-on-click-modal="false"
width="700px"
@update:modelValue="value => $emit('update:modelValue', value)">
<AppList v-bind="listOptions" ref="appList"></AppList> <AppList v-bind="listOptions" ref="appList"></AppList>
</el-dialog> </el-dialog>
</template> </template>
{ {
"extends": "@vue/tsconfig/tsconfig.node.json", "extends": "@tsconfig/node20/tsconfig.json",
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"], "include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
......
{ {
"extends": "@vue/tsconfig/tsconfig.web.json", "extends": "@vue/tsconfig/tsconfig.json",
"include": ["auto-imports.d.ts", "env.d.ts", "src/**/*", "src/**/*.vue"], "include": ["auto-imports.d.ts", "env.d.ts", "src/**/*", "src/**/*.vue"],
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"paths": { "paths": {
"@/*": ["./src/*"] "@/*": ["./src/*"]
}, },
"types": ["element-plus/global"] "types": ["element-plus/global", "@vue-macros/reactivity-transform/macros-global"]
}, },
"references": [ "references": [
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
"path": "./tsconfig.config.json" "path": "./tsconfig.config.json"
} }
] ]
} }
\ No newline at end of file
...@@ -6,16 +6,18 @@ import { defineConfig } from 'vite' ...@@ -6,16 +6,18 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
// import checker from 'vite-plugin-checker' // import checker from 'vite-plugin-checker'
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
export default defineConfig(({ mode }) => ({ export default defineConfig(({ mode }) => ({
base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/saas-dml/' : '/', base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/saas-dml/' : '/',
plugins: [ plugins: [
vue({ script: { defineModel: true }, reactivityTransform: true }), vue(),
AutoImport({ AutoImport({
imports: ['vue', 'vue/macros', 'vue-router', '@vueuse/core'], imports: ['vue', 'vue-router', '@vueuse/core'],
dts: true, dts: true,
eslintrc: { enabled: true } eslintrc: { enabled: true }
}) }),
ReactivityTransform()
// checker({ vueTsc: true, eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } }) // checker({ vueTsc: true, eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })
], ],
server: { server: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论