From 8afe4acaafb4b42649155f300e24c0fb082ba971 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 09 八月 2022 16:06:52 +0800 Subject: [PATCH] 2022-08-09 --- src/locales/zh-CN/model.js | 1 src/templates/zshare/modalform/index.jsx | 26 ++++++++ src/menu/sysinterface/settingform/simplescript/index.jsx | 2 src/locales/en-US/model.js | 1 src/menu/components/table/edit-table/columns/tableIn/index.jsx | 4 src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx | 2 src/templates/zshare/formconfig.jsx | 89 +++++++++++++++++++++++++++++ src/templates/zshare/customscript/index.jsx | 2 src/templates/zshare/verifycard/index.jsx | 14 ++-- src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx | 4 src/menu/datasource/verifycard/index.jsx | 2 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx | 2 12 files changed, 128 insertions(+), 21 deletions(-) diff --git a/src/locales/en-US/model.js b/src/locales/en-US/model.js index 14aaded..644baf0 100644 --- a/src/locales/en-US/model.js +++ b/src/locales/en-US/model.js @@ -148,7 +148,6 @@ 'model.form.color': 'Color', 'model.query.delete': '纭畾鍒犻櫎鍚�?', 'header.form.status.change': '鐘舵�佸垏鎹�', - 'model.status.open': '鍚敤', 'model.form.funcbutton': 'Function button', 'model.form.execMode': 'Mode', 'header.form.paste': '绮樿创', diff --git a/src/locales/zh-CN/model.js b/src/locales/zh-CN/model.js index bdb362a..518e6de 100644 --- a/src/locales/zh-CN/model.js +++ b/src/locales/zh-CN/model.js @@ -148,7 +148,6 @@ 'model.form.color': '棰滆壊', 'model.query.delete': '纭畾鍒犻櫎鍚�?', 'header.form.status.change': '鐘舵�佸垏鎹�', - 'model.status.open': '鍚敤', 'model.form.funcbutton': '鍔熻兘鎸夐挳', 'model.form.execMode': '鎵ц鏂瑰紡', 'header.form.paste': '绮樿创', diff --git a/src/menu/components/table/edit-table/columns/tableIn/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/index.jsx index 61698fb..3f1c391 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/index.jsx @@ -86,7 +86,7 @@ ) : ( <div> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> </div> ) @@ -139,7 +139,7 @@ ) : ( <div> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> </div> ) diff --git a/src/menu/datasource/verifycard/index.jsx b/src/menu/datasource/verifycard/index.jsx index 26d4e9d..e692605 100644 --- a/src/menu/datasource/verifycard/index.jsx +++ b/src/menu/datasource/verifycard/index.jsx @@ -133,7 +133,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) diff --git a/src/menu/sysinterface/settingform/simplescript/index.jsx b/src/menu/sysinterface/settingform/simplescript/index.jsx index 42a4ba4..5392bbd 100644 --- a/src/menu/sysinterface/settingform/simplescript/index.jsx +++ b/src/menu/sysinterface/settingform/simplescript/index.jsx @@ -72,7 +72,7 @@ ) : ( <div> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleTwoTone style={{marginLeft: '5px'}} twoToneColor="#52c41a" /> </div> ) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx index 50df4a3..5dc137d 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx @@ -161,7 +161,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -212,7 +212,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx index fa8b86d..489a1b5 100644 --- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx @@ -161,7 +161,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) diff --git a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx index 4dad8fb..0f40714 100644 --- a/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx +++ b/src/templates/sharecomponent/settingcomponent/settingform/simplescript/index.jsx @@ -76,7 +76,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) diff --git a/src/templates/zshare/customscript/index.jsx b/src/templates/zshare/customscript/index.jsx index f68cca2..524e97a 100644 --- a/src/templates/zshare/customscript/index.jsx +++ b/src/templates/zshare/customscript/index.jsx @@ -64,7 +64,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index b29b351..4228f90 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -3390,13 +3390,16 @@ tooltip: '鏂囦欢鍘嬬缉鎴朾ase64蹇呴』涓哄浘鐗囷紝鍥剧墖鏍煎紡涓簀pg銆乸ng銆乬if 鎴� jpeg銆傛敞锛歜ase64鍙彲涓婁紶涓�寮犲浘鐗囥��', options: [{ value: 'false', - text: '鏃�' + text: '榛樿' }, { value: 'true', text: '鍘嬬缉' }, { value: 'base64', text: 'base64' + }, { + value: 'oss', + text: 'oss涓婁紶' }] }, { @@ -3411,6 +3414,90 @@ required: true }, { + type: 'radio', + key: 'miniSet', + label: '灏忕▼搴忚缃�', + initVal: card.miniSet || 'default', + options: [{ + value: 'default', + text: '榛樿' + }, { + value: 'custom', + text: '鑷畾涔�' + }], + forbid: appType !== 'mob' + }, + { + type: 'checkbox', + key: 'mediaType', + label: '鏂囦欢绫诲瀷', + initVal: card.mediaType || ['image', 'video'], + options: [{ + value: 'image', + text: '鍥剧墖' + }, { + value: 'video', + text: '瑙嗛' + }], + required: true, + forbid: appType !== 'mob' + }, + { + type: 'checkbox', + key: 'sourceType', + label: '鏂囦欢鏉ユ簮', + initVal: card.sourceType || ['album', 'camera'], + options: [{ + value: 'album', + text: '鐩稿唽閫夋嫨' + }, { + value: 'camera', + text: '鐩告満鎷嶆憚' + }], + required: true, + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'sizeType', + label: '鍥剧墖鍘嬬缉', + initVal: card.sizeType || 'compressed', + options: [{ + value: 'compressed', + text: '鏄�' + }, { + value: 'original', + text: '鍚�' + }], + forbid: appType !== 'mob' + }, + { + type: 'number', + key: 'maxDuration', + label: '鎷嶆憚鏃堕暱', + initVal: card.maxDuration || 10, + tooltip: '鎷嶆憚瑙嗛鏈�闀挎媿鎽勬椂闂达紝鍗曚綅绉掋�傛椂闂磋寖鍥翠负 3s 鑷� 60s 涔嬮棿銆備笉闄愬埗鐩稿唽銆�', + min: 3, + max: 60, + precision: 0, + required: true, + forbid: appType !== 'mob' + }, + { + type: 'radio', + key: 'camera', + label: '鎽勫儚澶�', + initVal: card.camera || 'back', + options: [{ + value: 'back', + text: '鍚庣疆' + }, { + value: 'front', + text: '鍓嶇疆' + }], + forbid: appType !== 'mob' + }, + { type: 'number', key: 'span', min: 1, diff --git a/src/templates/zshare/modalform/index.jsx b/src/templates/zshare/modalform/index.jsx index 4c16e8a..fc1cc3c 100644 --- a/src/templates/zshare/modalform/index.jsx +++ b/src/templates/zshare/modalform/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { fromJS } from 'immutable' -import { Form, Row, Col, Input, Select, Radio, notification, InputNumber, Tooltip } from 'antd' +import { Form, Row, Col, Input, Select, Radio, notification, InputNumber, Tooltip, Checkbox } from 'antd' import { QuestionCircleOutlined } from '@ant-design/icons' import { formRule } from '@/utils/option.js' @@ -27,7 +27,7 @@ checkcard: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'span', 'labelwidth', 'display', 'tooltip', 'extra', 'width', 'multiple', 'splitline', 'marginTop', 'marginBottom'], multiselect: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'fieldlength', 'span', 'labelwidth', 'tooltip', 'extra', 'marginTop', 'marginBottom'], link: ['initval', 'readonly', 'required', 'hidden', 'readin', 'resourceType', 'declare', 'setAll', 'linkField', 'linkSubField', 'span', 'labelwidth', 'tooltip', 'extra', 'emptyText', 'enter', 'splitline', 'dropdown', 'marginTop', 'marginBottom'], - fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'splitline', 'marginTop', 'marginBottom'], + fileupload: ['readonly', 'required', 'readin', 'fieldlength', 'maxfile', 'fileType', 'span', 'labelwidth', 'tooltip', 'extra', 'compress', 'miniSet', 'splitline', 'marginTop', 'marginBottom'], switch: ['initval', 'openVal', 'closeVal', 'openText', 'closeText', 'readonly', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'splitline', 'marginTop', 'marginBottom'], date: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'mode', 'splitline', 'marginTop', 'marginBottom', 'minDate', 'maxDate', 'precision'], datemonth: ['initval', 'readonly', 'required', 'hidden', 'readin', 'span', 'labelwidth', 'tooltip', 'extra', 'declareType', 'splitline', 'marginTop', 'marginBottom'], @@ -232,6 +232,19 @@ shows.push('limit', 'rduri', 'proRduri') } else { shows.push('suffix') + } + if (this.record.miniSet === 'custom') { + shows.push('mediaType', 'sourceType') + + if (this.record.sourceType.includes('camera') && this.record.mediaType.includes('video')) { + shows.push('maxDuration') + } + if (this.record.mediaType.includes('image')) { + shows.push('sizeType') + } + if (this.record.sourceType.includes('camera')) { + shows.push('camera') + } } } else if (type === 'textarea') { if (this.record.encryption === 'false') { @@ -638,6 +651,15 @@ ) })} </Radio.Group> + } else if (item.type === 'checkbox') { + rules = [ + { required: item.required, message: dict['form.required.select'] + item.label + '!' } + ] + initVal = item.initVal + + content = <Checkbox.Group onChange={(values) => {this.optionChange(item.key, values)}}> + {item.options.map(option => <Checkbox key={option.value} value={option.value}>{option.text}</Checkbox>)} + </Checkbox.Group> } else if (item.type === 'codemirror') { rules = [ { required: item.required, message: dict['form.required.input'] + item.label + '!' } diff --git a/src/templates/zshare/verifycard/index.jsx b/src/templates/zshare/verifycard/index.jsx index 118c3f0..9b40df1 100644 --- a/src/templates/zshare/verifycard/index.jsx +++ b/src/templates/zshare/verifycard/index.jsx @@ -114,7 +114,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -150,7 +150,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -224,7 +224,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -276,7 +276,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -345,7 +345,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -412,7 +412,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) @@ -513,7 +513,7 @@ ) : ( <div style={{color: '#26C281'}}> - {this.props.dict['model.status.open']} + 鍚敤 <CheckCircleOutlined style={{marginLeft: '5px'}}/> </div> ) -- Gitblit v1.8.0