|
|
<el-row :gutter="5" >
|
|
|
<el-col :span="3" >
|
|
|
<div>
|
|
|
<el-row :gutter="5">
|
|
|
<el-col :span="3">
|
|
|
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}">
|
|
|
<div style="text-align: left;padding-left: 10px;padding-top: 3px;font-weight: bold">
|
|
|
<el-link type="info" :underline="false"><i class="iconfont icon-liebiao"></i> 资源类型</el-link>
|
|
|
</div>
|
|
|
<el-tree :data="treeData" :default-expanded-keys="[1]" node-key="id" @node-click="handleConfigNodeClick"/>
|
|
|
<el-tree :data="treeData" :props="props" >
|
|
|
<template #default="{ node, data }">
|
|
|
<div style="position: relative;flex-direction: row;width: 100%;">
|
|
|
<div style="width: calc(100% - 60px);max-width: calc(100% - 60px);overflow: hidden;text-overflow: ellipsis;text-align: left;"
|
|
|
@click="handleConfigNodeClick(data)" :title="node.label">
|
|
|
{{node.label }}
|
|
|
</div>
|
|
|
<div style="width: 60px;float: right">
|
|
|
<a @click="editType(data)" style="margin-right: 10px;">
|
|
|
<i class="el-icon-setting"></i>
|
|
|
</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-tree>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="21" >
|
|
|
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}" >
|
|
|
<el-col :span="21">
|
|
|
<div class="cm-card" :style="{'min-height':height+'px','height':'100%'}">
|
|
|
<div style="text-align: left;padding: 3px;">
|
|
|
<el-dropdown split-button @click="addConfig()">
|
|
|
<i class="icon el-icon-plus"/>添加
|
|
|
<template #dropdown>
|
|
|
<div style="max-height: 300px;overflow-y: auto">
|
|
|
<el-dropdown-menu>
|
|
|
<el-dropdown-item v-for="(item ,index) in defList" @click="addConfig(item)">
|
|
|
{{item.colAlias}}
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
<el-button type="primary" @click="saveConfig" style="margin-left: 10px">保存</el-button>
|
|
|
</div>
|
|
|
|
|
|
<cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
|
|
|
:showBorder="true" :currentPage="currentPage" :loading="false"
|
|
|
:showPage="false" :height="(height - 20)">
|
|
|
<template #default="{row,prop,column}">
|
|
|
<span v-if="prop == 'resListId'" >{{currentNode.label}}</span>
|
|
|
<span v-if="prop == 'resListId'">{{currentNode.label}}</span>
|
|
|
<div v-else>
|
|
|
<div v-if="['showUsers'].indexOf(prop) != -1">
|
|
|
showUsers
|
|
|
</div>
|
|
|
<div v-else-if="['colSort','colWidth'].indexOf(prop) != -1">
|
|
|
<el-input @blur="changeProperty(row,prop,column)" type="number" size="small" placeholder="请填写"
|
|
|
v-model="row[prop]">
|
|
|
<!--<template #suffix>
|
|
|
<i class="el-icon-edit"/>
|
|
|
</template>-->
|
|
|
</el-input>
|
|
|
</div>
|
|
|
|
|
|
<div v-else-if="['colIsTd','isQuery','isFilter','status'].indexOf(prop) != -1">
|
|
|
<!-- 展示下拉选项 -->
|
|
|
<el-select placeholder="请选择" size="small" style="width: 100%"
|
|
|
@change="changeProperty(row,prop,column)" v-model="row[prop]" :multiple="false"
|
|
|
@change="changeProperty(row,prop,column)" v-model="row[prop]"
|
|
|
:multiple="false"
|
|
|
collapse-tags clearable filterable placeholder="请选择">
|
|
|
<el-option label="是" :value="0"> </el-option>
|
|
|
<el-option label="否" :value="1"> </el-option>
|
|
|
<el-option label="是" :value="0"></el-option>
|
|
|
<el-option label="否" :value="1"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div v-else-if="['colType'].indexOf(prop) != -1">
|
|
|
<el-select placeholder="选择类型" size="small" style="width: 100%"
|
|
|
@change="changeProperty(row,prop,column)" v-model="row.colType" :multiple="false"
|
|
|
@change="getColType(row)" v-model="row.colType" :multiple="false"
|
|
|
collapse-tags clearable filterable placeholder="请选择">
|
|
|
<el-option v-for="(value,key) in colTypes" :key="index"
|
|
|
:label="value"
|
...
|
...
|
@@ -47,22 +72,68 @@ |
|
|
</el-select>
|
|
|
</div>
|
|
|
<div v-else-if="['colTypeQueryFields'].indexOf(prop) != -1">
|
|
|
colTypeQueryFields
|
|
|
<span v-if="Object.keys(fieldsObj).length == 0 || fieldsObj.propertyType == 'INPUT' || row.colType == 'INPUT'"> - </span>
|
|
|
|
|
|
<el-select v-else-if="fieldsObj.propertyType == 'LIST'" placeholder="请选择扩展属性"
|
|
|
size="small" style="width: 100%"
|
|
|
@change="getColTypeExtVal(row)" v-model="row.colTypeQueryFields"
|
|
|
:multiple="false"
|
|
|
collapse-tags clearable filterable placeholder="请选择">
|
|
|
<el-option v-for="(value,key) in fieldsObj.object" :key="index"
|
|
|
:label="value[fieldsObj.text]"
|
|
|
:value="value[fieldsObj.value]">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
|
|
|
<div v-else-if="prop == 'colTypeVal'">
|
|
|
<span v-if="fieldsValueObj == undefined || fieldsValueObj[row.id] == undefined || Object.keys(fieldsValueObj) == 0"> - </span>
|
|
|
<el-button v-else icon="el-icon-setting" @click="showSettingCmDialog(true,row)" size="mini"
|
|
|
style="margin-left: 10px"></el-button>
|
|
|
</div>
|
|
|
|
|
|
<div v-else>
|
|
|
<el-input @blur="changeProperty(row,prop,column)" size="small" placeholder="请填写"
|
|
|
prefix-icon="el-icon-edit" v-model="row[prop]">
|
|
|
<!--<template #suffix>
|
|
|
<i class="el-icon-loading"/>
|
|
|
<i class="el-icon-edit"/>
|
|
|
</template>-->
|
|
|
<el-input @blur="changeProperty(row,prop,column)"
|
|
|
:type="['colSort','colWidth'].indexOf(prop) != -1 ? 'number' : 'text'"
|
|
|
size="small" placeholder="请填写"v-model="row[prop]">
|
|
|
<template #suffix>
|
|
|
<i class="el-icon-edit" style="color: #409EFF" v-if="editColProps[prop] && editColProps[prop] == true"/>
|
|
|
<i class="el-icon-circle-check" v-else-if="editColProps[prop] && editColProps[prop] == false" />
|
|
|
<i class="el-icon-edit-outline" v-else />
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #tools>
|
|
|
<el-table-column fixed="right" label="操作" width="80" align="center">
|
|
|
<template #default="scope">
|
|
|
<el-button type="text" size="small" @click.prevent="deleteRow(scope.$index)">
|
|
|
<i class="el-icon-delete"/>
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</template>
|
|
|
</cm-table-page>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row> |
|
|
</el-row>
|
|
|
|
|
|
<cm-dialog title="属性配置" width="500px" :showDialogVisible="settingCmDialogFlg" @hidedialog="showSettingCmDialog" @okfunc="getSettingDetail">
|
|
|
<template v-slot>
|
|
|
<div style="padding: 10px" style="display: flex">
|
|
|
<div v-for="(v,k) in fieldsValueObj[currentRow.id].props" style="width: 50%">
|
|
|
<div style="text-align: left;padding-left: 10px;">{{v}}</div>
|
|
|
<el-select v-model="settingVal[currentRow.id][k]" :placeholder="v" style="margin: 3px">
|
|
|
<el-option v-for="(value ,index) in fieldsValueObj[currentRow.id].object"
|
|
|
:key="index"
|
|
|
:label="value[fieldsValueObj[currentRow.id].text]"
|
|
|
:value="value[fieldsValueObj[currentRow.id].value]" >
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</cm-dialog>
|
|
|
</div> |
...
|
...
|
|