@misstalor17/elpis 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -0
- package/.eslintrc +56 -0
- package/README.md +6 -0
- package/app/controller/base.js +43 -0
- package/app/controller/business.js +121 -0
- package/app/controller/project.js +75 -0
- package/app/controller/view.js +24 -0
- package/app/extend/logger.js +37 -0
- package/app/middleware/api-params-verify.js +70 -0
- package/app/middleware/api-sign-verify.js +31 -0
- package/app/middleware/error-handler.js +32 -0
- package/app/middleware/project-handler.js +28 -0
- package/app/middleware.js +44 -0
- package/app/pages/asserts/custom.css +12 -0
- package/app/pages/boot.js +45 -0
- package/app/pages/common/curl.js +96 -0
- package/app/pages/common/utils.js +2 -0
- package/app/pages/dashboard/complex-view/header-view/complex-view/sub-menu.vue +22 -0
- package/app/pages/dashboard/complex-view/header-view/header-view.vue +106 -0
- package/app/pages/dashboard/complex-view/iframe-view/iframe-view.vue +45 -0
- package/app/pages/dashboard/complex-view/schema-view/complex-view/search-panel/search-panel.vue +33 -0
- package/app/pages/dashboard/complex-view/schema-view/complex-view/table-panel/table-panel.vue +105 -0
- package/app/pages/dashboard/complex-view/schema-view/components/component-config.js +23 -0
- package/app/pages/dashboard/complex-view/schema-view/components/create-form/create-form.vue +85 -0
- package/app/pages/dashboard/complex-view/schema-view/components/detail-panel/detail-panel.vue +90 -0
- package/app/pages/dashboard/complex-view/schema-view/components/edit-form/edit-form.vue +113 -0
- package/app/pages/dashboard/complex-view/schema-view/hook/schema.js +109 -0
- package/app/pages/dashboard/complex-view/schema-view/schema-view.vue +66 -0
- package/app/pages/dashboard/complex-view/sider-view/complex-view/sub-menu/sub-menu.vue +17 -0
- package/app/pages/dashboard/complex-view/sider-view/sider-view.vue +116 -0
- package/app/pages/dashboard/dashboard.vue +96 -0
- package/app/pages/dashboard/entry.dashboard.js +45 -0
- package/app/pages/store/index.js +3 -0
- package/app/pages/store/menu.js +60 -0
- package/app/pages/store/project.js +17 -0
- package/app/pages/widgets/header-container/asserts/logo.png +0 -0
- package/app/pages/widgets/header-container/asserts/user.png +0 -0
- package/app/pages/widgets/header-container/header-container.vue +105 -0
- package/app/pages/widgets/schema-form/complex-view/input/input.vue +120 -0
- package/app/pages/widgets/schema-form/complex-view/input-number/input-number.vue +121 -0
- package/app/pages/widgets/schema-form/complex-view/select/select.vue +106 -0
- package/app/pages/widgets/schema-form/form-item-config.js +20 -0
- package/app/pages/widgets/schema-form/schema-form.vue +122 -0
- package/app/pages/widgets/schema-search-bar/complex-view/date-range/date-range.vue +42 -0
- package/app/pages/widgets/schema-search-bar/complex-view/dynamic-select/dynamic-select.vue +55 -0
- package/app/pages/widgets/schema-search-bar/complex-view/input/input.vue +37 -0
- package/app/pages/widgets/schema-search-bar/complex-view/select/select.vue +41 -0
- package/app/pages/widgets/schema-search-bar/schema-search-bar.vue +109 -0
- package/app/pages/widgets/schema-search-bar/search-item-config.js +23 -0
- package/app/pages/widgets/schema-table/schema.table.vue +191 -0
- package/app/pages/widgets/sider-container/sider-container.vue +34 -0
- package/app/public/static/logo.png +0 -0
- package/app/public/static/normalize.css +240 -0
- package/app/router/business.js +9 -0
- package/app/router/project.js +6 -0
- package/app/router/view.js +13 -0
- package/app/router-schema/business.js +82 -0
- package/app/router-schema/project.js +31 -0
- package/app/service/base.js +13 -0
- package/app/service/project.js +40 -0
- package/app/view/entry.tpl +25 -0
- package/app/webpack/config/webpack.base.js +204 -0
- package/app/webpack/config/webpack.dev.js +56 -0
- package/app/webpack/config/webpack.prod.js +116 -0
- package/app/webpack/dev.js +52 -0
- package/app/webpack/libs/blank.js +1 -0
- package/app/webpack/prod.js +17 -0
- package/config/config.default.js +3 -0
- package/docs/dashboard-model.js +143 -0
- package/elpis-core/env.js +23 -0
- package/elpis-core/index.js +93 -0
- package/elpis-core/loader/config.js +52 -0
- package/elpis-core/loader/controller.js +61 -0
- package/elpis-core/loader/extend.js +52 -0
- package/elpis-core/loader/middleware.js +61 -0
- package/elpis-core/loader/router-schema.js +46 -0
- package/elpis-core/loader/router.js +43 -0
- package/elpis-core/loader/service.js +61 -0
- package/index.js +38 -0
- package/model/buiness/model.js +200 -0
- package/model/index.js +93 -0
- package/npminstall-debug.log +218 -0
- package/package.json +92 -0
- package/test/controller/project.test.js +194 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-input v-model="dtoValue" v-bind="schema.option" class="input"></el-input>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script setup>
|
|
6
|
+
import { ref, onMounted } from 'vue'
|
|
7
|
+
|
|
8
|
+
const { schemaKey, schema } = defineProps({
|
|
9
|
+
schemaKey: String,
|
|
10
|
+
schema: Object
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const dtoValue = ref()
|
|
14
|
+
const emit = defineEmits(['loaded'])
|
|
15
|
+
|
|
16
|
+
const getValue = () => {
|
|
17
|
+
return dtoValue.value !== undefined ? {
|
|
18
|
+
[schemaKey]: dtoValue.value
|
|
19
|
+
} : {}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const reset = () => {
|
|
23
|
+
dtoValue.value = schema?.option?.default
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
defineExpose({
|
|
27
|
+
getValue,
|
|
28
|
+
reset
|
|
29
|
+
})
|
|
30
|
+
onMounted(() => {
|
|
31
|
+
reset();
|
|
32
|
+
emit('loaded')
|
|
33
|
+
})
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<style lang='less' scoped></style>
|
|
37
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select v-model="dtoValue" v-bind="schema.option" class="select">
|
|
3
|
+
<el-option v-for="item in schema.option?.enumList" :key="item.value" :label="item.label"
|
|
4
|
+
:value="item.value"></el-option>
|
|
5
|
+
</el-select>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, onMounted } from 'vue'
|
|
10
|
+
|
|
11
|
+
const { schemaKey, schema } = defineProps({
|
|
12
|
+
schemaKey: String,
|
|
13
|
+
schema: Object
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
const dtoValue = ref()
|
|
17
|
+
const emit = defineEmits(['loaded'])
|
|
18
|
+
|
|
19
|
+
const getValue = () => {
|
|
20
|
+
return dtoValue.value !== undefined ? {
|
|
21
|
+
[schemaKey]: dtoValue.value
|
|
22
|
+
} : {}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const reset = () => {
|
|
26
|
+
dtoValue.value = schema?.option?.default ?? schema.option?.enumList[0]?.value
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
defineExpose({
|
|
30
|
+
getValue,
|
|
31
|
+
reset
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
onMounted(() => {
|
|
35
|
+
reset();
|
|
36
|
+
emit('loaded')
|
|
37
|
+
})
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang='less' scoped></style>
|
|
41
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form v-if="schema && schema.properties" :inline="true" class="schema-search-bar">
|
|
3
|
+
<!--动态组件-->
|
|
4
|
+
<el-form-item v-for="(schemaItem, key) in schema.properties" :key="key" :label="schemaItem.label">
|
|
5
|
+
<component :ref="searchComList" :is="SearchItemConfig[schemaItem.option?.comType]?.component" :schemaKey="key"
|
|
6
|
+
:schema="schemaItem" @load="handleChildLoaded"></component>
|
|
7
|
+
</el-form-item>
|
|
8
|
+
<!--操作区域-->
|
|
9
|
+
<el-form-item>
|
|
10
|
+
<el-button type="primary" plain class="search-btn" @click="search">搜索</el-button>
|
|
11
|
+
<el-button plain class="reset-btn" @click="reset">重制</el-button>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
</el-form>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script setup>
|
|
17
|
+
import { ref, toRefs } from 'vue'
|
|
18
|
+
import SearchItemConfig from './search-item-config.js'
|
|
19
|
+
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
/**
|
|
22
|
+
* schema配置,结构如下:
|
|
23
|
+
* {
|
|
24
|
+
type:'object',
|
|
25
|
+
properties:{
|
|
26
|
+
key:{
|
|
27
|
+
...schema,//标准 scheam 配置
|
|
28
|
+
type:'',//字段类型
|
|
29
|
+
label:'',//字段中文名
|
|
30
|
+
//字段在 search-bar 中的配置
|
|
31
|
+
option:{
|
|
32
|
+
...elComponentConfig,//标准 el-form 配置
|
|
33
|
+
comType:'',//配置组件类型
|
|
34
|
+
default:''//默认值
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
*/
|
|
40
|
+
schema: Object
|
|
41
|
+
})
|
|
42
|
+
const { schema } = toRefs(props)
|
|
43
|
+
const emit = defineEmits(['load', 'search', 'reset'])
|
|
44
|
+
|
|
45
|
+
//页面上动态生成了多少个搜索框,我就把它们全部抓进一个数组里,后面我要批量控制它们。
|
|
46
|
+
const searchComList = ref([])
|
|
47
|
+
|
|
48
|
+
const getValue = () => {
|
|
49
|
+
let dtoObj = {}
|
|
50
|
+
searchComList.value.forEach(component => {
|
|
51
|
+
dtoObj = {
|
|
52
|
+
...dtoObj,
|
|
53
|
+
...component?.getValue()
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
return dtoObj;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let childComLoadedCount = 0
|
|
60
|
+
const handleChildLoaded = () => {
|
|
61
|
+
childComLoadedCount++;
|
|
62
|
+
if (childComLoadedCount >= Object.keys(schema?.value?.properties).length) {
|
|
63
|
+
emit('load', getValue())
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const search = () => {
|
|
68
|
+
emit('search', getValue())
|
|
69
|
+
}
|
|
70
|
+
const reset = () => {
|
|
71
|
+
searchComList.value.forEach(component => component?.reset())
|
|
72
|
+
emit('reset')
|
|
73
|
+
}
|
|
74
|
+
defineExpose({
|
|
75
|
+
reset,
|
|
76
|
+
getValue
|
|
77
|
+
})
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<style lang='less'>
|
|
81
|
+
.schema-search-bar {
|
|
82
|
+
min-width: 500px;
|
|
83
|
+
|
|
84
|
+
.input {
|
|
85
|
+
width: 180px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.select {
|
|
89
|
+
width: 180px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.dynamic-select {
|
|
93
|
+
width: 180px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.date-range {
|
|
97
|
+
width: 150px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.search-btn {
|
|
101
|
+
width: 100px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.reset-btn {
|
|
105
|
+
width: 100px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
109
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import input from './complex-view/input/input.vue'
|
|
2
|
+
import select from './complex-view/select/select.vue'
|
|
3
|
+
import dynamicSelect from './complex-view/dynamic-select/dynamic-select.vue'
|
|
4
|
+
import dateRange from './complex-view/date-range/date-range.vue'
|
|
5
|
+
|
|
6
|
+
//业务扩展 search-bar 配置
|
|
7
|
+
import BusinessSearchItemConfig from '$businessSearchItemConfig'
|
|
8
|
+
|
|
9
|
+
const SearchItemConfig = {
|
|
10
|
+
input:{
|
|
11
|
+
component:input
|
|
12
|
+
},
|
|
13
|
+
select:{
|
|
14
|
+
component:select
|
|
15
|
+
},
|
|
16
|
+
dynamicSelect:{
|
|
17
|
+
component:dynamicSelect
|
|
18
|
+
},
|
|
19
|
+
dateRange:{
|
|
20
|
+
component:dateRange
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default {...BusinessSearchItemConfig,...SearchItemConfig};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="schema-table">
|
|
3
|
+
<el-table class="table" v-if="schema && schema.properties" v-loading="loading" :data="tableData">
|
|
4
|
+
<template v-for="(schemaItem, key) in schema.properties">
|
|
5
|
+
<el-table-column v-if="schemaItem.option.visiable !== false" :key="key" :prop="key"
|
|
6
|
+
:label="schemaItem.label" v-bind="schemaItem.option">
|
|
7
|
+
</el-table-column>
|
|
8
|
+
</template>
|
|
9
|
+
<el-table-column v-if="buttons?.length > 0" label="操作" fixed="right" :width="operationWidth">
|
|
10
|
+
<template #default="scope">
|
|
11
|
+
<el-button v-for="item in buttons" link v-bind="item"
|
|
12
|
+
@click="operationHanler({ btnConfig: item, rowData: scope.row })">
|
|
13
|
+
{{ item.label }}
|
|
14
|
+
</el-button>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
</el-table-column>
|
|
18
|
+
</el-table>
|
|
19
|
+
<el-row justify="end" class="pagination">
|
|
20
|
+
<el-pagination :current-page="currentPage" :page-size="pageSize" :page-sizes="[10, 20, 50, 100, 200]"
|
|
21
|
+
layout="total, sizes, prev, pager, next, jumper" :total="total">
|
|
22
|
+
</el-pagination>
|
|
23
|
+
</el-row>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { ref, toRefs, computed, watch, onMounted, nextTick } from 'vue'
|
|
29
|
+
import $curl from '$elpisCommon/curl.js'
|
|
30
|
+
const props = defineProps({
|
|
31
|
+
/**
|
|
32
|
+
* schema 配置,结构如下:
|
|
33
|
+
* {
|
|
34
|
+
type:'object',
|
|
35
|
+
properties:{
|
|
36
|
+
key:{
|
|
37
|
+
...schema,//标准 scheam 配置
|
|
38
|
+
type:'',//字段类型
|
|
39
|
+
label:'',//字段中文名
|
|
40
|
+
option:{
|
|
41
|
+
...elTableColumnConfig,//标准 el-table-column 配置
|
|
42
|
+
visible:true,//默认为true
|
|
43
|
+
}//字段在 table中的相关配置
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
*/
|
|
48
|
+
schema: Object,
|
|
49
|
+
// 表格数据源 api
|
|
50
|
+
api: String,
|
|
51
|
+
//api请求参数,请求 API 时携带
|
|
52
|
+
apiParams: Object,
|
|
53
|
+
/**
|
|
54
|
+
* buttons 操作按钮相关配置,结构如下:
|
|
55
|
+
* [
|
|
56
|
+
* {
|
|
57
|
+
label:'',//按钮中文名
|
|
58
|
+
eventKey:'',//按钮事件名
|
|
59
|
+
eventOption:{},//按钮事件具体配置
|
|
60
|
+
...elButtonConfig //标准 el-button配置
|
|
61
|
+
}
|
|
62
|
+
* ]
|
|
63
|
+
*/
|
|
64
|
+
buttons: Array
|
|
65
|
+
})
|
|
66
|
+
const { schema, api, buttons, apiParams } = toRefs(props)
|
|
67
|
+
const emit = defineEmits(['operate'])
|
|
68
|
+
const operationWidth = computed(() => {
|
|
69
|
+
return buttons?.value?.length > 0 ? buttons.value.reduce((pre, cur) => {
|
|
70
|
+
return pre + cur.label.length * 18
|
|
71
|
+
}, 50) : 50
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
const loading = ref(false)
|
|
75
|
+
const tableData = ref([])
|
|
76
|
+
const currentPage = ref(1)
|
|
77
|
+
const pageSize = ref(50)
|
|
78
|
+
const total = ref(0)
|
|
79
|
+
|
|
80
|
+
onMounted(() => {
|
|
81
|
+
initData()
|
|
82
|
+
})
|
|
83
|
+
// 监听schema和api变化,重新初始化数据
|
|
84
|
+
watch([schema, api, apiParams], () => {
|
|
85
|
+
initData()
|
|
86
|
+
}, { deep: true })
|
|
87
|
+
|
|
88
|
+
// 监听分页变化,自动加载数据(替代原冗余的handle方法)
|
|
89
|
+
watch([currentPage, pageSize], async () => {
|
|
90
|
+
await fetchTableData()
|
|
91
|
+
}, { immediate: false })
|
|
92
|
+
|
|
93
|
+
const initData = () => {
|
|
94
|
+
currentPage.value = 1
|
|
95
|
+
pageSize.value = 50
|
|
96
|
+
nextTick(async () => {
|
|
97
|
+
await loadTableData()
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
let timerId = null;
|
|
102
|
+
const loadTableData = async () => {
|
|
103
|
+
clearTimeout(timerId)
|
|
104
|
+
timerId = setTimeout(async () => {
|
|
105
|
+
await fetchTableData();
|
|
106
|
+
timerId = null
|
|
107
|
+
}, 100)
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const fetchTableData = async () => {
|
|
111
|
+
if (!api.value) { return; }
|
|
112
|
+
|
|
113
|
+
showLoading()
|
|
114
|
+
|
|
115
|
+
const res = await $curl({
|
|
116
|
+
method: 'get',
|
|
117
|
+
url: `${api.value}/list`,
|
|
118
|
+
query: {
|
|
119
|
+
...apiParams.value,
|
|
120
|
+
page: currentPage.value,
|
|
121
|
+
size: pageSize.value
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
hideLoading()
|
|
125
|
+
|
|
126
|
+
if (!res || !res.success || !Array.isArray(res.data)) {
|
|
127
|
+
tableData.value = []
|
|
128
|
+
total.value = 0;
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
tableData.value = buildTableData(res.data);
|
|
133
|
+
total.value = res.metadata.total
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* 对后端返回的数据进行渲染前的预处理
|
|
137
|
+
* @param {object} listData
|
|
138
|
+
*/
|
|
139
|
+
const buildTableData = (listData) => {
|
|
140
|
+
if (!schema.value?.properties) {
|
|
141
|
+
return listData;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return listData.map(rowData => {
|
|
145
|
+
for (const dKey in rowData) {
|
|
146
|
+
const schemaItem = schema.value.properties[dKey]
|
|
147
|
+
//处理toFixed
|
|
148
|
+
if (schemaItem?.option?.toFixed) {
|
|
149
|
+
rowData[dKey] = rowData[dKey].toFixed && rowData[dKey].toFixed(schemaItem.option.toFixed)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return rowData;
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const showLoading = () => {
|
|
157
|
+
loading.value = true
|
|
158
|
+
}
|
|
159
|
+
const hideLoading = () => {
|
|
160
|
+
loading.value = false
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const operationHanler = ({ btnConfig, rowData }) => {
|
|
164
|
+
emit('operate', { btnConfig, rowData })
|
|
165
|
+
}
|
|
166
|
+
defineExpose({
|
|
167
|
+
initData,
|
|
168
|
+
loadTableData,
|
|
169
|
+
showLoading,
|
|
170
|
+
hideLoading
|
|
171
|
+
})
|
|
172
|
+
</script>
|
|
173
|
+
|
|
174
|
+
<style lang='less' scoped>
|
|
175
|
+
.schema-table {
|
|
176
|
+
flex: 1;
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-direction: column;
|
|
179
|
+
overflow: auto;
|
|
180
|
+
|
|
181
|
+
.table {
|
|
182
|
+
flex: 1;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.pagination {
|
|
186
|
+
margin: 10px 0;
|
|
187
|
+
text-align: right;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
</style>
|
|
191
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="sider-container">
|
|
3
|
+
<el-aside width="200px" class="aside">
|
|
4
|
+
<slot name="menu-content"></slot>
|
|
5
|
+
</el-aside>
|
|
6
|
+
<el-main class="main">
|
|
7
|
+
<slot name="main-content"></slot>
|
|
8
|
+
</el-main>
|
|
9
|
+
</el-container>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
// import { ref } from 'vue'
|
|
14
|
+
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<style lang='less' scoped>
|
|
18
|
+
.sider-container {
|
|
19
|
+
height: 100%;
|
|
20
|
+
|
|
21
|
+
.aside {
|
|
22
|
+
border-right: 1px solid #E8E8E8;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.main {
|
|
26
|
+
overflow: scroll;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:deep(.el-menu) {
|
|
31
|
+
border-right: 0;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
34
|
+
|
|
Binary file
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 1. Set default font family to sans-serif.
|
|
5
|
+
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
|
6
|
+
* user zoom.
|
|
7
|
+
*/
|
|
8
|
+
html,body,span,div,p,a,table,tbody,td,h1,h2,h3,img,form,font,strong,b,i,dl,dt,dd,ol,ul,li,dl,dd,dt,iframe,label,blockquote,input,button
|
|
9
|
+
{
|
|
10
|
+
padding: 0;
|
|
11
|
+
margin: 0;
|
|
12
|
+
list-style: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
html {
|
|
16
|
+
font-family: "Open Sans","Helvetica Neue","Microsoft Yahei",sans-serif;/* 1 */
|
|
17
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
|
18
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Remove default margin.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Links
|
|
30
|
+
========================================================================== */
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Remove the gray background color from active links in IE 10.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
a {
|
|
37
|
+
background-color: transparent;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Improve readability when focused and also mouse hovered in all browsers.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
a:active,
|
|
46
|
+
a:hover {
|
|
47
|
+
outline: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Text-level semantics
|
|
51
|
+
========================================================================== */
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
b,
|
|
58
|
+
strong {
|
|
59
|
+
font-weight: bold;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Embedded content
|
|
63
|
+
========================================================================== */
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Remove border when inside `a` element in IE 8/9/10.
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
img {
|
|
70
|
+
border: 0;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
/* Grouping content
|
|
75
|
+
========================================================================== */
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Address margin not present in IE 8/9 and Safari.
|
|
79
|
+
*/
|
|
80
|
+
|
|
81
|
+
figure {
|
|
82
|
+
margin: 1em 40px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/* Forms
|
|
87
|
+
========================================================================== */
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
|
91
|
+
* styling of `select`, unless a `border` property is set.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 1. Correct color not being inherited.
|
|
96
|
+
a * Known issue: affects color of disabled elements.
|
|
97
|
+
* 2. Correct font properties not being inherited.
|
|
98
|
+
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
button,
|
|
102
|
+
input,
|
|
103
|
+
optgroup,
|
|
104
|
+
select,
|
|
105
|
+
textarea {
|
|
106
|
+
color: inherit; /* 1 */
|
|
107
|
+
font: inherit; /* 2 */
|
|
108
|
+
margin: 0; /* 3 */
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
|
113
|
+
*/
|
|
114
|
+
|
|
115
|
+
button {
|
|
116
|
+
overflow: visible;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
|
121
|
+
* All other form control elements do not inherit `text-transform` values.
|
|
122
|
+
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
|
123
|
+
* Correct `select` style inheritance in Firefox.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
button,
|
|
127
|
+
select {
|
|
128
|
+
text-transform: none;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
|
133
|
+
* and `video` controls.
|
|
134
|
+
* 2. Correct inability to style clickable `input` types in iOS.
|
|
135
|
+
* 3. Improve usability and consistency of cursor style between image-type
|
|
136
|
+
* `input` and others.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
button,
|
|
140
|
+
html input[type="button"], /* 1 */
|
|
141
|
+
input[type="reset"],
|
|
142
|
+
input[type="submit"] {
|
|
143
|
+
-webkit-appearance: button; /* 2 */
|
|
144
|
+
cursor: pointer; /* 3 */
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Re-set default cursor for disabled elements.
|
|
149
|
+
*/
|
|
150
|
+
|
|
151
|
+
button[disabled],
|
|
152
|
+
html input[disabled] {
|
|
153
|
+
cursor: default;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Remove inner padding and border in Firefox 4+.
|
|
158
|
+
*/
|
|
159
|
+
|
|
160
|
+
button::-moz-focus-inner,
|
|
161
|
+
input::-moz-focus-inner {
|
|
162
|
+
border: 0;
|
|
163
|
+
padding: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
|
168
|
+
* the UA stylesheet.
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
input {
|
|
172
|
+
line-height: normal;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* It's recommended that you don't attempt to style these elements.
|
|
177
|
+
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
|
178
|
+
*
|
|
179
|
+
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
|
180
|
+
* 2. Remove excess padding in IE 8/9/10.
|
|
181
|
+
*/
|
|
182
|
+
|
|
183
|
+
input[type="checkbox"],
|
|
184
|
+
input[type="radio"] {
|
|
185
|
+
box-sizing: border-box; /* 1 */
|
|
186
|
+
padding: 0; /* 2 */
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
|
191
|
+
* `font-size` values of the `input`, it causes the cursor style of the
|
|
192
|
+
* decrement button to change from `default` to `text`.
|
|
193
|
+
*/
|
|
194
|
+
|
|
195
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
196
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
197
|
+
height: auto;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
|
202
|
+
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome
|
|
203
|
+
* (include `-moz` to future-proof).
|
|
204
|
+
*/
|
|
205
|
+
|
|
206
|
+
input[type="search"] {
|
|
207
|
+
-webkit-appearance: textfield; /* 1 */
|
|
208
|
+
-moz-box-sizing: content-box;
|
|
209
|
+
-webkit-box-sizing: content-box; /* 2 */
|
|
210
|
+
box-sizing: content-box;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
|
215
|
+
* Safari (but not Chrome) clips the cancel button when the search input has
|
|
216
|
+
* padding (and `textfield` appearance).
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
input[type="search"]::-webkit-search-cancel-button,
|
|
220
|
+
input[type="search"]::-webkit-search-decoration {
|
|
221
|
+
-webkit-appearance: none;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Tables
|
|
225
|
+
========================================================================== */
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Remove most spacing between table cells.
|
|
229
|
+
*/
|
|
230
|
+
|
|
231
|
+
table {
|
|
232
|
+
border-collapse: collapse;
|
|
233
|
+
border-spacing: 0;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
td,
|
|
237
|
+
th {
|
|
238
|
+
padding: 0;
|
|
239
|
+
}
|
|
240
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
module.exports = (app,router) => {
|
|
2
|
+
const {business:businessController} = app.controller
|
|
3
|
+
router.get('/api/proj/product',businessController.get.bind(businessController))
|
|
4
|
+
router.put('/api/proj/product',businessController.update.bind(businessController))
|
|
5
|
+
router.post('/api/proj/product',businessController.create.bind(businessController))
|
|
6
|
+
router.delete('/api/proj/product',businessController.remove.bind(businessController))
|
|
7
|
+
router.get('/api/proj/product/list',businessController.getList.bind(businessController))
|
|
8
|
+
router.get('/api/proj/product_enum/list',businessController.getProductEnumList.bind(businessController))
|
|
9
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
module.exports = (app, router) => {
|
|
2
|
+
const { project: projectController } = app.controller;
|
|
3
|
+
router.get('/api/project',projectController.get.bind(projectController))
|
|
4
|
+
router.get('/api/project/list',projectController.getList.bind(projectController))
|
|
5
|
+
router.get('/api/project/model_list',projectController.getModelList.bind(projectController))
|
|
6
|
+
}
|