diff --git a/code/VideoAccess-VCMP/web/client/assets/images/favicon.ico b/code/VideoAccess-VCMP/web/client/assets/images/favicon.ico new file mode 100644 index 0000000..8551bf9 Binary files /dev/null and b/code/VideoAccess-VCMP/web/client/assets/images/favicon.ico differ diff --git a/code/VideoAccess-VCMP/web/client/src/sections/offline/actions/statuscode.js b/code/VideoAccess-VCMP/web/client/src/sections/offline/actions/statuscode.js index ee45dfd..b615334 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/offline/actions/statuscode.js +++ b/code/VideoAccess-VCMP/web/client/src/sections/offline/actions/statuscode.js @@ -39,4 +39,27 @@ export function postStatusResolve(data) { msg: { option: "" }, //编辑解决方案 reducer: { name: "" }, }); +} +export function postStatusCustom(data) { + return (dispatch) => + basicAction({ + type: "post", + dispatch: dispatch, + data, + actionType: "POST_STATUS_CUSTOM", + url: `${ApiTable.postStatusCustom}`, + msg: { option: "" }, //自定义状态码释义 + reducer: { name: "" }, + }); +} +export function getStatusSimpleAll() { + return (dispatch) => + basicAction({ + type: "get", + dispatch: dispatch, + actionType: "GET_STATUS_SIMPLE_ALL", + url: `${ApiTable.getStatusSimpleAll}`, + msg: { option: "" }, //获取摄像头能力列表 + reducer: { name: "" }, + }); } \ No newline at end of file diff --git a/code/VideoAccess-VCMP/web/client/src/sections/offline/components/notesModal.jsx b/code/VideoAccess-VCMP/web/client/src/sections/offline/components/notesModal.jsx index 552e5e7..5fa2921 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/offline/components/notesModal.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/offline/components/notesModal.jsx @@ -1,41 +1,78 @@ import React, { useState, useRef, useEffect } from "react"; import { connect } from "react-redux"; -import { Modal, Spin,Input,TagInput } from "@douyinfe/semi-ui"; - +import { Modal, Spin,Input,TagInput ,Select} from "@douyinfe/semi-ui"; function programmeModal (props) { const { close, rowId, dispatch, actions, - nodesAll + nodesAll,//是否批量 + tableNews,//表格行全数据 } = props; - const { equipmentWarehouse } = actions; + const { offline } = actions; + + const [notesValue, setNotesValue] = useState('');//释义 + const [codeList, setCodeList] = useState([]);//状态码列表 + const [codeIdList, setcodeIdList] = useState([]);//选中的状态码id + const [platform, setPlatform] = useState(['yingshi']);//选中的平台 - const [notesValue, setNotesValue] = useState('');//表格设置弹框 //初始化 useEffect(() => { - + setNotesValue(tableNews.paraphraseCustom||'') + dispatch( + offline.getStatusSimpleAll() + ).then((res) => { + let mycodeList=[]; + if(res.payload&&res.payload.data){ + for (let index = 0; index < res.payload.data.length; index++) { + mycodeList.push({id:res.payload.data[index].id,status:res.payload.data[index].status+' '+res.payload.data[index].describe,platform:res.payload.data[index].platform}) + } + } + setCodeList(mycodeList) + }) }, []); function handleOk () { //点击弹框确定 右边按钮 - // dispatch( - // equipmentWarehouse.postCameraRemark({ - // cameraId:rowId, - // remark:showScrollList - // }) - // ).then((res) => { - // close(); - // }) + if(nodesAll){ + dispatch( + offline.postStatusCustom({ + statusId:codeIdList, + paraphrase:notesValue + }) + ).then((res) => { + close(); + }) + } + else{ + dispatch( + offline.postStatusCustom({ + statusId:[rowId], + paraphrase:notesValue + }) + ).then((res) => { + close(); + }) + } } function handleCancel () { close(); //点击弹框取消 左边按钮 } - function onChange(value){ - console.log('value',value); - setNotesValue(value) + function onChange(value){//输入自定义释义 + if(value!==''){ + setNotesValue(value) + } + else{ + setNotesValue(null) + } + } + function onSelect(value){//选择状态码 + setcodeIdList(value) + } + function oneSelect(value){//切换平台 + setPlatform(value) } return ( <> @@ -48,26 +85,43 @@ function programmeModal (props) { width={607} onCancel={handleCancel} > - {/*