(修复)修复问题单无法显示null的问题

This commit is contained in:
2024-07-29 18:32:53 +08:00
parent 7aecdb2df6
commit 8773e5f927
16 changed files with 891 additions and 4432 deletions

View File

@@ -43,7 +43,10 @@ const appStore = useAppStore()
const props = defineProps({
modelValue: { type: String },
height: { type: Number, default: 200 },
id: { type: String, default: () => "tinymce" + new Date().getTime().toString() },
id: {
type: String,
default: () => "tinymce" + new Date().getTime().toString() + "-" + Math.random().toString(16).substring(2,10)
},
plugins: {
type: [String, Array],
default: "searchreplace visualchars code table nonbreaking lists autosave"
@@ -129,7 +132,7 @@ const initConfig = reactive({
skeletonScreen: true,
branding: false,
content_css: "/tinymce/skins/content/default/content.css",
selector: "#textarea1", // 下面自定义样式选中的区域为编辑区
// selector: "#textarea1", // 下面自定义样式选中的区域为编辑区
content_style: "body {line-height:1.5;font-size:14px;} p {margin:2px 0px;}", // 这里可以设置自定义样式
// paste_as_text: false, // 粘贴文字只能是纯文本
// 1.自定义粘贴过滤器函数args.content就是粘贴内容

View File

@@ -5,9 +5,10 @@
:custom-field="props.customField"
>
<slot :name="`form-${props.component.dataIndex}`" v-bind="props.component">
<!-- chen.xiugai-warning -->
<component
:is="getComponentName()"
v-model="value"
v-model.trim="value"
:size="props.component.size"
:allow-clear="props.component.allowClear ?? true"
:disabled="props.component.disabled"

View File

@@ -788,25 +788,29 @@ const soDutColumn = ref([
title: "空行",
dataIndex: "black_line",
formType: "input-number",
rules: [{ required: true, message: "空行数必填" }]
rules: [{ required: true, message: "空行数必填" }],
min: 0
},
{
title: "纯注释",
dataIndex: "comment_line",
formType: "input-number",
rules: [{ required: true, message: "纯注释数必填" }]
rules: [{ required: true, message: "纯注释数必填" }],
min: 0
},
{
title: "混合行",
dataIndex: "mix_line",
formType: "input-number",
rules: [{ required: true, message: "混合行必填" }]
rules: [{ required: true, message: "混合行必填" }],
min: 0
},
{
title: "纯代码",
dataIndex: "code_line",
formType: "input-number",
rules: [{ required: true, message: "纯代码行必填" }]
rules: [{ required: true, message: "纯代码行必填" }],
min: 0
}
])

View File

@@ -1,3 +1,6 @@
/**
* 文档片段所属的enum
*/
export enum ProductFileEnum {
dg = "测评大纲",
sm = "测试说明",

View File

@@ -0,0 +1,9 @@
/**
* 表单验证器验证输入trim空格后是否为空例如项目标识必须不能为空格
*/
export function validateBlank(value: string | undefined, callback: (error?: string) => void): void {
const val = value?.trim()
if (val === "") {
callback("注意标识不能为空格")
}
}

View File

@@ -1,3 +1,6 @@
/**
* 接口为MimeAdmin的dict远程数据设置的接口
*/
export interface IDictData<T> {
label: T
value: number

View File

@@ -365,7 +365,7 @@ const columns = ref([
title: "原因分析",
hide: true,
dataIndex: "analysis",
formType: "editor"
formType: "textarea"
},
{
title: "影响域分析",

View File

@@ -130,7 +130,7 @@ const columnsOptions = reactive([
{
title: "原因分析",
dataIndex: "analysis",
formType: "editor"
formType: "textarea"
},
{
title: "影响域分析",

View File

@@ -330,7 +330,7 @@ const crudColumns = ref([
hide: true,
align: "center",
dataIndex: "analysis",
formType: "editor"
formType: "textarea"
},
{
title: "影响域分析",

View File

@@ -168,7 +168,7 @@ const crudColumns = ref([
align: "center",
dataIndex: "ref",
search: true,
commonRules: [{ required: true, message: "用户标识或编号必填" }],
commonRules: [{ required: true, message: "用户标识必填" }],
validateTrigger: "blur",
help: "客户使用的标识"
},

View File

@@ -52,7 +52,7 @@ const headerData: ComputedRef<IPageHeaderProps> = computed(() => {
name: loadingData.value.name as string
}
})
// 切换is_main
// 在表格切换is_main属性
const beforeSwitchChange = (record: any) => {
return async function (newVal: boolean) {
await FragApi.update(record.id, {

View File

@@ -123,6 +123,7 @@ import wtdGenerateApi from "@/api/generate/wtdGenerate"
import { Message } from "@arco-design/web-vue"
import Progress from "./cpns/progress.vue"
import hoosk from "@/views/testmanage/projmanage/hooks.js"
import { validateBlank } from "@/utils/extensions/arcoValidator"
const router = useRouter()
// 定义预览组件的Ref
const previewRef = ref()
@@ -500,7 +501,10 @@ const crudColumns = ref([
sortable: { sortDirections: ["ascend"] },
dataIndex: "ident",
search: true,
commonRules: [{ required: true, message: "标识是必填" }],
commonRules: [
{ required: true, message: "标识是必填" },
{ validator: validateBlank, message: "标识格式不正确" }
],
validateTrigger: "blur"
},
{
@@ -536,7 +540,7 @@ const crudColumns = ref([
{
validator: (value, validationCallbackFunction) => {
let beginTime = crudRef.value.getFormData().beginTime
value < beginTime ? validationCallbackFunction("开始时间必须小于结束时间") : null
value < beginTime ? validationCallbackFunction("开始时间必须小于等于结束时间") : null
}
}
]