Commit 091a6d45 authored by 水落(YangLei)'s avatar 水落(YangLei)

Merge branch 'master' into feature/shuiluo

parents 994681fd 59041a03
......@@ -28,6 +28,21 @@ function updateOrgApi(data) {
return putReq('/api/v1/organizations', data);
}
function addBusinessApi(data) {
return postReq('/api/v1/parameters/business', data);
}
function updateBusinessApi(data) {
return putReq('/api/v1/parameters/business', data);
}
function addOperationApi(data) {
return postReq('/api/v1/parameters/operation', data);
}
function updateOperationApi(data) {
return putReq('/api/v1/parameters/operation', data);
}
export default {
addJobs: addJobsApi,
updateJobs: updateJobsApi,
......@@ -36,4 +51,8 @@ export default {
getOrganizationDetails: getOrganizationDetailsApi,
addOrg: addOrgApi,
updateOrg: updateOrgApi,
addBusiness: addBusinessApi,
updateBusiness: updateBusinessApi,
addOperation: addOperationApi,
updateOperation: updateOperationApi,
};
......@@ -2,7 +2,7 @@
<div>
<my-card v-if="$scopedSlots.search">
<a-form-model :model="queryForm" layout="horizontal">
<a-row :gutter="24">
<a-row :gutter="16">
<slot name="search" :query="queryForm" />
</a-row>
</a-form-model>
......
<template>
<a-col v-bind="span">
<a-form-model-item v-bind="layout">
<slot class="tw-w-full" />
<slot />
</a-form-model-item>
</a-col>
</template>
......@@ -11,7 +11,7 @@ export default {
data() {
return {
span: { xs: 24, sm: 24, lg: 12, xl: 6 },
layout: { labelCol: { span: 5 }, wrapperCol: { span: 19 }, ...this.$attrs },
layout: { labelCol: { span: 6 }, wrapperCol: { span: 18 }, ...this.$attrs },
};
},
};
......
<template>
<h1>Menu Management</h1>
</template>
\ No newline at end of file
import OrgManagement from './OrgManagement';
export default OrgManagement;
\ No newline at end of file
<template>
<h1>Menu Management</h1>
</template>
\ No newline at end of file
<template>
<a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm">
<a-form-model-item label="语言" prop="paramLocale">
<a-select
v-model="form.paramLocale"
:options="langList"
placeholder="请选择"
:disabled="isView"
/>
</a-form-model-item>
<a-form-model-item label="参数模块" prop="paramModule">
<a-input v-model="form.paramModule" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="参数编码" prop="paramCode">
<a-input v-model="form.paramCode" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="参数值" prop="paramValue">
<a-input v-model="form.paramValue" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="参数名称" prop="paramName">
<a-input v-model="form.paramName" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="显示顺序" prop="paramIndex">
<a-input v-model="form.paramIndex" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="说明" prop="remark">
<a-textarea v-model="form.remark" :disabled="isView" :rows="4" />
</a-form-model-item>
</a-form-model>
</template>
<script>
import Api from '@/api/organization';
import FormMixin from '@/components/FormMixin';
import { globalConfig } from '@/config';
import { formatObj } from '@/utils';
export default {
mixins: [FormMixin],
data() {
return {
rules: {
paramLocale: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramModule: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramCode: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramValue: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramName: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramIndex: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
},
langList: [],
};
},
async mounted() {
this.langList = await formatObj(globalConfig.langs, { value: 'key', label: 'name', key: 'key' });
},
methods: {
add() {
return Api.addBusiness({ ...this.form });
},
edit() {
return Api.updateBusiness({ ...this.form });
},
},
};
</script>
<template>
<my-table
url="/api/v1/parameters/business"
rowKey="paramId"
:addBtn="addBtn"
ref="table"
:scroll="{ x: true }"
>
<template #drawer>
<Form ref="form" />
</template>
<template #search="{ query }">
<MyFormModelItem label="语言">
<a-select v-model="query.paramLocale" :options="langList" placeholder="请选择" />
</MyFormModelItem>
<MyFormModelItem label="参数模块">
<a-input v-model="query.paramModule" placeholder="请输入" />
</MyFormModelItem>
<MyFormModelItem label="参数编码">
<a-input v-model="query.paramCode" placeholder="请输入" />
</MyFormModelItem>
<MyFormModelItem label="参数名称">
<a-input v-model="query.paramName" placeholder="请输入" />
</MyFormModelItem>
</template>
<a-table-column title="语言" data-index="paramLocale" />
<a-table-column title="参数模块" data-index="paramModule" />
<a-table-column title="参数编码" data-index="paramCode" />
<a-table-column title="参数值" data-index="paramValue" />
<a-table-column title="参数名称" data-index="paramName" />
<a-table-column title="说明" data-index="remark" />
<a-table-column title="显示顺序" data-index="paramIndex" />
<a-table-column title="操作" fixed="right">
<template #default="row">
<a @click="() => view(row, 1)">编辑</a>
<a-divider type="vertical" />
<PopconfirmDelete :url="`/api/v1/parameters/business/${row.paramId}`" :cb="refreshTable" />
</template>
</a-table-column>
</my-table>
</template>
<script>
import PopconfirmDelete from '@/components/popconfirm_delete/index.vue';
import MyFormModelItem from '@/components/table/my_item.vue';
import { globalConfig } from '@/config';
import { formatObj } from '@/utils';
import Form from './form.vue';
export default {
components: { Form, PopconfirmDelete, MyFormModelItem },
data() {
return {
addBtn: { width: 600, onOk: () => this.$refs['form']?.submit() },
langList: [],
};
},
async mounted() {
this.langList = await formatObj(globalConfig.langs, { value: 'key', label: 'name', key: 'key' });
},
methods: {
refreshTable() {
this.$refs['table']?.getData();
},
view(data, type) {
this.$refs['table']?.show({ type });
this.$nextTick(() => {
this.$refs['form'].setData({ ...data }, type);
});
},
},
};
</script>
\ No newline at end of file
import ParamManagement from './ParamManagement';
export default ParamManagement;
\ No newline at end of file
<template>
<a-form-model layout="vertical" :model="form" :rules="rules" ref="DrawerForm">
<a-form-model-item label="参数模块" prop="paramModule">
<a-input v-model="form.paramModule" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="参数编码" prop="paramCode">
<a-input v-model="form.paramCode" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="参数值" prop="paramValue">
<a-input v-model="form.paramValue" placeholder="请输入" :disabled="isView" />
</a-form-model-item>
<a-form-model-item label="说明" prop="remark">
<a-textarea v-model="form.remark" :disabled="isView" :rows="4" />
</a-form-model-item>
</a-form-model>
</template>
<script>
import Api from '@/api/organization';
import FormMixin from '@/components/FormMixin';
export default {
mixins: [FormMixin],
data() {
return {
rules: {
paramModule: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramCode: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramValue: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
paramIndex: [{ required: true, message: 'Please select Activity zone', trigger: 'change' }],
},
};
},
methods: {
add() {
return Api.addOperation({ ...this.form });
},
edit() {
return Api.updateOperation({ ...this.form });
},
},
};
</script>
<template>
<my-table
url="/api/v1/parameters/operation"
rowKey="paramId"
:addBtn="addBtn"
ref="table"
:scroll="{ x: true }"
>
<template #drawer>
<Form ref="form" />
</template>
<template #search="{ query }">
<MyFormModelItem label="参数模块">
<a-input v-model="query.paramModule" placeholder="请输入" />
</MyFormModelItem>
<MyFormModelItem label="参数编码">
<a-input v-model="query.paramCode" placeholder="请输入" />
</MyFormModelItem>
<MyFormModelItem label="参数值">
<a-input v-model="query.paramValue" placeholder="请输入" />
</MyFormModelItem>
</template>
<a-table-column title="参数模块" data-index="paramModule" />
<a-table-column title="参数编码" data-index="paramCode" />
<a-table-column title="参数值" data-index="paramValue" />
<a-table-column title="说明" data-index="remark" />
<a-table-column title="操作" fixed="right">
<template #default="row">
<a @click="() => view(row, 1)">编辑</a>
<a-divider type="vertical" />
<PopconfirmDelete :url="`/api/v1/parameters/operation/${row.paramId}`" :cb="refreshTable" />
</template>
</a-table-column>
</my-table>
</template>
<script>
import PopconfirmDelete from '@/components/popconfirm_delete/index.vue';
import MyFormModelItem from '@/components/table/my_item.vue';
import { globalConfig } from '@/config';
import { formatObj } from '@/utils';
import Form from './form.vue';
export default {
components: { Form, PopconfirmDelete, MyFormModelItem },
data() {
return {
addBtn: { width: 600, onOk: () => this.$refs['form']?.submit() },
};
},
methods: {
refreshTable() {
this.$refs['table']?.getData();
},
view(data, type) {
this.$refs['table']?.show({ type });
this.$nextTick(() => {
this.$refs['form'].setData({ ...data }, type);
});
},
},
};
</script>
\ No newline at end of file
......@@ -54,18 +54,5 @@ const routerMap = {
name: '菜单管理',
component: () => import('@/pages/system/view/menu'),
},
organization_management: {
name: '组织管理',
component: () => import('@/pages/system/view/organization'),
},
role_management: {
name: '角色管理',
component: () => import('@/pages/system/view/role'),
},
parameter_management: {
name: '参数管理',
component: () => import('@/pages/system/view/parameter'),
},
};
export default routerMap;
......@@ -110,7 +110,21 @@ const options = {
{
path: 'parameter_management',
name: '参数管理',
component: () => import('@/pages/system/view/parameter'),
component: BlankTemplateView,
children: [
{
path: 'business_management',
name: '业务参数',
component: () =>
import('@/pages/system/view/parameter/business/index.vue'),
},
{
path: 'operation_management',
name: '运维参数',
component: () =>
import('@/pages/system/view/parameter/operation/index.vue'),
},
],
},
{
path: 'log_management',
......
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