Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
V
vue-quasar-admin-dev
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
vue-quasar-admin-dev
Commits
5b4e478e
Commit
5b4e478e
authored
Dec 25, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
972e1990
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
299 行增加
和
160 行删除
+299
-160
src/pages/platformapplications/EditApplication.vue
+278
-0
src/pages/platformapplications/platformapplications.vue
+20
-159
src/pages/recipes/recipes.vue
+1
-1
没有找到文件。
src/pages/platformapplications/EditApplication.vue
0 → 100644
View file @
5b4e478e
<
template
>
<q-modal
v-model=
"visible"
maximized
>
<q-modal-layout>
<q-toolbar
slot=
"header"
>
<q-btn
flat
round
dense
@
click=
"close"
icon=
"reply"
/>
<q-toolbar-title>
编辑应用
</q-toolbar-title>
</q-toolbar>
<q-toolbar
slot=
"footer"
>
<q-toolbar-title></q-toolbar-title>
<q-btn
round
color=
"red"
@
click=
"onSave"
>
保存
</q-btn>
<q-btn
round
@
click=
"close"
>
取消
</q-btn>
</q-toolbar>
<div
class=
"layout-padding edit-app-container"
>
<!-- 基本信息 -->
<q-card
class=
"q-mb-md q-pa-md"
>
<q-card-section>
<div
class=
"text-weight-bold q-mb-sm"
>
基本信息
</div>
<q-field
:count=
"255"
>
<q-input
v-model=
"localTemp.title"
float-label=
"名称"
/>
</q-field>
<div
class=
"row"
>
<div
class=
"col-6 q-pr-sm"
>
<q-field
:count=
"64"
>
<q-input
v-model=
"localTemp.appid"
float-label=
"应用唯一标识"
@
blur=
"getsecret"
:disable=
"appidflag"
/>
</q-field>
</div>
<div
class=
"col-6 q-pl-sm"
>
<q-field
:count=
"200"
>
<q-input
v-model=
"localTemp.secret"
float-label=
"用户的密钥信息"
disable
/>
</q-field>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-6 q-pr-sm"
>
<q-field
:count=
"200"
>
<q-select
v-model=
"localTemp.openmail"
float-label=
"启用待办"
radio
:options=
"openmailOptions"
/>
</q-field>
</div>
<div
class=
"col-6 q-pr-sm"
>
<q-field
:count=
"200"
>
<q-input
v-model=
"localTemp.mailtype"
float-label=
"待办标识"
/>
</q-field>
</div>
</div>
<q-field>
<q-input
v-model=
"localTemp.img"
float-label=
"图标路径"
disable
/>
<q-uploader
float-label=
"上传图标"
ref=
"attachmentUploader"
name=
"file"
@
uploaded=
"attachmentUploaded"
:headers=
"
{'Accept': 'application/json;charset=utf-8'}"
:url="uploadurl"
auto-expand
clearable
hide-upload-button
@add="$refs['attachmentUploader'].upload()"
>
</q-uploader>
</q-field>
</q-card-section>
</q-card>
<!-- PC 信息 -->
<q-card
class=
"q-mb-md q-pa-md"
>
<q-card-section>
<div
class=
"text-weight-bold q-mb-sm"
>
PC 信息
</div>
<q-field
:count=
"255"
>
<q-input
v-model=
"localTemp.href"
float-label=
"电脑入口"
/>
</q-field>
<q-field>
<q-select
v-model=
"localTemp.qyflag"
float-label=
"启用/停用"
radio
:options=
"selectOptions"
/>
</q-field>
</q-card-section>
</q-card>
<!-- App 信息 -->
<q-card
class=
"q-pa-md"
>
<q-card-section>
<div
class=
"text-weight-bold q-mb-sm"
>
App 信息
</div>
<q-field>
<div
class=
"row no-wrap"
>
<q-select
class=
"col"
v-model=
"localTemp.groupCode"
float-label=
"应用分组"
radio
:options=
"applicationsGroupOptions"
/>
<q-btn
color=
"negative"
flat
round
dense
icon=
"add"
@
click=
"openAddApplicationsGroup"
/>
</div>
</q-field>
<q-field
:count=
"255"
>
<q-input
v-model=
"localTemp.wechatUrl"
float-label=
"企微入口"
/>
</q-field>
<q-field
:count=
"200"
>
<q-select
v-model=
"localTemp.appEnable"
float-label=
"应用启用/停用"
radio
:options=
"selectOptions"
/>
</q-field>
</q-card-section>
</q-card>
</div>
</q-modal-layout>
</q-modal>
</
template
>
<
script
>
import
{
saveapp
}
from
"@/service/permission/platformapplications"
;
import
{
getApplicationsGroupList
,
addApplicationsGroup
}
from
"@/service/permission/platformapplicationsGroup"
;
export
default
{
name
:
"EditApplication"
,
props
:
{
value
:
{
type
:
Boolean
,
default
:
false
},
temp
:
{
type
:
Object
,
default
:
()
=>
({})
},
subtype
:
{
type
:
String
,
default
:
"add"
},
uploadurl
:
{
type
:
String
,
default
:
""
},
selectOptions
:
{
type
:
Array
,
default
:
()
=>
[]
},
openmailOptions
:
{
type
:
Array
,
default
:
()
=>
[]
},
appidflag
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
visible
:
this
.
value
,
localTemp
:
JSON
.
parse
(
JSON
.
stringify
(
this
.
temp
||
{})),
fileCount
:
0
,
applicationsGroupOptions
:
[]
}
},
watch
:
{
value
(
v
)
{
this
.
visible
=
v
;
if
(
v
)
{
this
.
localTemp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
temp
||
{}));
this
.
fetchApplicationsGroupOptions
();
if
(
this
.
localTemp
.
appEnable
===
undefined
||
this
.
localTemp
.
appEnable
===
null
)
{
this
.
localTemp
.
appEnable
=
'0'
;
}
}
},
visible
(
v
)
{
this
.
$emit
(
'input'
,
v
);
},
temp
(
n
)
{
if
(
this
.
visible
)
{
this
.
localTemp
=
JSON
.
parse
(
JSON
.
stringify
(
n
||
{}));
if
(
this
.
localTemp
.
appEnable
===
undefined
||
this
.
localTemp
.
appEnable
===
null
)
{
this
.
localTemp
.
appEnable
=
'0'
;
}
}
}
},
methods
:
{
close
()
{
this
.
visible
=
false
;
},
async
onSave
()
{
try
{
await
saveapp
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
localTemp
)));
this
.
$q
.
notify
({
type
:
"positive"
,
message
:
"保存成功"
,
position
:
"bottom-right"
});
this
.
$emit
(
'saved'
);
this
.
close
();
}
catch
(
e
)
{
this
.
$q
.
notify
({
type
:
"negative"
,
message
:
"保存失败"
,
position
:
"bottom-right"
});
}
},
getsecret
()
{
this
.
localTemp
.
secret
=
window
.
btoa
(
this
.
localTemp
.
appid
||
''
);
},
attachmentUploaded
(
file
,
xhr
)
{
let
res
=
JSON
.
parse
(
xhr
.
response
).
path
;
this
.
fileCount
++
;
if
(
res
!=
""
)
{
this
.
$q
.
notify
({
message
:
"上传成功"
,
type
:
"positive"
,
icon
:
"done"
,
timeout
:
1000
,
position
:
"top-right"
});
this
.
localTemp
.
img
=
res
;
if
(
this
.
fileCount
>
1
)
{
var
cNode
=
document
.
getElementsByClassName
(
"q-uploader-files"
)[
0
];
cNode
.
removeChild
(
cNode
.
childNodes
[
0
]);
}
}
else
{
this
.
$q
.
notify
({
message
:
res
.
msg
,
type
:
"negative"
,
icon
:
"error_outline"
,
timeout
:
3000
,
position
:
"top-right"
});
}
}
,
async
fetchApplicationsGroupOptions
()
{
try
{
const
response
=
await
getApplicationsGroupList
({});
this
.
applicationsGroupOptions
=
response
.
data
.
data
.
map
(
group
=>
({
label
:
group
.
groupName
,
value
:
group
.
groupCode
}));
}
catch
(
err
)
{
console
.
error
(
"fetchApplicationsGroupOptions error"
,
err
);
}
},
async
openAddApplicationsGroup
()
{
try
{
const
name
=
await
this
.
$q
.
dialog
({
title
:
'添加应用分组'
,
prompt
:
{
model
:
''
,
type
:
'text'
,
isValid
:
val
=>
val
&&
val
.
trim
().
length
>
0
},
ok
:
{
label
:
'添加'
,
push
:
true
},
cancel
:
{
label
:
'取消'
,
push
:
true
}
});
if
(
name
)
{
const
groupName
=
name
;
await
addApplicationsGroup
({
groupName
:
groupName
});
this
.
$q
.
notify
({
type
:
'positive'
,
message
:
'添加成功'
,
position
:
'bottom-right'
});
await
this
.
fetchApplicationsGroupOptions
();
}
}
catch
(
e
)
{
// cancelled or error
}
}
}
}
</
script
>
<
style
scoped
>
/* 美化与响应式布局 */
.edit-app-container
{
padding
:
12px
8px
;
max-width
:
1100px
;
margin
:
0
auto
;
}
.edit-app-container
.q-card
{
border-radius
:
8px
;
/* subtle shadow if not already present in theme */
box-shadow
:
0
6px
18px
rgba
(
28
,
28
,
28
,
0.06
);
}
.edit-app-container
.q-card-section
{
padding
:
16px
!important
;
}
.edit-app-container
.text-weight-bold
{
font-size
:
16px
;
color
:
#e31313
;
margin-bottom
:
8px
;
}
.edit-app-container
.row.q-col-gutter-md
{
margin-bottom
:
8px
;
}
.edit-app-container
.q-field
{
margin-bottom
:
6px
;
}
.edit-app-container
.q-input__control
input
,
.edit-app-container
.q-select__control
{
font-size
:
14px
;
}
/* make two columns collapse into one on small screens */
@media
(
max-width
:
720px
)
{
.edit-app-container
.col-6
{
width
:
100%
!important
;
flex
:
0
0
100%
!important
;
}
.edit-app-container
.q-card
{
margin-bottom
:
12px
;
}
}
</
style
>
src/pages/platformapplications/platformapplications.vue
View file @
5b4e478e
...
@@ -55,87 +55,22 @@
...
@@ -55,87 +55,22 @@
</q-table>
</q-table>
</q-card-main>
</q-card-main>
</q-card>
</q-card>
<q-modal
v-model=
"editModal"
maximized
>
<!-- 编辑组件 -->
<q-modal-layout>
<edit-application
<q-toolbar
slot=
"header"
>
v-model=
"editModal"
<q-btn
flat
round
dense
@
click=
"editModal = false"
icon=
"reply"
/>
:temp=
"temp"
<q-toolbar-title>
:subtype=
"subtype"
{{$t('Edit')}}
:uploadurl=
"uploadurl"
</q-toolbar-title>
:select-options=
"selectOptions"
</q-toolbar>
:openmail-options=
"openmailOptions"
<q-toolbar
slot=
"footer"
>
:appidflag=
"appidflag"
<q-toolbar-title>
@
saved=
"handleChildSaved"
</q-toolbar-title>
/>
<q-btn
round
color=
"red"
@
click=
"saveapp"
>
{{$t('Save')}}
</q-btn>
<q-btn
round
@
click=
"editModal = false"
>
{{$t('Cancel')}}
</q-btn>
</q-toolbar>
<div
class=
"layout-padding"
>
<q-field
:count=
"255"
>
<q-input
v-model=
"temp.title"
float-label=
"名称"
/>
</q-field>
<q-field>
<div
class=
"row no-wrap"
>
<q-select
class=
"col"
v-model=
"temp.groupCode"
float-label=
"应用分组"
radio
:options=
"applicationsGroupOptions"
/>
<q-btn
color=
"negative"
flat
round
dense
icon=
"add"
@
click=
"openAddApplicationsGroup"
/>
</div>
</q-field>
<q-field
:count=
"255"
>
<q-input
v-model=
"temp.href"
float-label=
"电脑入口"
/>
</q-field>
<q-field
:count=
"255"
>
<q-input
v-model=
"temp.wechatUrl"
float-label=
"企微入口"
/>
</q-field>
<q-field
:count=
"64"
>
<q-input
v-model=
"temp.appid"
float-label=
"应用唯一标识"
@
blur=
"getsecret()"
:disable=
appidflag
/>
</q-field>
<q-field
:count=
"200"
>
<q-input
v-model=
"temp.secret"
float-label=
"用户的密钥信息"
disable
/>
</q-field>
<q-field
:count=
"32"
>
<q-input
v-model=
"temp.databasename"
float-label=
"数据库名称"
/>
</q-field>
<q-field
:count=
"32"
>
<q-input
v-model=
"temp.databasepassword"
float-label=
"数据库密码"
/>
</q-field>
<q-field
:count=
"200"
>
<q-input
v-model=
"temp.databasecon"
float-label=
"数据库连接"
/>
</q-field>
<q-field
:count=
"200"
>
<q-select
v-model=
"temp.openmail"
float-label=
"启用待办(启用后会在待办中显示待办信息)"
radio
:options=
"openmailOptions"
/>
</q-field>
<q-field
:count=
"200"
>
<q-input
v-model=
"temp.mailtype"
float-label=
"待办标识(待办唯一标识,需要给到对方系统)"
/>
</q-field>
<q-field>
<q-input
v-model=
"temp.img"
float-label=
"图标路径"
disable
v-if=
"subtype=='edit'"
/>
<q-uploader
float-label=
"上传图标"
ref=
"attachmentUploader"
name=
"file"
@
uploaded=
"attachmentUploaded"
:headers=
"{'Accept': 'application/json;charset=utf-8'}"
:url=
"uploadurl"
auto-expand
clearable
hide-upload-button
@
add=
"$refs['attachmentUploader'].upload()"
></q-uploader>
</q-field>
<!-- <q-field :count="200">
<q-input v-model="temp.description" type="textarea" :max-height="100" rows="7" :float-label="$t('Role description')" />
</q-field> -->
<q-select
v-model=
"temp.qyflag"
float-label=
"启用/停用"
radio
:options=
"selectOptions"
/>
</div>
</q-modal-layout>
</q-modal>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
getPlatformApplicationsPagedList
,
saveapp
,
delapp
}
from
"@/service/permission/platformapplications"
;
import
{
getPlatformApplicationsPagedList
,
delapp
}
from
"@/service/permission/platformapplications"
;
import
{
getApplicationsGroupList
,
addApplicationsGroup
}
from
"@/service/permission/platformapplicationsGroup"
;
const
uploadpath
=
"http://nw.sy-metro.com:6104/uploadfileadmin/manager"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -230,8 +165,7 @@
...
@@ -230,8 +165,7 @@
},
},
appidflag
:
true
,
appidflag
:
true
,
subtype
:
"add"
,
subtype
:
"add"
,
fileCount
:
0
,
fileCount
:
0
applicationsGroupOptions
:
[]
// 应用分组下拉选项
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -239,9 +173,9 @@
...
@@ -239,9 +173,9 @@
pagination
:
this
.
serverPagination
,
pagination
:
this
.
serverPagination
,
filter
:
this
.
filter
filter
:
this
.
filter
});
});
},
// 获取应用分组选项
components
:
{
this
.
getApplicationsGroupOptions
();
EditApplication
:
()
=>
import
(
'./EditApplication.vue'
)
},
},
methods
:
{
methods
:
{
async
request
(
props
)
{
async
request
(
props
)
{
...
@@ -276,13 +210,8 @@
...
@@ -276,13 +210,8 @@
this
.
editModal
=
true
;
this
.
editModal
=
true
;
this
.
appidflag
=
false
;
this
.
appidflag
=
false
;
},
},
async
saveapp
()
{
// 保存由子组件处理,这里只负责刷新列表
await
saveapp
(
this
.
temp
);
handleChildSaved
()
{
this
.
$q
.
notify
({
type
:
"positive"
,
message
:
this
.
$t
(
"Saved successfully"
),
position
:
"bottom-right"
});
this
.
editModal
=
false
;
this
.
editModal
=
false
;
this
.
search
();
this
.
search
();
},
},
...
@@ -300,6 +229,7 @@
...
@@ -300,6 +229,7 @@
this
.
editModal
=
true
;
this
.
editModal
=
true
;
this
.
appidflag
=
true
;
this
.
appidflag
=
true
;
},
},
editappVisible
(
id
){
editappVisible
(
id
){
this
.
$router
.
push
(
'/system/sysadv'
);
this
.
$router
.
push
(
'/system/sysadv'
);
},
},
...
@@ -327,77 +257,8 @@
...
@@ -327,77 +257,8 @@
});
});
this
.
search
();
this
.
search
();
}
catch
(
e
)
{}
}
catch
(
e
)
{}
},
getsecret
(){
this
.
temp
.
secret
=
window
.
btoa
(
this
.
temp
.
appid
);
},
attachmentUploaded
(
file
,
xhr
)
{
let
res
=
JSON
.
parse
(
xhr
.
response
).
path
;
this
.
fileCount
++
;
if
(
res
!=
""
)
{
this
.
$q
.
notify
({
message
:
"上传成功"
,
type
:
"positive"
,
icon
:
"done"
,
timeout
:
1000
,
position
:
"top-right"
});
this
.
temp
.
img
=
res
;
console
.
log
(
res
);
if
(
this
.
fileCount
>
1
)
{
var
cNode
=
document
.
getElementsByClassName
(
"q-uploader-files"
)[
0
];
cNode
.
removeChild
(
cNode
.
childNodes
[
0
]);
}
}
else
{
this
.
$q
.
notify
({
message
:
res
.
msg
,
type
:
"negative"
,
icon
:
"error_outline"
,
timeout
:
3000
,
position
:
"top-right"
});
}
},
// 获取应用分组选项
async
getApplicationsGroupOptions
()
{
try
{
const
response
=
await
getApplicationsGroupList
({});
this
.
applicationsGroupOptions
=
response
.
data
.
data
.
map
(
group
=>
({
label
:
group
.
groupName
,
value
:
group
.
groupCode
}));
}
catch
(
error
)
{
console
.
error
(
"Failed to fetch applications group options:"
,
error
);
}
}
},
// 点击添加应用分组按钮
async
openAddApplicationsGroup
()
{
try
{
const
name
=
await
this
.
$q
.
dialog
({
title
:
'添加应用分组'
,
prompt
:
{
model
:
''
,
type
:
'text'
,
isValid
:
val
=>
val
&&
val
.
trim
().
length
>
0
},
ok
:
{
label
:
'添加'
,
push
:
true
},
cancel
:
{
label
:
'取消'
,
push
:
true
}
});
console
.
log
(
name
);
// `name` contains the input string in this Quasar version
if
(
name
)
{
const
groupName
=
name
;
// be defensive across versions
await
addApplicationsGroup
({
groupName
:
groupName
});
this
.
$q
.
notify
({
type
:
'positive'
,
message
:
'添加成功'
,
position
:
'bottom-right'
});
// refresh options
await
this
.
getApplicationsGroupOptions
();
}
}
catch
(
e
)
{
// user cancelled or error
}
},
},
},
}
}
</
script
>
</
script
>
...
...
src/pages/recipes/recipes.vue
View file @
5b4e478e
...
@@ -137,7 +137,7 @@
...
@@ -137,7 +137,7 @@
loadRecipes
,
loadRecipes
,
updateRecipessStatus
,
updateRecipessStatus
,
saveexceldata
saveexceldata
}
from
"@/service/recipes/recipes"
;
}
from
"@/service/recipes/recipes
.js
"
;
import
tool
from
"@/service/other/tool"
;
import
tool
from
"@/service/other/tool"
;
import
{
getSysCodelistByKindcode
}
from
"@/service/syscodelist/syscodelist"
;
import
{
getSysCodelistByKindcode
}
from
"@/service/syscodelist/syscodelist"
;
export
default
{
export
default
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论