Commit 3d5276b8 authored by 皮倩雯's avatar 皮倩雯

巡维保功能界面

parent 99fa4916
Pipeline #35435 skipped with stages
......@@ -352,9 +352,11 @@ const AppDic = () => {
marginBottom: '10px',
fontSize: '16px',
height: 'calc(100vh-200px)',
display:'flex',
alignItems:'center'
}}
>
<span style={{ padding: '0 10px' }}>数据字典</span>
<span >数据字典</span>
<Tooltip title="添加">
<PlusSquareOutlined
onClick={() => {
......@@ -364,9 +366,8 @@ const AppDic = () => {
style={{
color: '#1890FF',
fontSize: '20px',
verticalAlign: 'middle',
marginRight: '22px',
float: 'right'
marginLeft: '90%'
}}
/>
</Tooltip>
......@@ -382,7 +383,7 @@ const AppDic = () => {
style={{
color: '#1890FF',
fontSize: '20px',
verticalAlign: 'middle',
verticalAlign: 'text-bottom',
marginRight: '30px',
float: 'right'
}}
......
......@@ -16,6 +16,7 @@
}
.clickRowStyle:hover>td{
background: #aed8fa;
}
}
.ant-card-body{
......
......@@ -644,7 +644,7 @@ const WebDic = () => {
key=''
columns={columns}
dataSource={data}
scroll={{ x: 'max-content', y: 'calc(100vh - 340px)' }}
scroll={{ x: 'max-content', y: 'calc(100vh - 370px)' }}
bordered
title={() => {
return <div >
......
......@@ -27,8 +27,8 @@
}
}
.ant-table-body{
max-height: calc(100vh - 328px) !important;
min-height:calc(100vh - 328px);
max-height: calc(100vh - 370px) !important;
min-height:calc(100vh - 370px);
margin-right: -6px;
}
.ant-table-pagination.ant-pagination {
......
import React, { useState, useEffect } from 'react';
import { Modal, Form, Input, notification, message, Row, Col, Select, Checkbox, Radio, Button, Dropdown, Menu } from 'antd';
import { Modal, Form, Input, notification, Row, Col, Select, Button, Dropdown, Menu } from 'antd';
import styles from './maintenance.less'
import { CM_XWBPlan_AccountTable, CM_XWBPlan_feedbackTable, CM_XWBPlan_DataEditORAdd, CM_XWBPlan_DataList } from '@/services/maintenance/api'
import { CM_Event_LoadDepartmentAndRoles } from '@/services/standingBook/api'
import { PlusOutlined, DownOutlined } from '@ant-design/icons'
import ChangeAdd from './ChangeAdd'
const { Option } = Select;
const AddModal = props => {
const [inputValue, setInputValue] = useState({ feedbackName: '', doRole: '' });
const { callBackSubmit = () => { }, visible, type, formObj } = props;
const [Type1, setType1] = useState('')
const [Type2, setType2] = useState('')
const [selectValue, SetSelectValue] = useState('')
const [selectValue1, SetSelectValue1] = useState('')
const [selectValue, setSelectValue] = useState('')
const [selectValue1, setSelectValue1] = useState('')
const [treeData, setTreeData] = useState([])
const [isVisible, setIsVisible] = useState(false)
const [filed, setFiled] = useState({}); // 传给子组件列表数据
const [filed1, setFiled1] = useState({}); // 传给子组件列表数据
const [types, setTypes] = useState(''); // 弹窗类型
const [pickItem, setPickItem] = useState('')//复选框数据填入项
const [checkedList1, setCheckedList1] = useState([])//最新选择数据
const [characterValue, setCharacterValue] = useState('')//打开弹框之前数据
const [form] = Form.useForm();
const { Item } = Form;
const { TextArea } = Input;
const onSubmit = () => {
useEffect(() => {
getRole()
if (type === 'add') {
setType1('')
setType2('')
setInputValue({ feedbackName: '', doRole: '' })
setFiled1({})
form.resetFields();
} else if (type === 'edit') {
CM_XWBPlan_DataList({id:formObj.id}).then(res =>{
let data = res.data[0]
data && form.setFieldsValue({ ...data});
setInputValue({ ...data})
console.log(data.businessTypee)
setType1(data.businessType)
setType2(data.accountName)
})
}
}, [visible])
useEffect(() => {
getRole()
getList()
getFeedbackTable()
}, [])
const getList = () => {
CM_XWBPlan_AccountTable().then(res => {
if (res.msg == 'Ok') {
let arr = []
res.data.map((item, index) => {
arr.push(item.accountName)
})
setTreeData(arr)
}
})
}
const inputType1 = e => {
const onSubmit = () => {
form.validateFields().then(validate => {
if (validate) {
let obj = form.getFieldsValue();
obj.feedbackName = inputValue.feedbackName
obj.doRole = inputValue.doRole
console.log(obj.doRole)
console.log(obj)
if (type == 'add') {
CM_XWBPlan_DataEditORAdd(obj).then(res => {
if (res.msg == '') {
form.resetFields();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: '添加成功',
});
}else{
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
}
if (type == 'edit') {
CM_XWBPlan_DataEditORAdd({
...obj,
id:formObj.id
}).then(res => {
if (res.msg == '') {
form.resetFields();
callBackSubmit();
notification.success({
message: '提示',
duration: 3,
description: '添加成功',
});
}else{
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
}
}
})
}
const inputType1 = e => {
setType1(e.target.value)
form.setFieldsValue({ businessType: e.target.value })
}
const inputType2 = e => {
setType2(e.target.value)
form.setFieldsValue({ accountName: e.target.value })
}
const changeText = (e, type) => {
let inputText = { ...inputValue }
inputText[type] = e.target.value
setInputValue(inputText)
}
const pickFiled = (fileds) => {
setTypes('add')
setCharacterValue(inputValue[fileds])
setCheckedList1(inputValue[fileds].split(','))
setPickItem(fileds)
setIsVisible(true)
}
const pickFiled1 = (fileds) => {
setTypes('app')
setCharacterValue(inputValue[fileds])
setCheckedList1(inputValue[fileds].split(','))
console.log(inputValue[fileds])
console.log(inputValue[fileds].split(','))
setPickItem(fileds)
setIsVisible(true)
}
const getRole = () => {
CM_Event_LoadDepartmentAndRoles().then(res => {
if (res.msg === 'Ok') {
setFiled1(formateArrDataA1(res.data, 'groupType'))
console.log(res.data)
}
})
}
const getFeedbackTable = () => {
CM_XWBPlan_feedbackTable().then(res => {
if (res.msg == 'Ok') {
let arr = []
res.data.map((item, index) => {
arr.push(item.accountName)
})
setFiled(arr)
}
})
}
const formateArrDataA1 = (initialArr, name) => {
let aa = []
let a1 = []
let a2
let a3 = []
initialArr.map(i => {
// console.log(i.groupType)
a2 = i.groupType
// console.log(a2)
// console.log(i.root)
a1 = i.root
a1.map(j => {
j.group = a2
// console.log(j)
})
aa.push(i.root)
})
// console.log(aa)
aa.map(p => {
// console.log(p)
p.map(o => {
// console.log(o)
a3.push(o)
})
})
console.log(a3)
// 判定传参是否符合规则
if (!(a3 instanceof Array)) {
return '请传入正确格式的数组'
}
if (!name) {
return '请传入对象属性'
}
//先获取一下这个数组中有多少个"name"
let nameArr = []
a3.map(i => {
if (nameArr.indexOf(i.group) === -1) {
nameArr.push(i.group)
}
})
console.log(nameArr)
//新建一个包含多个list的结果对象
let tempObj = {}
// 根据不同的"name"生成多个数组
for (let k in nameArr) {
for (let j in a3) {
if (a3[j].group == nameArr[k]) {
// 每次外循环时新建一个对应"name"的数组, 内循环时当前数组不变
tempObj[nameArr[k]] = tempObj[nameArr[k]] || []
tempObj[nameArr[k]].push(a3[j])
}
}
}
console.log(tempObj);
for (let key in tempObj) {
let arr = []
tempObj[key].map(item => {
tempObj[key] = arr;
arr.push(item.Name)
})
}
return tempObj
}
const changTable = value => {
setSelectValue(value)
}
const changTable1 = value => {
setSelectValue1(value)
}
const onOK = prop => {
console.log(prop.isType)
if (prop.isType == "app") {
let title = prop.title
let selectData = prop.stt
console.log(prop.stt)
let ff = prop.filed22
let aa = []
let bb = 0
title.map((item, index) => {
console.log(ff[item])
aa = []
selectData.map((item1, index1) => {
console.log(item1)
if (ff[item].indexOf(item1) != -1) {
aa.push(item1)
}
})
console.log(aa)
if (aa.length == 0) {
bb = 1
}
})
console.log(aa)
if (bb == 1) {
notification.error({
message: '提示',
description: '权限角色部门必须都选至少一项',
});
} else {
setIsVisible(false)
let inputText = { ...inputValue }
inputText[prop.pickItem] = prop.str
setCheckedList1(prop.checkedList)
setInputValue(inputText)
}
} else {
setIsVisible(false)
let inputText = { ...inputValue }
inputText[prop.pickItem] = prop.str
setCheckedList1(prop.checkedList)
setInputValue(inputText)
}
}
return (
<Modal
title='巡维保计划配置'
visible={visible}
maskClosable={false}
destroyOnClose
width="800px"
destroyOnClose
okText="确认"
......@@ -54,7 +302,7 @@ const AddModal = props => {
<Col span={23}>
<Item
label="业务名称"
name="BusinessName"
name="businessName"
labelCol={{ span: 4 }}
rules={[
{
......@@ -63,19 +311,19 @@ const AddModal = props => {
},
]}
>
<Input style={{ width: '580px' }} placeholder="请输入业务名称" />
<Input style={{ width: '580px' }} placeholder="业务名称不可重复" />
</Item>
</Col>
<Col span={23}>
<span style={{ position: 'absolute', left: '5.5%', top: '9%', color: 'red', fontSize: '16px' }}>*</span>
<Item
label="业务类型"
name="BusinessType"
name="businessType"
labelCol={{ span: 4 }}
rules={[
{
validator: (rule, value) => {
if (form.getFieldsValue().BusinessType == '') {
if (form.getFieldsValue().businessType == '') {
return Promise.reject('业务类型必填')
}
return Promise.resolve();
......@@ -89,14 +337,15 @@ const AddModal = props => {
style={{ width: '580px' }}
onChange={inputType1}
value={Type1}
placeholder="选择或手动输入业务类型"
>
</Input>
<Dropdown
placement='bottomRight'
style={{ width: '20rem' }}
style={{ width: '580px' }}
overlay={<Menu>
<Menu.Item key="巡检" onClick={() => { setType1("巡检"); form.setFieldsValue({ BusinessType: "巡检" }) }} style={{ width: '580px', marginLeft: '-8px' }}>巡检</Menu.Item>
<Menu.Item key="保养" onClick={() => { setType1("保养"); form.setFieldsValue({ BusinessType: "保养" }) }} style={{ width: '580px', marginLeft: '-8px' }}>保养</Menu.Item>
<Menu.Item key="巡检" onClick={() => { setType1("巡检"); form.setFieldsValue({ businessType: "巡检" }) }} style={{ width: '580px', marginLeft: '-8px' }}>巡检</Menu.Item>
<Menu.Item key="保养" onClick={() => { setType1("保养"); form.setFieldsValue({ businessType: "保养" }) }} style={{ width: '580px', marginLeft: '-8px' }}>保养</Menu.Item>
</Menu>} >
<div className={styles.linkDrowp} onClick={e => e.preventDefault()}>
<DownOutlined style={{ fontSize: '12px', color: 'rgba(0, 0, 0, 0.25)' }} />
......@@ -119,7 +368,7 @@ const AddModal = props => {
>
<Select
style={{ width: '580px' }}
placeholder="选择执行周期"
placeholder="选择计划执行周期"
onChange={changTable}
value={selectValue}
>
......@@ -155,9 +404,10 @@ const AddModal = props => {
style={{ width: '580px' }}
onChange={inputType2}
value={Type2}
placeholder="选择此计划关联的设备台账名称,如果没有请先配置台账管理台账名称为设备"
>
</Input>
{/* <Dropdown
<Dropdown
placement='bottomRight'
style={{ width: '20rem' }}
overlay={<Menu>
......@@ -166,7 +416,7 @@ const AddModal = props => {
<div className={styles.linkDrowp} onClick={e => e.preventDefault()}>
<DownOutlined style={{ fontSize: '12px', color: 'rgba(0, 0, 0, 0.25)' }} />
</div>
</Dropdown> */}
</Dropdown>
</div>
</Item>
</Col>
......@@ -213,7 +463,7 @@ const AddModal = props => {
>
<div className={styles.filed_listItem} >
<Input style={{ width: '508px' }} placeholder="请选择执行角色" onChange={(e) => changeText(e, 'doRole')} value={inputValue.doRole} allowClear />
<Button type="dashed" onClick={() => pickFiled('doRole')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', width: '4rem' }} />
<Button type="dashed" onClick={() => pickFiled1('doRole')} icon={<PlusOutlined />} style={{ marginLeft: '0.5rem', width: '4rem' }} />
</div>
</Item>
</Col>
......@@ -259,7 +509,7 @@ const AddModal = props => {
>
<Select
style={{ width: '580px' }}
placeholder="选择是否送审"
placeholder="是否送审"
onChange={changTable1}
value={selectValue1}
>
......@@ -275,11 +525,22 @@ const AddModal = props => {
labelCol={{ span: 4 }}
>
<TextArea style={{ width: '580px' }} placeholder="请输入台账过滤条件" />
<TextArea style={{ width: '580px' }} placeholder="设备对应的Scada台账名称,可多选" />
</Item>
</Col>
</Row>
</Form>
<ChangeAdd
visible={isVisible}
onCancel={() => setIsVisible(false)}
callBackSubmit={onOK}
newCheckedList={checkedList1}
isType={types}
filed={filed}
filed1={filed1}
pickItem={pickItem}
characterValue={characterValue}
/>
</Modal>
)
};
......
import React, { useState, useEffect } from 'react';
import { Modal, Divider, Checkbox } from 'antd';
import styles from './maintenance.less'
const CheckboxGroup = Checkbox.Group;
const ChangeAdd = props => {
const { callBackSubmit = () => { }, isType, visible, newCheckedList, filed1, filed, pickItem, characterValue } = props;
const [title, setTitle] = useState([])//分组名
const [checkedList, setCheckedList] = useState([]);//选中的复选框内容
const [indeterminate, setIndeterminate] = useState([]);//全选样式控制
const [checkAll, setCheckAll] = useState([]);//全选
const [selectData, setSelectData] = useState([])//选中复选框的值集合
let objArr = []
const onChangeList = (list) => {
let arr= []
list.map((item, index)=>{
arr.push(item)
})
console.log(list)
console.log(arr)
setCheckedList(arr)
// const checkedListArr = [...checkedList]
// checkedListArr[index] = list
// setCheckedList(checkedListArr);
// const indeterminateArr = [...indeterminate]
// const checkAllArr = [...checkAll]
// indeterminateArr[index] = !!list.length && list.length < filed[title].length
// checkAllArr[index] = list.length === filed[title].length
// setIndeterminate(indeterminateArr)
// setCheckAll(checkAllArr);
};
const onChangeList1 = (list, index, title) => {
const checkedListArr = [...checkedList]
checkedListArr[index] = list
setCheckedList(checkedListArr);
console.log(checkedListArr)
const indeterminateArr = [...indeterminate]
const checkAllArr = [...checkAll]
indeterminateArr[index] = !!list.length && list.length < filed1[title].length
checkAllArr[index] = list.length === filed1[title].length
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr);
};
const onSubmit = () => {
isType === 'rule' ? callBackSubmit(`${value === '无' || value === '' ? '' : value + ','}${checkValue.join(',')}`) : callBackSubmit({ checkedList, str: selectData.join(","), pickItem, stt:selectData, title:title, filed22:filed1, isType:isType });
}
const onCheckAllChange = e => {
const indeterminateArr = [...indeterminate]
const checkAllArr = [...checkAll]
const checkedListArr = [...checkedList]
checkAllArr[e.target.index] = e.target.checked
indeterminateArr[e.target.index] = false
e.target.checked ? checkedListArr[e.target.index] = e.target.checkvalue : checkedListArr[e.target.index] = []
setCheckedList(checkedListArr);
setIndeterminate(indeterminateArr);
setCheckAll(checkAllArr);
};
useEffect(() => {
selectAll()
}, [checkedList]);
const selectAll = () => {
objArr = []
checkedList.map(item => {
objArr = objArr.concat(item)
})
console.log(checkedList)
setSelectData(objArr)
}
useEffect(() => {
if (isType != '' && isType === 'add') {
// console.log(filed)
// let arr = Object.keys(filed)
// console.log(arr, 'arr')
// setTitle(arr)
let checkArr = []
// let indeterminateArr = []
// let checkAllArr = []
console.log(newCheckedList);
// arr.map((item, index) => {
// checkArr[index] = []
newCheckedList.map(checkItem => {
if (filed.includes(checkItem)) {
checkArr.push(checkItem)
}
// })
// indeterminateArr.push(!!checkArr[index].length && checkArr[index].length < filed[item].length)
// checkAllArr.push(checkArr[index].length === filed[item].length)
})
setCheckedList(checkArr)
// setIndeterminate(indeterminateArr)
// setCheckAll(checkAllArr)
let newArr = characterValue.length ? characterValue.split(",") : []
setSelectData(newArr)
} else if (isType === 'app') {
console.log(filed1)
let arr = Object.keys(filed1)
console.log(arr, 'arr')
setTitle(arr)
let checkArr = []
let indeterminateArr = []
let checkAllArr = []
console.log(newCheckedList);
console.log(characterValue)
arr.map((item, index) => {
checkArr[index] = []
newCheckedList.map(checkItem => {
if (filed1[item].includes(checkItem)) {
checkArr[index].push(checkItem)
}
})
indeterminateArr.push(!!checkArr[index].length && checkArr[index].length < filed1[item].length)
checkAllArr.push(checkArr[index].length === filed1[item].length)
})
setCheckedList(checkArr)
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr)
let newArr = characterValue.length ? characterValue.split(",") : []
setSelectData(newArr)
}
}, [visible]);
if (isType != 'app') {
return (
<div className={styles.ChangeAddContainer}>
<Modal
title='反馈名称'
bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '10px' }}
width="500px"
destroyOnClose
centered={true}
maskClosable={false}
onOk={onSubmit}
okText="确认"
cancelText="取消"
{...props}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
<div className={styles.cardItem}>
{JSON.stringify(filed) == "{}" ?
<>
<div className={styles.cardContent}>
<span style={{color: 'red',fontSize: '1rem', marginLeft: '25px'}}>暂无数据请先配置台账管理台账名称为反馈</span>
</div>
</>
:
<>
<div className={styles.cardContent}>
<div className={styles.cardItemData1}>
{/* <Checkbox indeterminate={indeterminate} onChange={onCheckAllChange} checked={checkAll}></Checkbox> */}
<CheckboxGroup options={filed} value={checkedList} onChange={(e) => onChangeList(e)} style={{width:'400px'}} /></div>
</div>
</>
}
</div>
</div>
)
}
</Modal>
</div>
);
} else if (isType === 'app') {
return (
<Modal
title= '角色'
bodyStyle={{ width: '100%', minHeight: '100px' }}
style={{ top: '10px' }}
width="1200px"
destroyOnClose
centered={true}
maskClosable={false}
onOk={onSubmit}
okText="确认"
cancelText="取消"
{...props}
forceRender={true}
getContainer={false}
>
{visible && (
<div className={styles.listCard}>
<div className={styles.cardItem}>
<div className={styles.cardContent}>
{title.map((item, index) => {
return <div className={styles.cardItemData} key={index}>
<Divider orientation="left" style={{ margin: '0 0 10px 0', color: '#15428b', borderTopColor: '#99bbe8' }}>{item} <Checkbox indeterminate={indeterminate[index]} onChange={onCheckAllChange} index={index} checkvalue={filed1[item]} checked={checkAll[index]}> </Checkbox></Divider>
<CheckboxGroup options={filed1[item]} value={checkedList[index]} onChange={(e) => onChangeList1(e, index, item)} /></div>
})}
</div>
</div>
</div>
)
}
</Modal>
);
}
};
export default ChangeAdd
\ No newline at end of file
.ChangeAddContainer{
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.pickItem{
background-color: #F5F6F9;
}
}
.formData{
height: 38rem;
overflow-y: scroll;
.ant-form-item-label > label.ant-form-item-required:not(.ant-form-item-required-mark-optional)::before{
display: none;
}
.formData_label{
display: flex;
align-items: center;
}
.filed_listItem{
display: flex;
height: 3.6rem;
.ant-btn-icon-only {
width: 32px;
height: 32px;
/* padding: 2.4px 0; */
font-size: 16px;
border-radius: 2px;
display: flex;
align-items: center;
justify-content: center;
}
}
}
.linkDrowp{
position: absolute;
top: 0px;
left: 93.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-select-arrow .anticon {
vertical-align: middle;
}
.listCard{
display: flex;
.cardItem{
padding: 0.5rem;
}
.cardContent{
height: 30rem;
overflow-y: scroll;
width: 100%;
}
.cardItemData{
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
}
}
import React, { useState, useEffect } from 'react';
import styles from './maintenance.less'
import {
Form,
Card,
Space,
Table,
Popconfirm,
Spin,
Tooltip,
notification,
Tree,
Button,
notification
} from 'antd';
import {CM_XWBPlan_DataList, CM_XWBPlan_RemovePlan} from '@/services/maintenance/api';
import {
DoubleLeftOutlined,
DoubleRightOutlined,
PlusSquareFilled,
RightOutlined,
EditTwoTone,
DeleteOutlined,
OrderedListOutlined,
ApartmentOutlined,
DesktopOutlined,
PlusOutlined
} from '@ant-design/icons';
import AddModal from './AddModal'
......@@ -31,6 +20,8 @@ const maintenance = () => {
const [addVisible, setAddVisible] = useState(false)
const [type, setType] = useState('')
const [formObj, setFormObj] = useState('')
const [treeLoading, setTreeLoading] = useState(false);
const [flag, setFlag] = useState(0);
const [tableData, setTableData] = useState([])
const columns = [
......@@ -118,10 +109,11 @@ const maintenance = () => {
},
{
title: '操作',
ellipsis: true,
key: 'action',
align:'center',
rener: record =>{
<Space size="middle">
align: 'center',
render: (text, record) => (
<Space>
<Tooltip title="修改">
<EditTwoTone
onClick={() => editEventType(record)}
......@@ -144,11 +136,21 @@ const maintenance = () => {
</Popconfirm>
</Tooltip>
</Space>
}
),
},
}
]
useEffect(()=>{
setTreeLoading(true);
CM_XWBPlan_DataList().then(res=>{
setTreeLoading(false);
if(res.msg == 'Ok'){
setTableData(res.data)
}
})
},[flag])
const add =()=>{
setAddVisible(true)
setType('add')
......@@ -158,11 +160,30 @@ const maintenance = () => {
setType('edit')
setFormObj(record);
}
const deleteEventType =record=>{
const deleteEventType = record =>{
CM_XWBPlan_RemovePlan({planId:record.id}).then(res =>{
if (res.msg === '') {
notification.success({
message: '提示',
duration: 3,
description: '删除成功',
});
console.log(111)
setFlag(flag + 1)
console.log(222)
console.log(flag)
} else {
notification.error({
message: '提示',
duration: 3,
description: res.msg,
});
}
})
}
const onSubmit =()=>{
setAddVisible(false)
setFlag(flag + 1)
}
return (
......@@ -175,12 +196,12 @@ const maintenance = () => {
</Button>
</span>
</div>
<Table
// rowClassName={setRowClassName}
size="small"
rowKey='ID'
bordered
loading={treeLoading}
onRow={record => {
return {
onDoubleClick: event => { event.stopPropagation(); editEventType(record) }, //双击
......
......@@ -2,30 +2,6 @@
.ant-card-body {
padding: 12px 24px 24px 24px;
}
.linkDrowp{
position: absolute;
top: 0px;
left: 92.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-btn .anticon.anticon-plus > svg, .ant-btn .anticon.anticon-minus > svg {
margin-top: -5px;
}
.pickItem{
background-color: #F5F6F9;
}
......@@ -56,3 +32,56 @@
}
}
}
.linkDrowp{
position: absolute;
top: 0px;
left: 93.5%;
width: 1rem;
height: 100%;
display: flex;
align-items: center;
}
.listItem{
display: flex;
justify-content: space-between;
font-size: 14px;
font-weight: 400;
color: #414E65;
cursor: pointer;
line-height: 28px;
align-items: center;
padding: 8px 14px;
}
.ant-select-arrow .anticon {
vertical-align: middle;
}
.listCard{
display: flex;
.cardItem{
padding: 0.5rem;
}
.cardContent{
// height: 30rem;
// overflow-y: scroll;
width: 100%;
}
.cardItemData{
display:inline-block;
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
width:30.5%;
margin-right:15px;
margin-left:17px;
height: 30rem;
overflow-y: scroll;
}
.cardItemData1{
padding: 1rem;
border: 1px solid #b5b8c8;
margin-bottom: 1rem;
height: 30rem;
overflow-y: scroll;
}
}
......@@ -496,6 +496,9 @@ const AddModal = props => {
}
const pickFiled1 = (fileds) => {
setTypes('app')
// console.log(fileds)
// console.log(inputValue)
// console.log(inputValue[fileds])
setCharacterValue(inputValue[fileds])
setCheckedList1(inputValue[fileds].split(','))
setPickItem(fileds)
......
......@@ -114,7 +114,9 @@ const AddModal = props => {
setCheckedList(checkArr)
setIndeterminate(indeterminateArr)
setCheckAll(checkAllArr)
console.log(characterValue)
let newArr = characterValue.length ? characterValue.split(",") : []
console.log(newArr)
setSelectData(newArr)
draftSort()
}
......
......@@ -75,7 +75,7 @@ const videoManager = () => {
width: 150,
align: 'center',
title: (
<div>录入时间<Tooltip title="点击降序"><CaretUpFilled style={{display:show1,color:'#1890ff',marginTop: '-18px', marginLeft: '60%'}} onClick={()=> shengxu()}/></Tooltip><Tooltip title="点击升序"><CaretDownFilled style={{display:show2,color:'#1890ff',marginTop: '-18px', marginLeft: '60%'}} onClick={()=> jiangxu()}/></Tooltip></div>
<div>录入时间<Tooltip title="点击降序"><CaretUpFilled style={{display:show1,color:'#1890ff',marginTop: '-13px', marginLeft: '60%'}} onClick={()=> shengxu()}/></Tooltip><Tooltip title="点击升序"><CaretDownFilled style={{display:show2,color:'#1890ff',marginTop: '-13px', marginLeft: '60%'}} onClick={()=> jiangxu()}/></Tooltip></div>
)
}, {
title: '操作',
......
......@@ -116,7 +116,7 @@ const RelateRoleModal = props => {
onCancel={onCancel}
okText="确认"
cancelText="取消"
width="920px"
width="500px"
>
<Spin spinning={loading} tip="loading">
<Tabs defaultActiveKey="1" style={{ marginTop: '-16px' }}>
......
......@@ -1271,7 +1271,7 @@ const UserManage = () => {
onSelect={onSelect}
height={
treeData.length && treeData.length > 30
? treeData.length * 15+30
? treeData.length * 18+50
: 1000
}
treeData={treeData.map(t => mapTree(t))}
......
/*
* @Description:
* @Author: leizhe
* @Date: 2021-09-27 09:42:21
* @LastEditTime: 2021-09-27 16:49:28
* @LastEditors: leizhe
*/
import { CITY_SERVICE, get, PUBLISH_SERVICE, post, postForm } from '../index';
// 巡维保计划数据获取
export const CM_XWBPlan_DataList = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_XWBPlan_DataList`, query);
//巡维保计划关联设备台账
export const CM_XWBPlan_AccountTable = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_XWBPlan_AccountTable`, query);
//计划关联反馈台账表
export const CM_XWBPlan_feedbackTable = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_XWBPlan_feedbackTable`, query);
//巡维保计划数据删除
export const CM_XWBPlan_RemovePlan = query =>
get(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_XWBPlan_RemovePlan`, query);
//巡维保计划数据编辑OR添加
export const CM_XWBPlan_DataEditORAdd = data =>
post(`${PUBLISH_SERVICE}/WorkOrderCenter/CM_XWBPlan_DataEditORAdd`, data);
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