|
@@ -1,51 +1,51 @@
|
|
<template>
|
|
<template>
|
|
<div class="aclassone-auth" :class="{ closeShow: closefromBtn == true }">
|
|
<div class="aclassone-auth" :class="{ closeShow: closefromBtn == true }">
|
|
<!--收回授權弹窗 -->
|
|
<!--收回授權弹窗 -->
|
|
- <Modal class="aclassone-auth-modal" v-model="isOpenRemove" :title="'確定收回所有授權'">
|
|
|
|
- <p>收回授權後使用數會直接設置為0,如欲給予授權可針對目標對象進行套用。</p>
|
|
|
|
|
|
+ <Modal class="aclassone-auth-modal" v-model="isOpenRemove" :title="titletext">
|
|
|
|
+ <p>{{$t("serviceDriveAuth['收回授權後使用數會直接設置為0,如欲給予授權可針對目標對象進行套用。']")}}</p>
|
|
|
|
|
|
<div slot="footer">
|
|
<div slot="footer">
|
|
- <Button type="text" @click="isOpenRemove = false">取消</Button>
|
|
|
|
- <Button type="primary" @click="resetAll">確定</Button>
|
|
|
|
|
|
+ <Button type="text" @click="isOpenRemove = false">{{$t("serviceDriveAuth['取消']")}}</Button>
|
|
|
|
+ <Button type="primary" @click="resetAll">{{$t("serviceDriveAuth['確定']")}}</Button>
|
|
</div>
|
|
</div>
|
|
</Modal>
|
|
</Modal>
|
|
<div class="title">
|
|
<div class="title">
|
|
- 服務授權管理<span @click="close()"><v-icon class="close-icon" iconClass="close"/></span>
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['服務授權管理']")}}<span @click="close()"><v-icon class="close-icon" iconClass="close"/></span>
|
|
</div>
|
|
</div>
|
|
- <div class="dashboard-title">AClassONE智慧學伴服務授權</div>
|
|
|
|
|
|
+ <div class="dashboard-title">{{$t("serviceDriveAuth['AClassONE智慧學伴服務授權']")}}</div>
|
|
<p class="dashboard-note">
|
|
<p class="dashboard-note">
|
|
- 賦予持有該服務授權的學生TEAM Modal ID使用AClassONE智慧學伴App的權限
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['賦予持有該服務授權的學生TEAM Modal ID使用AClassONE智慧學伴App的權限']")}}
|
|
</p>
|
|
</p>
|
|
<Row class="dashboard">
|
|
<Row class="dashboard">
|
|
<i-col :xs="24" :sm="8" :md="8" :lg="8">
|
|
<i-col :xs="24" :sm="8" :md="8" :lg="8">
|
|
<p class="info-num">
|
|
<p class="info-num">
|
|
<CountTo class="auth-info-num" :endVal="totalAuth" :duration="600"></CountTo>
|
|
<CountTo class="auth-info-num" :endVal="totalAuth" :duration="600"></CountTo>
|
|
</p>
|
|
</p>
|
|
- <p class="info-text">總授權數</p>
|
|
|
|
|
|
+ <p class="info-text">{{$t("serviceDriveAuth['總授權數']")}}</p>
|
|
</i-col>
|
|
</i-col>
|
|
<i-col :xs="24" :sm="8" :md="8" :lg="8">
|
|
<i-col :xs="24" :sm="8" :md="8" :lg="8">
|
|
<p class="info-num">
|
|
<p class="info-num">
|
|
<CountTo class="auth-info-num" :endVal="currentAssignNum" :duration="600"></CountTo>
|
|
<CountTo class="auth-info-num" :endVal="currentAssignNum" :duration="600"></CountTo>
|
|
</p>
|
|
</p>
|
|
- <p class="info-text">本次套用數</p>
|
|
|
|
|
|
+ <p class="info-text">{{$t("serviceDriveAuth['本次套用數']")}}</p>
|
|
</i-col>
|
|
</i-col>
|
|
<i-col :xs="24" :sm="8" :md="8" :lg="8">
|
|
<i-col :xs="24" :sm="8" :md="8" :lg="8">
|
|
<p class="info-num">
|
|
<p class="info-num">
|
|
<CountTo class="auth-info-num" :endVal="usedAuth" :duration="600"></CountTo>
|
|
<CountTo class="auth-info-num" :endVal="usedAuth" :duration="600"></CountTo>
|
|
</p>
|
|
</p>
|
|
- <p class="info-text">已使用數</p>
|
|
|
|
|
|
+ <p class="info-text">{{$t("serviceDriveAuth['已使用數']")}}</p>
|
|
</i-col>
|
|
</i-col>
|
|
</Row>
|
|
</Row>
|
|
|
|
|
|
<!--分頁控件--->
|
|
<!--分頁控件--->
|
|
- <span class="tab-btn" :class="{ 'tab-now': currentTab == 0 }" @click="setCurrentTab(0)">授權總覽</span>
|
|
|
|
- <span class="tab-btn" :class="{ 'tab-now': currentTab == 1 }" @click="setCurrentTab(1)">授權管理</span>
|
|
|
|
|
|
+ <span class="tab-btn" :class="{ 'tab-now': currentTab == 0 }" @click="setCurrentTab(0)">{{$t("serviceDriveAuth['授權總覽']")}}</span>
|
|
|
|
+ <span class="tab-btn" :class="{ 'tab-now': currentTab == 1 }" @click="setCurrentTab(1)">{{$t("serviceDriveAuth['授權管理']")}}</span>
|
|
<Row class="tabContent-wrap">
|
|
<Row class="tabContent-wrap">
|
|
<!--授權總攬-->
|
|
<!--授權總攬-->
|
|
<div v-if="currentTab == 0">
|
|
<div v-if="currentTab == 0">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="16">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="16">
|
|
<p class="chart-title">
|
|
<p class="chart-title">
|
|
- 已購授權總數:<span class="chart-totalnum">{{ totalAuth }}</span>
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['已購授權總數']")}}<span class="chart-totalnum">{{ totalAuth }}</span>
|
|
</p>
|
|
</p>
|
|
<AuthNumChart :clickTab="clickTab" :dbPieNumData="pieNumData" />
|
|
<AuthNumChart :clickTab="clickTab" :dbPieNumData="pieNumData" />
|
|
</i-col>
|
|
</i-col>
|
|
@@ -57,24 +57,24 @@
|
|
</div>
|
|
</div>
|
|
</i-col>
|
|
</i-col>
|
|
|
|
|
|
- <div class="chart-note"><span class="list-icon">*</span> 固定分配之授權由校方統一設置,使用者請於授權管理分頁進行授權對象的設定。動態取用之授權每日23:59:59將自動回收,學生可於次日再次啟用。</div>
|
|
|
|
|
|
+ <div class="chart-note"><span class="list-icon">*</span> {{$t("serviceDriveAuth['note']")}}</div>
|
|
</div>
|
|
</div>
|
|
<!--授權管理-->
|
|
<!--授權管理-->
|
|
<div v-if="currentTab == 1" class="option-group">
|
|
<div v-if="currentTab == 1" class="option-group">
|
|
- <p class="small-title">快速套用授權</p>
|
|
|
|
|
|
+ <p class="small-title">{{$t("serviceDriveAuth['快速套用授權']")}}</p>
|
|
<Row class="option-item">
|
|
<Row class="option-item">
|
|
- <i-col :xs="24" :sm="12" :md="12" :lg="22"><p class="option-text">套用至所有當前勾選項目</p></i-col>
|
|
|
|
|
|
+ <i-col :xs="24" :sm="12" :md="12" :lg="22"><p class="option-text">{{$t("serviceDriveAuth['套用至所有當前勾選項目']")}}</p></i-col>
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
><div class="assign-btn" style="margin-top: -2px" @click="assignType(1)" :class="{ 'light-btn': currentAssignType == 1 }">
|
|
><div class="assign-btn" style="margin-top: -2px" @click="assignType(1)" :class="{ 'light-btn': currentAssignType == 1 }">
|
|
- 套用
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用']")}}
|
|
</div></i-col
|
|
</div></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
<Row class="option-item">
|
|
<Row class="option-item">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
><p class="option-text">
|
|
><p class="option-text">
|
|
- 套用至當前勾選目標第
|
|
|
|
- <input :disabled="selected.length == 0" class="input-num" v-model="inputSelectMin" type="number" placeholder="-" :max="selected.length" min="1" />項至第 <input :disabled="selected.length == 0" placeholder="-" class="input-num" v-model="inputSelectMax" type="number" :min="inputSelectMin" :max="selected.length" />項
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用至當前勾選目標第']")}}
|
|
|
|
+ <input :disabled="selected.length == 0" class="input-num" v-model="inputSelectMin" type="number" placeholder="-" :max="selected.length" min="1" />{{$t("serviceDriveAuth['項至第']")}} <input :disabled="selected.length == 0" placeholder="-" class="input-num" v-model="inputSelectMax" type="number" :min="inputSelectMin" :max="selected.length" />{{$t("serviceDriveAuth['項']")}}
|
|
</p></i-col
|
|
</p></i-col
|
|
>
|
|
>
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
@@ -87,18 +87,18 @@
|
|
'disabled-btn': inputSelectMin > selected.length == true || inputSelectMax > selected.length == true || inputSelectMin > inputSelectMax == true || inputSelectMax <= 0 || inputSelectMax == '' || inputSelectMin <= 0 || inputSelectMin == ''
|
|
'disabled-btn': inputSelectMin > selected.length == true || inputSelectMax > selected.length == true || inputSelectMin > inputSelectMax == true || inputSelectMax <= 0 || inputSelectMax == '' || inputSelectMin <= 0 || inputSelectMin == ''
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- 套用
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用']")}}
|
|
</div></i-col
|
|
</div></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
<Row class="option-item">
|
|
<Row class="option-item">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
><p class="option-text">
|
|
><p class="option-text">
|
|
- 套用至
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用至']")}}
|
|
<!-- 學制Select -->
|
|
<!-- 學制Select -->
|
|
<Select class="dark-iview-select" v-model="searchPeriod" :placeholder="$t('stuAccount.periodHolder')" clearable @on-clear="currentFilter = -1" @on-open-change="cleanData(0)" @on-change="filterData">
|
|
<Select class="dark-iview-select" v-model="searchPeriod" :placeholder="$t('stuAccount.periodHolder')" clearable @on-clear="currentFilter = -1" @on-open-change="cleanData(0)" @on-change="filterData">
|
|
<Option v-for="(item, index) in periods" :value="item.id" :key="index">{{ item.name }}</Option> </Select
|
|
<Option v-for="(item, index) in periods" :value="item.id" :key="index">{{ item.name }}</Option> </Select
|
|
- >所有項目
|
|
|
|
|
|
+ > {{$t("serviceDriveAuth['所有項目']")}}
|
|
</p></i-col
|
|
</p></i-col
|
|
>
|
|
>
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
@@ -111,19 +111,19 @@
|
|
'disabled-btn': currentFilter != 0 || searchPeriod == ''
|
|
'disabled-btn': currentFilter != 0 || searchPeriod == ''
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- 套用
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用']")}}
|
|
</div></i-col
|
|
</div></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
<Row class="option-item">
|
|
<Row class="option-item">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
><p class="option-text">
|
|
><p class="option-text">
|
|
- 套用至
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用至']")}}
|
|
|
|
|
|
<!-- 學級Select -->
|
|
<!-- 學級Select -->
|
|
<Select class="dark-iview-select" v-model="searchGrade" :placeholder="$t('stuAccount.gradeHolder')" not-found-text="请先选择学段" clearable @on-clear="currentFilter = -1" @on-open-change="cleanData(1)" @on-change="filterData">
|
|
<Select class="dark-iview-select" v-model="searchGrade" :placeholder="$t('stuAccount.gradeHolder')" not-found-text="请先选择学段" clearable @on-clear="currentFilter = -1" @on-open-change="cleanData(1)" @on-change="filterData">
|
|
<Option v-for="(item, index) in grades" :value="item.id" :key="index">{{ item.name }}</Option> </Select
|
|
<Option v-for="(item, index) in grades" :value="item.id" :key="index">{{ item.name }}</Option> </Select
|
|
- >所有項目
|
|
|
|
|
|
+ > {{$t("serviceDriveAuth['所有項目']")}}
|
|
</p></i-col
|
|
</p></i-col
|
|
>
|
|
>
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
@@ -136,19 +136,19 @@
|
|
'disabled-btn': currentFilter != 1 || searchGrade == ''
|
|
'disabled-btn': currentFilter != 1 || searchGrade == ''
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- 套用
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用']")}}
|
|
</div></i-col
|
|
</div></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
<Row class="option-item">
|
|
<Row class="option-item">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
><p class="option-text">
|
|
><p class="option-text">
|
|
- 套用至
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用至']")}}
|
|
<!-- 教室Select -->
|
|
<!-- 教室Select -->
|
|
- <Select v-model="searchClassroom" class="dark-iview-select" ref="classroom" placeholder="選擇班級" clearable @on-clear="currentFilter = -1" @on-open-change="cleanData(2)" @on-change="filterData" :not-found-text="searchGrade ? '此年级暂无教室' : '请先选择年级'">
|
|
|
|
|
|
+ <Select v-model="searchClassroom" class="dark-iview-select" ref="classroom" :placeholder="selectClasses" clearable @on-clear="currentFilter = -1" @on-open-change="cleanData(2)" @on-change="filterData" :not-found-text="searchGrade ? '此年级暂无教室' : '请先选择年级'">
|
|
<Option v-for="(item, index) in classes" :value="item.id" :key="index">{{ item.name }}</Option>
|
|
<Option v-for="(item, index) in classes" :value="item.id" :key="index">{{ item.name }}</Option>
|
|
- <Option value="noclass">未关联班级</Option> </Select
|
|
|
|
- >所有項目
|
|
|
|
|
|
+ <Option value="noclass">{{$t("serviceDriveAuth['未关联班级']")}}</Option> </Select
|
|
|
|
+ > {{$t("serviceDriveAuth['所有項目']")}}
|
|
</p></i-col
|
|
</p></i-col
|
|
>
|
|
>
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
@@ -161,13 +161,13 @@
|
|
'disabled-btn': currentFilter != 2 || searchClassroom == ''
|
|
'disabled-btn': currentFilter != 2 || searchClassroom == ''
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- 套用
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用']")}}
|
|
</div></i-col
|
|
</div></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
<Row class="option-item">
|
|
<Row class="option-item">
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="22"
|
|
- ><p class="option-text">套用至全校所有項目 (共 {{ students.length }} 個,{{ students.length > totalAuth ? '大於總授權數,無法使用' : '' }})</p></i-col
|
|
|
|
|
|
+ ><p class="option-text"> {{$t("serviceDriveAuth['套用至全校所有項目']")}} ({{$t("serviceDriveAuth['共']")}} {{ students.length }} {{$t("serviceDriveAuth['個']")}},{{ students.length > totalAuth ? $t("serviceDriveAuth['大於總授權數,無法使用']") : '' }})</p></i-col
|
|
>
|
|
>
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
<i-col :xs="24" :sm="12" :md="12" :lg="2"
|
|
><div
|
|
><div
|
|
@@ -179,18 +179,18 @@
|
|
'disabled-btn': students.length > totalAuth
|
|
'disabled-btn': students.length > totalAuth
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
- 套用
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['套用']")}}
|
|
</div></i-col
|
|
</div></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
</div>
|
|
</div>
|
|
</Row>
|
|
</Row>
|
|
- <div v-if="currentTab == 0" class="save-btn buy-btn">添購其他授權</div>
|
|
|
|
|
|
+ <div v-if="currentTab == 0" class="save-btn buy-btn">{{$t("serviceDriveAuth['添購其他授權']")}}</div>
|
|
<div v-if="currentTab == 1" class="unAssign-btn" @click="isOpenRemove = true">
|
|
<div v-if="currentTab == 1" class="unAssign-btn" @click="isOpenRemove = true">
|
|
- 收回所有授權
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['收回所有授權']")}}
|
|
</div>
|
|
</div>
|
|
<div v-if="currentTab == 1" class="save-btn" @click="saveAuth()">
|
|
<div v-if="currentTab == 1" class="save-btn" @click="saveAuth()">
|
|
- 保存所有變更
|
|
|
|
|
|
+ {{$t("serviceDriveAuth['保存所有變更']")}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -250,8 +250,15 @@ export default {
|
|
periods: 'user/getPeriods', // 學制s
|
|
periods: 'user/getPeriods', // 學制s
|
|
grades: 'user/getGrades', // 年級
|
|
grades: 'user/getGrades', // 年級
|
|
classes: 'user/getClasses', // 教室ID
|
|
classes: 'user/getClasses', // 教室ID
|
|
- aclassOneInfoNum: 'studentAclassOneAuth/getSchoolAclassOneInfoNum'
|
|
|
|
|
|
+ aclassOneInfoNum: 'studentAclassOneAuth/getSchoolAclassOneInfoNum',
|
|
|
|
+
|
|
}),
|
|
}),
|
|
|
|
+ selectClasses:function(){
|
|
|
|
+ return this.$t("serviceDriveAuth['選擇班級']")
|
|
|
|
+ },
|
|
|
|
+ titletext:function(){
|
|
|
|
+ return this.$t("serviceDriveAuth['確定收回所有授權']")
|
|
|
|
+ },
|
|
filterGrades: function() {
|
|
filterGrades: function() {
|
|
var data = this.grades
|
|
var data = this.grades
|
|
if (this.searchPeriod) {
|
|
if (this.searchPeriod) {
|