shaogen1995 1 éve
szülő
commit
c4076f189a

+ 2 - 1
src/pages/A4exhibit/index.tsx

@@ -106,7 +106,8 @@ function A4exhibit() {
           <span>搜索项:</span>
           <Input
             key={inputKey}
-            maxLength={50}
+            maxLength={10}
+            showCount
             style={{ width: 300 }}
             placeholder="请输入名称"
             allowClear

+ 2 - 1
src/pages/A5goods/index.tsx

@@ -118,7 +118,8 @@ function A5goods() {
             <span>搜索项:</span>
             <Input
               key={inputKey}
-              maxLength={50}
+              maxLength={10}
+              showCount
               style={{ width: 300 }}
               placeholder="请输入名称/分类/时代"
               allowClear

+ 8 - 2
src/pages/A6_1ques/A6QInfo/EchBox/index.module.scss

@@ -15,6 +15,12 @@
       flex-direction: column;
       justify-content: center;
 
+      .EchBox2Num {
+        margin-bottom: 6px;
+        font-weight: 700;
+        padding-left: 80px;
+      }
+
       .EchBox2Son {
         .EchBox2Son1 {
           display: flex;
@@ -31,12 +37,12 @@
 
           .EchBox2Son1_2 {
             font-weight: 700;
-            width: 40px;
+            width: 80px;
             text-align: center;
           }
 
           .EchBox2Son1_3 {
-            width: calc(100% - 160px);
+            width: calc(100% - 200px);
             margin-left: 10px;
 
             &>div {

+ 16 - 3
src/pages/A6_1ques/A6QInfo/EchBox/index.tsx

@@ -150,6 +150,9 @@ function EchBox({ type, info }: Props) {
 
   const oldDataFlagId = useRef(0);
 
+  // 总得分 和 总数
+  const [maxNum, setMaxNum] = useState(0);
+
   useEffect(() => {
     // 防止多次渲染
     if (oldDataFlagId.current === info.id) return;
@@ -167,6 +170,8 @@ function EchBox({ type, info }: Props) {
         return prev + curr;
       });
 
+    setMaxNum(max);
+
     const arr: DataResType[] = lodArr.map((v, i) => ({
       name: v.name,
       value: flag ? v.score || 0 : v.pcs,
@@ -196,6 +201,12 @@ function EchBox({ type, info }: Props) {
       <div className="EchBox1" ref={EchBox1}></div>
       {/* 右侧的数据 */}
       <div className="EchBox2">
+        <div
+          className="EchBox2Num"
+          hidden={dataRes.length <= 0 || maxNum === 0}
+        >
+          {info.type === "排序" ? "总得分" : "总数"}:{maxNum}
+        </div>
         {dataRes.map((v, i) => (
           <div key={i} className="EchBox2Son">
             {v.name === "其他" ? (
@@ -204,11 +215,13 @@ function EchBox({ type, info }: Props) {
                   自定义回答:
                 </div>
                 <div className="EchBox2Son1_2" style={{ color: colorRes[i] }}>
-                  {v.bai}
+                  {v.value}({v.bai})
                 </div>
                 <div className="EchBox2Son1_3">
                   {v.customDesc.map((v2, i2) => (
-                    <div key={i2}>{i2+1}:{v2}</div>
+                    <div key={i2}>
+                      {i2 + 1}:{v2}
+                    </div>
                   ))}
                 </div>
               </div>
@@ -218,7 +231,7 @@ function EchBox({ type, info }: Props) {
                   {v.index}:
                 </div>
                 <div className="EchBox2Son1_2" style={{ color: colorRes[i] }}>
-                  {v.bai}
+                  {v.value}({v.bai})
                 </div>
                 <div className="EchBox2Son1_3">{v.name}</div>
               </div>

+ 7 - 1
src/pages/A6_1ques/A6Qtopic/index.module.scss

@@ -11,7 +11,13 @@
 
   :global {
     .QTtop {
-      text-align: right;
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      .QTtitle{
+        font-weight: 700;
+        font-size: 18px;
+      }
     }
 
     .QTtable {

+ 16 - 16
src/pages/A6_1ques/A6Qtopic/index.tsx

@@ -27,23 +27,20 @@ type A6QT_TableType = {
   creatorName: string;
   custom: boolean;
   id: number;
-  // options?: any;
-  // optionsCount?: any;
   question: string;
   questionnaireId: 1;
   skip: string;
-  // skipQuestionNum?: any;
-  // sort?: any;
   type: string;
   updateTime: string;
 };
 
 type Props = {
+  fTitle?: string;
   sId: number;
   closeFu: () => void;
 };
 
-function A6Qtopic({ sId, closeFu }: Props) {
+function A6Qtopic({ fTitle, sId, closeFu }: Props) {
   // 表格数组
   const [list, setList] = useState<A6QT_TableType[]>([]);
 
@@ -213,17 +210,20 @@ function A6Qtopic({ sId, closeFu }: Props) {
   return (
     <div className={styles.A6Qtopic}>
       <div className="QTtop">
-        <Button
-          type="primary"
-          onClick={() => {
-            if (list.length >= 50) return MessageFu.warning("最多支持50题!");
-            setMoInfo({ id: -1, num: 0 });
-          }}
-        >
-          新增
-        </Button>
-        &emsp;
-        <Button onClick={closeFu}>返回</Button>
+        <div className="QTtitle">{fTitle}</div>
+        <div>
+          <Button
+            type="primary"
+            onClick={() => {
+              if (list.length >= 50) return MessageFu.warning("最多支持50题!");
+              setMoInfo({ id: -1, num: 0 });
+            }}
+          >
+            新增
+          </Button>
+          &emsp;
+          <Button onClick={closeFu}>返回</Button>
+        </div>
       </div>
       <div className="QTtable">
         <DndProvider backend={HTML5Backend}>

+ 1 - 0
src/pages/A6_1ques/data.ts

@@ -1,6 +1,7 @@
 export type A6QInfoType = {
   id: number;
   txt: "" | "新增" | "编辑" | "查看" | "题目管理";
+  title?:string
 };
 
 // 新增里面的题目列表

+ 9 - 4
src/pages/A6_1ques/index.tsx

@@ -65,6 +65,7 @@ function A6_1ques() {
   const [info, setInfo] = useState<A6QInfoType>({
     id: 0,
     txt: "",
+    title: "",
   });
 
   // 从仓库获取列表数据
@@ -105,7 +106,9 @@ function A6_1ques() {
             <Button
               size="small"
               type="text"
-              onClick={() => setInfo({ id: item.id, txt: "题目管理" })}
+              onClick={() =>
+                setInfo({ id: item.id, txt: "题目管理", title: item.name })
+              }
             >
               题目管理
             </Button>
@@ -128,9 +131,10 @@ function A6_1ques() {
           <span>搜索项:</span>
           <Input
             key={inputKey}
-            maxLength={50}
+            maxLength={10}
+            showCount
             style={{ width: 300 }}
-            placeholder="请输入名称"
+            placeholder="请输入标题"
             allowClear
             onChange={(e) => fromKeyChangeFu(e, "searchKey")}
           />
@@ -182,9 +186,10 @@ function A6_1ques() {
       {info.txt === "题目管理" ? (
         <A6Qtopic
           sId={info.id}
+          fTitle={info.title}
           closeFu={() => {
             getListFu();
-            setInfo({ id: 0, txt: "" });
+            setInfo({ id: 0, txt: "", title: "" });
           }}
         />
       ) : null}

+ 15 - 0
src/pages/A6hot/index.module.scss

@@ -18,11 +18,26 @@
       .A6box1_1 {
         height: calc(50% - 30px);
         margin-bottom: 30px;
+        position: relative;
 
         .echBox {
           margin-top: 10px;
           height: calc(100% - 32px);
         }
+
+        .echBoxNone {
+          position: absolute;
+          top: 32px;
+          left: 0;
+          width: 100%;
+          height: calc(100% - 32px);
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          font-size: 18px;
+          font-weight: 700;
+          letter-spacing: 4px;
+        }
       }
     }
 

+ 17 - 0
src/pages/A6hot/index.tsx

@@ -84,11 +84,18 @@ function A6hot() {
 
   const deriveDataRef1 = useRef<any>([]);
 
+  // 左边-云展-馆藏 折线图是否有数据(没有数据为true)
+  const [leftFlag, setLeftFlag] = useState([false, false]);
+
   // 获取左边数据
   const getListFu1 = useCallback(async () => {
+    let leftFlagTemp = [false, false];
+
     const res1 = await A6_APIgetLikeList("exhibition");
     const obj1 = {};
     if (res1.code === 0) {
+      leftFlagTemp[0] = res1.data.length <= 0;
+
       const data1: dataType = [];
       res1.data.forEach((v: any) => {
         Reflect.set(obj1, v.groupKey, v.pcsStar);
@@ -105,6 +112,10 @@ function A6hot() {
     const res2 = await A6_APIgetLikeList("goods");
     const obj2 = {};
     if (res2.code === 0) {
+      leftFlagTemp[1] = res2.data.length <= 0;
+
+      setLeftFlag(leftFlagTemp);
+
       const data2: dataType = [];
       res2.data.forEach((v: any) => {
         Reflect.set(obj2, v.groupKey, v.pcsStar);
@@ -199,10 +210,16 @@ function A6hot() {
         <div className="A6box1_1">
           <div className="A6tit">云展点赞趋势</div>
           <div className="echBox" ref={echartsRef1}></div>
+          {leftFlag[0] && isOk ? (
+            <div className="echBoxNone">暂无数据</div>
+          ) : null}
         </div>
         <div className="A6box1_1">
           <div className="A6tit">馆藏点赞趋势</div>
           <div className="echBox" ref={echartsRef2}></div>
+          {leftFlag[1] && isOk ? (
+            <div className="echBoxNone">暂无数据</div>
+          ) : null}
         </div>
       </div>
       <div className="A6box2">

+ 2 - 1
src/pages/A7user/index.tsx

@@ -148,7 +148,8 @@ function A7user() {
             <span>搜索项:</span>
             <Input
               key={inputKey}
-              maxLength={15}
+              maxLength={10}
+              showCount
               style={{ width: 300 }}
               placeholder="请输入用户名"
               allowClear

+ 4 - 3
src/pages/A8log/index.tsx

@@ -62,9 +62,10 @@ function D2Log() {
           <div className="row">
             <span>账号:</span>
             <Input
-              maxLength={15}
-              style={{ width: 150 }}
-              placeholder="请输入"
+              maxLength={10}
+              showCount
+              style={{ width: 300 }}
+              placeholder="请输入账号"
               allowClear
               onChange={(e) => nameChange(e)}
             />

+ 1 - 0
src/utils/tableData.ts

@@ -42,6 +42,7 @@ export const A7tableC = [
 
 export const A8tableC = [
   ["index", "序号"],
+  ["txt", "账号",'userName'],
   ["txt", "操作日期", "createTime"],
   ["txt", "IP记录", "ip"],
   ["txt", "操作模块", "type"],