Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何远江
topsun-baoshen-excel
Commits
5fb9441f
Commit
5fb9441f
authored
Apr 15, 2025
by
tanghao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into information
parents
022c1c01
279acb5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
77 deletions
+77
-77
TemplateVariable.vue
src/views/var/varChange/components/TemplateVariable.vue
+77
-77
No files found.
src/views/var/varChange/components/TemplateVariable.vue
View file @
5fb9441f
<
template
>
<vxe-modal
v-model=
"showEdit"
:z-index=
"1006"
@
hide=
"onHide"
title=
"客户选择"
width=
"800"
esc-closable
mask-closable
show-footer
>
<template
#
default
>
<vxe-table
ref=
"xTable"
border
:data=
"data"
size=
"small"
height=
"400"
>
<vxe-column
v-for=
"column in titles"
:key=
"item"
:field=
"column"
<vxe-modal
v-model=
"showEdit"
:z-index=
"1006"
@
hide=
"onHide"
title=
"客户选择"
width=
"800"
esc-closable
mask-closable
show-footer
>
<template
#
default
>
<vxe-table
ref=
"xTable"
border
:data=
"data"
size=
"small"
height=
"400"
>
<vxe-column
v-for=
"column in titles"
:key=
"item"
:field=
"column"
:title=
"column"
show-overflow
width=
"150"
>
width=
"150"
>
</vxe-column>
</vxe-table>
</
template
>
</vxe-column>
</vxe-table>
</
template
>
<
template
#
footer
>
<el-button
type=
"primary"
@
click=
"showEdit = false"
>
关闭
</el-button>
</
template
>
</vxe-modal>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
,
unref
}
from
'vue'
import
{
getCustomerPage
}
from
'@/api/customer'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
export
default
defineComponent
({
name
:
'TemplateVariables'
,
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
titles
:
{
type
:
Array
,
default
:
()
=>
[]
},
data
:
{
type
:
Array
,
default
:
()
=>
[]
}
<
template
#
footer
>
<el-button
type=
"primary"
@
click=
"exportRunData"
>
导出
</el-button>
<el-button
type=
"primary"
@
click=
"showEdit = false"
>
关闭
</el-button>
</
template
>
</vxe-modal>
</template>
<
script
lang=
"ts"
>
import
{
defineComponent
,
ref
,
onMounted
,
reactive
,
watch
,
unref
}
from
'vue'
import
{
getCustomerPage
}
from
'@/api/customer'
import
type
{
VxeTableInstance
}
from
'vxe-table'
import
{
ElMessage
}
from
'element-plus'
export
default
defineComponent
({
name
:
'TemplateVariables'
,
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
},
emits
:
[
'update:visible'
],
setup
(
props
,
{
emit
})
{
const
showEdit
=
ref
(
false
)
const
xTable
=
ref
<
VxeTableInstance
>
()
const
tableData
=
ref
([])
watch
(
()
=>
props
.
visible
,
(
val
)
=>
{
showEdit
.
value
=
val
}
)
titles
:
{
type
:
Array
,
default
:
()
=>
[]
},
data
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
emits
:
[
'update:visible'
],
setup
(
props
,
{
emit
})
{
const
showEdit
=
ref
(
false
)
const
xTable
=
ref
<
VxeTableInstance
>
()
const
tableData
=
ref
([])
const
onHide
=
()
=>
{
emit
(
'update:visible'
,
false
)
}
return
{
showEdit
,
xTable
,
tableData
,
onHide
,
watch
(
()
=>
props
.
visible
,
(
val
)
=>
{
showEdit
.
value
=
val
}
)
const
onHide
=
()
=>
{
emit
(
'update:visible'
,
false
)
}
const
exportRunData
=
()
=>
{
xTable
.
value
?.
exportData
({
type
:
'csv'
})
}
return
{
showEdit
,
xTable
,
tableData
,
onHide
,
exportRunData
}
})
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
\ No newline at end of file
}
})
</
script
>
<
style
lang=
"scss"
scoped
></
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