|
@@ -1,31 +1,66 @@
|
|
<template>
|
|
<template>
|
|
<div class="hiteachAuth-list">
|
|
<div class="hiteachAuth-list">
|
|
|
|
+ <!-- 新增知识点弹窗 -->
|
|
|
|
+ <Modal
|
|
|
|
+ id="hiteachAuth-modal"
|
|
|
|
+ v-model="isOpenRemove"
|
|
|
|
+ :title="'確定解除授權'"
|
|
|
|
+ ref="pointRef"
|
|
|
|
+ >
|
|
|
|
+ <p>當前您所選中的PC【{{ currentConfirmRemovePC }}】,確定解除授權?</p>
|
|
|
|
+ <p>解除授權後,可在教室中的電腦再次進行綁定授權。</p>
|
|
|
|
+
|
|
|
|
+ <div slot="footer">
|
|
|
|
+ <Button type="text" @click="isOpenRemove = false">取消</Button>
|
|
|
|
+ <Button type="primary" @click="removeUserPC(currentConfirmRemovePC)"
|
|
|
|
+ >確定</Button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
|
|
+ </Modal>
|
|
|
|
+ <Loading v-if="isloading == true"></Loading>
|
|
<div class="service-list">
|
|
<div class="service-list">
|
|
<div class="service-listTitle">智慧教室授權管理</div>
|
|
<div class="service-listTitle">智慧教室授權管理</div>
|
|
<Row>
|
|
<Row>
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="16">
|
|
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="19">
|
|
<Row>
|
|
<Row>
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="8">
|
|
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="13">
|
|
<div class="hiteach-info">
|
|
<div class="hiteach-info">
|
|
<p class="nomal-text">Hiteach序號數</p>
|
|
<p class="nomal-text">Hiteach序號數</p>
|
|
- <p class="info-num">{{hiteachListItemIsOpenVuex.length}}</p>
|
|
|
|
|
|
+ <Row>
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="12">
|
|
|
|
+ <p class="device-max">大量</p>
|
|
|
|
+ <span class="nomal-text">授權</span>
|
|
|
|
+ <p class="info-num-small">{{ serialInfo.multiAuthNum }}</p>
|
|
|
|
+ </i-col>
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="12">
|
|
|
|
+ <p class="device-max">單一</p>
|
|
|
|
+ <span class="nomal-text">授權</span>
|
|
|
|
+ <p class="info-num-small">{{ serialInfo.singleAuthNum }}</p>
|
|
|
|
+ </i-col>
|
|
|
|
+ </Row>
|
|
|
|
+
|
|
|
|
+ <!--p class="info-num">{{ serialInfo.totalNum }}</p-->
|
|
</div>
|
|
</div>
|
|
</i-col>
|
|
</i-col>
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="8">
|
|
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="5">
|
|
<div class="hiteach-info">
|
|
<div class="hiteach-info">
|
|
- <p class="nomal-text">可啟用Hiteach序號數</p>
|
|
|
|
- <p class="info-num">{{(hiteachListItemIsOpenVuex.length*225/18).toFixed(0)}}</p>
|
|
|
|
|
|
+ <p class="nomal-text">可啟用裝置數</p>
|
|
|
|
+ <p class="info-num">
|
|
|
|
+ {{ serialInfo.couldActiveNum }}
|
|
|
|
+ </p>
|
|
</div>
|
|
</div>
|
|
</i-col>
|
|
</i-col>
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="8">
|
|
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="6">
|
|
<div class="hiteach-info">
|
|
<div class="hiteach-info">
|
|
- <p class="nomal-text">已啟用Hiteach序號數</p>
|
|
|
|
- <p class="info-num">{{(hiteachListItemIsOpenVuex.length*25/8).toFixed(0)}}</p>
|
|
|
|
|
|
+ <p class="nomal-text">已啟用裝置數</p>
|
|
|
|
+ <p class="info-num">
|
|
|
|
+ {{ serialInfo.activeNum }}
|
|
|
|
+ </p>
|
|
</div>
|
|
</div>
|
|
</i-col>
|
|
</i-col>
|
|
</Row></i-col
|
|
</Row></i-col
|
|
>
|
|
>
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="8">
|
|
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="5">
|
|
<div class="action-btn" @click="gotoHiteachMgmt()">
|
|
<div class="action-btn" @click="gotoHiteachMgmt()">
|
|
管理Hiteach教室
|
|
管理Hiteach教室
|
|
</div>
|
|
</div>
|
|
@@ -54,22 +89,19 @@
|
|
</DropdownMenu>
|
|
</DropdownMenu>
|
|
</Dropdown>
|
|
</Dropdown>
|
|
</div>
|
|
</div>
|
|
- <div
|
|
|
|
- class="hiteach-list"
|
|
|
|
- v-for="(item, index) in hiteachAuthList"
|
|
|
|
- :key="index"
|
|
|
|
- >
|
|
|
|
|
|
+ <div class="hiteach-list" :style="{ height: windowHeight - 250 + 'px' }">
|
|
<div
|
|
<div
|
|
class="hiteach-item"
|
|
class="hiteach-item"
|
|
- v-for="(i, index) in item.serials.auth"
|
|
|
|
- :key="index + 'a'"
|
|
|
|
|
|
+ v-for="(i, index) in hiteachAuthList"
|
|
|
|
+ :key="i.id"
|
|
v-show="filterCondition(i)"
|
|
v-show="filterCondition(i)"
|
|
>
|
|
>
|
|
<div
|
|
<div
|
|
class="detail-btn"
|
|
class="detail-btn"
|
|
@click="setIntroOpen(index)"
|
|
@click="setIntroOpen(index)"
|
|
- v-if="i.endDate != 1 && i.deviceBound.length != 0"
|
|
|
|
|
|
+ v-if="i.endDate != 1 && i.deviceBound.length != 0 && i.deviceMax != 1"
|
|
>
|
|
>
|
|
|
|
+ <!--只要是單一就直接展開無需開關控件-->
|
|
<Icon
|
|
<Icon
|
|
v-show="hiteachListItemIsOpen[index].isOpen == false"
|
|
v-show="hiteachListItemIsOpen[index].isOpen == false"
|
|
type="ios-arrow-down"
|
|
type="ios-arrow-down"
|
|
@@ -98,87 +130,85 @@
|
|
i.deviceMax == 1 ? "單一" : "大量"
|
|
i.deviceMax == 1 ? "單一" : "大量"
|
|
}}</span>
|
|
}}</span>
|
|
</p>
|
|
</p>
|
|
- <p class="serial" :class="{ 'overtime-text': i.endDate == 1 }">
|
|
|
|
|
|
+ <p
|
|
|
|
+ class="serial"
|
|
|
|
+ :class="{ 'overtime-text': i.expireStatus == 'F' }"
|
|
|
|
+ >
|
|
{{ i.serial }}
|
|
{{ i.serial }}
|
|
</p>
|
|
</p>
|
|
|
|
+
|
|
<p class="app-group">
|
|
<p class="app-group">
|
|
<span
|
|
<span
|
|
|
|
+ v-for="(item, index) in aprules"
|
|
|
|
+ :key="index"
|
|
class="more-app"
|
|
class="more-app"
|
|
- :class="{ 'bought-app': i.aprule.sokapp == true }"
|
|
|
|
- >蘇格拉底議課</span
|
|
|
|
- >
|
|
|
|
- <span
|
|
|
|
- class="more-app"
|
|
|
|
- :class="{ 'bought-app': i.aprule.sokrepor == true }"
|
|
|
|
- >蘇格拉底報告</span
|
|
|
|
- >
|
|
|
|
- <span
|
|
|
|
- class="more-app"
|
|
|
|
- :class="{ 'bought-app': i.aprule.sokDesktop == true }"
|
|
|
|
- >蘇格拉底桌面</span
|
|
|
|
- >
|
|
|
|
- <span
|
|
|
|
- class="more-app"
|
|
|
|
- :class="{ 'bought-app': i.aprule.sokvdo == true }"
|
|
|
|
- >蘇格拉底影片</span
|
|
|
|
- >
|
|
|
|
- <span
|
|
|
|
- class="more-app"
|
|
|
|
- :class="{ 'bought-app': i.aprule.remoteSys == true }"
|
|
|
|
- >遠距教室服務</span
|
|
|
|
- >
|
|
|
|
- <span
|
|
|
|
- class="more-app"
|
|
|
|
- :class="{ 'bought-app': i.aprule.ezs == true }"
|
|
|
|
- >錄播系統</span
|
|
|
|
|
|
+ :class="{
|
|
|
|
+ 'bought-app': i.aprule.hasOwnProperty(item) == true,
|
|
|
|
+ }"
|
|
|
|
+ >{{ $t("schoolBaseInfo." + item) }}</span
|
|
>
|
|
>
|
|
</p>
|
|
</p>
|
|
<Row>
|
|
<Row>
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="6"
|
|
|
|
- ><p class="nomal-text">
|
|
|
|
- 序號到期日:<span class="strong-text" v-if="i.endDate != 1">{{
|
|
|
|
- i.endDate == 0 ? "無到期日" : converTime(i.endDate)
|
|
|
|
- }}</span>
|
|
|
|
- <span class="strong-text" v-if="i.endDate == 1">已到期</span>
|
|
|
|
- </p></i-col
|
|
|
|
- >
|
|
|
|
- <i-col :xs="24" :sm="24" :md="24" :lg="18"
|
|
|
|
- ><p class="nomal-text " v-if="i.deviceMax != 1" style="margin-left:4%">
|
|
|
|
- 序號使用狀況:<span class="strong-text" v-if="i.endDate != 1"
|
|
|
|
- >{{
|
|
|
|
- i.deviceBound.length > i.deviceMax
|
|
|
|
- ? i.deviceMax
|
|
|
|
- : i.deviceBound.length
|
|
|
|
- }}
|
|
|
|
- / {{ i.deviceMax }} ({{
|
|
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="7">
|
|
|
|
+ <p class="nomal-text">
|
|
|
|
+ 序號到期日:<span
|
|
|
|
+ class="strong-text"
|
|
|
|
+ v-if="i.expireStatus == 'A' || i.expireStatus === ''"
|
|
|
|
+ >{{ i.endDate == 0 ? "無到期日" : converTime(i.endDate) }}
|
|
|
|
+ </span>
|
|
|
|
+ <!--span class="strong-text" v-if="i.expireStatus === ''">(未啟用)</span-->
|
|
|
|
+ <span class="strong-text" v-if="i.expireStatus == 'F'"
|
|
|
|
+ >已到期</span
|
|
|
|
+ >
|
|
|
|
+ </p>
|
|
|
|
+ </i-col>
|
|
|
|
+ <i-col :xs="24" :sm="24" :md="24" :lg="17"
|
|
|
|
+ ><p class="nomal-text" style="margin-left: 4%">
|
|
|
|
+ 序號使用狀況:<span class="strong-text"
|
|
|
|
+ >{{ i.deviceBound.length }} / {{ i.deviceMax }} ({{
|
|
(i.deviceBound.length > i.deviceMax
|
|
(i.deviceBound.length > i.deviceMax
|
|
? 100
|
|
? 100
|
|
: (i.deviceBound.length / i.deviceMax) * 100
|
|
: (i.deviceBound.length / i.deviceMax) * 100
|
|
).toFixed(0) + "%"
|
|
).toFixed(0) + "%"
|
|
}})</span
|
|
}})</span
|
|
>
|
|
>
|
|
- <span class="strong-text" v-if="i.endDate == 1"
|
|
|
|
- >0 / {{ i.deviceMax }} (0%)</span
|
|
|
|
- >
|
|
|
|
</p></i-col
|
|
</p></i-col
|
|
>
|
|
>
|
|
</Row>
|
|
</Row>
|
|
</i-col>
|
|
</i-col>
|
|
</Row>
|
|
</Row>
|
|
|
|
+ <!--只要是單一就直接展開無需開關控件-->
|
|
<ul
|
|
<ul
|
|
class="pclist"
|
|
class="pclist"
|
|
- v-if="i.endDate != 1 && hiteachListItemIsOpen[index].isOpen == true"
|
|
|
|
|
|
+ v-if="
|
|
|
|
+ (i.endDate != 1 && hiteachListItemIsOpen[index].isOpen == true) ||
|
|
|
|
+ i.deviceMax == 1
|
|
|
|
+ "
|
|
>
|
|
>
|
|
<li
|
|
<li
|
|
|
|
+ :id="`PC${pc.uuid != null ? pc.uuid : pc.uuid2}`"
|
|
v-for="(pc, index) in i.deviceBound"
|
|
v-for="(pc, index) in i.deviceBound"
|
|
:key="index + 'pc'"
|
|
:key="index + 'pc'"
|
|
v-show="i.deviceMax != 1 ? index < i.deviceMax : index < 1"
|
|
v-show="i.deviceMax != 1 ? index < i.deviceMax : index < 1"
|
|
class="pclist-item"
|
|
class="pclist-item"
|
|
>
|
|
>
|
|
- <p class="pc-title">UserPC-{{ pc.uuid }}</p>
|
|
|
|
- <p class="nomal-text">{{ pc.deviceIp }} | {{ pc.deviceMac }}</p>
|
|
|
|
- <p class="nomal-text">{{ pc.computer }}</p>
|
|
|
|
- <div class="action-btn"><Icon type="md-close" /> 解除授權</div>
|
|
|
|
|
|
+ <p class="pc-title">
|
|
|
|
+ {{ pc.pcname == null ? "未命名機台" : pc.pcname }}
|
|
|
|
+ </p>
|
|
|
|
+ <p class="nomal-text">
|
|
|
|
+ {{ pc.ip }} | {{ pc.uuid != null ? pc.uuid : pc.uuid2 }}
|
|
|
|
+ </p>
|
|
|
|
+ <p class="nomal-text">
|
|
|
|
+ {{ pc.os }} {{ pc.cpu }} {{
|
|
|
|
+ (pc.ram / 1000).toFixed(1)
|
|
|
|
+ }}G RAM
|
|
|
|
+ </p>
|
|
|
|
+ <div
|
|
|
|
+ class="action-btn"
|
|
|
|
+ @click="comfirmRemovePC(pc.uuid != null ? pc.uuid : pc.uuid2)"
|
|
|
|
+ >
|
|
|
|
+ <Icon type="md-close" /> 解除授權
|
|
|
|
+ </div>
|
|
</li>
|
|
</li>
|
|
<!--div v-if="i.deviceBound==0" class='pclist-empty' >尚未綁定任何機台</div-->
|
|
<!--div v-if="i.deviceBound==0" class='pclist-empty' >尚未綁定任何機台</div-->
|
|
</ul>
|
|
</ul>
|
|
@@ -191,14 +221,22 @@
|
|
import "@/icons/svg/hiteach_std.svg";
|
|
import "@/icons/svg/hiteach_std.svg";
|
|
import "@/icons/svg/hiteach_pro.svg";
|
|
import "@/icons/svg/hiteach_pro.svg";
|
|
import "@/icons/svg/hiteach_tbl.svg";
|
|
import "@/icons/svg/hiteach_tbl.svg";
|
|
|
|
+import Loading from "@/common/Loading.vue";
|
|
import { mapGetters } from "vuex";
|
|
import { mapGetters } from "vuex";
|
|
export default {
|
|
export default {
|
|
- props: ["hiteachAuthList"],
|
|
|
|
|
|
+ props: ["hiteachAuthList", "windowHeight", "windowWidth"],
|
|
name: "HiteachAuthList",
|
|
name: "HiteachAuthList",
|
|
|
|
+ components: {
|
|
|
|
+ Loading,
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ tempRemovePCs: [], //暫存解綁的UserPC的Mac
|
|
hiteachListItemIsOpen: {},
|
|
hiteachListItemIsOpen: {},
|
|
filterType: "1",
|
|
filterType: "1",
|
|
|
|
+ currentConfirmRemovePC: "", //暫存讓使用者確認的UserPC
|
|
|
|
+ isOpenRemove: false,
|
|
|
|
+ isloading: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -206,6 +244,8 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters({
|
|
...mapGetters({
|
|
|
|
+ serialInfo: "serviceDriveAuth/getHiteachAuthListInfo",
|
|
|
|
+ aprules: "schoolBaseInfo/getAprules", //讀取周邊產品列表
|
|
hiteachListItemIsOpenVuex: "serviceDriveAuth/getHiteachListItemIsOpen",
|
|
hiteachListItemIsOpenVuex: "serviceDriveAuth/getHiteachListItemIsOpen",
|
|
}),
|
|
}),
|
|
},
|
|
},
|
|
@@ -213,21 +253,55 @@ export default {
|
|
hiteachAuthList: function (value) {
|
|
hiteachAuthList: function (value) {
|
|
//根據服務的長度生出開關,只要服務數量變動就必須重置
|
|
//根據服務的長度生出開關,只要服務數量變動就必須重置
|
|
let temp = [];
|
|
let temp = [];
|
|
- let hiteachlistlength = value[0].serials.auth.length;
|
|
|
|
- for (let i = 0; i < hiteachlistlength; i++) {
|
|
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < value.length; i++) {
|
|
temp.push({
|
|
temp.push({
|
|
index: i,
|
|
index: i,
|
|
isOpen: false,
|
|
isOpen: false,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- console.log(temp);
|
|
|
|
|
|
+ console.log(value, temp);
|
|
this.hiteachListItemIsOpen = temp;
|
|
this.hiteachListItemIsOpen = temp;
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //先讓使用者確定是否解除授權
|
|
|
|
+ comfirmRemovePC(mac) {
|
|
|
|
+ this.isOpenRemove = true;
|
|
|
|
+ this.currentConfirmRemovePC = mac;
|
|
|
|
+ },
|
|
|
|
+ removeUserPC(mac) {
|
|
|
|
+ //假設回傳deviceMac,進行解綁動作
|
|
|
|
+ this.isOpenRemove = false;
|
|
|
|
+ if (this.tempRemovePCs.includes(mac) == false) {
|
|
|
|
+ this.tempRemovePCs.push(mac);
|
|
|
|
+ }
|
|
|
|
+ //console.log(this.tempRemovePCs);
|
|
|
|
+ document.getElementById(`PC${mac}`).classList.add("remove-pc");
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ document.getElementById(`PC${mac}`).style.display = "none";
|
|
|
|
+
|
|
|
|
+ this.$Message.success("已成功解除授權!");
|
|
|
|
+ }, 1800);
|
|
|
|
+ this.isloading = true;
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.getDataAsyc();
|
|
|
|
+ this.isloading = false;
|
|
|
|
+ }, 3000);
|
|
|
|
+ },
|
|
gotoHiteachMgmt() {
|
|
gotoHiteachMgmt() {
|
|
this.$router.push("/home/classroom");
|
|
this.$router.push("/home/classroom");
|
|
},
|
|
},
|
|
|
|
+ getDataAsyc() {
|
|
|
|
+ this.$store.dispatch("serviceDriveAuth/getServiceListDataAsyc").then(
|
|
|
|
+ (res) => {
|
|
|
|
+ this.$Message.success("取得Mock資料");
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ this.$Message.error("取得資料失敗");
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
filterCondition(item) {
|
|
filterCondition(item) {
|
|
switch (this.filterType) {
|
|
switch (this.filterType) {
|
|
case "1":
|
|
case "1":
|
|
@@ -240,9 +314,9 @@ export default {
|
|
case "4":
|
|
case "4":
|
|
return item.prodName === "TBL";
|
|
return item.prodName === "TBL";
|
|
case "5":
|
|
case "5":
|
|
- return item.deviceBound.length != 0 && item.endDate != 1;
|
|
|
|
|
|
+ return item.deviceBound.length != 0;
|
|
case "6":
|
|
case "6":
|
|
- return item.endDate == 1;
|
|
|
|
|
|
+ return item.expireStatus === "F";
|
|
|
|
|
|
default:
|
|
default:
|
|
return true;
|
|
return true;
|
|
@@ -271,7 +345,7 @@ export default {
|
|
this.hiteachListItemIsOpen[index].isOpen = !this.hiteachListItemIsOpen[
|
|
this.hiteachListItemIsOpen[index].isOpen = !this.hiteachListItemIsOpen[
|
|
index
|
|
index
|
|
].isOpen;
|
|
].isOpen;
|
|
- console.log(index, this.hiteachListItemIsOpen);
|
|
|
|
|
|
+ //console.log(index, this.hiteachListItemIsOpen);
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
@@ -279,4 +353,32 @@ export default {
|
|
|
|
|
|
<style lang='less'>
|
|
<style lang='less'>
|
|
@import "./HiteachAuthList.less";
|
|
@import "./HiteachAuthList.less";
|
|
|
|
+
|
|
|
|
+#hiteachAuth-modal {
|
|
|
|
+ .ivu-modal-header {
|
|
|
|
+ border-radius: 5px 5px 0px 0px !important;
|
|
|
|
+ }
|
|
|
|
+ .ivu-modal-footer {
|
|
|
|
+ border-radius: 0px 0px 5px 5px !important;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .ivu-modal-header,
|
|
|
|
+ .ivu-modal-body,
|
|
|
|
+ .ivu-modal-footer {
|
|
|
|
+ background-color: rgb(88, 88, 88) !important;
|
|
|
|
+ color: white !important;
|
|
|
|
+ border: none !important;
|
|
|
|
+ }
|
|
|
|
+ .ivu-btn-text {
|
|
|
|
+ color: white;
|
|
|
|
+ &:hover {
|
|
|
|
+ background-color: transparent !important;
|
|
|
|
+ color: #1cc0f3;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .ivu-modal-header-inner {
|
|
|
|
+ color: white !important;
|
|
|
|
+ font-weight: bolder !important;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|