123
This commit is contained in:
@@ -105,4 +105,7 @@ defineOptions({
|
||||
.top-box {
|
||||
font-size: 2rem;
|
||||
}
|
||||
:deep(.arco-form-item) {
|
||||
margin-bottom: 20px; /* 覆盖默认样式 */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -51,7 +51,6 @@ const crudOptions = reactive({
|
||||
// 是否显示操作列
|
||||
operationColumn: true,
|
||||
operationWidth: 200,
|
||||
showTools: false,
|
||||
// 设置列表数据API
|
||||
api: userApi.getPageList,
|
||||
// 设置新增接口-show为true则显示按钮
|
||||
|
||||
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>
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
<img src="@/assets/img/wxwx-logo.svg" width="45" /><span>{{ $title }}</span>
|
||||
</div>
|
||||
<div class="slogan flex justify-end">
|
||||
<span class="font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-purple-600">---- 为测评服务,打造测评高地</span>
|
||||
<span
|
||||
class="font-extrabold bg-clip-text text-transparent bg-gradient-to-r from-blue-500 to-purple-600"
|
||||
>---- 为测评服务,打造测评高地</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -228,4 +231,8 @@ const handleSubmit = async ({ values, errors }) => {
|
||||
background: #f3ce2b;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.arco-form-item) {
|
||||
margin-bottom: 20px; /* 覆盖默认样式 */
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -53,7 +53,6 @@ const crudOptions = ref({
|
||||
api: logApi.getLoginLogs,
|
||||
edit: { api: editClick, text: "查看操作日志信息", show: false },
|
||||
showIndex: false,
|
||||
showTools: false,
|
||||
pageLayout: "fixed",
|
||||
tablePagination: false,
|
||||
operationColumn: true,
|
||||
|
||||
@@ -29,7 +29,6 @@ const crudOptions = reactive({
|
||||
api: operationApi.getOperationsLogs,
|
||||
showIndex: false,
|
||||
pageLayout: "fixed",
|
||||
showTools: false,
|
||||
tablePagination: false,
|
||||
bordered: { wrapper: true, cell: true },
|
||||
afterDelete(response) {
|
||||
|
||||
@@ -53,7 +53,6 @@ const crudOptions = ref({
|
||||
api: logApi.getOperations,
|
||||
edit: { api: editClick, text: "查看操作日志信息", show: false },
|
||||
showIndex: false,
|
||||
showTools: false,
|
||||
pageLayout: "fixed",
|
||||
tablePagination: false,
|
||||
operationColumn: true,
|
||||
|
||||
@@ -137,7 +137,6 @@ const crudOptions = ref({
|
||||
projectId: route.query.id,
|
||||
key: route.query.key
|
||||
},
|
||||
showTools: false, // 不显示工具栏
|
||||
operationColumn: true,
|
||||
operationColumnAlign: "center", // 操作列居中
|
||||
isDbClickEdit: false, // 双击不编辑当前列
|
||||
|
||||
@@ -124,7 +124,6 @@ const crudOptions = ref({
|
||||
return tableData
|
||||
},
|
||||
showIndex: false,
|
||||
showTools: false,
|
||||
operationColumnAlign: "center",
|
||||
rowSelection: { showCheckedAll: true },
|
||||
searchColNumber: 3,
|
||||
|
||||
@@ -48,7 +48,6 @@ export default function (crudRef: Ref<InstanceType<typeof MaCrud>>) {
|
||||
add: { show: true, api: testDemandApi.save, text: "新增测试项" },
|
||||
edit: { show: true, api: testDemandApi.update, text: "修改测试项" },
|
||||
delete: { show: true, api: testDemandApi.delete },
|
||||
showTools: false,
|
||||
beforeOpenAdd: function () {
|
||||
// 1.新增则将form的content数据变为undifined以便判断
|
||||
beforeFormContent = undefined
|
||||
|
||||
@@ -68,7 +68,6 @@ export default function (crudRef: Ref<InstanceType<typeof MaCrud>>) {
|
||||
formOption: {
|
||||
width: 1200
|
||||
},
|
||||
showTools: false
|
||||
})
|
||||
return crudOptions
|
||||
}
|
||||
|
||||
@@ -54,7 +54,6 @@ export default function (crudRef: Ref<InstanceType<typeof MaCrud>>) {
|
||||
},
|
||||
operationWidth: 500,
|
||||
showIndex: false,
|
||||
showTools: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
searchColNumber: 3,
|
||||
tablePagination: false,
|
||||
|
||||
@@ -106,7 +106,6 @@ export default function (crudRef: Ref<InstanceType<typeof MaCrud>>) {
|
||||
testDemand: testDemandNumber
|
||||
},
|
||||
showIndex: false,
|
||||
showTools: false,
|
||||
rowSelection: { showCheckedAll: true },
|
||||
searchColNumber: 3,
|
||||
tablePagination: false,
|
||||
|
||||
@@ -98,7 +98,6 @@ const useCrudOption = () => {
|
||||
afterDelete(response: any) {
|
||||
crudRef.value.tableRef.selectAll(false)
|
||||
},
|
||||
showTools: false,
|
||||
operationColumn: true,
|
||||
operationColumnWidth: 180,
|
||||
operationColumnAlign: "center",
|
||||
|
||||
@@ -2,6 +2,7 @@ import { ref } from "vue"
|
||||
import { validateBlank, validateWindowFileNameInput } from "@/utils/extensions/arcoValidator"
|
||||
import textInfo from "@/config/textInfo"
|
||||
import projectApi from "@/api/testmanage/project"
|
||||
import dictApi from "@/api/system/dict"
|
||||
|
||||
const useCrudInit = function () {
|
||||
const crudRef = ref()
|
||||
@@ -16,7 +17,6 @@ const useCrudInit = function () {
|
||||
operationColumn: true,
|
||||
operationWidth: 500,
|
||||
showIndex: false,
|
||||
showTools: false,
|
||||
operationColumnWidth: 280, // 操作列宽度
|
||||
operationColumnAlign: "center", // 操作列对齐方式
|
||||
afterDelete(response: any) {
|
||||
@@ -225,6 +225,14 @@ const useCrudInit = function () {
|
||||
hide: true,
|
||||
search: false,
|
||||
formType: "select",
|
||||
allowCreate: true,
|
||||
createInfo: {
|
||||
title: "运行环境"
|
||||
},
|
||||
onCreate: async (value: any) => {
|
||||
await dictApi.createDictItemFast({ code: "runtime", title: value })
|
||||
return "runtime"
|
||||
},
|
||||
dict: { name: "runtime", props: { label: "title", value: "key" } }
|
||||
},
|
||||
{
|
||||
@@ -233,6 +241,8 @@ const useCrudInit = function () {
|
||||
hide: true,
|
||||
search: true,
|
||||
formType: "select",
|
||||
// 多选最大标签数量
|
||||
maxTagCount: 7,
|
||||
multiple: true,
|
||||
dict: { url: "system/user/list", props: { label: "name", value: "name" }, translation: true },
|
||||
commonRules: [{ required: true, message: "成员至少选择一个" }]
|
||||
@@ -261,12 +271,24 @@ const useCrudInit = function () {
|
||||
search: false,
|
||||
formType: "select",
|
||||
allowCreate: true,
|
||||
createInfo: {
|
||||
title: "开发环境"
|
||||
},
|
||||
onCreate: async (value: any) => {
|
||||
await dictApi.createDictItemFast({ code: "devplant", title: value })
|
||||
return "devplant"
|
||||
},
|
||||
dict: { name: "devplant", props: { label: "title", value: "key" } }
|
||||
},
|
||||
{
|
||||
title: "缩略语",
|
||||
dataIndex: "abbreviation",
|
||||
hide: true,
|
||||
// 快速新增缩略语内容
|
||||
allowAbbrNew: true,
|
||||
abbrNewInfo: {
|
||||
title: "新增缩略语"
|
||||
},
|
||||
search: false,
|
||||
formType: "select",
|
||||
multiple: true,
|
||||
@@ -339,6 +361,7 @@ const useCrudInit = function () {
|
||||
title: "编程语言",
|
||||
dataIndex: "language",
|
||||
addDefaultValue: ["1"],
|
||||
maxTagCount: 4,
|
||||
commonRules: [{ required: true, message: "请至少选择一个" }],
|
||||
hide: true,
|
||||
formType: "select",
|
||||
@@ -349,16 +372,27 @@ const useCrudInit = function () {
|
||||
title: "依据标准",
|
||||
dataIndex: "standard",
|
||||
addDefaultValue: ["1", "2", "3", "4", "9"],
|
||||
maxTagCount: 20,
|
||||
commonRules: [{ required: true, message: "请至少选择一个" }],
|
||||
hide: true,
|
||||
multiple: true,
|
||||
formType: "select",
|
||||
dict: { name: "standard", props: { label: "title", value: "key" } }
|
||||
dict: { name: "standard", props: { label: "title", value: "key" } },
|
||||
// 新增select选项
|
||||
allowStd: true,
|
||||
stdInfo: {
|
||||
title: "新增标准"
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
dataIndex: "entrust_unit",
|
||||
hide: true,
|
||||
// 快速新增单位内容
|
||||
allowNew: true,
|
||||
newInfo: {
|
||||
title: "新增单位信息"
|
||||
},
|
||||
commonRules: [{ required: true, message: "单位必选" }],
|
||||
formType: "select",
|
||||
dict: { url: "system/contact/index", props: { label: "name", value: "name" }, translation: true }
|
||||
@@ -393,6 +427,11 @@ const useCrudInit = function () {
|
||||
{
|
||||
title: "单位",
|
||||
dataIndex: "dev_unit",
|
||||
// 快速新增单位内容
|
||||
allowNew: true,
|
||||
newInfo: {
|
||||
title: "新增单位信息"
|
||||
},
|
||||
hide: true,
|
||||
commonRules: [{ required: true, message: "单位必选" }],
|
||||
formType: "select",
|
||||
@@ -429,6 +468,11 @@ const useCrudInit = function () {
|
||||
title: "单位",
|
||||
dataIndex: "test_unit",
|
||||
hide: true,
|
||||
// 快速新增单位内容
|
||||
allowNew: true,
|
||||
newInfo: {
|
||||
title: "新增单位信息"
|
||||
},
|
||||
addDefaultValue: textInfo.testUnitAddDefaultText,
|
||||
commonRules: [{ required: true, message: "单位必选" }],
|
||||
formType: "select",
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="jsx" setup>
|
||||
<script setup lang="jsx">
|
||||
import { ref } from "vue"
|
||||
import { useRouter } from "vue-router"
|
||||
import preview from "./cpns/preview.vue"
|
||||
|
||||
Reference in New Issue
Block a user