init general dialog

This commit is contained in:
lb
2022-08-08 16:22:04 +08:00
parent e3849933d9
commit 2911cf2a90
2 changed files with 92 additions and 5 deletions

View File

@@ -7,7 +7,6 @@
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button v-if="$hasPermission('monitoring:product:save')" type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item>
</el-form>
<!-- <el-table :data="dataList" border v-loading="dataListLoading" @selection-change="selectionChangeHandle" style="width: 100%;">
@@ -71,7 +70,7 @@ const tableConfigs = [
{ prop: 'unitDictValue', name: '单位' },
// { prop: 'unitDictValue', name: '单位value对应到数据字典label_value' },
{ prop: 'operations', name: '操作', fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['viewAttr', 'delete'] }
// { "prop": "id", "name": "ID" },
// { "prop": "description", "name": "描述" },
// { "prop": "externalCode", "name": "外部编码,用于对照外部系统的编码" },
@@ -92,9 +91,52 @@ const tableConfigs = [
// { "prop": "version", "name": "版本号" }
]
const addOrUpdateConfigs = {
type: 'dialog', // dialog | drawer | page
fields: [
'name',
{
name: 'code',
api: 'xx/code'
},
{
name: 'processTime',
type: 'number', // type: number(input+number) | default(input) | textarea | select(options在父组件里获取) | datetime
required: true,
validator: false // 是否需要验证
},
'remark',
'specifications',
{
name: 'typeDictValue',
type: 'select',
options: [
// 动态获取
{ label: 'ces', value: 1 },
{ label: 'sec', value: 2 }
]
},
{
name: 'unitDictValue',
type: 'select',
options: [
// 动态获取
{ label: 'h', value: 'h' },
{ label: 'l', value: 'l' }
]
}
],
operations: [
{ add: 'api/product/add' },
{ update: 'api/product/update' },
{ reset: true }
]
}
export default {
data() {
return {tableConfigs,
return {
tableConfigs,
tableConfigs,
dataForm: {
key: ''