Prechádzať zdrojové kódy

Merge branch 'master' of http://gogsb.soaringnova.com/liutao/ai-proj-demo

Zhang Li 2 rokov pred
rodič
commit
a16b4c9654

+ 1 - 1
src/module/datasource/component/SyncTaskAdd.jsx

@@ -392,7 +392,7 @@ export default function SyncTaskAdd() {
       showDrawer()
       setIsFinishBuild(true)
     } else {
-      message.error('构建失败,请检查表单数据')
+      message.error(data.msg)
     }
     setBuilding(false)
   }

+ 12 - 9
src/module/jptmgmt/page/JptMgmt.jsx

@@ -114,6 +114,7 @@ const JptMgmt = () => {
           unCheckedChildren="关闭"
           loading={switchLoading}
           defaultChecked={val}
+          disabled={!['1', '2', '4'].includes(localStorage.getItem('role'))}
           onChange={checked => changeTaskState(checked, record.key)}
         />
       ),
@@ -133,6 +134,7 @@ const JptMgmt = () => {
           </Button>
           <Button
             type="link"
+            disabled={!['1', '2', '4'].includes(localStorage.getItem('role'))}
             onClick={() => {
               setCurrentJpt(record.key)
               setIsEditJptPsd(true)
@@ -254,15 +256,16 @@ const JptMgmt = () => {
   return (
     <JptWrapper>
       <div className="create_btn">
-        {jptList.length === 0 && (
-          <Button
-            type="primary"
-            onClick={() => {
-              setIsCreateJptProgram(true)
-            }}>
-            创建
-          </Button>
-        )}
+        {jptList.length === 0 &&
+          ['1', '2', '4'].includes(localStorage.getItem('role')) && (
+            <Button
+              type="primary"
+              onClick={() => {
+                setIsCreateJptProgram(true)
+              }}>
+              创建
+            </Button>
+          )}
       </div>
       <Table
         columns={columns}