From 44a9317faaa363fba0e1ab6e32c64baf8479f7ea Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Mon, 26 Feb 2024 17:34:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=A4=96=E9=83=A8api?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=A5=E5=8F=A3/=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 4 +- package.json | 1 + public/index.html | 2 +- src/api/archiveUtilize/archiveUtilize.js | 10 +- src/utils/request.js | 10 +- .../archiveUtilize/archiveSearch/index.vue | 28 ++- .../archiveSearch/module/resultList.vue | 209 +++++++++++------- .../managementLibrary/index.vue | 9 +- .../collectionLibrary/index.vue | 20 +- .../components/archivesDetail/detail.vue | 11 +- vue.config.js | 21 +- 11 files changed, 215 insertions(+), 110 deletions(-) diff --git a/.env.production b/.env.production index 5413f47..e0c5f43 100644 --- a/.env.production +++ b/.env.production @@ -5,7 +5,7 @@ ENV = 'production' # VUE_APP_BASE_API = 'https://openapitest.aiyxlib.com' # VUE_APP_BASE_API = 'http://192.168.99.107:11100' # VUE_APP_BASE_API = 'http://27.19.215.77:11100' -VUE_APP_BASE_API = 'http://27.16.219.156:11100' +VUE_APP_BASE_API = 'http://27.16.212.58:11100' # 如果接口是 http 形式, wss 需要改为 ws -VUE_APP_WS_API = 'ws://27.16.219.156:11101' +VUE_APP_WS_API = 'ws://27.16.212.58:11100' VUE_APP_CAMERA_API = '192.168.99.107:3000' diff --git a/package.json b/package.json index f43b51c..c3330e1 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "connect": "3.6.6", "eslint": "5.15.3", "eslint-plugin-vue": "5.2.2", + "generate-asset-webpack-plugin": "^0.3.0", "http-proxy-middleware": "^0.19.1", "husky": "1.3.1", "lint-staged": "8.1.5", diff --git a/public/index.html b/public/index.html index 18e7a9e..304279d 100644 --- a/public/index.html +++ b/public/index.html @@ -7,9 +7,9 @@ <%= webpackConfig.name %> +
- diff --git a/src/api/archiveUtilize/archiveUtilize.js b/src/api/archiveUtilize/archiveUtilize.js index 37d2d5b..4c2fd6b 100644 --- a/src/api/archiveUtilize/archiveUtilize.js +++ b/src/api/archiveUtilize/archiveUtilize.js @@ -41,4 +41,12 @@ export function FetchSearchHistory(params) { }) } -export default { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCtgNo, FetchResearch, FetchSearchHistory } +// 档案高级检索 +export function FetchSeniorSearch(params) { + return request({ + url: 'api/archivesUtilize/seniorSearch' + '?' + qs.stringify(params, { indices: false }), + method: 'get' + }) +} + +export default { FetchInitSearchFonds, FetchInitSearchCategory, FetchInitSearchArchiveCtgNo, FetchResearch, FetchSearchHistory, FetchSeniorSearch } diff --git a/src/utils/request.js b/src/utils/request.js index a20cc88..000bea5 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -8,10 +8,16 @@ import Config from '@/settings' import Cookies from 'js-cookie' import { reject } from 'core-js/fn/promise' +const setAxiosBaseUrl = async() => { + const res = await axios.get('server-config.json') + const { BASE_URL } = res.data + service.defaults.baseURL = BASE_URL || ''// 这里的service为自己二次封装的请求,根据项目实际情况修改 +} + // 创建axios实例 const service = axios.create({ - baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/', // api 的 base_url - // baseURL: process.env.NODE_ENV === 'production' ? 'http://192.168.99.84:7070' : '/', // api 的 base_url + baseURL: process.env.NODE_ENV === 'production' ? setAxiosBaseUrl() : '/', // api 的 base_url + // baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/', // api 的 base_url timeout: Config.timeout // 请求超时时间 }) diff --git a/src/views/archiveUtilize/archiveSearch/index.vue b/src/views/archiveUtilize/archiveSearch/index.vue index 7a8b466..5df72ba 100644 --- a/src/views/archiveUtilize/archiveSearch/index.vue +++ b/src/views/archiveUtilize/archiveSearch/index.vue @@ -96,7 +96,7 @@ - + @@ -125,7 +125,7 @@ export default { }, { label: '不包含', - value: 'not like' + value: 'not like' }, { label: '等于', @@ -137,11 +137,11 @@ export default { }, { label: '为空', - value: 'is null' + value: 'is null' }, { label: '不为空', - value: 'is not null' + value: 'is not null' }, { label: '大于', @@ -172,7 +172,12 @@ export default { currentIndex: null, connectorList: ['并且', '或者', '(', ')'], historyKeyword: null, - tagIndex: 0 + tagIndex: 0, + page: { + page: 1, + size: 10, + total: 0 + } } }, computed: { @@ -358,7 +363,13 @@ export default { } }).join(' ') console.log('wheresql', wheresql) - this.isResult = true + if (wheresql) { + this.isResult = true + this.$nextTick(() => { + this.$refs.resultListRef.condition = wheresql + this.$refs.resultListRef.getSeniorSearch(wheresql) + }) + } } else { this.$message({ message: '条件之间缺少或且连接符', type: 'error', offset: 8 }) return false @@ -389,10 +400,13 @@ export default { this.tagIndex = index }, getSearchHistory() { - FetchSearchHistory({ pagesize: 10 }).then(res => { + FetchSearchHistory({ pagesize: 50 }).then(res => { this.historyKeyword = res }) }, + commonSearch() { + this.isCommon = true + }, closeResult() { this.isResult = false this.isCommon = false diff --git a/src/views/archiveUtilize/archiveSearch/module/resultList.vue b/src/views/archiveUtilize/archiveSearch/module/resultList.vue index a113c10..5a59a26 100644 --- a/src/views/archiveUtilize/archiveSearch/module/resultList.vue +++ b/src/views/archiveUtilize/archiveSearch/module/resultList.vue @@ -45,9 +45,9 @@ placeholder="快速检索" suffix-icon="el-icon-search" /> -
+ -->
- + 搜索
高级检索
-
+
检索 “{{ keywords }}” 成功获得{{ page.total }}条结果
检索成功获得{{ page.total }}条结果

高级检索 点击查看检索条件

-
-
-
案卷

{{ item.maintitle }}

-

-

-

档号:{{ item.archiveNo }}

-

全宗:{{ item.fondsName }}

-

档案门类:{{ item.categoryName }}

-

档案分类:{{ item.archivesClassName }}

-
-
- 实体 - 标签 - 装盒 - 入库 - 借阅 -
-
- 查看详情 - - +
+
+
+
{{ getFileType(item.categoryLevel) }}

{{ item.maintitle }}

+

+

+

档号:{{ item.archiveNo }}

+

全宗:{{ item.fondsName }}

+

档案门类:{{ item.categoryName }}

+

档案分类:{{ item.archivesClassName }}

+
+
+ 实体 + 标签 + 装盒 + 入库 + 借阅 +
+
+ 查看详情 + + +
+ + +
- - -
- +