From 4470052c3b6bdeb18e45987f8aa293d1e93d0552 Mon Sep 17 00:00:00 2001
From: Ludc <2870569285@qq.com>
Date: 星期二, 18 十一月 2025 11:59:12 +0800
Subject: [PATCH] 所有文件上传接口增加文件安全校验逻辑。
---
Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue | 139 ++++++++++++++++++++++++++++++----------------
1 files changed, 90 insertions(+), 49 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
index bfb2231..39c0963 100644
--- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
+++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -1,20 +1,21 @@
<template>
- <div style="display: flex" >
+ <div style="display: flex">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
-<!-- 闆嗘垚鏃ュ織 浠诲姟 鏁版嵁鍏ㄩ儴鍏敤-->
+ <!-- 闆嗘垚鏃ュ織 浠诲姟 鏁版嵁鍏ㄩ儴鍏敤-->
<el-form-item label="闆嗘垚鏌ヨ:" size="small">
<el-select v-model="formInline.type" placeholder="璇烽�夋嫨鍒嗙被" @change="SelectChange">
- <el-option :label="item.label" :value="item.value" :key="item.value" v-for="(item,index) in SearchObject.searchData"></el-option>
+ <el-option v-for="(item,index) in SearchObject.searchData" :key="item.value" :label="item.label"
+ :value="item.value"></el-option>
</el-select>
</el-form-item>
-<!-- 闆嗘垚鏃ュ織 鏄惁鎴愬姛-->
+ <!-- 闆嗘垚鏃ュ織 鏄惁鎴愬姛-->
<el-form-item v-if="(status.type == 'loge' && status.stateFlag)" size="small">
<el-select v-model="formInline.state" placeholder="璇烽�夋嫨鐘舵��">
<el-option label="鏄�" value="true"></el-option>
<el-option label="鍚�" value="false"></el-option>
</el-select>
</el-form-item>
-<!-- 闆嗘垚鏃ュ織绫诲瀷-->
+ <!-- 闆嗘垚鏃ュ織绫诲瀷-->
<el-form-item v-if="(status.type == 'loge' && status.typeFlag)" size="small">
<el-select v-model="formInline.cut" placeholder="璇烽�夋嫨绫诲瀷">
<el-option label="鏁版嵁鎺ㄩ��" value="pushData"></el-option>
@@ -24,17 +25,20 @@
<el-option label="鍒嗙被鏌ヨ" value="queryClassify"></el-option>
<el-option label="鍚紪鐮佽鍒欑殑鍒嗙被鏌ヨ" value="queryClassifyRule"></el-option>
<el-option label="鏁版嵁鏌ヨ" value="queryData"></el-option>
+ <el-option label="鏍囧噯鐢宠" value="applyCodeForBZ"></el-option>
+ <el-option label="閮ㄩ棬鐢宠" value="syncDataForOrg"></el-option>
+ <el-option label="浜哄憳鐢宠" value="syncDataForPerson"></el-option>
</el-select>
</el-form-item>
-<!-- 闆嗘垚浠诲姟 鏄惁鎺ㄩ�佹垚鍔�
-闆嗘垚鏁版嵁 鏄惁鍒嗚В浠诲姟-->
+ <!-- 闆嗘垚浠诲姟 鏄惁鎺ㄩ�佹垚鍔�
+ 闆嗘垚鏁版嵁 鏄惁鍒嗚В浠诲姟-->
<el-form-item v-if="((status.type == 'task' || status.type == 'data')&& status.stateTaskDataFlag)" size="small">
<el-select v-model="formInline.stateTask" placeholder="璇烽�夋嫨鐘舵��">
<el-option label="鏄�" value="true"></el-option>
<el-option label="鍚�" value="false"></el-option>
</el-select>
</el-form-item>
-<!-- 闆嗘垚浠诲姟 闆嗘垚鏁版嵁 鎺ㄩ�佺被鍨�-->
+ <!-- 闆嗘垚浠诲姟 闆嗘垚鏁版嵁 鎺ㄩ�佺被鍨�-->
<el-form-item v-if="((status.type === 'task' || status.type === 'data') && status.sendTypeFlga)" size="small">
<el-select v-model="formInline.taskCut" placeholder="璇烽�夋嫨鎺ㄩ�佺被鍨�">
<el-option label="鍙戝竷" value="Enabled"></el-option>
@@ -42,30 +46,30 @@
<el-option label="鍋滅敤" value="Disabled"></el-option>
</el-select>
</el-form-item>
-<!-- 闆嗘垚浠诲姟 鍒涘缓鏃ユ湡 闆嗘垚鏃ュ織 璁板綍鏃堕棿-->
- <el-form-item size="small" v-if="((status.type == 'loge' ||status.type == 'task') && status.dateFlag)">
+ <!-- 闆嗘垚浠诲姟 鍒涘缓鏃ユ湡 闆嗘垚鏃ュ織 璁板綍鏃堕棿-->
+ <el-form-item v-if="((status.type == 'loge' ||status.type == 'task') && status.dateFlag)" size="small">
<el-date-picker
v-model="formInline.Date"
- type="date"
- placeholder="閫夋嫨鏃ユ湡鏃堕棿">
+ placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+ type="date">
</el-date-picker>
</el-form-item>
-<!-- 闆嗘垚浠诲姟 鏈�鍚庢帹閫佹椂闂�-->
- <el-form-item size="small" v-if="status.type == 'task' && status.lastDateFlag">
+ <!-- 闆嗘垚浠诲姟 鏈�鍚庢帹閫佹椂闂�-->
+ <el-form-item v-if="status.type == 'task' && status.lastDateFlag" size="small">
<el-date-picker
v-model="formInline.lastDate"
- type="date"
- placeholder="閫夋嫨鏃ユ湡鏃堕棿">
+ placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+ type="date">
</el-date-picker>
</el-form-item>
-<!-- 鍏敤妯″潡-->
-<!-- 杈撳叆鍐呭-->
- <el-form-item size="small" v-if="shouldShowInput">
- <el-input v-model="formInline.text" placeholder="鎸変笅鍥炶溅閿繘琛屾煡璇紒" @keyup.enter.native="SaveHandler"></el-input>
+ <!-- 鍏敤妯″潡-->
+ <!-- 杈撳叆鍐呭-->
+ <el-form-item v-if="shouldShowInput" size="small">
+ <el-input v-model.trim="formInline.text" placeholder="鎸変笅鍥炶溅閿繘琛屾煡璇紒" @keyup.enter.native="SaveHandler"></el-input>
</el-form-item>
-<!-- 鏌ヨ鎸夐挳-->
- <el-form-item size="small" v-if="shouldShowButton">
- <el-button type="success" size="small" @click="handleSearch">鏌ヨ</el-button>
+ <!-- 鏌ヨ鎸夐挳-->
+ <el-form-item v-if="shouldShowButton" size="small">
+ <el-button size="small" type="success" @click="handleSearch">鏌ヨ</el-button>
</el-form-item>
</el-form>
</div>
@@ -75,12 +79,12 @@
import {getLogoList} from "@/api/docking/loge";
import {getDataList} from "@/api/docking/data";
import {getTaskList} from "@/api/docking/task";
+
export default {
name: "VciDockingSearch",
- props:['SearchObject','page','formInline','status'],
+ props: ['SearchObject', 'page', 'formInline', 'status'],
data() {
- return {
- }
+ return {}
},
computed: {
//杈撳叆妗嗗垽鏂�
@@ -99,14 +103,14 @@
const isLogeType = this.status.type === 'loge';
const isTaskType = this.status.type === 'task';
const isDataType = this.status.type === 'data';
- return(
+ return (
(isLogeType && (this.status.dateFlag || this.status.stateFlag || this.status.typeFlag)) ||
(isTaskType && (this.status.stateTaskDataFlag || this.status.dateFlag || this.status.lastDateFlag || this.status.sendTypeFlga)) ||
(isDataType && (this.status.stateTaskDataFlag || this.status.sendTypeFlga))
);
}
},
- methods:{
+ methods: {
SelectChange(val) {
const logeType = this.status.type === 'loge';
const taskType = this.status.type === 'task';
@@ -118,43 +122,80 @@
this.status.stateTaskDataFlag = (taskType && val === 8) || (dataType && val === 4);
this.status.sendTypeFlga = (taskType && val === 5) || (dataType && val === 3);
},
- SaveHandler(){
- let name = this.SearchObject.searchData[this.formInline.type].prop;
- const requestApi = (api) => {
- api(this.page.currentPage, this.page.pageSize,'createTime','desc',{[`conditionMap[${name}_like]`]: this.formInline.text}).then(res => {
- if(!res.data.data.records){
- this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�')
- }else {
- let Data=res.data.data;
- this.$emit('getList',Data);
- }
- });
+ SaveHandler() {
+ let searchDataItem = Object.values(this.SearchObject.searchData).find(item => item.value === this.formInline.type);
+ let name = searchDataItem ? searchDataItem.prop : null;
+ if (!searchDataItem) {
+ this.$message.error('鏈壘鍒板搴旀悳绱㈢被鍨嬭鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
}
+ const requestApi = (api) => {
+ api(1, 20, 'createTime', 'desc', {[`conditionMap[${name}_like]`]: this.formInline.text})
+ .then(res => {
+ if (!res.data.data.records) {
+ this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�');
+ } else {
+ let Data = res.data.data;
+ this.$emit('getList', Data);
+ }
+ });
+ }
+
//鏃ュ織
- if(this.status.type=='loge'){
+ if (this.status.type == 'loge') {
requestApi(getLogoList);
}
//鏁版嵁
- if(this.status.type=='data'){
+ if (this.status.type == 'data') {
requestApi(getDataList);
}
//浠诲姟
- if(this.status.type=='task'){
+ if (this.status.type == 'task') {
+ requestApi(getTaskList);
+ }
+ },
+ SaveSearchHandler() {
+ let searchDataItem = Object.values(this.SearchObject.searchData).find(item => item.value === this.formInline.type);
+ let name = searchDataItem ? searchDataItem.prop : null;
+ // if (!searchDataItem) {
+ // this.$message.error('鏈壘鍒板搴旀悳绱㈢被鍨嬭鏌ョ湅鎺у埗鍙拌緭鍑猴紒')
+ // }
+ const requestApi = (api) => {
+ api(this.page.currentPage, this.page.pageSize, 'createTime', 'desc', {[`conditionMap[${name}_like]`]: this.formInline.text})
+ .then(res => {
+ if (!res.data.data.records) {
+ this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�');
+ } else {
+ let Data = res.data.data;
+ this.$emit('getList', Data);
+ }
+ });
+ }
+
+ //鏃ュ織
+ if (this.status.type == 'loge') {
+ requestApi(getLogoList);
+ }
+ //鏁版嵁
+ if (this.status.type == 'data') {
+ requestApi(getDataList);
+ }
+ //浠诲姟
+ if (this.status.type == 'task') {
requestApi(getTaskList);
}
},
handleSearch() {
- const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga } = this.status;
- const { currentPage, pageSize } = this.page;
- const { cut, state, stateTask, Date, lastDate, taskCut } = this.formInline;
+ const {type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag, sendTypeFlga} = this.status;
+ const {currentPage, pageSize} = this.page;
+ const {cut, state, stateTask, Date, lastDate, taskCut} = this.formInline;
const requestParams = {};
const requestApi = (api) => {
- api(currentPage, pageSize,'createTime','desc',requestParams).then(res => {
- if(!res.data.data.records){
+ api(currentPage, pageSize, 'createTime', 'desc', requestParams).then(res => {
+ if (!res.data.data.records) {
this.$message.error('鏆傛湭鏌ュ埌鏁版嵁锛�');
} else {
- let Data=res.data.data;
- this.$emit('getList',Data);
+ let Data = res.data.data;
+ this.$emit('getList', Data);
}
});
}
--
Gitblit v1.10.0