From 8e4170267e8e5dc0c6b340b7ed119460324e2799 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周三, 21 5月 2025 13:32:33 +0800 Subject: [PATCH] 222 --- PipeLineLems/pipelinelems_web/src/widgets/WorkTask/Controllers/WorkTaskQueryDrawer.tsx | 238 +++++++++++++++++++++++++---------------------------------- 1 files changed, 102 insertions(+), 136 deletions(-) diff --git a/PipeLineLems/pipelinelems_web/src/widgets/WorkTask/Controllers/WorkTaskQueryDrawer.tsx b/PipeLineLems/pipelinelems_web/src/widgets/WorkTask/Controllers/WorkTaskQueryDrawer.tsx index a745033..3470564 100644 --- a/PipeLineLems/pipelinelems_web/src/widgets/WorkTask/Controllers/WorkTaskQueryDrawer.tsx +++ b/PipeLineLems/pipelinelems_web/src/widgets/WorkTask/Controllers/WorkTaskQueryDrawer.tsx @@ -20,8 +20,8 @@ FILTER_MODE_OPTIONS_NUM, FILTER_MODE_OPTIONS_BOOL } from '@/components/DyFormForHighQuery/DyFormForHighQueryOptions'; -// 寮曞叆鍏叡琛ㄥ崟宸ュ叿鏂囦欢 -import { collectFormDataForHighQuery,onResetForHighSelect,onResetForHighQuery } from '@/utils/myformUtils'; +// 寮曞叆鍏叡琛ㄥ崟宸ュ叿鏂囦欢 +import { collectFormDataForHighQuery,onResetForHighSelect,onResetForHighQuery } from '@/utils/myformUtils'; import { BOOLEAN_OPTIONS } from '@/utils/commonOptionConstants'; @@ -116,6 +116,84 @@ } }, { + label: '绠℃缂栫爜', + prop: 'pipeSpecCode', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ョ娈电紪鐮�', + highSelectAttrs:{ + prop: 'pipeSpecCode_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING + } + }, + { + label: '绠℃鍚嶇О', + prop: 'pipeSectionName', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ョ娈靛悕绉�', + highSelectAttrs:{ + prop: 'pipeSectionName_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING + } + }, + { + label: '绠℃鍨嬪彿', + prop: 'pipeSpecMode', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ョ娈靛瀷鍙�', + highSelectAttrs:{ + prop: 'pipeSpecMode_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING + } + }, + { + label: '宸ュ簭鍚嶇О', + prop: 'processName', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ュ伐搴忓悕绉�', + highSelectAttrs:{ + prop: 'processName_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING + } + }, + { + label: '鑸瑰彿', + prop: 'shipNumber', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ヨ埞鍙�', + highSelectAttrs:{ + prop: 'shipNumber_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING + } + }, + { + label: '椤圭洰鍙�', + prop: 'projectNumber', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ラ」鐩彿', + highSelectAttrs:{ + prop: 'projectNumber_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING + } + }, + { label: '璁″垝鐘舵��', prop: 'workPlanStatus', el: 'select', @@ -143,6 +221,19 @@ el: 'select', placeholder: '璇烽�夋嫨', options:FILTER_MODE_OPTIONS_BOOL + } + }, + { + label: '宸ヨ壓娴佸悜缂栧彿', + prop: 'processRouteNumber', + el: 'input', + //disabled: disabled, + placeholder: '璇疯緭鍏ュ伐鑹烘祦鍚戠紪鍙�', + highSelectAttrs:{ + prop: 'processRouteNumber_FilterMode', + el: 'select', + placeholder: '璇烽�夋嫨', + options:FILTER_MODE_OPTIONS_STRING } }, { @@ -452,45 +543,6 @@ } }, { - label: '鑸瑰彿', - prop: 'shipNumber', - el: 'input', - //disabled: disabled, - placeholder: '璇疯緭鍏ヨ埞鍙�', - highSelectAttrs:{ - prop: 'shipNumber_FilterMode', - el: 'select', - placeholder: '璇烽�夋嫨', - options:FILTER_MODE_OPTIONS_STRING - } - }, - { - label: '椤圭洰鍙�', - prop: 'projectNumber', - el: 'input', - //disabled: disabled, - placeholder: '璇疯緭鍏ラ」鐩彿', - highSelectAttrs:{ - prop: 'projectNumber_FilterMode', - el: 'select', - placeholder: '璇烽�夋嫨', - options:FILTER_MODE_OPTIONS_STRING - } - }, - { - label: '宸ュ簭鍚嶇О', - prop: 'processName', - el: 'input', - //disabled: disabled, - placeholder: '璇疯緭鍏ュ伐搴忓悕绉�', - highSelectAttrs:{ - prop: 'processName_FilterMode', - el: 'select', - placeholder: '璇烽�夋嫨', - options:FILTER_MODE_OPTIONS_STRING - } - }, - { label: '绠′欢缂栫爜', prop: 'pipeFittingCode', el: 'input', @@ -511,32 +563,6 @@ placeholder: '璇疯緭鍏ラ『搴忓彿', highSelectAttrs:{ prop: 'preSerialNumber_FilterMode', - el: 'select', - placeholder: '璇烽�夋嫨', - options:FILTER_MODE_OPTIONS_STRING - } - }, - { - label: '绠℃缂栫爜', - prop: 'pipeSpecCode', - el: 'input', - //disabled: disabled, - placeholder: '璇疯緭鍏ョ娈电紪鐮�', - highSelectAttrs:{ - prop: 'pipeSpecCode_FilterMode', - el: 'select', - placeholder: '璇烽�夋嫨', - options:FILTER_MODE_OPTIONS_STRING - } - }, - { - label: '绠℃鍚嶇О', - prop: 'pipeSectionName', - el: 'input', - //disabled: disabled, - placeholder: '璇疯緭鍏ョ娈靛悕绉�', - highSelectAttrs:{ - prop: 'pipeSectionName_FilterMode', el: 'select', placeholder: '璇烽�夋嫨', options:FILTER_MODE_OPTIONS_STRING @@ -594,19 +620,6 @@ placeholder: '璇疯緭鍏ユ潗璐�', highSelectAttrs:{ prop: 'material_FilterMode', - el: 'select', - placeholder: '璇烽�夋嫨', - options:FILTER_MODE_OPTIONS_STRING - } - }, - { - label: '宸ヨ壓娴佸悜缂栧彿', - prop: 'processRouteNumber', - el: 'input', - //disabled: disabled, - placeholder: '璇疯緭鍏ュ伐鑹烘祦鍚戠紪鍙�', - highSelectAttrs:{ - prop: 'processRouteNumber_FilterMode', el: 'select', placeholder: '璇烽�夋嫨', options:FILTER_MODE_OPTIONS_STRING @@ -748,30 +761,11 @@ const check = isEqual(initiateData.value, data) return check } -// /** -// * 鑾峰彇琛ㄥ崟鏁版嵁 - 浼樺寲鐗� -// */ -// const commonGetFormData = () => { -// const data = {}; - -// // 閬嶅巻琛ㄥ崟閰嶇疆鏀堕泦鏁版嵁 -// formItems.forEach(item => { -// // 鏀堕泦鍩虹瀛楁 -// data[item.prop] = formData.value[item.prop] || ''; - -// // 鏀堕泦杩囨护妯″紡瀛楁 -// if (item.highSelectAttrs && item.highSelectAttrs.prop) { -// const filterModeProp = item.highSelectAttrs.prop; -// data[filterModeProp] = formData.value[filterModeProp] || ''; -// } -// }); - -// return data; -// } + const onClose = (done: () => void) => { if (visible.value) { visible.value = false - const data =collectFormDataForHighQuery(formItems,formData); + const data =collectFormDataForHighQuery(formItems,formData); ctx.emit('close', data) } } @@ -779,48 +773,20 @@ * 纭鏌ヨ */ const onConfirmQuery = async () => { - const data =collectFormDataForHighQuery(formItems,formData); + const data =collectFormDataForHighQuery(formItems,formData); ctx.emit('confirmQuery', data) } - // /** - // * 閲嶇疆鍏叡select鏌ヨ - // */ - // const onResetForHighSelect = () => { - // // 閬嶅巻鎵�鏈夎〃鍗曞瓧娈� - // formItems.forEach(item => { - // // 妫�鏌ュ瓧娈垫槸鍚︽湁楂樼骇鏌ヨ鐨勮繃婊ゆā寮忛厤缃� - // if (item.highSelectAttrs && item.highSelectAttrs.prop) { - // const filterModeProp = item.highSelectAttrs.prop; - // const options = item.highSelectAttrs.options || []; - - // // 濡傛灉瀛樺湪閫夐」锛屽垯璁剧疆涓虹涓�涓�夐」鐨勫�� - // if (options.length > 0) { - // // 鍋囪閫夐」鏍煎紡涓� { value, label } 鎴栫被浼肩粨鏋� - // const firstValue = options[0].value !== undefined ? options[0].value : options[0]; - // formData.value[filterModeProp] = firstValue; - // } - // } - // }); - // } /** * 閲嶇疆鏌ヨ - 浼樺寲鐗� */ const onReset = async () => { - // // 1. 娓呯┖鎵�鏈夊熀纭�瀛楁锛堜笉鍖呭惈杩囨护妯″紡瀛楁锛� - // const baseFields = formItems.reduce((acc, item) => { - // acc[item.prop] = ''; - // return acc; - // }, {}); + // 1. 娓呯┖鎵�鏈夊熀纭�瀛楁锛堜笉鍖呭惈杩囨护妯″紡瀛楁锛�,搴旂敤鍩虹瀛楁鍒濆鍊� + onResetForHighQuery(formItems,formData); - // // 2. 搴旂敤鍩虹瀛楁鍒濆鍊� - // formData.value = { ...baseFields }; - - onResetForHighQuery(formItems,formData); + // 2. 浣跨敤鍘熸湁鏂规硶閲嶇疆杩囨护妯″紡瀛楁 + onResetForHighSelect(formItems,formData); - // 3. 浣跨敤鍘熸湁鏂规硶閲嶇疆杩囨护妯″紡瀛楁 - onResetForHighSelect(formItems,formData); // 淇濈暀鍘熸湁鏂规硶璋冪敤 - - // 4. 鍚戠埗缁勪欢鍙戦�佽嚜瀹氫箟浜嬩欢 + // 3. 鍚戠埗缁勪欢鍙戦�佽嚜瀹氫箟浜嬩欢 ctx.emit('restQuery'); } @@ -855,7 +821,7 @@ } commonQueryEnumForFrom() - onResetForHighSelect(formItems,formData);//閲嶇疆鍏叡select鏌ヨ + onResetForHighSelect(formItems,formData);//閲嶇疆鍏叡select鏌ヨ /** * 寮圭獥鎵撳紑鑾峰彇璇︽儏 */ -- Gitblit v1.9.3