zhanghua
2024-12-24 bedf461ff5403517478598e9f36d3c1ce033925f
Merge branch 'master' of http://42.193.1.25:9521/r/dream_web

# Conflicts:
# src/App.vue
# src/views/order/index.vue
5个文件已修改
115 ■■■■ 已修改文件
src/api/class.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/order.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/student.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/print.js 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/class/index.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/class.js
@@ -40,6 +40,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
@@ -73,6 +74,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
src/api/order.js
@@ -9,6 +9,18 @@
          ls{id number createTime state payType payState message buyer{name } mobile amt discount originAmt
          playerBaseInfo{id name} orgBaseInfo{id name} saleStaff{name}
          details{goodsName skuName unitName voucherName giftQty qty amt price goodsGalleries{url1 url2 url3 origin def ext}  }} pageOut{total index size} }}`,
    fetchPolicy: 'no-cache',
    variables: params,
  });
}
export function findPlayerAccByOrderId(params) {
  return apolloClient.query({
    query: gql `
      query vars($orderId:Int!){
      findPlayerAccByOrderId(orderId:$orderId) {
        id staffName  }}`,
    fetchPolicy: 'no-cache',
      variables: params,
    });
}
src/api/student.js
@@ -43,6 +43,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
@@ -89,6 +90,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
@@ -131,6 +133,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
@@ -177,6 +180,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
@@ -301,6 +305,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
@@ -333,6 +338,7 @@
        }
      }
    `,
    fetchPolicy:'no-cache',
    variables: params,
  });
}
src/utils/print.js
@@ -1,16 +1,17 @@
export function printHtml(html) {
export function loadPrintStyle() {
  let style = getStyle();
  let container = getContainer(html);
  document.body.appendChild(style);
  document.body.appendChild(container);
}
export function printHtml(html) {
  let container = getContainer(html);
  document.body.appendChild(container);
  getLoadPromise(container).then(() => {
    window.print();
    document.body.removeChild(style);
    document.body.removeChild(container);
  });
}
// 设置打印样式
function getStyle() {
@@ -32,23 +33,6 @@
      @page {
        margin-top: 0;
        margin-bottom: 0
        }
    .div-2-column {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }
    .m-h2 {
        text-align: center;
        font-size: 1.17em;
        margin-top: 50px;
        font-weight: bold;
    }
    #tr {
        height: 30px;
    }
    .txt-center {
        text-align: center;
    }
`;
  let style = document.createElement("style");
src/views/class/index.vue
@@ -29,35 +29,24 @@
                v-if="activeName == 'all'"
                height="100%"
            >
                <el-table-column label="班级名称">
                    <template slot-scope="scope">
                        <el-link type="primary" :underline="false">{{
                            scope.row.team.name
                        }}</el-link>
                    </template>
        <el-table-column label="班级名称" prop="team.name"> </el-table-column>
        <el-table-column label="班级人数" width="200" prop="playerCount">
                </el-table-column>
                <el-table-column label="班级人数" width="200">
                    <template slot-scope="scope"
                        >{{ scope.row.playerCount }} 人</template
                    >
        <el-table-column label="课包/会员卡" width="200" prop="voucher.name">
                </el-table-column>
                <el-table-column label="课包/会员卡" width="200">
                    <template slot-scope="scope">{{
                        scope.row.team.voucher
                            ? scope.row.team.voucher.name
                            : ''
                    }}</template>
                </el-table-column>
                <el-table-column label="教师" width="">
                    <template slot-scope="scope">{{
                        concatenateArray(scope.row.team.sessionStaffs)
                    }}</template>
        <el-table-column label="教师" width="" prop="sessionStaffs">
                </el-table-column>
                <el-table-column label="操作" width="200">
                    <template slot-scope="scope">
                        <el-button type="text" @click="handleExport(scope.row)">
            <el-link
              @click="handleExport(scope.row)"
              type="primary"
              :underline="false"
              >导出</el-link
            >
            <!-- <el-button type="text" @click="handleExport(scope.row)">
                            导出
                        </el-button>
            </el-button> -->
                    </template>
                </el-table-column>
            </el-table>
@@ -69,21 +58,11 @@
                height="100%"
                v-else
            >
                <el-table-column label="班级名称">
                    <template slot-scope="scope"
                        >{{ scope.row.name }}
                    </template>
                </el-table-column>
                <el-table-column label="停用时间">
                    <template slot-scope="scope"
                        >{{ scope.row.modifyTime }}
                    </template>
                </el-table-column>
        <el-table-column label="班级名称" prop="name"> </el-table-column>
        <el-table-column label="停用时间" prop="modifyTime"> </el-table-column>
                <el-table-column label="操作" width="200">
                    <template slot-scope="">
                        <el-link type="primary" :underline="false"
                            >恢复</el-link
                        >
            <el-link type="primary" :underline="false">恢复</el-link>
                    </template>
                </el-table-column>
            </el-table>
@@ -115,9 +94,7 @@
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button @click="dialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="confirmExport"
                    >导 出</el-button
                >
        <el-button type="primary" @click="confirmExport">导 出</el-button>
            </div>
        </el-dialog>
    </div>
@@ -176,8 +153,16 @@
            this.dialogVisible = true;
        },
        confirmExport() {
            this.download('exportSignIn?teamId=' + this.form.teamId + '&startTime=' + this.form.dateRange[0] + '&endTime=' + this.form.dateRange[1], {
            }, `${this.form.name}上课签到表.xlsx`)
      this.download(
        "exportSignIn?teamId=" +
          this.form.teamId +
          "&startTime=" +
          this.form.dateRange[0] +
          "&endTime=" +
          this.form.dateRange[1],
        {},
        `${this.form.name}上课签到表.xlsx`
      );
        },
        handleSizeChange(val) {
            this.data.pageIn.size = val;