Просмотр исходного кода

Merge branch 'develop6.0-tmd' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop6.0-tmd

zhouj1203@hotmail.com 3 лет назад
Родитель
Сommit
9d1bfc0aa2
38 измененных файлов с 2016 добавлено и 640 удалено
  1. 1 1
      TEAMModelBI/ClientApp/public/index.html
  2. 7 0
      TEAMModelBI/ClientApp/src/api/index.js
  3. 0 142
      TEAMModelBI/ClientApp/src/components/echarts/PiegangedBar.vue
  4. 7 8
      TEAMModelBI/ClientApp/src/components/echarts/schoolPie.vue
  5. 85 0
      TEAMModelBI/ClientApp/src/components/echarts/commonBar.vue
  6. 13 140
      TEAMModelBI/ClientApp/src/components/echarts/commonLine.vue
  7. 11 92
      TEAMModelBI/ClientApp/src/components/echarts/commonPie.vue
  8. 85 0
      TEAMModelBI/ClientApp/src/components/echarts/conventionPie.vue
  9. 13 81
      TEAMModelBI/ClientApp/src/components/echarts/doublePie.vue
  10. 80 0
      TEAMModelBI/ClientApp/src/components/echarts/liquidfill.vue
  11. 3 3
      TEAMModelBI/ClientApp/src/components/echarts/test.vue
  12. 1315 37
      TEAMModelBI/ClientApp/src/view/areaServe/statistics.vue
  13. 16 3
      TEAMModelBI/ClientApp/src/view/schoolServe/school.vue
  14. 12 6
      TEAMModelBI/Controllers/Census/ActivitySticsController.cs
  15. 0 3
      TEAMModelBI/Controllers/Census/BlobLogController.cs
  16. 3 0
      TEAMModelOS/ClientApp/src/api/http.js
  17. BIN
      TEAMModelOS/ClientApp/src/assets/image/teacher-import.png
  18. 1 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/event-list-new.less
  19. 1 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/new-home-view.less
  20. 1 0
      TEAMModelOS/ClientApp/src/assets/student-web/component_styles/new-mission-list-card.less
  21. 9 0
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.less
  22. 28 23
      TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue
  23. 1 0
      TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseView/ActivityView.less
  24. 27 1
      TEAMModelOS/ClientApp/src/locale/lang/en-US/teachermgmt.js
  25. 27 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachermgmt.js
  26. 27 1
      TEAMModelOS/ClientApp/src/locale/lang/zh-TW/teachermgmt.js
  27. 19 8
      TEAMModelOS/ClientApp/src/store/module/user.js
  28. 1 0
      TEAMModelOS/ClientApp/src/view/Home.vue
  29. 6 4
      TEAMModelOS/ClientApp/src/view/auth/SpaceInfo.vue
  30. 13 2
      TEAMModelOS/ClientApp/src/view/homepage/HomePage.vue
  31. 6 4
      TEAMModelOS/ClientApp/src/view/homepage/SpaceInfo.vue
  32. 5 1
      TEAMModelOS/ClientApp/src/view/teachermgmt/Index.vue
  33. 48 35
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/import/Import.vue
  34. 8 0
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.less
  35. 58 16
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.vue
  36. 13 0
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/personnel/Index.less
  37. 65 28
      TEAMModelOS/ClientApp/src/view/teachermgmt/components/personnel/Index.vue
  38. 1 0
      TEAMModelOS/Controllers/School/SchoolTeacherController.cs

+ 1 - 1
TEAMModelBI/ClientApp/public/index.html

@@ -11,7 +11,7 @@
     </title>
 </head>
 <script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
-<script src="https://at.alicdn.com/t/font_2934132_7la2600x4ah.js"></script>
+<script src="https://at.alicdn.com/t/font_2934132_4jn9g2jtuel.js"></script>
 
 <body>
     <noscript>

+ 7 - 0
TEAMModelBI/ClientApp/src/api/index.js

@@ -192,5 +192,12 @@ export default {
     //根据选择类型查询数据
     searchTypedata(data) {
         return post('/jointly/get-info', data)
+    },
+
+
+    //区域服务
+    //获取全区的数据
+    getAlldata(data) {
+        return post('/activity/get-all', data)
     }
 }

+ 0 - 142
TEAMModelBI/ClientApp/src/components/echarts/PiegangedBar.vue

@@ -1,142 +0,0 @@
-<!--基础折线图-->
-<template>
-    <div ref="myEcharts" :style="{ height, width }"></div>
-</template>
-<script>
-import { ref, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
-import * as echarts from 'echarts'
-export default {
-    name: 'baseBar',
-    props: {
-        width: {
-            type: String,
-            default: '100%',
-        },
-        height: {
-            type: String,
-            default: '100%',
-        },
-        mapData: {
-            type: Object,
-            default: () => {},
-        },
-        title: {
-            type: String,
-            default: '',
-        },
-    },
-    setup(props) {
-        console.log(props.mapData, '传进来的值')
-        const myEcharts = ref(null)
-        let { proxy } = getCurrentInstance()
-        const chart = new InitChart(props, myEcharts)
-        onMounted(() => {
-            chart.init(props.mapData, proxy)
-        })
-        watch(
-            props,
-            (nweProps) => {
-                nextTick(() => {
-                    nweProps ? chart.init(props.mapData, proxy) : ''
-                })
-            },
-            { immediate: true, deep: true }
-        )
-        return {
-            myEcharts,
-        }
-    },
-}
-class InitChart {
-    constructor(props, myEcharts) {
-        this.props = props
-        this.myEcharts = myEcharts
-        this.state = {
-            chart: null,
-        }
-    }
-    init(datas, proxy) {
-        var value = 0.6
-        var data = [value]
-        this.state.chart && this.destory()
-        this.state.chart = echarts.init(this.myEcharts.value)
-        this.state.chart.setOption({
-            backgroundColor: '#fff',
-            title: [
-                {
-                    text: '空间已使用率',
-                    x: '12%',
-                    y: '82%',
-                    textStyle: {
-                        fontSize: 14,
-                        fontWeight: '100',
-                        color: '#2e86de',
-                        lineHeight: 16,
-                        textAlign: 'center',
-                    },
-                },
-            ],
-            series: [
-                {
-                    type: 'liquidFill',
-                    radius: '70%',
-                    center: ['25%', '45%'],
-                    color: [
-                        {
-                            type: 'linear',
-                            x: 0,
-                            y: 0,
-                            x2: 1,
-                            y2: 1,
-                            colorStops: [
-                                {
-                                    offset: 0,
-                                    color: '#00FFFF',
-                                },
-                                {
-                                    offset: 1,
-                                    color: '#76EE00',
-                                },
-                            ],
-                            globalCoord: false,
-                        },
-                    ],
-                    data: data, // data个数代表波浪数
-                    backgroundStyle: {
-                        borderWidth: 1,
-                        color: 'RGBA(51, 66, 127, 0.7)',
-                    },
-                    label: {
-                        normal: {
-                            textStyle: {
-                                fontSize: 24,
-                                color: '#8395a7',
-                            },
-                        },
-                    },
-                    outline: {
-                        // show: false
-                        borderDistance: 0,
-                        itemStyle: {
-                            borderWidth: 2,
-                            borderColor: '#fff',
-                        },
-                    },
-                },
-            ],
-        })
-        window.addEventListener('resize', () => {
-            this.state.chart.resize()
-        })
-    }
-
-    destory() {
-        this.state.chart.dispose()
-        window.removeEventListener('resize', () => {
-            console.log('事件移除')
-        })
-    }
-}
-</script>
-<style lang="less"></style>
-

+ 7 - 8
TEAMModelBI/ClientApp/src/components/echarts/schoolPie.vue

@@ -60,9 +60,9 @@ class InitChart {
         this.state.chart && this.destory()
         this.state.chart = echarts.init(this.myEcharts.value)
         this.state.chart.setOption({
-            color: ['#ef5777', '#0fbcf9', '#0be881', '#575fcf', '#ffd32a'],
+            color: ['#ff7979', '#badc58', '#7ed6df', '#f6e58d', '#686de0'],
             legend: {
-                right: '0%',
+                right: '-2%',
                 orient: 'vertical',
                 itemWidth: 8,
                 itemHeight: 8, // 修改icon图形大小
@@ -77,9 +77,9 @@ class InitChart {
             },
             series: [
                 {
-                    name: '版本占比',
+                    name: '活动占比',
                     type: 'pie',
-                    radius: '90%',
+                    radius: '70%',
                     center: ['50%', '50%'],
                     itemStyle: {
                         borderRadius: 2,
@@ -91,10 +91,9 @@ class InitChart {
                         },
                     },
                     data: [
-                        { value: 1340, name: '师大附小' },
-                        { value: 380, name: '外国语小学' },
-                        { value: 658, name: '树德中学' },
-                        { value: 936, name: '川大附中' },
+                        { value: 1340, name: '评量测验' },
+                        { value: 380, name: '投票活动' },
+                        { value: 658, name: '问卷调查' },
                     ],
                 },
             ],

+ 85 - 0
TEAMModelBI/ClientApp/src/components/echarts/commonBar.vue

@@ -0,0 +1,85 @@
+<!--基础折线图-->
+<template>
+    <div ref="myEcharts" :style="{ height, width }"></div>
+</template>
+<script>
+import { ref, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
+import * as echarts from 'echarts'
+export default {
+    name: 'baseBar',
+    props: {
+        width: {
+            type: String,
+            default: '100%',
+        },
+        height: {
+            type: String,
+            default: '100%',
+        },
+        barData: {
+            type: Object,
+            default: () => {},
+        },
+        title: {
+            type: String,
+            default: '',
+        },
+    },
+    setup(props) {
+        const myEcharts = ref(null)
+        let { proxy } = getCurrentInstance()
+        const chart = new InitChart(props, myEcharts)
+        onMounted(() => {
+            chart.init(props.barData, proxy)
+        })
+        watch(
+            props,
+            (nweProps) => {
+                nextTick(() => {
+                    nweProps ? chart.init(props.barData, proxy) : ''
+                })
+            },
+            { immediate: true, deep: true }
+        )
+        return {
+            myEcharts,
+        }
+    },
+}
+class InitChart {
+    constructor(props, myEcharts) {
+        this.props = props
+        this.myEcharts = myEcharts
+        this.state = {
+            chart: null,
+        }
+    }
+    init(datas, proxy) {
+        console.log(datas, '柱状图的调用')
+        this.state.chart && this.destory()
+        this.state.chart = echarts.init(this.myEcharts.value)
+        this.state.chart.setOption({
+            title: datas.title ? datas.title : '',
+            tooltip: datas.tooltip ? datas.tooltip : '',
+            legend: datas.legend ? datas.legend : '',
+            grid: datas.grid ? datas.grid : '',
+            xAxis: datas.xAxis ? datas.xAxis : '',
+            yAxis: datas.yAxis ? datas.yAxis : '',
+            dataZoom: datas.dataZoom ? datas.dataZoom : '',
+            series: datas.series ? datas.series : '',
+        })
+        window.addEventListener('resize', () => {
+            this.state.chart.resize()
+        })
+    }
+
+    destory() {
+        this.state.chart.dispose()
+        window.removeEventListener('resize', () => {
+            console.log('事件移除')
+        })
+    }
+}
+</script>
+<style lang="less"></style>
+

+ 13 - 140
TEAMModelBI/ClientApp/src/components/echarts/commonLine.vue

@@ -1,4 +1,3 @@
-<!--基础折线图-->
 <template>
     <div ref="myEcharts" :style="{ height, width }"></div>
 </template>
@@ -16,9 +15,9 @@ export default {
             type: String,
             default: '100%',
         },
-        mapData: {
+        lineData: {
             type: Array,
-            default: () => [],
+            default: () => {},
         },
         title: {
             type: String,
@@ -26,18 +25,17 @@ export default {
         },
     },
     setup(props) {
-        console.log(props.mapData, '传进来的值')
         const myEcharts = ref(null)
         let { proxy } = getCurrentInstance()
         const chart = new InitChart(props, myEcharts)
         onMounted(() => {
-            chart.init(props.mapData, proxy)
+            chart.init(props.lineData, proxy)
         })
         watch(
             props,
             (nweProps) => {
                 nextTick(() => {
-                    chart.init(props.mapData, proxy)
+                    nweProps ? chart.init(props.lineData, proxy) : ''
                 })
             },
             { immediate: true, deep: true }
@@ -56,151 +54,26 @@ class InitChart {
         }
     }
     init(datas, proxy) {
+        console.log(datas, 'line调用')
         this.state.chart && this.destory()
         this.state.chart = echarts.init(this.myEcharts.value)
-
         this.state.chart.setOption({
-            backgroundColor: '#fff',
-            grid: {
-                top: '17%',
-                bottom: '22%',
-                left: '4%',
-                right: '3%',
-            },
+            title: datas.title ? datas.title : {},
+            backgroundColor: datas.backgroundColor ? datas.backgroundColor : '#fff',
+            grid: datas.grid ? datas.grid : '',
             tooltip: {
                 trigger: 'axis',
                 axisPointer: {
                     type: 'line',
                     lineStyle: {
-                        color: '#FF8736',
-                    },
-                },
-            },
-            xAxis: {
-                boundaryGap: true, // 默认,坐标轴留白策略
-                axisLine: {
-                    // 坐标轴轴线相关设置。数学上的x轴
-                    show: true,
-                    lineStyle: {
-                        color: '#85B1B4',
-                    },
-                },
-                axisLabel: {
-                    // 坐标轴刻度标签的相关设置
-                    textStyle: {
-                        color: '#709FD9',
-                        margin: 15,
+                        color: datas.tooltipColor ? datas.tooltipColor : '#ccc',
                     },
                 },
-                splitLine: {
-                    show: false,
-                },
-                axisTick: {
-                    show: true,
-                    alignWithLabel: true,
-                },
-                data: ['第一周', '第二周', '第三周', '第四周', '第五周', '第六周', '第七周', '第八周', '第九周'],
-            },
-            yAxis: {
-                axisLine: {
-                    show: true,
-                    color: '#85B1B4',
-                },
-                axisLabel: {
-                    // 坐标轴刻度标签的相关设置
-                    show: true,
-                    textStyle: {
-                        color: '#709FD9',
-                        margin: 15,
-                    },
-                },
-                splitLine: {
-                    show: true,
-                },
-                axisTick: {
-                    show: true,
-                },
             },
-            dataZoom: [
-                {
-                    show: true,
-                    height: 15,
-                    xAxisIndex: [0, 1],
-                    bottom: 10,
-                    right: '8%',
-                    left: '5%',
-                    start: 0,
-                    end: 100,
-                    backgroundColor: 'rgba(0,0,0,0)',
-                    handleIcon: 'path://M306.1,413c0,2.2-1.8,4-1,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
-                    handleSize: '110%',
-                    handleStyle: {
-                        color: '#999999',
-                    },
-                    textStyle: {
-                        color: '#999999',
-                    },
-                    borderColor: '',
-                    zoomOnMouseWheel: false,
-                    moveOnMouseMove: true,
-                    moveOnMouseWheel: true,
-                },
-                {
-                    type: 'inside',
-                    show: true,
-                    height: 15,
-                    start: 1,
-                    end: 100,
-                },
-            ],
-            series: [
-                {
-                    type: 'scatter',
-                    symbolSize: 10,
-                    itemStyle: {
-                        color: '#3498db',
-                    },
-                    silent: true,
-                    tooltip: {
-                        show: false,
-                    },
-                    markPoint: {
-                        data: [
-                            { type: 'max', name: 'Max' },
-                            { type: 'min', name: 'Min' },
-                        ],
-                        label: {
-                            color: '#FFF', // 文字颜色
-                            padding: [0, 0, 5, 0], // 可用padding调整图片内文字距离
-                            show: true,
-                        },
-                    },
-                    data: [200, 180, 280, 90, 160, 320, 180, 369, 571],
-                },
-                {
-                    type: 'line',
-                    symbol: 'circle',
-                    symbolSize: 16,
-                    symbol: 'path://M488 187.381L242.872 328.906a48 48 0 0 0-24 41.57v283.049a48 48 0 0 0 24 41.569L488 836.619a48 48 0 0 0 48 0l245.128-141.525a48 48 0 0 0 24-41.57V370.476a48 48 0 0 0-24-41.569L536 187.381a48 48 0 0 0-48 0z m32 27.713l245.128 141.525a16 16 0 0 1 8 13.856v283.05a16 16 0 0 1-8 13.856L520 808.906a16 16 0 0 1-16 0L258.872 667.381a16 16 0 0 1-8-13.856v-283.05a16 16 0 0 1 8-13.856L504 215.094a16 16 0 0 1 16 0z',
-                    lineStyle: {
-                        color: '#3498db',
-                    },
-                    itemStyle: {
-                        color: '#3498db',
-                        borderWidth: 1,
-                        borderColor: '#3498db',
-                    },
-                    label: {
-                        show: true,
-                        position: 'top',
-                        textStyle: {
-                            color: '#fff',
-                        },
-                    },
-
-                    data: [200, 180, 280, 90, 160, 320, 180, 369, 571],
-                },
-            ],
+            xAxis: datas.xAxis ? datas.xAxis : {},
+            yAxis: datas.yAxis ? datas.yAxis : {},
+            dataZoom: datas.dataZoom ? datas.dataZoom : '',
+            series: datas.series ? datas.series : [],
         })
         window.addEventListener('resize', () => {
             this.state.chart.resize()

+ 11 - 92
TEAMModelBI/ClientApp/src/components/echarts/commonPie.vue

@@ -16,9 +16,9 @@ export default {
             type: String,
             default: '100%',
         },
-        mapData: {
-            type: Array,
-            default: () => [],
+        proportionData: {
+            type: Object,
+            default: () => {},
         },
         title: {
             type: String,
@@ -26,18 +26,17 @@ export default {
         },
     },
     setup(props) {
-        console.log(props.mapData, '传进来的值')
         const myEcharts = ref(null)
         let { proxy } = getCurrentInstance()
         const chart = new InitChart(props, myEcharts)
         onMounted(() => {
-            chart.init(props.mapData, proxy)
+            chart.init(props.proportionData, proxy)
         })
         watch(
             props,
             (nweProps) => {
                 nextTick(() => {
-                    chart.init(props.mapData, proxy)
+                    nweProps ? chart.init(props.proportionData, proxy) : ''
                 })
             },
             { immediate: true, deep: true }
@@ -56,95 +55,15 @@ class InitChart {
         }
     }
     init(datas, proxy) {
+        console.log(datas, '简单pie的调用')
         this.state.chart && this.destory()
         this.state.chart = echarts.init(this.myEcharts.value)
-
         this.state.chart.setOption({
-            title: {
-                text: '研修学校占比',
-                textStyle: {
-                    color: '#595959',
-                    fontSize: 14,
-                },
-                // subtext: '年度任务总数:18个',
-                // subtextStyle: {
-                //     fontSize: 14,
-                //     color: '#8C8C8C',
-                // },
-                itemGap: 20,
-                left: 'center',
-                top: '55%',
-            },
-            angleAxis: {
-                max: 100,
-                clockwise: true, // 逆时针
-                // 隐藏刻度线
-                show: false,
-            },
-            radiusAxis: {
-                type: 'category',
-                show: true,
-                axisLabel: {
-                    show: false,
-                },
-                axisLine: {
-                    show: false,
-                },
-                axisTick: {
-                    show: false,
-                },
-            },
-            polar: {
-                center: ['50%', '50%'],
-                radius: '110%', //图形大小
-            },
-            series: [
-                {
-                    type: 'bar',
-                    data: [32],
-                    showBackground: true,
-                    coordinateSystem: 'polar',
-                    roundCap: true,
-                    barWidth: 8,
-                    itemStyle: {
-                        normal: {
-                            opacity: 1,
-                            color: '#1890FF',
-                        },
-                    },
-                    z: 10,
-                },
-                {
-                    type: 'bar',
-                    data: [100],
-                    showBackground: true,
-                    barGap: '-100%',
-                    coordinateSystem: 'polar',
-                    roundCap: true,
-                    barWidth: 8,
-                    itemStyle: {
-                        normal: {
-                            opacity: 1,
-                            color: '#E7E9EB',
-                        },
-                    },
-                },
-                {
-                    type: 'pie',
-                    data: [1],
-                    radius: '90%',
-                    itemStyle: {
-                        color: 'transparent',
-                    },
-                    label: {
-                        show: true,
-                        position: 'center',
-                        formatter: 32 + '%',
-                        color: '#1890FF',
-                        fontSize: 22,
-                    },
-                },
-            ],
+            title: datas.title ? datas.title : '',
+            angleAxis: datas.angleAxis ? datas.angleAxis : '',
+            radiusAxis: datas.radiusAxis ? datas.radiusAxis : '',
+            polar: datas.polar ? datas.polar : '',
+            series: datas.series ? datas.series : '',
         })
         window.addEventListener('resize', () => {
             this.state.chart.resize()

+ 85 - 0
TEAMModelBI/ClientApp/src/components/echarts/conventionPie.vue

@@ -0,0 +1,85 @@
+<!--基础折线图-->
+<template>
+    <div ref="myEcharts" :style="{ height, width }"></div>
+</template>
+<script>
+import { ref, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
+import * as echarts from 'echarts'
+export default {
+    name: 'baseBar',
+    props: {
+        width: {
+            type: String,
+            default: '100%',
+        },
+        height: {
+            type: String,
+            default: '100%',
+        },
+        pieData: {
+            type: Object,
+            default: () => {},
+        },
+        title: {
+            type: String,
+            default: '',
+        },
+    },
+    setup(props) {
+        const myEcharts = ref(null)
+        let { proxy } = getCurrentInstance()
+        const chart = new InitChart(props, myEcharts)
+        onMounted(() => {
+            chart.init(props.pieData, proxy)
+        })
+        watch(
+            props,
+            (nweProps) => {
+                nextTick(() => {
+                    nweProps ? chart.init(props.pieData, proxy) : ''
+                })
+            },
+            { immediate: true, deep: true }
+        )
+        return {
+            myEcharts,
+        }
+    },
+}
+class InitChart {
+    constructor(props, myEcharts) {
+        this.props = props
+        this.myEcharts = myEcharts
+        this.state = {
+            chart: null,
+        }
+    }
+    init(datas, proxy) {
+        console.log(datas, '1111111111111111')
+        this.state.chart && this.destory()
+        this.state.chart = echarts.init(this.myEcharts.value)
+        this.state.chart.setOption({
+            title: datas.title ? datas.title : '',
+            color: datas.color ? datas.color : '',
+            legend: datas.legend ? datas.legend : '',
+            tooltip: {
+                trigger: 'item',
+                formatter: '{a} <br/>{b}: {c} ({d}%)',
+            },
+            series: datas.series ? datas.series : '',
+        })
+        window.addEventListener('resize', () => {
+            this.state.chart.resize()
+        })
+    }
+
+    destory() {
+        this.state.chart.dispose()
+        window.removeEventListener('resize', () => {
+            console.log('事件移除')
+        })
+    }
+}
+</script>
+<style lang="less"></style>
+

+ 13 - 81
TEAMModelBI/ClientApp/src/components/echarts/doublePie.vue

@@ -16,7 +16,7 @@ export default {
             type: String,
             default: '100%',
         },
-        mapData: {
+        doublePieData: {
             type: Object,
             default: () => {},
         },
@@ -26,18 +26,17 @@ export default {
         },
     },
     setup(props) {
-        console.log(props.mapData, '传进来的值')
         const myEcharts = ref(null)
         let { proxy } = getCurrentInstance()
         const chart = new InitChart(props, myEcharts)
         onMounted(() => {
-            chart.init(props.mapData, proxy)
+            chart.init(props.doublePieData, proxy)
         })
         watch(
             props,
             (nweProps) => {
                 nextTick(() => {
-                    nweProps ? chart.init(props.mapData, proxy) : ''
+                    nweProps ? chart.init(props.doublePieData, proxy) : ''
                 })
             },
             { immediate: true, deep: true }
@@ -56,90 +55,23 @@ class InitChart {
         }
     }
     init(datas, proxy) {
-        var color = ['#78e08f ', '#3498db', '#fa983a', '#5555FF', '#079992']
-        var data = [
-            { value: 9, name: '高教' },
-            { value: 33, name: '普教' },
-        ]
+        // var color = ['#55E6C1 ', '#25CCF7', '#F97F51', '#ff7675', '#5352ed', '#D6A2E8']
+        // var data = [
+        //     { value: 9, name: '已完成' },
+        //     { value: 33, name: '进行中' },
+        //     { value: 82, name: '未完成' },
+        // ]
+        console.log(datas, 'double调用')
         this.state.chart && this.destory()
         this.state.chart = echarts.init(this.myEcharts.value)
         this.state.chart.setOption({
-            color: color,
+            color: datas.color ? datas.color : '',
             tooltip: {
                 trigger: 'item',
                 formatter: '{a} <br/>{b}: {c} ({d}%)',
             },
-            legend: {
-                orient: 'vertical',
-                right: 0,
-                top: '15%',
-                // width:,
-                // height:,
-
-                // 图例颜色块宽高
-                itemWidth: 15,
-                itemHeight: 15,
-                // 		// 图例字体大小
-                textStyle: {
-                    fontSize: 12,
-                },
-                formatter: function (name) {
-                    var total = 0
-                    var target
-                    for (var i = 0, l = data.length; i < l; i++) {
-                        total += data[i].value
-                        if (data[i].name == name) {
-                            target = data[i].value
-                        }
-                    }
-                    // return name + ' ' + ((target / total) * 100).toFixed(2) + '%'
-                    return name
-                },
-                data: [
-                    { value: 10, name: '小学' },
-                    { value: 3, name: '初中' },
-                    { value: 7, name: '高中' },
-                    { value: 3, name: '职高类' },
-                ],
-            },
-            series: [
-                {
-                    // name:'访问来源',
-                    name: '类型',
-                    type: 'pie',
-                    selectedMode: 'single',
-                    radius: [0, '55%'],
-                    label: {
-                        normal: {
-                            position: 'inner',
-                            fontSize: 12,
-                        },
-                    },
-                    labelLine: {
-                        normal: {
-                            show: false,
-                        },
-                    },
-                    data: data,
-                    // [
-                    //     { value: 10, name: '小学' },
-                    //     { value: 3, name: '初中' },
-                    //     { value: 7, name: '高中' },
-                    //     { value: 3, name: '职高类' },
-                    // ],
-                },
-                {
-                    name: '学段占比',
-                    type: 'pie',
-                    radius: ['65%', '90%'],
-                    data: [
-                        { value: 10, name: '小学' },
-                        { value: 3, name: '初中' },
-                        { value: 7, name: '高中' },
-                        { value: 3, name: '职高类' },
-                    ],
-                },
-            ],
+            legend: datas.legend ? datas.legend : {},
+            series: datas.series ? datas.series : [],
         })
         window.addEventListener('resize', () => {
             this.state.chart.resize()

+ 80 - 0
TEAMModelBI/ClientApp/src/components/echarts/liquidfill.vue

@@ -0,0 +1,80 @@
+<!--基础折线图-->
+<template>
+    <div ref="myEcharts" :style="{ height, width }"></div>
+</template>
+<script>
+import { ref, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
+import * as echarts from 'echarts'
+export default {
+    name: 'baseBar',
+    props: {
+        width: {
+            type: String,
+            default: '100%',
+        },
+        height: {
+            type: String,
+            default: '100%',
+        },
+        liquidfillData: {
+            type: Object,
+            default: () => {},
+        },
+        title: {
+            type: String,
+            default: '',
+        },
+    },
+    setup(props) {
+        console.log(props.liquidfillData, '传进来的值')
+        const myEcharts = ref(null)
+        let { proxy } = getCurrentInstance()
+        const chart = new InitChart(props, myEcharts)
+        onMounted(() => {
+            chart.init(props.liquidfillData, proxy)
+        })
+        watch(
+            props,
+            (nweProps) => {
+                nextTick(() => {
+                    nweProps ? chart.init(props.liquidfillData, proxy) : ''
+                })
+            },
+            { immediate: true, deep: true }
+        )
+        return {
+            myEcharts,
+        }
+    },
+}
+class InitChart {
+    constructor(props, myEcharts) {
+        this.props = props
+        this.myEcharts = myEcharts
+        this.state = {
+            chart: null,
+        }
+    }
+    init(datas, proxy) {
+        this.state.chart && this.destory()
+        this.state.chart = echarts.init(this.myEcharts.value)
+        this.state.chart.setOption({
+            backgroundColor: datas.backgroundColor ? datas.backgroundColor : '#fff',
+            title: datas.title ? datas.title : [],
+            series: datas.series ? datas.series : [],
+        })
+        window.addEventListener('resize', () => {
+            this.state.chart.resize()
+        })
+    }
+
+    destory() {
+        this.state.chart.dispose()
+        window.removeEventListener('resize', () => {
+            console.log('事件移除')
+        })
+    }
+}
+</script>
+<style lang="less"></style>
+

+ 3 - 3
TEAMModelBI/ClientApp/src/components/echarts/test.vue

@@ -60,7 +60,7 @@ class InitChart {
         this.state.chart = echarts.init(this.myEcharts.value)
         this.state.chart.setOption({
             title: {
-                text: '数据全区占比',
+                text: '研修完成度',
                 textStyle: {
                     color: '#595959',
                     fontSize: 14,
@@ -100,7 +100,7 @@ class InitChart {
             series: [
                 {
                     type: 'bar',
-                    data: [45],
+                    data: [60],
                     showBackground: true,
                     coordinateSystem: 'polar',
                     roundCap: true,
@@ -138,7 +138,7 @@ class InitChart {
                     label: {
                         show: true,
                         position: 'center',
-                        formatter: 45 + '%',
+                        formatter: 60 + '%',
                         color: '#1890FF',
                         fontSize: 22,
                     },

Разница между файлами не показана из-за своего большого размера
+ 1315 - 37
TEAMModelBI/ClientApp/src/view/areaServe/statistics.vue


+ 16 - 3
TEAMModelBI/ClientApp/src/view/schoolServe/school.vue

@@ -90,7 +90,12 @@
     <!--编辑学校页面-->
     <div class="schoolDeatils">
         <div class="backbtn" v-if="models==='details' && PowerShow">
-            <el-button type="primary" icon="el-icon-back" @click="schoolClose">返回</el-button>
+            <el-button type="primary" size="small" @click="schoolClose">
+                <svg class="back-icon" aria-hidden="true">
+                    <use xlink:href="#icon-fanhui"></use>
+                </svg>
+                返回
+            </el-button>
             <el-button class="changebtn" v-if="store.state.changbtnShow && changebtns" @click="getSetschool()">
                 <svg class="changebtn-areaicon" aria-hidden="true">
                     <use xlink:href="#icon-wenjian"></use>
@@ -637,8 +642,10 @@ export default {
 .backbtn {
     text-align: left;
     position: absolute;
-    top: 0%;
-    right: 3px;
+    top: 0.5%;
+    right: 10px;
+    z-index: 999;
+    line-height: 40px;
 }
 .school-formbox {
     width: 85%;
@@ -872,6 +879,12 @@ export default {
     fill: currentColor;
     margin-right: 3px;
 }
+.back-icon {
+    width: 14px;
+    height: 14px;
+    fill: currentColor;
+    margin-right: 3px;
+}
 </style>
 <style>
 .schoolbox .el-cascader {

+ 12 - 6
TEAMModelBI/Controllers/Census/ActivitySticsController.cs

@@ -453,10 +453,12 @@ namespace TEAMModelBI.Controllers.Census
             Dictionary<string, long> activitys = new(); //活动类型集合
             long allActivity = 0;  //活动累计
             long weekActivity = 0;//本周活动
-            long tearActivity = 0;//本学期活动
+            long termActivity = 0;//本学期活动
             long weekLess = 0;      //本周课例
             long termLess = 0;     //本学期课例
             long allLess = 0;     //所有课例
+            int tecCount = 0;    //教师数量
+            int scCount = 0;    //学校数量
 
             foreach (var area in areaInfos) 
             {
@@ -465,13 +467,17 @@ namespace TEAMModelBI.Controllers.Census
                 {
                     recSchools.Add(school);
                 }
-
+                scCount += recSchools.Count;
                 recSchools.ForEach(x => { if (x.type == 2) heCount += 1; else if (x.type == 1) geCount += 1; else oeCount += 1; });
                 allSize += recSchools.Select(s => s.size).Sum();
                 area.schoolCount = recSchools.Count;
+
+                int tempCount = await CommonFind.GetPeopleNumber(cosmosClient, "School", recSchools?.Select(x => x.id).ToList(), "Teacher");
+
+                tecCount += tempCount;
                 //查教师
-                area.techCount = await CommonFind.GetPeopleNumber(cosmosClient,"School",recSchools?.Select(x=>x.id).ToList(), "Teacher");
-                //查询省
+                area.techCount = tempCount;
+                //查询学生
                 area.stuCount = await CommonFind.GetPeopleNumber(cosmosClient, "Student", recSchools?.Select(x => x.id).ToList(), "Base");
             }
 
@@ -485,7 +491,7 @@ namespace TEAMModelBI.Controllers.Census
                 weekActivity  += await CommonFind.FindTotals(cosmosClient, weekSql,new List<string> { "Common" });
 
                 string termSql = $"select COUNT(c.id) AS totals from c where c.pk='{type}' and c.createTime>={termStart} and c.createTime<={termEnd} ";
-                tearActivity += await CommonFind.FindTotals(cosmosClient, termSql, new List<string> { "Common" });
+                termActivity += await CommonFind.FindTotals(cosmosClient, termSql, new List<string> { "Common" });
 
                 allActivity += totals;
                 activitys.Add(type, totals);
@@ -495,7 +501,7 @@ namespace TEAMModelBI.Controllers.Census
             weekLess = await CommonFind.FindTotals(cosmosClient, $"select count(c.id) as totals from c where c.pk='LessonRecord' and c.startTime>={weekStart} and c.startTime <={weekEnd}", new List<string>() { "School", "Teacher" });
             termLess = await CommonFind.FindTotals(cosmosClient, $"select count(c.id) as totals from c where c.pk='LessonRecord' and c.startTime>={termStart} and c.startTime <={termEnd}", new List<string>() { "School","Teacher" });
 
-            return Ok(new { state = 200, areaCount = areaInfos.Count, allSize, heCount, geCount, oeCount, allLess, termLess, weekLess, allActivity, tearActivity,weekActivity, areaInfos });
+            return Ok(new { state = 200, areaCount = areaInfos.Count, allSize, heCount, geCount, oeCount, allLess, termLess, weekLess, allActivity, termActivity, weekActivity, areaInfos });
         }
                 
 

+ 0 - 3
TEAMModelBI/Controllers/Census/BlobLogController.cs

@@ -8,13 +8,10 @@ using System.Linq;
 using System.Text;
 using System.Text.Json;
 using System.Threading.Tasks;
-using TEAMModelBI.Models;
 using TEAMModelBI.Tool;
-using TEAMModelBI.Tool.Cosmos;
 using TEAMModelOS.Models;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.Extension;
-using TEAMModelOS.SDK.Models;
 
 namespace TEAMModelBI.Controllers.Census
 {

+ 3 - 0
TEAMModelOS/ClientApp/src/api/http.js

@@ -67,6 +67,7 @@ axios.interceptors.request.use(
         if (webEndTime && time_now > webEndTime) {
             console.log('长时间未操作,重新登录', config)
             loginOut()
+            localStorage.setItem('loginOut','长时间未操作')
             return
         }
         let access_token = localStorage.getItem('access_token')
@@ -102,6 +103,7 @@ axios.interceptors.request.use(
         if (!auth_token) {
             console.log('auth_token失败', config)
             loginOut()
+            localStorage.setItem('loginOut','auth_token失败')
             return
         }
         //通过验证设置对应参数
@@ -192,6 +194,7 @@ async function refreshToken() {
             refreshing = false
             console.log('token刷新失败,退出重新登录')
             loginOut()
+            localStorage.setItem('loginOut','refreshToken')
         }
     )
 }

BIN
TEAMModelOS/ClientApp/src/assets/image/teacher-import.png


+ 1 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/event-list-new.less

@@ -127,6 +127,7 @@
 
         & > span{
             padding: 0 5px;
+            white-space: pre;
         }
 
         & > p {

+ 1 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/new-home-view.less

@@ -442,6 +442,7 @@
 
         & > span{
             padding: 0 5px;
+            white-space: pre;
         }
 
         & > p {

+ 1 - 0
TEAMModelOS/ClientApp/src/assets/student-web/component_styles/new-mission-list-card.less

@@ -176,6 +176,7 @@
             
                     & > span{
                         padding: 0 5px;
+                        white-space: pre;
                     }
             
                     & > p {

+ 9 - 0
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.less

@@ -191,6 +191,15 @@
         margin-bottom: 10px;
         text-align: center;
         font-size: 18px;
+
+        & > img {
+            width: 50%;
+        }
+    }
+
+    .page-footer {
+        text-align: center;
+        padding: 10px 0;
     }
 }
 

+ 28 - 23
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/LessonTestReport.vue

@@ -173,12 +173,12 @@
                                         <div style="margin-left: 20px;">
                                             <div class="item-explain">
                                                 <span class="explain-title">【{{ $t("studentWeb.exam.report.ansRes") }}】</span>
+                                                <div v-if="!children.stuAns || !children.stuAns.length" class="item-explain-details">
+                                                    <span>{{ $t('studentWeb.exam.report.noAns') }}</span>
+                                                </div>
                                                 <div v-if="children.stuAns.length" class="item-explain-details">
                                                     <span v-for="(stuAnsC, indexAC) in children.stuAns" :key="indexAC" v-html="stuAnsC"></span>
                                                 </div>
-                                                <div v-if="!children.stuAns.length" class="item-explain-details">
-                                                    <span>{{ $t('studentWeb.exam.report.noAns') }}</span>
-                                                </div>
                                             </div>
                                         </div>
                                         <div style="margin-left: 20px;" v-show="children.open">
@@ -269,12 +269,12 @@
                             <div v-if="exam.type !== 'compose'">
                                 <div class="item-explain">
                                     <span class="explain-title">【{{ $t("studentWeb.exam.report.ansRes") }}】</span>
+                                    <div v-if="!exam.stuAns || !exam.stuAns.length" class="item-explain-details">
+                                        <span>{{ $t('studentWeb.exam.report.noAns') }}</span>
+                                    </div>
                                     <div v-if="exam.stuAns.length" class="item-explain-details">
                                         <span v-for="(stuAns, indexA) in exam.stuAns" :key="indexA" v-html="stuAns"></span>
                                     </div>
-                                    <div v-if="!exam.stuAns.length" class="item-explain-details">
-                                        <span>{{ $t('studentWeb.exam.report.noAns') }}</span>
-                                    </div>
                                 </div>
                             </div>
                             <div v-if="exam.type !== 'compose'" v-show="exam.open">
@@ -362,28 +362,33 @@
                 <div style="display: flex;">
                     <div style="width: 50%;">
                         <template v-if="!imgList.length">
-                            <p class="no-img">
-                                <Icon type="ios-alert" color="#FA6400" />
-                                {{ $t("studentWeb.exam.message.noQamode") }}
-                            </p>
+                            <div class="no-img">
+                                <img src="@/assets/image/none.png" >
+                                <p>
+                                    <Icon type="ios-alert" color="#FA6400" />
+                                    {{ $t("studentWeb.exam.message.noQamode") }}
+                                </p>
+                            </div>
                         </template>
-                        <template v-else-if="imgList.length === 1">
+                        <!-- <template v-else-if="imgList.length === 1">
                             <div class="left-img" @click="$hevueImgPreview(imgList[0])">
                                 <img :src="imgList[0]" alt="">
                             </div>
-                        </template>
-                        <template v-else-if="imgList.length > 1">
-                            <Carousel v-model="CarouselIndex" loop>
+                        </template> -->
+                        <template v-else-if="imgList.length">
+                            <Carousel v-model="CarouselIndex">
                                 <CarouselItem v-for="(img, indexs) in imgList" :key="indexs">
                                     <!-- 不是综合题 -->
                                     <div class="left-img" @click="$hevueImgPreview(img)">
-                                        <!-- <div class="que-item"> -->
-                                            <img :src="img" alt="">
-                                        <!-- </div> -->
-                                        <!-- <p v-if="!paperInfo.attachments" style="margin-bottom: 10px;">当前题目没有图片</p> -->
+                                        <img :src="img" alt="">
                                     </div>
                                 </CarouselItem>
                             </Carousel>
+                            <p class="page-footer">
+                                {{ $t('answerSheet.tip2') }} {{ CarouselIndex + 1 }} {{ $t('answerSheet.tip21') }}
+                                /
+                                {{ $t('answerSheet.tip9') }} {{ imgList.length }} {{ $t('answerSheet.tip21') }}
+                            </p>
                         </template>
                     </div>
                     <div style="width: 50%; margin-left: 20px; height: 500px;">
@@ -413,12 +418,12 @@
                                 <div>
                                     <div class="item-explain">
                                         <span class="explain-title">【{{ $t("studentWeb.exam.report.ansRes") }}】</span>
+                                        <div v-if="!exam.stuAns || !exam.stuAns.length" class="item-explain-details">
+                                            <span>{{ $t('studentWeb.exam.report.noAns') }}</span>
+                                        </div>
                                         <div v-if="exam.stuAns.length" class="item-explain-details">
                                             <span v-for="(stuAns, indexA) in exam.stuAns" :key="indexA" v-html="stuAns"></span>
                                         </div>
-                                        <div v-if="!exam.stuAns.length" class="item-explain-details">
-                                            <span>{{ $t('studentWeb.exam.report.noAns') }}</span>
-                                        </div>
                                     </div>
                                     <!-- 批注 -->
                                     <!-- <div class="item-explain" v-if="exam.type != 'single' && exam.type != 'multiply' && exam.type != 'judge'">
@@ -805,7 +810,7 @@
                                     exam[i].children[c].getScore = 0
                                     exam[i].children[c].parentInfo = Object.assign({}, exam[i])
                                     exam[i].children[c].parentInfo.children = []
-                                    exam[i].children[c].stuAns = this.ansData[examNum + c + 1]
+                                    exam[i].children[c].stuAns = this.ansData[examNum + c + 1] ? this.ansData[examNum + c + 1] : []
                                     exam[i].children[c].mark = this.examInfo.mark[examNum + c + 1]
                                     exam[i].children[c].getScore = this.examInfo.stuScore[examNum + c + 1]
                                     exam[i].getScore += exam[i].children[c].getScore
@@ -821,7 +826,7 @@
                             examNum = examNum + exam[i].children.length
                         } else {
                             examNum = i
-                            exam[i].stuAns = this.ansData[examNum]
+                            exam[i].stuAns = this.ansData[examNum] ? this.ansData[examNum] : []
                             exam[i].mark = this.examInfo.mark[examNum]
                             exam[i].getScore = this.examInfo.stuScore[examNum]
                             paper.push(exam[i])

+ 1 - 0
TEAMModelOS/ClientApp/src/components/student-web/HomeView/CourseView/ActivityView.less

@@ -120,6 +120,7 @@
 
             & > span{
                 padding: 0 5px;
+                white-space: pre;
             }
     
             & > p {

+ 27 - 1
TEAMModelOS/ClientApp/src/locale/lang/en-US/teachermgmt.js

@@ -262,5 +262,31 @@ export default {
     confirm: 'Confirm',
     cancel: 'Cancel',
     filter: '篩選',
-    reset: '重置'
+    reset: '重置',
+    teacherStatus1:'未加入',
+    teacherStatus2:'邀請中',
+    teacherStatus3:'已加入',
+    importTips1:'導入教師範本:',
+    importTips2:'欄位說明:',
+    importTips3:'1. name: 教師姓名,必填;',
+    importTips4:'2. phone: 教師手機號,選填;',
+    importTips5:'3. email: 教師郵箱,選填;',
+    importTips6:'4. tmdid: 教師醍摩豆ID,選填;',
+    importTips7:'5. note: 教師備註信息,選填;',
+    importTips8:'溫馨提示:如果導入教師醍摩豆ID,或者導入的手機或郵箱已註冊醍摩豆ID,系統會自動邀請老師加入學校。',
+    importTips9:'點擊或者拖拽文件導入',
+    impText1:'導入總人數:',
+    impText2:'僅導入姓名:',
+    impText3:'系統將自動邀請:',
+    impText4:'重新導入',
+    impText5:'確認導入',
+    impText6:'導入成功',
+    impText7:'繼續導入',
+    impTd1:'姓名',
+    impTd2:'手機',
+    impTd3:'郵箱',
+    impTd4:'醍摩豆ID',
+    impTd5:'備註',
+    joinTips1:'溫馨提示:學校存在僅導入名字的老師,如果對應當前老師賬號,可以進行綁定修改教師加入學校的狀態。如果當前老師賬號不為學校導入對應的老師可以不用進行綁定。',
+    joinTips2:'綁定學校尚未加入的老師:'
 }

+ 27 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/teachermgmt.js

@@ -262,5 +262,31 @@ export default {
     confirm: '确认',
     cancel: '取消',
     filter: '筛选',
-    reset: '重置'
+    reset: '重置',
+    teacherStatus1:'未加入',
+    teacherStatus2:'邀请中',
+    teacherStatus3:'已加入',
+    importTips1:'导入教师范本:',
+    importTips2:'栏位说明:',
+    importTips3:'1. name: 教师姓名,必填;',
+    importTips4:'2. phone: 教师手机号,选填;',
+    importTips5:'3. email: 教师邮箱,选填;',
+    importTips6:'4. tmdid: 教师醍摩豆ID,选填;',
+    importTips7:'5. note: 教师备注信息,选填;',
+    importTips8:'温馨提示:如果导入教师醍摩豆ID,或者导入的手机或邮箱已注册醍摩豆ID,系统会自动邀请老师加入学校。',
+    importTips9:'点击或者拖拽文件导入',
+    impText1:'导入总人数:',
+    impText2:'仅导入姓名:',
+    impText3:'系统将自动邀请:',
+    impText4:'重新导入',
+    impText5:'确认导入',
+    impText6:'导入成功',
+    impText7:'继续导入',
+    impTd1:'姓名',
+    impTd2:'手机',
+    impTd3:'邮箱',
+    impTd4:'醍摩豆ID',
+    impTd5:'备注',
+    joinTips1:'温馨提示:学校存在仅导入名字的老师,如果对应当前老师账号,可以进行绑定修改教师加入学校的状态。如果当前老师账号不为学校导入对应的老师可以不用进行绑定。',
+    joinTips2:'绑定学校尚未加入的老师:'
 }

+ 27 - 1
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/teachermgmt.js

@@ -262,5 +262,31 @@ export default {
     confirm: '確認',
     cancel: '取消',
     filter: '篩選',
-    reset: '重置'
+    reset: '重置',
+    teacherStatus1:'未加入',
+    teacherStatus2:'邀請中',
+    teacherStatus3:'已加入',
+    importTips1:'導入教師範本:',
+    importTips2:'欄位說明:',
+    importTips3:'1. name: 教師姓名,必填;',
+    importTips4:'2. phone: 教師手機號,選填;',
+    importTips5:'3. email: 教師郵箱,選填;',
+    importTips6:'4. tmdid: 教師醍摩豆ID,選填;',
+    importTips7:'5. note: 教師備註信息,選填;',
+    importTips8:'溫馨提示:如果導入教師醍摩豆ID,或者導入的手機或郵箱已註冊醍摩豆ID,系統會自動邀請老師加入學校。',
+    importTips9:'點擊或者拖拽文件導入',
+    impText1:'導入總人數:',
+    impText2:'僅導入姓名:',
+    impText3:'系統將自動邀請:',
+    impText4:'重新導入',
+    impText5:'確認導入',
+    impText6:'導入成功',
+    impText7:'繼續導入',
+    impTd1:'姓名',
+    impTd2:'手機',
+    impTd3:'郵箱',
+    impTd4:'醍摩豆ID',
+    impTd5:'備註',
+    joinTips1:'溫馨提示:學校存在僅導入名字的老師,如果對應當前老師賬號,可以進行綁定修改教師加入學校的狀態。如果當前老師賬號不為學校導入對應的老師可以不用進行綁定。',
+    joinTips2:'綁定學校尚未加入的老師:'
 }

+ 19 - 8
TEAMModelOS/ClientApp/src/store/module/user.js

@@ -55,6 +55,15 @@ export default {
                 return []
             }
         },
+        getTeacherImport: state => {
+            if (state.teachers !== undefined) {
+                return state.teachers.filter(
+                    user => user.status == 'import'
+                )
+            } else {
+                return []
+            }
+        },
         getTeacherInvited: state => {
             if (state.teachers !== undefined) {
                 return state.teachers.filter(
@@ -271,9 +280,9 @@ export default {
         delTeacher(state, ids) {
             if (ids && ids.length) {
                 let teachers = state.teachers
-                let count = teachers.length - 1 
+                let count = teachers.length - 1
                 for (let i = count; i >= 0; i--) {
-                    if (ids.includes(teachers[i].id)) {
+                    if (ids.includes(teachers[i].id) || ids.includes(teachers[i].name)) {
                         teachers.splice(i, 1)
                     }
                 }
@@ -374,17 +383,19 @@ export default {
             return new Promise(
                 (resolve, reject) => {
                     let school_code = context.state.schoolCode
-                    let id = params.id
-                    let status = params.status
+                    let { id, status, importName } = params
                     if (typeof school_code !== 'undefined' && school_code !== undefined && typeof id !== 'undefined' && id !== undefined) {
-                        apiTools.schoolUser.updStatusToSchoolUser({
+                        let reqData = {
                             school_code: school_code,
                             id: id,
                             grant_type: status
-                        }).then(
+                        }
+                        if (importName) reqData.importName = importName
+                        apiTools.schoolUser.updStatusToSchoolUser(reqData).then(
                             res => {
                                 // 更新 state.schoolUserList
-                                context.dispatch('updSchoolUserInfo', { id: id, param: { status: status } });
+                                context.commit('setTeachers', undefined);
+                                context.dispatch('getSchoolTeacher');
                                 resolve({
                                     code: 1,
                                     message: 'Upd param successfully.'
@@ -425,7 +436,7 @@ export default {
                                 } else {
                                     // 追加新使用者至 state.schoolUserList
                                     // context.dispatch('addTeacherToSchoolUserList', { user_list: params, grant_type: 'invite' })
-                                    params.forEach(item=>{
+                                    params.forEach(item => {
                                         item.createTime = Math.round((new Date()).getTime() / 1000)
                                     })
                                     context.commit('addTeacher', params)

+ 1 - 0
TEAMModelOS/ClientApp/src/view/Home.vue

@@ -102,6 +102,7 @@ export default {
         if (webEndTime && time_now > webEndTime) {
             console.log('长时间未操作,清空storage,重新登录')
             this.loginOut()
+            localStorage.setItem('loginOut','Home检查长时间未操作')
         }
         this.$store.dispatch('user/checkSchoolCode'); // 設定登入成功的學校簡碼
         this.$store.dispatch('user/checkUserProfile'); // 檢查使用者個人詳細資訊

+ 6 - 4
TEAMModelOS/ClientApp/src/view/auth/SpaceInfo.vue

@@ -122,10 +122,12 @@ export default {
                     formatData.push(content)
                     formatData.push(other)
                     let last = this.SCHOOL_SPACE * 1024 * 1024 * 1024 - res.teachSpace - res.total
-                    formatData.unshift({
-                        name: this.$t('auth.over'),
-                        value: last
-                    })
+                    if (last > 0) {
+                        formatData.unshift({
+                            name: this.$t('auth.over'),
+                            value: last
+                        })
+                    }
                     let percent = last * 100 / (this.SCHOOL_SPACE * 1024 * 1024 * 1024)
                     // percent = 0
                     console.log(percent)

+ 13 - 2
TEAMModelOS/ClientApp/src/view/homepage/HomePage.vue

@@ -18,8 +18,18 @@
 
                     <!-- 空间使用情况 -->
                     <div class="recent-box" style="height:389px;position:relative" v-if="checkHost()">
-                        <p class="chart-title">{{$t('home.spaceInfo')}}</p>
-                        <SpaceInfo style="margin-top:40px"></SpaceInfo>
+                        <p class="chart-title" v-show="spaceStatus == 1">{{$t('home.spaceInfo')}}</p>
+                        <Alert show-icon v-if="spaceStatus == 2" type="warning" style="margin-right:10px">
+                            <p style="font-size:12px">
+                                {{$t('auth.spaceWarning')}}
+                            </p>
+                        </Alert>
+                        <Alert show-icon v-else-if="spaceStatus == 3" type="error" style="margin-right:10px">
+                            <p style="font-size:12px">
+                                {{$t('auth.spaceErr')}}
+                            </p>
+                        </Alert>
+                        <SpaceInfo :style="{marginTop:spaceStatus == 1 ? '40px' : '15px'}" @on-space-warning="spaceStatus = 2" @on-space-error="spaceStatus = 3"></SpaceInfo>
                     </div>
 
                 </div>
@@ -273,6 +283,7 @@ export default {
     inject: ['reload'],
     data() {
         return {
+            spaceStatus: 1, //1:正常 2:空间不足10% 3:空间已满
             recentRcdList: [],
             sizeLoading: false,
             countData: {},

+ 6 - 4
TEAMModelOS/ClientApp/src/view/homepage/SpaceInfo.vue

@@ -122,10 +122,12 @@ export default {
                     formatData.push(content)
                     formatData.push(other)
                     let last = this.PRIVATE_SPACE * 1024 * 1024 * 1024 - res.teachSpace - res.total
-                    formatData.unshift({
-                        name: this.$t('auth.over'),
-                        value: last
-                    })
+                    if (last > 0) {
+                        formatData.unshift({
+                            name: this.$t('auth.over'),
+                            value: last
+                        })
+                    }
                     let percent = last * 100 / (this.PRIVATE_SPACE * 1024 * 1024 * 1024)
                     // percent = 0
                     console.log(percent)

+ 5 - 1
TEAMModelOS/ClientApp/src/view/teachermgmt/Index.vue

@@ -24,7 +24,7 @@
                     {{ $t('teachermgmt.page.text2') }}
                     <Badge :count="requestedTeacher.length" class-name="badgesty"></Badge>
                 </span>
-                <span v-if="$access.can('admin.*|teacher-upd')" v-show="isDev" class="pane" @click="paneBtn('import')" :class="{ active: compts === 'import' }">
+                <span v-if="$access.can('admin.*|teacher-upd')" class="pane" @click="paneBtn('import')" :class="{ active: compts === 'import' }">
                     {{ $t('teachermgmt.addTeacher.btn.upload') }}
                 </span>
             </div>
@@ -112,6 +112,10 @@ export default {
     //     }
     // },
     mounted() {
+        this.$EventBus.$off('updTeacherList')
+        this.$EventBus.$on('updTeacherList', val => {
+            this.$store.commit('user/setTeachers', undefined)
+        })
         this.compts = this.$route.name
     }
 }

+ 48 - 35
TEAMModelOS/ClientApp/src/view/teachermgmt/components/import/Import.vue

@@ -4,20 +4,36 @@
         <vuescroll>
             <div class="import-wrap" v-if="viewStatus === 'tips'">
                 <div class="import-tips-box">
-                    <p class="import-title">导入教师范本:</p>
+                    <p class="import-title">{{$t('teachermgmt.importTips1')}}</p>
                     <img class="teacher-import-img" src="../../../../assets/image/teacher-import.png" alt="">
-                    <p class="import-title" style="margin-bottom:0px">栏位说明:</p>
-                    <p class="import-info">1. name: 教师姓名,必填;</p>
-                    <p class="import-info">2. phone: 教师手机号,选填;</p>
-                    <p class="import-info">3. email: 教师邮箱,选填;</p>
-                    <p class="import-info">4. id: 教师醍摩豆ID,选填;</p>
-                    <p class="import-info">5. note: 教师备注信息,选填;</p>
-                    <p class="import-info-tips">温馨提示:如果导入教师醍摩豆ID,或者导入的手机或邮箱已注册醍摩豆ID,系统会自动邀请老师加入学校。</p>
+                    <p class="import-title" style="margin-bottom:0px">
+                        {{$t('teachermgmt.importTips2')}}
+                    </p>
+                    <p class="import-info">
+                        {{$t('teachermgmt.importTips3')}}
+                    </p>
+                    <p class="import-info">
+                        {{$t('teachermgmt.importTips4')}}
+                    </p>
+                    <p class="import-info">
+                        {{$t('teachermgmt.importTips5')}}
+                    </p>
+                    <p class="import-info">
+                        {{$t('teachermgmt.importTips6')}}
+                    </p>
+                    <p class="import-info">
+                        {{$t('teachermgmt.importTips7')}}
+                    </p>
+                    <p class="import-info-tips">
+                        {{$t('teachermgmt.importTips8')}}
+                    </p>
                 </div>
                 <Upload multiple type="drag" action="" :before-upload="customUpload" style="margin-top:20px">
                     <div class="file-area">
                         <Icon type="ios-cloud-upload" size="52" style="color: #3399ff"></Icon>
-                        <p>点击或者拖拽文件导入</p>
+                        <p>
+                            {{$t('teachermgmt.importTips9')}}
+                        </p>
                     </div>
                 </Upload>
                 <p class="download-text" @click="downloadExample">
@@ -27,19 +43,19 @@
             <div class="excel-data-wrap" v-else-if="viewStatus === 'review'">
                 <div class="import-info-wrap">
                     <span>
-                        导入总人数:
+                        {{$t('teachermgmt.impText1')}}
                     </span>
                     <span class="count-value">
                         {{importData.length}}人
                     </span>
                     <span>
-                        仅导入姓名:
+                        {{$t('teachermgmt.impText2')}}
                     </span>
                     <span class="count-value">
                         {{onlyName.length}}人
                     </span>
                     <span>
-                        系统将自动邀请:
+                        {{$t('teachermgmt.impText3')}}
                     </span>
                     <span class="count-value">
                         {{inviteData.length}}人
@@ -47,11 +63,11 @@
                     <div class="imp-action-wrap">
                         <span @click="importAgain">
                             <Icon type="md-refresh" size="16" />
-                            重新导入
+                            {{$t('teachermgmt.impText4')}}
                         </span>
                         <span @click="confirmImport">
                             <Icon custom="iconfont icon-upload" size="16" />
-                            确认导入
+                            {{$t('teachermgmt.impText5')}}
                         </span>
                     </div>
                 </div>
@@ -61,13 +77,13 @@
             </div>
             <div class="import-finish" v-else-if="viewStatus === 'finish'">
                 <Icon type="md-checkmark-circle" class="import-ok-icon" />
-                <p class="import-result-text">导入成功</p>
-                <div class="import-result-area">
+                <p class="import-result-text">{{$t('teachermgmt.impText6')}}</p>
+                <!-- <div class="import-result-area">
 
-                </div>
+                </div> -->
                 <div class="result-action-wrap">
-                    <Button type="primary" style="width:600px" size="large" @click="importAgain">
-                        继续导入
+                    <Button type="primary" style="width:300px" size="large" @click="importAgain">
+                        {{$t('teachermgmt.impText7')}}
                     </Button>
                 </div>
             </div>
@@ -80,34 +96,30 @@ import excel from '@/utils/excel'
 export default {
     data() {
         return {
-            viewStatus: 'finish', // tips:提示信息 review:预览表格数据 finish:导入成功
+            viewStatus: 'tips', // tips:提示信息 review:预览表格数据 finish:导入成功
             file: undefined,
             title: ['name', 'phone', 'email', 'id', 'note'],
             columns1: [
                 {
-                    title: '姓名',
+                    title: this.$t('teachermgmt.impTd1'),
                     key: 'name'
                 },
                 {
-                    title: '手机',
+                    title: this.$t('teachermgmt.impTd2'),
                     key: 'phone'
                 },
                 {
-                    title: '邮箱',
+                    title: this.$t('teachermgmt.impTd3'),
                     key: 'email'
                 },
                 {
-                    title: '醍摩豆ID',
-                    key: 'id'
+                    title: this.$t('teachermgmt.impTd4'),
+                    key: 'tmdid'
                 },
                 {
-                    title: '备注',
+                    title: this.$t('teachermgmt.impTd5'),
                     key: 'note'
-                },
-                // {
-                //     title: '状态',
-                //     slot: 'status'
-                // }
+                }
             ],
             importData: [],
             onlyName: [],
@@ -125,6 +137,7 @@ export default {
             this.$api.schoolUser.importTeacher(params).then(
                 res => {
                     this.viewStatus = 'finish'
+                    this.$store.commit('user/addTeacher',res.teacherImport?.teachers || [])
                 },
                 err => {
 
@@ -188,7 +201,7 @@ export default {
                     // 处理表格导入数据类型
                     results.forEach(item => {
                         if (item.phone) item.phone = item.phone.toString()
-                        if (item.id) item.id = item.id.toString()
+                        if (item.tmdid) item.tmdid = item.tmdid.toString()
                     })
                     this.importData = results
                     this.onlyName = this.importData.filter(item => !item.phone && !item.email && !item.id)
@@ -282,7 +295,7 @@ export default {
     color: #fff;
     padding: 8px 0px;
     border-radius: 5px;
-    width: 575px;
+    width: 698px;
     cursor: pointer;
     user-select: none;
     text-align: center;
@@ -301,12 +314,12 @@ export default {
     color: #ff9900;
 }
 .file-area {
-    width: 575px;
+    width: 698px;
     padding: 50px;
     background: #f3f3f3;
 }
 .import-wrap {
-    width: 575px;
+    width: 698px;
     height: fit-content;
     margin: auto;
 }

+ 8 - 0
TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.less

@@ -67,6 +67,7 @@
 .subject-tag{
     cursor: pointer;
     user-select: none;
+    white-space: pre-line;
 }
 
 .role-set-header{
@@ -300,3 +301,10 @@
     position: relative;
     z-index: 99;
 }
+.teacher-status{
+    font-size: 12px;
+    background: #ed4014;
+    border-radius: 3px;
+    padding: 1px 5px;
+    color: white;
+}

+ 58 - 16
TEAMModelOS/ClientApp/src/view/teachermgmt/components/mgt/TeacherMgt.vue

@@ -27,14 +27,22 @@
                             <PersonalPhoto :name="row.name" :picture="row.picture" />
                         </template>
                         <template slot-scope="{ row,index }" slot="subject">
-                            <span :style="{color:row.subjectIds && row.subjectIds.length? '':'red'}" class="subject-tag" @click="showSetSubj(index)">
+                            <p :style="{color:row.subjectIds && row.subjectIds.length? '':'red'}" class="subject-tag" @click="showSetSubj(index)">
                                 {{row.subjectIds && row.subjectIds.length ? getSubjectNames(row.subjectIds) : $t('teachermgmt.notSet')}}
+                            </p>
+                        </template>
+                        <template slot-scope="{ row,index }" slot="name">
+                            <span>
+                                {{row.name}}
+                            </span>
+                            <span v-show="row.status != 'join'" class="teacher-status" :style="{background:row.status == 'invite' ? '#2d8cf0' : ''}">
+                                {{row.status == 'import' ? $t('teachermgmt.teacherStatus1') : row.status == 'invite' ? $t('teachermgmt.teacherStatus2') : ''}}
                             </span>
                         </template>
                         <template slot-scope="{ row }" slot="action" v-if="!activePanel">
-                            <icon v-show="!row.roles.includes('admin')" icon="shield-alt" style="font-size: 13px; color: var(--normal-icon-color); margin-right: 20px; cursor: pointer;" @click="openPanel('single',row)" />
+                            <icon v-show="!row.roles.includes('admin') && row.status == 'join'" icon="shield-alt" style="font-size: 13px; color: var(--normal-icon-color); margin-right: 20px; cursor: pointer;" @click="openPanel('single',row)" />
                             <Icon v-show="!row.roles.includes('admin')" size="16" type="md-trash" style="color: var(--normal-icon-color); cursor: pointer" @click="removeUser(row)" />
-                            <Icon v-show="row.roles.includes('admin') && row.id == $store.state.userInfo.TEAMModelId" type="md-repeat" style="color: var(--normal-icon-color); font-size: 14px; cursor: pointer" @click="transferAdmin(row)" />
+                            <Icon v-show="row.roles.includes('admin') && row.id == $store.state.userInfo.TEAMModelId && row.status == 'join'" type="md-repeat" style="color: var(--normal-icon-color); font-size: 14px; cursor: pointer" @click="transferAdmin(row)" />
                         </template>
                         <!---手動輸入空間欄位-->
                         <template slot-scope="{ row }" slot="spaceShare">
@@ -208,7 +216,7 @@
             <div class="edit-name-content">
                 <span>{{$t('teachermgmt.transferTo')}}</span>
                 <Select v-model="toAdminId" filterable style="margin-top:10px">
-                    <Option v-for="item in teachers" :value="item.id" :key="item.id">
+                    <Option v-for="item in teacherJoin" :value="item.id" :key="item.id">
                         {{ `${item.name}(${item.id})` }}
                     </Option>
                 </Select>
@@ -277,9 +285,23 @@ export default {
     },
     computed: {
         ...mapGetters({
-            teachers: 'user/getTeacherJoined',
+            teacherJoin: 'user/getTeacherJoined',
+            teacherInvite: 'user/getTeacherInvited',
+            teacherImport: 'user/getTeacherImport',
             isKeyInSpace: 'spaceAuth/getIsKeyInSpace'
         }),
+        teachers() {
+            let data = []
+            data.push(...this.teacherJoin)
+            data.push(...this.teacherInvite)
+            data.push(...this.teacherImport)
+            data.forEach(item => {
+                if (item.status != 'join') {
+                    item._disabled = true
+                }
+            })
+            return data
+        },
         pieNumData() {
             let data = [
                 { value: 0, name: this.$t("teachermgmt.usedSpace") },
@@ -337,18 +359,34 @@ export default {
                 },
                 {
                     title: this.$t('teachermgmt.table.th2'),
-                    key: 'name',
+                    slot: 'name',
                     minWidth: 160,
                     maxWidth: 200,
-                    sortable: true
+                    filters: [
+                        {
+                            label: this.$t('teachermgmt.teacherStatus3'),
+                            value: 'join'
+                        },
+                        {
+                            label: this.$t('teachermgmt.teacherStatus2'),
+                            value: 'invite'
+                        },
+                        {
+                            label: this.$t('teachermgmt.teacherStatus1'),
+                            value: 'import'
+                        }
+                    ],
+                    filterMethod(value, row) {
+                        return row.status == value
+                    }
                 },
                 {
                     title: 'ID',
                     minWidth: 160,
                     maxWidth: 200,
                     key: 'id',
+                    sortable: true
                 },
-
                 {
                     title: this.$t('teachermgmt.table.th6'),
                     slot: 'subject',
@@ -410,7 +448,7 @@ export default {
                                                     }
                                                 }
                                             }
-                                        }, this.$t('teachermgmt.table.filter')),
+                                        }, this.$t('teachermgmt.filter')),
                                         h('span', {
                                             on: {
                                                 'click': () => {
@@ -454,7 +492,7 @@ export default {
                     minWidth: 180,
                     render: (h, params) => {
                         let p = ['content-read', 'exercise-read', 'knowledge-read', 'syllabus-read']
-                        let flag = params.row.permissions.some(item => {
+                        let flag = params.row.permissions?.some(item => {
                             return !p.includes(item)
                         })
                         if (params.row.roles.includes('admin')) {
@@ -586,8 +624,8 @@ export default {
                 // 可以客制調整
                 filterData = this.teachers.filter(res => {
                     let a = res.name.toLowerCase()
-                    let b = res.id.toLowerCase()
-                    return a.includes(this.keyWord) || b.includes(this.keyWord)
+                    let b = res.id?.toLowerCase()
+                    return a?.includes(this.keyWord) || b?.includes(this.keyWord)
                 })
             }
             return filterData
@@ -840,6 +878,7 @@ export default {
         //单一设置教师学科
         showSetSubj(index) {
             this.setSubjIndex = index
+            if (this.tableData[index].status != 'join') return
             if (this.tableData[index].subjectIds && this.tableData[index].subjectIds.length) {
                 let subjectInfos = this.$jsFn.getTeacherSubjects(this.tableData[index].subjectIds)
                 this.setSubj = subjectInfos.map(item => [item.periodId, item.subjectId])
@@ -903,7 +942,7 @@ export default {
                     let subNames = item.map(s => s.subjectName)
                     let pdName = item[0].periodName
                     return `${pdName}-${subNames.join('/')}`
-                }).join('; ')
+                }).join('; \n')
             } else {
                 return ''
             }
@@ -947,16 +986,19 @@ export default {
         removeUser(val) {
             // val:使用者的資料(object)
             if (this.$access.can('admin.*|teacher-upd')) {
+                let idText = val.id ? '(' + val.id + ')' : ''
                 this.$Modal.confirm({
                     title: this.$t('teachermgmt.model.delTeacher.title'),
-                    content: '<p>' + this.$t('teachermgmt.model.delTeacher.text1') + ' ' + val.name + '(' + val.id + ') ?</p>',
+                    // content: '<p>' + this.$t('teachermgmt.model.delTeacher.text1') + ' ' + val.name + '(' + val.id + ') ?</p>',
+                    content: `<p> ${this.$t('teachermgmt.model.delTeacher.text1')}  ${val.name} ${idText}?</p>`,
                     onOk: () => {
                         this.$api.schoolUser.rmvSchoolUser({
                             school_code: this.$store.state.userInfo.schoolCode,
-                            id: val.id
+                            id: val.id || undefined,
+                            name: val.id ? undefined : val.name
                         }).then(
                             res => {
-                                this.$store.commit('user/delTeacher', [val.id])
+                                this.$store.commit('user/delTeacher', [val.id || val.name])
                             },
                             err => {
                             }

+ 13 - 0
TEAMModelOS/ClientApp/src/view/teachermgmt/components/personnel/Index.less

@@ -360,4 +360,17 @@
     display: block;
     margin-top: 15px;
     width: 200px;
+}
+.agree-join-content{
+    font-size: 15px;
+}
+.band-teacher-tips{
+    font-size: 14px;
+    color: #ff9900;
+    margin-top: 25px;
+}
+.band-teacher-lable{
+    margin-top: 5px;
+    font-weight: 600;
+    color: #17233d;
 }

+ 65 - 28
TEAMModelOS/ClientApp/src/view/teachermgmt/components/personnel/Index.vue

@@ -290,6 +290,24 @@
                 </transition>
             </div>
         </div>
+        <Modal v-model="agreeStatus" footer-hide className="ed-name-modal">
+            <div slot="header" class="modal-header">
+                {{this.$t('teachermgmt.message.info16')}}
+            </div>
+            <div class="edit-name-content">
+                <p class="agree-join-content">{{`${$t('teachermgmt.message.info17')} ${agreeInfo.name} (${agreeInfo.id})${$t('teachermgmt.message.info18')}?`}}</p>
+                <p class="band-teacher-tips" v-show="isShowBand">
+                    {{this.$t('teachermgmt.joinTips1')}}
+                </p>
+                <p class="band-teacher-lable" v-show="isShowBand">
+                    {{this.$t('teachermgmt.joinTips2')}}
+                </p>
+                <Select v-model="bandTeacher" style="width:100%" clearable v-show="isShowBand">
+                    <Option v-for="item in importTeacher" :value="item.name" :key="item.name">{{ item.name }}</Option>
+                </Select>
+                <Button :loading="btnLoading" @click="confirmJoin" long type="primary" class="confirm-btn">{{ $t('syllabus.confirm') }}</Button>
+            </div>
+        </Modal>
     </div>
 </template>
 
@@ -302,6 +320,10 @@ export default {
     name: 'personnel',
     data() {
         return {
+            bandTeacher: '',
+            agreeInfo: {},
+            btnLoading: false,
+            agreeStatus: false,
             joinQRcode: false,
             inviteLoading: false,
             excelLoading: false,
@@ -348,8 +370,19 @@ export default {
     computed: {
         ...mapGetters({
             dataList: 'user/getTeacherInvitedOrRequested', // 取得被邀請或申請加入此學校的使用者
+            importTeacher: 'user/getTeacherImport', // 
             srvAdr: 'config/getSrvAdr'      // 取得現在的站台位置
         }),
+        isShowBand(){
+            let flag = false
+            if(this.importTeacher.length){
+                let t = this.importTeacher.find(i=>i.name === this.agreeInfo.name)
+                if(!t){
+                    flag = true
+                }
+            }
+            return flag
+        },
         sortCodeText: function () {
             switch (this.sortCode) {
                 case 'time':
@@ -387,6 +420,7 @@ export default {
             this.joinQRcode = undefined
         },
         qrCodeJoin() {
+            this.needUpd = true
             this.serchModel = 'qrcode'
             setTimeout(this.createQRCode, 500)
         },
@@ -697,36 +731,39 @@ export default {
                 )
             }
         },
-        //變更加入狀態 (join:已加入 invite:被邀請 request:申請中)
-        updUserStatus(val, updStatus) { //val:使用者的資料(object)
-            let statusTitle = '';
-            let statusContent = '';
-            if (val.status == 'request' && updStatus == 'join') {
-                statusTitle = this.$t('teachermgmt.message.info16');
-                statusContent = '<p>' + this.$t('teachermgmt.message.info17') + ' ' + val.name + '(' + val.id + ') ' + this.$t('teachermgmt.message.info18') + ' ?</p>';
-            }
-            this.$Modal.confirm({
-                title: statusTitle,
-                content: statusContent,
-                onOk: () => {
-                    this.$store.dispatch('user/updSchoolUserStatus', { id: val.id, status: updStatus }).then(
-                        (res) => {
-                            if (res.code == 1) {
-                                this.$Message.info(this.$t('teachermgmt.message.info3'));
-                            }
-                            else {
-                                alert('Can not update param.')
-                            }
-                            //清空vuex教师列表,保证其他页面获取最新数据
-                            this.$store.commit('teachers/setTeacherList', [])
-                        },
-                        (err) => {
-                            //this.$Message.error('user/updSchoolUserStatus API error!')
-                        }
-                    )
+        confirmJoin() {
+            this.btnLoading = true
+            this.$store.dispatch('user/updSchoolUserStatus', { id: this.agreeInfo.id, status: 'join', importName: this.bandTeacher }).then(
+                (res) => {
+                    if (res.code == 1) {
+                        this.$Message.info(this.$t('teachermgmt.message.info3'));
+                    }
+                    else {
+                        alert('Can not update param.')
+                    }
+                    //清空vuex教师列表,保证其他页面获取最新数据
+                    this.agreeStatus = false
+                    this.$store.commit('teachers/setTeacherList', undefined)
+                },
+                (err) => {
+                    //this.$Message.error('user/updSchoolUserStatus API error!')
                 }
-            });
+            ).finally(() => {
+                this.bandTeacher = undefined
+                this.btnLoading = false
+            })
         },
+        //變更加入狀態 (join:已加入 invite:被邀請 request:申請中)
+        updUserStatus(val, updStatus) { //val:使用者的資料(object)
+            this.agreeStatus = true
+            this.agreeInfo = val
+        }
+    },
+    beforeRouteLeave(to,from,next){
+        if(this.needUpd){
+            this.$EventBus.$emit('updTeacherList')
+        }
+        next(true)
     }
 }
 </script>

+ 1 - 0
TEAMModelOS/Controllers/School/SchoolTeacherController.cs

@@ -693,6 +693,7 @@ namespace TEAMModelOS.Controllers
                                 tch.status = $"{grant_type}";
                                 tch.time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                                 tch.tmdid = teacher.id;
+                                tch.name = teacher.name;
                                 await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.School).ReplaceItemAsync(teacherImport, $"{school_code}", new PartitionKey("TeacherImport"));
                             }
                         }