shaogen1995 2 месяцев назад
Родитель
Сommit
541d53da8e

+ 2 - 1
src/pages/Aanalyse/A1resStat/index.tsx

@@ -8,6 +8,7 @@ import {
   A1_APIgetAllNum,
   A1_APIgetDefCount,
   A1_APIgetDict,
+  A1_APIgetTag,
   A1_APIgetYearNum
 } from '@/store/action/Aanalyse/A1resStat'
 import { antdSelectType } from '@/utils/dataChange'
@@ -150,7 +151,7 @@ function A1resStat() {
 
   const getBingDataFu = useCallback(async () => {
     if (kuId2) {
-      const res = await A1_APIgetDict(kuId2)
+      const res = await A1_APIgetTag(kuId2)
       if (res.code === 0) {
         setBingData({ list: res.data || [], loding: true })
       }

+ 13 - 12
src/pages/Zother/Z1formSet/index.tsx

@@ -46,16 +46,6 @@ function Z1formSet({ sId, closeFu }: Props) {
   // 点击新增字段
   const [addId, setAddId] = useState(0)
 
-  // 移动
-  const sortMove = useCallback(
-    async (index: number, flag: 1 | -1) => {
-      const id1 = info.fields[index].id!
-      const id2 = info.fields[index + flag].id!
-      const res = await Z1_APIformSort(flag === 1 ? id2 : id1, flag === 1 ? id1 : id2)
-      if (res.code === 0) getInfoFu()
-    },
-    [getInfoFu, info.fields]
-  )
   // 关联字典数组
   const dictArrTemp = useSelector((state: RootState) => state.Z2dict.dictAll)
   // 关联标签
@@ -67,6 +57,17 @@ function Z1formSet({ sId, closeFu }: Props) {
     return arr.filter(v => !formAddFilterFu().includes(v.fieldName))
   }, [info.fields])
 
+  // 移动
+  const sortMove = useCallback(
+    async (index: number, flag: 1 | -1) => {
+      const id1 = resList[index].id!
+      const id2 = resList[index + flag].id!
+      const res = await Z1_APIformSort(flag === 1 ? id2 : id1, flag === 1 ? id1 : id2)
+      if (res.code === 0) getInfoFu()
+    },
+    [getInfoFu, resList]
+  )
+
   return (
     <div className={styles.Z1formSet}>
       <div className='Z1fTop'>
@@ -151,13 +152,13 @@ function Z1formSet({ sId, closeFu }: Props) {
                   <div className='Z1fDel'>
                     <Button
                       onClick={() => sortMove(index, 1)}
-                      disabled={index === info.fields.length - 1}
+                      disabled={index === resList.length - 1}
                       title='下移'
                       icon={<CaretDownOutlined rev={undefined} />}
                     ></Button>
                     <Button
                       onClick={() => sortMove(index, -1)}
-                      disabled={index === 5}
+                      disabled={index === 6}
                       title='上移'
                       icon={<CaretUpOutlined rev={undefined} />}
                     ></Button>

+ 1 - 1
src/pages/Zsystem/Z3ipSet/Z3edit/index.tsx

@@ -81,7 +81,7 @@ function Z3edit({ sInfo, closeFu, addTableFu, editTableFu }: Props) {
             <Radio.Group
               value={info.levelPerm || '公开级'}
               onChange={e => formChange('levelPerm', e.target.value)}
-              options={selectObj['权限级']}
+              options={[...selectObj['权限级'], { value: '全部', label: '全部' }]}
             />
           </div>
         </div>

+ 1 - 1
src/pages/Zsystem/Z6roleSet/Z6edit.tsx

@@ -307,7 +307,7 @@ function Z6edit({ sId, closeFu, addTableFu, editTableFu }: Props) {
                 <Radio.Group
                   value={levelPerm}
                   onChange={e => setLevelPerm(e.target.value)}
-                  options={selectObj['权限级']}
+                  options={[...selectObj['权限级'], { value: '全部', label: '全部' }]}
                 />
               </div>
             </div>

+ 5 - 0
src/store/action/Aanalyse/A1resStat.ts

@@ -15,6 +15,11 @@ export const A1_APIgetDict = (formDefId: string) => {
   return http.get(`cms/count/chartDict/${formDefId}`)
 }
 
+// 资源统计--标签饼图
+export const A1_APIgetTag = (formDefId: string) => {
+  return http.get(`cms/count/chartTag/${formDefId}`)
+}
+
 // 资源统计--资源库资源数统计
 export const A1_APIgetDefCount = () => {
   return http.get('cms/count/defCount')

+ 2 - 2
src/utils/http.ts

@@ -10,8 +10,8 @@ export const defaultPassWord = 'Aa147852'
 
 export const envFlag = process.env.NODE_ENV === 'development'
 
-// const baseUrlTemp = 'https://sit-chaoxuept.4dage.com' // 测试环境
-const baseUrlTemp = 'http://192.168.20.61:8118' // 线下环境
+const baseUrlTemp = 'https://sit-chaoxuept.4dage.com' // 测试环境
+// const baseUrlTemp = 'http://192.168.20.61:8118' // 线下环境
 
 const baseFlag = baseUrlTemp.includes('https://')