Commit f6fac510 authored by 涂伟's avatar 涂伟

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

parent 36fa8050
Pipeline #90928 passed with stages
......@@ -42,7 +42,7 @@ import { setAutoFreeze } from 'immer';
import styles from './optionEditModal.less';
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 { reloadTableFields } from '@/services/tablemanager/tablemanager';
......@@ -101,29 +101,29 @@ const OptionEditModal = props => {
}
}, [visible]);
const changedFieldName = (value,index) => {
let list = JSON.parse(JSON.stringify(filterList))
const changedFieldName = (value, index) => {
let list = JSON.parse(JSON.stringify(filterList))
list[index].fieldName = value
list[index].defaultValue = ''
console.log(list,'listlistlistlist');
console.log(list, 'listlistlistlist');
setFilterList(list)
}
const changedDefaultValue = (value,index) => {
let list = JSON.parse(JSON.stringify(filterList))
const changedDefaultValue = (value, index) => {
let list = JSON.parse(JSON.stringify(filterList))
list[index].defaultValue = value
console.log(list,'listlistlistlist');
console.log(list, 'listlistlistlist');
setFilterList(list)
}
const getDefaultValueOption = (index) => {
console.log(filterList,'filterListfilterListfilterList');
console.log(filterList, 'filterListfilterListfilterList');
GetFieldValueFromTable({
fieldName: filterList[index].fieldName,
tableName: formObj.AccountTableName
}).then(res => {
console.log(res,res.data.map(item => {
console.log(res, res.data.map(item => {
return { value: item, label: item }
}),'ressssssssssssssss');
}), 'ressssssssssssssss');
setDefaultValueOption(res.data.map(item => {
return { value: item, label: item }
}))
......@@ -649,7 +649,7 @@ const OptionEditModal = props => {
width: 180,
}}
value={item.fieldName}
onChange={(value)=>changedFieldName(value,index)}
onChange={(value) => changedFieldName(value, index)}
options={filterOption}
/>
<div className={styles.uploadBtn}>
......@@ -659,8 +659,8 @@ const OptionEditModal = props => {
width: 180,
}}
value={item.defaultValue}
onFocus={()=>getDefaultValueOption(index)}
onChange={(value)=>changedDefaultValue(value,index)}
onFocus={() => getDefaultValueOption(index)}
onChange={(value) => changedDefaultValue(value, index)}
options={defaultValueOption}
allowClear={true}
/>
......@@ -684,6 +684,24 @@ const OptionEditModal = props => {
</div>
</Item>
</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>
</Form>
<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