Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
bigDataSystem
Commits
a53622e0
Commit
a53622e0
authored
Dec 03, 2024
by
LiXuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标签-图像分析
parent
4bd1a098
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
296 additions
and
50 deletions
+296
-50
labelData.ts
...s/mallResourceDevelopment/label/labelDevelop/labelData.ts
+30
-30
addFileModal.vue
...sourceDevelopment/label/portraitAnalysis/addFileModal.vue
+67
-0
detail.data.ts
...eDevelopment/label/portraitAnalysis/detail/detail.data.ts
+1
-0
index.vue
...sourceDevelopment/label/portraitAnalysis/detail/index.vue
+25
-10
index.vue
.../mallResourceDevelopment/label/portraitAnalysis/index.vue
+33
-10
portrait.data.ts
...sourceDevelopment/label/portraitAnalysis/portrait.data.ts
+20
-0
portraitData.ts
...esourceDevelopment/label/portraitAnalysis/portraitData.ts
+120
-0
No files found.
src/views/mallResourceDevelopment/label/labelDevelop/labelData.ts
View file @
a53622e0
This diff is collapsed.
Click to expand it.
src/views/mallResourceDevelopment/label/portraitAnalysis/addFileModal.vue
0 → 100644
View file @
a53622e0
<
template
>
<BasicModal
width=
"40%"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
>
<BasicForm
@
register=
"registerForm"
>
<template
#
path=
"
{ field, model }">
<InputSearch
:disabled=
"true"
v-model:value=
"model[field]"
enter-button=
"选择"
@
search=
"handlePath"
/>
</
template
>
<
template
#
type=
"{ field, model }"
>
<span>
{{
model
[
field
]
}}
</span>
</
template
>
</BasicForm>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
unref
}
from
'vue'
;
import
{
InputSearch
}
from
'ant-design-vue'
;
import
{
BasicModal
,
useModalInner
}
from
'@/components/Modal'
;
import
{
BasicForm
,
useForm
}
from
'@/components/Form'
;
import
{
addFileModalFormSchema
}
from
'@/views/mallResourceDevelopment/label/portraitAnalysis/portrait.data'
;
const
isUpdate
=
ref
(
false
);
const
isMove
=
ref
(
false
);
const
rowId
=
ref
(
''
);
function
handlePath
()
{}
const
[
registerForm
,
{
getFieldsValue
,
setFieldsValue
,
updateSchema
,
resetFields
,
validate
}]
=
useForm
({
labelWidth
:
100
,
baseColProps
:
{
span
:
24
},
schemas
:
addFileModalFormSchema
,
showActionButtonGroup
:
false
,
actionColOptions
:
{
span
:
23
,
},
});
//初始化弹框
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
await
resetFields
();
setModalProps
({
confirmLoading
:
false
});
isUpdate
.
value
=
!!
data
?.
isUpdate
;
isMove
.
value
=
!!
data
?.
isMove
;
await
setFieldsValue
({
path
:
data
.
path
,
});
if
(
unref
(
isUpdate
))
{
// 获取行数据的id
rowId
.
value
=
data
.
record
.
businessId
;
// 塞值
await
setFieldsValue
({
...
data
.
record
,
});
}
});
// const getTitle = computed(() => (isUpdate.value ? '编辑实体' : '新建实体'));
const
getTitle
=
'转物理模型'
;
/**确定按钮*/
async
function
handleSubmit
()
{
await
validate
();
closeModal
();
}
</
script
>
src/views/mallResourceDevelopment/label/portraitAnalysis/detail/detail.data.ts
View file @
a53622e0
...
...
@@ -23,6 +23,7 @@ export const detailFormSchema: FormSchema[] = [
{
label
:
'画像样式'
,
field
:
'style'
,
defaultValue
:
0
,
slot
:
'style'
,
},
];
...
...
src/views/mallResourceDevelopment/label/portraitAnalysis/detail/index.vue
View file @
a53622e0
...
...
@@ -5,16 +5,24 @@
<a-button
type=
"primary"
>
保存
</a-button>
</
template
>
<
template
#
footer
>
<div>
基本信息
</div>
<div
class=
"des-title"
style=
"margin: 0 0 20px 30px"
>
基本信息
</div>
<BasicForm
@
register=
"registerForm"
>
<template
#
style=
"
{ field, model }">
<div
class=
"flex"
style=
"text-align: center; gap: 10px"
>
<div
style=
"cursor: pointer"
@
click=
"model[field] = 0"
>
<AlignLeftOutlined
class=
"style-icon"
:class=
"model[field] === 0 ? 'check-class' : null"
/>
<AlignLeftOutlined
class=
"style-icon"
:class=
"model[field] === 0 ? 'check-class' : null"
/>
<div>
默认
</div>
</div>
<div
style=
"cursor: pointer"
@
click=
"model[field] = 1"
>
<Icon
icon=
"ion:body-outline"
class=
"style-icon"
:class=
"model[field] === 1 ? 'check-class' : null"
style=
"font-size: 50px"
/>
<Icon
icon=
"ion:body-outline"
class=
"style-icon"
:class=
"model[field] === 1 ? 'check-class' : null"
style=
"font-size: 50px"
/>
<div>
人物
</div>
</div>
<div
style=
"cursor: pointer"
@
click=
"model[field] = 2"
>
...
...
@@ -28,7 +36,7 @@
<div
class=
"flex"
>
<div
class=
"w-1/2"
>
<div
class=
"flex justify-between"
style=
"padding: 16px 16px 0 32px"
>
<div
style=
"font-size: 16px; font-weight: bolder
"
>
属性
</div>
<div
class=
"des-title
"
>
属性
</div>
<a-button
type=
"primary"
><PlusOutlined
/>
添加字段
</a-button>
</div>
<BasicTable
@
register=
"fieldTable"
>
...
...
@@ -48,7 +56,7 @@
</div>
<div
class=
"w-1/2"
>
<div
class=
"flex justify-between"
style=
"padding: 16px 16px 0 32px"
>
<div
style=
"font-size: 16px; font-weight: bolder
"
>
标签
</div>
<div
class=
"des-title
"
>
标签
</div>
<a-button
type=
"primary"
><PlusOutlined
/>
添加标签
</a-button>
</div>
<BasicTable
@
register=
"tagTable"
>
...
...
@@ -79,7 +87,7 @@
import
{
ref
}
from
'vue'
;
import
BasicForm
from
'@/components/Form/src/BasicForm.vue'
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
import
{
Divider
,
Input
}
from
'ant-design-vue'
;
import
{
Divider
,
FormProps
,
Input
}
from
'ant-design-vue'
;
import
{
AlignLeftOutlined
,
BankOutlined
,
PlusOutlined
}
from
'@ant-design/icons-vue'
;
import
{
useForm
}
from
'@/components/Form'
;
import
{
editFormSchema
}
from
'@/views/dataWarehousePlanning/logicalModel/modelDetail/model.data'
;
...
...
@@ -100,6 +108,7 @@
tagTableData
,
}
from
'@/views/mallResourceDevelopment/label/portraitAnalysis/detail/detailData'
;
import
TableAction
from
'@/components/Table/src/components/TableAction.vue'
;
import
{
BaseFormatProps
}
from
"vue-i18n"
;
const
route
=
useRoute
();
const
title
=
route
.
query
.
title
;
...
...
@@ -136,16 +145,17 @@
baseColProps
:
{
span
:
12
},
schemas
:
fieldFormSchema
,
autoSubmitOnEnter
:
true
,
}
as
BasicTable
Props
,
}
as
Form
Props
,
useSearchForm
:
true
,
showTableSetting
:
false
,
bordered
:
true
,
pagination
:
false
,
actionColumn
:
{
width
:
100
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
}
as
BasicTableProps
);
const
[
tagTable
]
=
useTable
({
title
:
''
,
api
:
async
(
params
)
=>
{
...
...
@@ -170,16 +180,17 @@
baseColProps
:
{
span
:
12
},
schemas
:
tagFormSchema
,
autoSubmitOnEnter
:
true
,
}
as
BasicTable
Props
,
}
as
Form
Props
,
useSearchForm
:
true
,
showTableSetting
:
false
,
bordered
:
true
,
pagination
:
false
,
actionColumn
:
{
width
:
100
,
title
:
'操作'
,
dataIndex
:
'action'
,
},
});
}
as
BasicTableProps
);
</
script
>
<
style
scoped
>
...
...
@@ -192,4 +203,8 @@
color
:
#3b8cf7
;
border
:
3px
solid
#3b8cf7
;
}
.des-title
{
font-size
:
16px
;
font-weight
:
bolder
;
}
</
style
>
src/views/mallResourceDevelopment/label/portraitAnalysis/index.vue
View file @
a53622e0
...
...
@@ -5,7 +5,7 @@
<div
class=
"flex w-2/11"
>
<BasicTree
class=
"flex-1"
:treeData=
"
label
TreeData"
:treeData=
"
portrait
TreeData"
defaultExpandLevel=
"1"
@
select=
"handleSelect"
ref=
"treeData"
...
...
@@ -23,7 +23,9 @@
>
移动
</a-button
>
<a-button
class=
"top-button"
type=
"primary"
>
新建文件夹
</a-button>
<a-button
class=
"top-button"
type=
"primary"
@
click=
"handleAddPortrait"
>
新建画像
</a-button>
<a-button
class=
"top-button"
type=
"primary"
@
click=
"handleAddPortrait"
>
新建画像
</a-button
>
</
template
>
<
template
#
footer
>
<BasicTable
@
register=
"portraitTable"
ref=
"tabTableRef"
>
...
...
@@ -68,7 +70,8 @@
</
template
>
</template>
<
template
#
name=
"{ text, record }"
>
<a
@
click=
"handleBody(record)"
>
{{
text
}}
</a>
<a
v-if=
"record.relationBody"
@
click=
"handleBody(record)"
>
{{
text
}}
</a>
<span
v-else
>
{{
text
}}
</span>
</
template
>
<
template
#
originalSubject=
"{ text, record }"
>
<a-button
type=
"link"
@
click=
"handleBody(record)"
>
{{
text
}}
</a-button>
...
...
@@ -79,6 +82,7 @@
</div>
</div>
</template>
<AddFileModal
@
register=
"addFileModal"
/>
</PageWrapper>
</template>
...
...
@@ -121,15 +125,21 @@
portraitTableColumn
,
portraitTableFormSchema
,
}
from
'@/views/mallResourceDevelopment/label/portraitAnalysis/portrait.data'
;
import
{
portraitTreeData
}
from
'./portraitData'
;
import
AddFileModal
from
'./addFileModal.vue'
;
const
[
addFileModal
,
{
openModal
:
openAddFileModal
}]
=
useModal
();
const
tabName
=
ref
(
''
);
const
treeData
=
ref
();
const
path
=
ref
();
function
handleSelect
()
{
const
keys
=
unref
(
treeData
).
getSelectedKeys
();
const
node
=
unref
(
treeData
).
getSelectedNode
(
keys
[
0
]);
console
.
log
(
'node'
,
node
);
// 获取标题
tabName
.
value
=
node
.
title
;
path
.
value
=
getPath
(
portraitTreeData
[
0
]);
console
.
log
(
'path'
,
path
.
value
);
if
(
node
.
children
)
{
const
list
=
cloneDeep
(
node
.
children
);
list
.
forEach
((
item
)
=>
{
...
...
@@ -145,7 +155,22 @@
// tabName.value = findTitleById(labelTreeData[0], key[0]);
// console.log('tabName', tabName.value);
}
// 嵌套 -获取树title
// 嵌套获取路径
function
getPath
(
data
)
{
if
(
data
.
name
===
tabName
.
value
)
{
return
'/'
+
data
.
name
;
}
else
{
if
(
data
.
children
&&
data
.
children
.
length
>
0
)
{
for
(
let
item
of
data
.
children
)
{
const
path
=
getPath
(
item
);
if
(
path
)
{
return
'/'
+
data
.
name
+
path
;
}
}
}
return
;
}
}
const
tabTableRef
=
ref
(
null
);
function
topButtonDisabled
()
{
if
(
tabTableRef
.
value
)
{
...
...
@@ -162,16 +187,14 @@
function
handleBody
(
record
)
{
console
.
log
(
'recode'
,
record
);
router
.
push
({
path
:
'/mallResourceDevelopment/label/
label/labelD
etail'
,
path
:
'/mallResourceDevelopment/label/
portraitAnalysis/d
etail'
,
query
:
{
...
record
},
});
}
function
handleAddPortrait
()
{
router
.
push
({
path
:
'/mallResourceDevelopment/label/portraitAnalysis/detail'
,
query
:
{
title
:
tabName
.
value
,
},
openAddFileModal
(
true
,
{
isUpdate
:
false
,
path
:
path
.
value
,
});
}
const
[
portraitTable
,
{
setTableData
:
tabSetTableData
,
getRowSelection
:
tabGetRowSelection
}]
=
...
...
src/views/mallResourceDevelopment/label/portraitAnalysis/portrait.data.ts
View file @
a53622e0
...
...
@@ -15,6 +15,7 @@ export const portraitTableColumn: BasicColumn[] = [
title
:
'名称'
,
dataIndex
:
'name'
,
width
:
100
,
slots
:
{
customRender
:
'name'
},
},
{
title
:
'创建时间'
,
...
...
@@ -32,3 +33,22 @@ export const portraitTableColumn: BasicColumn[] = [
width
:
100
,
},
];
export
const
addFileModalFormSchema
:
FormSchema
[]
=
[
{
label
:
'路径'
,
field
:
'path'
,
slot
:
'path'
,
},
{
label
:
'文件名称'
,
field
:
'name'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'文件类型'
,
field
:
'type'
,
defaultValue
:
'画像分析'
,
slot
:
'type'
,
},
];
src/views/mallResourceDevelopment/label/portraitAnalysis/portraitData.ts
View file @
a53622e0
export
const
portraitTreeData
=
[
{
title
:
'画像分析'
,
key
:
'0'
,
name
:
'画像分析'
,
icon
:
'ant-design:pic-left-outlined'
,
children
:
[
{
title
:
'共享工作区'
,
key
:
'0-1'
,
icon
:
'ant-design:desktop-outlined'
,
name
:
'共享工作区'
,
createTime
:
'2023/11/16 06:50:23'
,
updateTime
:
'2023/12/08 19:33:26'
,
children
:
[
{
title
:
'共享区1'
,
key
:
'0-1-0'
,
icon
:
'ant-design:apartment-outlined'
,
name
:
'共享区1'
,
createTime
:
'2023/11/16 06:50:23'
,
updateTime
:
'2023/12/08 19:33:26'
,
children
:
[
{
title
:
'共享1测试'
,
key
:
'0-1-0-0'
,
icon
:
'ant-design:smile-outlined'
,
name
:
'共享1测试'
,
relationBody
:
'共享区1'
,
createTime
:
'2023/09/09 19:16:22'
,
updateTime
:
'2023/09/09 22:09:36'
,
owner
:
'admin'
,
},
{
title
:
'共享1-2'
,
key
:
'0-1-0-1'
,
icon
:
'ant-design:smile-outlined'
,
name
:
'共享1-2'
,
relationBody
:
'共享区1'
,
createTime
:
'2023/09/09 19:16:22'
,
updateTime
:
'2023/09/09 22:09:36'
,
owner
:
'admin'
,
},
{
title
:
'传送包'
,
key
:
'0-1-0-2'
,
icon
:
'ant-design:folder-open-outlined'
,
name
:
'传送包'
,
createTime
:
'2023/11/16 06:50:23'
,
updateTime
:
'2023/12/08 19:33:26'
,
children
:
[
{
title
:
'包测试3'
,
key
:
'0-1-0-2-0'
,
icon
:
'ant-design:smile-outlined'
,
name
:
'包测试3'
,
relationBody
:
'共享区1'
,
createTime
:
'2023/09/09 19:16:22'
,
updateTime
:
'2023/09/09 22:09:36'
,
owner
:
'admin'
,
},
],
},
],
},
{
title
:
'共享区2'
,
key
:
'0-1-1'
,
icon
:
'ant-design:apartment-outlined'
,
name
:
'共享区2'
,
createTime
:
'2023/11/16 06:50:23'
,
updateTime
:
'2023/12/08 19:33:26'
,
children
:
[
{
title
:
'经济'
,
key
:
'0-1-1-0'
,
icon
:
'ant-design:smile-outlined'
,
name
:
'经济'
,
relationBody
:
'共享区2'
,
createTime
:
'2023/09/09 19:16:22'
,
updateTime
:
'2023/09/09 22:09:36'
,
owner
:
'admin'
,
},
{
title
:
'商品'
,
key
:
'0-1-1-1'
,
icon
:
'ant-design:smile-outlined'
,
name
:
'商品'
,
relationBody
:
'共享区2'
,
createTime
:
'2023/09/09 19:16:22'
,
updateTime
:
'2023/09/09 22:09:36'
,
owner
:
'admin'
,
},
{
title
:
'购物包'
,
key
:
'0-1-1-2'
,
icon
:
'ant-design:folder-open-outlined'
,
name
:
'购物包'
,
createTime
:
'2023/11/16 06:50:23'
,
updateTime
:
'2023/12/08 19:33:26'
,
children
:
[
{
title
:
'测试标签'
,
key
:
'0-1-1-2-0'
,
icon
:
'ant-design:smile-outlined'
,
name
:
'测试标签'
,
relationBody
:
'共享区2'
,
createTime
:
'2023/09/09 19:16:22'
,
updateTime
:
'2023/09/09 22:09:36'
,
owner
:
'admin'
,
},
],
},
],
},
],
},
],
},
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment