(修复)修复问题单无法显示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

1258
cdTMP/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -12,53 +12,52 @@
}, },
"dependencies": { "dependencies": {
"@arco-design/color": "^0.4.0", "@arco-design/color": "^0.4.0",
"@arco-design/web-vue": "^2.55.3", "@arco-design/web-vue": "^2.56.0",
"@tinymce/tinymce-vue": "^5.1.1", "@tinymce/tinymce-vue": "^6.0.1",
"@vueuse/core": "^10.1.2", "@vueuse/core": "^10.11.0",
"axios": "^1.4.0", "axios": "^1.7.2",
"axois": "^0.0.1-security", "axois": "^0.0.1-security",
"crypto-js": "^4.1.1", "dayjs": "^1.11.12",
"dayjs": "^1.11.7", "echarts": "^5.5.1",
"echarts": "^5.4.2",
"file2md5": "^1.3.0", "file2md5": "^1.3.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mammoth": "^1.8.0", "mammoth": "^1.8.0",
"mitt": "^3.0.0", "mitt": "^3.0.1",
"monaco-editor": "^0.33.0", "monaco-editor": "^0.33.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"pinia": "^2.1.3", "pinia": "^2.2.0",
"pinyin-match": "^1.2.4", "pinyin-match": "^1.2.5",
"postcss-import": "^15.1.0", "postcss-import": "^16.1.0",
"qs": "^6.11.2", "qs": "^6.12.3",
"sortablejs": "^1.15.0", "sortablejs": "^1.15.2",
"tinymce": "^6.8.3", "tinymce": "^6.8.4",
"vue": "^3.4.33", "vue": "^3.4.34",
"vue-clipboard3": "^2.0.0", "vue-clipboard3": "^2.0.0",
"vue-color-kit": "^1.0.5", "vue-color-kit": "^1.0.6",
"vue-echarts": "^6.5.5", "vue-echarts": "^6.5.5",
"vue-router": "^4.0.13", "vue-router": "^4.4.0",
"vuedraggable": "^2.24.3" "vuedraggable": "^2.24.3"
}, },
"devDependencies": { "devDependencies": {
"@types/lodash": "^4.14.195", "@types/lodash": "^4.14.195",
"@types/mockjs": "^1.0.7", "@types/node": "^22.0.0",
"@types/node": "^20.12.13", "@types/nprogress": "^0.2.3",
"@types/nprogress": "^0.2.0", "@types/qs": "^6.9.15",
"@types/qs": "^6.9.7", "@vitejs/plugin-vue": "^5.1.1",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue-jsx": "^4.0.0", "@vitejs/plugin-vue-jsx": "^4.0.0",
"@vue/babel-plugin-jsx": "^1.1.1", "@vue/babel-plugin-jsx": "^1.1.1",
"autoprefixer": "^10.4.14", "autoprefixer": "^10.4.19",
"browserslist": "^4.23.0", "browserslist": "^4.23.0",
"caniuse-lite": "^1.0.30001591", "caniuse-lite": "^1.0.30001591",
"eslint": "^8.57.0", "eslint": "^9.8.0",
"eslint-plugin-vue": "^9.26.0", "eslint-plugin-vue": "^9.27.0",
"less": "^4.2.0", "less": "^4.2.0",
"less-loader": "^11.1.2", "less-loader": "^12.2.0",
"postcss": "^8.4.38", "postcss": "^8.4.40",
"prettier": "^2.8.8", "prettier": "^3.3.3",
"tailwindcss": "^3.3.2", "tailwindcss": "^3.4.7",
"typescript": "^5.5.3", "typescript": "^5.5.3",
"vite": "^5.3.4" "vite": "^5.3.5"
} },
"packageManager": "yarn@4.3.1+sha512.af78262d7d125afbfeed740602ace8c5e4405cd7f4735c08feb327286b2fdb2390fbca01589bfd1f50b1240548b74806767f5a063c94b67e431aabd0d86f7774"
} }

3947
cdTMP/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,10 @@ const appStore = useAppStore()
const props = defineProps({ const props = defineProps({
modelValue: { type: String }, modelValue: { type: String },
height: { type: Number, default: 200 }, 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: { plugins: {
type: [String, Array], type: [String, Array],
default: "searchreplace visualchars code table nonbreaking lists autosave" default: "searchreplace visualchars code table nonbreaking lists autosave"
@@ -129,7 +132,7 @@ const initConfig = reactive({
skeletonScreen: true, skeletonScreen: true,
branding: false, branding: false,
content_css: "/tinymce/skins/content/default/content.css", 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;}", // 这里可以设置自定义样式 content_style: "body {line-height:1.5;font-size:14px;} p {margin:2px 0px;}", // 这里可以设置自定义样式
// paste_as_text: false, // 粘贴文字只能是纯文本 // paste_as_text: false, // 粘贴文字只能是纯文本
// 1.自定义粘贴过滤器函数args.content就是粘贴内容 // 1.自定义粘贴过滤器函数args.content就是粘贴内容

View File

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

View File

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

View File

@@ -1,3 +1,6 @@
/**
* 文档片段所属的enum
*/
export enum ProductFileEnum { export enum ProductFileEnum {
dg = "测评大纲", dg = "测评大纲",
sm = "测试说明", 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> { export interface IDictData<T> {
label: T label: T
value: number value: number

View File

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

View File

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

View File

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

View File

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

View File

@@ -52,7 +52,7 @@ const headerData: ComputedRef<IPageHeaderProps> = computed(() => {
name: loadingData.value.name as string name: loadingData.value.name as string
} }
}) })
// 切换is_main // 在表格切换is_main属性
const beforeSwitchChange = (record: any) => { const beforeSwitchChange = (record: any) => {
return async function (newVal: boolean) { return async function (newVal: boolean) {
await FragApi.update(record.id, { 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 { Message } from "@arco-design/web-vue"
import Progress from "./cpns/progress.vue" import Progress from "./cpns/progress.vue"
import hoosk from "@/views/testmanage/projmanage/hooks.js" import hoosk from "@/views/testmanage/projmanage/hooks.js"
import { validateBlank } from "@/utils/extensions/arcoValidator"
const router = useRouter() const router = useRouter()
// 定义预览组件的Ref // 定义预览组件的Ref
const previewRef = ref() const previewRef = ref()
@@ -500,7 +501,10 @@ const crudColumns = ref([
sortable: { sortDirections: ["ascend"] }, sortable: { sortDirections: ["ascend"] },
dataIndex: "ident", dataIndex: "ident",
search: true, search: true,
commonRules: [{ required: true, message: "标识是必填" }], commonRules: [
{ required: true, message: "标识是必填" },
{ validator: validateBlank, message: "标识格式不正确" }
],
validateTrigger: "blur" validateTrigger: "blur"
}, },
{ {
@@ -536,7 +540,7 @@ const crudColumns = ref([
{ {
validator: (value, validationCallbackFunction) => { validator: (value, validationCallbackFunction) => {
let beginTime = crudRef.value.getFormData().beginTime let beginTime = crudRef.value.getFormData().beginTime
value < beginTime ? validationCallbackFunction("开始时间必须小于结束时间") : null value < beginTime ? validationCallbackFunction("开始时间必须小于等于结束时间") : null
} }
} }
] ]

View File

@@ -1,2 +0,0 @@
### 完成需求录入功能
1. 设计需求的录入