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 = [
meta: { title: '公告管理' }
},
{
path: '/saas/services',
component: () => import('@/views/system/services.vue'),
name: 'system_services',
meta: { title: '系统服务' }
},
{
path: '/saas/countryCode',
component: () => import('@/views/system/countryCode.vue'),
name: 'system_countryCode',
......@@ -149,7 +155,8 @@ const routes = [
component: () => import('@/views/production/AssistantManage.vue'),
name: 'production_assistant_manage',
meta: { title: '应用版本管理' }
}, {
},
{
path: '/saas/import-template',
component: () => import('@/views/import-template/index.vue'),
name: 'import-template',
......
......@@ -107,9 +107,19 @@
<div class="sql-left">
<el-form :model="editForm">
<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 :disabled="editForm.database.includes('all')" v-for="it in dataBase" :key="it" :label="`${it.databaseName}(${it.dataHost})`"
<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-form-item>
......@@ -127,20 +137,28 @@
type="password"
placeholder="请输入管理密码"
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>
</div>
</el-form-item>
</el-form>
</div>
<div class="sql-right">
<ul v-if="msg_list.length>0">
<li v-for="(item,i) in msg_list" :key="i">
<ul v-if="msg_list.length > 0">
<li v-for="(item, i) in msg_list" :key="i">
<div class="flex">
<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>
</div>
<div class="flex">
......@@ -249,6 +267,14 @@ export default {
icon: 'el-icon-s-promotion',
index: '/saas/announceManage',
children: []
},
{
id: 5,
path: '',
label: '系统服务',
icon: 'el-icon-s-order',
index: '/saas/services',
children: []
}
]
},
......@@ -430,7 +456,6 @@ export default {
...mapState(['userInfo'])
},
watch: {
currentTag(v) {
if (!v) return
const parent = this.menuList.find((e) => {
......@@ -449,7 +474,10 @@ export default {
selectChange(v) {
if (v.includes('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']
}
console.log(v)
......@@ -508,7 +536,7 @@ export default {
this.editForm.content = ''
this.editForm.password = ''
this.editForm.database = ['all']
get('platform/tools/datasource-list').then(res => {
get('platform/tools/datasource-list').then((res) => {
if (res.code === 200) {
this.dataBase = res.data
}
......@@ -607,7 +635,6 @@ export default {
margin-right: 10px;
font-size: 18px;
}
</style>
<style lang="scss">
.sql-dialog {
......@@ -672,5 +699,4 @@ export default {
}
}
}
</style>
......@@ -6,12 +6,13 @@ module.exports = defineConfig({
host: '',
proxy: {
'/api': {
target: 'http://10.168.31.222:8096',
changeOrigin: true,
// target: 'http://10.168.31.222:8096',
target: 'http://10.168.1.132:8096',
changeOrigin: true
// pathRewrite: {
// '^/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