deartibers
2 years ago
14 changed files with 454 additions and 250 deletions
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 387 B |
After Width: | Height: | Size: 85 KiB |
Binary file not shown.
@ -1,5 +1,9 @@ |
|||
'use strict'; |
|||
|
|||
export default { |
|||
import * as statuscode from './statuscode' |
|||
// import * as camera from './camera'
|
|||
|
|||
export default { |
|||
// ...statuscode,...camera
|
|||
...statuscode |
|||
} |
@ -0,0 +1,42 @@ |
|||
"use strict"; |
|||
|
|||
import { basicAction } from "@peace/utils"; |
|||
import { ApiTable } from "$utils"; |
|||
|
|||
export function getStatus(query) { |
|||
return (dispatch) => |
|||
basicAction({ |
|||
type: "get", |
|||
dispatch: dispatch, |
|||
actionType: "GET_STATUS", |
|||
query: query, |
|||
url: `${ApiTable.getStatus}`, |
|||
msg: { option: "获取状态码列表信息" }, |
|||
reducer: { name: "StatusList" }, |
|||
}); |
|||
} |
|||
|
|||
export function putStatueBanned(data, forbidden) { |
|||
return (dispatch) => |
|||
basicAction({ |
|||
type: "put", |
|||
dispatch: dispatch, |
|||
actionType: "PUT_STATUEBANNED", |
|||
data, |
|||
url: `${ApiTable.putStatueBanned}`, |
|||
msg: { option: forbidden ? "启用" : "禁用" }, //禁用状态码自定义
|
|||
reducer: {}, |
|||
}); |
|||
} |
|||
export function postStatusResolve(data) { |
|||
return (dispatch) => |
|||
basicAction({ |
|||
type: "post", |
|||
dispatch: dispatch, |
|||
data, |
|||
actionType: "POST_STATUS_RESOLVE", |
|||
url: `${ApiTable.postStatusResolve}`, |
|||
msg: { option: "" }, //编辑解决方案
|
|||
reducer: { name: "" }, |
|||
}); |
|||
} |
@ -0,0 +1,124 @@ |
|||
import React, { useState, useRef, useEffect } from "react"; |
|||
import { connect } from "react-redux"; |
|||
import { Modal, Spin,Input,TagInput } from "@douyinfe/semi-ui"; |
|||
|
|||
function programmeModal (props) { |
|||
const { |
|||
close, |
|||
rowId, |
|||
dispatch, |
|||
actions, |
|||
nodesAll |
|||
} = props; |
|||
const { equipmentWarehouse } = actions; |
|||
|
|||
const [notesValue, setNotesValue] = useState('');//表格设置弹框 |
|||
//初始化 |
|||
useEffect(() => { |
|||
|
|||
}, []); |
|||
|
|||
function handleOk () { |
|||
//点击弹框确定 右边按钮 |
|||
// dispatch( |
|||
// equipmentWarehouse.postCameraRemark({ |
|||
// cameraId:rowId, |
|||
// remark:showScrollList |
|||
// }) |
|||
// ).then((res) => { |
|||
// close(); |
|||
// }) |
|||
} |
|||
function handleCancel () { |
|||
close(); |
|||
//点击弹框取消 左边按钮 |
|||
} |
|||
function onChange(value){ |
|||
console.log('value',value); |
|||
setNotesValue(value) |
|||
} |
|||
return ( |
|||
<> |
|||
<Modal |
|||
title={nodesAll?'批量设置':'释义'} |
|||
okText="确定" |
|||
cancelText="取消" |
|||
visible={true} |
|||
onOk={handleOk} |
|||
width={607} |
|||
onCancel={handleCancel} |
|||
> |
|||
{/* <div style={{margin:"17px 56px 18px 31px"}}> |
|||
<div style={{color:'rgba(0, 0, 0, 0.65)',}}> |
|||
解决方案设置: |
|||
</div> |
|||
<div style={{color:'rgba(0, 0, 0, 0.45)',fontSize:12,marginTop:4}}> |
|||
敲击回车键后,输入内容将成为标签 |
|||
</div> |
|||
<div style={{marginTop:10}}> |
|||
<TagInput |
|||
defaultValue={['设备是否接触良好','刷新重试,检测设备网络,重启设备']} |
|||
placeholder='请输入解决方案' |
|||
size='large' |
|||
maxLength={18} |
|||
onChange={v => console.log(v)} |
|||
/> |
|||
</div> |
|||
</div> */} |
|||
{nodesAll?( |
|||
<div style={{margin:"17px 32px 28px 32px"}}> |
|||
|
|||
</div> |
|||
):( |
|||
<div style={{margin:"17px 32px 28px 32px"}}> |
|||
<div style={{color: 'rgba(0,0,0,0.65)',fontWeight: 600}}>当视频出错时,提示以下内容:</div> |
|||
<div style={{marginTop:12}}><Input |
|||
style={{width:'100%'}} |
|||
value={notesValue} |
|||
onChange={onChange} |
|||
maxLength={18} |
|||
placeholder="请输入自定义释义" |
|||
showClear> |
|||
</Input> |
|||
</div> |
|||
</div> |
|||
)} |
|||
<div style={{display:'flex',margin:'0px 20px',alignItems: 'center',justifyContent: 'space-between'}}> |
|||
<div> |
|||
<img |
|||
src="/assets/images/background/codeBefore.png" |
|||
alt="设置" |
|||
style={{ width: 240, height: 146 }} |
|||
/> |
|||
</div> |
|||
<div> |
|||
<img |
|||
src="/assets/images/background/codeArrow.png" |
|||
alt="设置" |
|||
style={{ width: 18, height: 15 }} |
|||
/> |
|||
</div> |
|||
<div> |
|||
<img |
|||
src="/assets/images/background/codeAfter.png" |
|||
alt="设置" |
|||
style={{ width: 240, height: 146 }} |
|||
/> |
|||
</div> |
|||
</div> |
|||
</Modal> |
|||
</> |
|||
); |
|||
} |
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, CameraKind, CameraAbility } = state; |
|||
return { |
|||
loading: members.isRequesting, |
|||
user: auth.user, |
|||
actions: global.actions, |
|||
CameraKind: CameraKind.data || [], |
|||
CameraAbility: CameraAbility.data || [], |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(programmeModal); |
@ -0,0 +1,85 @@ |
|||
import React, { useState, useRef, useEffect } from "react"; |
|||
import { connect } from "react-redux"; |
|||
import { Modal, Spin,Input,TagInput } from "@douyinfe/semi-ui"; |
|||
|
|||
function programmeModal (props) { |
|||
const { |
|||
close, |
|||
rowId, |
|||
dispatch, |
|||
actions, |
|||
resolve,//解决方案 |
|||
} = props; |
|||
const { offline } = actions;//接口 |
|||
const [myresolve, setMyResolve] = useState([]);//解决方案 |
|||
//初始化 |
|||
useEffect(() => { |
|||
let resolvearr=[] |
|||
for (let index = 0; index < resolve.length; index++) { |
|||
resolvearr.push(resolve[index].resolve) |
|||
} |
|||
setMyResolve(resolvearr) |
|||
}, []); |
|||
|
|||
function handleOk () { |
|||
//点击弹框确定 右边按钮 |
|||
dispatch( |
|||
offline.postStatusResolve({ |
|||
statusId:rowId, |
|||
resolve:myresolve |
|||
}) |
|||
).then((res) => { |
|||
close(); |
|||
}) |
|||
} |
|||
function handleCancel () { |
|||
close(); |
|||
//点击弹框取消 左边按钮 |
|||
} |
|||
function onChange(value){ |
|||
setMyResolve(value) |
|||
} |
|||
return ( |
|||
<> |
|||
<Modal |
|||
title="方案" |
|||
okText="确定" |
|||
cancelText="取消" |
|||
visible={true} |
|||
onOk={handleOk} |
|||
width={607} |
|||
onCancel={handleCancel} |
|||
> |
|||
<div style={{margin:"17px 56px 18px 31px"}}> |
|||
<div style={{color:'rgba(0, 0, 0, 0.65)',}}> |
|||
解决方案设置: |
|||
</div> |
|||
<div style={{color:'rgba(0, 0, 0, 0.45)',fontSize:12,marginTop:4}}> |
|||
敲击回车键后,输入内容将成为标签 |
|||
</div> |
|||
<div style={{marginTop:10}}> |
|||
<TagInput |
|||
defaultValue={myresolve} |
|||
placeholder='请输入解决方案' |
|||
size='large' |
|||
maxLength={18} |
|||
onChange={onChange} |
|||
/> |
|||
</div> |
|||
</div> |
|||
</Modal> |
|||
</> |
|||
); |
|||
} |
|||
function mapStateToProps (state) { |
|||
const { auth, global, members, CameraKind, CameraAbility } = state; |
|||
return { |
|||
loading: members.isRequesting, |
|||
user: auth.user, |
|||
actions: global.actions, |
|||
CameraKind: CameraKind.data || [], |
|||
CameraAbility: CameraAbility.data || [], |
|||
}; |
|||
} |
|||
|
|||
export default connect(mapStateToProps)(programmeModal); |
Loading…
Reference in new issue