From 83efc6981804354b6ca6ed7c0c2d9131fb667bbd Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Fri, 7 Jul 2023 09:01:50 +0800 Subject: [PATCH] 2023-7-7 --- src/api/reception/index.js | 9 ++ src/components/Reception/Navbar.vue | 3 +- src/components/Reception/Search.vue | 52 ++++--- src/utils/request.js | 1 - src/views/component/biaoqian.vue | 26 ++-- src/views/component/dialog.vue | 44 +++++- src/views/component/fujian.vue | 21 --- src/views/component/table.vue | 12 +- src/views/flow/flow.vue | 57 ++++++-- src/views/flow/formList.vue | 49 +++++-- src/views/reception/department/index.vue | 46 ++++-- src/views/reception/home/index.vue | 172 ++++++++++++++++------- src/views/reception/label/index.vue | 72 +++++++--- src/views/reception/list1/index.vue | 146 +++++++++++++++++-- src/views/reception/list2/index.vue | 148 +++++++++++++++++-- src/views/system/components/linkWith.vue | 2 +- 16 files changed, 662 insertions(+), 198 deletions(-) delete mode 100644 src/views/component/fujian.vue diff --git a/src/api/reception/index.js b/src/api/reception/index.js index e2f5141..d6111c5 100644 --- a/src/api/reception/index.js +++ b/src/api/reception/index.js @@ -45,3 +45,12 @@ export function materials (params, isLoading = false) { isLoading }) } + +export function detail (params, isLoading = false) { + return request({ + url: '/api/user/detail', + method: 'get', + params, + isLoading + }) +} diff --git a/src/components/Reception/Navbar.vue b/src/components/Reception/Navbar.vue index 9d208d0..4801973 100644 --- a/src/components/Reception/Navbar.vue +++ b/src/components/Reception/Navbar.vue @@ -3,7 +3,8 @@ + fit="contain" + @click="$router.push('/index')">
内部质量保证体系资料汇编
diff --git a/src/components/Reception/Search.vue b/src/components/Reception/Search.vue index cfb03e4..4c3e3bf 100644 --- a/src/components/Reception/Search.vue +++ b/src/components/Reception/Search.vue @@ -5,21 +5,21 @@ @@ -360,7 +360,6 @@ import drawer from "@/views/component/drawer.vue"; import imports from "./imports.vue"; import flow from "@/views/flow/flow.vue"; import biaoqian from "./biaoqian.vue"; -import fujian from "./fujian.vue"; import examine from "./examine.vue"; export default { components: { @@ -373,7 +372,6 @@ export default { flow, biaoqian, - fujian, }, mixins: [authMixin], provide: { @@ -499,7 +497,7 @@ export default { //初始表 let baseTable = new Map([ [ - "departments", + "material_shenhebumen_depts", async () => { const res = await listdept(); return res; @@ -527,7 +525,7 @@ export default { throw new Error("fields或relation格式错误"); } fieldRes?.data?.forEach((i, index) => { - i._relations = relation.find((j) => j.local_key === i.field); + i._relations = relation.find((j) => j.link_table_name.split('_')[1] === i.field); if (i.select_item && typeof i.select_item === "object") { let keys = Object.keys(i.select_item); i._params = keys.map((key) => { @@ -625,7 +623,7 @@ export default { return (
{row[link_with_name]?.map((o) => ( - {o?.name || o?.no || o?.value} +

{ o?.name || o?.no || o?.value || o?.biaoti || o?.mingcheng }

))}
); diff --git a/src/views/flow/flow.vue b/src/views/flow/flow.vue index 25aa707..3750221 100644 --- a/src/views/flow/flow.vue +++ b/src/views/flow/flow.vue @@ -9,13 +9,17 @@ ref="upload" :action="action" :file-list="fileList" - :auto-upload="false"> + :auto-upload="false" + :before-upload="beforeUpload" + :on-success="onSuccess" + :on-remove="onRemove" + :on-error="onError"> 选取文件 - 上传到服务器 + 上传到服务器
只能上传jpg/png文件,且不超过500kb
- + @@ -33,27 +37,50 @@ export default { data() { return { action: process.env.VUE_APP_UPLOAD_API, - selections: [], + fileList: [] } }, methods: { - selectedHandler (ids) { - this.selections = Array.from(new Set(ids)) + selectedHandler (selections) { + this.fileList.push(...selections) + this.$emit('update', this.fileList) + }, - this.$emit('update', this.selections) - } + beforeUpload (file) { + if (file.size / 1000 > 500) { + this.$message({ + type: "warning", + message: "上传图片大小超过500kb!", + }); + return false; + } + }, + + onSuccess (response, file, fileList) { + this.fileList = fileList; + this.$emit('update', this.fileList) + }, + + onRemove (file, fileList) { + this.fileList = fileList; + }, + + onError (err, file, fileList) { + this.fileList = fileList; + this.$message({ + type: "warning", + message: err, + }); + }, }, computed: { - fileList () { - return (this.file && this.fieldInfo?.field) ? this.file[this.fieldInfo.field] : [] - }, }, watch: { - form: { - handler(newVal) { - this.selections = newVal[this.fieldInfo.field] + 'form.id_material_fujian_uploads_material_id_relation': { + handler (newVal) { + this.fileList = newVal }, - immediate: true + deep: true } } } diff --git a/src/views/flow/formList.vue b/src/views/flow/formList.vue index 7c13234..9c0b5c1 100644 --- a/src/views/flow/formList.vue +++ b/src/views/flow/formList.vue @@ -22,7 +22,7 @@ @@ -31,9 +31,6 @@ diff --git a/src/views/reception/home/index.vue b/src/views/reception/home/index.vue index f5988b5..962f045 100644 --- a/src/views/reception/home/index.vue +++ b/src/views/reception/home/index.vue @@ -7,13 +7,22 @@
热点资料
+ + + + - @@ -22,12 +31,21 @@
- + + + +
@@ -42,62 +60,104 @@
-
-
-
{{ item }}
-
-
-
更多...
-
-
+ + + + -
-
- -
标签
-
- -
-
+ + +
@@ -123,4 +162,5 @@ export default { } } + diff --git a/src/views/reception/list1/index.vue b/src/views/reception/list1/index.vue index 2c3f043..7c0d557 100644 --- a/src/views/reception/list1/index.vue +++ b/src/views/reception/list1/index.vue @@ -1,34 +1,156 @@ diff --git a/src/views/reception/list2/index.vue b/src/views/reception/list2/index.vue index 9a1bb36..1b11ade 100644 --- a/src/views/reception/list2/index.vue +++ b/src/views/reception/list2/index.vue @@ -1,35 +1,157 @@ diff --git a/src/views/system/components/linkWith.vue b/src/views/system/components/linkWith.vue index 9c0c33d..f76d712 100644 --- a/src/views/system/components/linkWith.vue +++ b/src/views/system/components/linkWith.vue @@ -58,7 +58,7 @@ export default { } }}> { - this.localFields.map(i => { + [{field:'id',name:'id'},...this.localFields].map(i => { return ( )