Skip to content
项目
群组
代码片段
帮助
正在加载...
登录/注册
切换导航
广
广东建设用地-前端
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
广东建设用地
广东建设用地-前端
Commits
ed92f9d7
提交
ed92f9d7
authored
12月 12, 2023
作者:
gjx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
专家列表,修改反馈的bug问题
上级
e2da1096
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
216 行增加
和
138 行删除
+216
-138
index.vue
src/layouts/default/tabs/index.vue
+124
-117
useTabDropdown.ts
src/layouts/default/tabs/useTabDropdown.ts
+1
-0
multipleTab.ts
src/store/modules/multipleTab.ts
+3
-2
ViewDetail.vue
src/views/dkgl/gkpg/ViewDetail.vue
+2
-2
GZjcyb.data.ts
src/views/zjgl/Files/GZjcyb.data.ts
+86
-17
没有找到文件。
src/layouts/default/tabs/index.vue
浏览文件 @
ed92f9d7
<
template
>
<div
:class=
"getWrapClass"
>
<Tabs
type=
"editable-card"
size=
"small"
:animated=
"false"
:hideAdd=
"true"
:tabBarGutter=
"3"
:activeKey=
"activeKeyRef"
@
change=
"handleChange"
@
edit=
"handleEdit"
>
<Tabs
type=
"editable-card"
size=
"small"
:animated=
"false"
:hideAdd=
"true"
:tabBarGutter=
"3"
:activeKey=
"activeKeyRef"
@
change=
"handleChange"
@
edit=
"handleEdit"
>
<template
v-for=
"item in getTabsState"
:key=
"item.query ? item.fullPath : item.path"
>
<TabPane
:closable=
"!(item && item.meta && item.meta.affix)"
>
<template
#
tab
>
...
...
@@ -19,125 +27,124 @@
</div>
</template>
<
script
lang=
"ts"
>
import
type
{
RouteLocationNormalized
,
RouteMeta
}
from
'vue-router'
;
import
{
defineComponent
,
computed
,
unref
,
ref
}
from
'vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
TabContent
from
'./components/TabContent.vue'
;
import
FoldButton
from
'./components/FoldButton.vue'
;
import
TabRedo
from
'./components/TabRedo.vue'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useMultipleTabStore
}
from
'/@/store/modules/multipleTab'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
initAffixTabs
,
useTabsDrag
}
from
'./useMultipleTabs'
;
import
{
useDesign
}
from
'/@/hooks/web/useDesign'
;
import
{
useMultipleTabSetting
}
from
'/@/hooks/setting/useMultipleTabSetting'
;
import
{
REDIRECT_NAME
}
from
'/@/router/constant'
;
import
{
listenerRouteChange
}
from
'/@/logics/mitt/routeChange'
;
import
{
useRouter
}
from
'vue-router'
;
export
default
defineComponent
({
name
:
'MultipleTabs'
,
components
:
{
TabRedo
,
FoldButton
,
Tabs
,
TabPane
:
Tabs
.
TabPane
,
TabContent
,
},
setup
()
{
const
affixTextList
=
initAffixTabs
();
const
activeKeyRef
=
ref
(
''
);
useTabsDrag
(
affixTextList
);
const
tabStore
=
useMultipleTabStore
();
const
userStore
=
useUserStore
();
const
router
=
useRouter
();
const
{
prefixCls
}
=
useDesign
(
'multiple-tabs'
);
const
go
=
useGo
();
const
{
getShowQuick
,
getShowRedo
,
getShowFold
,
getTabsTheme
}
=
useMultipleTabSetting
();
const
getTabsState
=
computed
(()
=>
{
const
arry
=
tabStore
.
getTabList
.
filter
((
item
)
=>
!
item
.
meta
?.
hideTab
);
const
arry1
=
arry
.
filter
((
item
)
=>
(
item
.
meta
?.
title
!=
'首页'
&&
item
.
meta
?.
title
!=
'待办事项'
));
return
arry1
;
});
const
unClose
=
computed
(()
=>
unref
(
getTabsState
).
length
===
1
);
const
getWrapClass
=
computed
(()
=>
{
return
[
prefixCls
,
{
[
`
${
prefixCls
}
--hide-close`
]:
unref
(
unClose
),
},
`
${
prefixCls
}
--theme-
${
unref
(
getTabsTheme
)}
`
,
];
});
listenerRouteChange
((
route
)
=>
{
const
{
name
}
=
route
;
if
(
name
===
REDIRECT_NAME
||
!
route
||
!
userStore
.
getToken
)
{
return
;
import
type
{
RouteLocationNormalized
,
RouteMeta
}
from
'vue-router'
;
import
{
defineComponent
,
computed
,
unref
,
ref
}
from
'vue'
;
import
{
Tabs
}
from
'ant-design-vue'
;
import
TabContent
from
'./components/TabContent.vue'
;
import
FoldButton
from
'./components/FoldButton.vue'
;
import
TabRedo
from
'./components/TabRedo.vue'
;
import
{
useGo
}
from
'/@/hooks/web/usePage'
;
import
{
useMultipleTabStore
}
from
'/@/store/modules/multipleTab'
;
import
{
useUserStore
}
from
'/@/store/modules/user'
;
import
{
initAffixTabs
,
useTabsDrag
}
from
'./useMultipleTabs'
;
import
{
useDesign
}
from
'/@/hooks/web/useDesign'
;
import
{
useMultipleTabSetting
}
from
'/@/hooks/setting/useMultipleTabSetting'
;
import
{
REDIRECT_NAME
}
from
'/@/router/constant'
;
import
{
listenerRouteChange
}
from
'/@/logics/mitt/routeChange'
;
import
{
useRouter
}
from
'vue-router'
;
export
default
defineComponent
({
name
:
'MultipleTabs'
,
components
:
{
TabRedo
,
FoldButton
,
Tabs
,
TabPane
:
Tabs
.
TabPane
,
TabContent
,
},
setup
()
{
const
affixTextList
=
initAffixTabs
();
const
activeKeyRef
=
ref
(
''
);
useTabsDrag
(
affixTextList
);
const
tabStore
=
useMultipleTabStore
();
const
userStore
=
useUserStore
();
const
router
=
useRouter
();
const
{
prefixCls
}
=
useDesign
(
'multiple-tabs'
);
const
go
=
useGo
();
const
{
getShowQuick
,
getShowRedo
,
getShowFold
,
getTabsTheme
}
=
useMultipleTabSetting
();
const
getTabsState
=
computed
(()
=>
{
const
arry
=
tabStore
.
getTabList
.
filter
((
item
)
=>
!
item
.
meta
?.
hideTab
);
const
arry1
=
arry
.
filter
((
item
)
=>
item
.
meta
?.
title
!=
'首页'
&&
item
.
meta
?.
title
!=
'待办事项'
);
return
arry1
;
});
const
unClose
=
computed
(()
=>
unref
(
getTabsState
).
length
===
1
);
const
getWrapClass
=
computed
(()
=>
{
return
[
prefixCls
,
{
[
`
${
prefixCls
}
--hide-close`
]:
unref
(
unClose
),
},
`
${
prefixCls
}
--theme-
${
unref
(
getTabsTheme
)}
`
,
];
});
listenerRouteChange
((
route
)
=>
{
const
{
name
}
=
route
;
if
(
name
===
REDIRECT_NAME
||
!
route
||
!
userStore
.
getToken
)
{
return
;
}
const
{
path
,
fullPath
,
meta
=
{}
}
=
route
;
const
{
currentActiveMenu
,
hideTab
}
=
meta
as
RouteMeta
;
const
isHide
=
!
hideTab
?
null
:
currentActiveMenu
;
const
p
=
isHide
||
fullPath
||
path
;
if
(
activeKeyRef
.
value
!==
p
)
{
activeKeyRef
.
value
=
p
as
string
;
}
if
(
isHide
)
{
const
findParentRoute
=
router
.
getRoutes
().
find
((
item
)
=>
item
.
path
===
currentActiveMenu
);
findParentRoute
&&
tabStore
.
addTab
(
findParentRoute
as
unknown
as
RouteLocationNormalized
);
}
else
{
tabStore
.
addTab
(
unref
(
route
));
}
});
function
handleChange
(
activeKey
:
any
)
{
activeKeyRef
.
value
=
activeKey
;
go
(
activeKey
,
false
);
}
const
{
path
,
fullPath
,
meta
=
{}
}
=
route
;
const
{
currentActiveMenu
,
hideTab
}
=
meta
as
RouteMeta
;
const
isHide
=
!
hideTab
?
null
:
currentActiveMenu
;
const
p
=
isHide
||
fullPath
||
path
;
if
(
activeKeyRef
.
value
!==
p
)
{
activeKeyRef
.
value
=
p
as
string
;
}
if
(
isHide
)
{
const
findParentRoute
=
router
.
getRoutes
().
find
((
item
)
=>
item
.
path
===
currentActiveMenu
);
// Close the current tab
function
handleEdit
(
targetKey
:
string
)
{
// Added operation to hide, currently only use delete operation
if
(
unref
(
unClose
))
{
return
;
}
findParentRoute
&&
tabStore
.
addTab
(
findParentRoute
as
unknown
as
RouteLocationNormalized
);
}
else
{
tabStore
.
addTab
(
unref
(
route
));
}
});
function
handleChange
(
activeKey
:
any
)
{
activeKeyRef
.
value
=
activeKey
;
go
(
activeKey
,
false
);
}
// Close the current tab
function
handleEdit
(
targetKey
:
string
)
{
// Added operation to hide, currently only use delete operation
if
(
unref
(
unClose
))
{
return
;
tabStore
.
closeTabByKey
(
targetKey
,
router
);
}
tabStore
.
closeTabByKey
(
targetKey
,
router
);
}
return
{
prefixCls
,
unClose
,
getWrapClass
,
handleEdit
,
handleChange
,
activeKeyRef
,
getTabsState
,
getShowQuick
,
getShowRedo
,
getShowFold
,
};
},
});
return
{
prefixCls
,
unClose
,
getWrapClass
,
handleEdit
,
handleChange
,
activeKeyRef
,
getTabsState
,
getShowQuick
,
getShowRedo
,
getShowFold
,
};
},
});
</
script
>
<
style
lang=
"less"
>
@import './index.less';
@import './tabs.theme.card.less';
@import './tabs.theme.smooth.less';
@import './index.less';
@import './tabs.theme.card.less';
@import './tabs.theme.smooth.less';
</
style
>
src/layouts/default/tabs/useTabDropdown.ts
浏览文件 @
ed92f9d7
...
...
@@ -106,6 +106,7 @@ export function useTabDropdown(tabContentProps: TabContentProps, getIsTabs: Comp
// Handle right click event
function
handleMenuEvent
(
menu
:
DropMenu
):
void
{
const
{
event
}
=
menu
;
switch
(
event
)
{
case
MenuEventEnum
.
REFRESH_PAGE
:
...
...
src/store/modules/multipleTab.ts
浏览文件 @
ed92f9d7
...
...
@@ -25,7 +25,7 @@ export interface MultipleTabState {
function
handleGotoPage
(
router
:
Router
)
{
const
go
=
useGo
(
router
);
go
(
unref
(
router
.
currentRoute
).
p
ath
,
true
);
go
(
unref
(
router
.
currentRoute
).
fullP
ath
,
true
);
}
const
getToTarget
=
(
tabItem
:
RouteLocationNormalized
)
=>
{
const
{
params
,
path
,
query
}
=
tabItem
;
...
...
@@ -295,7 +295,7 @@ export const useMultipleTabStore = defineStore({
this
.
clearCacheTabs
();
this
.
goToPage
(
router
);
const
menus
=
menusStore
()
menus
.
setMenus
({
title
:
'首页'
})
menus
.
setMenus
({
title
:
'首页'
})
},
/**
...
...
@@ -318,6 +318,7 @@ export const useMultipleTabStore = defineStore({
}
}
}
this
.
bulkCloseTabs
(
pathList
);
this
.
updateCacheTab
();
handleGotoPage
(
router
);
...
...
src/views/dkgl/gkpg/ViewDetail.vue
浏览文件 @
ed92f9d7
...
...
@@ -41,7 +41,7 @@
查看]
</span
></div
>
<PointInfor
type=
"view"
:data=
"{ wrdkid:
data.wrdkjbxxb
.wrdkid, pointType: 'solid', scjdbm: 'S6', faId: param.id }"
/>
<PointInfor
type=
"view"
:data=
"{ wrdkid:
param
.wrdkid, pointType: 'solid', scjdbm: 'S6', faId: param.id }"
/>
<div
>
地下水环境检测数据
<span
class=
"text-red"
>
[提示: 检测项编号请参考字典,点击
...
...
@@ -49,7 +49,7 @@
查看]
</span
></div
>
<PointInfor
type=
"view"
:data=
"{ wrdkid:
data.wrdkjbxxb
.wrdkid, pointType: 'water', scjdbm: 'S6', faId: param.id }"
/>
<PointInfor
type=
"view"
:data=
"{ wrdkid:
param
.wrdkid, pointType: 'water', scjdbm: 'S6', faId: param.id }"
/>
</a-collapse-panel>
<a-collapse-panel
key=
"6"
header=
"风险管控效果评估文件上传"
>
<CdUpload
labelFirst=
"效果评估"
:objec=
"[{ name: '公示截图' }, { name: '评估报告' }]"
:data=
"data.xgpg"
/>
...
...
src/views/zjgl/Files/GZjcyb.data.ts
浏览文件 @
ed92f9d7
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
FormSchema
}
from
'/@/components/Table'
;
import
{
dict
}
from
'/@/api/common/api'
import
{
rules
}
from
'/@/utils/helper/validator'
;
import
{
render
}
from
'/@/utils/common/renderUtils'
;
...
...
@@ -26,10 +27,12 @@ export const columns: BasicColumn[] = [
res
=
'副研究员'
}
else
if
(
record
.
status
==
2
)
{
res
=
'助理研究员'
}
else
if
(
record
.
status
==
4
)
{
}
else
if
(
record
.
status
==
3
)
{
res
=
'研究员'
}
else
if
(
record
.
status
==
5
)
{
}
else
if
(
record
.
status
==
4
)
{
res
=
'教授'
}
else
if
(
record
.
status
==
5
)
{
res
=
'高级工程师'
}
else
if
(
record
.
status
==
6
)
{
res
=
'教授级高工'
}
else
if
(
record
.
status
==
7
)
{
...
...
@@ -111,19 +114,24 @@ export const formSchema: FormSchema[] = [
// TODO 主键隐藏字段,目前写死为ID
{
label
:
''
,
field
:
'id'
,
component
:
'Input'
,
show
:
false
},
{
label
:
'身份证号'
,
field
:
'sfzh'
,
label
:
'姓名'
,
field
:
'zjxm'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'
姓名
'
,
field
:
'
zjxm
'
,
label
:
'
身份证号
'
,
field
:
'
sfzh
'
,
component
:
'Input'
,
dynamicRules
:
()
=>
{
return
[{
pattern
:
/^
\d{15}
|
(\d{17}(\d
|x|X
))
$/
,
message
:
'身份证格式有误'
,
required
:
false
}];
},
},
{
label
:
'出生年月'
,
field
:
'csny'
,
component
:
'DatePicker'
,
required
:
true
,
componentProps
:
{
//日期格式化,页面上显示的值
format
:
'YYYY-MM-DD'
,
...
...
@@ -134,7 +142,14 @@ export const formSchema: FormSchema[] = [
{
label
:
'性别'
,
field
:
'sex'
,
component
:
'Input'
,
component
:
'RadioGroup'
,
defaultValue
:
'1'
,
componentProps
:
{
options
:
[
{
label
:
'男'
,
value
:
'1'
},
{
label
:
'女'
,
value
:
'0'
},
],
},
},
{
label
:
'民族'
,
...
...
@@ -156,15 +171,40 @@ export const formSchema: FormSchema[] = [
field
:
'jkzk'
,
component
:
'Input'
,
},
{
label
:
'学历'
,
field
:
'xl'
,
component
:
'ApiSelect'
,
componentProps
:
{
api
:
dict
,
params
:
{
key
:
'zjgl-xl'
},
// 行政区划编码
labelField
:
'text'
,
valueField
:
'value'
,
}
},
{
label
:
'技术职称'
,
field
:
'jszc'
,
component
:
'Input'
,
component
:
'ApiSelect'
,
componentProps
:
{
api
:
dict
,
params
:
{
key
:
'zjgl-jszc'
},
// 行政区划编码
labelField
:
'text'
,
valueField
:
'value'
,
}
},
{
label
:
'评聘时间'
,
field
:
'ppsj'
,
component
:
'Input'
,
component
:
'DatePicker'
,
componentProps
:
{
//日期格式化,页面上显示的值
format
:
'YYYY-MM-DD'
,
//返回值格式化(绑定值的格式)
valueFormat
:
'YYYY-MM-DD'
,
}
},
{
label
:
'创建人'
,
...
...
@@ -181,6 +221,26 @@ export const formSchema: FormSchema[] = [
label
:
'单位电话'
,
field
:
'dwdh'
,
component
:
'Input'
,
dynamicRules
:
()
=>
{
return
[{
pattern
:
/^0
\d{2,3}
-
?\d{7,8}
$/
,
message
:
'电话格式有误'
,
required
:
true
}];
},
},
{
label
:
'联系手机'
,
field
:
'lxfsSj'
,
component
:
'Input'
,
dynamicRules
:
()
=>
{
return
[{
pattern
:
/^1
[
3,4,5,6,7,8,9
][
0-9
]{9}
$/
,
message
:
'手机格式有误'
,
required
:
true
}];
},
},
{
label
:
'电子邮箱'
,
field
:
'lxfsEmail'
,
component
:
'Input'
,
required
:
true
,
dynamicRules
:
()
=>
{
return
[{
pattern
:
/^
\w
+
([
-
\.]\w
+
)
*@
\w
+
([\.
-
]\w
+
)
*
\.\w{2,4}
$/
,
message
:
'电子邮箱格式有误'
,
required
:
false
}];
},
},
{
label
:
'职业资格证书名称'
,
...
...
@@ -198,9 +258,16 @@ export const formSchema: FormSchema[] = [
component
:
'Input'
,
},
{
label
:
'状态
:启用、停用
'
,
label
:
'状态'
,
field
:
'status'
,
component
:
'Input'
,
component
:
'RadioGroup'
,
defaultValue
:
'10'
,
componentProps
:
{
options
:
[
{
label
:
'启用'
,
value
:
'10'
},
{
label
:
'停用'
,
value
:
'-10'
},
],
},
},
{
label
:
'行业领域编码'
,
...
...
@@ -252,11 +319,7 @@ export const formSchema: FormSchema[] = [
field
:
'grjl'
,
component
:
'Input'
,
},
{
label
:
'备注'
,
field
:
'bz'
,
component
:
'Input'
,
},
{
label
:
'附件名称'
,
field
:
'fileName'
,
...
...
@@ -270,7 +333,13 @@ export const formSchema: FormSchema[] = [
{
label
:
'专家级别'
,
field
:
'level'
,
component
:
'Input'
,
component
:
'ApiSelect'
,
componentProps
:
{
api
:
dict
,
params
:
{
key
:
'zjgl-zjjb'
},
// 行政区划编码
labelField
:
'text'
,
valueField
:
'value'
,
}
},
{
label
:
'备注'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论