Merge branch 'develop' of https://gitee.com/likeadmin/likeadmin_java into develop

This commit is contained in:
TinyAnts 2022-08-16 18:58:59 +08:00
commit c3c869002e
5 changed files with 15 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<template v-for="(item, index) in options"> <template v-for="(item, index) in getOptions" :key="index">
<span v-if="values.includes(item.value)" :key="index">{{ item.name }}</span> <span>{{ index != 0 ? '、' : '' }}{{ item.name }}</span>
</template> </template>
</div> </div>
</template> </template>
@ -13,9 +13,13 @@ const props = defineProps<{
const values = computed(() => { const values = computed(() => {
if (props.value !== null && typeof props.value !== 'undefined') { if (props.value !== null && typeof props.value !== 'undefined') {
return Array.isArray(props.value) ? props.value : [String(props.value)] return Array.isArray(props.value) ? props.value : String(props.value).split(',')
} else { } else {
return [] return []
} }
}) })
const getOptions = computed(() => {
return props.options.filter((item) => values.value.includes(item.value))
})
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="logo"> <div class="logo">
<ImageContain :width="szie" :height="szie" :src="config.webLogo" /> <image-contain :width="szie" :height="szie" :src="config.webLogo" />
<transition name="title-width"> <transition name="title-width">
<div <div
v-show="showTitle" v-show="showTitle"

View File

@ -20,7 +20,7 @@
:data="treeList" :data="treeList"
clearable clearable
node-key="${table.treePrimary}" node-key="${table.treePrimary}"
:props="{label: ${table.treeName}, value: ${table.treePrimary}, children: 'children'}" :props="{ label: '${table.treeName}', value: '${table.treePrimary}', children: 'children' }"
:default-expand-all="true" :default-expand-all="true"
placeholder="请选择${column.columnComment}" placeholder="请选择${column.columnComment}"
check-strictly check-strictly
@ -73,6 +73,7 @@
#else #else
:value="item.value" :value="item.value"
#end #end
clearable
:disabled="!item.status" :disabled="!item.status"
/> />
#else #else
@ -104,7 +105,7 @@
#elseif($column.htmlType=="datetime") #elseif($column.htmlType=="datetime")
<el-form-item label="${column.columnComment}" prop="${column.javaField}"> <el-form-item label="${column.columnComment}" prop="${column.javaField}">
<el-date-picker <el-date-picker
v-model="form.${column.javaField}" v-model="formData.${column.javaField}"
type="date" type="date"
clearable clearable
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
@ -128,7 +129,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
import { #if($table.treePrimary && $table.treeParent)${moduleName}Lists,#end ${moduleName}Edit,${moduleName}Add, ${moduleName}Detail } from '@/api/${moduleName}' import { #if($table.treePrimary && $table.treeParent)${moduleName}Lists,#end ${moduleName}Edit, ${moduleName}Add, ${moduleName}Detail } from '@/api/${moduleName}'
import Popup from '@/components/popup/index.vue' import Popup from '@/components/popup/index.vue'
import feedback from '@/utils/feedback' import feedback from '@/utils/feedback'
import type { PropType } from 'vue' import type { PropType } from 'vue'

View File

@ -179,7 +179,6 @@ const { dictData } = useDictData<{
}>([#foreach ($dict in $dictFields)'${dict}'#if($dictFields[$dictSize] != ${dict}),#end#end]) }>([#foreach ($dict in $dictFields)'${dict}'#if($dictFields[$dictSize] != ${dict}),#end#end])
#end #end
const handleAdd = async (${table.treePrimary}?: number) => { const handleAdd = async (${table.treePrimary}?: number) => {
showEdit.value = true showEdit.value = true
await nextTick() await nextTick()

View File

@ -64,7 +64,8 @@
删除 删除
</el-button> </el-button>
</div> </div>
<el-table class="mt-4" <el-table
class="mt-4"
size="large" size="large"
v-loading="pager.loading" v-loading="pager.loading"
:data="pager.lists" :data="pager.lists"
@ -172,7 +173,7 @@ const { dictData } = useDictData<{
const selectData = ref<any[]>([]) const selectData = ref<any[]>([])
const handleSelectionChange = (selection: any[]) => { const handleSelectionChange = (selection: any[]) => {
selectData.value = selection.map(item => item.${primaryKey}) selectData.value = selection.map((item) => item.${primaryKey})
} }
const handleAdd = async () => { const handleAdd = async () => {