优化teleport拖拽
This commit is contained in:
1175
cdTMP/package-lock.json
generated
1175
cdTMP/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -22,7 +22,7 @@
|
|||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"file2md5": "^1.3.0",
|
"file2md5": "^1.3.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"lucide-vue-next": "^0.509.0",
|
"lucide-vue-next": "^0.511.0",
|
||||||
"mammoth": "^1.9.0",
|
"mammoth": "^1.9.0",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
@@ -31,34 +31,34 @@
|
|||||||
"postcss-import": "^16.1.0",
|
"postcss-import": "^16.1.0",
|
||||||
"qs": "^6.14.0",
|
"qs": "^6.14.0",
|
||||||
"tailwind-merge": "^3.3.0",
|
"tailwind-merge": "^3.3.0",
|
||||||
"tinymce": "^7.8.0",
|
"tinymce": "^7.9.0",
|
||||||
"tw-animate-css": "^1.2.9",
|
"tw-animate-css": "^1.3.0",
|
||||||
"vue": "^3.5.13",
|
"vue": "^3.5.14",
|
||||||
"vue-clipboard3": "^2.0.0",
|
"vue-clipboard3": "^2.0.0",
|
||||||
"vue-color-kit": "^1.0.6",
|
"vue-color-kit": "^1.0.6",
|
||||||
"vue-data-ui": "^2.6.45",
|
"vue-data-ui": "^2.6.51",
|
||||||
"vue-router": "^4.5.1",
|
"vue-router": "^4.5.1",
|
||||||
"vuedraggable": "^2.24.3"
|
"vuedraggable": "^2.24.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/postcss": "^4.1.6",
|
"@tailwindcss/postcss": "^4.1.7",
|
||||||
"@tailwindcss/vite": "^4.1.6",
|
"@tailwindcss/vite": "^4.1.7",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
"@types/node": "^22.15.18",
|
"@types/node": "^22.15.18",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/qs": "^6.9.18",
|
"@types/qs": "^6.14.0",
|
||||||
"@vitejs/plugin-vue": "^5.2.4",
|
"@vitejs/plugin-vue": "^5.2.4",
|
||||||
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
||||||
"@vue/babel-plugin-jsx": "^1.4.0",
|
"@vue/babel-plugin-jsx": "^1.4.0",
|
||||||
"browserslist": "^4.24.5",
|
"browserslist": "^4.24.5",
|
||||||
"eslint": "^9.26.0",
|
"eslint": "^9.27.0",
|
||||||
"eslint-plugin-vue": "^10.1.0",
|
"eslint-plugin-vue": "^10.1.0",
|
||||||
"less": "^4.3.0",
|
"less": "^4.3.0",
|
||||||
"less-loader": "^12.3.0",
|
"less-loader": "^12.3.0",
|
||||||
"postcss": "^8.5.3",
|
"postcss": "^8.5.3",
|
||||||
"prettier": "^3.5.3",
|
"prettier": "^3.5.3",
|
||||||
"rollup-plugin-visualizer": "^5.14.0",
|
"rollup-plugin-visualizer": "^5.14.0",
|
||||||
"tailwindcss": "^4.1.6",
|
"tailwindcss": "^4.1.7",
|
||||||
"typescript": "^5.8.3",
|
"typescript": "^5.8.3",
|
||||||
"vite": "^6.3.5",
|
"vite": "^6.3.5",
|
||||||
"vue-eslint-parser": "^10.1.3"
|
"vue-eslint-parser": "^10.1.3"
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
<!--
|
|
||||||
- @Author XXX
|
|
||||||
- @Link XXX
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<a-modal v-model:visible="visible" :footer="false" @cancel="close" draggable>
|
<a-modal v-model:visible="visible" :footer="false" @cancel="close" draggable>
|
||||||
<template #title>导入</template>
|
<template #title>导入</template>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default {
|
|||||||
// 请求参数
|
// 请求参数
|
||||||
requestParams: {},
|
requestParams: {},
|
||||||
// 设置分页组件每页记录数
|
// 设置分页组件每页记录数
|
||||||
pageSizeOption: [10, 20, 30, 50, 100],
|
pageSizeOption: [10, 20, 30, 50, 1000],
|
||||||
// 是否开启表格分页
|
// 是否开启表格分页
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
// 设置选择列
|
// 设置选择列
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import "tinymce/plugins/nonbreaking" // 插入不间断空格
|
|||||||
// import "tinymce/plugins/preview" // 预览
|
// import "tinymce/plugins/preview" // 预览
|
||||||
import "tinymce/plugins/quickbars" // 快速工具栏
|
import "tinymce/plugins/quickbars" // 快速工具栏
|
||||||
import "tinymce/plugins/save" // 保存
|
import "tinymce/plugins/save" // 保存
|
||||||
import "tinymce/plugins/searchreplace" // 查找替换
|
// import "tinymce/plugins/searchreplace" // 查找替换
|
||||||
import "tinymce/plugins/table" // 表格
|
import "tinymce/plugins/table" // 表格
|
||||||
// import "tinymce/plugins/visualblocks" //显示元素范围
|
// import "tinymce/plugins/visualblocks" //显示元素范围
|
||||||
import "tinymce/plugins/visualchars" // 显示不可见字符
|
import "tinymce/plugins/visualchars" // 显示不可见字符
|
||||||
@@ -49,10 +49,13 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: () => "tinymce" + new Date().getTime().toString() + "-" + Math.random().toString(16).substring(2, 10)
|
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 autoresize"
|
default: "visualchars code table nonbreaking lists autosave autoresize"
|
||||||
|
// 备份:"searchreplace visualchars code table nonbreaking lists autosave autoresize"
|
||||||
},
|
},
|
||||||
|
// 工具栏
|
||||||
toolbar: {
|
toolbar: {
|
||||||
type: [String, Array],
|
type: [String, Array],
|
||||||
// 如果要取消粘贴只粘贴文本,需要用户加格式请加上pastetext
|
// 如果要取消粘贴只粘贴文本,需要用户加格式请加上pastetext
|
||||||
@@ -60,7 +63,7 @@ const props = defineProps({
|
|||||||
"code undo redo aligncenter alignleft indent styleselect formatselect fontselect fontsizeselect removeformat"
|
"code undo redo aligncenter alignleft indent styleselect formatselect fontselect fontsizeselect removeformat"
|
||||||
|
|
||||||
// 下面是备份配置:
|
// 下面是备份配置:
|
||||||
// default:"code undo redo restoredraft | paste | bold | aligncenter alignleft alignjustify indent | \
|
// default:"code undo redo restoredraft | paste | bold | aligncenter alignleft alignjustify indent searchreplace | \
|
||||||
// styleselect formatselect fontselect fontsizeselect | bullist numlist | removeformat"
|
// styleselect formatselect fontselect fontsizeselect | bullist numlist | removeformat"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -157,7 +160,8 @@ const initConfig = reactive({
|
|||||||
: "/tinymce/skins/content/default/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就是粘贴内容
|
||||||
paste_preprocess: function (plugin, args) {
|
paste_preprocess: function (plugin, args) {
|
||||||
let content = args.content
|
let content = args.content
|
||||||
|
|||||||
93
cdTMP/src/components/ma-form/Customs/BulkReplaceModal.vue
Normal file
93
cdTMP/src/components/ma-form/Customs/BulkReplaceModal.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<script lang="tsx">
|
||||||
|
import { defineComponent, ref } from "vue"
|
||||||
|
import { Modal, Form, FormItem, Input, Space, Button, Alert, Message } from "@arco-design/web-vue"
|
||||||
|
// 导入替换白名单
|
||||||
|
import handleSubmit from "./replaceFieldName"
|
||||||
|
|
||||||
|
export default defineComponent({
|
||||||
|
name: "BulkPeplaceModal",
|
||||||
|
props: {
|
||||||
|
parentForm: { type: Object, required: true }
|
||||||
|
},
|
||||||
|
setup(props, { expose }) {
|
||||||
|
// ref
|
||||||
|
const formRef = ref()
|
||||||
|
// refs
|
||||||
|
const visible = ref(false)
|
||||||
|
const formData = ref({
|
||||||
|
originText: "",
|
||||||
|
replaceText: ""
|
||||||
|
})
|
||||||
|
|
||||||
|
// inner-functions
|
||||||
|
const submit = (record: { values: any; error: any }) => {
|
||||||
|
handleSubmit(record, props.parentForm, formData)
|
||||||
|
}
|
||||||
|
|
||||||
|
// obj-functions
|
||||||
|
const open = () => {
|
||||||
|
// 如果已经打开则关闭,清空查询
|
||||||
|
formData.value = {
|
||||||
|
originText: "",
|
||||||
|
replaceText: ""
|
||||||
|
}
|
||||||
|
visible.value = visible.value === true ? false : true
|
||||||
|
}
|
||||||
|
|
||||||
|
// expose
|
||||||
|
expose({ open })
|
||||||
|
return () => (
|
||||||
|
<div class="bulk-replace-container">
|
||||||
|
<Modal
|
||||||
|
draggable
|
||||||
|
unmount-on-close
|
||||||
|
title="替换当前页面文本"
|
||||||
|
width="500px"
|
||||||
|
v-model:visible={visible.value}
|
||||||
|
mask={false}
|
||||||
|
popup-container="#form-main-id"
|
||||||
|
modal-class="modal-container-custom-shadow"
|
||||||
|
modalAnimationName="fade"
|
||||||
|
footer={false}
|
||||||
|
>
|
||||||
|
<Alert type="warning" class="mb-2">
|
||||||
|
无法替换时间等非文本字段
|
||||||
|
</Alert>
|
||||||
|
<Form model={formData.value} onSubmit={submit} ref={formRef}>
|
||||||
|
<FormItem
|
||||||
|
field="originText"
|
||||||
|
label="被替文本"
|
||||||
|
validate-trigger={["change", "blur"]}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: "请输入查找和被替换的文本"
|
||||||
|
}
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Input placeholder="请输入被替换文本" v-model={formData.value.originText}></Input>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem field="replaceText" label="被替换为" validate-trigger={["change", "blur"]}>
|
||||||
|
<Input placeholder="请输入替换的文本" v-model={formData.value.replaceText}></Input>
|
||||||
|
</FormItem>
|
||||||
|
<FormItem>
|
||||||
|
<Space>
|
||||||
|
<Button type="primary" html-type="submit">
|
||||||
|
全部替换
|
||||||
|
</Button>
|
||||||
|
<Button onClick={() => formRef.value.resetFields()}>重置</Button>
|
||||||
|
</Space>
|
||||||
|
</FormItem>
|
||||||
|
</Form>
|
||||||
|
</Modal>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.modal-container-custom-shadow {
|
||||||
|
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
73
cdTMP/src/components/ma-form/Customs/replaceFieldName.ts
Normal file
73
cdTMP/src/components/ma-form/Customs/replaceFieldName.ts
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import { Message } from "@arco-design/web-vue"
|
||||||
|
|
||||||
|
// 注意该白名单仅支持替换“字符串”and“数组”,其他不行!
|
||||||
|
const replaceField = [
|
||||||
|
"initialization", // 用例:初始化
|
||||||
|
"name", // 各个form的名称
|
||||||
|
"premise", // 用例:前提和约束
|
||||||
|
"summarize", // 用例:综述
|
||||||
|
"testStep", // 用例:步骤,数组包含{operation:"",expect:""}
|
||||||
|
"testDesciption", // 测试项:测试项描述
|
||||||
|
"testContent" // 测试项:子项
|
||||||
|
]
|
||||||
|
|
||||||
|
const handleSubmit = (record: { values: any; error: any }, parentForm: any, formData: any) => {
|
||||||
|
if (record.error) return
|
||||||
|
// 替换逻辑
|
||||||
|
Object.keys(parentForm).forEach((fieldName) => {
|
||||||
|
if (replaceField.includes(fieldName)) {
|
||||||
|
// 如果存在白名单里面,在判断是文本还是数组
|
||||||
|
const lineData = parentForm[fieldName]
|
||||||
|
if (typeof lineData === "string") {
|
||||||
|
// string则直接替换
|
||||||
|
parentForm[fieldName] = parentForm[fieldName].replaceAll(
|
||||||
|
formData.value.originText,
|
||||||
|
formData.value.replaceText
|
||||||
|
)
|
||||||
|
} else if (Array.isArray(lineData)) {
|
||||||
|
parentForm[fieldName].forEach(
|
||||||
|
(obj: { operation: string; expect: string; result: string; subName: string; subStep: string }) => {
|
||||||
|
// 用例:数组只能替换对象operation、expect、result
|
||||||
|
if (obj.operation) {
|
||||||
|
obj.operation = obj.operation.replaceAll(
|
||||||
|
formData.value.originText,
|
||||||
|
formData.value.replaceText
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (obj.expect) {
|
||||||
|
obj.expect = obj.expect.replaceAll(formData.value.originText, formData.value.replaceText)
|
||||||
|
}
|
||||||
|
if (obj.result) {
|
||||||
|
obj.result = obj.result.replaceAll(formData.value.originText, formData.value.replaceText)
|
||||||
|
}
|
||||||
|
// 测试项:嵌套两层
|
||||||
|
if (obj.subName) {
|
||||||
|
obj.subName = obj.subName.replaceAll(formData.value.originText, formData.value.replaceText)
|
||||||
|
if (obj.subStep && Array.isArray(obj.subStep)) {
|
||||||
|
obj.subStep.forEach((step) => {
|
||||||
|
if (step.operation) {
|
||||||
|
step.operation = step.operation.replaceAll(
|
||||||
|
formData.value.originText,
|
||||||
|
formData.value.replaceText
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (step.expect) {
|
||||||
|
step.expect = step.expect.replaceAll(
|
||||||
|
formData.value.originText,
|
||||||
|
formData.value.replaceText
|
||||||
|
)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
Message.success("替换成功")
|
||||||
|
}
|
||||||
|
|
||||||
|
export default handleSubmit
|
||||||
@@ -166,14 +166,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 修改源码:切换显示形态 -->
|
<!-- 修改源码:切换显示形态 -->
|
||||||
<a-popover>
|
<Teleport to="body">
|
||||||
<template #title>切换{{ props.component.type === "group" ? "表格" : "聚合" }}显示</template>
|
<a-popover>
|
||||||
<div class="sticky-container" @click="swapTableOrGroupDisplay">
|
<template #title>切换{{ props.component.type === "group" ? "表格" : "聚合" }}显示</template>
|
||||||
<div class="sticky-button">
|
<div class="sticky-container" @click="swapTableOrGroupDisplay">
|
||||||
<icon-swap />
|
<div class="sticky-button">
|
||||||
|
<icon-swap />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</a-popover>
|
||||||
</a-popover>
|
</Teleport>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="w-full">
|
<div class="w-full" ref="containerRef" id="form-main-id">
|
||||||
<a-spin :loading="formLoading" :tip="options.loadingText" class="w-full ma-form-spin">
|
<a-spin :loading="formLoading" :tip="options.loadingText" class="w-full ma-form-spin">
|
||||||
<div
|
<div
|
||||||
v-if="options.showFormTitle"
|
v-if="options.showFormTitle"
|
||||||
@@ -69,12 +69,25 @@
|
|||||||
<template v-if="parentKey">
|
<template v-if="parentKey">
|
||||||
<ParentPreview :parent-key="parentKey"></ParentPreview>
|
<ParentPreview :parent-key="parentKey"></ParentPreview>
|
||||||
</template>
|
</template>
|
||||||
|
<!-- ctrl+F的替换功能:仅支持用例、测试项 -->
|
||||||
|
<template v-if="form.testStep || form.testContent">
|
||||||
|
<teleport to="body">
|
||||||
|
<div class="alert-container">
|
||||||
|
<a-alert show-icon type="info">
|
||||||
|
<p>支持</p>
|
||||||
|
<p>Ctrl+F</p>
|
||||||
|
<p>替换</p>
|
||||||
|
</a-alert>
|
||||||
|
</div>
|
||||||
|
</teleport>
|
||||||
|
<BulkReplaceModal ref="replaceModalRef" :parent-form="form" />
|
||||||
|
</template>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, provide, onMounted, nextTick, getCurrentInstance, inject, computed } from "vue"
|
import { ref, watch, provide, onMounted, onUnmounted, nextTick, getCurrentInstance, inject, computed } from "vue"
|
||||||
import { isNil, set, get, cloneDeep } from "lodash-es"
|
import { isNil, set, get, cloneDeep } from "lodash-es"
|
||||||
import defaultOptions from "./js/defaultOptions.js"
|
import defaultOptions from "./js/defaultOptions.js"
|
||||||
import {
|
import {
|
||||||
@@ -91,6 +104,8 @@ import ColumnService from "./js/columnService.js"
|
|||||||
|
|
||||||
import { runEvent } from "./js/event.js"
|
import { runEvent } from "./js/event.js"
|
||||||
import { Message } from "@arco-design/web-vue"
|
import { Message } from "@arco-design/web-vue"
|
||||||
|
// 修改源码导入:查找和替换组件
|
||||||
|
import BulkReplaceModal from "@/components/ma-form/Customs/BulkReplaceModal.vue"
|
||||||
|
|
||||||
const formLoading = ref(false)
|
const formLoading = ref(false)
|
||||||
const maFormRef = ref()
|
const maFormRef = ref()
|
||||||
@@ -100,7 +115,23 @@ const dictList = ref({})
|
|||||||
const cascaderList = ref([])
|
const cascaderList = ref([])
|
||||||
const form = ref({})
|
const form = ref({})
|
||||||
|
|
||||||
// ~~~custom start - 新增功能利用key强制更新form表单组件
|
// ~~~custom start0 - 查找和替换组件
|
||||||
|
const replaceModalRef = ref()
|
||||||
|
const containerRef = ref()
|
||||||
|
const handleKeydown = (e) => {
|
||||||
|
if (e.ctrlKey && e.key === "f") {
|
||||||
|
e.preventDefault()
|
||||||
|
replaceModalRef.value && replaceModalRef.value.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
document.addEventListener("keydown", handleKeydown)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
document.removeEventListener("keydown", handleKeydown)
|
||||||
|
})
|
||||||
|
|
||||||
|
// ~~~custom start1 - 新增功能利用key强制更新form表单组件
|
||||||
const componentKey = ref(0)
|
const componentKey = ref(0)
|
||||||
const updateKey = () => {
|
const updateKey = () => {
|
||||||
componentKey.value += 1
|
componentKey.value += 1
|
||||||
@@ -113,7 +144,7 @@ const handleChangeDisplay = (type) => {
|
|||||||
}
|
}
|
||||||
// ~~~custom end
|
// ~~~custom end
|
||||||
|
|
||||||
// ~~~~custom start
|
// ~~~~custom start2
|
||||||
// 2025年5月14日新增功能hover查看上级节点
|
// 2025年5月14日新增功能hover查看上级节点
|
||||||
import ParentPreview from "@/views/project/ParentPreview/index.vue"
|
import ParentPreview from "@/views/project/ParentPreview/index.vue"
|
||||||
// 判断是否有
|
// 判断是否有
|
||||||
@@ -326,8 +357,21 @@ defineExpose({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
div:deep(.arco-modal-container) {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
:deep(.arco-modal.arco-modal-draggable) {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
.ma-form-title {
|
.ma-form-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.alert-container {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 50%;
|
||||||
|
user-select: none;
|
||||||
|
width: 113px;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
<!--
|
|
||||||
- @Author XXX
|
|
||||||
- @Link XXX
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="w-full">
|
<div class="w-full">
|
||||||
<a-input-group class="w-full">
|
<a-input-group class="w-full">
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
</a-space>
|
</a-space>
|
||||||
|
|
||||||
<a-modal v-model:visible="visible" width="1000px" draggable :on-before-ok="close" unmountOnClose>
|
<a-modal v-model:visible="visible" width="1000px" draggable :on-before-ok="close" unmount-on-close>
|
||||||
<template #title>{{ props.text }}</template>
|
<template #title>{{ props.text }}</template>
|
||||||
|
|
||||||
<ma-crud
|
<ma-crud
|
||||||
|
|||||||
@@ -237,7 +237,7 @@
|
|||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
<!-- 复制modal组件 -->
|
<!-- 复制modal组件 -->
|
||||||
<!-- 关联的modal组件 -->
|
<!-- 关联的modal组件 -->
|
||||||
<a-modal v-model:visible="modalVisible" :width="700" draggable :on-before-ok="handleCopyDemand">
|
<a-modal v-model:visible="modalVisible" unmount-on-close :width="700" draggable :on-before-ok="handleCopyDemand">
|
||||||
<template #title>复制到设计需求</template>
|
<template #title>复制到设计需求</template>
|
||||||
<div class="pb-3">选择复制到的节点(<span class="point">支持搜索</span>):</div>
|
<div class="pb-3">选择复制到的节点(<span class="point">支持搜索</span>):</div>
|
||||||
<a-cascader
|
<a-cascader
|
||||||
@@ -502,7 +502,7 @@ const {
|
|||||||
// 自定义选中节点样式
|
// 自定义选中节点样式
|
||||||
:deep(.arco-tree-node-selected) {
|
:deep(.arco-tree-node-selected) {
|
||||||
.arco-tree-node-title {
|
.arco-tree-node-title {
|
||||||
color: #F53F3F !important;
|
color: #f53f3f !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -31,4 +31,12 @@ body {
|
|||||||
// 覆盖card组件,padding原来为16px
|
// 覆盖card组件,padding原来为16px
|
||||||
.arco-card-body {
|
.arco-card-body {
|
||||||
padding: 8px !important;
|
padding: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 覆盖modal的头部样式,变为sticky
|
||||||
|
.arco-modal-header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 9999;
|
||||||
|
background-color: rgba(255, 255, 255, 0.9);
|
||||||
}
|
}
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
|
|
||||||
<a-modal v-model:visible="visible" @ok="resetLogin">
|
<a-modal v-model:visible="visible" @ok="resetLogin" unmount-on-close>
|
||||||
<template #title>提示</template>
|
<template #title>提示</template>
|
||||||
密码已经修改成功,需要重新登录系统,点击确定跳转登录页面。
|
密码已经修改成功,需要重新登录系统,点击确定跳转登录页面。
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<a-link @click="viewDetail(record)">{{ record.title }}</a-link>
|
<a-link @click="viewDetail(record)">{{ record.title }}</a-link>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
<a-modal v-model:visible="detailVisible" width="80%" draggable :footer="false">
|
<a-modal v-model:visible="detailVisible" width="80%" draggable :footer="false" unmount-on-close>
|
||||||
<template #title>公告详情</template>
|
<template #title>公告详情</template>
|
||||||
<a-typography :style="{ marginTop: '-30px' }">
|
<a-typography :style="{ marginTop: '-30px' }">
|
||||||
<a-typography-title class="text-center">
|
<a-typography-title class="text-center">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal v-model:visible="visible" width="80%" draggable :footer="false">
|
<a-modal v-model:visible="visible" width="80%" draggable :footer="false" unmount-on-close>
|
||||||
<template #title>维护数据字典 →【{{ currentRow.name }}】</template>
|
<template #title>维护数据字典 →【{{ currentRow.name }}】</template>
|
||||||
<!-- crud组件 -->
|
<!-- crud组件 -->
|
||||||
<div class="lg:w-full w-full lg:mt-0">
|
<div class="lg:w-full w-full lg:mt-0">
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
width="80%"
|
width="80%"
|
||||||
draggable
|
draggable
|
||||||
:okLoading="okLoading"
|
:okLoading="okLoading"
|
||||||
|
unmount-on-close
|
||||||
:title="form.name ? form.name : '请填写用例名称'"
|
:title="form.name ? form.name : '请填写用例名称'"
|
||||||
:on-before-ok="handleOkBefore"
|
:on-before-ok="handleOkBefore"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-modal v-model:visible="visible" width="1200px" :footer="false" :mask-closable="false">
|
<a-modal v-model:visible="visible" width="1200px" :footer="false" :mask-closable="false" unmount-on-close>
|
||||||
<template #title>{{ title }}</template>
|
<template #title>{{ title }}</template>
|
||||||
<!-- crud组件 -->
|
<!-- crud组件 -->
|
||||||
<div class="lg:w-full w-full">
|
<div class="lg:w-full w-full">
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
cancel-text="关闭"
|
cancel-text="关闭"
|
||||||
width="950px"
|
width="950px"
|
||||||
draggable
|
draggable
|
||||||
|
unmount-on-close
|
||||||
>
|
>
|
||||||
<template #title>{{ props.title }}</template>
|
<template #title>{{ props.title }}</template>
|
||||||
<ma-form v-model="form" :columns="columnsOptions" :options="options" ref="crudForm" />
|
<ma-form v-model="form" :columns="columnsOptions" :options="options" ref="crudForm" />
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ const DemandSubForm = defineComponent({
|
|||||||
// Dom
|
// Dom
|
||||||
return () => (
|
return () => (
|
||||||
// 注意v-model:visible是不能放在对象解构的
|
// 注意v-model:visible是不能放在对象解构的
|
||||||
<a-modal {...modalOptions} v-model:visible={visible.value} on-before-cancel={handleBeforeCancel} width='86%'>
|
<a-modal {...modalOptions} v-model:visible={visible.value} on-before-cancel={handleBeforeCancel} width='86%' unmount-on-close>
|
||||||
{{
|
{{
|
||||||
title: () => <span>[设计需求]-{title.value}</span>,
|
title: () => <span>[测试项]-{title.value}</span>,
|
||||||
default: () => (
|
default: () => (
|
||||||
<ma-form
|
<ma-form
|
||||||
ref={formRef}
|
ref={formRef}
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ export default function (crudRef: Ref<InstanceType<typeof MaCrud>>) {
|
|||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
operationColumnWidth: 200,
|
operationColumnWidth: 200,
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
|
draggable: false,
|
||||||
operationColumnAlign: "center",
|
operationColumnAlign: "center",
|
||||||
formOption: {
|
formOption: {
|
||||||
width: "86%",
|
width: "86%",
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
</ma-crud>
|
</ma-crud>
|
||||||
</div>
|
</div>
|
||||||
<!-- 关联的modal组件 -->
|
<!-- 关联的modal组件 -->
|
||||||
<a-modal v-model:visible="visible" width="700px" draggable :on-before-ok="handleRelatedOk">
|
<a-modal v-model:visible="visible" width="700px" draggable unmount-on-close :on-before-ok="handleRelatedOk">
|
||||||
<template #title>关联测试项</template>
|
<template #title>关联测试项</template>
|
||||||
<div class="pb-3">已存在的关联项:</div>
|
<div class="pb-3">已存在的关联项:</div>
|
||||||
<a-typography-paragraph>
|
<a-typography-paragraph>
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const DesignSubForm = defineComponent({
|
|||||||
// Dom
|
// Dom
|
||||||
return () => (
|
return () => (
|
||||||
// 注意v-model:visible是不能放在对象解构的
|
// 注意v-model:visible是不能放在对象解构的
|
||||||
<a-modal {...modalOptions} v-model:visible={visible.value}>
|
<a-modal {...modalOptions} v-model:visible={visible.value} unmount-on-close>
|
||||||
{{
|
{{
|
||||||
title: () => <span>[设计需求]-{title.value}</span>,
|
title: () => <span>[设计需求]-{title.value}</span>,
|
||||||
default: () => (
|
default: () => (
|
||||||
|
|||||||
@@ -242,13 +242,13 @@ const searchSubmit = (data: ISearchFormCase) => {
|
|||||||
// 9.批量修改人员
|
// 9.批量修改人员
|
||||||
const replacePersonModalRef = ref<InstanceType<typeof ReplacePerson>>()
|
const replacePersonModalRef = ref<InstanceType<typeof ReplacePerson>>()
|
||||||
const handlePerpleModal = () => {
|
const handlePerpleModal = () => {
|
||||||
replacePersonModalRef.value.open()
|
replacePersonModalRef.value!.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
// 10.批量修改事件
|
// 10.批量修改事件
|
||||||
const replaceExetimeModalRef = ref<InstanceType<typeof ReplacePerson>>()
|
const replaceExetimeModalRef = ref<InstanceType<typeof ReplacePerson>>()
|
||||||
const handleExetimeModal = () => {
|
const handleExetimeModal = () => {
|
||||||
replaceExetimeModalRef.value.open()
|
replaceExetimeModalRef.value!.open()
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const DutSubForm = defineComponent({
|
|||||||
// Dom
|
// Dom
|
||||||
return () => (
|
return () => (
|
||||||
// 注意v-model:visible是不能放在对象解构的
|
// 注意v-model:visible是不能放在对象解构的
|
||||||
<a-modal {...modalOptions} v-model:visible={visible.value}>
|
<a-modal {...modalOptions} v-model:visible={visible.value} unmount-on-close>
|
||||||
{{
|
{{
|
||||||
title: () => <span>[被测件]-{title.value}</span>,
|
title: () => <span>[被测件]-{title.value}</span>,
|
||||||
default: () => (
|
default: () => (
|
||||||
|
|||||||
@@ -57,9 +57,10 @@ const CaseSubForm = defineComponent({
|
|||||||
v-model:visible={visible.value}
|
v-model:visible={visible.value}
|
||||||
on-before-cancel={handleBeforeCancel}
|
on-before-cancel={handleBeforeCancel}
|
||||||
width="86%"
|
width="86%"
|
||||||
|
unmount-on-close
|
||||||
>
|
>
|
||||||
{{
|
{{
|
||||||
title: () => <span>[设计需求]-{title.value}</span>,
|
title: () => <span>[测试用例]-{title.value}</span>,
|
||||||
default: () => (
|
default: () => (
|
||||||
<ma-form
|
<ma-form
|
||||||
ref={formRef}
|
ref={formRef}
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ export default function (crudRef: Ref<InstanceType<typeof MaCrud>>) {
|
|||||||
rowSelection: { showCheckedAll: true },
|
rowSelection: { showCheckedAll: true },
|
||||||
searchColNumber: 3,
|
searchColNumber: 3,
|
||||||
tablePagination: false,
|
tablePagination: false,
|
||||||
|
draggable: false,
|
||||||
operationColumnWidth: 180,
|
operationColumnWidth: 180,
|
||||||
operationColumn: true,
|
operationColumn: true,
|
||||||
formOption: {
|
formOption: {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</a-timeline>
|
</a-timeline>
|
||||||
</div>
|
</div>
|
||||||
<!-- a-modal组件,展示生成文档的全部信息 -->
|
<!-- a-modal组件,展示生成文档的全部信息 -->
|
||||||
<a-modal v-model:visible="visible" hide-cancel :closable="false" width="auto">
|
<a-modal v-model:visible="visible" unmount-on-close hide-cancel :closable="false" width="auto">
|
||||||
<template #title> 生成文档时间一览表 </template>
|
<template #title> 生成文档时间一览表 </template>
|
||||||
<a-card
|
<a-card
|
||||||
:style="{ width: '600px' }"
|
:style="{ width: '600px' }"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 描述列表组件 -->
|
<!-- 描述列表组件 -->
|
||||||
<a-modal width="1000px" v-model:visible="visible" :footer="false">
|
<a-modal width="1000px" v-model:visible="visible" :footer="false" unmount-on-close>
|
||||||
<template #title>项目名称:{{ previewRecord.name }}</template>
|
<template #title>项目名称:{{ previewRecord.name }}</template>
|
||||||
<ma-info
|
<ma-info
|
||||||
class="my-custom-class"
|
class="my-custom-class"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
draggable
|
draggable
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
hide-cancel
|
hide-cancel
|
||||||
|
unmount-on-close
|
||||||
:mask-closable="false"
|
:mask-closable="false"
|
||||||
:on-before-ok="handleClickConfirmButton"
|
:on-before-ok="handleClickConfirmButton"
|
||||||
:on-before-cancel="handleClickConfirmButton"
|
:on-before-cancel="handleClickConfirmButton"
|
||||||
|
|||||||
Reference in New Issue
Block a user