|
@@ -1,9 +1,9 @@
|
|
|
<template>
|
|
|
<!--外层所有数据-->
|
|
|
- <div class="productbox" v-loading="initLoading" v-if="showState==='default'" element-loading-text="正在准备数据中...">
|
|
|
+ <div class="productbox" v-loading="initLoading" v-if="showState==='default'" :element-loading-text="$t(`product.prepareData`)+'...'">
|
|
|
<div class="header-select">
|
|
|
<el-collapse v-model="activeNames" accordion>
|
|
|
- <el-collapse-item title="数据筛选" name="1">
|
|
|
+ <el-collapse-item :title="$t(`product.filterType`)" name="1">
|
|
|
<div class="filtratebox">
|
|
|
<!--产品类型-->
|
|
|
<div class="filtratebox-phase">
|
|
@@ -26,7 +26,7 @@
|
|
|
<!--结果类型end-->
|
|
|
<!--产品类型end-->
|
|
|
<div class="filtratebox-phase">
|
|
|
- <span class="filtratebox-phase-title">筛选类型:</span>
|
|
|
+ <span class="filtratebox-phase-title">{{$t(`product.filterType`)}}:</span>
|
|
|
<div class="filtratebox-phase-content">
|
|
|
<div class="phase-item" v-for="(items,index) in productData.filtrate" :key="items.value" :class="[index ===clickNum.filter ? 'filter-click':'' ]" @click="clickNum.filter=index">{{items.name}}</div>
|
|
|
</div>
|
|
@@ -44,16 +44,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filtratebox-phase">
|
|
|
- <span class="filtratebox-phase-title subclass">时间范围:</span>
|
|
|
+ <span class="filtratebox-phase-title subclass">{{$t(`product.timeRange`)}}:</span>
|
|
|
<div class="filtratebox-phase-content">
|
|
|
<div class="phase-item" v-for="(items,index) in productData.time" :key="items.value" :class="[index ===clickNum.time ? 'filter-click':'' ]" @click="(timeScope=items.timeV,clickNum.time=index,productData.timevalue='')">{{items.name}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filtratebox-phase">
|
|
|
- <span class="filtratebox-phase-title subclass">精准选择:</span>
|
|
|
+ <span class="filtratebox-phase-title subclass">{{$t(`product.accurateSelect`)}}:</span>
|
|
|
<div class="filtratebox-phase-content precise">
|
|
|
<div v-if="(clickNum.subject === 0 || clickNum.subject === 2) && clickNum.filter===0" class="schoolclass">
|
|
|
- <el-cascader v-model="optionsValue" :options="options" :props="props2" :collapse-tags=true :collapse-tags-tooltip=true filterable :filter-method="keywords">
|
|
|
+ <el-cascader v-model="optionsValue" :options="options" :props="props2" :collapse-tags=true :collapse-tags-tooltip=true filterable :filter-method="keywords" :placeholder="$t(`product.pleaseSelect`)">
|
|
|
</el-cascader>
|
|
|
<div class="addschoolbtn" @click="(adddialog=true,addvalue='',searchInit())">
|
|
|
<el-icon color="#606266">
|
|
@@ -62,16 +62,16 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else-if="clickNum.subject === 1" class="aresclass">
|
|
|
- <el-select v-model="optionsValue" multiple filterable :filter-method="remoteMethod" collapse-tags collapse-tags-tooltip :max-collapse-tags="3" placeholder="选择相应的学区进行统计" clearable>
|
|
|
+ <el-select v-model="optionsValue" multiple filterable :filter-method="remoteMethod" collapse-tags collapse-tags-tooltip :max-collapse-tags="3" :placeholder="$t(`product.selectAreaForStatistics`)" clearable>
|
|
|
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="timeselect-box">
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-if="timeScope ==='daterange'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Day'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Week'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Month'" @change="timeChange" :disabled-date="monthOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="year" placeholder="请选择 某一年 来进行数据统计" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Year'" @change="timeChange" />
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-if="timeScope ==='daterange'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Day'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Week'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="monthrange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startMonth`)" :end-placeholder="$t(`product.endMonth`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Month'" @change="timeChange" :disabled-date="monthOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="year" :placeholder="$t(`product.selectOneYear`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Year'" @change="timeChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -86,33 +86,33 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filtratebox-phase">
|
|
|
- <span class="filtratebox-phase-title subclass">时间类型:</span>
|
|
|
+ <span class="filtratebox-phase-title subclass">{{$t(`product.timeType`)}}:</span>
|
|
|
<div class="filtratebox-phase-content">
|
|
|
<div class="phase-item" v-for="(items,index) in productData.time" :key="items.value" :class="[index ===clickNum.time ? 'filter-click':'' ]" @click="(timeScope=items.timeV,clickNum.time=index,productData.timevalue='')">{{items.name}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filtratebox-phase">
|
|
|
- <span class="filtratebox-phase-title subclass">精准选择:</span>
|
|
|
+ <span class="filtratebox-phase-title subclass">{{$t(`product.accurateSelect`)}}:</span>
|
|
|
<div class="filtratebox-phase-content precise">
|
|
|
<div v-if="clickNum.district ===1" class="schoolclass">
|
|
|
- <el-cascader v-model="optionsValue" :options="options" :props="areaProps" clearable placeholder="请选择要统计的城市或区"/>
|
|
|
+ <el-cascader v-model="optionsValue" :options="options" :props="areaProps" clearable :placeholder="$t(`product.selectStaCityOrArea`)"/>
|
|
|
</div>
|
|
|
<div v-else-if="clickNum.district ===0" class="aresclass">
|
|
|
- <el-select v-model="optionsValue" placeholder="请选择要统计的省份" clearable>
|
|
|
+ <el-select v-model="optionsValue" :placeholder="$t(`product.selectStaProvince`)" clearable>
|
|
|
<el-option v-for="item in options" :key="item.code" :label="item.name" :value="item.name" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div v-else-if="clickNum.district ===2" class="aresclass">
|
|
|
- <el-select v-model="optionsValue" multiple placeholder="请选择要统计的学区" clearable>
|
|
|
+ <el-select v-model="optionsValue" multiple :placeholder="$t(`product.selectStaArea`)" clearable>
|
|
|
<el-option v-for="item in options" :key="item.code" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="timeselect-box">
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-if="timeScope ==='daterange'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Day'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Week'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Month'" @change="timeChange" :disabled-date="monthOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="year" placeholder="请选择 某一年 来进行数据统计" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Year'" @change="timeChange" />
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-if="timeScope ==='daterange'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Day'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Week'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="monthrange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startMonth`)" :end-placeholder="$t(`product.endMonth`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Month'" @change="timeChange" :disabled-date="monthOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="year" :placeholder="$t(`product.selectOneYear`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Year'" @change="timeChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -127,14 +127,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filtratebox-phase">
|
|
|
- <span class="filtratebox-phase-title subclass">精准选择:</span>
|
|
|
+ <span class="filtratebox-phase-title subclass">{{$t(`product.accurateSelect`)}}:</span>
|
|
|
<div class="filtratebox-phase-content precise">
|
|
|
<div>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-if="timeScope ==='daterange'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Day'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="截止时间" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Week'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="monthrange" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Month'" @change="timeChange" :disabled-date="monthOptions"/>
|
|
|
- <el-date-picker v-model="productData.timevalue" type="year" placeholder="请选择 某一年 来进行数据统计" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Year'" @change="timeChange" />
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-if="timeScope ==='daterange'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Day'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="daterange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startTime`)" :end-placeholder="$t(`product.endTime`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Week'" @change="timeChange" :disabled-date="pickerOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="monthrange" :range-separator="$t(`product.to`)" :start-placeholder="$t(`product.startMonth`)" :end-placeholder="$t(`product.endMonth`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Month'" @change="timeChange" :disabled-date="monthOptions"/>
|
|
|
+ <el-date-picker v-model="productData.timevalue" type="year" :placeholder="$t(`product.selectOneYear`)" value-format="YYYY-MM-DD" v-else-if="timeScope ==='Year'" @change="timeChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -143,7 +143,7 @@
|
|
|
</div>
|
|
|
<!--确认搜索BTN-->
|
|
|
<div class="search-btn">
|
|
|
- <el-button type="primary" :icon="Search" @click="searchData()">搜索</el-button>
|
|
|
+ <el-button type="primary" :icon="Search" @click="searchData()">{{$t(`product.search`)}}</el-button>
|
|
|
</div>
|
|
|
<!--确认搜索BTN end-->
|
|
|
</div>
|
|
@@ -158,15 +158,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="middlebox-right">
|
|
|
- <div class="middlebox-right-title">共有<span class="middlebox-right-num">{{filterdata.length}}</span>条数据</div>
|
|
|
+ <div class="middlebox-right-title">{{$t(`product.thereAre`)}}<span class="middlebox-right-num">{{filterdata.length}}</span>{{$t(`product.records`)}}</div>
|
|
|
<div class="exportbtn">
|
|
|
- <el-button type="success" plain @click="exportstate=true">导出数据到Excel</el-button>
|
|
|
+ <el-button type="success" plain @click="exportstate=true">{{$t(`product.exportDataTo`)}}Excel</el-button>
|
|
|
<!-- <el-button type="success" plain disabled>导出数据到Execl</el-button> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="data-tables" v-loading="searchLoading" v-if="showState==='default'" element-loading-text="正在准备数据中...">
|
|
|
+ <div class="data-tables" v-loading="searchLoading" v-if="showState==='default'" :element-loading-text="$t(`product.prepareData`)+'...'">
|
|
|
<el-auto-resizer>
|
|
|
<template #default="{ height, width }">
|
|
|
<el-table-v2 v-model:sort-state="sortState" :columns="columns" :data="filterdata" :width="width" :height="height" @column-sort="onSort" fixed :row-class="rowClassName" />
|
|
@@ -174,10 +174,10 @@
|
|
|
</el-auto-resizer>
|
|
|
</div>
|
|
|
<div class="addschool-dialog">
|
|
|
- <el-dialog v-model="adddialog" title="学校搜索" width="50%" :close-on-click-modal="false">
|
|
|
+ <el-dialog v-model="adddialog" :title="$t(`product.searchSchool`)" width="50%" :close-on-click-modal="false">
|
|
|
<div class="addschool-box">
|
|
|
<div>
|
|
|
- <el-input v-model="addvalue" placeholder="搜索学校 名称/简码 " class="input-with-select">
|
|
|
+ <el-input v-model="addvalue" :placeholder="$t(`product.searchSchoolBy`) + ' ' + $t(`product.name`) + '/' + $t(`product.simpleCode`)" class="input-with-select">
|
|
|
<template #append>
|
|
|
<el-button :icon="Search" />
|
|
|
</template>
|
|
@@ -186,8 +186,8 @@
|
|
|
<div class="school-list">
|
|
|
<!-- <div class="notsearch-box" v-if="!tableData.length =="><img src="@/assets/img/notsearch.png" /></div> -->
|
|
|
<div class="search-result">
|
|
|
- <p>搜索结果:</p>
|
|
|
- <div class="result-box" v-loading="filterloding" element-loading-text="加载中...">
|
|
|
+ <p>{{$t(`product.searchResult`)}}:</p>
|
|
|
+ <div class="result-box" v-loading="filterloding" :element-loading-text="$t(`product.loading`)+'...'">
|
|
|
<!-- <p><span>学校名称:</span><span class="result-text">{{addschool.name}}</span></p>
|
|
|
<p><span>学校简码:</span><span class="result-text">{{addschool.id}}</span></p>
|
|
|
<p><span>学校地址:</span><span class="result-text">{{addschool.region}}{{addschool.province}}{{addschool.city}}{{addschool.dist}}</span></p>
|
|
@@ -206,24 +206,20 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button @click="adddialog = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="addschoolfn()" v-if="checkboxArr.length !==0">
|
|
|
- 确认
|
|
|
- </el-button>
|
|
|
- <el-button type="info" v-if="checkboxArr.length ===0" disabled>
|
|
|
- 确认
|
|
|
- </el-button>
|
|
|
+ <el-button @click="adddialog = false">{{$t(`product.cancel`)}}</el-button>
|
|
|
+ <el-button type="primary" @click="addschoolfn()" v-if="checkboxArr.length !==0">{{$t(`product.confirm`)}}</el-button>
|
|
|
+ <el-button type="info" v-if="checkboxArr.length ===0" disabled>{{$t(`product.confirm`)}}</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else-if="showState==='details'">
|
|
|
- <Details @myback="changStateshow" :detailsData="detailsData" :pattern="pattern"></Details>
|
|
|
+ <Details @myback="changStateshow" :detailsData="detailsData" :pattern="pattern" :authDetailsData="authDetailsData"></Details>
|
|
|
</div>
|
|
|
<div class="dialog-filter" v-if="exportstate">
|
|
|
- <el-dialog v-model="exportstate" title="筛选导出" width="35%">
|
|
|
- <div class="exports-title">导出筛选</div>
|
|
|
+ <el-dialog v-model="exportstate" :title="$t(`product.exportFilter`)" width="35%">
|
|
|
+ <div class="exports-title">{{$t(`product.exportFilter`)}}</div>
|
|
|
<!-- <el-checkbox-group v-model="checkList">
|
|
|
<div class="selectbox-ck">
|
|
|
<div class="check-selectbox-item" v-for="(item,index) in exportStandard" :key="index">
|
|
@@ -256,48 +252,46 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button @click="exportstate = false">取消</el-button>
|
|
|
- <el-button type="primary" @click="exportExcel(),exportstate = false">
|
|
|
- 确认
|
|
|
- </el-button>
|
|
|
+ <el-button @click="exportstate = false">{{$t(`product.cancel`)}}</el-button>
|
|
|
+ <el-button type="primary" @click="exportExcel(),exportstate = false">{{$t(`product.confirm`)}}</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
<div class="dialog-teachlist" v-if="teachtableShow">
|
|
|
- <el-dialog v-model="teachtableShow" title="教师详细列表" width="55%">
|
|
|
+ <el-dialog v-model="teachtableShow" :title="$t(`product.teacherList`)" width="55%">
|
|
|
<div class="header-title">
|
|
|
<div class="header-title-schoolname">{{touchNowteach.name}}</div>
|
|
|
<div class="header-title-content">
|
|
|
- <div class="header-title-num">共 <span style="color:#409EFF">{{teachData.length}}</span> 名用户</div>
|
|
|
+ <div class="header-title-num">{{$t(`product.thereAre`)}} <span style="color:#409EFF">{{teachData.length}}</span> {{$t(`product.users`)}}</div>
|
|
|
<div class="header-title-btn">
|
|
|
- <el-button size="small" type="primary" v-if="deleteSchoolArr.length >0" @click="seachAllteach" :icon="Search">个人数据查询</el-button>
|
|
|
- <el-button size="small" type="info" disabled :icon="Search" v-else>个人数据查询</el-button>
|
|
|
+ <el-button size="small" type="primary" v-if="deleteSchoolArr.length >0" @click="seachAllteach" :icon="Search">{{$t(`product.personalData`)}}</el-button>
|
|
|
+ <el-button size="small" type="info" disabled :icon="Search" v-else>{{$t(`product.personalData`)}}</el-button>
|
|
|
</div>
|
|
|
<div class="header-title-hint" v-show="deleteSchoolArr.length >0">
|
|
|
- <span>目前支持同时最多10名用户查询</span>
|
|
|
+ <span>{{$t(`product.nowSupportMax`)}}100{{$t(`product.usersForResearch`)}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="teachlist-table">
|
|
|
<el-table ref="multipleTableRef" :data="teachData" style="width: 100%" height="50vh" @selection-change="selectTeach" @sort-change="tablesrotChange">
|
|
|
<el-table-column type="selection" />
|
|
|
- <el-table-column label="头像" align="center">
|
|
|
+ <el-table-column :label="$t(`product.photo`)" align="center">
|
|
|
<template #default="scope">
|
|
|
<el-image style="width: 50px; height: 50px" :src="scope.row.picture" fit="fill" v-if="scope.row.picture"></el-image>
|
|
|
<PersonalPhoto style="cursor: pointer;" :name="scope.row.name" width="50px" height="50px" v-else></PersonalPhoto>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column property="name" label="姓名" align="center"/>
|
|
|
+ <el-table-column property="name" :label="$t(`product.userName`)" align="center"/>
|
|
|
<el-table-column property="id" label="ID" align="center" sortable />
|
|
|
- <el-table-column property="schoolCode" label="弱归户" align="center" sortable>
|
|
|
+ <el-table-column property="schoolCode" :label="$t(`product.userRegist`)" align="center" sortable>
|
|
|
<template #default="scope">
|
|
|
- <div>{{scope.row.schoolCodeW ? scope.row.schoolCodeW:'无'}}</div>
|
|
|
+ <div>{{scope.row.schoolCodeW ? scope.row.schoolCodeW : $t(`product.none`)}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column property="schoolCodeW" label="归户" align="center" sortable>
|
|
|
+ <el-table-column property="schoolCodeW" :label="$t(`product.weakUserRegist`)" align="center" sortable>
|
|
|
<template #default="scope">
|
|
|
- <div>{{scope.row.schoolCode ? scope.row.schoolCode:'无'}}</div>
|
|
|
+ <div>{{scope.row.schoolCode ? scope.row.schoolCode : $t(`product.none`)}}</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="所在地" property="city" align="center" sortable>
|
|
@@ -310,7 +304,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column property="levels" label="本学期积分" align="center" sortable>
|
|
|
+ <el-table-column property="levels" :label="$t(`product.thisSemester`)+$t(`product.points`)" align="center" sortable>
|
|
|
<!-- <template #default="scope">
|
|
|
<div>{{scope.row.points && scope.row.points.level ? scope.row.points.level:0}}</div>
|
|
|
</template> -->
|
|
@@ -319,7 +313,7 @@
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
<span class="dialog-footer">
|
|
|
- <el-button @click="teachtableShow = false">关闭</el-button>
|
|
|
+ <el-button @click="teachtableShow = false">{{$t(`product.close`)}}</el-button>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
@@ -328,7 +322,7 @@
|
|
|
<script setup>
|
|
|
import option_cn from '@/static/regions/region_cn.json'
|
|
|
import option_gl from '@/static/regions/region_gl.json'
|
|
|
-import { ref, getCurrentInstance, watch, h, nextTick } from 'vue'
|
|
|
+import { ref, getCurrentInstance, watch, h, nextTick, reactive } from 'vue'
|
|
|
import { ElMessage, TableV2SortOrder, ElLoading, ElCheckbox,HeaderCellSlotProps,ElPopover,Column, RowClassNameGetter} from 'element-plus'
|
|
|
import { Filter } from '@element-plus/icons'
|
|
|
import { multipleSheetExport } from '@/until/multipleSheetExport'
|
|
@@ -346,12 +340,13 @@ let showState = ref('default')
|
|
|
let findValue = ref()
|
|
|
let test = ref([])
|
|
|
let searchLoading=ref(false)
|
|
|
+let sortValue = reactive({});
|
|
|
|
|
|
let columns = ref([
|
|
|
{
|
|
|
key: "name",
|
|
|
dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "名称",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.name`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
fixed: false,//是否固定列
|
|
|
// sortable: true,
|
|
@@ -360,7 +355,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "date",
|
|
|
dataKey: "date",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "時間",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.time`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
fixed: false,//是否固定列
|
|
|
sortable: true,
|
|
@@ -369,14 +364,14 @@ let columns = ref([
|
|
|
{
|
|
|
key: "schoolId",
|
|
|
dataKey: "schoolId",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "简码",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.simpleCode`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
},
|
|
|
{
|
|
|
key: "deviceCnt",
|
|
|
dataKey: "deviceCnt",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "教室数",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.classroomNumber`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -384,7 +379,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "tmidCnt",
|
|
|
dataKey: "tmidCnt",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "教师数",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.teacherNumber`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -392,7 +387,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "stuShow",
|
|
|
dataKey: "stuShow",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "学生人数",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.studentNumber`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -400,7 +395,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "lessonRecord",
|
|
|
dataKey: "lessonRecord",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "课堂总数",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.lessonNumber`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -408,7 +403,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "lessonLengMin",
|
|
|
dataKey: "lessonLengMin",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "课堂总时数",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.lessonHours`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -416,7 +411,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "tGreen",
|
|
|
dataKey: "tGreen",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "T绿灯",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.tGreen`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -424,7 +419,7 @@ let columns = ref([
|
|
|
{
|
|
|
key: "tLesson",
|
|
|
dataKey: "tLesson",
|
|
|
- title: "T课堂",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.tLesson`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
sortable:true
|
|
@@ -446,20 +441,20 @@ let columns = ref([
|
|
|
cellRenderer: (data) =>
|
|
|
(
|
|
|
<>
|
|
|
- <el-button type="primary" onClick={examineAllteach.bind(this,data)}>查看所有教师</el-button>
|
|
|
+ <el-button type="primary" onClick={examineAllteach.bind(this, data)}>{proxy.$t(`product.viewAllTeacher`)}</el-button>
|
|
|
</>
|
|
|
)
|
|
|
},
|
|
|
{
|
|
|
key: "handle",
|
|
|
- title: "操作",
|
|
|
+ title: proxy.$t(`product.operate`),
|
|
|
width: 150,
|
|
|
align: "center",
|
|
|
headerClass: 'btn-class',
|
|
|
cellRenderer: (data) =>
|
|
|
(
|
|
|
<>
|
|
|
- <el-button type="primary" onClick={changeState.bind(this, data)}>查看</el-button>
|
|
|
+ <el-button type="primary" onClick={changeState.bind(this, data)}>{proxy.$t(`product.view`)}</el-button>
|
|
|
</>
|
|
|
)
|
|
|
},
|
|
@@ -467,6 +462,7 @@ let columns = ref([
|
|
|
const popoverRef = ref()
|
|
|
const siteValue = window.location.host === 'localhost:5001' ? 'cn' : window.location.host === 'bi.teammodel.cn' ? 'cn' : window.location.host === 'bitest.teammodel.cn' ? 'cn' : 'international'
|
|
|
const optionsData = siteValue === 'cn' ? option_cn : option_gl
|
|
|
+//const optionsData = option_gl
|
|
|
columns.value[0].headerCellRenderer = (props = HeaderCellSlotProps) => {
|
|
|
return (
|
|
|
<div class="items-center justify-center">
|
|
@@ -475,13 +471,13 @@ columns.value[0].headerCellRenderer = (props = HeaderCellSlotProps) => {
|
|
|
{{
|
|
|
default: () => (
|
|
|
<div class="filter-wrapper">
|
|
|
- <p class="filter-title">筛选查看结果:</p>
|
|
|
+ <p class="filter-title">{proxy.$t(`product.seeFilterResult`)}:</p>
|
|
|
<div class="filter-group">
|
|
|
<ElCheckbox v-model={filterType.value.totalShow} onChange={filterSchooltype}>
|
|
|
- 显示所有学校
|
|
|
+ {proxy.$t(`product.showAllSchool`)}
|
|
|
</ElCheckbox>
|
|
|
<ElCheckbox v-model={filterType.value.unregistered} onChange={filterSchooltype}>
|
|
|
- 显示未归区学校
|
|
|
+ {proxy.$t(`product.showNoAreaSchool`)}
|
|
|
</ElCheckbox>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -506,6 +502,7 @@ const sortState = ref({
|
|
|
'date':TableV2SortOrder.ASC,
|
|
|
})
|
|
|
const onSort = ({key,order}) => {
|
|
|
+ sortValue = {key:key,order:order};
|
|
|
console.log(key,order)
|
|
|
sortState.value[key] = order
|
|
|
let field=key;let modes=order;let allData=filterdata.value
|
|
@@ -540,7 +537,7 @@ const searchColumns = [
|
|
|
{
|
|
|
// key: "name",
|
|
|
// dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填name
|
|
|
- title: "校徽",
|
|
|
+ title: proxy.$t(`product.schoolEmblem`),
|
|
|
width: 150,
|
|
|
fixed: false,
|
|
|
align: 'center',
|
|
@@ -555,7 +552,7 @@ const searchColumns = [
|
|
|
{
|
|
|
key: "name",
|
|
|
dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填name
|
|
|
- title: "名称",
|
|
|
+ title: proxy.$t(`product.name`),
|
|
|
width: 200,
|
|
|
fixed: false,
|
|
|
headerClass: 'serachclass',
|
|
@@ -564,7 +561,7 @@ const searchColumns = [
|
|
|
{
|
|
|
// key: "name",
|
|
|
// dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填name
|
|
|
- title: "规模版本",
|
|
|
+ title: proxy.$t(`product.scaleVer`),
|
|
|
width: 100,
|
|
|
fixed: false,
|
|
|
align: 'center',
|
|
@@ -581,7 +578,7 @@ const searchColumns = [
|
|
|
{
|
|
|
key: "id",
|
|
|
dataKey: "id",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "学校简码",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.school`) + proxy.$t(`product.simpleCode`),//显示在单元格表头的文本
|
|
|
width: 150,//当前列的宽度,必须设置
|
|
|
align: 'center',
|
|
|
headerClass: 'serachclass',
|
|
@@ -597,7 +594,7 @@ const searchColumns = [
|
|
|
{
|
|
|
key: "areaName",
|
|
|
dataKey: "areaName",
|
|
|
- title: "所属学区",
|
|
|
+ title: proxy.$t(`product.belongArea`),
|
|
|
width: 150,
|
|
|
align: 'center',
|
|
|
headerClass: 'serachclass',
|
|
@@ -606,45 +603,45 @@ const searchColumns = [
|
|
|
let tableData = ref([])
|
|
|
let filterdata = ref([])
|
|
|
let productData = ref({
|
|
|
- dataType: '结果类型',
|
|
|
+ dataType: proxy.$t(`product.resultType`),
|
|
|
datainfo: [
|
|
|
- { name: '累计统计', value: 'aggregate' },
|
|
|
- { name: '独立统计', value: 'onlyone' }
|
|
|
+ { name: proxy.$t(`product.sumStatistics`), value: 'aggregate' },
|
|
|
+ { name: proxy.$t(`product.soloStatistics`), value: 'onlyone' }
|
|
|
],
|
|
|
- typeName: '产品类型',
|
|
|
+ typeName: proxy.$t(`product.productType`),
|
|
|
type: [
|
|
|
{ name: 'HiTeach', value: 'HiTeach' },
|
|
|
{ name: 'HiTeachCC', value: 'HiTeachCC' },
|
|
|
{ name: 'HiTA', value: 'HiTA' },
|
|
|
],
|
|
|
- filtrateName: '筛选类型',
|
|
|
+ filtrateName: proxy.$t(`product.filterType`),
|
|
|
filtrate: [
|
|
|
- { name: '来源类型', key: 'source' },
|
|
|
- { name: '地区城市', key: 'areaCity' },
|
|
|
- { name: '时间选择', key: 'areaCity' },
|
|
|
+ { name: proxy.$t(`product.sourceType`), key: 'source' },
|
|
|
+ { name: proxy.$t(`product.areaCity`), key: 'areaCity' },
|
|
|
+ { name: proxy.$t(`product.timeSelect`), key: 'areaCity' },
|
|
|
],
|
|
|
- sourceName: '目标范围',
|
|
|
+ sourceName: proxy.$t(`product.targetRange`),
|
|
|
source: [
|
|
|
// { name: '全部', value: 'sourceAll' },
|
|
|
- { name: '学校', value: 'school' },
|
|
|
- { name: '学区', value: 'area' },
|
|
|
+ { name: proxy.$t(`product.school`), value: 'school' },
|
|
|
+ { name: proxy.$t(`product.area`), value: 'area' },
|
|
|
// { name: '城市', value: 'city' }
|
|
|
],
|
|
|
- districtName: '地区选择',
|
|
|
+ districtName: proxy.$t(`product.districtSelect`),
|
|
|
district: [
|
|
|
// { name: '所有', value: 'districtAll' },
|
|
|
- { name: '省', value: 'province' },
|
|
|
- { name: '城市', value: 'city' },
|
|
|
- { name: '学区', value: 'area' },
|
|
|
+ { name: proxy.$t(`product.province`), value: 'province' },
|
|
|
+ { name: proxy.$t(`product.city`), value: 'city' },
|
|
|
+ { name: proxy.$t(`product.area`), value: 'area' },
|
|
|
],
|
|
|
- timeName: '时间选择',
|
|
|
+ timeName: proxy.$t(`product.timeSelect`),
|
|
|
timevalue: '',
|
|
|
time: [
|
|
|
// { name: '全部', value: 'timeAll', timeV: 'daterange' },
|
|
|
- { name: '天', value: 'day', timeV: 'Day' ,state:true},
|
|
|
+ { name: proxy.$t(`product.day`), value: 'day', timeV: 'Day' ,state:true},
|
|
|
// { name: '周', value: 'week', timeV: 'Week',state:false },
|
|
|
- { name: '月', value: 'month', timeV: 'Month',state:true },
|
|
|
- { name: '年', value: 'year', timeV: 'Year' ,state:true}
|
|
|
+ { name: proxy.$t(`product.month`), value: 'month', timeV: 'Month',state:true },
|
|
|
+ { name: proxy.$t(`product.year`), value: 'year', timeV: 'Year' ,state:true}
|
|
|
]
|
|
|
})
|
|
|
let clickNum = ref({
|
|
@@ -712,25 +709,26 @@ let dataForm = ref({
|
|
|
})
|
|
|
let checkList = ref([])
|
|
|
let exportList = ref([
|
|
|
- { label: '学校名称', key: 'name' },
|
|
|
- { label: '学校简码', key: 'schoolId' },
|
|
|
- { label: '教室数', key: 'deviceCnt' },
|
|
|
- { label: '教师数', key: 'tmidCnt' },
|
|
|
- { label: '学生人次', key: 'stuShow' },
|
|
|
- { label: '学生参与总时数', key: 'stuLessonLengMin' },
|
|
|
- { label: 'T绿灯', key: 'tGreen' },
|
|
|
- { label: '课堂总数', key: 'lessonRecord' },
|
|
|
- { label: '课堂总时数', key: 'lessonLengMin' },
|
|
|
- { label: '时间', key: 'date' },
|
|
|
+ { label: proxy.$t(`product.school`) + proxy.$t(`product.name`), key: 'name' },
|
|
|
+ { label: proxy.$t(`product.school`) + proxy.$t(`product.simpleCode`), key: 'schoolId' },
|
|
|
+ { label: proxy.$t(`product.classroomNumber`), key: 'deviceCnt' },
|
|
|
+ { label: proxy.$t(`product.teacherNumber`), key: 'tmidCnt' },
|
|
|
+ { label: proxy.$t(`product.studentNumberUnique`), key: 'stuShow' },
|
|
|
+ { label: proxy.$t(`product.studentJoinHours`), key: 'stuLessonLengMin' },
|
|
|
+ { label: proxy.$t(`product.tGreen`), key: 'tGreen' },
|
|
|
+ { label: proxy.$t(`product.lessonNumber`), key: 'lessonRecord' },
|
|
|
+ { label: proxy.$t(`product.lessonHours`), key: 'lessonLengMin' },
|
|
|
+ { label: proxy.$t(`product.time`), key: 'date' },
|
|
|
])
|
|
|
-let fieldList = ref(['学校名称', '学校简码', '教室数', '教师数', '学生人次', '学生参与总时数', 'T绿灯', '课堂总数', '课堂总时数', '时间'])
|
|
|
+let fieldList = ref([proxy.$t(`product.school`) + proxy.$t(`product.name`), proxy.$t(`product.school`) + proxy.$t(`product.simpleCode`), proxy.$t(`product.classroomNumber`), proxy.$t(`product.teacherNumber`), proxy.$t(`product.studentNumberUnique`), proxy.$t(`product.studentJoinHours`), proxy.$t(`product.tGreen`), proxy.$t(`product.lessonNumber`), proxy.$t(`product.lessonHours`), proxy.$t(`product.time`)])
|
|
|
let exportStandard = ref([
|
|
|
- { title: '参与人次', value: 0, key: 'personnum', option: [{ name: '小于50', value: '50' }, { name: '大于50,小于100', value: '50-100' }, { name: '大于100', value: '101' }, { name: '大于300', value: '301' }] },
|
|
|
- { title: '授课时间', value: 0, key: 'classtime', option: [{ name: '小于等于45分钟', value: '45' }, { name: '大于45分钟,小于90分钟', value: '45-90' }, { name: '小于90分钟', value: '91' }] },
|
|
|
- { title: 'T指标数', value: 0, key: 'Tnum', option: [{ name: '无绿灯', value: '0' }, { name: '单绿灯', value: '1' }, { name: '双绿灯', value: '2' }] },
|
|
|
- { title: '授权类型', value: 0, key: 'powertype', option: [{ name: '全部', value: 'all' }, { name: '试用', value: 'test' }, { name: '已授权', value: 'power' }] },
|
|
|
+ { title: proxy.$t(`product.joinNumberUnique`), value: 0, key: 'personnum', option: [{ name: proxy.$t(`product.smaller`) + '50', value: '50' }, { name: proxy.$t(`product.bigger`) + '50,' + proxy.$t(`product.smaller`) + '100', value: '50-100' }, { name: proxy.$t(`product.bigger`) + '100', value: '101' }, { name: proxy.$t(`product.bigger`) + '300', value: '301' }] },
|
|
|
+ { title: proxy.$t(`product.lessonTime`), value: 0, key: 'classtime', option: [{ name: proxy.$t(`product.smaller`) + proxy.$t(`product.equal`) + '45' + proxy.$t(`product.minute`), value: '45' }, { name: proxy.$t(`product.bigger`) + '45' + proxy.$t(`product.minute`) + ',' + proxy.$t(`product.smaller`) + '90' + proxy.$t(`product.minute`), value: '45-90' }, { name: proxy.$t(`product.smaller`) + '90' + proxy.$t(`product.minute`), value: '91' }] },
|
|
|
+ { title: proxy.$t(`product.tIndicator`), value: 0, key: 'Tnum', option: [{ name: proxy.$t(`product.tGreenZero`), value: '0' }, { name: proxy.$t(`product.tGreenOne`), value: '1' }, { name: proxy.$t(`product.tGreenTwo`), value: '2' }] },
|
|
|
+ { title: proxy.$t(`product.authType`), value: 0, key: 'powertype', option: [{ name: proxy.$t(`product.all`), value: 'all' }, { name: proxy.$t(`product.testUse`), value: 'test' }, { name: proxy.$t(`product.authorized`), value: 'power' }] },
|
|
|
])
|
|
|
let detailsData = ref()
|
|
|
+let authDetailsData = ref()
|
|
|
let pattern=ref({
|
|
|
state:'school',
|
|
|
data:''
|
|
@@ -769,31 +767,31 @@ let originalTeachdata=ref([])
|
|
|
let deleteSchoolArr=ref([])
|
|
|
let touchNowteach=ref()
|
|
|
const pickerOptions=function disabledDate(time) {
|
|
|
- return time.getTime() > Date.now();
|
|
|
+ return time.getTime() > Date.now();
|
|
|
}
|
|
|
const monthOptions=function disabledDate(time){
|
|
|
- // 获取当前的月份信息
|
|
|
- const date = new Date();
|
|
|
- const year = date.getFullYear();
|
|
|
- let month = date.getMonth() + 1;
|
|
|
- if (month >= 1 && month <= 9) {
|
|
|
- month = "0" + month;
|
|
|
- }
|
|
|
- const nowDate = year.toString() + month.toString();
|
|
|
- // 获取时间选择器的月份信息
|
|
|
- const timeyear = time.getFullYear(); // 获取时间选择器的年份(有很多)
|
|
|
- let timemonth = time.getMonth(); // 与上面同理
|
|
|
- if (timemonth >= 1 && timemonth <= 9) {
|
|
|
- timemonth = "0" + timemonth;
|
|
|
- }
|
|
|
- const elTimeData = timeyear.toString() + timemonth.toString();
|
|
|
- return elTimeData >= nowDate;
|
|
|
+ // 获取当前的月份信息
|
|
|
+ const date = new Date();
|
|
|
+ const year = date.getFullYear();
|
|
|
+ let month = date.getMonth() + 1;
|
|
|
+ if (month >= 1 && month <= 9) {
|
|
|
+ month = "0" + month;
|
|
|
+ }
|
|
|
+ const nowDate = year.toString() + month.toString();
|
|
|
+ // 获取时间选择器的月份信息
|
|
|
+ const timeyear = time.getFullYear(); // 获取时间选择器的年份(有很多)
|
|
|
+ let timemonth = time.getMonth(); // 与上面同理
|
|
|
+ if (timemonth >= 1 && timemonth <= 9) {
|
|
|
+ timemonth = "0" + timemonth;
|
|
|
+ }
|
|
|
+ const elTimeData = timeyear.toString() + timemonth.toString();
|
|
|
+ return elTimeData >= nowDate;
|
|
|
}
|
|
|
function rowClassName({rowIndex}) {
|
|
|
- if (filterdata.value[rowIndex].geoInfo) {
|
|
|
+ if (filterdata.value[rowIndex].geoInfo) {
|
|
|
return 'highlight-row'; // 对第二行应用特定样式
|
|
|
- }
|
|
|
- return ''; // 其他行不做特殊处理
|
|
|
+ }
|
|
|
+ return ''; // 其他行不做特殊处理
|
|
|
}
|
|
|
function changeState (value) {
|
|
|
console.log(value)
|
|
@@ -802,6 +800,7 @@ function changeState (value) {
|
|
|
pattern.value.state=clickNum.value.subject === 0 ? 'school':clickNum.value.subject === 1 ? 'area':''
|
|
|
clickNum.value.subject === 1 ? pattern.value.data=primevalData.value:''
|
|
|
detailsData.value = value.rowData
|
|
|
+ //debugger
|
|
|
}
|
|
|
function changStateshow (value) {
|
|
|
console.log(value, '状态改变')
|
|
@@ -839,18 +838,18 @@ function dataInit () {
|
|
|
filterloding.value = false
|
|
|
initLoading.value=false
|
|
|
}).catch((err) => {
|
|
|
- ElMessage.error('API异常,基础数据获取异常')
|
|
|
+ ElMessage.error(proxy.$t(`product.apiErrpr`) + ',' + proxy.$t(`product.basicDataError`))
|
|
|
filterloding.value = false
|
|
|
initLoading.value=false
|
|
|
})
|
|
|
}).catch((err) => {
|
|
|
- ElMessage.error('API异常,基础数据获取异常')
|
|
|
+ ElMessage.error(proxy.$t(`product.apiErrpr`) + ',' + proxy.$t(`product.basicDataError`))
|
|
|
})
|
|
|
}
|
|
|
function serachToresult(startTime, endTime, product, schools, unit) {
|
|
|
// let data = { "dateFrom": "2023-04-12", "dateTo": "2023-04-19", "prod": "HiTeach", "schoolIds": ["tbslgb", "habook"], "dateUnit": "Day" }
|
|
|
if (!startTime || !endTime) {
|
|
|
- ElMessage.info('请选择时间进行数据搜索')
|
|
|
+ ElMessage.info(proxy.$t(`product.timeRangeSelectError`))
|
|
|
return
|
|
|
}
|
|
|
searchLoading.value = true;
|
|
@@ -865,7 +864,7 @@ function serachToresult(startTime, endTime, product, schools, unit) {
|
|
|
let adds = {
|
|
|
key: "schoolId",
|
|
|
dataKey: "schoolId",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
|
|
|
- title: "简码",//显示在单元格表头的文本
|
|
|
+ title: proxy.$t(`product.simpleCode`),//显示在单元格表头的文本
|
|
|
width: 100,//当前列的宽度,必须设置
|
|
|
headerClass: 'general',
|
|
|
}
|
|
@@ -874,17 +873,17 @@ function serachToresult(startTime, endTime, product, schools, unit) {
|
|
|
resultA === -1 ? columns.value.splice(1, 0, adds) : ''
|
|
|
cellWidth.value = (100 / columns.value.length).toFixed(2)
|
|
|
if (res.state === 200) {
|
|
|
- res.data.forEach((item) => { item.name = item.school.name ? item.school.name : '暂无' });
|
|
|
+ res.data.forEach((item) => { item.name = item.school.name ? item.school.name : proxy.$t(`product.noneYet`) });
|
|
|
res.geo.forEach((item) => {
|
|
|
-
|
|
|
if (item.school.name || (item.school.name === "")) {
|
|
|
item.name = item.school.name;
|
|
|
} else if (item.geoInfo) {
|
|
|
item.name = item.geoInfo;
|
|
|
- } else { item.name = '暂无'; }
|
|
|
+ } else {
|
|
|
+ item.name = proxy.$t(`product.noneYet`);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
-
|
|
|
filterdata.value = [...res.geo, ...res.data];
|
|
|
primevalData.value = [...res.geo, ...res.data];
|
|
|
}
|
|
@@ -1021,9 +1020,10 @@ function serachToresult(startTime, endTime, product, schools, unit) {
|
|
|
item.name = item.geoInfo;
|
|
|
}
|
|
|
})
|
|
|
- searchLoading.value = false;
|
|
|
+ authDetailsData.value = res.auth;
|
|
|
+ searchLoading.value = false;
|
|
|
}).catch((err) => {
|
|
|
- ElMessage.error('API异常,数据获取失败')
|
|
|
+ ElMessage.error(proxy.$t(`product.apiErrpr`) + ',' + proxy.$t(`product.getDataError`))
|
|
|
})
|
|
|
}
|
|
|
function timeChange (value) {
|
|
@@ -1110,7 +1110,7 @@ async function filterDistrict (state, valueArr) {
|
|
|
console.log(res, 'filerBack')
|
|
|
res.state === 200 && res.data.length !== 0 ? res.data.forEach((item) => { schoolList.push(item.id) }) : ''
|
|
|
}).catch((err) => {
|
|
|
- ElMessage.error('API异常,省市区数据获取异常')
|
|
|
+ ElMessage.error(proxy.$t(`product.apiErrpr`) + ',' + proxy.$t(`product.getRegionDataError`))
|
|
|
})
|
|
|
return schoolList
|
|
|
}
|
|
@@ -1191,7 +1191,7 @@ function searchInit () {
|
|
|
function addschoolfn () {
|
|
|
let resultA = options.value.findIndex(item => item.id === 'notarea')
|
|
|
console.log(resultA, '值')
|
|
|
- resultA === -1 ? options.value.push({ id: 'notarea', name: '*手动添加学校*', province: '', city: '', children: [] }) : ''
|
|
|
+ resultA === -1 ? options.value.push({ id: 'notarea', name: '*' + proxy.$t(`product.addSchoolManually`) + '*', province: '', city: '', children: [] }) : ''
|
|
|
console.log(checkboxArr.value, '选择的学校')
|
|
|
let checkList = checkboxArr.value
|
|
|
console.log(checkList, 'checkList')
|
|
@@ -1260,35 +1260,35 @@ function exportExcel () {
|
|
|
//普通
|
|
|
let headerArr = []; let keyArr = []
|
|
|
//装置数据
|
|
|
- let deviceArr = ['学校名称', '学校简码', '硬体装置', '无机器授权', '安装机器授权']; let deviceKey = ['name', 'schoolId', 'disposeDevice', 'deviceNoAuth', 'deviceAuth'];
|
|
|
+ let deviceArr = [proxy.$t(`product.school`) + proxy.$t(`product.name`), proxy.$t(`product.school`) + proxy.$t(`product.simpleCode`), proxy.$t(`product.device`), proxy.$t(`product.noDeviceAuth`), proxy.$t(`product.hasDeviceAuth`)]; let deviceKey = ['name', 'schoolId', 'disposeDevice', 'deviceNoAuth', 'deviceAuth'];
|
|
|
//ID数据
|
|
|
- let IDArr = ['学校名称', '学校简码', '教师ID']; let IDKey = ['name', 'schoolId', 'disposeId']
|
|
|
+ let IDArr = [proxy.$t(`product.school`) + proxy.$t(`product.name`), proxy.$t(`product.school`) + proxy.$t(`product.simpleCode`), proxy.$t(`product.teacher`)+'ID']; let IDKey = ['name', 'schoolId', 'disposeId']
|
|
|
//处理普通
|
|
|
let superaddition = [
|
|
|
- { label: '任务数', key: 'mission' },
|
|
|
- { label: '作品数', key: 'missionFin' },
|
|
|
- { label: '题目数', key: 'item' },
|
|
|
- { label: '互动数', key: 'interact' },
|
|
|
- { label: '设备数量', key: 'deviceCnt' },
|
|
|
- { label: '无授权设备', key: 'deviceNoAuth' },
|
|
|
- { label: '授权设备', key: 'deviceAuth' },
|
|
|
- { label: '928授权', key: 'lessonCnt928' },
|
|
|
- { label: 'ID授权', key: 'lessonCntId' },
|
|
|
- { label: '设备授权', key: 'lessonCntDevice' },
|
|
|
- { label: '综合授权', key: 'lessonCntIdDevice' },
|
|
|
- { label: '使用IES课程', key: 'useIES' },
|
|
|
- { label: '使用webIrs', key: 'useWebIrs' },
|
|
|
- { label: '使用IRS', key: 'useDeviceIrs' },
|
|
|
- { label: '使用HiTA', key: 'useHita' },
|
|
|
- { label: '使用HaBoard', key: 'useHaboard' },
|
|
|
- { label: '使用IES5资源', key: 'useIES5Resource' },
|
|
|
- { label: '合作型态', key: 'lTypeCoop' },
|
|
|
- { label: '互动型态', key: 'lTypeIact' },
|
|
|
- { label: '任务型态', key: 'lTypeMis' },
|
|
|
- { label: '差异化型态', key: 'lTypeDif' },
|
|
|
- { label: '测验型态', key: 'lTypeTst' },
|
|
|
- { label: '无型态', key: 'lTypeNone' },
|
|
|
- { label: '未上课', key: 'lTypeNone' },
|
|
|
+ { label: proxy.$t(`product.missionNumber`), key: 'mission' },
|
|
|
+ { label: proxy.$t(`product.workNumber`), key: 'missionFin' },
|
|
|
+ { label: proxy.$t(`product.itemNumber`), key: 'item' },
|
|
|
+ { label: proxy.$t(`product.interactionNumber`), key: 'interact' },
|
|
|
+ { label: proxy.$t(`product.equip`) + proxy.$t(`product.number`), key: 'deviceCnt' },
|
|
|
+ { label: proxy.$t(`product.noAuth`) + proxy.$t(`product.authed`), key: 'deviceNoAuth' },
|
|
|
+ { label: proxy.$t(`product.authed`) + proxy.$t(`product.equip`), key: 'deviceAuth' },
|
|
|
+ { label: '928' + proxy.$t(`product.authed`), key: 'lessonCnt928' },
|
|
|
+ { label: 'ID' + proxy.$t(`product.authed`), key: 'lessonCntId' },
|
|
|
+ { label: proxy.$t(`product.equip`) + proxy.$t(`product.authed`), key: 'lessonCntDevice' },
|
|
|
+ { label: proxy.$t(`product.comprehensive`) + proxy.$t(`product.authed`), key: 'lessonCntIdDevice' },
|
|
|
+ { label: proxy.$t(`product.use`) + 'IES' + proxy.$t(`product.lesson`), key: 'useIES' },
|
|
|
+ { label: proxy.$t(`product.use`) + 'webIrs', key: 'useWebIrs' },
|
|
|
+ { label: proxy.$t(`product.use`) + 'IRS', key: 'useDeviceIrs' },
|
|
|
+ { label: proxy.$t(`product.use`) + 'HiTA', key: 'useHita' },
|
|
|
+ { label: proxy.$t(`product.use`) + 'HaBoard', key: 'useHaboard' },
|
|
|
+ { label: proxy.$t(`product.use`) + 'IES5' + proxy.$t(`product.resource`), key: 'useIES5Resource' },
|
|
|
+ { label: proxy.$t(`product.cooperate`) + proxy.$t(`product.type`), key: 'lTypeCoop' },
|
|
|
+ { label: proxy.$t(`product.interaction`) + proxy.$t(`product.type`), key: 'lTypeIact' },
|
|
|
+ { label: proxy.$t(`product.mission`) + proxy.$t(`product.type`), key: 'lTypeMis' },
|
|
|
+ { label: proxy.$t(`product.difference`) + proxy.$t(`product.type`), key: 'lTypeDif' },
|
|
|
+ { label: proxy.$t(`product.exam`) + proxy.$t(`product.type`), key: 'lTypeTst' },
|
|
|
+ { label: proxy.$t(`product.teachMaterial`), key: 'lTypeNone' },
|
|
|
+ { label: proxy.$t(`product.whiteBoardApp`), key: 'lessonLeng0' },
|
|
|
]
|
|
|
fieldList.value.forEach((item) => {
|
|
|
exportList.value.forEach((items) => {
|
|
@@ -1401,23 +1401,23 @@ function multipleExports (header, key) {
|
|
|
// 表一的整体json数据
|
|
|
tableDatas: disposeArr,
|
|
|
// 表一的sheet名字
|
|
|
- sheetName: '产品使用分析全览'
|
|
|
+ sheetName: proxy.$t(`product.productAnalysisOverview`)
|
|
|
},
|
|
|
{
|
|
|
tHeader: header.deviceH,
|
|
|
filterVal: key.deviceK,
|
|
|
tableDatas: deviceList,
|
|
|
- sheetName: '装置数据'
|
|
|
+ sheetName: proxy.$t(`product.deviceData`)
|
|
|
},
|
|
|
{
|
|
|
tHeader: header.IDheader,
|
|
|
filterVal: key.IDkey,
|
|
|
tableDatas: derivetmdList,
|
|
|
- sheetName: 'ID列表'
|
|
|
+ sheetName: 'ID'+proxy.$t(`product.listTable`)
|
|
|
}
|
|
|
]
|
|
|
console.log(excelDatas,'导出内容')
|
|
|
- multipleSheetExport(excelDatas, '产品使用分析表', true, 'xlsx')
|
|
|
+ multipleSheetExport(excelDatas, proxy.$t(`product.productAnalysisTable`), true, 'xlsx')
|
|
|
}
|
|
|
//拆分数组
|
|
|
function arrayChunk(array,size){
|
|
@@ -1548,10 +1548,16 @@ function filterSchooltype(){
|
|
|
let result=[]
|
|
|
console.log(primevalData.value,'原始值')
|
|
|
console.log(filterValue,'状态值')
|
|
|
+
|
|
|
filterValue.totalShow ? result=primevalData.value:result=dataArr.filter((item)=>{return item.schoolId !=="allschool"})
|
|
|
- filterValue.unregistered ? result=result:result=result.filter((item)=>{return item.school.areaId !== null})
|
|
|
+ filterValue.unregistered ? result=result:result=result.filter((item)=>{return item.schoolId !== "noschoolid"})
|
|
|
+
|
|
|
console.log(result,'赋值')
|
|
|
- filterdata.value=result
|
|
|
+ filterdata.value=result;
|
|
|
+ //debugger
|
|
|
+ if(sortValue.key){
|
|
|
+ onSort(sortValue);
|
|
|
+ }
|
|
|
}
|
|
|
//获取查看所有老师BTN
|
|
|
function examineAllteach(value){
|
|
@@ -1579,8 +1585,8 @@ function selectTeach (value) {
|
|
|
console.log(deleteSchoolArr.value,'6666')
|
|
|
}
|
|
|
function seachAllteach(){
|
|
|
- if(deleteSchoolArr.value.length >10){
|
|
|
- ElMessage.info('当前查询人数仅支持小于或等于10名用户')
|
|
|
+ if(deleteSchoolArr.value.length >100){
|
|
|
+ ElMessage.info(proxy.$t(`product.message1_1`) + '100' + proxy.$t(`product.message1_2`))
|
|
|
return
|
|
|
}
|
|
|
console.log(deleteSchoolArr.value,'传递出去的参数')
|