Sfoglia il codice sorgente

Merge pull request #722 from jetlinks/next-hub

Next hub
胡彪 3 anni fa
parent
commit
8e13ddbc93

+ 12 - 1
src/pages/device/Instance/Detail/ChildDevice/index.tsx

@@ -105,6 +105,16 @@ const ChildDevice = (props: Props) => {
     },
     {
       title: intl.formatMessage({
+        id: 'pages.table.description',
+        defaultMessage: '说明',
+      }),
+      dataIndex: 'describe',
+      width: '15%',
+      ellipsis: true,
+      // hideInSearch: true,
+    },
+    {
+      title: intl.formatMessage({
         id: 'pages.data.option',
         defaultMessage: '操作',
       }),
@@ -190,7 +200,7 @@ const ChildDevice = (props: Props) => {
           <ProTable<LogItem>
             search={false}
             columns={columns}
-            size="small"
+            // size="small"
             scroll={{ x: 1366 }}
             actionRef={actionRef}
             params={searchParams}
@@ -231,6 +241,7 @@ const ChildDevice = (props: Props) => {
               <Popconfirm
                 key="unbind"
                 onConfirm={async () => {
+                  if (bindKeys.length === 0) return onlyMessage('请先勾选数据!', 'error');
                   const resp = await service.unbindBatchDevice(InstanceModel.detail.id!, bindKeys);
                   if (resp.status === 200) {
                     onlyMessage('操作成功!');

+ 1 - 0
src/pages/device/Instance/Detail/Diagnose/Message/index.tsx

@@ -127,6 +127,7 @@ const Message = observer(() => {
 
   useEffect(() => {
     if (DiagnoseStatusModel.state === 'success') {
+      DiagnoseStatusModel.dialogList = [];
       subscribeLog();
     }
   }, [DiagnoseStatusModel.state]);

+ 1 - 1
src/pages/device/Instance/Detail/Diagnose/Status/DiagnosticAdvice.tsx

@@ -29,7 +29,7 @@ const DiagnosticAdvice = (props: Props) => {
         <div className={styles.advice}>
           <div className={styles.alert}>
             <InfoCircleOutlined style={{ marginRight: 10 }} />
-            所有诊断均无异常但设备未上线,请检查以下内容
+            所有诊断均无异常但设备未上线,请检查以下内容
           </div>
           <div style={{ marginLeft: 10 }}>
             {(data?.list || []).map((item: any) => (

+ 2 - 2
src/pages/device/Instance/Save/index.tsx

@@ -245,11 +245,11 @@ const Save = (props: Props) => {
         </Row>
         <Row>
           <Col span={24}>
-            <Form.Item label={intlFormat('pages.table.description', '说明')} name={'description'}>
+            <Form.Item label={intlFormat('pages.table.description', '说明')} name={'describe'}>
               <Input.TextArea
                 placeholder={
                   intlFormat('pages.form.tip.input', '请输入') +
-                  intlFormat('pages.table.description', '说明')
+                  intlFormat('pages.table.describe', '说明')
                 }
                 rows={4}
                 style={{ width: '100%' }}