编码配置
parent
e2d1e04b38
commit
1556a7d608
|
|
@ -6,10 +6,10 @@ import SnConfigForm from '@/pages/sys/sn-config/SnConfigForm.vue'
|
||||||
import Strings from '@/common/utils/strings.ts'
|
import Strings from '@/common/utils/strings.ts'
|
||||||
import { elIcons } from '@/common/element/element.ts'
|
import { elIcons } from '@/common/element/element.ts'
|
||||||
|
|
||||||
const snConfigForm = ref<InstanceType<typeof SnConfigForm> | null>(null)
|
const snConfigFormIns = useTemplateRef<InstanceType<typeof SnConfigForm>>('snConfigForm')
|
||||||
|
|
||||||
function addHandler() {
|
function addHandler() {
|
||||||
snConfigForm.value?.open()
|
snConfigFormIns.value?.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
function reset() {
|
function reset() {
|
||||||
|
|
@ -45,7 +45,7 @@ function searchHandler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function modify(record: SnConfigTypes.SnConfigDetail) {
|
function modify(record: SnConfigTypes.SnConfigDetail) {
|
||||||
snConfigForm.value?.open(record)
|
snConfigFormIns.value?.open(record)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -78,7 +78,6 @@ onMounted(() => {
|
||||||
</ElFormItem>
|
</ElFormItem>
|
||||||
</ElForm>
|
</ElForm>
|
||||||
<div class="tool-bar">
|
<div class="tool-bar">
|
||||||
|
|
||||||
<ElButton :icon="elIcons.Plus" type="primary" @click="addHandler">新建</ElButton>
|
<ElButton :icon="elIcons.Plus" type="primary" @click="addHandler">新建</ElButton>
|
||||||
</div>
|
</div>
|
||||||
<ElTable
|
<ElTable
|
||||||
|
|
@ -88,20 +87,18 @@ onMounted(() => {
|
||||||
empty-text="暂无数据"
|
empty-text="暂无数据"
|
||||||
header-row-class-name="table-header"
|
header-row-class-name="table-header"
|
||||||
row-key="id">
|
row-key="id">
|
||||||
<ElTableColumn label="规则名称" prop="snname" width="140"/>
|
<ElTableColumn label="规则名称" prop="snname" width="180"/>
|
||||||
<ElTableColumn label="规则代码" prop="sncode" width="140"/>
|
<ElTableColumn label="规则代码" prop="sncode" width="170"/>
|
||||||
<ElTableColumn label="示例" prop="example" width="140"/>
|
<ElTableColumn label="示例" prop="example" width="200"/>
|
||||||
<ElTableColumn label="配置信息" prop="configDesc">
|
<ElTableColumn label="配置信息" prop="configDesc">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>
|
<span v-if="Strings.isBlank(scope.row.configDesc)"/>
|
||||||
{{ Strings.isBlank(scope.row.configDesc) ? '' : scope.row.configDesc.split('\n') }}
|
<template v-else>
|
||||||
</span>
|
<div v-for="(item,i) in scope.row.configDesc.split('\n')" :key="scope.row.id+i">{{ item }}</div>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
<ElTableColumn label="备注" prop="memo" width="140"/>
|
<ElTableColumn label="备注" prop="memo" width="200"/>
|
||||||
<ElTableColumn label="备注" prop="memo" width="140"/>
|
|
||||||
<ElTableColumn label="" prop=""/>
|
|
||||||
|
|
||||||
<ElTableColumn label="操作" width="180">
|
<ElTableColumn label="操作" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<ElPopconfirm
|
<ElPopconfirm
|
||||||
|
|
@ -117,10 +114,9 @@ onMounted(() => {
|
||||||
<ElButton text type="danger">删除</ElButton>
|
<ElButton text type="danger">删除</ElButton>
|
||||||
</template>
|
</template>
|
||||||
</ElPopconfirm>
|
</ElPopconfirm>
|
||||||
<ElButton text type="primary" @click="modify(scope)">修改</ElButton>
|
<ElButton text type="primary" @click="modify(scope.row)">修改</ElButton>
|
||||||
</template>
|
</template>
|
||||||
</ElTableColumn>
|
</ElTableColumn>
|
||||||
|
|
||||||
</ElTable>
|
</ElTable>
|
||||||
<ElPagination
|
<ElPagination
|
||||||
v-model:current-page="searchForm.current"
|
v-model:current-page="searchForm.current"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue