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

bug fixes

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