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 | 263 +++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 216 insertions(+), 47 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
index 28df3b8..39c0963 100644
--- a/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
+++ b/Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -1,75 +1,244 @@
<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" v-for="item in SearchObject.searchData" ></el-option>
+ <!-- 闆嗘垚鏃ュ織 浠诲姟 鏁版嵁鍏ㄩ儴鍏敤-->
+ <el-form-item label="闆嗘垚鏌ヨ:" size="small">
+ <el-select v-model="formInline.type" placeholder="璇烽�夋嫨鍒嗙被" @change="SelectChange">
+ <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="typeFlag" size="small">
- <el-select v-model="formInline.check" placeholder="璇烽�夋嫨鍒嗙被">
- <el-option label="1" value="0"></el-option>
- <el-option label="2" value="1"></el-option>
+ <!-- 闆嗘垚鏃ュ織 鏄惁鎴愬姛-->
+ <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 size="small" v-if="dateFlag">
+ <!-- 闆嗘垚鏃ュ織绫诲瀷-->
+ <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>
+ <el-option label="鍒嗙被鎺ㄩ��" value="pushClassifyData"></el-option>
+ <el-option label="缂栫爜鐢宠" value="applyCode"></el-option>
+ <el-option label="缂栫爜缁存姢" value="syncEditData"></el-option>
+ <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>
+ <el-option label="鍥炴敹" value="TakeBack"></el-option>
+ <el-option label="鍋滅敤" value="Disabled"></el-option>
+ </el-select>
+ </el-form-item>
+ <!-- 闆嗘垚浠诲姟 鍒涘缓鏃ユ湡 闆嗘垚鏃ュ織 璁板綍鏃堕棿-->
+ <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" >
- <el-input v-model="formInline.text" placeholder="璇疯緭鍏ュ唴瀹�" @keyup.enter.native="SaveHandler"></el-input>
+ <!-- 闆嗘垚浠诲姟 鏈�鍚庢帹閫佹椂闂�-->
+ <el-form-item v-if="status.type == 'task' && status.lastDateFlag" size="small">
+ <el-date-picker
+ v-model="formInline.lastDate"
+ placeholder="閫夋嫨鏃ユ湡鏃堕棿"
+ type="date">
+ </el-date-picker>
+ </el-form-item>
+ <!-- 鍏敤妯″潡-->
+ <!-- 杈撳叆鍐呭-->
+ <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 v-if="shouldShowButton" size="small">
+ <el-button size="small" type="success" @click="handleSearch">鏌ヨ</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
-import {getList} from "@/api/docking/loge";
+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'],
+ props: ['SearchObject', 'page', 'formInline', 'status'],
data() {
- return {
- typeFlag:false,
- dateFlag:false,
- formInline:{
- type:'',
- check:'',
- text:'',
- Date:''
- },
+ return {}
+ },
+ computed: {
+ //杈撳叆妗嗗垽鏂�
+ shouldShowInput() {
+ const isLogeType = this.status.type === 'loge';
+ const isTaskType = this.status.type === 'task';
+ const isDataType = this.status.type === 'data';
+ return (
+ (isLogeType && !this.status.stateFlag && !this.status.dateFlag && !this.status.typeFlag) ||
+ (isTaskType && !this.status.stateTaskDataFlag && !this.status.dateFlag && !this.status.lastDateFlag && !this.status.sendTypeFlga) ||
+ (isDataType && !this.status.stateTaskDataFlag && !this.status.sendTypeFlga)
+ );
+ },
+ //鎸夐挳鍒ゆ柇
+ shouldShowButton() {
+ const isLogeType = this.status.type === 'loge';
+ const isTaskType = this.status.type === 'task';
+ const isDataType = this.status.type === 'data';
+ 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:{
- SelectChange(val){
- this.typeFlag = (this.SearchObject.type === 'loge' && val === 5);
- this.dateFlag = (this.SearchObject.type === 'loge' && val === 6);
- // if(this.SearchObject.type === 'loge'){
- // if(val === 5){
- // this.typeFlag=true;
- // }else {
- // this.typeFlag=false;
- // }
- // if(val === 6){
- // this.dateFlag=true;
- // }else {
- // this.dateFlag=false;
- // }
- // }
+ methods: {
+ SelectChange(val) {
+ const logeType = this.status.type === 'loge';
+ const taskType = this.status.type === 'task';
+ const dataType = this.status.type === 'data';
+ this.status.typeFlag = logeType && val === 5;
+ this.status.dateFlag = (logeType && val === 6) || (taskType && val === 6);
+ this.status.stateFlag = logeType && val === 7;
+ this.status.lastDateFlag = taskType && val === 7;
+ 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;
- getList(this.page.currentPage, this.page.pageSize, {[name]: this.formInline.text}).then(res => {
- console.log(res);
- });
+ 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') {
+ requestApi(getLogoList);
+ }
+ //鏁版嵁
+ if (this.status.type == 'data') {
+ requestApi(getDataList);
+ }
+ //浠诲姟
+ 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 requestParams = {};
+ const requestApi = (api) => {
+ 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);
+ }
+ });
+ }
+ // 闆嗘垚鏃ュ織绫诲瀷
+ if (type === 'loge' && typeFlag) {
+ requestParams['conditionMap[type_like]'] = cut;
+ }
+ // 闆嗘垚鏃ュ織鏄惁鎴愬姛
+ if (type === 'loge' && stateFlag) {
+ requestParams['conditionMap[interfaceStatus_like]'] = state;
+ }
+ // 闆嗘垚浠诲姟 鏄惁鎺ㄩ�佹垚鍔� 闆嗘垚鏁版嵁 鏄惁鍒嗚В浠诲姟
+ if ((type === 'task' || type === 'data') && stateTaskDataFlag) {
+ requestParams['conditionMap[sendFlag_like]'] = stateTask;
+ }
+ // 闆嗘垚浠诲姟 鍒涘缓鏃ユ湡 鍜� 闆嗘垚鏃ュ織 璁板綍鏃堕棿
+ if ((type === 'loge' || type === 'task') && dateFlag) {
+ const formattedDate = this.$moment(Date).format('YYYY-M-D');
+ requestParams['conditionMap[createTime_like]'] = formattedDate;
+ }
+ // 闆嗘垚浠诲姟 鏈�鍚庢帹閫佹椂闂�
+ if (type === 'task' && lastDateFlag) {
+ const formattedDate = this.$moment(lastDate).format('YYYY-M-D');
+ requestParams['conditionMap[lastModifyTime_like]'] = formattedDate;
+ }
+ // 闆嗘垚浠诲姟 闆嗘垚鏁版嵁 鎺ㄩ�佺被鍨�
+ if ((type === 'task' || type === 'data') && sendTypeFlga) {
+ requestParams['conditionMap[sendType_like]'] = taskCut;
+ }
+
+ if (type == 'loge') {
+ requestApi(getLogoList);
+ }
+ if (type == 'data') {
+ requestApi(getDataList);
+ }
+ if (type == 'task') {
+ requestApi(getTaskList);
+ }
}
}
}
</script>
-<style scoped>
-
+<style lang="scss" scoped>
</style>
--
Gitblit v1.10.0