(create)新增项目所属文档片段crud
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { request } from "@/api/request"
|
import { request } from "@/api/request"
|
||||||
import { IFragSearchCondition } from "./types/fragmentTypes"
|
import { IFragSearchCondition, IFragUpdateObject } from "./types/fragmentTypes"
|
||||||
export class FragApi {
|
export class FragApi {
|
||||||
/**
|
/**
|
||||||
* 根据参数获取文档片段
|
* 根据参数获取文档片段
|
||||||
@@ -12,4 +12,26 @@ export class FragApi {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据fragment的对象更新数据库
|
||||||
|
* @returns 是否更新成功
|
||||||
|
*/
|
||||||
|
static update(id: any, data: IFragUpdateObject) {
|
||||||
|
return request({
|
||||||
|
url: "system/userField/update/" + id,
|
||||||
|
method: "put",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据id删除fragment
|
||||||
|
* @returns 返回被删除的id或错误消息
|
||||||
|
*/
|
||||||
|
static delete(data) {
|
||||||
|
return request({
|
||||||
|
url: "system/userField/delete",
|
||||||
|
method: "delete",
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,13 @@ export enum FragBelongDoc {
|
|||||||
export interface IFragSearchCondition {
|
export interface IFragSearchCondition {
|
||||||
belongDocName?: FragBelongDoc
|
belongDocName?: FragBelongDoc
|
||||||
name?: string
|
name?: string
|
||||||
isMain?: boolean
|
is_main?: boolean
|
||||||
projectId?: number
|
projectId?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接口:更新文档片段的对象
|
||||||
|
*/
|
||||||
|
export interface IFragUpdateObject extends IFragSearchCondition {
|
||||||
|
field_seq?: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
export enum ProductFileEnum {
|
export enum ProductFileEnum {
|
||||||
dg = "大纲",
|
dg = "测评大纲",
|
||||||
sm = "说明",
|
sm = "测试说明",
|
||||||
jl = "记录",
|
jl = "测试记录",
|
||||||
hsm = "回归说明",
|
hsm = "回归说明",
|
||||||
hjl = "回归记录",
|
hjl = "回归记录",
|
||||||
bg = "报告",
|
bg = "测评报告",
|
||||||
wtd = "问题单"
|
wtd = "问题单"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export interface IDictData<T> {
|
export interface IDictData<T> {
|
||||||
label: string
|
label: T
|
||||||
value: T
|
value: number
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,9 @@ const crudOptions = reactive({
|
|||||||
rowSelection: {
|
rowSelection: {
|
||||||
showCheckedAll: true
|
showCheckedAll: true
|
||||||
},
|
},
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
// 是否显示操作列
|
// 是否显示操作列
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
operationWidth: 200,
|
operationWidth: 200,
|
||||||
|
|||||||
@@ -25,7 +25,10 @@ const crudOptions = ref({
|
|||||||
showIndex: false,
|
showIndex: false,
|
||||||
searchColNumber: 3,
|
searchColNumber: 3,
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
rowSelection: { showCheckedAll: true }
|
rowSelection: { showCheckedAll: true },
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const crudColumns = ref([
|
const crudColumns = ref([
|
||||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||||
|
|||||||
@@ -99,7 +99,10 @@ const crudOptions = ref({
|
|||||||
},
|
},
|
||||||
add: { show: true, api: dictApi.saveDictItem },
|
add: { show: true, api: dictApi.saveDictItem },
|
||||||
edit: { show: true, api: dictApi.updateDictItemData },
|
edit: { show: true, api: dictApi.updateDictItemData },
|
||||||
delete: { show: true, api: dictApi.realDeleteItem }
|
delete: { show: true, api: dictApi.realDeleteItem },
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// crudColumns
|
// crudColumns
|
||||||
|
|||||||
@@ -61,7 +61,10 @@ const crudOptions = ref({
|
|||||||
searchColNumber: 4,
|
searchColNumber: 4,
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
showTools: false
|
showTools: false,
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const crudColumns = ref([
|
const crudColumns = ref([
|
||||||
|
|||||||
@@ -26,7 +26,10 @@ const crudOptions = ref({
|
|||||||
searchColNumber: 3,
|
searchColNumber: 3,
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
rowSelection: { showCheckedAll: true },
|
rowSelection: { showCheckedAll: true },
|
||||||
showTools: false
|
showTools: false,
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const crudColumns = ref([
|
const crudColumns = ref([
|
||||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||||
|
|||||||
@@ -125,6 +125,9 @@ const crudOptions = ref({
|
|||||||
showTools: false, // 不显示工具栏
|
showTools: false, // 不显示工具栏
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
operationColumnAlign: "center", // 操作列居中
|
operationColumnAlign: "center", // 操作列居中
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
isDbClickEdit: false, // 双击不编辑当前列
|
isDbClickEdit: false, // 双击不编辑当前列
|
||||||
contextMenu: {
|
contextMenu: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ const crudOptions = ref({
|
|||||||
testDemand: testDemandNumber,
|
testDemand: testDemandNumber,
|
||||||
case: caseNumber
|
case: caseNumber
|
||||||
},
|
},
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
showIndex: false,
|
showIndex: false,
|
||||||
showTools: false,
|
showTools: false,
|
||||||
operationColumnAlign: "center",
|
operationColumnAlign: "center",
|
||||||
|
|||||||
@@ -153,6 +153,9 @@ const crudOptions = ref({
|
|||||||
add: { show: true, api: testDemandApi.save, text: "新增测试项" },
|
add: { show: true, api: testDemandApi.save, text: "新增测试项" },
|
||||||
edit: { show: true, api: testDemandApi.update, text: "修改测试项" },
|
edit: { show: true, api: testDemandApi.update, text: "修改测试项" },
|
||||||
delete: { show: true, api: testDemandApi.delete },
|
delete: { show: true, api: testDemandApi.delete },
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
showTools: false,
|
showTools: false,
|
||||||
beforeOpenAdd: function () {
|
beforeOpenAdd: function () {
|
||||||
let key_split = route.query.key.split("-")
|
let key_split = route.query.key.split("-")
|
||||||
@@ -198,7 +201,7 @@ const crudOptions = ref({
|
|||||||
searchColNumber: 3,
|
searchColNumber: 3,
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
operationColumnAlign:'center',
|
operationColumnAlign: "center",
|
||||||
formOption: {
|
formOption: {
|
||||||
width: 1200
|
width: 1200
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ const crudOptions = ref({
|
|||||||
add: { show: true, api: designDemandApi.save, text: "新增设计需求" },
|
add: { show: true, api: designDemandApi.save, text: "新增设计需求" },
|
||||||
edit: { show: true, api: designDemandApi.editDesignDemand, text: "编辑设计需求" },
|
edit: { show: true, api: designDemandApi.editDesignDemand, text: "编辑设计需求" },
|
||||||
delete: { show: true, api: designDemandApi.delete },
|
delete: { show: true, api: designDemandApi.delete },
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
// 处理添加后函数
|
// 处理添加后函数
|
||||||
beforeOpenAdd: function () {
|
beforeOpenAdd: function () {
|
||||||
let key_split = route.query.key.split("-")
|
let key_split = route.query.key.split("-")
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ let beiceType = [
|
|||||||
const crudOptions = ref({
|
const crudOptions = ref({
|
||||||
api: dutApi.getDutList,
|
api: dutApi.getDutList,
|
||||||
add: { show: true, api: dutApi.save, text: "新增被测件" },
|
add: { show: true, api: dutApi.save, text: "新增被测件" },
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
// 处理添加后函数
|
// 处理添加后函数
|
||||||
beforeOpenAdd: function () {
|
beforeOpenAdd: function () {
|
||||||
let round_str = parseInt(route.query.key) + 1
|
let round_str = parseInt(route.query.key) + 1
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ const crudOptions = ref({
|
|||||||
delete: { show: true, api: caseApi.delete },
|
delete: { show: true, api: caseApi.delete },
|
||||||
operationColumnAlign: "center",
|
operationColumnAlign: "center",
|
||||||
isDbClickEdit: false, // 关闭双击编辑
|
isDbClickEdit: false, // 关闭双击编辑
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
// 处理新增删除后树状图显示
|
// 处理新增删除后树状图显示
|
||||||
beforeOpenAdd: function () {
|
beforeOpenAdd: function () {
|
||||||
let key_split = route.query.key.split("-")
|
let key_split = route.query.key.split("-")
|
||||||
|
|||||||
43
cdTMP/src/views/testmanage/components/PageHeader/index.vue
Normal file
43
cdTMP/src/views/testmanage/components/PageHeader/index.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<a-page-header
|
||||||
|
@back="handleBackClick"
|
||||||
|
:style="{ background: 'var(--color-bg-2)' }"
|
||||||
|
:title="props.data.title"
|
||||||
|
v-if="isBlankObj(props.data)"
|
||||||
|
>
|
||||||
|
<template #subtitle>
|
||||||
|
<a-space>
|
||||||
|
<span>{{ props.data.name }}</span>
|
||||||
|
<span class="text-base ml-3 text-red-950" v-if="!props.data.step">所属文档片段</span>
|
||||||
|
<a-tag color="red" size="small" v-else>{{ props.data.step }}</a-tag>
|
||||||
|
</a-space>
|
||||||
|
</template>
|
||||||
|
</a-page-header>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { PropType } from "vue"
|
||||||
|
import { useRouter } from "vue-router"
|
||||||
|
import type { IPageHeaderProps } from "./types"
|
||||||
|
// 组件属性
|
||||||
|
const props = defineProps({
|
||||||
|
data: {
|
||||||
|
type: Object as PropType<IPageHeaderProps>,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const isBlankObj = (data: IPageHeaderProps) => {
|
||||||
|
return Object.keys(data).length > 0
|
||||||
|
}
|
||||||
|
const router = useRouter()
|
||||||
|
// 返回上个页面
|
||||||
|
const handleBackClick = () => {
|
||||||
|
router.go(-1)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
:deep(.arco-page-header-main) {
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface IPageHeaderProps {
|
||||||
|
title?: string
|
||||||
|
name?: string
|
||||||
|
step?: string // 可能出现项目状态
|
||||||
|
}
|
||||||
@@ -1,25 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="ma-content-block rounded-sm flex-col justify-between w-full p-3 bg-color">
|
<div class="ma-content-block rounded-sm flex-col justify-between w-full p-3 bg-color">
|
||||||
<a-page-header
|
<page-header :data="headerData"></page-header>
|
||||||
@back="handleBackClick"
|
|
||||||
:style="{ background: 'var(--color-bg-2)' }"
|
|
||||||
:title="props.pInfo.ident"
|
|
||||||
>
|
|
||||||
<template #subtitle>
|
|
||||||
<a-space>
|
|
||||||
<span>{{ props.pInfo.name }}</span>
|
|
||||||
<a-tag color="red" size="small">{{ props.pInfo.step }}</a-tag>
|
|
||||||
</a-space>
|
|
||||||
</template>
|
|
||||||
</a-page-header>
|
|
||||||
<div class="title">基本信息</div>
|
<div class="title">基本信息</div>
|
||||||
<div class="item-container">
|
<div class="item-container">
|
||||||
<a-card
|
<a-card
|
||||||
class="item"
|
class="item"
|
||||||
v-for="(val, key) in pInfo.title_info"
|
v-for="(val, key) in pInfo.title_info"
|
||||||
:style="{ width: '360px' }"
|
:style="{ width: '360px' }"
|
||||||
:title="key"
|
:title="key.toString()"
|
||||||
:key="key"
|
:key="key"
|
||||||
hoverable
|
hoverable
|
||||||
>
|
>
|
||||||
@@ -35,21 +24,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import { useRoute, useRouter } from "vue-router"
|
import { computed, ComputedRef } from "vue"
|
||||||
const router = useRouter()
|
import type { IPageHeaderProps } from "../../components/PageHeader/types"
|
||||||
|
import PageHeader from "@/views/testmanage/components/PageHeader/index.vue"
|
||||||
// 1.头部-点击返回
|
// 定义props
|
||||||
const handleBackClick = () => {
|
|
||||||
router.go(-1)
|
|
||||||
}
|
|
||||||
// 2.定义props
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
pInfo: {
|
pInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
// 给头部组件的计算属性
|
||||||
|
const headerData: ComputedRef<IPageHeaderProps> = computed(() => {
|
||||||
|
return {
|
||||||
|
title: props.pInfo.ident as string,
|
||||||
|
name: props.pInfo.name as string,
|
||||||
|
step: props.pInfo.step
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|||||||
@@ -2,51 +2,100 @@
|
|||||||
<div class="proj-fragment-container">
|
<div class="proj-fragment-container">
|
||||||
<div class="ma-content-block lg:flex justify-between p-4">
|
<div class="ma-content-block lg:flex justify-between p-4">
|
||||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0" v-loading="isDataLoading">
|
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0" v-loading="isDataLoading">
|
||||||
<a-page-header @back="handleBackClick" :style="{ background: 'var(--color-bg-2)' }" :title="loadingData.ident">
|
<page-header :data="headerData"></page-header>
|
||||||
<template #subtitle>
|
<hr />
|
||||||
<a-space>
|
<ma-crud class="mt-3" :options="crudOptions" :columns="crudColumns" ref="crudRef">
|
||||||
<span>{{ loadingData.name }}</span>
|
<!-- 切换is_main -->
|
||||||
</a-space>
|
<template #is_main="{ record }">
|
||||||
<span class="text-base ml-3 text-red-950">所属文档片段</span>
|
<a-switch
|
||||||
|
v-model:model-value="record.is_main"
|
||||||
|
:before-change="beforeSwitchChange(record)"
|
||||||
|
></a-switch>
|
||||||
</template>
|
</template>
|
||||||
</a-page-header>
|
</ma-crud>
|
||||||
<hr/>
|
|
||||||
<ma-crud class="mt-3" :options="crudOptions" :columns="crudColumns" ref="crudRef"> </ma-crud>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="tsx">
|
||||||
import { ref } from "vue"
|
import { computed, ComputedRef, ref } from "vue"
|
||||||
import { useRoute, useRouter } from "vue-router"
|
import { useRoute } from "vue-router"
|
||||||
import { FragApi } from "@/api/system/fragment"
|
import PageHeader from "@/views/testmanage/components/PageHeader/index.vue"
|
||||||
import { ProductFileEnum } from "@/utils/enums/productTypes"
|
|
||||||
import { IDictData } from "@/utils/types/CommonType"
|
|
||||||
import useFetchData from "@/hooks/fetchData"
|
import useFetchData from "@/hooks/fetchData"
|
||||||
|
// apis
|
||||||
|
import { FragApi } from "@/api/system/fragment"
|
||||||
import projectApi from "@/api/testmanage/project"
|
import projectApi from "@/api/testmanage/project"
|
||||||
|
// types
|
||||||
|
import { ProductFileEnum } from "@/utils/enums/productTypes"
|
||||||
|
import type { IDictData } from "@/utils/types/CommonType"
|
||||||
|
import type { IPageHeaderProps } from "../components/PageHeader/types"
|
||||||
|
import type { IFragSearchCondition } from "@/api/system/types/fragmentTypes"
|
||||||
|
import { Message } from "@arco-design/web-vue"
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const router = useRouter()
|
const crudRef = ref()
|
||||||
const crudRef = ref(null)
|
|
||||||
// 产品文档类型写死7种
|
// 产品文档类型写死7种
|
||||||
const productFileType: IDictData<ProductFileEnum>[] = Object.keys(ProductFileEnum).map((it) => ({
|
const productFileType: IDictData<ProductFileEnum>[] = Object.keys(ProductFileEnum).map((it, index) => ({
|
||||||
label: ProductFileEnum[it],
|
label: ProductFileEnum[it],
|
||||||
value: it as ProductFileEnum
|
value: index + 1
|
||||||
}))
|
}))
|
||||||
// 返回项目管理
|
|
||||||
const handleBackClick = () => {
|
|
||||||
router.go(-1)
|
|
||||||
}
|
|
||||||
// hook-获取单个项目信息
|
// hook-获取单个项目信息
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
return projectApi.getProjectById(route.params.projectId)
|
return projectApi.getProjectById(route.params.projectId)
|
||||||
}
|
}
|
||||||
const { loadingData, isDataLoading } = useFetchData({}, fetchData)
|
const { loadingData, isDataLoading } = useFetchData({}, fetchData)
|
||||||
|
// 给头部组件的计算属性
|
||||||
|
const headerData: ComputedRef<IPageHeaderProps> = computed(() => {
|
||||||
|
return {
|
||||||
|
title: loadingData.value.ident as string,
|
||||||
|
name: loadingData.value.name as string
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 切换is_main
|
||||||
|
const beforeSwitchChange = (record: any) => {
|
||||||
|
return async function (newVal: boolean) {
|
||||||
|
await FragApi.update(record.id, {
|
||||||
|
is_main: newVal,
|
||||||
|
projectId: route.params.projectId as string
|
||||||
|
})
|
||||||
|
Message.success("设置成功")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ma-crud配置
|
// ma-crud配置
|
||||||
const crudOptions = ref<object>({
|
const crudOptions = ref<object>({
|
||||||
api: FragApi.getFragList,
|
api: FragApi.getFragList,
|
||||||
showTools: false
|
edit: { show: true, api: FragApi.update },
|
||||||
|
delete: { show: true, api: FragApi.delete },
|
||||||
|
beforeRequest: (params: IFragSearchCondition) => {
|
||||||
|
// 添加项目id参数
|
||||||
|
params.projectId = route.params.projectId as string
|
||||||
|
},
|
||||||
|
afterDelete(response: any) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
|
showTools: false,
|
||||||
|
operationColumn: true,
|
||||||
|
operationColumnWidth: 120,
|
||||||
|
operationColumnAlign: "center",
|
||||||
|
bordered: { wrapper: true, cell: true },
|
||||||
|
resizable: false, // 不允许调整列宽
|
||||||
|
rowSelection: { showCheckedAll: true, checkStrictly: true },
|
||||||
|
isDbClickEdit: false,
|
||||||
|
searchColNumber: 2,
|
||||||
|
formOption: {
|
||||||
|
isFull: true,
|
||||||
|
layout: [
|
||||||
|
{
|
||||||
|
formType: "grid",
|
||||||
|
cols: [
|
||||||
|
{ span: 12, formList: [{ dataIndex: "name" }] },
|
||||||
|
{ span: 12, formList: [{ dataIndex: "belong_doc" }] }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
})
|
})
|
||||||
const crudColumns = ref<any[]>([
|
const crudColumns = ref<any[]>([
|
||||||
{
|
{
|
||||||
@@ -75,7 +124,22 @@ const crudColumns = ref<any[]>([
|
|||||||
formType: "select",
|
formType: "select",
|
||||||
search: true,
|
search: true,
|
||||||
commonRules: [{ required: true, message: "所属文档必选" }],
|
commonRules: [{ required: true, message: "所属文档必选" }],
|
||||||
dict: { data: productFileType }
|
dict: { data: productFileType, translation: true }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "替换片段",
|
||||||
|
align: "center",
|
||||||
|
dataIndex: "is_main",
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "内容",
|
||||||
|
align: "center",
|
||||||
|
dataIndex: "content",
|
||||||
|
hide: true,
|
||||||
|
formType: "editor",
|
||||||
|
height: 550
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -365,6 +365,9 @@ const crudOptions = ref({
|
|||||||
showTools: false,
|
showTools: false,
|
||||||
operationColumnWidth: 280, // 操作列宽度
|
operationColumnWidth: 280, // 操作列宽度
|
||||||
operationColumnAlign: "center", // 操作列对齐方式
|
operationColumnAlign: "center", // 操作列对齐方式
|
||||||
|
afterDelete(response) {
|
||||||
|
crudRef.value.setSelecteds([])
|
||||||
|
},
|
||||||
// 处理弹窗的title
|
// 处理弹窗的title
|
||||||
beforeOpenAdd: function () {
|
beforeOpenAdd: function () {
|
||||||
crudRef.value.crudFormRef.actionTitle = "项目"
|
crudRef.value.crudFormRef.actionTitle = "项目"
|
||||||
|
|||||||
Reference in New Issue
Block a user