update 报表分类
This commit is contained in:
parent
aeb016615b
commit
b9434ab765
94
src/views/modules/pms/reportSheetCategory/config.js
Normal file
94
src/views/modules/pms/reportSheetCategory/config.js
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||||
|
import switchBtn from "@/components/noTemplateComponents/switchBtn";
|
||||||
|
import request from "@/utils/request";
|
||||||
|
import { timeFilter } from "@/utils/filters";
|
||||||
|
|
||||||
|
|
||||||
|
export default function () {
|
||||||
|
const tableProps = [
|
||||||
|
{ type: "index", label: "序号" },
|
||||||
|
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||||
|
{ prop: "name", label: "分类名称" },
|
||||||
|
// { prop: "category", label: "报表分类" },
|
||||||
|
{
|
||||||
|
prop: "operations",
|
||||||
|
name: "操作",
|
||||||
|
fixed: "right",
|
||||||
|
width: 240,
|
||||||
|
subcomponent: TableOperaionComponent,
|
||||||
|
options: [
|
||||||
|
"edit",
|
||||||
|
{ name: "delete", emitFull: true, permission: "pms:reportSheetCategory:delete" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const headFormFields = [
|
||||||
|
{
|
||||||
|
prop: "name",
|
||||||
|
label: "分类名称",
|
||||||
|
input: true,
|
||||||
|
default: { value: "" },
|
||||||
|
bind: {
|
||||||
|
placeholder: "请输入分类名称",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "查询",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
button: {
|
||||||
|
type: "primary",
|
||||||
|
name: "新增",
|
||||||
|
permission: "pms:reportSheetCategory:save"
|
||||||
|
},
|
||||||
|
bind: {
|
||||||
|
plain: true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const dialogJustFormConfigs = {
|
||||||
|
form: {
|
||||||
|
rows: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
input: true,
|
||||||
|
label: "分类名称",
|
||||||
|
prop: "name",
|
||||||
|
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||||
|
elparams: { placeholder: "请输入分类名称" },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
|
operations: [
|
||||||
|
{ name: "add", label: "保存", type: "primary", permission: "pms:reportSheetCategory:save", showOnEdit: false },
|
||||||
|
{ name: "update", label: "修改", type: "primary", permission: "pms:reportSheetCategory:update", showOnEdit: true },
|
||||||
|
// { name: "reset", label: "重置", type: "warning", showAlways: true },
|
||||||
|
// { name: 'cancel', label: '取消', showAlways: true },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return {
|
||||||
|
dialogConfigs: dialogJustFormConfigs,
|
||||||
|
tableConfig: {
|
||||||
|
table: null,
|
||||||
|
column: tableProps,
|
||||||
|
},
|
||||||
|
headFormConfigs: {
|
||||||
|
rules: null,
|
||||||
|
fields: headFormFields,
|
||||||
|
},
|
||||||
|
urls: {
|
||||||
|
base: "/pms/reportSheetCategory",
|
||||||
|
page: "/pms/reportSheetCategory/page",
|
||||||
|
// subase: '/pms/blenderStepParam',
|
||||||
|
// subpage: '/pms/blenderStepParam/page',
|
||||||
|
// more...
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
@ -1,27 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main-container">reportSheet Category</div>
|
<ListViewWithHead :table-config="tableConfig" :head-config="headFormConfigs" :dialog-configs="dialogConfigs" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import initConfig from "./config";
|
||||||
|
import ListViewWithHead from "@/views/atomViews/ListViewWithHead.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ReportSheetCategoryView",
|
name: "ReportSheetCategoryView",
|
||||||
props: {},
|
components: { ListViewWithHead },
|
||||||
data() {
|
provide() {
|
||||||
return {};
|
return {
|
||||||
|
urls: this.allUrls,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
const { tableConfig, headFormConfigs, urls: allUrls, dialogConfigs } = initConfig.call(this);
|
||||||
|
return {
|
||||||
|
tableConfig,
|
||||||
|
headFormConfigs,
|
||||||
|
allUrls,
|
||||||
|
dialogConfigs,
|
||||||
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
|
||||||
mounted() {},
|
|
||||||
methods: {},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
.main-container {
|
|
||||||
background: white;
|
|
||||||
/* height: 100%; */
|
|
||||||
min-height: inherit;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 16px;
|
|
||||||
box-shadow: 0 0 1.125px 0.125px rgba(0, 0, 0, 0.125);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user