Commit f6fac510 authored by 涂伟's avatar 涂伟

fix: '维保设备新增反馈样式选项'

parent 36fa8050
Pipeline #90928 passed with stages
...@@ -42,7 +42,7 @@ import { setAutoFreeze } from 'immer'; ...@@ -42,7 +42,7 @@ import { setAutoFreeze } from 'immer';
import styles from './optionEditModal.less'; import styles from './optionEditModal.less';
import { EditDeviceConfig } from '@/services/maintenance/api'; import { EditDeviceConfig } from '@/services/maintenance/api';
import { loadEventFields,GetFieldValueFromTable } from '@/services/flow/flow'; import { loadEventFields, GetFieldValueFromTable } from '@/services/flow/flow';
import { GetTaskSyncField } from '@/services/PatrolFeedback/api'; import { GetTaskSyncField } from '@/services/PatrolFeedback/api';
import { reloadTableFields } from '@/services/tablemanager/tablemanager'; import { reloadTableFields } from '@/services/tablemanager/tablemanager';
...@@ -101,29 +101,29 @@ const OptionEditModal = props => { ...@@ -101,29 +101,29 @@ const OptionEditModal = props => {
} }
}, [visible]); }, [visible]);
const changedFieldName = (value,index) => { const changedFieldName = (value, index) => {
let list = JSON.parse(JSON.stringify(filterList)) let list = JSON.parse(JSON.stringify(filterList))
list[index].fieldName = value list[index].fieldName = value
list[index].defaultValue = '' list[index].defaultValue = ''
console.log(list,'listlistlistlist'); console.log(list, 'listlistlistlist');
setFilterList(list) setFilterList(list)
} }
const changedDefaultValue = (value,index) => { const changedDefaultValue = (value, index) => {
let list = JSON.parse(JSON.stringify(filterList)) let list = JSON.parse(JSON.stringify(filterList))
list[index].defaultValue = value list[index].defaultValue = value
console.log(list,'listlistlistlist'); console.log(list, 'listlistlistlist');
setFilterList(list) setFilterList(list)
} }
const getDefaultValueOption = (index) => { const getDefaultValueOption = (index) => {
console.log(filterList,'filterListfilterListfilterList'); console.log(filterList, 'filterListfilterListfilterList');
GetFieldValueFromTable({ GetFieldValueFromTable({
fieldName: filterList[index].fieldName, fieldName: filterList[index].fieldName,
tableName: formObj.AccountTableName tableName: formObj.AccountTableName
}).then(res => { }).then(res => {
console.log(res,res.data.map(item => { console.log(res, res.data.map(item => {
return { value: item, label: item } return { value: item, label: item }
}),'ressssssssssssssss'); }), 'ressssssssssssssss');
setDefaultValueOption(res.data.map(item => { setDefaultValueOption(res.data.map(item => {
return { value: item, label: item } return { value: item, label: item }
})) }))
...@@ -649,7 +649,7 @@ const OptionEditModal = props => { ...@@ -649,7 +649,7 @@ const OptionEditModal = props => {
width: 180, width: 180,
}} }}
value={item.fieldName} value={item.fieldName}
onChange={(value)=>changedFieldName(value,index)} onChange={(value) => changedFieldName(value, index)}
options={filterOption} options={filterOption}
/> />
<div className={styles.uploadBtn}> <div className={styles.uploadBtn}>
...@@ -659,8 +659,8 @@ const OptionEditModal = props => { ...@@ -659,8 +659,8 @@ const OptionEditModal = props => {
width: 180, width: 180,
}} }}
value={item.defaultValue} value={item.defaultValue}
onFocus={()=>getDefaultValueOption(index)} onFocus={() => getDefaultValueOption(index)}
onChange={(value)=>changedDefaultValue(value,index)} onChange={(value) => changedDefaultValue(value, index)}
options={defaultValueOption} options={defaultValueOption}
allowClear={true} allowClear={true}
/> />
...@@ -684,6 +684,24 @@ const OptionEditModal = props => { ...@@ -684,6 +684,24 @@ const OptionEditModal = props => {
</div> </div>
</Item> </Item>
</Col> </Col>
<Col span={24}>
<Item
label="反馈样式"
name="FeedbackStyle"
labelCol={{ span: 5 }}
>
<Select
defaultValue={''}
style={{
width: 180,
}}
options={[
{label: '默认样式',value: ''},
{label: '定制非任务扫码巡检样式',value: 'customization'},
]}
/>
</Item>
</Col>
</Row> </Row>
</Form> </Form>
<Fieldselection <Fieldselection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment