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

bug fixes

上级 96f858e4
......@@ -115,6 +115,7 @@
"useArrayFilter": true,
"useArrayFind": true,
"useArrayFindIndex": true,
"useArrayFindLast": true,
"useArrayJoin": true,
"useArrayMap": true,
"useArrayReduce": true,
......
// Generated by 'unplugin-auto-import'
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-auto-import
export {}
declare global {
const $$: typeof import('vue/macros')['$$']
......@@ -109,6 +112,7 @@ declare global {
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
......@@ -276,5 +280,5 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
}
差异被折叠。
......@@ -18,13 +18,13 @@
"@element-plus/icons-vue": "^2.1.0",
"@tinymce/tinymce-vue": "^5.0.1",
"@vue-flow/controls": "^1.0.4",
"@vue-flow/core": "^1.16.1",
"@vue-flow/core": "^1.17.2",
"@vueuse/core": "^9.13.0",
"axios": "^1.3.4",
"blueimp-md5": "^2.19.0",
"element-plus": "^2.2.32",
"element-plus": "^2.3.1",
"lodash-es": "^4.17.21",
"nanoid": "^4.0.1",
"nanoid": "^4.0.2",
"pinia": "^2.0.33",
"vue": "^3.2.47",
"vue-router": "^4.1.6"
......@@ -33,17 +33,17 @@
"@rushstack/eslint-patch": "^1.2.0",
"@types/blueimp-md5": "^2.18.0",
"@types/node": "^18.14.2",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue": "^4.1.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/tsconfig": "^0.1.3",
"ali-oss": "^6.17.1",
"chalk": "^5.2.0",
"eslint": "^8.35.0",
"eslint-plugin-vue": "^9.9.0",
"sass": "^1.58.3",
"eslint": "^8.37.0",
"eslint-plugin-vue": "^9.10.0",
"sass": "^1.60.0",
"typescript": "~4.9.5",
"unplugin-auto-import": "^0.15.1",
"vite": "^4.1.4",
"unplugin-auto-import": "^0.15.2",
"vite": "^4.2.1",
"vue-tsc": "^1.2.0"
}
}
......@@ -20,6 +20,8 @@ const props = defineProps({
const { removeEdges } = useVueFlow()
const path = computed(() => getStraightPath(props))
const labelColor = computed(() => props.style?.stroke)
</script>
<script>
......@@ -32,7 +34,7 @@ export default {
<StraightEdge :id="id" :style="style" :path="path[0]" :marker-end="markerEnd" :interactionWidth="2"></StraightEdge>
<EdgeLabelRenderer>
<div class="edge-label" :style="{ transform: `translate(-50%, -50%) translate(${path[1]}px,${path[2]}px)` }">
<span v-if="label">{{ label }}</span>
<span v-if="label" :style="{ color: labelColor }">{{ label }}</span>
<el-icon @click="removeEdges([id])" v-if="selected"><CircleCloseFilled /></el-icon>
</div>
</EdgeLabelRenderer>
......@@ -51,7 +53,6 @@ export default {
}
.el-icon {
display: block;
font-size: 20px;
color: var(--main-color);
}
......
<script setup lang="ts">
import type { Group } from '../types'
import type { Group, GroupMember } from '../types'
import { UserFilled, Plus, Delete } from '@element-plus/icons-vue'
import { ElMessageBox, ElMessage } from 'element-plus'
import AppList from '@/components/base/AppList.vue'
......@@ -18,6 +18,7 @@ defineEmits<{
}>()
const statusList = useMapStore().getMapValuesByKey('system_status')
const genderList = useMapStore().getMapValuesByKey('system_gender')
const detail = reactive({ count: 0, status: '1', updated_time: '-' })
function fetchInfo() {
......@@ -45,12 +46,12 @@ function handleClearMembers() {
})
}
// 添加群组成员
let selectMembersVisible = $ref(false)
let selectMembersVisible = ref(false)
function handleAdd() {
selectMembersVisible = true
selectMembersVisible.value = true
}
const appList = $ref<InstanceType<typeof AppList> | null>(null)
const appList = ref<InstanceType<typeof AppList> | null>(null)
// 列表配置
const listOptions = computed(() => {
return {
......@@ -62,10 +63,22 @@ const listOptions = computed(() => {
{ label: '序号', type: 'index', width: 60 },
{ label: '用户ID', prop: 'id' },
{ label: '姓名', prop: 'name' },
{ label: '性别', prop: 'gender' },
{
label: '性别',
prop: 'gender',
computed({ row }: { row: GroupMember }) {
return getNameByValue(row.gender, genderList)
}
},
{ label: '手机号码', prop: 'mobile' },
{ label: '来源连接', prop: 'experiment_connection_id' },
{ label: '状态', prop: 'status' },
{
label: '状态',
prop: 'status',
computed({ row }: { row: GroupMember }) {
return getNameByValue(row.status, statusList)
}
},
{ label: '更新人', prop: 'updated_operator.real_name' },
{ label: '更新时间', prop: 'updated_time' }
]
......@@ -74,7 +87,7 @@ const listOptions = computed(() => {
// 刷新
function handleRefresh() {
fetchInfo()
appList?.refetch()
appList.value?.refetch()
}
</script>
......@@ -129,7 +142,14 @@ function handleRefresh() {
<dt>更新状态</dt>
<dd>
<span style="margin-right: 10px">{{ getNameByValue(detail.status.toString(), updateStatusList) }}</span>
<el-button type="primary" plain @click="handleUpdate" size="small">立即更新</el-button>
<el-button
type="primary"
plain
@click="handleUpdate"
size="small"
:disabled="detail.status.toString() === '4'"
>立即更新</el-button
>
</dd>
</dl>
</template>
......
......@@ -15,6 +15,7 @@ export interface Group {
user_attr_rule?: string
event_attr_rule?: string
tag_rule?: string
record?: any
}
export type GroupListRequest = Pick<Group, 'id' | 'name'> & { experiment_id?: string }
......
......@@ -69,7 +69,9 @@ function handleUpdate() {
<dt>更新状态</dt>
<dd>
<span style="margin-right: 10px">{{ getNameByValue(detail.status, updateStatusList) }}</span>
<el-button type="primary" plain @click="handleUpdate" size="small">立即更新</el-button>
<el-button type="primary" plain @click="handleUpdate" size="small" :disabled="detail.status === '4'"
>立即更新</el-button
>
</dd>
</dl>
</div>
......
......@@ -29,7 +29,8 @@ export const updateStatusRuleList = [
export const updateStatusList = [
{ label: '未开始', value: '1' },
{ label: '进行中', value: '2' },
{ label: '完成', value: '3' }
{ label: '完成', value: '3' },
{ label: '进行中', value: '4' }
]
export const dateUnitList = [
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论