Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ai_web_page_prod
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
ai_web_page_prod
Commits
3de978fb
Commit
3de978fb
authored
Apr 19, 2023
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c6f6da79
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
119 additions
and
55 deletions
+119
-55
src/components/custom/TTable.vue
+42
-3
src/layout/content.vue
+5
-3
src/pages/CreationRecord/components/MappingRecord.vue
+34
-17
src/pages/CreationRecord/index.vue
+38
-32
No files found.
src/components/custom/TTable.vue
View file @
3de978fb
...
...
@@ -12,8 +12,8 @@
</
template
>
<
script
lang=
"ts"
setup
>
import
{
Table
as
TTable
}
from
'tdesign-vue-next'
;
import
{
ref
}
from
'vue'
;
import
{
Table
as
TTable
}
from
"tdesign-vue-next"
;
import
{
ref
}
from
"vue"
;
const
props
=
defineProps
<
{
columns
:
any
[];
list
:
any
[];
...
...
@@ -21,4 +21,43 @@ const props = defineProps<{
const
loading
=
ref
(
false
);
</
script
>
<
style
lang=
"less"
></
style
>
<
style
lang=
"less"
>
@import
"@/style/variables.less"
;
.reset-t-table
{
background-color
:
transparent
;
.t-table__content
{
background-color
:
transparent
;
}
thead
{
tr
{
background-color
:
transparent
;
th
{
border
:
none
;
background
:
#000000
;
color
:
white
;
font-size
:
@
font-size-16
;
font-weight
:
400
;
}
&
>
:first-child
{
border-top-left-radius
:
8px
;
border-bottom-left-radius
:
8px
;
}
&
>
:last-child
{
border-top-right-radius
:
8px
;
border-bottom-right-radius
:
8px
;
}
}
}
tbody
{
.t-table__empty-row
{
background-color
:
transparent
;
&:hover
{
background-color
:
transparent
;
}
.t-table__empty
{
color
:
white
;
}
}
}
}
</
style
>
src/layout/content.vue
View file @
3de978fb
...
...
@@ -12,13 +12,13 @@
</
template
>
<
script
lang=
"ts"
setup
>
import
Header
from
'./header.vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
Header
from
"./header.vue"
;
import
{
useRoute
}
from
"vue-router"
;
const
route
=
useRoute
();
</
script
>
<
style
lang=
"less"
>
@import
'@/style/flex.less'
;
@import
"@/style/flex.less"
;
.custom-layout
{
height
:
100%
;
.dj();
...
...
@@ -33,6 +33,8 @@ const route = useRoute();
margin
:
0
auto
;
max-width
:
1597px
;
box-sizing
:
border-box
;
min-width
:
90vw
;
padding
:
0
30px
;
}
}
}
...
...
src/pages/CreationRecord/components/MappingRecord.vue
View file @
3de978fb
<
template
>
<CustomTTable
:columns=
"columns"
:list=
"RecordList.list"
></CustomTTable>
<CustomTTable
class=
"mapping-record-table"
:columns=
"columns"
:list=
"RecordList.list"
></CustomTTable>
</
template
>
<
script
lang=
"ts"
setup
>
import
CustomTTable
from
'@/components/custom/TTable.vue'
;
import
{
reactive
}
from
'vue'
;
import
CustomTTable
from
"@/components/custom/TTable.vue"
;
import
{
reactive
}
from
"vue"
;
const
RecordList
=
reactive
({
// 绘图列表
list
:
[],
...
...
@@ -12,27 +16,40 @@ const RecordList = reactive({
// 绘图记录
const
columns
=
[
{
title
:
'账号'
,
colKey
:
'name'
,
title
:
"产品"
,
colKey
:
"name"
,
},
{
title
:
'套餐'
,
colKey
:
'packages'
,
align
:
'center'
,
className
:
'n_quantity'
,
title
:
"详细"
,
colKey
:
"packages"
,
align
:
"center"
,
className
:
"n_quantity"
,
},
{
title
:
'状况'
,
colKey
:
'n_funds'
,
align
:
'center'
,
className
:
'n_funds'
,
title
:
"尺寸"
,
colKey
:
"n_funds"
,
align
:
"center"
,
className
:
"n_funds"
,
},
{
title
:
'到期时间'
,
colKey
:
'operation'
,
align
:
'right'
,
title
:
"数量"
,
colKey
:
"operation"
,
align
:
"right"
,
},
{
title
:
"图片"
,
colKey
:
"img"
,
align
:
"center"
,
},
{
title
:
"下载"
,
colKey
:
"download"
,
align
:
"right"
,
},
];
</
script
>
<
style
lang=
"less"
></
style
>
<
style
lang=
"less"
>
.mapping-record-table
{
}
</
style
>
src/pages/CreationRecord/index.vue
View file @
3de978fb
...
...
@@ -11,26 +11,28 @@
>
{{
item
.
label
}}
</span
>
</div>
<div
v-show=
"DefaultTable == 'img'"
>
<MappingRecord></MappingRecord>
</div>
<template
v-if=
"is_first"
>
<div
v-show=
"DefaultTable == 'text'"
>
<CustomTTable
:columns=
"columns2"
:list=
"RecordList.textlist"
></CustomTTable>
<div
class=
"real-table-parent"
>
<div
v-show=
"DefaultTable == 'img'"
>
<MappingRecord></MappingRecord>
</div>
</
template
>
<template
v-if=
"is_first"
>
<div
v-show=
"DefaultTable == 'text'"
>
<CustomTTable
:columns=
"columns2"
:list=
"RecordList.textlist"
></CustomTTable>
</div>
</
template
>
</div>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
CustomTTable
from
'@/components/custom/TTable.vue'
;
import
MappingRecord
from
'./components/MappingRecord.vue'
;
import
{
reactive
,
ref
}
from
'vue'
;
import
CustomTTable
from
"@/components/custom/TTable.vue"
;
import
MappingRecord
from
"./components/MappingRecord.vue"
;
import
{
reactive
,
ref
}
from
"vue"
;
// 默认展示绘图记录
const
DefaultTable
=
ref
<
'img'
|
'text'
>
(
'img'
);
const
DefaultTable
=
ref
<
"img"
|
"text"
>
(
"img"
);
const
is_first
=
ref
(
false
);
const
RecordList
=
reactive
({
...
...
@@ -41,37 +43,37 @@ const RecordList = reactive({
});
const
label_list
=
[
{
label
:
'绘图记录'
,
value
:
'img'
,
label
:
"绘图记录"
,
value
:
"img"
,
},
{
label
:
'文案记录'
,
value
:
'text'
,
label
:
"文案记录"
,
value
:
"text"
,
},
];
// 文案记录
const
columns2
=
[
{
title
:
'账号'
,
colKey
:
'name'
,
title
:
"账号"
,
colKey
:
"name"
,
},
{
title
:
'套餐'
,
colKey
:
'packages'
,
align
:
'center'
,
className
:
'n_quantity'
,
title
:
"套餐"
,
colKey
:
"packages"
,
align
:
"center"
,
className
:
"n_quantity"
,
},
{
title
:
'状况'
,
colKey
:
'n_funds'
,
align
:
'center'
,
className
:
'n_funds'
,
title
:
"状况"
,
colKey
:
"n_funds"
,
align
:
"center"
,
className
:
"n_funds"
,
},
{
title
:
'到期时间'
,
colKey
:
'operation'
,
align
:
'right'
,
title
:
"到期时间"
,
colKey
:
"operation"
,
align
:
"right"
,
},
];
const
changeTable
=
(
item
:
any
)
=>
{
...
...
@@ -81,7 +83,7 @@ const changeTable = (item: any) => {
</
script
>
<
style
lang=
"less"
>
@import
'@/style/variables.less'
;
@import
"@/style/variables.less"
;
.custom-creation-record
{
margin-top
:
@
page-margin-top
;
.label-box
{
...
...
@@ -100,5 +102,9 @@ const changeTable = (item: any) => {
margin-left
:
12px
;
}
}
.real-table-parent
{
background-color
:
#2d2d2d
;
padding
:
20px
40px
;
}
}
</
style
>
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