Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-marketing-push
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1571da76
authored
Mar 19, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
合并
2 parents
aebe6df0
90204831
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
11 deletions
package-lock.json
package.json
src/api/test.js
src/base.js
src/components/d2-table/index.vue
src/components/index.js
src/styles/index.scss
src/views/customer/glsx/index.vue
package-lock.json
View file @
1571da7
This diff is collapsed.
Click to expand it.
package.json
View file @
1571da7
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"axios"
:
"^0.18.0"
,
"axios"
:
"^0.18.0"
,
"glsx-vue-common"
:
"^1.2.1"
,
"element-ui"
:
"^2.15.1"
,
"element-ui"
:
"^2.15.1"
,
"glsx-vue-common"
:
"^1.2.1"
,
"lodash"
:
"^4.17.10"
,
"lodash"
:
"^4.17.10"
,
"node-sass"
:
"^4.9.3"
,
"node-sass"
:
"^4.9.3"
,
"sass-loader"
:
"^7.1.0"
,
"sass-loader"
:
"^7.1.0"
,
...
...
src/api/test.js
0 → 100644
View file @
1571da7
import
{
GlAxios
}
from
'glsx-vue-common'
const
path
=
'/admin-ddh-weapp/carHeadlines'
const
__getList
=
`
${
path
}
/listConditionQuery`
function
getListApi
(
params
)
{
return
GlAxios
.
get
(
__getList
,
{
params
})
}
export
{
getListApi
}
src/base.js
View file @
1571da7
...
@@ -3,7 +3,11 @@
...
@@ -3,7 +3,11 @@
import
Vue
from
'vue'
import
Vue
from
'vue'
import
ElementUI
from
'element-ui'
import
ElementUI
from
'element-ui'
import
'element-ui/lib/theme-chalk/index.css'
import
'element-ui/lib/theme-chalk/index.css'
// import GlsxVueComponents from 'glsx-vue-components'
// import 'glsx-vue-components/dist/glsx-vue-components.css'
import
{
Request
as
request
}
from
'glsx-vue-common'
import
{
Request
as
request
}
from
'glsx-vue-common'
import
'@/styles/index.scss'
// 组件
import
'@/components'
import
'@/components'
// import _ from 'lodash'
// import _ from 'lodash'
// import axios from 'axios'
// import axios from 'axios'
...
...
src/components/d2-table/index.vue
View file @
1571da7
...
@@ -133,12 +133,7 @@ export default {
...
@@ -133,12 +133,7 @@ export default {
// 表格数据-外部传入
// 表格数据-外部传入
tableData
:
{
tableData
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[
default
:
()
=>
[]
{
name
:
1212
,
status
:
1
}
]
},
},
tableTotal
:
{
tableTotal
:
{
type
:
Number
,
type
:
Number
,
...
@@ -264,9 +259,9 @@ export default {
...
@@ -264,9 +259,9 @@ export default {
params
.
sortColum
=
this
.
sortColum
params
.
sortColum
=
this
.
sortColum
params
.
sort
=
this
.
sort
===
'descending'
?
1
:
0
params
.
sort
=
this
.
sort
===
'descending'
?
1
:
0
}
}
console
.
log
(
this
.
getListApi
)
this
.
getListApi
(
params
).
then
(
res
=>
{
this
.
getListApi
(
params
).
then
(
res
=>
{
// this.data = res[this.tableParams.listName]
this
.
data
=
res
[
this
.
tableParams
.
listName
]
this
.
data
=
res
this
.
total
=
res
.
pagination
.
totalCount
this
.
total
=
res
.
pagination
.
totalCount
this
.
loading
=
false
this
.
loading
=
false
}).
catch
(()
=>
{
}).
catch
(()
=>
{
...
...
src/components/index.js
View file @
1571da7
...
@@ -2,4 +2,3 @@ import Vue from 'vue'
...
@@ -2,4 +2,3 @@ import Vue from 'vue'
// 注意 有些组件使用异步加载会有影响
// 注意 有些组件使用异步加载会有影响
Vue
.
component
(
'd2-table'
,
()
=>
import
(
'./d2-table/index.vue'
))
Vue
.
component
(
'd2-table'
,
()
=>
import
(
'./d2-table/index.vue'
))
src/styles/index.scss
View file @
1571da7
...
@@ -73,3 +73,12 @@ a:hover {
...
@@ -73,3 +73,12 @@ a:hover {
.app-container
{
.app-container
{
padding
:
20px
;
padding
:
20px
;
}
}
// element
.el-table--medium
td
{
padding
:
4px
0
!
important
;
}
.el-table
.cell
{
padding
:
0
0
;
}
\ No newline at end of file
\ No newline at end of file
src/views/customer/glsx/index.vue
View file @
1571da7
<!-- -->
<!-- -->
<
template
>
<
template
>
<div>
<div>
<a
href=
"http://www.glsx.com.cn/"
>
广联赛讯主页
</a>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<d2-table
ref=
"recordTable"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
>
<span
slot=
"auth-button"
slot-scope=
"scope"
:data=
"scope.scope"
>
<el-button
type=
"text"
>
新增
</el-button>
</span>
</d2-table>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getListApi
}
from
'@/api/test'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
searchForm
:
{},
getListApi
:
getListApi
,
// 表格参数
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
'list'
,
tableOption
:
true
,
tableColumns
:
[{
label
:
'id'
,
prop
:
'id'
,
width
:
'80px'
},
{
label
:
'标题'
,
prop
:
'title'
}]
}
}
},
mounted
()
{
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
resolve
()
})
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment