From d3643e3d582603e93b3afaaa16f53080990d2025 Mon Sep 17 00:00:00 2001 From: hongchao <3228015117@qq.com> Date: Tue, 17 Dec 2024 15:48:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env/.env.dev | 2 +- package-lock.json | 195 +++++++++-- package.json | 2 + src/http/api/contract-manage/index.ts | 4 + src/http/api/quickmessage/index.ts | 18 ++ src/main.ts | 6 +- src/router/index.ts | 11 + src/views/user/contract-manage/index.vue | 133 ++++---- src/views/user/index.vue | 1 + src/views/user/quickMessage/index.vue | 396 +++++++++++++++++++++++ 10 files changed, 671 insertions(+), 97 deletions(-) create mode 100644 src/http/api/quickmessage/index.ts create mode 100644 src/views/user/quickMessage/index.vue diff --git a/env/.env.dev b/env/.env.dev index 07b1fab..b2a1831 100644 --- a/env/.env.dev +++ b/env/.env.dev @@ -11,7 +11,7 @@ VITE_API_URL = '/proxyApi' # VITE_proxyTarget = 'http://192.168.2.127:28080' # 梁超 # VITE_proxyTarget = 'http://36.33.26.201:17788/proxyApi' # 测试服务 # VITE_proxyTarget = 'http://192.168.0.244:28580' # 测试服务 -VITE_proxyTarget = 'http://192.168.2.72:28080' # 盛旭 +VITE_proxyTarget = 'http://192.168.0.110:28080' # 盛旭 # VITE_proxyTarget = 'http://10.40.92.185:9206' # 赵福海 ( 设备类型) # VITE_proxyTarget = 'http://10.40.92.16:9502' # 牛 (个人中心 基础信息企业申请认证) diff --git a/package-lock.json b/package-lock.json index 74162c5..2e25b1a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,6 +11,7 @@ "@element-plus/icons-vue": "^2.3.1", "@js-preview/docx": "^1.6.2", "@vue-office/docx": "^1.6.2", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "^10.6.1", "axios": "^1.6.2", "element-plus": "^2.4.3", @@ -21,6 +22,7 @@ "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persist": "^1.0.0", + "quill": "^2.0.3", "vite-plugin-html": "^3.2.0", "vite-plugin-zip-file": "^2.2.0", "vue": "^3.3.4", @@ -955,6 +957,82 @@ "integrity": "sha512-CPuIReonid9+zOG/CGTT05FXrPYATEqoDGNrEaqS4hwcw5BUNM2FguC0mOwJD4Jr16UpRVl9N0pY3P+srIbqmg==", "dev": true }, + "node_modules/@vueup/vue-quill": { + "version": "1.2.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/@vueup/vue-quill/-/vue-quill-1.2.0.tgz", + "integrity": "sha512-kd5QPSHMDpycklojPXno2Kw2JSiKMYduKYQckTm1RJoVDA557MnyUXgcuuDpry4HY/Rny9nGNcK+m3AHk94wag==", + "license": "MIT", + "dependencies": { + "quill": "^1.3.7", + "quill-delta": "^4.2.2" + }, + "peerDependencies": { + "vue": "^3.2.41" + } + }, + "node_modules/@vueup/vue-quill/node_modules/eventemitter3": { + "version": "2.0.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==", + "license": "MIT" + }, + "node_modules/@vueup/vue-quill/node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "license": "Apache-2.0" + }, + "node_modules/@vueup/vue-quill/node_modules/parchment": { + "version": "1.1.4", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==", + "license": "BSD-3-Clause" + }, + "node_modules/@vueup/vue-quill/node_modules/quill": { + "version": "1.3.7", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "license": "BSD-3-Clause", + "dependencies": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + } + }, + "node_modules/@vueup/vue-quill/node_modules/quill-delta": { + "version": "4.2.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill-delta/-/quill-delta-4.2.2.tgz", + "integrity": "sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==", + "license": "MIT", + "dependencies": { + "fast-diff": "1.2.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + } + }, + "node_modules/@vueup/vue-quill/node_modules/quill/node_modules/fast-diff": { + "version": "1.1.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "license": "Apache-2.0" + }, + "node_modules/@vueup/vue-quill/node_modules/quill/node_modules/quill-delta": { + "version": "3.6.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "license": "MIT", + "dependencies": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/@vueuse/core": { "version": "10.11.1", "resolved": "https://registry.npmmirror.com/@vueuse/core/-/core-10.11.1.tgz", @@ -1642,12 +1720,12 @@ } }, "node_modules/dunder-proto": { - "version": "1.0.0", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/dunder-proto/-/dunder-proto-1.0.0.tgz", - "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "version": "1.0.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { - "call-bind-apply-helpers": "^1.0.0", + "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" }, @@ -1853,9 +1931,9 @@ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==" }, "node_modules/eventemitter3": { - "version": "2.0.3", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/eventemitter3/-/eventemitter3-2.0.3.tgz", - "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==", + "version": "5.0.1", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", "license": "MIT" }, "node_modules/extend": { @@ -1865,9 +1943,9 @@ "license": "MIT" }, "node_modules/fast-diff": { - "version": "1.1.2", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/fast-diff/-/fast-diff-1.1.2.tgz", - "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "version": "1.3.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", "license": "Apache-2.0" }, "node_modules/fast-glob": { @@ -2479,6 +2557,18 @@ "lodash-es": "*" } }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "license": "MIT" + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "license": "MIT" + }, "node_modules/lower-case": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/lower-case/-/lower-case-2.0.2.tgz", @@ -2815,9 +2905,9 @@ } }, "node_modules/parchment": { - "version": "1.1.4", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/parchment/-/parchment-1.1.4.tgz", - "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==", + "version": "3.0.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/parchment/-/parchment-3.0.0.tgz", + "integrity": "sha512-HUrJFQ/StvgmXRcQ1ftY6VEZUq3jA2t9ncFN4F84J/vN0/FPpQF+8FKXb3l6fLces6q0uOHj6NJn+2xvZnxO6A==", "license": "BSD-3-Clause" }, "node_modules/pascal-case": { @@ -3055,31 +3145,32 @@ ] }, "node_modules/quill": { - "version": "1.3.7", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill/-/quill-1.3.7.tgz", - "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "version": "2.0.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill/-/quill-2.0.3.tgz", + "integrity": "sha512-xEYQBqfYx/sfb33VJiKnSJp8ehloavImQ2A6564GAbqG55PGw1dAWUn1MUbQB62t0azawUS2CZZhWCjO8gRvTw==", "license": "BSD-3-Clause", "dependencies": { - "clone": "^2.1.1", - "deep-equal": "^1.0.1", - "eventemitter3": "^2.0.3", - "extend": "^3.0.2", - "parchment": "^1.1.4", - "quill-delta": "^3.6.2" + "eventemitter3": "^5.0.1", + "lodash-es": "^4.17.21", + "parchment": "^3.0.0", + "quill-delta": "^5.1.0" + }, + "engines": { + "npm": ">=8.2.3" } }, "node_modules/quill-delta": { - "version": "3.6.3", - "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill-delta/-/quill-delta-3.6.3.tgz", - "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "version": "5.1.0", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", "license": "MIT", "dependencies": { - "deep-equal": "^1.0.1", - "extend": "^3.0.2", - "fast-diff": "1.1.2" + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" }, "engines": { - "node": ">=0.10" + "node": ">= 12.0.0" } }, "node_modules/read-package-json-fast": { @@ -3888,6 +3979,52 @@ "npm": ">= 3.0.0" } }, + "node_modules/vue-quill-editor/node_modules/eventemitter3": { + "version": "2.0.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/eventemitter3/-/eventemitter3-2.0.3.tgz", + "integrity": "sha512-jLN68Dx5kyFHaePoXWPsCGW5qdyZQtLYHkxkg02/Mz6g0kYpDx4FyP6XfArhQdlOC4b8Mv+EMxPo/8La7Tzghg==", + "license": "MIT" + }, + "node_modules/vue-quill-editor/node_modules/fast-diff": { + "version": "1.1.2", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/fast-diff/-/fast-diff-1.1.2.tgz", + "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==", + "license": "Apache-2.0" + }, + "node_modules/vue-quill-editor/node_modules/parchment": { + "version": "1.1.4", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/parchment/-/parchment-1.1.4.tgz", + "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==", + "license": "BSD-3-Clause" + }, + "node_modules/vue-quill-editor/node_modules/quill": { + "version": "1.3.7", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill/-/quill-1.3.7.tgz", + "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==", + "license": "BSD-3-Clause", + "dependencies": { + "clone": "^2.1.1", + "deep-equal": "^1.0.1", + "eventemitter3": "^2.0.3", + "extend": "^3.0.2", + "parchment": "^1.1.4", + "quill-delta": "^3.6.2" + } + }, + "node_modules/vue-quill-editor/node_modules/quill-delta": { + "version": "3.6.3", + "resolved": "https://mirrors.huaweicloud.com/repository/npm/quill-delta/-/quill-delta-3.6.3.tgz", + "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==", + "license": "MIT", + "dependencies": { + "deep-equal": "^1.0.1", + "extend": "^3.0.2", + "fast-diff": "1.1.2" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/vue-router": { "version": "4.5.0", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.5.0.tgz", diff --git a/package.json b/package.json index 5f0215e..040d73f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@element-plus/icons-vue": "^2.3.1", "@js-preview/docx": "^1.6.2", "@vue-office/docx": "^1.6.2", + "@vueup/vue-quill": "^1.2.0", "@vueuse/core": "^10.6.1", "axios": "^1.6.2", "element-plus": "^2.4.3", @@ -27,6 +28,7 @@ "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persist": "^1.0.0", + "quill": "^2.0.3", "vite-plugin-html": "^3.2.0", "vite-plugin-zip-file": "^2.2.0", "vue": "^3.3.4", diff --git a/src/http/api/contract-manage/index.ts b/src/http/api/contract-manage/index.ts index f372b3e..b41aba4 100644 --- a/src/http/api/contract-manage/index.ts +++ b/src/http/api/contract-manage/index.ts @@ -20,4 +20,8 @@ export const delContractApi = (data: any = {}) => { // 修改状态 export const updateStatus = (data: any = {}) => { return post('/material-mall/contract/updateStatus', data) +} +//合同模板选择 +export const getContractSelectList = () => { + return get('/material-mall/contract/lisTemplate', {}) } \ No newline at end of file diff --git a/src/http/api/quickmessage/index.ts b/src/http/api/quickmessage/index.ts new file mode 100644 index 0000000..bde83f6 --- /dev/null +++ b/src/http/api/quickmessage/index.ts @@ -0,0 +1,18 @@ +import { get, post } from '../../index' + +// 新增快捷消息 +export const addMessageApi = (data: any = {}) => { + return post('/material-mall/reply/add', data) +} +// 快捷消息列表 +export const getMessageListApi = (data: any = {}) => { + return get('/material-mall/reply/list', data) +} +// 快捷消息编辑 +export const editMessageApi = (data: any = {}) => { + return post('/material-mall/reply/edit', data) +} +// 快捷消息删除 +export const delMessageApi = (data: any = {}) => { + return post('/material-mall/reply/del', data) +} diff --git a/src/main.ts b/src/main.ts index 51bfd55..067ab32 100644 --- a/src/main.ts +++ b/src/main.ts @@ -12,17 +12,17 @@ import './assets/font/iconfont.js' import ElementPlus from 'element-plus' import zhCn from 'element-plus/es/locale/lang/zh-cn' import VueQrcode from 'vue-qrcode' - +import { QuillEditor } from '@vueup/vue-quill'; +import '@vueup/vue-quill/dist/vue-quill.snow.css'; // 引入样式 import registerDirectives from 'utils/directive' const app = createApp(App) - for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) app.component('vue-qr-code', VueQrcode) } - +app.component('QuillEditor', QuillEditor); // 全局注册 app.use(pinia) app.use(router) diff --git a/src/router/index.ts b/src/router/index.ts index a037095..57bc92d 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -259,6 +259,17 @@ const routes: Array = [ isLogin: true }, }, + { + path: '/quickMessage', + name: 'quickMessage', + component: () => import('views/user/quickMessage/index.vue'), + meta: { + title: '快捷消息设置', + keepAlive: true, + AuthFlag: false, + isLogin: true + }, + }, { path: '/rent-termination', name: 'rent-termination', diff --git a/src/views/user/contract-manage/index.vue b/src/views/user/contract-manage/index.vue index bf8c5b0..d263e05 100644 --- a/src/views/user/contract-manage/index.vue +++ b/src/views/user/contract-manage/index.vue @@ -96,7 +96,7 @@ > - + @@ -166,41 +166,22 @@ - - - 支持格式:word.单个文件大小不能超过2M,最多可上传1张 - - - - - - -
- - - -
+ + + + +
@@ -221,7 +202,8 @@ - - 资讯信息 - - - - - - - - - - + + + - - + + @@ -287,11 +260,10 @@ import { useStore } from 'store/user' const store = useStore() import { mainStore } from 'store/main' // 引入富文本组件 -import QuillEditor from 'vue-quill-editor' -// 引入富文本组件样式 -import 'quill/dist/quill.core.css' -import 'quill/dist/quill.snow.css' -import 'quill/dist/quill.bubble.css' +import { QuillEditor } from '@vueup/vue-quill'; +import "quill/dist/quill.core.css"; +import "quill/dist/quill.snow.css"; +import "quill/dist/quill.bubble.css"; const store2 = mainStore() const isViewForm = ref(false) @@ -308,6 +280,7 @@ import { editContractApi, //修改 delContractApi, //删除 updateStatus, //修改状态 + getContractSelectList, //合同选择列表 } from 'http/api/contract-manage' import { InfoFilled, UploadFilled } from '@element-plus/icons-vue' const total = ref(0) @@ -325,6 +298,8 @@ const queryParams: any = reactive({ const addAndEditForm = ref({ id: '', contractName: '', + content:'', + contentId:'', fileInfoList: [], fileInfoTempList: [], bmFileInfoList: [], @@ -381,12 +356,35 @@ const settleinTitle = ref('') // 合同新增弹框显示隐藏 const dialogVisibleSettlein: any = ref(false) const dialogVisibleSettleinEdit: any = ref(false) +const contractList:any = ref([]) // 合同新增 -const addContract = () => { +const addContract = async() => { settleinTitle.value = '合同新建' + contractList.value = [] + const res: any = await getContractSelectList() + if(res.data.length>0 ){ + res.data.forEach((item:any) => { + contractList.value.push({ + id:item.id, + templateName:item.templateName, + content:item.content, + }) + }); + } dialogVisibleSettlein.value = true; } +const handleSelectChange = (selectedId:number) => { + console.log('111111',selectedId) + let selectedContract = '' + contractList.value.forEach((item:any) => { + if (item.id === selectedId) { + selectedContract = item.content; + } + }); + console.log('2222',selectedContract) + addAndEditForm.value.content = selectedContract; +} // 合同编辑 const onContract = (row: any) => { addAndEditForm.value.id = row.id @@ -420,16 +418,14 @@ const onFileChange = (fileList: any) => { const addAndEditFormRules = reactive({ contractName: [{ required: true, message: '请输入合同名称', trigger: 'blur' }], - fileInfoList: [{ required: true, message: '请上传合同附件', trigger: 'blur' }], + contentId: [{ required: true, message: '请选择合同模板', trigger: 'blur' }], }) // 提交 const onSubmit = () => { - addAndEditForm.value.fileInfoList = addAndEditForm.value.fileInfoTempList addAndEditFormRef.value.validate(async (valid: any) => { if (valid) { const SEN_API = settleinTitle.value === '合同修改' ? editContractApi : addContractApi - addAndEditForm.value.bmFileInfoList = addAndEditForm.value.fileInfoList const res: any = await SEN_API(addAndEditForm.value) if (res.code === 200) { ElMessage({ @@ -463,6 +459,12 @@ const onCancel = () => { const myQuillEditor = ref() +// 样式部分 +const toolbarStyle = { + width: '100%', // 与编辑工具器一样的宽度 + height: '50px', // 固定高度 +}; + // 工具栏配置 const toolbarOptions = ref([ ['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线 @@ -471,7 +473,7 @@ const toolbarOptions = ref([ [{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表 [{ script: 'sub' }, { script: 'super' }], // 上标/下标 [{ indent: '-1' }, { indent: '+1' }], // 缩进 - // [{'direction': 'rtl'}], // 文本方向 +// [{'direction': 'rtl'}], // 文本方向 [{ size: ['small', false, 'large', 'huge'] }], // 字体大小 [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题 [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 @@ -481,11 +483,11 @@ const toolbarOptions = ref([ const editorOption = ref({ // 编辑框操作事件 theme: 'snow', // or 'bubble' - placeholder: '请输入资讯内容...', + // placeholder: '请输入资讯内容...', modules: { toolbar: { container: toolbarOptions, - } + }, } }) const dataForm = ref( { @@ -503,6 +505,9 @@ onMounted(() => {