123
This commit is contained in:
19
cdTMP/src/views/datamanage/abbreviation/columnsOptions.ts
Normal file
19
cdTMP/src/views/datamanage/abbreviation/columnsOptions.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
export const columnsOptions = [
|
||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||
{
|
||||
title: "缩略语",
|
||||
align: "center",
|
||||
width: 200,
|
||||
dataIndex: "title",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "缩略语必填" }]
|
||||
},
|
||||
{
|
||||
title: "全称",
|
||||
align: "center",
|
||||
dataIndex: "des",
|
||||
search: true,
|
||||
ellipsis: true,
|
||||
commonRules: [{ required: true, message: "全称和描述必填" }]
|
||||
}
|
||||
]
|
||||
@@ -10,6 +10,7 @@
|
||||
<script lang="jsx" setup>
|
||||
import { ref } from "vue"
|
||||
import abbreviationApi from "@/api/system/abbreviation"
|
||||
import { columnsOptions } from "./columnsOptions.ts"
|
||||
|
||||
const crudRef = ref()
|
||||
const crudOptions = ref({
|
||||
@@ -29,25 +30,7 @@ const crudOptions = ref({
|
||||
crudRef.value.tableRef.selectAll(false)
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||
{
|
||||
title: "缩略语",
|
||||
align: "center",
|
||||
width: 200,
|
||||
dataIndex: "title",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "缩略语必填" }]
|
||||
},
|
||||
{
|
||||
title: "全称",
|
||||
align: "center",
|
||||
dataIndex: "des",
|
||||
search: true,
|
||||
ellipsis: true,
|
||||
commonRules: [{ required: true, message: "全称和描述必填" }]
|
||||
}
|
||||
])
|
||||
const crudColumns = ref(columnsOptions)
|
||||
|
||||
defineOptions({
|
||||
name: "abbreviation"
|
||||
|
||||
@@ -14,7 +14,6 @@ export default function useCrudRef(currentRow: Ref<{ id: number | string; name:
|
||||
operationColumn: true,
|
||||
operationWidth: 160,
|
||||
operationColumnAlign: "center",
|
||||
showTools: false,
|
||||
beforeAdd: (form: any) => {
|
||||
form.id = currentRow.value?.id
|
||||
return true
|
||||
@@ -95,21 +94,22 @@ export default function useCrudRef(currentRow: Ref<{ id: number | string; name:
|
||||
dataIndex: "doc_name",
|
||||
align: "center",
|
||||
search: false,
|
||||
placeholder: "如果不是标准则不填"
|
||||
placeholder: "不是标准则不填"
|
||||
},
|
||||
{
|
||||
title: "发布日期",
|
||||
dataIndex: "publish_date",
|
||||
align: "center",
|
||||
search: false,
|
||||
placeholder: "如果不是标准则不填"
|
||||
placeholder: "不是标准则不填,该文档发布日期",
|
||||
formType: "date"
|
||||
},
|
||||
{
|
||||
title: "标准来源",
|
||||
dataIndex: "source",
|
||||
align: "center",
|
||||
search: false,
|
||||
placeholder: "如果不是标准则不填"
|
||||
placeholder: "不是标准则不填,文档发布机构"
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ export default function useDictCrud() {
|
||||
searchColNumber: 4,
|
||||
tablePagination: false,
|
||||
operationColumn: true,
|
||||
showTools: false,
|
||||
afterDelete() {
|
||||
crudRef.value.tableRef.selectAll(false)
|
||||
}
|
||||
|
||||
34
cdTMP/src/views/datamanage/projContact/crudColumns.ts
Normal file
34
cdTMP/src/views/datamanage/projContact/crudColumns.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
export const columnsOptions = [
|
||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||
{ title: "公司编号", align: "center", dataIndex: "key", search: true, width: 70, formType: "input-number" },
|
||||
{
|
||||
title: "名称",
|
||||
align: "center",
|
||||
dataIndex: "name",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "名称必填" }]
|
||||
},
|
||||
{
|
||||
title: "简称",
|
||||
align: "center",
|
||||
dataIndex: "refer_name",
|
||||
width: 200,
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "简称必填" }]
|
||||
},
|
||||
{
|
||||
title: "法人",
|
||||
align: "center",
|
||||
dataIndex: "entrust_person",
|
||||
search: true,
|
||||
width: 90,
|
||||
commonRules: [{ required: true, message: "法人必填" }]
|
||||
},
|
||||
{
|
||||
title: "地址",
|
||||
align: "center",
|
||||
dataIndex: "addr",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "公司地址必填" }]
|
||||
}
|
||||
]
|
||||
@@ -10,6 +10,7 @@
|
||||
<script setup>
|
||||
import { ref } from "vue"
|
||||
import contactApi from "@/api/system/contact"
|
||||
import { columnsOptions } from "./crudColumns"
|
||||
|
||||
const crudRef = ref()
|
||||
const crudOptions = ref({
|
||||
@@ -25,45 +26,11 @@ const crudOptions = ref({
|
||||
searchColNumber: 3,
|
||||
tablePagination: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
showTools: false,
|
||||
afterDelete() {
|
||||
crudRef.value.tableRef.selectAll(false)
|
||||
}
|
||||
})
|
||||
const crudColumns = ref([
|
||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||
{ title: "公司编号", align: "center", dataIndex: "key", search: true, width: 70, formType: "input-number" },
|
||||
{
|
||||
title: "名称",
|
||||
align: "center",
|
||||
dataIndex: "name",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "名称必填" }]
|
||||
},
|
||||
{
|
||||
title: "简称",
|
||||
align: "center",
|
||||
dataIndex: "refer_name",
|
||||
width: 200,
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "简称必填" }]
|
||||
},
|
||||
{
|
||||
title: "法人",
|
||||
align: "center",
|
||||
dataIndex: "entrust_person",
|
||||
search: true,
|
||||
width: 90,
|
||||
commonRules: [{ required: true, message: "法人必填" }]
|
||||
},
|
||||
{
|
||||
title: "地址",
|
||||
align: "center",
|
||||
dataIndex: "addr",
|
||||
search: true,
|
||||
commonRules: [{ required: true, message: "公司地址必填" }]
|
||||
}
|
||||
])
|
||||
const crudColumns = ref(columnsOptions)
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user