Commit d6f417bc by linjinhong

增加服务系统菜单功能项

parent 424df567
<script>
export default {
name: 'queryForm',
components: {},
props: {
formConfig: {
type: Array,
default: () => []
},
isCustomButton: {
type: Boolean,
default: true
}
},
computed: {
formColumns() {
return [...this.formConfig]
}
},
watch: {},
data() {
return {
loading: false,
formData: {}
}
},
methods: {
search() {
console.log(25, this.formData)
// this.$emit('search', this.formData)
},
addDialog(obj) {
this.$emit('addDialog')
},
handleSubmit(event) {
event.preventDefault()
},
showToggle() {
this.loading = !this.loading
}
},
render() {
// const { btnSlot } = this.$slots
return (
<el-form
ref="form"
props={{
model: this.formData
}}
size="mini"
inline
onSubmit={this.handleSubmit}
onKeyupenterCapture={this.search}>
{this.formColumns?.map((item, index) => (
<el-form-item key={index} label={item.name}>
{item.type === 'input' && (
<el-input
v-model={this.formData[item.prop]}
placeholder={item.placeholder || '请输入'}
clearable></el-input>
)}
{item.type === 'select' && (
<el-select
v-model={this.formData[item.prop]}
placeholder={item.placeholder || '请选择'}
clearable>
{item.options?.map((el, idx) => (
<el-option label={el} value={el} key={idx}>
{el}
</el-option>
))}
</el-select>
)}
{item.type === 'datePicker' && (
<el-date-picker
value-format="yyyy-MM-dd"
type={item.dateType || 'date'}
placeholder="选择日期"
v-model={this.formData[item.prop]}
clearable
style="width: 100%;"></el-date-picker>
)}
</el-form-item>
))}
{this.isCustomButton && (
<el-form-item>
<el-button
type="primary"
onClick={this.search}
icon="el-icon-search">
查询
</el-button>
<el-button type="success" onClick={this.addDialog}>
新增
</el-button>
</el-form-item>
)}
{!this.isCustomButton}
</el-form>
)
}
}
</script>
<style scoped></style>
...@@ -73,6 +73,12 @@ const routes = [ ...@@ -73,6 +73,12 @@ const routes = [
meta: { title: '公告管理' } meta: { title: '公告管理' }
}, },
{ {
path: '/saas/services',
component: () => import('@/views/system/services.vue'),
name: 'system_services',
meta: { title: '系统服务' }
},
{
path: '/saas/countryCode', path: '/saas/countryCode',
component: () => import('@/views/system/countryCode.vue'), component: () => import('@/views/system/countryCode.vue'),
name: 'system_countryCode', name: 'system_countryCode',
...@@ -149,7 +155,8 @@ const routes = [ ...@@ -149,7 +155,8 @@ const routes = [
component: () => import('@/views/production/AssistantManage.vue'), component: () => import('@/views/production/AssistantManage.vue'),
name: 'production_assistant_manage', name: 'production_assistant_manage',
meta: { title: '应用版本管理' } meta: { title: '应用版本管理' }
}, { },
{
path: '/saas/import-template', path: '/saas/import-template',
component: () => import('@/views/import-template/index.vue'), component: () => import('@/views/import-template/index.vue'),
name: 'import-template', name: 'import-template',
......
...@@ -107,10 +107,20 @@ ...@@ -107,10 +107,20 @@
<div class="sql-left"> <div class="sql-left">
<el-form :model="editForm"> <el-form :model="editForm">
<el-form-item required label="数据源"> <el-form-item required label="数据源">
<el-select @change="selectChange" style="width: 92%;" v-model="editForm.database" multiple clearable filterable> <el-select
@change="selectChange"
style="width: 92%"
v-model="editForm.database"
multiple
clearable
filterable>
<el-option label="all" value="all"></el-option> <el-option label="all" value="all"></el-option>
<el-option :disabled="editForm.database.includes('all')" v-for="it in dataBase" :key="it" :label="`${it.databaseName}(${it.dataHost})`" <el-option
:value="it.id"></el-option> :disabled="editForm.database.includes('all')"
v-for="it in dataBase"
:key="it"
:label="`${it.databaseName}(${it.dataHost})`"
:value="it.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item required> <el-form-item required>
...@@ -127,20 +137,28 @@ ...@@ -127,20 +137,28 @@
type="password" type="password"
placeholder="请输入管理密码" placeholder="请输入管理密码"
v-model="editForm.password"></el-input> v-model="editForm.password"></el-input>
<el-button :loading="loading" style="margin-left: 20px" type="primary" @click="submitOm">执行 <el-button
:loading="loading"
style="margin-left: 20px"
type="primary"
@click="submitOm">
执行
</el-button> </el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="sql-right"> <div class="sql-right">
<ul v-if="msg_list.length>0"> <ul v-if="msg_list.length > 0">
<li v-for="(item,i) in msg_list" :key="i"> <li v-for="(item, i) in msg_list" :key="i">
<div class="flex"> <div class="flex">
<span>执行结果:</span> <span>执行结果:</span>
<el-tag size="mini" v-if="item.status==='SUCCESS'" type="success">执行成功</el-tag> <el-tag
size="mini"
v-if="item.status === 'SUCCESS'"
type="success">
执行成功
</el-tag>
<el-tag size="mini" v-else type="danger">执行失败</el-tag> <el-tag size="mini" v-else type="danger">执行失败</el-tag>
</div> </div>
<div class="flex"> <div class="flex">
...@@ -249,6 +267,14 @@ export default { ...@@ -249,6 +267,14 @@ export default {
icon: 'el-icon-s-promotion', icon: 'el-icon-s-promotion',
index: '/saas/announceManage', index: '/saas/announceManage',
children: [] children: []
},
{
id: 5,
path: '',
label: '系统服务',
icon: 'el-icon-s-order',
index: '/saas/services',
children: []
} }
] ]
}, },
...@@ -430,7 +456,6 @@ export default { ...@@ -430,7 +456,6 @@ export default {
...mapState(['userInfo']) ...mapState(['userInfo'])
}, },
watch: { watch: {
currentTag(v) { currentTag(v) {
if (!v) return if (!v) return
const parent = this.menuList.find((e) => { const parent = this.menuList.find((e) => {
...@@ -449,7 +474,10 @@ export default { ...@@ -449,7 +474,10 @@ export default {
selectChange(v) { selectChange(v) {
if (v.includes('all')) { if (v.includes('all')) {
this.editForm.database = ['all'] this.editForm.database = ['all']
} else if (this.dataBase.length > 0 && this.dataBase.length === v.length) { } else if (
this.dataBase.length > 0 &&
this.dataBase.length === v.length
) {
this.editForm.database = ['all'] this.editForm.database = ['all']
} }
console.log(v) console.log(v)
...@@ -508,7 +536,7 @@ export default { ...@@ -508,7 +536,7 @@ export default {
this.editForm.content = '' this.editForm.content = ''
this.editForm.password = '' this.editForm.password = ''
this.editForm.database = ['all'] this.editForm.database = ['all']
get('platform/tools/datasource-list').then(res => { get('platform/tools/datasource-list').then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.dataBase = res.data this.dataBase = res.data
} }
...@@ -607,7 +635,6 @@ export default { ...@@ -607,7 +635,6 @@ export default {
margin-right: 10px; margin-right: 10px;
font-size: 18px; font-size: 18px;
} }
</style> </style>
<style lang="scss"> <style lang="scss">
.sql-dialog { .sql-dialog {
...@@ -672,5 +699,4 @@ export default { ...@@ -672,5 +699,4 @@ export default {
} }
} }
} }
</style> </style>
...@@ -6,12 +6,13 @@ module.exports = defineConfig({ ...@@ -6,12 +6,13 @@ module.exports = defineConfig({
host: '', host: '',
proxy: { proxy: {
'/api': { '/api': {
target: 'http://10.168.31.222:8096', // target: 'http://10.168.31.222:8096',
changeOrigin: true, target: 'http://10.168.1.132:8096',
changeOrigin: true
// pathRewrite: { // pathRewrite: {
// '^/api': '', // '^/api': '',
// }, // },
}, }
}, }
}, }
}) })
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment