Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rbc-demo
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王衍超
rbc-demo
Commits
89f16eff
Commit
89f16eff
authored
Feb 23, 2022
by
Joey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(@rbc/workflow-job-view): 更新表格为vxetable
parent
6eb25324
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
2296 additions
and
2301 deletions
+2296
-2301
package-lock.json
develop/@rbc/workflow-job-view/package-lock.json
+31
-1
package.json
develop/@rbc/workflow-job-view/package.json
+2
-1
query-tabs-mixins.js
...job-view/src/components/custom-query/query-tabs-mixins.js
+115
-137
query-tabs.vue
...kflow-job-view/src/components/custom-query/query-tabs.vue
+7
-23
cell-val.less
...view/src/components/custom-query/table-view/cell-val.less
+514
-0
index-change.js
...ew/src/components/custom-query/table-view/index-change.js
+0
-2
simple-table-view.vue
.../components/custom-query/table-view/simple-table-view.vue
+0
-109
table-action-column.vue
...omponents/custom-query/table-view/table-action-column.vue
+6
-15
table-view.vue
...iew/src/components/custom-query/table-view/table-view.vue
+152
-2013
action.js
...c/components/custom-query/vxe-table/column-type/action.js
+26
-0
approval.js
...components/custom-query/vxe-table/column-type/approval.js
+133
-0
bill-type.js
...omponents/custom-query/vxe-table/column-type/bill-type.js
+30
-0
compare-time.js
...onents/custom-query/vxe-table/column-type/compare-time.js
+68
-0
hyperlink.js
...omponents/custom-query/vxe-table/column-type/hyperlink.js
+267
-0
img-src.js
.../components/custom-query/vxe-table/column-type/img-src.js
+64
-0
img-txt.js
.../components/custom-query/vxe-table/column-type/img-txt.js
+26
-0
img.js
.../src/components/custom-query/vxe-table/column-type/img.js
+64
-0
index.js
...rc/components/custom-query/vxe-table/column-type/index.js
+35
-0
merge.js
...rc/components/custom-query/vxe-table/column-type/merge.js
+145
-0
object.js
...c/components/custom-query/vxe-table/column-type/object.js
+13
-0
passtatus.js
...omponents/custom-query/vxe-table/column-type/passtatus.js
+32
-0
segment-progress.js
...ts/custom-query/vxe-table/column-type/segment-progress.js
+28
-0
seq.js
.../src/components/custom-query/vxe-table/column-type/seq.js
+20
-0
text-with-tag.js
...nents/custom-query/vxe-table/column-type/text-with-tag.js
+57
-0
time-diff.js
...omponents/custom-query/vxe-table/column-type/time-diff.js
+45
-0
value.js
...rc/components/custom-query/vxe-table/column-type/value.js
+247
-0
table.vue
...-job-view/src/components/custom-query/vxe-table/table.vue
+169
-0
No files found.
develop/@rbc/workflow-job-view/package-lock.json
View file @
89f16eff
...
...
@@ -20,7 +20,8 @@
"view-design"
:
"^4.3.2"
,
"vue"
:
"^2.6.11"
,
"vue-router"
:
"^3.0.3"
,
"vuex"
:
"^3.0.1"
"vuex"
:
"^3.0.1"
,
"vxe-table"
:
"^3.3.9"
},
"devDependencies"
:
{
"@vue/cli-plugin-babel"
:
"~4.5.0"
,
...
...
@@ -17120,6 +17121,16 @@
"vue"
:
"^2.0.0"
}
},
"node_modules/vxe-table"
:
{
"version"
:
"3.3.9"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/vxe-table/-/vxe-table-3.3.9.tgz"
,
"integrity"
:
"sha512-Kbkt+zL/NShByWK+w0bmA9CTpnAwunC/Z1IHjkn3HFRGMmnm+CXE/zx+LJSPRVBwAoG8kjKrOM1QNdIkGTYGsQ=="
,
"license"
:
"MIT"
,
"peerDependencies"
:
{
"vue"
:
"^2.6.0"
,
"xe-utils"
:
"^3.2.0"
}
},
"node_modules/watchpack"
:
{
"version"
:
"1.7.5"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/watchpack/-/watchpack-1.7.5.tgz"
,
...
...
@@ -18137,6 +18148,13 @@
"async-limiter"
:
"~1.0.0"
}
},
"node_modules/xe-utils"
:
{
"version"
:
"3.5.4"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/xe-utils/-/xe-utils-3.5.4.tgz"
,
"integrity"
:
"sha512-oH7VOgvHv34pn198dhKPVKnuEHV22Q06YpCTVnAS3JuutylmZj/rtJGvn0BxxWQ37w2LgCknoebLA4uIGXwFtw=="
,
"license"
:
"MIT"
,
"peer"
:
true
},
"node_modules/xtend"
:
{
"version"
:
"4.0.2"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/xtend/-/xtend-4.0.2.tgz"
,
...
...
@@ -30930,6 +30948,12 @@
"integrity"
:
"sha1-I2vAhqhww655lG8QfxbeWdWJXnE="
,
"requires"
:
{}
},
"vxe-table"
:
{
"version"
:
"3.3.9"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/vxe-table/-/vxe-table-3.3.9.tgz"
,
"integrity"
:
"sha512-Kbkt+zL/NShByWK+w0bmA9CTpnAwunC/Z1IHjkn3HFRGMmnm+CXE/zx+LJSPRVBwAoG8kjKrOM1QNdIkGTYGsQ=="
,
"requires"
:
{}
},
"watchpack"
:
{
"version"
:
"1.7.5"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/watchpack/-/watchpack-1.7.5.tgz"
,
...
...
@@ -31689,6 +31713,12 @@
"async-limiter"
:
"~1.0.0"
}
},
"xe-utils"
:
{
"version"
:
"3.5.4"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/xe-utils/-/xe-utils-3.5.4.tgz"
,
"integrity"
:
"sha512-oH7VOgvHv34pn198dhKPVKnuEHV22Q06YpCTVnAS3JuutylmZj/rtJGvn0BxxWQ37w2LgCknoebLA4uIGXwFtw=="
,
"peer"
:
true
},
"xtend"
:
{
"version"
:
"4.0.2"
,
"resolved"
:
"http://nvwa.jiuqi.com.cn/nexus/repository/npm-gov-group/xtend/-/xtend-4.0.2.tgz"
,
develop/@rbc/workflow-job-view/package.json
View file @
89f16eff
...
...
@@ -21,7 +21,8 @@
"view-design"
:
"^4.3.2"
,
"vue"
:
"^2.6.11"
,
"vue-router"
:
"^3.0.3"
,
"vuex"
:
"^3.0.1"
"vuex"
:
"^3.0.1"
,
"vxe-table"
:
"^3.3.9"
},
"files"
:
[
"dist"
,
...
...
develop/@rbc/workflow-job-view/src/components/custom-query/query-tabs-mixins.js
View file @
89f16eff
...
...
@@ -87,7 +87,6 @@ const queryTabsMixins = {
DEFAULT_REQUEST_URL
:
default_request_url
,
isShowBuildData
:
false
,
//是否展示无数据
tagData
:
[],
//查询条件确定后数组信息
currentPage
:
1
,
//查询当前页码数
labelStr
:
""
,
//当前页签关联的索引值,防止重复点击时数据的查询
iconColor
:
"#fff"
,
//图标颜色
isShowSeniorQueryContent
:
false
,
//高级查询图标切换是否展示内容
...
...
@@ -104,13 +103,10 @@ const queryTabsMixins = {
* 切换pagesize、tab、执行高级查询就重置
*/
selectionRecorder
:
{},
//当前选择的查询数据录入,针对情况分页
totalCount
:
0
,
//表格数据条数
singleCount
:
0
,
multipleCount
:
0
,
judgeCount
:
0
,
canChoseCol
:
[],
pageSize
:
10
,
pageSizeOpts
:
[
10
,
20
,
40
],
seniorQueryData
:
[],
//高级查询对象
quickQueryData
:
[],
//快捷查询对象
GroupInfo
:
""
,
...
...
@@ -123,12 +119,21 @@ const queryTabsMixins = {
jiaz
:
0.0
,
},
isShowScenes
:
true
,
//展示查询方案
tableVisible
:
false
,
//加载状态
spinStyle
:
{
width
:
"100%"
,
height
:
window
.
innerHeight
-
380
+
"px"
,
position
:
"relative"
}
},
pagerConfig
:
{
background
:
true
,
layouts
:
[
'Total'
,
'PrevJump'
,
'PrevPage'
,
'JumpNumber'
,
'NextPage'
,
'NextJump'
,
'Sizes'
,
'FullJump'
],
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
pagerCount
:
5
,
pageSizes
:
[
10
,
20
,
50
,
100
,
200
]
},
loading
:
false
};
},
computed
:
{
...
...
@@ -141,23 +146,20 @@ const queryTabsMixins = {
},
watch
:
{
//监听查询列表页签数组配置变化时处理逻辑
"queryBus.config.groups"
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
==
oldVal
)
{
"queryBus.config.groups"
:
{
handler
(
newVal
,
oldVal
)
{
if
(
newVal
==
oldVal
||
newVal
.
length
==
0
)
{
return
;
}
let
res
=
this
.
queryTabCount
();
res
.
then
(()
=>
{
if
(
!
this
.
defaultGroup
)
{
let
hasGroupCount
=
(
this
.
groupCount
&&
this
.
groupCount
.
enable
);
this
.
queryTabCount
(
hasGroupCount
).
then
((
result
)
=>
{})
.
catch
((
error
)
=>
{})
.
finally
(()
=>
{
this
.
labelStr
=
""
;
this
.
tabOnClick
(
this
.
getIndex
(
this
.
groups
));
}
}).
catch
((
error
)
=>
{
//@king 新加的
if
(
!
this
.
defaultGroup
)
{
this
.
labelStr
=
""
this
.
tabOnClick
(
this
.
getIndex
(
this
.
groups
));
}
});
this
.
tabOnClick
(
this
.
getIndex
(
this
.
groups
))
})
},
immediate
:
true
},
isShowSeniorQueryContent
()
{
this
.
isHeight100
=
this
.
isShowSeniorQueryContent
?
false
:
true
;
...
...
@@ -170,14 +172,23 @@ const queryTabsMixins = {
}
},
methods
:
{
getIndex
(
arr
)
{
for
(
let
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
let
item
=
arr
[
i
];
if
(
item
.
count
!=
0
)
{
return
i
;
}
//判断默认展示的页签信息,优先级:含有isFixed>count大于0的第一页签>默认第一个页签
getIndex
(
groups
)
{
let
cIndex
=
0
,
fIndex
=
0
,
hasFixed
=
false
,
hasCount
=
false
;
groups
.
forEach
((
group
,
index
)
=>
{
if
(
group
.
count
!=
0
&&
!
hasCount
)
{
cIndex
=
index
hasCount
=
true
}
if
(
group
.
isFixed
)
{
fIndex
=
index
hasFixed
=
true
}
return
0
;
})
return
hasFixed
?
fIndex
:
cIndex
},
//控制表格页签中列设置展示
noShowColSet
()
{
...
...
@@ -199,40 +210,21 @@ const queryTabsMixins = {
sendTagData
(
data
)
{
this
.
tagData
=
data
;
},
//获取
查询页签中数据数量
queryTabCount
Old
(
)
{
//获取
页签中数据数量,并对应页签配置增加count和countZero属性
queryTabCount
(
hasGroupCount
)
{
let
that
=
this
;
return
new
Promise
((
res
,
rej
)
=>
{
let
arr
=
[];
//判断每个页签是否含有配置内容,如无则走默认主页签配置内容
return
new
Promise
((
resolve
,
reject
)
=>
{
let
arr
=
[],
params
=
null
,
url
=
QueryUtil
.
api
.
counts
;
for
(
var
g
of
this
.
groups
)
{
if
(
g
.
content
)
{
let
params
=
{
conditions
:
[]
};
params
.
datasource
=
g
.
content
.
datasource
;
if
(
that
.
extrCondition
.
length
>
0
)
{
params
.
conditions
=
params
.
conditions
.
concat
(
that
.
extrCondition
);
}
let
customConditions
=
that
.
queryBus
.
customConditions
;
// 所有页签都用到的过滤条件
if
(
customConditions
&&
customConditions
.
commons
&&
customConditions
.
commons
.
length
!=
0
)
{
params
.
conditions
=
params
.
conditions
?
params
.
conditions
.
concat
(
customConditions
.
commons
)
:
customConditions
.
commons
;
// 自定义页签用到的过滤条件
let
currGroup
=
that
.
queryBus
.
config
.
groups
[
that
.
tabIndex
];
if
(
currGroup
)
{
let
groupCustomConditions
=
customConditions
[
currGroup
.
name
];
if
(
groupCustomConditions
&&
groupCustomConditions
.
length
!=
0
)
{
params
.
conditions
=
params
.
conditions
?
params
.
conditions
.
concat
(
groupCustomConditions
)
:
groupCustomConditions
;
}
}
}
arr
.
push
(
params
);
if
(
hasGroupCount
)
{
arr
.
push
(
g
.
name
)
}
else
{
let
temp
=
{
conditions
:
[]
}
;
temp
.
datasource
=
that
.
content
.
datasource
;
}
temp
.
datasource
=
g
.
content
?
g
.
content
.
datasource
:
that
.
content
.
datasource
if
(
that
.
extrCondition
.
length
>
0
)
{
temp
.
conditions
=
temp
.
conditions
.
concat
(
that
.
extrCondition
);
}
...
...
@@ -252,62 +244,26 @@ const queryTabsMixins = {
arr
.
push
(
temp
);
}
}
//@king
window
.
GMS
.
$http
.
post
(
QueryUtil
.
api
.
counts
,
arr
).
then
(
function
(
response
)
{
//@king
let
values
=
response
.
data
;
for
(
var
i
=
0
;
i
<
values
.
length
;
i
++
)
{
that
.
$set
(
that
.
groups
[
i
],
"count"
,
values
[
i
]
?
values
[
i
]
:
0
);
that
.
$set
(
that
.
groups
[
i
],
"countZero"
,
values
[
i
]
?
(
values
[
i
]
==
0
?
false
:
true
)
:
false
)
}
try
{
res
(
"getCountSuccess"
);
}
catch
(
e
)
{
console
.
log
(
e
);
}
}).
catch
((
e
)
=>
{
rej
(
"getCountError"
);
});
});
},
//自定义获取查询页签数据数量
queryTabCountNew
()
{
let
that
=
this
;
return
new
Promise
((
res
,
rej
)
=>
{
let
groupNames
=
[];
for
(
var
g
of
this
.
groups
)
{
groupNames
.
push
(
g
.
name
);
}
//@king
// window.GMS.$http.post(this.rootUrl + "/advance/query/groupCount", {
window
.
GMS
.
$http
.
post
(
QueryUtil
.
api
.
groupCount
,
{
if
(
hasGroupCount
)
{
url
=
QueryUtil
.
api
.
groupCount
params
=
{
groupCount
:
this
.
groupCount
,
groupNames
:
groupNames
groupNames
:
arr
}
}
else
{
params
=
arr
}
).
then
(
function
(
response
)
{
GMS
.
$http
.
post
(
url
,
params
).
then
(
response
=>
{
let
values
=
response
.
data
;
for
(
var
i
=
0
;
i
<
values
.
length
;
i
++
)
{
that
.
$set
(
that
.
groups
[
i
],
"count"
,
values
[
i
]
?
values
[
i
]
:
0
);
that
.
$set
(
that
.
groups
[
i
],
"countZero"
,
values
[
i
]
?
(
values
[
i
]
==
0
?
false
:
true
)
:
false
);
}
res
(
"getCountSuccess"
);
}).
catch
(
function
(
e
)
{
rej
(
"getCountError"
);
});
});
},
//获取页签中数据数量
queryTabCount
()
{
if
(
this
.
groupCount
&&
this
.
groupCount
.
enable
)
{
return
this
.
queryTabCountNew
();
}
else
{
return
this
.
queryTabCountOld
();
}
resolve
(
"getCountSuccess"
);
}).
catch
(
error
=>
{
reject
(
"getCountError"
);
})
})
},
//动态获取面板展示标题和数量的信息,同时支持页签图标配置属性为tabIcon
getTitleAndCount
(
tab
)
{
...
...
@@ -396,7 +352,6 @@ const queryTabsMixins = {
}
this
.
handleClearSelection
();
//可能存在问题???是否会影响到查询中心???
this
.
tableVisible
=
true
;
this
.
$nextTick
(()
=>
{
this
.
$refs
.
toolBar
.
noShowColSet
=
true
;
this
.
isShowSeniorQueryContent
=
false
;
...
...
@@ -451,6 +406,23 @@ const queryTabsMixins = {
this
.
leftSeniorQuery
.
push
(
item
);
}
},
//重新处理表格中查询列,将彻底隐藏的列进行移除
getNewTableByColumnDisplay
(
table
)
{
let
newColumns
=
[];
table
.
columns
.
forEach
(
async
(
column
,
index
)
=>
{
let
columnType
=
column
.
columnType
;
if
(
columnType
&&
columnType
.
name
!=
'inner'
&&
columnType
.
visible
&&
columnType
.
visible
.
type
==
'column'
&&
QueryUtil
.
hasElementInCollector
(
'columnDisplay'
,
columnType
.
visible
.
function
))
{
let
result
=
await
QueryUtil
.
columnDisplay
(
this
,
columnType
.
visible
.
function
,
column
,
null
)
if
(
result
.
result
)
{
newColumns
.
splice
(
index
,
0
,
column
)
}
}
else
{
newColumns
.
push
(
column
)
}
})
table
.
columns
=
newColumns
return
table
},
//根据改变页签初始化页签配置内容
loadContent
(
currGroup
)
{
let
currContent
=
undefined
;
...
...
@@ -473,7 +445,7 @@ const queryTabsMixins = {
}
this
.
queryBus
.
currGroup
.
content
=
JSON
.
parse
(
JSON
.
stringify
(
currContent
));
this
.
currentContent
=
currContent
;
this
.
table
=
currContent
.
table
;
this
.
table
=
this
.
getNewTableByColumnDisplay
(
currContent
.
table
)
;
this
.
pageSet
=
currContent
.
page
;
// this.toolbar = currContent.actions;
this
.
filterToolActionsByRole
(
currContent
.
actions
);
...
...
@@ -482,14 +454,14 @@ const queryTabsMixins = {
this
.
queryBus
.
datasource
=
currContent
.
datasource
;
this
.
queryBus
.
page
.
pageNum
=
1
;
this
.
queryBus
.
page
.
pageSize
=
currContent
.
table
.
pageSize
?
currContent
.
table
.
pageSize
:
10
;
this
.
page
Size
=
currContent
.
tabl
e
.
pageSize
;
this
.
page
rConfig
.
pageSize
=
this
.
queryBus
.
pag
e
.
pageSize
;
/**
* zjy添加
*/
this
.
queryBus
.
orders
=
[];
this
.
queryBus
.
groupBy
=
[];
this
.
queryBus
.
seniorQueryData
=
[];
this
.
currentPage
=
1
;
this
.
pagerConfig
.
currentPage
=
1
;
window
.
GMS
.
vbus
.
$emit
(
"clearQueryConditions"
,
this
.
emitFlag
);
window
.
GMS
.
vbus
.
$emit
(
"closeAllTag"
,
this
.
emitFlag
);
this
.
loadInnerScene
(
currContent
.
scenes
);
...
...
@@ -591,6 +563,7 @@ const queryTabsMixins = {
},
//获取当前所有查询条件
getCurrConditions
()
{
this
.
addDefaultConditions
();
let
conditions
=
[];
conditions
=
this
.
extrCondition
.
length
!=
0
?
conditions
.
concat
(
this
.
extrCondition
)
:
conditions
;
let
fuzzySearchCondition
=
this
.
getFuzzySearchCondition
();
...
...
@@ -601,6 +574,11 @@ const queryTabsMixins = {
conditions
=
customConditions
&&
customConditions
.
length
>
0
?
conditions
.
concat
(
customConditions
)
:
conditions
;
return
conditions
;
},
addDefaultConditions
(){
if
(
this
.
defaultSeniorQuery
&&
this
.
defaultSeniorQuery
.
length
>
0
){
QueryUtil
.
formatDefaultConditions
(
this
.
defaultSeniorQuery
,
this
);
}
},
//获取模糊搜索条件
getFuzzySearchCondition
()
{
if
(
this
.
queryBus
.
fuzzySearch
.
key
&&
this
.
queryBus
.
fuzzySearch
.
value
)
{
...
...
@@ -672,11 +650,11 @@ const queryTabsMixins = {
},
//刷新页签动作执行按钮
buttonRefreshData
()
{
this
.
currentPage
=
1
;
this
.
pagerConfig
.
currentPage
=
1
;
this
.
queryBus
.
page
.
pageNum
=
1
;
this
.
refreshData
(
"queryTabs-buttonRefreshData"
);
},
//不同条件下获取数据刷新触发
?
//不同条件下获取数据刷新触发
refreshData
(
whereFrom
)
{
switch
(
whereFrom
)
{
case
"custom-query-selectall"
:
...
...
@@ -703,12 +681,12 @@ const queryTabsMixins = {
reqData
.
page
.
size
=
this
.
queryBus
.
page
.
pageSize
;
this
.
queryBus
.
page
.
pageNum
=
1
this
.
currentPage
=
1
this
.
pageSize
=
this
.
queryBus
.
page
.
pageSize
this
.
pagerConfig
.
currentPage
=
1
this
.
page
rConfig
.
page
Size
=
this
.
queryBus
.
page
.
pageSize
}
this
.
tableData
=
[];
this
.
totalCount
=
0
;
//@king 改成
window.
GMS.$http
this
.
loading
=
true
;
//@king 改成GMS.$http
window
.
GMS
.
$http
.
post
(
QueryUtil
.
api
.
query
,
reqData
...
...
@@ -719,7 +697,7 @@ const queryTabsMixins = {
this
.
handleSelectAllData
(
data
);
}
else
{
if
(
data
.
rows
.
length
<
1
&&
this
.
queryBus
.
page
.
pageNum
>
1
)
{
this
.
onPage
NumChange
(
this
.
queryBus
.
page
.
pageNum
-
1
);
this
.
onPage
Change
(
this
.
queryBus
.
page
.
pageNum
-
1
,
this
.
queryBus
.
page
.
pageSize
);
return
;
}
this
.
tableData
=
data
.
rows
;
...
...
@@ -734,14 +712,16 @@ const queryTabsMixins = {
this
.
$set
(
row
,
"_checked"
,
recordIds
.
indexOf
(
row
.
id
)
>=
0
?
true
:
false
)
}
}
this
.
totalCount
=
data
.
totalCount
;
this
.
isShowBuildData
=
this
.
totalCount
==
0
?
true
:
false
;
this
.
pagerConfig
.
total
=
data
.
totalCount
;
//当前页签根据刷新数据的条数进行页签数量重新赋值
this
.
$set
(
this
.
groups
[
this
.
tabIndex
],
"count"
,
data
.
totalCount
);
this
.
isShowBuildData
=
this
.
pagerConfig
.
total
==
0
?
true
:
false
;
this
.
queryBus
.
currentDataQueryConditionSet
=
reqData
;
}
this
.
tableVisible
=
tru
e
;
this
.
loading
=
fals
e
;
}).
catch
(
error
=>
{
this
.
tableData
=
[];
this
.
totalCount
=
0
;
this
.
pagerConfig
.
total
=
0
;
});
if
(
this
.
table
.
cardTotal
&&
!
isSelectAll
)
{
this
.
loadCardTotalInfo
();
...
...
@@ -764,7 +744,6 @@ const queryTabsMixins = {
let
attr
=
i
+
1
;
this
.
selectionRecorder
[
attr
]
=
record
;
}
this
.
tableVisible
=
true
;
},
//清空查询列选择
handleClearSelection
()
{
...
...
@@ -809,6 +788,9 @@ const queryTabsMixins = {
this
.
tableSelection
=
[];
this
.
tableSelection
.
push
(
rowData
);
},
onSelectAll
(
selecttion
)
{
this
.
tableSelection
=
selecttion
;
},
//查询表格选择状态或数据进行改变时触发,该触发值为数组
onSelectionChange
(
selection
)
{
let
shouldReturn
=
false
;
...
...
@@ -917,18 +899,13 @@ const queryTabsMixins = {
result
.
conditions
=
this
.
getCurrConditions
();
return
result
;
},
//分页页码进行改变时触发
onPageNumChange
(
val
)
{
this
.
queryBus
.
page
.
pageNum
=
val
;
this
.
currentPage
=
val
;
this
.
refreshData
(
"queryTabs--onPageNumchange"
);
this
.
$emit
(
"on-querytab-pagechange"
,
val
);
},
//分页条数进行改变时触发
onPageSizeChange
(
val
)
{
this
.
queryBus
.
page
.
pageSize
=
val
;
this
.
refreshData
(
"queryTabs--onpagesizechange"
);
this
.
$emit
(
"on-querytab-pagesizechange"
,
val
);
//对于分页中页码或条数改变时触发
onPageChange
(
num
,
size
)
{
this
.
queryBus
.
page
.
pageNum
=
num
this
.
queryBus
.
page
.
pageSize
=
size
this
.
pagerConfig
.
currentPage
=
num
this
.
pagerConfig
.
pageSize
=
size
this
.
refreshData
()
},
//加载已保存的查询场景
loadScene
()
{
...
...
@@ -946,12 +923,13 @@ const queryTabsMixins = {
{
contentType
:
"application/json"
,
}
).
then
((
response
)
=>
{
).
then
(
response
=>
{
if
(
response
.
status
!=
200
)
{
return
}
let
data
=
response
.
data
;
that
.
scenes
=
[];
that
.
sceneAddInner
();
//@king
// let customScene = JSON.parse(data);
let
customScene
=
data
;
if
(
customScene
.
length
>
0
)
{
that
.
scenes
.
push
(
customScene
);
...
...
@@ -959,7 +937,7 @@ const queryTabsMixins = {
}).
catch
((
error
)
=>
{
that
.
scenes
=
[];
that
.
sceneAddInner
();
th
is
.
$Message
.
error
(
"查询方案获取失败"
);
th
at
.
$Message
.
error
(
"查询方案获取失败"
);
});
},
//将需要展示的查询场景存放在查询场景数组中
...
...
develop/@rbc/workflow-job-view/src/components/custom-query/query-tabs.vue
View file @
89f16eff
...
...
@@ -26,23 +26,23 @@
<div
class=
'tableContent'
>
<!--查询表格内容区域-->
<table-content
v-if=
"tableVisible"
ref=
'tableContent'
@
noShowColSet=
'noShowColSet'
:queryHandler=
"queryHandler"
:queryBus=
"queryBus"
:table=
'table'
:summerData=
"summerData"
:tableData=
'tableData'
:tableHeight=
'tableHeight'
:extraActionObject=
'extraActionObject'
:pager-config=
"pagerConfig"
:loading=
"loading"
@
onSelectionChange=
"onSelectionChange"
@
onSelectAll=
"onSelectAll"
@
onCurrentChange=
"onCurrentChange"
@
on-refresh=
"refreshData"
:tableHeight=
'tableHeigh
t'
:extraActionObject=
'extraActionObject'
@
noShowColSet=
'noShowColSe
t'
@
on-page-change=
"onPageChange"
/>
<div
v-if=
"!tableVisible"
:style=
"spinStyle"
>
<Spin
fix
></Spin>
</div>
<!--无数据内容展示-->
<no-data-can-build
v-if=
'isShowBuildData'
...
...
@@ -51,22 +51,6 @@
/>
</div>
<div
class=
"height5"
></div>
<div
class=
"pageContent"
v-if=
"!(pageSet && pageSet.isShowPage == false)"
>
<!--分页区域-->
<Page
ref=
"pageContent"
class=
'pagePosition'
:total=
"totalCount"
:current=
'currentPage'
show-total
show-elevator
show-sizer
:page-size=
'pageSize'
:page-size-opts=
'pageSizeOpts'
@
on-change=
"onPageNumChange"
@
on-page-size-change=
"onPageSizeChange"
/>
</div>
</
template
>
</div>
</template>
...
...
develop/@rbc/workflow-job-view/src/components/custom-query/table-view/cell-val.less
0 → 100644
View file @
89f16eff
/*
样式展示为三种:
1. 文本有颜色; val_textColor***
2. 文本为白色,背景色变化;val_textWhiteBg***
3. 文本、边框为同一颜色 val_textWithBorder***
*/
/* 文本为白色,背景色变化 */
/deep/ .val_textWhiteBgB48E6C {
color: #fff;
background: #b48e6c;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgFF8286 {
color: #fff;
background: #ff8286;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg8AD05E {
color: #fff;
background: #8ad05e;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg53CEDF {
color: #fff;
background: #53cedf;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg9778CF {
color: #fff;
background: #9778cf;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgFA6450 {
color: #fff;
background: #fa6450;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgFA6483 {
color: #fff;
background: #fa6483;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg847CE4 {
color: #fff;
background: #847ce4;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg96CE44 {
color: #fff;
background: #96ce44;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg5DA6FF {
color: #fff;
background: #5da6ff;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgE0984D {
color: #fff;
background: #e0984d;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg62D59C {
color: #fff;
background: #62d59c;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg55B5EC {
color: #fff;
background: #55b5ec;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgE973C1 {
color: #fff;
background: #e973c1;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgEFA93A {
color: #fff;
background: #efa93a;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgFF904C {
color: #fff;
background: #ff904c;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg6F8AFF {
color: #fff;
background: #6f8aff;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg68DBDB {
color: #fff;
background: #68dbdb;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgF47364 {
color: #fff;
background: #f47364;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgB1CA6D {
color: #fff;
background: #b1ca6d;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg6AD45A {
color: #fff;
background: #6ad45a;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgB56DEB {
color: #fff;
background: #b56deb;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg967BFF {
color: #fff;
background: #967bff;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgE588F2 {
color: #fff;
background: #e588f2;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgD6C145 {
color: #fff;
background: #d6c145;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgFF9902 {
color: #fff;
background: #ff9902;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg4899FF {
color: #fff;
background: #4899ff;
padding: 1px 4px;
}
/deep/ .val_textWhiteBgFA6450 {
color: #fff;
background: #fa6450;
padding: 1px 4px;
}
/deep/ .val_textWhiteBg52C851 {
color: #fff;
background: #52c851;
padding: 1px 4px;
}
/* 文本、边框为同一颜色 */
/deep/ .val_textWithBorder7BB100 {
color: #7bb100;
border: 1px solid #7bb100;
padding: 1px 4px;
}
/deep/ .val_textWithBorder198CF2 {
color: #198cf2;
border: 1px solid #198cf2;
padding: 1px 4px;
}
/deep/ .val_textWithBorder895AD1 {
color: #895ad1;
border: 1px solid #895ad1;
padding: 1px 4px;
}
/deep/ .val_textWithBorderFD9000 {
color: #fd9000;
border: 1px solid #fd9000;
padding: 1px 4px;
}
/deep/ .val_textWithBorder37AF59 {
color: #37af59;
border: 1px solid #37af59;
padding: 1px 4px;
}
/deep/ .val_textWithBorder5E61DD {
color: #5e61dd;
border: 1px solid #5e61dd;
padding: 1px 4px;
}
/deep/ .val_textWithBorder17BCBA {
color: #17bcba;
border: 1px solid #17bcba;
padding: 1px 4px;
}
/deep/ .val_textWithBorderDD41A8 {
color: #dd41a8;
border: 1px solid #dd41a8;
padding: 1px 4px;
}
/deep/ .val_textWithBorder6E65D7 {
color: #6e65d7;
border: 1px solid #6e65d7;
padding: 1px 4px;
}
/deep/ .val_textWithBorder72A921 {
color: #72a921;
border: 1px solid #72a921;
padding: 1px 4px;
}
/deep/ .val_textWithBorder4192F5 {
color: #4192f5;
border: 1px solid #4192f5;
padding: 1px 4px;
}
/deep/ .val_textWithBorderDC7F1E {
color: #dc7f1e;
border: 1px solid #dc7f1e;
padding: 1px 4px;
}
/deep/ .val_textWithBorderE849B2 {
color: #e849b2;
border: 1px solid #e849b2;
padding: 1px 4px;
}
/deep/ .val_textWithBorder2BB772 {
color: #2bb772;
border: 1px solid #2bb772;
padding: 1px 4px;
}
/deep/ .val_textWithBorderF07428 {
color: #f07428;
border: 1px solid #f07428;
padding: 1px 4px;
}
/deep/ .val_textWithBorder4365F8 {
color: #4365f8;
border: 1px solid #4365f8;
padding: 1px 4px;
}
/deep/ .val_textWithBorder8E9A28 {
color: #8e9a28;
border: 1px solid #8e9a28;
padding: 1px 4px;
}
/deep/ .val_textWithBorder0DBAB8 {
color: #0dbab8;
border: 1px solid #0dbab8;
padding: 1px 4px;
}
/deep/ .val_textWithBorderF46655 {
color: #f46655;
border: 1px solid #f46655;
padding: 1px 4px;
}
/deep/ .val_textWithBorderEF9608 {
color: #ef9608;
border: 1px solid #ef9608;
padding: 1px 4px;
}
/deep/ .val_textWithBorder41AD30 {
color: #41ad30;
border: 1px solid #41ad30;
padding: 1px 4px;
}
/deep/ .val_textWithBorder9A51D1 {
color: #9a51d1;
border: 1px solid #9a51d1;
padding: 1px 4px;
}
/deep/ .val_textWithBorder5D9E69 {
color: #5d9e69;
border: 1px solid #5d9e69;
padding: 1px 4px;
}
/deep/ .val_textWithBorder7C61E4 {
color: #7c61e4;
border: 1px solid #7c61e4;
padding: 1px 4px;
}
/deep/ .val_textWithBorderC261D0 {
color: #c261d0;
border: 1px solid #c261d0;
padding: 1px 4px;
}
/deep/ .val_textWithBorderAD845A {
color: #ad845a;
border: 1px solid #ad845a;
padding: 1px 4px;
}
/deep/ .val_textWithBorder4E93A4 {
color: #4e93a4;
border: 1px solid #4e93a4;
padding: 1px 4px;
}
/deep/ .val_textWithBorder7D9D4C {
color: #7d9d4c;
border: 1px solid #7d9d4c;
padding: 1px 4px;
}
/deep/ .val_textWithBorderA59222 {
color: #a59222;
border: 1px solid #a59222;
padding: 1px 4px;
}
/deep/ .val_textWithBorderFF4C4C {
color: #ff4c4c;
border: 1px solid #ff4c4c;
padding: 1px 4px;
}
/deep/ .val_textWithBorder037DDA {
color: #037dda;
border: 1px solid #037dda;
padding: 1px 4px;
}
/deep/ .val_textWithBorder6E65D7 {
color: #6e65d7;
border: 1px solid #6e65d7;
padding: 1px 4px;
}
/deep/ .val_textWithBorderF27D05 {
color: #f27d05;
border: 1px solid #f27d05;
padding: 1px 4px;
}
/deep/ .val_textWithBorder19AE42 {
color: #19ae42;
border: 1px solid #19ae42;
padding: 0px 4px;
}
/deep/ .val_textWithBorder00A7BF {
color: #00a7bf;
border: 1px solid #00a7bf;
padding: 1px 4px;
}
/* 文本有颜色 */
/deep/ .val_textColor1D9DE6 {
color: #1d9de6;
}
/deep/ .val_textColorC2A600 {
color: #c2a600;
}
/deep/ .val_textColorED970F {
color: #ed970f;
}
/deep/ .val_textColorA049E0 {
color: #a049e0;
}
/deep/ .val_textColorE14CAE {
color: #e14cae;
}
/deep/ .val_textColorF14065 {
color: #f14065;
}
/deep/ .val_textColor44B200 {
color: #44b200;
}
/deep/ .val_textColorFF9D00 {
color: #ff9d00;
}
/deep/ .val_textColor008CF8 {
color: #008cf8;
}
/deep/ .val_textColorF55858 {
color: #f55858;
}
/deep/ .val_textColor56BA3E {
color: #56ba3e;
}
/deep/ .val_textColorED664B {
color: #ed664b;
}
/deep/ .val_textColor0A90DC {
color: #0a90dc;
}
/deep/ .val_green {
color: #fff;
background: #93cb57;
padding: 2px 5px;
}
/deep/ .val_orange {
color: #fff;
background: #efad60;
padding: 2px 5px;
}
/deep/ .val_blue {
color: #fff;
background: #6bcde7;
padding: 2px 5px;
}
/deep/ .val_Red {
color: #fff;
background: rgb(252, 46, 5);
padding: 2px 5px;
}
/deep/ .val_purple {
color: #fff;
background: #a183dd;
padding: 2px 5px;
}
/deep/ .val_brown {
color: #fff;
background: #b48e6c;
padding: 2px 5px;
}
/deep/ .val_deepgreen {
color: #fff;
background: rgb(3, 95, 49);
padding: 2px 5px;
}
/deep/ .val_yellow {
color: #fff;
background: rgb(216, 219, 7);
padding: 2px 5px;
}
/deep/ .val_purpleWithBorder {
color: #a183dd;
border: 1px solid #a183dd;
padding: 0 3px;
}
/deep/ .val_greenWithBorder {
color: #41ae8b;
border: 1px solid #41ae8b;
padding: 0 3px;
}
/deep/ .val_yellowWithBorder {
color: #77ae14;
border: 1px solid #77ae14;
padding: 0 3px;
}
/deep/ .val_orangeWithBorder {
color: #f17a0e;
border: 1px solid #f17a0e;
padding: 0 3px;
}
/deep/ .val_zanglWithBorder {
color: rgb(25, 124, 149);
border: 1px solid rgb(25, 124, 149);
padding: 0 3px;
}
/deep/ .val_redWithBorder {
color: #ec5e5e;
border: 1px solid #ec5e5e;
padding: 0 3px;
}
/deep/ .val_blueWithBorder {
color: #3477cb;
border: 1px solid #3477cb;
padding: 0 3px;
}
/deep/ .val_littleblueWithBorder {
color: rgb(73, 128, 195);
border: 1px solid rgb(73, 128, 195);
padding: 0 3px;
}
/deep/ .val_greyWithBorder {
color: rgb(191, 196, 205);
border: 1px solid rgb(191, 196, 205);
padding: 0 3px;
}
/deep/ .orangeRed {
color: #ed664b;
}
/deep/ .HyperlinkStyle {
color: #3477cb;
}
/deep/ .val_deepBlue {
color: #3477cb;
}
/deep/ .val_deepOrange {
color: #ff9902;
}
/deep/ .val_greenBg {
display: inline-block;
padding: 3px 12px;
color: #fff;
background-color: #93cb57;
}
/deep/ .val_redBg {
padding: 2px 5px;
color: #fff;
background-color: #ed664b;
}
/deep/ .val_deepRed {
color: #ed664b;
}
/deep/ .val_deepPurple {
color: rgb(179, 2, 149);
}
/deep/ .val_deepGreen {
color: #52d49a;
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/table-view/index-change.js
deleted
100644 → 0
View file @
6eb25324
import
tableViewChange
from
'./table-view-change.vue'
export
default
tableViewChange
develop/@rbc/workflow-job-view/src/components/custom-query/table-view/simple-table-view.vue
deleted
100644 → 0
View file @
6eb25324
<
template
>
<div
class=
"simpleTableContentBody"
>
<Table
:columns=
'columnsData'
:data=
'tableData'
></Table>
</div>
</
template
>
<
script
>
export
default
{
name
:
"simpleTableContent"
,
data
()
{
return
{
columnsData
:[
{
type
:
'selection'
,
width
:
60
,
align
:
'center'
},
{
type
:
'index'
,
width
:
60
,
align
:
'center'
},
{
title
:
'Name'
,
key
:
'name'
,
width
:
100
},
{
title
:
'Age'
,
key
:
'age'
,
width
:
100
},
{
title
:
'Address'
,
key
:
'address'
,
width
:
200
}
],
tableData
:[
{
name
:
'John Brown'
,
age
:
18
,
address
:
'New York No. 1 Lake Park'
,
job
:
'Data engineer'
,
interest
:
'badminton'
,
birthday
:
'1991-05-14'
,
book
:
'Steve Jobs'
,
movie
:
'The Prestige'
,
music
:
'I Cry'
},
{
name
:
'Jim Green'
,
age
:
25
,
address
:
'London No. 1 Lake Park'
,
job
:
'Data Scientist'
,
interest
:
'volleyball'
,
birthday
:
'1989-03-18'
,
book
:
'My Struggle'
,
movie
:
'Roman Holiday'
,
music
:
'My Heart Will Go On'
},
{
name
:
'Joe Black'
,
age
:
30
,
address
:
'Sydney No. 1 Lake Park'
,
job
:
'Data Product Manager'
,
interest
:
'tennis'
,
birthday
:
'1992-01-31'
,
book
:
'Win'
,
movie
:
'Jobs'
,
music
:
'Don’t Cry'
},
{
name
:
'Jon Snow'
,
age
:
26
,
address
:
'Ottawa No. 2 Lake Park'
,
job
:
'Data Analyst'
,
interest
:
'snooker'
,
birthday
:
'1988-7-25'
,
book
:
'A Dream in Red Mansions'
,
movie
:
'A Chinese Ghost Story'
,
music
:
'actor'
}
]
};
},
props
:
{
},
watch
:
{
},
methods
:
{
},
created
()
{
},
updated
(){
},
mounted
()
{
}
};
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
develop/@rbc/workflow-job-view/src/components/custom-query/table-view/table-action-column.vue
View file @
89f16eff
<
template
>
<!--关于操作列之后应该做的控制为:超过三个的情况下,第三个变成更多,通过下拉选择来进行触发,这时候需要考虑关于按钮隐藏的情况-->
<div
class=
"actions-column"
>
<div
class=
"action"
v-for=
"(action, index) in actionList"
:key=
"index"
>
<Button
...
...
@@ -124,14 +125,6 @@ export default {
formulaCache
=
""
,
dynamicNodeFactory
=
""
,
expression
;
var
AbstractData
=
function
(
value
,
dataType
,
isNull
,
formData
,
fieldKey
)
{
this
.
Value
=
value
;
this
.
dataType
=
dataType
;
this
.
isNull
=
isNull
;
this
.
formData
=
formData
;
this
.
fieldKey
=
fieldKey
;
}
var
QueryKeyNode
=
function
(
key
)
{
this
.
assignData
=
function
()
{};
this
.
getResult
=
function
()
{
...
...
@@ -181,15 +174,14 @@ export default {
tabName
:
this
.
queryBus
.
currGroup
.
name
};
for
(
let
i
=
0
,
len
=
actions
.
length
;
i
<
len
;
i
++
)
{
let
val
=
JSON
.
parse
(
JSON
.
stringify
(
param
));
val
[
"actionParam"
]
=
actions
[
i
].
param
;
val
.
_key
=
actions
[
i
].
name
;
param
[
"actionParam"
]
=
actions
[
i
].
param
;
param
.
_key
=
actions
[
i
].
name
;
result
.
push
(
queryUtil
.
actionDisplay
(
this
,
null
,
actions
[
i
].
visible
.
function
,
val
,
param
,
null
,
currentNameObject
)
...
...
@@ -206,14 +198,13 @@ export default {
let
result
=
[];
for
(
let
i
=
0
,
len
=
actions
.
length
;
i
<
len
;
i
++
)
{
if
(
!
actions
[
i
].
hasOwnProperty
(
"enable"
))
{
let
val
=
JSON
.
parse
(
JSON
.
stringify
(
param
));
val
.
_key
=
actions
[
i
].
name
;
param
.
_key
=
actions
[
i
].
name
;
result
.
push
(
queryUtil
.
actionEnable
(
this
,
null
,
actions
[
i
].
disabled
.
function
,
val
param
)
);
}
...
...
develop/@rbc/workflow-job-view/src/components/custom-query/table-view/table-view.vue
View file @
89f16eff
<
template
>
<div
class=
"tableContentBody workflow-job-view-table"
>
<custom-table-view
v-if=
"showTableView"
<div
class=
"tableContentBody"
>
<vxe-table-view
ref=
'table'
class=
"gams-table-view"
:border=
"true"
:showSummerData=
"showSummerData"
:summerData=
"summerData"
:table=
"table"
...
...
@@ -12,9 +9,10 @@
:row-class-name=
"rowClassName"
:columns=
"newColumnsData"
:loading=
"loading"
:data=
"tableData"
:
table-
data=
"tableData"
:highlight-row=
'isHighLightRow'
:height=
'tableHeight'
:pager-config=
"pagerConfig"
@
on-current-change=
'onCurrentChange'
@
on-selection-change=
'onSelectionChange'
@
on-select-all=
'onSelectAll'
...
...
@@ -22,9 +20,9 @@
@
on-sort-change=
'onSortChange'
@
on-select=
"onCurrentSelect"
@
on-select-cancel=
"onCurrentSelectCancel"
@
on-column-width-resize=
"widthResize"
@
on-row-click=
"onRowClick"
@
on-row-dblclick=
"onRowDbclick"
@
on-page-change=
"pageChange"
/>
<Modal
v-model=
"visible"
>
<img
v-if=
"visible"
:src=
"visibleUrl"
style=
"width: 100%"
onerror=
"javascript:this.src='../../../assets/image/tjtp.png';"
/>
...
...
@@ -32,38 +30,28 @@
</div>
</
template
>
<
script
>
import
CustomTableView
from
"../../custom-table/components/table.vue"
;
import
queryUtil
from
"../queryUtil"
;
import
NumUtils
from
"../../utils/numUtils"
;
import
CustomPoptip
from
"../../custom-poptip/components/custom-poptip.vue"
;
import
CustomQueryTableAction
from
"./table-action-column.vue"
;
import
BillType
from
"../billType.vue"
;
import
SegmentProgress
from
"../segmentProgress.vue"
;
import
VxeTableView
from
"../vxe-table/table.vue"
export
default
{
name
:
"TableContent"
,
data
()
{
return
{
showSummerData
:
false
,
//是否展示合计数据
isHaveChildrenColums
:
false
,
//该属性只是改变了赋值并没有在逻辑中使用
loading
:
false
,
//表格内容是否加载
visible
:
false
,
//控制弹窗展示变量
visibleUrl
:
""
,
//在弹窗中可展示的图片路径
noDataText
:
""
,
stepData
:
null
,
//针对审批组件的数据信息
sumShow
:
false
,
//合计信息是否展示
isHighLightRow
:
false
,
//是否高亮行
pageSize
:
20
,
columnsData
:
[],
//查询列渲染对象格式内容
singleCol
:
{},
//查询列渲染对象
businessPoptipContent
:
{},
showTableView
:
true
,
showTableView
:
true
,
tmpData
:
{
children
:[]},
tagGmsColType
:
null
};
},
components
:
{
CustomTableView
,
CustomPoptip
,
BillType
,
SegmentProgress
VxeTableView
},
props
:
{
//合计信息数据
...
...
@@ -96,10 +84,7 @@ export default {
required
:
false
},
tableHeight
:
{
type
:
Number
,
default
:
function
()
{
return
window
.
innerHeight
-
380
;
}
type
:
Number
},
queryHandler
:
{
type
:
Object
...
...
@@ -107,17 +92,25 @@ export default {
context
:
{},
extraActionObject
:
{
type
:
[
Object
,
Array
]
},
pagerConfig
:
{
type
:
Object
},
loading
:
{
type
:
Boolean
}
},
computed
:
{
newColumnsData
()
{
const
columns
=
this
.
table
.
columns
if
(
columns
)
{
for
(
let
i
=
0
;
i
<
columns
.
length
;
i
++
)
{
if
(
columns
[
i
].
bodyAlign
)
{
const
tableColumns
=
this
.
table
.
columns
if
(
tableColumns
)
{
for
(
let
i
=
0
;
i
<
tableColumns
.
length
;
i
++
)
{
let
tableColumn
=
tableColumns
[
i
];
if
(
tableColumn
.
bodyAlign
)
{
for
(
let
j
=
0
;
j
<
this
.
columnsData
.
length
;
j
++
)
{
if
(
this
.
columnsData
[
j
].
key
===
columns
[
i
].
key
)
{
this
.
columnsData
[
j
].
className
=
`column-align-
${
columns
[
i
].
bodyAlign
}
`
let
column
=
this
.
columnsData
[
j
];
if
(
column
.
key
===
tableColumn
.
key
)
{
column
.
className
=
`column-align-
${
tableColumn
.
bodyAlign
}
`
}
}
}
...
...
@@ -139,11 +132,8 @@ export default {
immediate
:
true
},
table
:
{
handler
:
function
()
{
//this.loading = true;
handler
:
function
(
val
)
{
this
.
createColumns
();
// this.loading = false
if
(
this
.
table
.
total
&&
this
.
tableData
&&
this
.
tableData
.
length
>
0
)
{
this
.
showSummerData
=
this
.
table
.
total
;
}
else
{
...
...
@@ -162,8 +152,6 @@ export default {
this
.
showSummerData
=
false
;
}
this
.
sumShow
=
this
.
tableData
.
length
>
0
?
true
:
false
;
this
.
loading
=
false
;
//计算序列号宽度
this
.
computeSerialNumberWidth
();
});
},
...
...
@@ -171,27 +159,28 @@ export default {
}
},
methods
:
{
//增加未添加的VXETable渲染器内容
addVXETableRenderer
(
type
)
{
let
renderColumn
=
GMS
.
getContext
().
getCollector
().
getElement
(
"queryCustomColumn"
,
type
);
if
(
renderColumn
)
{
window
.
Vue
.
$VXETable
.
renderer
.
add
(
'Query'
+
type
,
renderColumn
)
}
else
{
this
.
$Message
.
warning
(
"未注册"
+
type
+
"类型列组件"
)
}
},
//计算序列号宽度
computeSerialNumberWidth
(){
if
(
!
this
.
table
.
serialNumber
)
{
return
;
}
let
startIndex
=
(
this
.
queryBus
.
page
.
pageNum
-
1
)
*
this
.
queryBus
.
page
.
pageSize
;
let
maxnum
=
startIndex
+
this
.
tableData
.
length
;
let
span
=
window
.
$
(
'<span style="font-size: 14px;position: absolute;left: -500px;"></span>'
).
text
(
maxnum
)
window
.
$
(
'body'
).
append
(
span
);
let
span
=
$
(
'<span style="font-size: 14px;position: absolute;left: -500px;"></span>'
).
text
(
maxnum
)
$
(
'body'
).
append
(
span
);
let
width
=
span
[
0
].
offsetWidth
+
22
;
this
.
serialNumberColumnConfig
.
width
=
width
<
50
?
50
:
width
;
span
.
remove
();
},
//表格宽度自适应
widthResize
(
width
,
moveWidth
,
column
,
event
)
{
for
(
let
i
=
0
,
len
=
this
.
$refs
.
table
.
cloneColumns
.
length
;
i
<
len
;
i
++
)
{
if
(
this
.
$refs
.
table
.
cloneColumns
[
i
].
__id
===
column
.
__id
)
{
this
.
$set
(
this
.
$refs
.
table
.
cloneColumns
[
i
],
"width"
,
width
);
break
;
}
}
},
//给符合条件的行增加_disabled属性;条件:是否具有isLock和customIsLock属性,且属性值为1
handleDisabledRow
()
{
for
(
var
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
...
...
@@ -210,7 +199,7 @@ export default {
},
//排序触发
onSortChange
(
column
)
{
let
key
=
column
.
ke
y
;
let
key
=
column
.
propert
y
;
let
order
=
""
;
switch
(
column
.
order
)
{
case
"desc"
:
...
...
@@ -219,7 +208,7 @@ export default {
case
"asc"
:
order
=
true
;
break
;
case
"normal"
:
case
null
:
order
=
"normal"
;
break
;
}
...
...
@@ -243,44 +232,44 @@ export default {
this
.
$Message
.
warning
(
currentRow
.
customLockMessage
);
}
}
else
{
window
.
GMS
.
vbus
.
$emit
(
"onCurrentChange"
,
currentRow
,
oldCurrentRow
);
GMS
.
vbus
.
$emit
(
"onCurrentChange"
,
currentRow
,
oldCurrentRow
);
this
.
$emit
(
"onCurrentChange"
,
currentRow
,
oldCurrentRow
);
}
},
//单击表格行时触发
onRowClick
(
row
,
index
)
{
window
.
GMS
.
vbus
.
$emit
(
'onRowClick'
,
row
,
index
);
GMS
.
vbus
.
$emit
(
'onRowClick'
,
row
,
index
);
},
//双击表格行时触发
onRowDbclick
(
row
,
index
)
{
window
.
GMS
.
vbus
.
$emit
(
'onRowDbclick'
,
row
,
index
);
GMS
.
vbus
.
$emit
(
'onRowDbclick'
,
row
,
index
);
},
//表格单选或多选改变时触发
onSelectionChange
(
selection
)
{
window
.
GMS
.
vbus
.
$emit
(
'onSelectionChange'
,
selection
);
GMS
.
vbus
.
$emit
(
'onSelectionChange'
,
selection
);
this
.
$emit
(
"onSelectionChange"
,
selection
);
},
//表格全选
onSelectAll
(
selection
)
{
window
.
GMS
.
vbus
.
$emit
(
"onSelectAll"
,
selection
);
GMS
.
vbus
.
$emit
(
"onSelectAll"
,
selection
);
this
.
$emit
(
"onSelectAll"
,
selection
);
},
//取消全选
onSelectAllCancle
(
selection
,
cancelrows
)
{
window
.
GMS
.
vbus
.
$emit
(
"onSelectAllCancle"
,
selection
,
cancelrows
);
GMS
.
vbus
.
$emit
(
"onSelectAllCancle"
,
selection
,
cancelrows
);
this
.
$emit
(
"onSelectAllCancle"
,
selection
,
cancelrows
);
},
//与onSelectionChange方法有异曲同工作用,多增加了传递参数,选中时触发
onCurrentSelect
(
selection
,
row
)
{
// 多选的时候出发 row 是当前项
this
.
$emit
(
"onCurrentSelect"
,
selection
,
row
);
window
.
GMS
.
vbus
.
$emit
(
"onCurrentSelect"
,
selection
,
row
);
GMS
.
vbus
.
$emit
(
"onCurrentSelect"
,
selection
,
row
);
},
//取消选择时触发
onCurrentSelectCancel
(
selection
,
row
)
{
// 多选的时候出发 row 是当前项
this
.
$emit
(
"onCurrentSelectCancel"
,
selection
,
row
,
this
.
tableData
[
row
]);
window
.
GMS
.
vbus
.
$emit
(
"onCurrentSelectCancel"
,
selection
,
row
);
GMS
.
vbus
.
$emit
(
"onCurrentSelectCancel"
,
selection
,
row
);
},
//创建查询列进行查询列表渲染
createColumns
()
{
...
...
@@ -290,7 +279,6 @@ export default {
}
this
.
loadSelectColumn
();
this
.
loadSerialNumberColumn
();
this
.
pageSize
=
this
.
table
.
pageSize
;
let
colLen
=
this
.
table
.
columns
.
length
;
for
(
let
i
=
0
;
i
<
colLen
;
i
++
)
{
let
colItem
=
this
.
table
.
columns
[
i
];
...
...
@@ -299,49 +287,24 @@ export default {
},
//根据指定列类型,渲染相关列展示
createTypeCol
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
if
(
colItem
.
type
==
"VALUE"
)
{
this
.
loadValueColumn
(
colItem
,
type
)
;
this
.
singleCol
.
cellRender
.
props
.
businessPoptipContent
=
this
.
businessPoptipContent
;
}
else
if
(
colItem
.
type
==
"HYPERLINK"
)
{
this
.
loadHyperlinkColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"APPROVAL"
)
{
this
.
loadApprovalColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"PASSTATUS"
)
{
this
.
loadPasstatusColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"IMG_TXT"
)
{
this
.
loadImgtextColumn
(
colItem
,
type
);
this
.
singleCol
.
cellRender
.
props
.
extraActionObject
=
this
.
extraActionObject
;
this
.
singleCol
.
cellRender
.
props
.
queryHandler
=
this
.
queryHandler
;
this
.
singleCol
.
cellRender
.
props
.
businessPoptipContent
=
this
.
businessPoptipContent
;
}
else
if
(
colItem
.
type
==
"IMG"
)
{
this
.
loadImgColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"OBJECT"
)
{
this
.
loadObjColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"MERGE"
)
{
this
.
loadMergeColumn
(
colItem
,
type
);
this
.
singleCol
.
cellRender
.
events
=
{
click
:
this
.
passVisibleUrl
}
}
else
if
(
colItem
.
type
==
"IMG_SRC"
)
{
this
.
loadImgSrcColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"BILLTYPE"
)
{
this
.
loadBillTypeColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"TIMEDIFF"
)
{
this
.
loadTimeDiffColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"COMPARETIME"
)
{
this
.
loadDoubleTimeColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"TEXTWITHTAG"
)
{
this
.
loadTextWithTagColumn
(
colItem
,
type
);
}
else
if
(
colItem
.
type
==
"SEGMENTPROGRESS"
)
{
this
.
loadSegmentProgressColumn
(
colItem
,
type
);
}
else
{
this
.
loadCustomColumn
(
colItem
,
type
);
this
.
singleCol
.
cellRender
.
events
=
{
click
:
this
.
getVisibleUrlTwo
}
},
//自定义值类型的列渲染
loadCustomColumn
(
colItem
,
type
){
this
.
createBasicColumns
(
colItem
);
let
renderFunc
=
window
.
GMS
.
getContext
().
getCollector
().
getElement
(
'queryCustomColumn'
,
colItem
.
type
);
if
(
renderFunc
){
this
.
singleCol
.
render
=
(
h
,
params
)
=>
renderFunc
(
h
,
params
,
colItem
);
if
(
type
){
this
.
columnsData
.
push
(
this
.
singleCol
);
}
}
else
if
(
colItem
.
renderName
)
{
this
.
$Message
.
error
(
"未获取到列类型为: "
+
colItem
.
renderName
+
" 的定义"
)
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//根据列的特殊性进行渲染展示,比如:操作列
...
...
@@ -349,13 +312,18 @@ export default {
if
(
colItem
.
type
==
"ACTION"
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
fixed
=
"right"
;
this
.
loadActionRender
(
colItem
);
this
.
singleCol
.
cellRender
.
props
=
{
colItem
:
colItem
,
context
:
this
.
context
||
this
,
extraActionObject
:
this
.
extraActionObject
,
queryBus
:
this
.
queryBus
}
this
.
columnsData
.
push
(
this
.
singleCol
);
}
else
{
if
(
colItem
.
type
&&
this
.
isShowColumn
(
colItem
.
columnType
))
{
this
.
createTypeCol
(
colItem
,
"noHaveChildren"
);
}
else
if
(
colItem
.
children
&&
colItem
.
children
.
length
>
0
)
{
this
.
createHaveChildrenColums
(
colItem
);
this
.
createHaveChildrenColum
n
s
(
colItem
);
this
.
columnsData
.
push
(
this
.
singleCol
);
this
.
$emit
(
"noShowColSet"
);
this
.
isHaveChildrenColums
=
true
;
...
...
@@ -369,44 +337,38 @@ export default {
}
return
false
;
},
//深度拷贝
deepCopy
(
obj
)
{
if
(
typeof
obj
!==
"object"
)
{
return
"请传入数组或对象进行深拷贝"
;
}
var
new_obj
=
obj
instanceof
Array
?
[]
:
{};
for
(
let
key
in
obj
)
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
key
))
{
new_obj
[
key
]
=
typeof
obj
[
key
]
===
"object"
?
this
.
deepCopy
(
obj
[
key
])
:
obj
[
key
];
}
}
return
new_obj
;
},
//针对具有合并表头的列渲染
createHaveChildrenColums
(
colItem
)
{
let
that
=
this
;
let
copyColItem
=
this
.
deepCopy
(
colItem
);
let
goin
=
(
obj
)
=>
{
changeChildrenColumn
(
obj
)
{
for
(
let
i
=
0
;
i
<
obj
.
children
.
length
;
i
++
)
{
let
item
=
obj
.
children
[
i
];
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
goin
(
item
);
}
else
if
(
item
.
type
&&
that
.
isShowColumn
(
item
.
columnType
))
{
that
.
createTypeCol
(
item
);
let
copySingleCol
=
that
.
deepCopy
(
that
.
singleCol
);
obj
.
children
.
splice
(
i
,
1
,
copySingleCol
);
this
.
changeChildrenColumn
(
item
);
}
else
if
(
item
.
type
&&
this
.
isShowColumn
(
item
.
columnType
))
{
this
.
createTypeCol
(
item
);
obj
.
children
.
splice
(
i
,
1
,
this
.
singleCol
);
}
}
};
goin
(
copyColItem
);
let
copy_copyColItem
=
that
.
deepCopy
(
copyColItem
);
that
.
singleCol
=
copy_copyColItem
;
},
//针对具有合并表头的列渲染
createHaveChildrenColumns
(
colItem
)
{
let
copyColItem
=
JSON
.
parse
(
JSON
.
stringify
(
colItem
))
this
.
changeChildrenColumn
(
copyColItem
);
this
.
singleCol
=
copyColItem
;
},
//根据查询元数据中columns列配置信息,转为可被表格识别的基本列配置
createBasicColumns
(
colItem
)
{
this
.
singleCol
=
{};
this
.
singleCol
=
{
cellRender
:
{
name
:
'Query'
+
colItem
.
type
,
//列类型前增加组件库查询标识
props
:
{
colItem
:
colItem
,
this
:
this
}
}
};
//向vxe-table表格组件内增加渲染器
this
.
addVXETableRenderer
(
colItem
.
type
)
if
(
colItem
.
key
)
{
this
.
singleCol
.
key
=
colItem
.
key
;
this
.
singleCol
.
field
=
colItem
.
key
;
}
if
(
colItem
.
format
)
{
this
.
singleCol
.
format
=
colItem
.
format
;
...
...
@@ -414,9 +376,15 @@ export default {
if
(
colItem
.
title
)
{
this
.
singleCol
.
title
=
colItem
.
title
;
}
/**
列宽,通过设置 width 参数,支持固定像素、百分比、等比例分配等,如果不设置则按照表格的宽度进行均匀分配(注:不应该全部都使用固定像素,应该当所有列加起来的宽度小于表格宽度时,就会出现空白区,可以配合 "%" 或 "min-width" 实现等比例缩放)
*/
if
(
colItem
.
width
)
{
this
.
singleCol
.
width
=
colItem
.
width
;
}
if
(
colItem
.
minWidth
)
{
this
.
singleCol
.
minWidth
=
colItem
.
minWidth
;
}
if
(
colItem
.
align
)
{
this
.
singleCol
.
align
=
colItem
.
align
;
}
else
{
...
...
@@ -435,1831 +403,78 @@ export default {
}
return
this
.
singleCol
;
},
handleBaseData
(
basedata
)
{
if
(
typeof
basedata
.
title
!=
"undefined"
)
{
return
basedata
.
title
;
}
else
{
return
basedata
.
name
;
}
},
//暂未知COMPARETIME值类型作用,应是资产个性化配置,具有双时间时使用【申请】【送达】
loadDoubleTimeColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
function
getTimeStr
(
val
)
{
var
time
=
new
Date
(
val
);
var
year
=
time
.
getFullYear
();
var
month
=
time
.
getMonth
()
+
1
;
var
day
=
time
.
getDate
();
var
timeStr
=
year
+
"-"
+
(
month
>
9
?
month
:
"0"
+
month
)
+
"-"
+
(
day
>
9
?
day
:
"0"
+
day
);
return
timeStr
;
}
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"haveDoubleTimeContent"
,
},
[
h
(
"div"
,
{
class
:
"topTime"
,
},
[
h
(
"span"
,
{
style
:
"font-size:12px;color:#4C79E1;font-family:Microsoft YaHei;"
},
[
"申请"
]
),
h
(
"span"
,
{
style
:
"font-size:12px;color:#666;font-family:Microsoft YaHei;"
},
[
" : "
+
getTimeStr
(
params
.
row
[
colItem
.
key
]),
]
),
]
),
h
(
"div"
,
{
class
:
"bottomTime"
},
[
h
(
"span"
,
{
style
:
"font-size:12px;color:#56BA3E;font-family:Microsoft YaHei;"
},
[
"已达"
]
),
h
(
"span"
,
{
style
:
"font-size:12px;color:#666;font-family:Microsoft YaHei;"
},
[
" : "
+
getTimeStr
(
params
.
row
[
colItem
.
queryFields
])
]
),
]
),
]
);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//具有文字加标签TEXTWITHTAG值类型查询列渲染
loadTextWithTagColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
let
defaultEnumArr
=
[
{
enumValue
:
"贵重"
,
type
:
"textWhiteBgB48E6C"
},
{
enumValue
:
"贵重"
,
type
:
"textWhiteBgFF8286"
}
];
function
returnTagRender
(
h
,
params
,
styleItem
=
defaultEnumArr
)
{
var
renderTagArr
=
[];
for
(
let
i
=
0
;
i
<
styleItem
.
length
;
i
++
)
{
let
item
=
styleItem
[
i
];
if
(
params
.
row
[
item
.
queryFields
])
{
renderTagArr
.
push
(
h
(
"span"
,
{
stype
:
"margin-right:10px"
,
class
:
"val_"
+
item
.
type
},
[
item
.
enumValue
]
)
);
}
}
return
renderTagArr
;
}
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
class
:
"textWithTagContainer"
},
[
h
(
"div"
,
{
style
:
"font-size:12px;font-family:Microsoft YaHei;color:#666"
},
[
params
.
row
[
colItem
.
key
]
||
"默认文本"
]
),
h
(
"div"
,
{
class
:
"tagPart"
},
returnTagRender
(
h
,
params
,
colItem
.
style
&&
colItem
.
style
.
items
)
)
]
);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//SEGMENTPROGRESS值类型是资产个性化的关于进度区间的列渲染
loadSegmentProgressColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
function
returnSegmentProgressData
(
queryFields
,
params
)
{
let
segmentProgressDataKey
=
[
"left"
,
"middle"
,
"right"
];
let
segmentProgressData
=
{};
for
(
let
i
=
0
;
i
<
queryFields
.
length
;
i
++
)
{
let
item
=
queryFields
[
i
];
segmentProgressData
[
segmentProgressDataKey
[
i
]]
=
params
.
row
[
item
];
}
return
segmentProgressData
;
}
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"SegmentProgress"
,
{
props
:
{
segmentProgressData
:
returnSegmentProgressData
(
colItem
.
queryFields
,
params
)
}
},
[]
);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//BILLTYPE值类型弹出详情列渲染
loadBillTypeColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
attrs
:
{
style
:
"cursor: pointer;"
}
},
[
h
(
"BillType"
,
{
props
:
{
params
:
params
.
row
,
config
:
colItem
}
},
[]
)
]
);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//OBJECT值类型渲染数据为对象类型时的title或name
loadObjColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
if
(
params
.
row
[
colItem
.
key
]
&&
[
"title"
,
"name"
].
includes
(
colItem
.
field
))
{
return
h
(
"div"
,
{},
params
.
row
[
colItem
.
key
][
colItem
.
field
])
}
}
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//暂时未知PASSTATUS类型查询列主要应用场景,审批状态,zApprovalButton审批按钮
loadPasstatusColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"div"
,
{
attrs
:
{
style
:
"height:48px;line-height:44px"
}
},
[
!
params
.
row
.
isCountRow
?
h
(
"zApprovalButton"
,
{
props
:
{
contextData
:
this
.
contextData
,
rowData
:
params
.
row
,
indexs
:
params
.
index
,
state
:
params
.
row
.
state
,
},
})
:
""
]
);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//TIMEDIFF值类型时间差列渲染
loadTimeDiffColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
let
beginTimeKey
=
colItem
.
config
.
beginTimeKey
;
let
endTimeKey
=
colItem
.
config
.
endTimeKey
;
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
function
getTimeDifference
(
begin
,
end
)
{
let
timeDifferenceStr
=
Math
.
ceil
((
new
Date
(
end
).
getTime
()
-
new
Date
(
begin
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
"天"
;
return
timeDifferenceStr
;
}
function
getTimeStr
(
val
)
{
var
time
=
new
Date
(
val
);
var
year
=
time
.
getFullYear
();
var
month
=
time
.
getMonth
()
+
1
;
var
day
=
time
.
getDate
();
var
timeStr
=
year
+
"-"
+
(
month
>
9
?
month
:
"0"
+
month
)
+
"-"
+
(
day
>
9
?
day
:
"0"
+
day
);
return
timeStr
;
}
let
timeDifference
=
getTimeDifference
(
params
.
row
[
beginTimeKey
],
endTimeKey
&&
params
.
row
[
endTimeKey
]
?
params
.
row
[
endTimeKey
]
:
Date
.
now
());
return
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"display:inline-block;margin:0 3px 3px 0;font-size:12px;"
}
},
getTimeStr
(
params
.
row
[
beginTimeKey
])
),
h
(
"div"
,
{
attrs
:
{
style
:
"display:inline-block;padding:0px 5px;color:#ED664B;border:1px solid #ED664B;font-size:12px; border-radius:4px;"
}
},
timeDifference
)
]);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//MERGE值类型合并行的列渲染,该类型列为资产个性化实现逻辑
loadMergeColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
var
formatYearMonth
=
function
(
val
)
{
if
(
Number
(
val
)
<
12
)
{
return
val
+
"个月"
;
}
else
if
(
Number
(
val
)
==
12
)
{
return
"1年"
;
}
else
{
if
(
Number
(
val
)
%
12
==
0
)
{
return
Number
(
val
)
/
12
+
"年"
;
}
else
{
return
parseInt
(
Number
(
val
)
/
12
)
+
"年"
+
(
Number
(
val
)
%
12
)
+
"个月"
;
}
}
};
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
//财务入账日期存在,计算已使用年限
if
(
params
.
row
.
qudrq
)
{
// zjy实现改变逻辑
var
timestamp
=
new
Date
(
params
.
row
.
qudrq
);
var
currentTime
=
new
Date
();
let
qudrqYear
=
timestamp
.
getFullYear
(),
qudrqMonth
=
timestamp
.
getMonth
(),
qudrqDate
=
timestamp
.
getDate
();
let
currentYear
=
currentTime
.
getFullYear
(),
currentMonth
=
currentTime
.
getMonth
(),
currentDate
=
currentTime
.
getDate
();
var
year
=
0
,
month
=
0
;
if
(
currentYear
-
qudrqYear
>
0
)
{
year
=
currentYear
-
qudrqYear
;
}
if
(
currentMonth
-
qudrqMonth
>
0
)
{
month
=
currentMonth
-
qudrqMonth
;
}
else
if
(
currentMonth
-
qudrqMonth
<
0
)
{
month
=
12
+
currentMonth
-
qudrqMonth
;
year
=
year
-
1
;
}
if
(
month
==
12
)
{
month
=
0
;
year
=
year
+
1
;
}
if
(
currentDate
-
qudrqDate
>
0
)
{
month
+=
1
;
}
var
totalMonth
=
year
*
12
+
month
;
}
let
showYearMonth
=
year
+
"年"
+
month
+
"个月"
if
(
month
>=
12
)
{
year
=
year
+
parseInt
(
month
/
12
)
month
=
month
%
12
}
if
(
year
==
0
&&
month
>
0
&&
month
<
12
)
{
showYearMonth
=
month
+
"个月"
}
else
if
(
year
>
0
&&
month
==
0
)
{
showYearMonth
=
year
+
"年"
}
if
(
(
params
.
row
.
zhejzt
&&
params
.
row
.
zhejzt
==
"不提折旧"
)
||
!
params
.
row
[
colItem
.
key
]
)
{
//折旧状态为空或者不提折旧,只显示已使用年限
return
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"margin-bottom:3px"
}
},
[
h
(
"span"
,
{
attrs
:
{
style
:
"font-size:12px;color:#555555;"
},
},
params
.
row
.
qudrq
?
showYearMonth
:
""
),
]
)
]);
}
else
{
//提折旧则显示已使用年限和折旧年限
//财务已入账则显示已使用年限和折旧年限
if
(
params
.
row
.
qudrq
)
{
return
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"margin-bottom:3px"
}
},
[
h
(
"span"
,
{
attrs
:
{
// style: "font-size:12px;color:#555555;",
style
:
params
.
row
[
colItem
.
key
]
&&
totalMonth
>
params
.
row
[
colItem
.
key
]
?
"color:#ED664B"
:
""
},
},
showYearMonth
)
]
),
h
(
"div"
,
{
attrs
:
{
style
:
"font-size:12px;color:#888888"
},
},
params
.
row
[
colItem
.
key
]
?
"年限:"
+
formatYearMonth
(
params
.
row
[
colItem
.
key
])
:
""
)
]);
}
else
{
//财务未入账的,只显示折旧年限
return
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"margin-bottom:3px"
}
},
[
h
(
"span"
,
{
attrs
:
{
style
:
"font-size:12px;color:#555555;"
,
}
},
params
.
row
[
colItem
.
key
]
?
"年限:"
+
formatYearMonth
(
params
.
row
[
colItem
.
key
])
:
""
)
]
),
]);
}
}
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//VALUE值类型列渲染
loadValueColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
obj
=
params
.
row
,
_obj
=
obj
.
bizdes
!=
undefined
?
obj
.
bizdes
:
obj
.
biztype
;
/**
* isLock是否锁定,这个是默认查询锁定表
* customIsLock自定义的时候锁定,有的时候可能根据业务需求需要锁定这个数据,哪怕是锁定表没锁它
*/
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"isLock"
)
==
true
&&
obj
.
isLock
==
true
)
{
if
(
params
.
row
.
cardobjectid
)
{
return
h
(
"div"
,
{},
[
h
(
CustomPoptip
,
{
props
:
{
placement
:
"right"
,
trigger
:
"hover"
,
transfer
:
true
,
rowData
:
params
.
row
,
opotipCompontent
:
"businessPoptip"
,
context
:
this
,
contents
:
"正在进行"
+
_obj
+
" 业务"
,
businessPoptipContent
:
this
.
businessPoptipContent
},
on
:
{
"on-popper-show"
:
this
.
popperShow
}
},
params
.
row
[
colItem
.
key
]
)
]);
}
else
{
return
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
"正在进行"
+
_obj
+
" 业务"
,
transfer
:
true
}
},
params
.
row
[
colItem
.
key
]
)
]);
}
}
else
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"customIsLock"
)
==
true
&&
obj
.
customIsLock
==
true
)
{
return
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
obj
.
customLockMessage
,
transfer
:
true
}
},
params
.
row
[
colItem
.
key
]
)
]);
}
else
{
if
(
params
.
column
.
tooltip
&&
params
.
row
[
colItem
.
key
])
{
return
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
attrs
:
{
class
:
"line1"
},
style
:
{
width
:
Number
(
colItem
.
width
)
-
20
+
"px"
},
props
:
{
maxWidth
:
"200"
,
placement
:
"bottom-start"
,
content
:
params
.
row
[
colItem
.
key
],
transfer
:
true
}
},
params
.
row
[
colItem
.
key
]
)
]);
}
else
if
(
colItem
.
numberType
==
1
)
{
return
h
(
"div"
,
{},
[
NumUtils
.
splitThousand
(
params
.
row
[
colItem
.
key
]
?
params
.
row
[
colItem
.
key
]
:
0
,
2
)
]);
}
else
{
//renderPadding属性是针对左内边距的填充宽度
if
(
colItem
.
renderPadding
)
{
let
paddingLeft
=
params
.
row
[
colItem
.
renderPadding
];
return
h
(
"div"
,
{
style
:
{
paddingLeft
:
paddingLeft
+
"px"
}
},
[
params
.
row
[
colItem
.
key
]]
);
}
else
{
return
h
(
"div"
,
{},
[
params
.
row
[
colItem
.
key
]]);
}
}
}
};
//判断此列是否求和
if
(
colItem
.
isSum
==
true
)
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"div"
,
{},
[
params
.
row
.
isCountRow
?
h
(
"strong"
,
{
attrs
:
{
style
:
params
.
row
.
isCountRow
?
"font-weight:bold;"
:
""
,
class
:
"orangeRed"
//确定表格列状态,单选时高亮,多选时复选框
loadSelectColumn
()
{
if
(
this
.
table
.
selectType
==
"SINGLE"
)
{
this
.
isHighLightRow
=
true
;
}
else
if
(
this
.
table
.
selectType
==
"MULTI"
)
{
let
column
=
{};
// 改变
// column.type = "selection";
column
.
type
=
"checkbox"
;
column
.
fixed
=
"left"
;
column
.
align
=
"center"
;
column
.
width
=
40
;
this
.
columnsData
.
push
(
column
);
}
},
this
.
getCount
(
params
,
colItem
.
key
)
)
:
h
(
"span"
,
{
class
:
"orangeRed"
},
params
.
row
[
colItem
.
key
]
)
]);
};
}
//判断是否具有相关样式配置
let
styles
=
colItem
.
style
;
if
(
styles
)
{
let
stylesArr
=
styles
.
item
;
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
styleValue
=
null
;
let
param
=
params
.
row
[
colItem
.
key
];
for
(
let
i
=
0
;
i
<
stylesArr
.
length
;
i
++
)
{
if
(
stylesArr
[
i
].
enumValue
==
param
)
{
styleValue
=
stylesArr
[
i
].
type
;
break
;
}
//确定查询表格列序号展示形式
loadSerialNumberColumn
()
{
if
(
this
.
table
.
serialNumber
)
{
let
column
=
{
fixed
:
"left"
,
width
:
50
,
title
:
this
.
table
.
serialNumber
===
"ranking"
?
"排名"
:
"序号"
,
key
:
this
.
table
.
serialNumber
===
"ranking"
?
"排名"
:
"序号"
,
align
:
"center"
},
startIndex
=
0
;
//判断序号是否为连续还是每一页都是1开始
if
(
this
.
table
.
serialNumber
===
"series"
)
{
startIndex
=
(
this
.
queryBus
.
page
.
pageNum
-
1
)
*
this
.
queryBus
.
page
.
pageSize
;
}
if
(
!
styleValue
&&
styles
.
default
)
{
styleValue
=
styles
.
default
;
column
.
cellRender
=
{
name
:
'QuerySeq'
,
props
:
{
startIndex
:
startIndex
}}
this
.
addVXETableRenderer
(
"Seq"
)
this
.
columnsData
.
push
(
column
);
this
.
serialNumberColumnConfig
=
column
;
}
if
(
param
||
param
===
0
)
{
if
(
typeof
styleValue
!=
"undefined"
&&
null
!=
styleValue
)
{
if
(
styleValue
.
substring
(
0
,
3
)
==
"val"
)
{
return
h
(
"span"
,
{
class
:
styleValue
},
params
.
row
[
colItem
.
key
]
);
}
else
if
(
styleValue
.
substring
(
0
,
3
)
==
"img"
)
{
return
h
(
"svg"
,
{
attrs
:
{
"aria-hidden"
:
"true"
,
style
:
"vertical-align: middle;"
},
style
:
{
width
:
"40px"
,
height
:
"40px"
}
remove
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
params
.
row
[
colItem
.
key
]
==
"通过"
?
"#icon-_tongguo"
:
"#icon-_bohui"
}
})
],
""
);
}
}
}
};
}
if
(
this
.
valueColumnUseRender
(
colItem
))
{
this
.
valueColumnSetRender
(
colItem
,
type
);
}
else
{
if
(
colItem
.
sortable
)
{
this
.
singleCol
.
sortable
=
colItem
.
sortable
;
}
}
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
exportData
()
{
this
.
$refs
.
table
.
exportCsv
({
filename
:
"总账查询"
,
original
:
false
,
});
},
//提示信息展示
popperShow
(
params
,
context
)
{},
//HYPERLINK值类型超链接列渲染
loadHyperlinkColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
let
styles
=
colItem
.
style
;
if
(
styles
)
{
if
(
styles
.
default
)
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
action
=
colItem
.
action
;
return
h
(
"a"
,
{
class
:
styles
.
default
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
}
}
passVisibleUrl
(
visibleUrl
){
this
.
visibleUrl
=
visibleUrl
;
this
.
visible
=
true
;
},
params
.
row
[
colItem
.
key
]
);
};
}
}
else
if
(
colItem
.
renderPadding
)
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
paddingLeft
=
params
.
row
[
colItem
.
renderPadding
];
let
action
=
colItem
.
action
;
return
h
(
"div"
,
{
style
:
{
paddingLeft
:
paddingLeft
+
"px"
,
cursor
:
"pointer"
getVisibleUrlTwo
(
visibleUrl
){
this
.
visibleUrl
=
visibleUrl
;
this
.
visible
=
true
;
},
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
}
pageChange
(
currentPage
,
pageSize
)
{
this
.
$emit
(
"on-page-change"
,
currentPage
,
pageSize
);
}
},
[
params
.
row
[
colItem
.
key
]]
);
};
}
else
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
action
=
colItem
.
action
,
obj
=
params
.
row
,
_obj
=
obj
.
bizdes
!=
undefined
?
obj
.
bizdes
:
obj
.
biztype
;
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"isLock"
)
==
true
)
{
if
(
obj
.
isLock
==
true
)
{
if
(
params
.
row
.
cardobjectid
)
{
return
h
(
"div"
,
{},
[
h
(
CustomPoptip
,
{
props
:
{
placement
:
"right"
,
trigger
:
"hover"
,
transfer
:
true
,
rowData
:
params
.
row
,
opotipCompontent
:
"businessPoptip"
,
context
:
this
,
contents
:
"正在进行"
+
_obj
+
" 业务"
,
businessPoptipContent
:
this
.
businessPoptipContent
created
()
{
this
.
createColumns
();
},
on
:
{
"on-popper-show"
:
this
.
popperShow
}
},
[
h
(
"a"
,
{
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
)
]
)
]);
}
else
{
return
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
"正在进行 "
+
_obj
+
" 业务"
,
transfer
:
true
}
},
[
h
(
"a"
,
{
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
}
},
},
params
.
row
[
colItem
.
key
]
),
]
),
]);
}
}
else
{
return
h
(
"a"
,
{
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
},
},
},
params
.
row
[
colItem
.
key
]
);
}
}
else
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"customIsLock"
)
==
true
)
{
if
(
obj
.
customIsLock
==
true
)
{
return
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
obj
.
customLockMessage
,
transfer
:
true
,
},
},
[
h
(
"a"
,
{
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
)
]
)
]);
}
else
{
return
h
(
"a"
,
{
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
);
}
}
else
{
return
h
(
"a"
,
{
class
:
"HyperlinkStyle"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
this
.
extraActionObject
,
this
.
queryHandler
);
}
}
},
this
.
valueColumnUseRender
(
colItem
)
?
this
.
getParamValue
(
params
,
colItem
)
:
params
.
row
[
colItem
.
key
]
);
}
};
}
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//APPROVAL值类型审批列渲染(审批组件暂未提供,等审批组件提供后替换zStepsVertical)
loadApprovalColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
let
styles
=
colItem
.
style
;
//查询列中的style属性配置关于default与item数组中元素的type都为class名称
if
(
styles
)
{
let
stylesArr
=
styles
.
item
;
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
styleValue
=
null
;
let
param
=
params
.
row
[
colItem
.
key
];
if
(
styles
.
default
)
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"span"
,
{
class
:
styles
.
default
},
params
.
row
[
colItem
.
key
]
);
};
styleValue
=
styles
.
default
;
}
else
{
for
(
let
i
=
0
;
i
<
stylesArr
.
length
;
i
++
)
{
if
(
stylesArr
[
i
].
enumValue
==
param
)
{
styleValue
=
stylesArr
[
i
].
type
;
break
;
}
}
}
if
(
styleValue
)
{
return
h
(
"div"
,
{},
[
h
(
"span"
,
{
class
:
styleValue
,
attrs
:
{
style
:
"vertical-align: middle;"
}
},
params
.
row
[
colItem
.
key
]
),
h
(
"Poptip"
,
{
attrs
:
{
placement
:
"right-start"
}
},
[
h
(
"svg"
,
{
attrs
:
{
"aria-hidden"
:
"true"
,
style
:
"margin-left:5px;vertical-align: middle;cursor: pointer;"
},
style
:
{
width
:
"14px"
,
height
:
"14px"
},
on
:
{
click
:
()
=>
{
//每次进来先清空
this
.
stepData
=
null
;
let
billid
=
params
.
row
.
billid
,
billDefine
=
params
.
row
.
billDefine
,
objectid
=
params
.
row
.
objectid
,
progressFlag
=
params
.
row
.
progressFlag
;
this
.
getApprovalStep
(
billid
,
billDefine
,
progressFlag
,
objectid
);
}
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
"#icon-_banliliucheng"
}
})
],
""
),
h
(
"div"
,
{
slot
:
"content"
},
[
h
(
"zStepsVertical"
,
{
attrs
:
{},
props
:
{
stepData
:
this
.
stepData
}
})
]
)
]
)
]);
}
};
}
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//IMG_TEXT值类型图文渲染,图片路径是存放在数据库中,在新建单据时已经录入并非在开发期配置
loadImgtextColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
return
h
(
"div"
,
{},
[
h
(
"img"
,
{
attrs
:
{
src
:
params
.
row
.
assetPic
,
style
:
"width:40px;display:inline-block;vertical-align: middle;"
}
}),
h
(
"div"
,
{
attrs
:
{
style
:
"display:inline-block;vertical-align: middle;"
}
},
params
.
row
[
colItem
.
key
]
)
]);
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//获取审批流程数据
getApprovalStep
(
billId
,
billdefine
,
progressFlag
,
objectid
)
{
var
path
=
""
;
if
(
progressFlag
&&
progressFlag
==
"ScrapProgress"
)
{
if
(
!
objectid
)
{
this
.
$Message
.
warning
(
"未获取到卡片ObjectId"
);
return
;
}
path
=
"/business/scrap/getScrapProgress/"
+
objectid
;
}
else
{
if
(
!
billId
)
{
this
.
$Message
.
warning
(
"未获取到业务id"
);
return
;
}
path
=
"/business/bill/getApprovaStep/"
+
billId
;
if
(
billdefine
)
{
if
(
billdefine
==
"com.jiuqi.np.gams2.business.bill.ReimburseBillDefine"
)
{
path
=
"/business/bill/getApprovaStep4Reimburse/"
+
billId
;
}
}
}
window
.
GAMS
.
Util
.
invokeServer
({
path
:
path
,
type
:
"GET"
,
contentType
:
"application/json"
,
})
.
then
((
data
,
textStatus
,
response
)
=>
{
if
(
data
.
code
==
0
)
{
if
(
data
.
content
)
{
this
.
stepData
=
data
.
content
;
}
}
})
.
catch
((
XMLHttpRequest
,
textStatus
,
errorThrown
)
=>
{
// this.$Message.error("未获取到流程信息");
});
},
//IMG值类型图片列渲染,当前图片路径是之前资产固定的(多图片第一个图片id)
loadImgColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
if
(
!
params
.
row
.
isCountRow
)
{
return
h
(
"div"
,
{
attrs
:
{
class
:
"allBox"
}
},
[
h
(
"img"
,
{
attrs
:
{
src
:
"http://"
+
window
.
location
.
host
+
this
.
rootUrl
+
"/business/qrcode/downloadFirstByBillid/"
+
params
.
row
[
colItem
.
key
],
style
:
"width:40px;height:40px;display:inline-block;vertical-align: middle;"
,
onerror
:
"javascript:this.src='../../../assets/image/tjtp.png';"
//@king
}
}),
h
(
"div"
,
{
attrs
:
{
class
:
"shadowColor"
}
},
[
h
(
"svg"
,
{
attrs
:
{
style
:
"margin-left: 33%;margin-top: 33%;cursor: pointer;"
},
style
:
{
width
:
"14px"
,
height
:
"14px"
},
on
:
{
click
:
()
=>
{
this
.
visibleUrl
=
"http://"
+
window
.
location
.
host
+
this
.
rootUrl
+
"/business/qrcode/downloadFirstByBillid/"
+
params
.
row
[
colItem
.
key
];
this
.
visible
=
true
;
}
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
"#icon-_yulan"
}
})
],
""
)
]
)
]
);
}
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//IMG_SRC值类型图片列渲染,当前图片路径是之前资产固定的(单图片id)
loadImgSrcColumn
(
colItem
,
type
)
{
this
.
createBasicColumns
(
colItem
);
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
if
(
!
params
.
row
.
isCountRow
)
{
return
h
(
"div"
,
{
attrs
:
{
class
:
"allBox"
}
},
[
h
(
"img"
,
{
attrs
:
{
src
:
"http://"
+
window
.
location
.
host
+
this
.
rootUrl
+
"/business/qrcode/downloadByid/"
+
params
.
row
[
colItem
.
key
],
style
:
"width:40px;height:40px;display:inline-block;vertical-align: middle;"
,
onerror
:
"javascript:this.src='../../../assets/image/tjtp.png';"
//@king
}
}),
h
(
"div"
,
{
attrs
:
{
class
:
"shadowColor"
}
},
[
h
(
"svg"
,
{
attrs
:
{
style
:
"margin-left: 33%;margin-top: 33%;cursor: pointer;"
},
style
:
{
width
:
"14px"
,
height
:
"14px"
},
on
:
{
click
:
()
=>
{
this
.
visibleUrl
=
"http://"
+
window
.
location
.
host
+
this
.
rootUrl
+
"/business/qrcode/downloadByid/"
+
params
.
row
[
colItem
.
key
];
this
.
visible
=
true
;
}
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
"#icon-_yulan"
}
})
],
""
)
]
)
]
);
}
};
if
(
type
)
{
this
.
columnsData
.
push
(
this
.
singleCol
);
}
},
//判断列对象是否为日期或数值类型
valueColumnUseRender
(
colItem
)
{
let
format
=
colItem
.
format
if
(
format
&&
[
"DATE"
,
"NUMBER"
,
"date"
,
"number"
].
includes
(
format
.
type
))
{
return
true
}
return
false
;
},
//根据判断列对象类型为日期或数值类型进行相对应的render渲染
valueColumnSetRender
(
colItem
,
type
)
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
let
value
=
this
.
getParamValue
(
params
,
colItem
);
// 增加其它需要render处理逻辑
return
h
(
"div"
,
value
);
};
},
//日期或数值类型转换
getParamValue
(
params
,
colItem
)
{
let
value
=
params
.
row
[
colItem
.
key
],
format
=
colItem
.
format
;
if
(
format
&&
[
"DATE"
,
"date"
].
includes
(
format
.
type
))
{
return
queryUtil
.
dateTimeFormat
(
value
,
format
.
config
);
}
else
if
(
format
&&
[
"NUMBER"
,
"number"
].
includes
(
format
.
type
))
{
return
isNaN
(
value
)
?
value
:
queryUtil
.
numberFormat
(
value
,
format
.
config
);
}
else
{
return
value
;
}
},
//操作列渲染
loadActionRender
(
colItem
)
{
this
.
singleCol
.
render
=
(
h
,
params
)
=>
{
if
(
!
params
.
row
.
isCountRow
)
{
return
h
(
CustomQueryTableAction
,
{
props
:
{
params
:
params
,
colItem
:
colItem
,
context
:
this
.
context
||
this
,
extraActionObject
:
this
.
extraActionObject
,
queryBus
:
this
.
queryBus
},
on
:
{},
});
}
};
},
//确定表格列状态,单选时高亮,多选时复选框
loadSelectColumn
()
{
if
(
this
.
table
.
selectType
==
"SINGLE"
)
{
this
.
isHighLightRow
=
true
;
}
else
if
(
this
.
table
.
selectType
==
"MULTI"
)
{
let
column
=
{};
column
.
type
=
"selection"
;
column
.
fixed
=
"left"
;
column
.
align
=
"center"
;
column
.
width
=
40
;
this
.
columnsData
.
push
(
column
);
}
},
//确定查询表格列序号展示形式
loadSerialNumberColumn
()
{
if
(
this
.
table
.
serialNumber
)
{
let
column
=
{},
startIndex
=
0
;
column
.
type
==
"index"
;
column
.
fixed
=
"left"
;
column
.
width
=
50
;
column
.
title
=
this
.
table
.
serialNumber
===
"ranking"
?
"排名"
:
"序号"
;
column
.
key
=
this
.
table
.
serialNumber
===
"ranking"
?
"排名"
:
"序号"
;
column
.
align
=
"center"
;
column
.
render
=
(
h
,
params
)
=>
{
//判断序号是否为连续还是每一页都是1开始
if
(
this
.
table
.
serialNumber
===
"series"
)
{
startIndex
=
(
this
.
queryBus
.
page
.
pageNum
-
1
)
*
this
.
queryBus
.
page
.
pageSize
;
}
params
.
row
.
_serialIndex
=
startIndex
+
params
.
index
+
1
;
return
h
(
"span"
,
{},
params
.
row
.
isCountRow
?
"合计"
:
startIndex
+
params
.
index
+
1
);
};
this
.
columnsData
.
push
(
column
);
this
.
serialNumberColumnConfig
=
column
;
}
},
onPageNumChange
(
val
)
{
this
.
queryBus
.
page
.
pageNum
=
val
;
this
.
$emit
(
"on-refresh"
);
},
onPageSizeChange
(
val
)
{
this
.
queryBus
.
page
.
pageSize
=
val
;
this
.
$emit
(
"on-refresh"
);
},
//获取合计数值
getCount
(
params
,
name
)
{
let
count
=
0
;
if
(
params
.
row
.
isCountRow
)
{
for
(
var
i
=
0
,
len
=
this
.
tableData
.
length
;
i
<
len
;
i
++
)
{
count
+=
this
.
tableData
[
i
][
name
]
?
parseFloat
(
this
.
replaceNum
(
this
.
tableData
[
i
][
name
]))
:
0
;
}
}
else
{
return
params
.
row
[
name
];
}
return
NumUtils
.
splitThousand
(
count
,
2
);
},
replaceNum
(
num
)
{
let
str
=
String
(
num
).
replace
(
/,/g
,
""
);
return
Number
(
str
);
},
remove
(
index
)
{
this
.
tableData
.
splice
(
index
,
1
);
},
exportData
()
{
this
.
$refs
.
table
.
exportCsv
({
filename
:
"总账查询"
,
original
:
false
,
});
}
},
created
()
{
this
.
createColumns
();
},
mounted
()
{
window
.
GMS
.
vbus
.
$on
(
"changePasstatus"
,
(
index
,
datas
)
=>
{
this
.
tableData
[
index
]
=
datas
;
}),
window
.
GMS
.
vbus
.
$on
(
"custom-query-print"
,
()
=>
{
this
.
exportData
();
});
this
.
computeSerialNumberWidth
();
mounted
()
{
GMS
.
vbus
.
$on
(
"changePasstatus"
,
(
index
,
datas
)
=>
{
this
.
tableData
[
index
]
=
datas
;
}),
GMS
.
vbus
.
$on
(
"custom-query-print"
,
()
=>
{
this
.
exportData
();
});
this
.
computeSerialNumberWidth
();
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.gams-table-view
{
/deep/
.ivu-checkbox-disabled
.ivu-checkbox-inner
{
//
background
:
url(../../)
no-repeat
;
background-size
:
15px
;
border
:
none
;
}
/
deep
/
.ivu-table
{
td.column-align-right{
text-align
:
right
;
}
td
.column-align-left
{
text-align
:
left
;
}
td
.column-align-center
{
text-align
:
center
;
}
}
}
.workflow-job-view-table
{
border
:
1px
#e8e8e8
solid
!important
;
}
/*
样式展示为三种:
1. 文本有颜色; val_textColor***
2. 文本为白色,背景色变化;val_textWhiteBg***
3. 文本、边框为同一颜色 val_textWithBorder***
*/
/* 文本为白色,背景色变化 */
/
deep
/
.val_textWhiteBgB48E6C
{
color
:
#fff
;
background
:
#b48e6c
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgFF8286
{
color
:
#fff
;
background
:
#ff8286
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg8AD05E
{
color
:
#fff
;
background
:
#8ad05e
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg53CEDF
{
color
:
#fff
;
background
:
#53cedf
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg9778CF
{
color
:
#fff
;
background
:
#9778cf
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgFA6450
{
color
:
#fff
;
background
:
#fa6450
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgFA6483
{
color
:
#fff
;
background
:
#fa6483
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg847CE4
{
color
:
#fff
;
background
:
#847ce4
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg96CE44
{
color
:
#fff
;
background
:
#96ce44
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg5DA6FF
{
color
:
#fff
;
background
:
#5da6ff
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgE0984D
{
color
:
#fff
;
background
:
#e0984d
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg62D59C
{
color
:
#fff
;
background
:
#62d59c
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg55B5EC
{
color
:
#fff
;
background
:
#55b5ec
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgE973C1
{
color
:
#fff
;
background
:
#e973c1
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgEFA93A
{
color
:
#fff
;
background
:
#efa93a
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgFF904C
{
color
:
#fff
;
background
:
#ff904c
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg6F8AFF
{
color
:
#fff
;
background
:
#6f8aff
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg68DBDB
{
color
:
#fff
;
background
:
#68dbdb
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgF47364
{
color
:
#fff
;
background
:
#f47364
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgB1CA6D
{
color
:
#fff
;
background
:
#b1ca6d
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg6AD45A
{
color
:
#fff
;
background
:
#6ad45a
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgB56DEB
{
color
:
#fff
;
background
:
#b56deb
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg967BFF
{
color
:
#fff
;
background
:
#967bff
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgE588F2
{
color
:
#fff
;
background
:
#e588f2
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgD6C145
{
color
:
#fff
;
background
:
#d6c145
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgFF9902
{
color
:
#fff
;
background
:
#ff9902
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg4899FF
{
color
:
#fff
;
background
:
#4899ff
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBgFA6450
{
color
:
#fff
;
background
:
#fa6450
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWhiteBg52C851
{
color
:
#fff
;
background
:
#52c851
;
padding
:
1px
4px
;
}
/* 文本、边框为同一颜色 */
/
deep
/
.val_textWithBorder7BB100
{
color
:
#7bb100
;
border
:
1px
solid
#7bb100
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder198CF2
{
color
:
#198cf2
;
border
:
1px
solid
#198cf2
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder895AD1
{
color
:
#895ad1
;
border
:
1px
solid
#895ad1
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderFD9000
{
color
:
#fd9000
;
border
:
1px
solid
#fd9000
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder37AF59
{
color
:
#37af59
;
border
:
1px
solid
#37af59
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder5E61DD
{
color
:
#5e61dd
;
border
:
1px
solid
#5e61dd
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder17BCBA
{
color
:
#17bcba
;
border
:
1px
solid
#17bcba
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderDD41A8
{
color
:
#dd41a8
;
border
:
1px
solid
#dd41a8
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder6E65D7
{
color
:
#6e65d7
;
border
:
1px
solid
#6e65d7
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder72A921
{
color
:
#72a921
;
border
:
1px
solid
#72a921
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder4192F5
{
color
:
#4192f5
;
border
:
1px
solid
#4192f5
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderDC7F1E
{
color
:
#dc7f1e
;
border
:
1px
solid
#dc7f1e
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderE849B2
{
color
:
#e849b2
;
border
:
1px
solid
#e849b2
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder2BB772
{
color
:
#2bb772
;
border
:
1px
solid
#2bb772
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderF07428
{
color
:
#f07428
;
border
:
1px
solid
#f07428
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder4365F8
{
color
:
#4365f8
;
border
:
1px
solid
#4365f8
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder8E9A28
{
color
:
#8e9a28
;
border
:
1px
solid
#8e9a28
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder0DBAB8
{
color
:
#0dbab8
;
border
:
1px
solid
#0dbab8
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderF46655
{
color
:
#f46655
;
border
:
1px
solid
#f46655
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderEF9608
{
color
:
#ef9608
;
border
:
1px
solid
#ef9608
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder41AD30
{
color
:
#41ad30
;
border
:
1px
solid
#41ad30
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder9A51D1
{
color
:
#9a51d1
;
border
:
1px
solid
#9a51d1
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder5D9E69
{
color
:
#5d9e69
;
border
:
1px
solid
#5d9e69
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder7C61E4
{
color
:
#7c61e4
;
border
:
1px
solid
#7c61e4
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderC261D0
{
color
:
#c261d0
;
border
:
1px
solid
#c261d0
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderAD845A
{
color
:
#ad845a
;
border
:
1px
solid
#ad845a
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder4E93A4
{
color
:
#4e93a4
;
border
:
1px
solid
#4e93a4
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder7D9D4C
{
color
:
#7d9d4c
;
border
:
1px
solid
#7d9d4c
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderA59222
{
color
:
#a59222
;
border
:
1px
solid
#a59222
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderFF4C4C
{
color
:
#ff4c4c
;
border
:
1px
solid
#ff4c4c
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder037DDA
{
color
:
#037dda
;
border
:
1px
solid
#037dda
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder6E65D7
{
color
:
#6e65d7
;
border
:
1px
solid
#6e65d7
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorderF27D05
{
color
:
#f27d05
;
border
:
1px
solid
#f27d05
;
padding
:
1px
4px
;
}
/
deep
/
.val_textWithBorder19AE42
{
color
:
#19ae42
;
border
:
1px
solid
#19ae42
;
padding
:
0px
4px
;
}
/
deep
/
.val_textWithBorder00A7BF
{
color
:
#00a7bf
;
border
:
1px
solid
#00a7bf
;
padding
:
1px
4px
;
}
/* 文本有颜色 */
/
deep
/
.val_textColor1D9DE6
{
color
:
#1d9de6
;
}
/
deep
/
.val_textColorC2A600
{
color
:
#c2a600
;
}
/
deep
/
.val_textColorED970F
{
color
:
#ed970f
;
}
/
deep
/
.val_textColorA049E0
{
color
:
#a049e0
;
}
/
deep
/
.val_textColorE14CAE
{
color
:
#e14cae
;
}
/
deep
/
.val_textColorF14065
{
color
:
#f14065
;
}
/
deep
/
.val_textColor44B200
{
color
:
#44b200
;
}
/
deep
/
.val_textColorFF9D00
{
color
:
#ff9d00
;
}
/
deep
/
.val_textColor008CF8
{
color
:
#008cf8
;
}
/
deep
/
.val_textColorF55858
{
color
:
#f55858
;
}
/
deep
/
.val_textColor56BA3E
{
color
:
#56ba3e
;
}
/
deep
/
.val_textColorED664B
{
color
:
#ed664b
;
}
/
deep
/
.val_textColor0A90DC
{
color
:
#0a90dc
;
}
/
deep
/
.ivu-table-header
{
background
:
#e5e5e5
;
}
/
deep
/
.ivu-table
td
{
font-size
:
14px
!important
;
}
/
deep
/
.ivu-table
th
{
font-size
:
14px
!important
;
}
/
deep
/
.val_green
{
color
:
#fff
;
background
:
#93cb57
;
padding
:
5px
;
}
/
deep
/
.val_orange
{
color
:
#fff
;
background
:
#efad60
;
padding
:
5px
;
}
/
deep
/
.val_blue
{
color
:
#fff
;
background
:
#6bcde7
;
padding
:
5px
;
}
/
deep
/
.val_Red
{
color
:
#fff
;
background
:
rgb
(
252
,
46
,
5
);
padding
:
5px
;
}
/
deep
/
.val_purple
{
color
:
#fff
;
background
:
#a183dd
;
padding
:
5px
;
}
/
deep
/
.val_brown
{
color
:
#fff
;
background
:
#b48e6c
;
padding
:
5px
;
}
/
deep
/
.val_deepgreen
{
color
:
#fff
;
background
:
rgb
(
3
,
95
,
49
);
padding
:
5px
;
}
/
deep
/
.val_yellow
{
color
:
#fff
;
background
:
rgb
(
216
,
219
,
7
);
padding
:
5px
;
}
/
deep
/
.val_purpleWithBorder
{
color
:
#a183dd
;
border
:
1px
solid
#a183dd
;
padding
:
0
3px
;
}
/
deep
/
.val_greenWithBorder
{
color
:
#41ae8b
;
border
:
1px
solid
#41ae8b
;
padding
:
0
3px
;
}
/
deep
/
.val_yellowWithBorder
{
color
:
#77ae14
;
border
:
1px
solid
#77ae14
;
padding
:
0
3px
;
}
/
deep
/
.val_orangeWithBorder
{
color
:
#f17a0e
;
border
:
1px
solid
#f17a0e
;
padding
:
0
3px
;
}
/
deep
/
.val_zanglWithBorder
{
color
:
rgb
(
25
,
124
,
149
);
border
:
1px
solid
rgb
(
25
,
124
,
149
);
padding
:
0
3px
;
}
/
deep
/
.val_redWithBorder
{
color
:
#ec5e5e
;
border
:
1px
solid
#ec5e5e
;
padding
:
0
3px
;
}
/
deep
/
.val_blueWithBorder
{
color
:
#3477cb
;
border
:
1px
solid
#3477cb
;
padding
:
0
3px
;
}
/
deep
/
.val_littleblueWithBorder
{
color
:
rgb
(
73
,
128
,
195
);
border
:
1px
solid
rgb
(
73
,
128
,
195
);
padding
:
0
3px
;
}
/
deep
/
.val_greyWithBorder
{
color
:
rgb
(
191
,
196
,
205
);
border
:
1px
solid
rgb
(
191
,
196
,
205
);
padding
:
0
3px
;
}
/
deep
/
.orangeRed
{
color
:
#ed664b
;
}
/
deep
/
.HyperlinkStyle
{
color
:
#3477cb
;
}
/
deep
/
.val_deepBlue
{
color
:
#3477cb
;
}
/
deep
/
.val_deepOrange
{
color
:
#ff9902
;
}
/
deep
/
.val_greenBg
{
display
:
inline-block
;
padding
:
3px
12px
;
color
:
#fff
;
background-color
:
#93cb57
;
}
/
deep
/
.val_redBg
{
padding
:
5px
;
color
:
#fff
;
background-color
:
#ed664b
;
}
/
deep
/
.val_deepRed
{
color
:
#ed664b
;
}
/
deep
/
.val_deepPurple
{
color
:
rgb
(
179
,
2
,
149
);
}
/
deep
/
.val_deepGreen
{
color
:
#52d49a
;
}
@import
"./cell-val.less"
;
.ivu-page
{
height
:
34px
;
}
...
...
@@ -2267,80 +482,4 @@ export default {
.height15
{
height
:
15px
;
}
.tableContentBody
{
position
:
relative
;
.buildPosition
{
position
:
absolute
;
top
:
40%
;
left
:
45%
;
}
/
deep
/
.ivu-table-cell
{
//
height
:
48px
;
//
line-height
:
48px
;
padding-left
:
10px
;
padding-right
:
10px
;
}
/
deep
/
.ivu-table-fixed
{
box-shadow
:
4px
0
6px
-4px
rgba
(
0
,
0
,
0
,
0.2
);
}
/
deep
/
.ivu-table-fixed-right
{
box-shadow
:
-4px
0
6px
-4px
rgba
(
0
,
0
,
0
,
0.2
);
}
/
deep
/
.ivu-modal-body
{
padding
:
0
;
}
/
deep
/
.ivu-table-wrapper
{
border
:
none
;
}
/
deep
/
.ivu-table-fixed-right-header
{
border
:
none
;
}
/
deep
/
.ivu-table
:before
{
background
:
#fff
;
}
/
deep
/
.ivu-table
:after
{
background
:
#fff
;
}
/
deep
/
.ivu-table-fixed
::before
{
height
:
0
;
}
/
deep
/
.ivu-table-fixed-right
::before
{
height
:
0
;
}
/
deep
/
.allBox
{
position
:
relative
;
}
/
deep
/
.shadowColor
{
display
:
none
;
position
:
absolute
;
width
:
40px
;
height
:
40px
;
background
:
rgba
(
0
,
0
,
0
,
0.6
);
bottom
:
0
;
z-index
:
99
;
}
/
deep
/
.allBox
:hover
.shadowColor
{
display
:
block
;
}
/
deep
/
.ivu-table
.row-disabled-style
td
{
color
:
#c8c8c8
;
cursor
:
not-allowed
;
}
}
</
style
>
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/action.js
0 → 100644
View file @
89f16eff
import
CustomQueryTableAction
from
"../../table-view/table-action-column.vue"
;
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
,
rowIndex
}
=
params
,
props
=
column
.
cellRender
.
props
,
colItem
=
props
.
colItem
,
context
=
props
.
context
,
extraActionObject
=
props
.
extraActionObject
,
queryBus
=
props
.
queryBus
;
if
(
!
params
.
row
.
isCountRow
)
{
return
[
h
(
CustomQueryTableAction
,
{
props
:
{
params
:
params
,
colItem
:
colItem
,
context
:
context
,
extraActionObject
:
extraActionObject
,
queryBus
:
queryBus
},
on
:
{}
})
];
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/approval.js
0 → 100644
View file @
89f16eff
var
stepData
=
null
;
//获取审批流程数据
const
getApprovalStep
=
(
billId
,
billdefine
,
progressFlag
,
objectid
)
=>
{
var
path
=
""
;
if
(
progressFlag
&&
progressFlag
==
"ScrapProgress"
)
{
if
(
!
objectid
)
{
this
.
$Message
.
warning
(
"未获取到卡片ObjectId"
);
return
;
}
path
=
"/business/scrap/getScrapProgress/"
+
objectid
;
}
else
{
if
(
!
billId
)
{
this
.
$Message
.
warning
(
"未获取到业务id"
);
return
;
}
path
=
"/business/bill/getApprovaStep/"
+
billId
;
if
(
billdefine
)
{
if
(
billdefine
==
"com.jiuqi.np.gams2.business.bill.ReimburseBillDefine"
)
{
path
=
"/business/bill/getApprovaStep4Reimburse/"
+
billId
;
}
}
}
GAMS
.
Util
.
invokeServer
({
path
:
path
,
type
:
"GET"
,
contentType
:
"application/json"
,
}).
then
((
data
,
textStatus
,
response
)
=>
{
if
(
data
.
code
==
0
)
{
if
(
data
.
content
)
{
this
.
stepData
=
data
.
content
;
}
}
}).
catch
((
XMLHttpRequest
,
textStatus
,
errorThrown
)
=>
{
// this.$Message.error("未获取到流程信息");
});
};
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
let
styles
=
colItem
.
style
;
//查询列中的style属性配置关于default与item数组中元素的type都为class名称
if
(
styles
)
{
let
stylesArr
=
styles
.
item
;
let
styleValue
=
null
;
let
param
=
params
.
row
[
colItem
.
key
];
if
(
styles
.
default
)
{
return
[
h
(
"span"
,
{
class
:
styles
.
default
},
params
.
row
[
colItem
.
key
]
)
];
}
else
{
for
(
let
i
=
0
;
i
<
stylesArr
.
length
;
i
++
)
{
if
(
stylesArr
[
i
].
enumValue
==
param
)
{
styleValue
=
stylesArr
[
i
].
type
;
break
;
}
}
}
if
(
styleValue
)
{
return
[
h
(
"span"
,
{
class
:
styleValue
,
attrs
:
{
style
:
"vertical-align: middle;"
}
},
params
.
row
[
colItem
.
key
]
),
h
(
"Poptip"
,
{
attrs
:
{
placement
:
"right-start"
}
},
[
h
(
"svg"
,
{
attrs
:
{
"aria-hidden"
:
"true"
,
style
:
"margin-left:5px;vertical-align: middle;cursor: pointer;"
},
style
:
{
width
:
"14px"
,
height
:
"14px"
},
on
:
{
click
:
()
=>
{
//每次进来先清空
stepData
=
null
;
let
billid
=
params
.
row
.
billid
,
billDefine
=
params
.
row
.
billDefine
,
objectid
=
params
.
row
.
objectid
,
progressFlag
=
params
.
row
.
progressFlag
;
getApprovalStep
(
billid
,
billDefine
,
progressFlag
,
objectid
);
}
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
"#icon-_banliliucheng"
}
})
],
""
),
h
(
"div"
,
{
slot
:
"content"
},
[
h
(
"zStepsVertical"
,
{
attrs
:
{},
props
:
{
stepData
:
stepData
}
})
]
)
]
)
];
}
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/bill-type.js
0 → 100644
View file @
89f16eff
import
BillType
from
'../../billType.vue'
;
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
return
[
h
(
"div"
,
{
attrs
:
{
style
:
"cursor: pointer;"
}
},
[
h
(
BillType
,
{
props
:
{
params
:
params
.
row
,
config
:
colItem
}
},
[]
)
]
)
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/compare-time.js
0 → 100644
View file @
89f16eff
const
getTimeStr
=
(
val
)
=>
{
var
time
=
new
Date
(
val
);
var
year
=
time
.
getFullYear
();
var
month
=
time
.
getMonth
()
+
1
;
var
day
=
time
.
getDate
();
var
timeStr
=
year
+
"-"
+
(
month
>
9
?
month
:
"0"
+
month
)
+
"-"
+
(
day
>
9
?
day
:
"0"
+
day
);
return
timeStr
;
}
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
return
[
h
(
"div"
,
{
class
:
"haveDoubleTimeContent"
},
[
h
(
"div"
,
{
class
:
"topTime"
},
[
h
(
"span"
,
{
style
:
"font-size:12px;color:#4C79E1;font-family:MicrosoftYaHei;"
},
[
"申请"
]
),
h
(
"span"
,
{
style
:
"font-size:12px;color:#666;font-family:MicrosoftYaHei;"
},
[
" : "
+
getTimeStr
(
params
.
row
[
colItem
.
key
])
]
)
]
),
h
(
"div"
,
{
class
:
"bottomTime"
},
[
h
(
"span"
,
{
style
:
"font-size:12px;color:#56BA3E;font-family:MicrosoftYaHei;"
},
[
"已达"
]
),
h
(
"span"
,
{
style
:
"font-size:12px;color:#666;font-family:MicrosoftYaHei;"
},
[
" : "
+
getTimeStr
(
params
.
row
[
colItem
.
queryFields
])
]
)
]
)
]
)
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/hyperlink.js
0 → 100644
View file @
89f16eff
import
queryUtil
from
"../../queryUtil"
;
import
CustomPoptip
from
"../../../custom-poptip/components/custom-poptip.vue"
;
//判断列对象是否为日期或数值类型
const
valueColumnUseRender
=
(
colItem
)
=>
{
let
format
=
colItem
.
format
if
(
format
&&
[
"DATE"
,
"NUMBER"
,
"date"
,
"number"
].
includes
(
format
.
type
))
{
return
true
}
return
false
;
}
const
getParamValue
=
(
params
,
colItem
)
=>
{
let
value
=
params
.
row
[
colItem
.
key
],
format
=
colItem
.
format
;
if
(
format
&&
[
"DATE"
,
"date"
].
includes
(
format
.
type
))
{
return
queryUtil
.
dateTimeFormat
(
value
,
format
.
config
);
}
else
if
(
format
&&
[
"NUMBER"
,
"number"
].
includes
(
format
.
type
))
{
return
isNaN
(
value
)
?
value
:
queryUtil
.
numberFormat
(
value
,
format
.
config
);
}
else
{
return
value
;
}
}
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
props
=
column
.
cellRender
.
props
,
_this
=
props
.
this
,
queryHandler
=
props
.
queryHandler
,
businessPoptipContent
=
props
.
businessPoptipContent
,
extraActionObject
=
props
.
extraActionObject
,
colItem
=
props
.
colItem
,
styles
=
colItem
.
style
;
colItem
.
key
=
column
.
property
;
if
(
styles
&&
styles
.
default
)
{
let
action
=
colItem
.
action
;
return
[
h
(
"a"
,
{
class
:
styles
.
default
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
)
];
}
else
if
(
colItem
.
renderPadding
)
{
let
paddingLeft
=
params
.
row
[
colItem
.
renderPadding
];
let
action
=
colItem
.
action
;
return
[
h
(
"div"
,
{
style
:
{
paddingLeft
:
paddingLeft
+
"px"
,
cursor
:
"pointer"
},
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
}
}
},
[
params
.
row
[
colItem
.
key
]]
)
];
}
else
{
let
action
=
colItem
.
action
,
obj
=
params
.
row
,
_obj
=
obj
.
bizdes
?
obj
.
bizdes
:
obj
.
biztype
;
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"isLock"
)
==
true
)
{
if
(
obj
.
isLock
==
true
)
{
if
(
params
.
row
.
cardobjectid
)
{
return
[
h
(
"div"
,
{},
[
h
(
CustomPoptip
,
{
props
:
{
placement
:
"right"
,
trigger
:
"hover"
,
transfer
:
true
,
rowData
:
params
.
row
,
opotipCompontent
:
"businessPoptip"
,
context
:
_this
,
contents
:
"正在进行"
+
_obj
+
" 业务"
,
businessPoptipContent
:
businessPoptipContent
},
},
[
h
(
"a"
,
{
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
)
]
)
])
];
}
else
{
return
[
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
"正在进行 "
+
_obj
+
" 业务"
,
transfer
:
true
}
},
[
h
(
"a"
,
{
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
}
},
},
params
.
row
[
colItem
.
key
]
),
]
),
])
];
}
}
else
{
return
[
h
(
"a"
,
{
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
},
},
},
params
.
row
[
colItem
.
key
]
)
];
}
}
else
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"customIsLock"
)
==
true
)
{
if
(
obj
.
customIsLock
==
true
)
{
return
[
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
obj
.
customLockMessage
,
transfer
:
true
,
},
},
[
h
(
"a"
,
{
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
)
]
)
])
];
}
else
{
return
[
h
(
"a"
,
{
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
);
}
}
},
params
.
row
[
colItem
.
key
]
)
];
}
}
else
{
return
[
h
(
"a"
,
{
style
:
"color:#3477cb;"
,
on
:
{
click
:
()
=>
{
queryUtil
.
executeAction
(
_this
,
[
params
.
row
],
action
.
action
,
action
.
param
,
action
.
opporunity
,
extraActionObject
,
queryHandler
);
}
}
},
valueColumnUseRender
(
colItem
)
?
getParamValue
(
params
,
colItem
)
:
params
.
row
[
colItem
.
key
]
)
];
}
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/img-src.js
0 → 100644
View file @
89f16eff
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
,
{
events
}
=
renderOpts
,
host
=
window
.
location
.
host
,
rootUrl
=
this
.
rootUrl
;
colItem
.
key
=
column
.
property
;
let
visibleUrl
=
"http://"
+
host
+
rootUrl
+
"/business/qrcode/downloadFirstByBillid/"
+
params
.
row
[
colItem
.
key
];
if
(
!
params
.
row
.
isCountRow
)
{
return
[
h
(
"div"
,
{
attrs
:
{
class
:
"allBox"
}
},
[
h
(
"img"
,
{
attrs
:
{
src
:
"http://"
+
host
+
rootUrl
+
"/business/qrcode/downloadByid/"
+
params
.
row
[
colItem
.
key
],
style
:
"width:40px;height:40px;display:inline-block;vertical-align: middle;"
,
onerror
:
"javascript:this.src='../../../assets/image/tjtp.png';"
//@king
}
}),
h
(
"div"
,
{
attrs
:
{
class
:
"shadowColor"
}
},
[
h
(
"svg"
,
{
attrs
:
{
style
:
"margin-left: 33%;margin-top: 33%;cursor: pointer;"
},
style
:
{
width
:
"14px"
,
height
:
"14px"
},
on
:
{
click
:
()
=>
events
.
click
(
visibleUrl
)
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
"#icon-_yulan"
}
})
],
""
)
]
)
]
)
];
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/img-txt.js
0 → 100644
View file @
89f16eff
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
return
[
h
(
"div"
,
{},
[
h
(
"img"
,
{
attrs
:
{
src
:
params
.
row
.
assetPic
,
style
:
"width:40px;display:inline-block;vertical-align: middle;"
}
}),
h
(
"div"
,
{
attrs
:
{
style
:
"display:inline-block;vertical-align: middle;"
}
},
params
.
row
[
colItem
.
key
]
)
])
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/img.js
0 → 100644
View file @
89f16eff
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
,
{
events
}
=
renderOpts
,
host
=
window
.
location
.
host
,
rootUrl
=
this
.
rootUrl
;
colItem
.
key
=
column
.
property
;
let
visibleUrl
=
"http://"
+
host
+
rootUrl
+
"/business/qrcode/downloadFirstByBillid/"
+
params
.
row
[
colItem
.
key
];
if
(
!
params
.
row
.
isCountRow
)
{
return
[
h
(
"div"
,
{
attrs
:
{
class
:
"allBox"
}
},
[
h
(
"img"
,
{
attrs
:
{
src
:
"http://"
+
host
+
rootUrl
+
"/business/qrcode/downloadFirstByBillid/"
+
params
.
row
[
colItem
.
key
],
style
:
"width:40px;height:40px;display:inline-block;vertical-align: middle;"
,
onerror
:
"javascript:this.src='../../../assets/image/tjtp.png';"
//@king
}
}),
h
(
"div"
,
{
attrs
:
{
class
:
"shadowColor"
}
},
[
h
(
"svg"
,
{
attrs
:
{
style
:
"margin-left: 33%;margin-top: 33%;cursor: pointer;"
},
style
:
{
width
:
"14px"
,
height
:
"14px"
},
on
:
{
click
:
()
=>
events
.
click
(
visibleUrl
)
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
"#icon-_yulan"
}
})
],
""
)
]
)
]
)
];
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/index.js
0 → 100644
View file @
89f16eff
import
ACTION
from
'./action.js'
import
APPROVAL
from
'./approval.js'
import
BILLTYPE
from
'./bill-type.js'
import
COMPARETIME
from
'./compare-time.js'
import
HYPERLINK
from
'./hyperlink.js'
import
IMG_SRC
from
'./img-src.js'
import
IMG_TXT
from
'./img-txt.js'
import
IMG
from
'./img.js'
import
MERGE
from
'./merge.js'
import
OBJECT
from
'./object.js'
import
PASSTATUS
from
'./passtatus.js'
import
SEGMENTPROGRESS
from
'./segment-progress.js'
import
Seq
from
'./seq.js'
import
TEXTWITHTAG
from
'./text-with-tag.js'
import
TIMEDIFF
from
'./time-diff.js'
import
VALUE
from
'./value.js'
export
default
{
ACTION
,
APPROVAL
,
BILLTYPE
,
COMPARETIME
,
HYPERLINK
,
IMG_SRC
,
IMG_TXT
,
IMG
,
MERGE
,
OBJECT
,
PASSTATUS
,
SEGMENTPROGRESS
,
Seq
,
TEXTWITHTAG
,
TIMEDIFF
,
VALUE
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/merge.js
0 → 100644
View file @
89f16eff
const
formatYearMonth
=
(
val
)
=>
{
if
(
Number
(
val
)
<
12
)
{
return
val
+
"个月"
;
}
else
if
(
Number
(
val
)
==
12
)
{
return
"1年"
;
}
else
{
if
(
Number
(
val
)
%
12
==
0
)
{
return
Number
(
val
)
/
12
+
"年"
;
}
else
{
return
parseInt
(
Number
(
val
)
/
12
)
+
"年"
+
(
Number
(
val
)
%
12
)
+
"个月"
;
}
}
};
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
//财务入账日期存在,计算已使用年限
if
(
params
.
row
.
qudrq
)
{
// zjy实现改变逻辑
var
timestamp
=
new
Date
(
params
.
row
.
qudrq
);
var
currentTime
=
new
Date
();
let
qudrqYear
=
timestamp
.
getFullYear
(),
qudrqMonth
=
timestamp
.
getMonth
(),
qudrqDate
=
timestamp
.
getDate
();
let
currentYear
=
currentTime
.
getFullYear
(),
currentMonth
=
currentTime
.
getMonth
(),
currentDate
=
currentTime
.
getDate
();
var
year
=
0
,
month
=
0
;
if
(
currentYear
-
qudrqYear
>
0
)
{
year
=
currentYear
-
qudrqYear
;
}
if
(
currentMonth
-
qudrqMonth
>
0
)
{
month
=
currentMonth
-
qudrqMonth
;
}
else
if
(
currentMonth
-
qudrqMonth
<
0
)
{
month
=
12
+
currentMonth
-
qudrqMonth
;
year
=
year
-
1
;
}
if
(
month
==
12
)
{
month
=
0
;
year
=
year
+
1
;
}
if
(
currentDate
-
qudrqDate
>
0
)
{
month
+=
1
;
}
var
totalMonth
=
year
*
12
+
month
;
}
let
showYearMonth
=
year
+
"年"
+
month
+
"个月"
if
(
month
>=
12
)
{
year
=
year
+
parseInt
(
month
/
12
)
month
=
month
%
12
}
if
(
year
==
0
&&
month
>
0
&&
month
<
12
)
{
showYearMonth
=
month
+
"个月"
}
else
if
(
year
>
0
&&
month
==
0
)
{
showYearMonth
=
year
+
"年"
}
if
((
params
.
row
.
zhejzt
&&
params
.
row
.
zhejzt
==
"不提折旧"
)
||
!
params
.
row
[
colItem
.
key
])
{
//折旧状态为空或者不提折旧,只显示已使用年限
return
[
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"margin-bottom:3px"
}
},
[
h
(
"span"
,
{
attrs
:
{
style
:
"font-size:12px;color:#555555;"
},
},
params
.
row
.
qudrq
?
showYearMonth
:
""
),
]
)
])
];
}
else
{
//提折旧则显示已使用年限和折旧年限
//财务已入账则显示已使用年限和折旧年限
if
(
params
.
row
.
qudrq
)
{
return
[
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"margin-bottom:3px"
}
},
[
h
(
"span"
,
{
attrs
:
{
// style: "font-size:12px;color:#555555;",
style
:
params
.
row
[
colItem
.
key
]
&&
totalMonth
>
params
.
row
[
colItem
.
key
]
?
"color:#ED664B"
:
""
},
},
showYearMonth
)
]
),
h
(
"div"
,
{
attrs
:
{
style
:
"font-size:12px;color:#888888"
},
},
params
.
row
[
colItem
.
key
]
?
"年限:"
+
formatYearMonth
(
params
.
row
[
colItem
.
key
])
:
""
)
])
];
}
else
{
//财务未入账的,只显示折旧年限
return
[
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"margin-bottom:3px"
}
},
[
h
(
"span"
,
{
attrs
:
{
style
:
"font-size:12px;color:#555555;"
,
}
},
params
.
row
[
colItem
.
key
]
?
"年限:"
+
formatYearMonth
(
params
.
row
[
colItem
.
key
])
:
""
)
]
)
])
];
}
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/object.js
0 → 100644
View file @
89f16eff
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
if
(
params
.
row
[
colItem
.
key
]
&&
[
"title"
,
"name"
].
includes
(
colItem
.
field
))
{
return
[
h
(
"div"
,
{},
params
.
row
[
colItem
.
key
][
colItem
.
field
])
]
}
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/passtatus.js
0 → 100644
View file @
89f16eff
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
,
props
=
column
.
cellRender
.
props
,
contextData
=
props
.
contextData
;
colItem
.
key
=
column
.
property
;
return
[
h
(
"div"
,
{
attrs
:
{
style
:
"height:48px;line-height:44px"
}
},
[
!
params
.
row
.
isCountRow
?
h
(
"zApprovalButtonTab"
,
{
props
:
{
contextData
:
contextData
,
rowData
:
params
.
row
,
indexs
:
params
.
index
,
state
:
params
.
row
.
state
,
},
})
:
""
]
)
]
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/segment-progress.js
0 → 100644
View file @
89f16eff
import
SegmentProgress
from
"../../segment-progress.vue"
;
const
returnSegmentProgressData
=
(
queryFields
,
params
)
=>
{
let
segmentProgressDataKey
=
[
"left"
,
"middle"
,
"right"
];
let
segmentProgressData
=
{};
for
(
let
i
=
0
;
i
<
queryFields
.
length
;
i
++
)
{
let
item
=
queryFields
[
i
];
segmentProgressData
[
segmentProgressDataKey
[
i
]]
=
params
.
row
[
item
];
}
return
segmentProgressData
;
}
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
return
[
h
(
SegmentProgress
,
{
props
:
{
segmentProgressData
:
returnSegmentProgressData
(
colItem
.
queryFields
,
params
)
}
},
[]
)
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/seq.js
0 → 100644
View file @
89f16eff
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
,
rowIndex
}
=
params
,
startIndex
=
column
.
cellRender
.
props
.
startIndex
;
params
.
row
.
_serialIndex
=
startIndex
+
params
.
rowIndex
+
1
;
return
[
h
(
"span"
,
{},
[
h
(
"strong"
,
{
attrs
:
{
style
:
params
.
row
.
isCountRow
?
"font-weight:bold;"
:
""
}
},
params
.
row
.
isCountRow
?
"合计"
:
startIndex
+
params
.
rowIndex
+
1
)
])
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/text-with-tag.js
0 → 100644
View file @
89f16eff
const
defaultEnumArr
=
[{
enumValue
:
"贵重"
,
type
:
"textWhiteBgB48E6C"
},
{
enumValue
:
"贵重"
,
type
:
"textWhiteBgFF8286"
}
];
const
returnTagRender
=
(
h
,
params
,
styleItem
=
defaultEnumArr
)
=>
{
var
renderTagArr
=
[];
for
(
let
i
=
0
;
i
<
styleItem
.
length
;
i
++
)
{
let
item
=
styleItem
[
i
];
if
(
params
.
row
[
item
.
queryFields
])
{
renderTagArr
.
push
(
h
(
"span"
,
{
stype
:
"margin-right:10px"
,
class
:
"val_"
+
item
.
type
},
[
item
.
enumValue
]
)
);
}
}
return
renderTagArr
;
}
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
;
colItem
.
key
=
column
.
property
;
return
[
h
(
"div"
,
{
class
:
"textWithTagContainer"
},
[
h
(
"div"
,
{
style
:
"font-size:12px;font-family:MicrosoftYaHei;color:#666"
},
[
params
.
row
[
colItem
.
key
]
||
"默认文本"
]
),
h
(
"div"
,
{
class
:
"tagPart"
},
returnTagRender
(
h
,
params
,
colItem
.
style
&&
colItem
.
style
.
items
)
)
]
)
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/time-diff.js
0 → 100644
View file @
89f16eff
const
getTimeDifference
=
(
begin
,
end
)
=>
{
let
timeDifferenceStr
=
Math
.
ceil
((
new
Date
(
end
).
getTime
()
-
new
Date
(
begin
).
getTime
())
/
(
1000
*
60
*
60
*
24
))
+
"天"
;
return
timeDifferenceStr
;
}
const
getTimeStr
=
(
val
)
=>
{
var
time
=
new
Date
(
val
);
var
year
=
time
.
getFullYear
();
var
month
=
time
.
getMonth
()
+
1
;
var
day
=
time
.
getDate
();
var
timeStr
=
year
+
"-"
+
(
month
>
9
?
month
:
"0"
+
month
)
+
"-"
+
(
day
>
9
?
day
:
"0"
+
day
);
return
timeStr
;
}
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
,
beginTimeKey
=
colItem
.
config
.
beginTimeKey
,
endTimeKey
=
colItem
.
config
.
endTimeKey
,
timeDifference
=
getTimeDifference
(
params
.
row
[
beginTimeKey
],
endTimeKey
&&
params
.
row
[
endTimeKey
]
?
params
.
row
[
endTimeKey
]
:
Date
.
now
());
colItem
.
key
=
column
.
property
;
return
[
h
(
"div"
,
{},
[
h
(
"div"
,
{
attrs
:
{
style
:
"display:inline-block;margin:0 3px 3px 0;font-size:12px;"
}
},
getTimeStr
(
params
.
row
[
beginTimeKey
])
),
h
(
"div"
,
{
attrs
:
{
style
:
"display:inline-block;padding:0px 5px;color:#ED664B;border:1px solid #ED664B;font-size:12px; border-radius:4px;"
}
},
timeDifference
)
])
];
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/column-type/value.js
0 → 100644
View file @
89f16eff
import
CustomPoptip
from
"../../../custom-poptip/components/custom-poptip.vue"
;
import
NumUtils
from
"../../../../utils/NumUtils"
;
import
queryUtil
from
"../../queryUtil"
;
//获取合计数值
const
getCount
=
(
params
,
name
)
=>
{
let
count
=
0
;
if
(
params
.
row
.
isCountRow
)
{
for
(
var
i
=
0
,
len
=
params
.
data
.
length
;
i
<
len
;
i
++
)
{
count
+=
params
.
data
[
i
][
name
]
?
parseFloat
(
replaceNum
(
params
.
data
[
i
][
name
]))
:
0
;
}
}
else
{
return
params
.
row
[
name
];
}
return
NumUtils
.
splitThousand
(
count
,
2
);
}
const
replaceNum
=
(
num
)
=>
{
let
str
=
String
(
num
).
replace
(
/,/g
,
""
);
return
Number
(
str
);
}
//判断列对象是否为日期或数值类型
const
valueColumnUseRender
=
(
colItem
)
=>
{
let
format
=
colItem
.
format
if
(
format
&&
[
"DATE"
,
"NUMBER"
,
"date"
,
"number"
].
includes
(
format
.
type
))
{
return
true
}
return
false
;
}
//日期或数值类型转换
const
getParamValue
=
(
params
,
colItem
)
=>
{
let
value
=
params
.
row
[
colItem
.
key
],
format
=
colItem
.
format
;
if
(
format
&&
[
"DATE"
,
"date"
].
includes
(
format
.
type
))
{
return
queryUtil
.
dateTimeFormat
(
value
,
format
.
config
);
}
else
if
(
format
&&
[
"NUMBER"
,
"number"
].
includes
(
format
.
type
))
{
return
isNaN
(
value
)
?
value
:
queryUtil
.
numberFormat
(
value
,
format
.
config
);
}
else
{
return
value
;
}
}
export
default
{
renderDefault
(
h
,
renderOpts
,
params
)
{
let
{
row
,
column
}
=
params
,
colItem
=
column
.
cellRender
.
props
.
colItem
,
_this
=
column
.
cellRender
.
props
.
this
,
businessPoptipContent
=
column
.
cellRender
.
props
.
businessPoptipContent
,
obj
=
params
.
row
,
_obj
=
obj
.
bizdes
?
obj
.
bizdes
:
obj
.
biztype
;
//根据判断列对象类型为日期或数值类型进行相对应的render渲染
if
(
valueColumnUseRender
(
colItem
))
{
let
value
=
getParamValue
(
params
,
colItem
);
// 增加其它需要render处理逻辑
return
[
h
(
"div"
,
value
)];
}
//判断是否具有相关样式配置
let
styles
=
colItem
.
style
;
if
(
styles
)
{
let
stylesArr
=
styles
.
item
,
styleValue
=
null
,
param
=
params
.
row
[
colItem
.
key
];
for
(
let
i
=
0
;
i
<
stylesArr
.
length
;
i
++
)
{
if
(
stylesArr
[
i
].
enumValue
==
param
)
{
styleValue
=
stylesArr
[
i
].
type
;
break
;
}
}
if
(
!
styleValue
&&
styles
.
default
)
{
styleValue
=
styles
.
default
;
}
if
(
param
||
param
===
0
)
{
if
(
typeof
styleValue
!=
"undefined"
&&
null
!=
styleValue
)
{
if
(
styleValue
.
substring
(
0
,
3
)
==
"val"
)
{
return
[
h
(
"span"
,
{
class
:
styleValue
},
row
[
column
.
property
]
)
];
}
else
if
(
styleValue
.
substring
(
0
,
3
)
==
"img"
)
{
return
[
h
(
"svg"
,
{
attrs
:
{
"aria-hidden"
:
"true"
,
style
:
"vertical-align: middle;"
},
style
:
{
width
:
"40px"
,
height
:
"40px"
}
},
[
h
(
"use"
,
{
attrs
:
{
"xlink:href"
:
row
[
column
.
property
]
==
"通过"
?
"#icon-_tongguo"
:
"#icon-_bohui"
}
})
],
""
)
];
}
}
}
}
//判断此列是否求和
if
(
colItem
.
isSum
==
true
)
{
return
[
h
(
"div"
,
{},
[
params
.
row
.
isCountRow
?
h
(
"strong"
,
{
attrs
:
{
style
:
params
.
row
.
isCountRow
?
"font-weight:bold;"
:
""
,
style
:
"color: #ed664b;"
}
},
getCount
(
params
,
colItem
.
key
)
)
:
h
(
"span"
,
{
style
:
"color: #ed664b;"
},
row
[
column
.
property
]
)
])
];
}
/**
* isLock是否锁定,这个是默认查询锁定表
* customIsLock自定义的时候锁定,有的时候可能根据业务需求需要锁定这个数据,哪怕是锁定表没锁它
*/
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"isLock"
)
==
true
&&
obj
.
isLock
==
true
)
{
if
(
params
.
row
.
cardobjectid
)
{
return
[
h
(
"div"
,
{},
[
h
(
CustomPoptip
,
{
props
:
{
placement
:
"right"
,
trigger
:
"hover"
,
transfer
:
true
,
rowData
:
params
.
row
,
opotipCompontent
:
"businessPoptip"
,
context
:
_this
,
contents
:
"正在进行"
+
_obj
+
" 业务"
,
businessPoptipContent
:
businessPoptipContent
},
// this.popperShow() 为空
// on: {
// "on-popper-show": this.popperShow
// }
},
row
[
column
.
property
]
)
])
];
}
else
{
return
[
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
"正在进行"
+
_obj
+
" 业务"
,
transfer
:
true
}
},
// params.row[colItem.key]
row
[
column
.
property
]
)
])
];
}
}
else
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
obj
,
"customIsLock"
)
==
true
&&
obj
.
customIsLock
==
true
)
{
return
[
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
props
:
{
placement
:
"right"
,
content
:
obj
.
customLockMessage
,
transfer
:
true
}
},
row
[
column
.
property
]
)
])
];
}
else
{
// params.column.tooltip
if
(
colItem
.
tooltip
&&
row
[
column
.
property
])
{
return
[
h
(
"div"
,
{},
[
h
(
"Tooltip"
,
{
attrs
:
{
class
:
"line1"
},
style
:
{
width
:
Number
(
colItem
.
width
)
-
20
+
"px"
},
props
:
{
maxWidth
:
"200"
,
placement
:
"bottom-start"
,
content
:
params
.
row
[
colItem
.
key
],
transfer
:
true
}
},
row
[
column
.
property
]
)
])
];
}
else
if
(
colItem
.
numberType
==
1
)
{
return
[
h
(
"div"
,
{},
[
NumUtils
.
splitThousand
(
row
[
column
.
property
]
?
row
[
column
.
property
]
:
0
,
2
)
])
];
}
else
{
//renderPadding属性是针对左内边距的填充宽度
if
(
colItem
.
renderPadding
)
{
let
paddingLeft
=
params
.
row
[
colItem
.
renderPadding
];
return
[
h
(
"div"
,
{
style
:
{
paddingLeft
:
paddingLeft
+
"px"
}
},
[
row
[
column
.
property
]]
)
];
}
else
{
return
[
h
(
"div"
,
{},
[
row
[
column
.
property
]])
];
}
}
};
}
}
\ No newline at end of file
develop/@rbc/workflow-job-view/src/components/custom-query/vxe-table/table.vue
0 → 100644
View file @
89f16eff
<
template
>
<div>
<vxe-grid
:data=
"tableData"
ref=
"xTable"
border
:highlight-current-row=
"highlightRow"
:columns=
"columns"
:row-class-name=
"rowClassName"
:height=
"height"
:pager-config=
"pagerConfig"
:loading=
"loading"
@
current-change=
"onCurrentChange"
@
checkbox-change=
"onSelectionChange"
@
checkbox-all=
"onSelectAll"
@
sort-change=
"onSortChange"
@
page-change=
"pageChange"
@
cell-click=
"onCellClick"
@
cell-dblclick=
"onCellDblclick"
>
<template
#
empty
>
<span>
{{
noDataText
}}
</span>
</
template
>
</vxe-grid>
</div>
</template>
<
script
>
export
default
{
name
:
'VxeTableView'
,
data
()
{
return
{};
},
props
:
{
tableData
:
{
type
:
Array
,
require
:
false
,
default
()
{
return
[];
}
},
columns
:
{
type
:
Array
},
rowClassName
:
{
type
:
Function
,
default
()
{
return
""
;
}
},
height
:
{
type
:
[
Number
,
String
]
},
highlightRow
:
{
type
:
Boolean
},
noDataText
:
{
type
:
String
,
default
:
""
},
pagerConfig
:
{
type
:
Object
,
default
:
function
()
{
return
{
layouts
:
[
'Total'
,
'PrevJump'
,
'PrevPage'
,
'JumpNumber'
,
'NextPage'
,
'NextJump'
,
'Sizes'
,
'FullJump'
],
currentPage
:
1
,
pageSize
:
10
,
total
:
0
,
pagerCount
:
7
,
pageSizes
:
[
10
,
20
,
50
,
100
,
200
],
enabled
:
true
//是否启用
}
}
},
loading
:
{
type
:
Boolean
,
default
:
false
}
},
methods
:
{
//当排序条件发生变化时触发该事件
onSortChange
({
column
,
property
,
order
,
sortBy
,
sortList
,
$event
})
{
this
.
$emit
(
"on-sort-change"
,
column
);
},
//只对 type=checkbox 有效,当手动勾选全选时触发的事件
onSelectAll
({
records
,
reserves
,
indeterminates
,
checked
,
$event
})
{
if
(
records
.
length
>
0
)
{
this
.
$emit
(
"on-select-all"
,
records
);
}
else
{
this
.
$emit
(
"on-select-all-cancel"
,
records
,
this
.
tableData
);
}
},
//只对 highlightCurrentRow 有效,当手动选中行并且值发生改变时触发的事件
onCurrentChange
({
newValue
,
oldValue
,
row
,
rowIndex
,
$rowIndex
,
column
,
columnIndex
,
$columnIndex
,
$event
})
{
this
.
$emit
(
"on-current-change"
,
newValue
,
oldValue
);
},
//只对 type=checkbox 有效,当手动勾选并且值发生改变时触发的事件
onSelectionChange
({
records
,
reserves
,
indeterminates
,
checked
,
row
,
rowIndex
,
$rowIndex
,
column
,
columnIndex
,
$columnIndex
,
$event
})
{
this
.
$emit
(
"on-selection-change"
,
records
);
if
(
row
.
checked
)
{
this
.
$emit
(
"on-select"
,
records
,
row
);
}
else
{
this
.
$emit
(
"on-select-cancel"
,
records
,
row
);
}
},
//页签进行切换时触发执行
pageChange
({
type
,
currentPage
,
pageSize
,
$event
})
{
this
.
$emit
(
"on-page-change"
,
currentPage
,
pageSize
);
},
//单元格被点击时会触发该事件
onCellClick
({
row
,
rowIndex
,
$rowIndex
,
column
,
columnIndex
,
$columnIndex
,
triggerRadio
,
triggerCheckbox
,
triggerTreeNode
,
triggerExpandNode
,
$event
})
{
this
.
$emit
(
"on-row-click"
,
row
,
rowIndex
)
},
//单元格被双击时会触发该事件
onCellDblclick
({
row
,
rowIndex
,
$rowIndex
,
column
,
columnIndex
,
$columnIndex
,
$event
})
{
this
.
$emit
(
"on-row-dblclick"
,
row
,
rowIndex
)
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
/
deep
/
.vxe-table--render-default
{
.
vxe-body--column
:
not
(.
col--ellipsis
)
{
padding
:
5px
0
;
}
.vxe-cell
{
font-size
:
14px
;
font-family
:
"Microsoft YaHei"
,
"微软雅黑"
,
"PingFang SC"
,
"Helvetica Neue"
,
Helvetica
,
"Hiragino Sans GB"
,
sans-serif
,
Arial
;
}
.vxe-cell--checkbox
:hover
{
border-color
:
#3477cb
;
}
.is--checked
{
color
:
#3477cb
;
.
vxe-checkbox--icon
:
before
{
border-color
:
#3477cb
;
background-color
:
#3477cb
;
}
}
.is--indeterminate
{
color
:
#3477cb
;
.
vxe-checkbox--icon
:
before
{
border-color
:
#3477cb
;
background-color
:
#3477cb
;
}
}
}
/
deep
/
.vxe-grid--pager-wrapper
{
.is--background
{
.
vxe-pager--num-btn
:
not
(.
is--disabled
).
is--active
{
background-color
:
#3477cb
;
}
}
}
.rowperson
{
display
:
inline-block
;
cursor
:
pointer
;
}
.permodal
{
position
:
absolute
;
width
:
300px
;
height
:
210px
;
background-color
:
red
;
}
.poptip
{
display
:
flex
;
flex-flow
:
column
;
}
</
style
>
\ No newline at end of file
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