Browse Source

更换域名

Leo 2 years ago
parent
commit
23e49bc243

+ 1 - 1
.env.development

@@ -1,2 +1,2 @@
-REACT_APP_BASE_URL = 'http://192.168.199.110:18082'
+REACT_APP_BASE_URL = 'http://aihub-dag.sxkj.com'
 REACT_APP_JPT = 'http://192.168.199.109:25522'

+ 1 - 0
src/module/datasource/component/DatasourceLog.jsx

@@ -144,6 +144,7 @@ const DatasourceLog = ({ onRef, logId, page, page_size }) => {
         if (logs.length !== 0) {
           setLogList(logs)
         }
+        clearTimeout(timeout)
         timeout = setTimeout(() => {
           refreshStatus(list)
         }, 10000)

+ 1 - 0
src/module/datasource/component/LogWatcher.jsx

@@ -46,6 +46,7 @@ const LogWatcher = () => {
     if (data.code === 200) {
       setLogData(data.data.log)
       if (![2, 3].includes(data.data.status) && autoRefresh) {
+        clearTimeout(timeout)
         timeout = setTimeout(() => {
           fetchOnceJoblog()
         }, 5000)

+ 6 - 3
src/module/layout/Main.jsx

@@ -460,13 +460,16 @@ const Main = () => {
         <Input
           style={{ width: '350px' }}
           value={currentProjectName}
+          disabled={sessionStorage.getItem('role') !== '1'}
           onChange={e => {
             setCurrentProjectName(e.target.value)
           }}
         />
-        <Button type="primary" onClick={editProjectName}>
-          确认
-        </Button>
+        {sessionStorage.getItem('role') === '1' && (
+          <Button type="primary" onClick={editProjectName}>
+            确认
+          </Button>
+        )}
       </Space>
       <Space style={{ padding: '10px 20px 30px', display: 'flex' }}>
         <span>项目成员管理:</span>

+ 1 - 0
src/module/tasklog/component/LogTable.jsx

@@ -151,6 +151,7 @@ const LogTable = () => {
         if (logs.length !== 0) {
           setLogList(logs)
         }
+        clearTimeout(timeout)
         timeout = setTimeout(() => {
           refreshStatus(list)
         }, 10000)

+ 0 - 1
src/utils/request.js

@@ -1,4 +1,3 @@
-import { message } from "antd";
 import axios from "axios";
 
 const axiosInstance = axios.create({