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} > - {/*
-
- 解决方案设置: -
-
- 敲击回车键后,输入内容将成为标签 -
-
- console.log(v)} - /> -
-
*/} {nodesAll?(
- +
+
状态码:
+
+ +
+
+ +
+
+
+
修改释义:
+
+
+
):(
@@ -84,12 +138,12 @@ function programmeModal (props) {
)}
-
- 设置 +
+
+ {tableNews.paraphrase||'初始化释义'} +
-
- 设置 +
+
+ {notesValue} +
diff --git a/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx b/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx index 198a85d..e92f8de 100644 --- a/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx +++ b/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx @@ -29,14 +29,13 @@ const Statuscode = (props) => { const [rowId, setRowId] = useState(); //表格数据id const api = useRef(); const searchData = useRef(search) - const limits = useRef(); //每页实际条数 const page = useRef(query.page); const CODE = "code"; const [nodesAll, setNodesAll] = useState(true);//是否批量 const [mysorter, setMysorter] = useState(true);//排序 const sorter = useRef(false);//排序 const [resolve, setResolve] = useState([]);//解决方案 - + const [tableNews, setTableNews] = useState([]);//表格当前行数据 const tableList = [//表格属性 { title:'状态码信息', @@ -160,6 +159,7 @@ const Statuscode = (props) => { onClick={() => { setNotes(true); setNodesAll(false); + setTableNews(row); setRowId(row.id); }} > @@ -319,7 +319,7 @@ const Statuscode = (props) => { style={{ position: "relative", width: "100%", flex: 1 }} > { borderRadius: 3, }} onClick={() => { - + setNotes(true); + setNodesAll(true); + setTableNews([]); }} > 批量设置 @@ -484,7 +486,7 @@ const Statuscode = (props) => { }} > - 共{StatusList.count}个设备 + 共{StatusList.count}个状态码 { {notes&& { setNotes(false); setRowId(); + codegetStatus(); }} />}
diff --git a/code/VideoAccess-VCMP/web/client/src/utils/webapi.js b/code/VideoAccess-VCMP/web/client/src/utils/webapi.js index d5d02c5..50cbea2 100644 --- a/code/VideoAccess-VCMP/web/client/src/utils/webapi.js +++ b/code/VideoAccess-VCMP/web/client/src/utils/webapi.js @@ -43,6 +43,8 @@ export const ApiTable = { getStatus: 'status',//获取状态码 putStatueBanned:'status/banned',//禁用状态码自定义 postStatusResolve:'status/resolve',//编辑解决方案 + postStatusCustom:'status/custom',//自定义状态码释义 + getStatusSimpleAll:'status/simple_all',//获取全部状态码简略信息 }; export const VideoServeApi = {