Compare commits
2 Commits
862f20e7e2
...
997565a9d1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
997565a9d1 | ||
|
|
83e22cc032 |
@@ -4,7 +4,7 @@
|
|||||||
<Button type="primary" @click="addWarp()">新增</Button>
|
<Button type="primary" @click="addWarp()">新增</Button>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-body">
|
<div class="table-body">
|
||||||
<TreeGrid :columns="gridOption.columns" :data="gridOption.data"></TreeGrid>
|
<TreeGrid :columns="gridOption.columns" :data="gridOption.data"></TreeGrid>
|
||||||
</div>
|
</div>
|
||||||
<editModal ref="editModal" :columns="gridOption.editColumns" :rules="gridOption.rules">
|
<editModal ref="editModal" :columns="gridOption.editColumns" :rules="gridOption.rules">
|
||||||
<div slot="bottom">
|
<div slot="bottom">
|
||||||
@@ -12,12 +12,12 @@
|
|||||||
<fieldItem name='类别'>
|
<fieldItem name='类别'>
|
||||||
<RadioGroup v-model="editRow.type">
|
<RadioGroup v-model="editRow.type">
|
||||||
<Radio :label="item.key" :key="item.key" v-for="item in typeSource">
|
<Radio :label="item.key" :key="item.key" v-for="item in typeSource">
|
||||||
{{item.value}}
|
{{ item.value }}
|
||||||
</Radio>
|
</Radio>
|
||||||
</RadioGroup>
|
</RadioGroup>
|
||||||
</fieldItem>
|
</fieldItem>
|
||||||
|
|
||||||
<div v-if="editRow.type==='页面'||editRow.type==='功能'">
|
<div v-if="editRow.type === '页面' || editRow.type === '功能'">
|
||||||
<fieldItem name='数据模型'>
|
<fieldItem name='数据模型'>
|
||||||
<Select v-model="editRow.model_id">
|
<Select v-model="editRow.model_id">
|
||||||
<Option v-for="item in modelRows" :value="item.id" :key="item.id">{{ item.value }}</Option>
|
<Option v-for="item in modelRows" :value="item.id" :key="item.id">{{ item.value }}</Option>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</fieldItem>
|
</fieldItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<fieldItem name='地址' v-if="editRow.type==='外链'">
|
<fieldItem name='地址' v-if="editRow.type === '外链'">
|
||||||
<Input v-model="editRow.component" placeholder="请输入网址" />
|
<Input v-model="editRow.component" placeholder="请输入网址" />
|
||||||
</fieldItem>
|
</fieldItem>
|
||||||
|
|
||||||
@@ -266,16 +266,18 @@ export default {
|
|||||||
async initCol() {
|
async initCol() {
|
||||||
let res = await menuServer.modelAll()
|
let res = await menuServer.modelAll()
|
||||||
|
|
||||||
let data = res.data.map((row) => {
|
if ( res.data && typeof res.data === 'array') {
|
||||||
let { id, key, name } = row
|
let data = res.data.map((row) => {
|
||||||
let value = key
|
let { id, key, name } = row
|
||||||
if (name) {
|
let value = key
|
||||||
value = value + '-' + name
|
if (name) {
|
||||||
}
|
value = value + '-' + name
|
||||||
|
}
|
||||||
|
|
||||||
return { id, value, key }
|
return { id, value, key }
|
||||||
})
|
})
|
||||||
this.modelRows = [{ id: 0, value: '自定义模板', key: 'custom_template' }, ...data] || []
|
this.modelRows = [{ id: 0, value: '自定义模板', key: 'custom_template' }, ...data] || []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
calculate() {
|
calculate() {
|
||||||
@@ -400,6 +402,17 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style scoped>
|
||||||
|
.content-view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-body {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user