Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
2f05b64a
提交
2f05b64a
编写于
1月 29, 2021
作者:
tony001
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
cfdd2547
11b6ec4d
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
131 行增加
和
121 行删除
+131
-121
app-data-upload.vue
src/components/app-data-upload/app-data-upload.vue
+8
-2
app-message-popover.vue
src/components/app-message-popover/app-message-popover.vue
+118
-116
dropdown-list-mpicker.vue
...omponents/dropdown-list-mpicker/dropdown-list-mpicker.vue
+2
-2
dropdown-list.vue
src/components/dropdown-list/dropdown-list.vue
+3
-1
未找到文件。
src/components/app-data-upload/app-data-upload.vue
浏览文件 @
2f05b64a
...
...
@@ -52,6 +52,7 @@ import CodeListService from "@/codelist/codelist-service";
import
EntityService
from
'@/service/entity-service'
;
import
{
Vue
,
Component
,
Prop
,
Provide
,
Emit
,
Watch
}
from
'vue-property-decorator'
;
import
{
Environment
}
from
'@/environments/environment'
;
import
moment
from
"moment"
;
@
Component
({
})
...
...
@@ -395,11 +396,11 @@ export default class AppDataUploadView extends Vue {
let
reader
=
new
FileReader
();
reader
.
onload
=
(
e
:
any
)
=>
{
let
data
=
e
.
target
.
result
;
this
.
workBookData
=
XLSX
.
read
(
data
,
{
type
:
'binary'
});
this
.
workBookData
=
XLSX
.
read
(
data
,
{
type
:
'binary'
,
cellDates
:
true
});
let
xlsxData
=
XLSX
.
utils
.
sheet_to_json
(
this
.
workBookData
.
Sheets
[
this
.
workBookData
.
SheetNames
[
0
]]);
let
list1
=
this
.
getFirstRow
(
this
.
workBookData
);
xlsxData
=
this
.
AddXlsxData
(
xlsxData
,
list1
);
this
.
importDataArray
=
JSON
.
parse
(
JSON
.
stringify
(
xlsxData
)
);
this
.
importDataArray
=
this
.
$util
.
deepCopy
(
xlsxData
);
(
this
.
$refs
.
inputUpLoad
as
any
).
value
=
''
;
};
reader
.
readAsBinaryString
(
f
);
...
...
@@ -505,6 +506,11 @@ export default class AppDataUploadView extends Vue {
data
.
forEach
((
item
:
any
)
=>
{
let
curObject
:
any
=
{};
Object
.
keys
(
item
).
forEach
((
ele
:
any
)
=>
{
// todo XLSX读取时间为国际时间(东8区)+8H转为标准时间
if
(
item
[
ele
]
instanceof
Date
){
const
tempDate
:
Date
=
item
[
ele
];
item
[
ele
]
=
moment
(
tempDate
).
add
(
8
,
'h'
).
format
(
"YYYY-MM-DD HH:mm:ss"
);
}
if
(
this
.
allFieldMap
.
get
(
ele
).
codelist
){
let
codelistTag
:
string
=
this
.
allFieldMap
.
get
(
ele
).
codelist
.
tag
;
let
codelistIsNumber
:
boolean
=
this
.
allFieldMap
.
get
(
ele
).
codelist
.
isnumber
;
...
...
src/components/app-message-popover/app-message-popover.vue
浏览文件 @
2f05b64a
...
...
@@ -84,140 +84,142 @@
</template>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Subject
}
from
"rxjs"
;
import
{
Environment
}
from
'@/environments/environment'
;
import
moment
from
'moment'
;
import
{
Vue
,
Component
,
Prop
,
Model
,
Emit
}
from
"vue-property-decorator"
;
import
{
Environment
}
from
'@/environments/environment'
;
import
moment
from
'moment'
;
@
Component
({})
export
default
class
AppMessagePopover
extends
Vue
{
@
Component
({})
export
default
class
AppMessagePopover
extends
Vue
{
// 是否显示小圆点
public
showIsDot
:
any
=
false
;
// 默认显示的tab页
public
default_tab_pane
:
any
=
"first"
;
// 待办列表
public
myTasks
:
any
=
[];
// 待办面板标签
public
myTasksLabel
:
any
=
"待办"
;
// 待办面板显示条数
public
taskShowCnt
:
number
=
0
;
// 消息列表
public
myMsgs
:
any
=
[];
// 消息面板标签
public
myMsgsLabel
:
any
=
"消息"
;
// 信息面板显示条数
public
msgShowCnt
:
number
=
0
;
// 是否显示小圆点
public
showIsDot
:
any
=
false
;
// 默认显示的tab页
public
default_tab_pane
:
any
=
"first"
;
// 待办列表
public
myTasks
:
any
=
[];
// 待办面板标签
public
myTasksLabel
:
any
=
"待办"
;
// 待办面板显示条数
public
taskShowCnt
:
number
=
0
;
// 消息列表
public
myMsgs
:
any
=
[];
// 消息面板标签
public
myMsgsLabel
:
any
=
"消息"
;
// 信息面板显示条数
public
msgShowCnt
:
number
=
0
;
/**
* vue创建
*/
created
():
void
{}
/**
* vue创建
*/
created
():
void
{}
/**
* vue挂载
*/
mounted
():
void
{
// 首次获取待办列表
this
.
getMyTasks
();
// 定时器:每隔1分钟重新获取待办列表
const
timer
=
setInterval
(()
=>
{
this
.
getMyTasks
();
},
60000
);
// 监听定时器,在vue销毁前清除定时器
this
.
$once
(
'hook:beforeDestroy'
,()
=>
{
// 清除定时器
clearInterval
(
timer
);
});
/**
* vue挂载
*/
mounted
():
void
{
if
(
!
Environment
.
workflow
){
return
;
}
// 首次获取待办列表
this
.
getMyTasks
();
// 定时器:每隔1分钟重新获取待办列表
const
timer
=
setInterval
(()
=>
{
this
.
getMyTasks
();
},
60000
);
// 监听定时器,在vue销毁前清除定时器
this
.
$once
(
'hook:beforeDestroy'
,()
=>
{
// 清除定时器
clearInterval
(
timer
);
});
}
/**
* 获取待办列表
*/
public
getMyTasks
()
{
let
url
:
any
=
'/wfcore/mytasks'
;
this
.
$http
.
get
(
url
).
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
==
200
)
{
const
data
:
any
=
response
.
data
;
if
(
data
&&
data
.
length
>
0
)
{
this
.
myTasks
=
data
;
this
.
showIsDot
=
true
;
}
else
{
this
.
myTasks
=
[];
}
// 获取消息列表
this
.
getMyMsgs
();
/**
* 获取待办列表
*/
public
getMyTasks
()
{
let
url
:
any
=
'/wfcore/mytasks'
;
this
.
$http
.
get
(
url
).
then
((
response
:
any
)
=>
{
if
(
response
&&
response
.
status
==
200
)
{
const
data
:
any
=
response
.
data
;
if
(
data
&&
data
.
length
>
0
)
{
this
.
myTasks
=
data
;
this
.
showIsDot
=
true
;
}
else
{
this
.
myTasks
=
[];
}
}).
catch
((
error
:
any
)
=>
{
console
.
warn
(
"加载数据错误"
);
})
}
/**
* 获取消息列表
*/
public
getMyMsgs
(){
// TODO:接口获取消息列表,这里用的待办数据
this
.
myMsgs
=
this
.
myTasks
;
if
(
this
.
myMsgs
.
length
>
0
&&
this
.
myTasks
.
length
==
0
)
{
// 显示小圆点
this
.
showIsDot
=
true
;
// 获取消息列表
this
.
getMyMsgs
();
}
}
}).
catch
((
error
:
any
)
=>
{
console
.
warn
(
"加载数据错误"
);
})
}
/**
* 点击标签事件
*/
public
handleTag
(
data
:
any
)
{
if
(
!
data
)
return
this
.
$message
.
error
(
"未获取到标签内容"
);
// 拼接要打开的窗口地址
const
baseUrl
:
any
=
Environment
.
BaseUrl
;
const
openUrl
:
any
=
baseUrl
+
`/wfcore/mytasks/
${
data
.
processDefinitionKey
}
/web/
${
data
.
processInstanceBusinessKey
}
/usertasks/
${
data
.
taskDefinitionKey
}
`
;
// 打开新窗口
window
.
open
(
openUrl
,
'_blank'
);
/**
* 获取消息列表
*/
public
getMyMsgs
(){
// TODO:接口获取消息列表,这里用的待办数据
this
.
myMsgs
=
this
.
myTasks
;
if
(
this
.
myMsgs
.
length
>
0
&&
this
.
myTasks
.
length
==
0
)
{
// 显示小圆点
this
.
showIsDot
=
true
;
}
}
/**
* 销毁之前
*/
beforeDestroy
():
void
{
// 清空数据
this
.
showIsDot
=
false
;
this
.
myTasks
=
[];
this
.
myMsgs
=
[];
}
/**
* 点击标签事件
*/
public
handleTag
(
data
:
any
)
{
if
(
!
data
)
return
this
.
$message
.
error
(
"未获取到标签内容"
);
// 拼接要打开的窗口地址
const
baseUrl
:
any
=
Environment
.
BaseUrl
;
const
openUrl
:
any
=
baseUrl
+
`/wfcore/mytasks/
${
data
.
processDefinitionKey
}
/web/
${
data
.
processInstanceBusinessKey
}
/usertasks/
${
data
.
taskDefinitionKey
}
`
;
// 打开新窗口
window
.
open
(
openUrl
,
'_blank'
);
}
/**
* 时间格式转换
*/
public
formatDate
(
date
:
string
,
format
:
string
)
{
if
(
date
&&
format
)
{
return
moment
(
date
).
format
(
format
)
;
}
return
date
;
}
/**
* 销毁之前
*/
beforeDestroy
():
void
{
// 清空数据
this
.
showIsDot
=
false
;
this
.
myTasks
=
[];
this
.
myMsgs
=
[]
;
}
/**
* 加载更多
*/
public
showMore
(
cnt
:
string
)
{
if
(
Object
.
is
(
'taskShowCnt'
,
cnt
))
{
this
.
taskShowCnt
+
10
<
this
.
myTasks
.
length
?
this
.
taskShowCnt
+=
10
:
this
.
taskShowCnt
+=
this
.
myTasks
.
length
-
this
.
taskShowCnt
;
}
if
(
Object
.
is
(
'msgShowCnt'
,
cnt
))
{
this
.
msgShowCnt
+
10
<
this
.
myMsgs
.
length
?
this
.
msgShowCnt
+=
10
:
this
.
msgShowCnt
+=
this
.
myMsgs
.
length
-
this
.
msgShowCnt
;
}
/**
* 时间格式转换
*/
public
formatDate
(
date
:
string
,
format
:
string
)
{
if
(
date
&&
format
)
{
return
moment
(
date
).
format
(
format
);
}
return
date
;
}
/**
* 弹出框 显示/隐藏 时显示条数初始化
*/
public
initTabCnt
()
{
this
.
taskShowCnt
=
this
.
myTasks
.
length
>=
10
?
10
:
this
.
myTasks
.
length
;
this
.
msgShowCnt
=
this
.
myMsgs
.
length
>=
10
?
10
:
this
.
myMsgs
.
length
;
/**
* 加载更多
*/
public
showMore
(
cnt
:
string
)
{
if
(
Object
.
is
(
'taskShowCnt'
,
cnt
))
{
this
.
taskShowCnt
+
10
<
this
.
myTasks
.
length
?
this
.
taskShowCnt
+=
10
:
this
.
taskShowCnt
+=
this
.
myTasks
.
length
-
this
.
taskShowCnt
;
}
if
(
Object
.
is
(
'msgShowCnt'
,
cnt
))
{
this
.
msgShowCnt
+
10
<
this
.
myMsgs
.
length
?
this
.
msgShowCnt
+=
10
:
this
.
msgShowCnt
+=
this
.
myMsgs
.
length
-
this
.
msgShowCnt
;
}
}
/**
* 弹出框 显示/隐藏 时显示条数初始化
*/
public
initTabCnt
()
{
this
.
taskShowCnt
=
this
.
myTasks
.
length
>=
10
?
10
:
this
.
myTasks
.
length
;
this
.
msgShowCnt
=
this
.
myMsgs
.
length
>=
10
?
10
:
this
.
myMsgs
.
length
;
}
}
</
script
>
<
style
lang=
'less'
>
...
...
src/components/dropdown-list-mpicker/dropdown-list-mpicker.vue
浏览文件 @
2f05b64a
...
...
@@ -12,8 +12,8 @@
:filterable=
"filterable"
@
on-open-change=
"onClick"
:placeholder=
"placeholder?placeholder:$t('components.dropDownListMpicker.placeholder')"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:class=
"item.class"
:value=
"item.value
.toString()
"
:label=
"item.text"
>
<Checkbox
:value
=
"(currentVal.indexOf(item.value.toString()))==-1?false:
true"
>
<i-option
v-for=
"(item, index) in items"
:key=
"index"
:class=
"item.class"
:value=
"item.value
? item.value.toString():''
"
:label=
"item.text"
>
<Checkbox
:value
=
"(currentVal.indexOf(item.value ? item.value.toString() : '')) == -1 ? false :
true"
>
{{
Object
.
is
(
codelistType
,
'STATIC'
)
?
$t
(
'codelist.'
+
tag
+
'.'
+
item
.
value
)
:
item
.
text
}}
</Checkbox>
</i-option>
...
...
src/components/dropdown-list/dropdown-list.vue
浏览文件 @
2f05b64a
...
...
@@ -394,7 +394,9 @@ export default class DropDownList extends Vue {
if
(
type
===
'number'
){
item
.
value
=
item
.
value
.
toString
();
}
else
{
if
(
item
.
value
.
indexOf
(
'.'
)
==
-
1
){
if
(
type
==
"null"
)
{
this
.
valueType
==
"number"
?
item
.
value
=
0
:
item
.
value
=
''
;
}
else
if
(
item
.
value
.
indexOf
(
'.'
)
==
-
1
){
item
.
value
=
parseInt
(
item
.
value
);
}
else
{
item
.
value
=
parseFloat
(
item
.
value
);
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录