Browse Source

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

Li 3 years ago
parent
commit
24921d2057

+ 1 - 1
TEAMModeBI/ClientApp/src/api/index.js

@@ -6,7 +6,7 @@ export default {
     },
     },
     //发送短信验证码
     //发送短信验证码
     Phonepin(data) {
     Phonepin(data) {
-        return post('/common/login/send-sms', data)
+        return post('/common/biservers/send-sms', data)
     },
     },
     //验证手机号和验证
     //验证手机号和验证
     verifyCode(data) {
     verifyCode(data) {

+ 59 - 62
TEAMModeBI/ClientApp/src/view/bindPhone.vue

@@ -27,68 +27,68 @@
     </el-dialog>
     </el-dialog>
 </template>
 </template>
 <script>
 <script>
-import { reactive, ref, getCurrentInstance, watch } from "vue";
+import { reactive, ref, getCurrentInstance, watch } from 'vue'
 // import { Phonepin, verifyCode, bindUserid } from "@/api/index.js";
 // import { Phonepin, verifyCode, bindUserid } from "@/api/index.js";
-import { ElMessage } from "element-plus";
-import { useRouter } from "vue-router";
-import { useStore } from "vuex";
+import { ElMessage } from 'element-plus'
+import { useRouter } from 'vue-router'
+import { useStore } from 'vuex'
 export default {
 export default {
     setup(props, content) {
     setup(props, content) {
-        let { proxy } = getCurrentInstance();
-        let store = useStore();
-        console.log(store.state.binDingstatus);
-        let centerDialogVisible = ref(true);
+        let { proxy } = getCurrentInstance()
+        let store = useStore()
+        console.log(store.state.binDingstatus)
+        let centerDialogVisible = ref(true)
         let phonenum = reactive({
         let phonenum = reactive({
-            phone: "",
-            code: "",
-        });
+            phone: '',
+            code: '',
+        })
         //验证冷却
         //验证冷却
         let showCode = reactive({
         let showCode = reactive({
             status: true,
             status: true,
-            count: "",
+            count: '',
             timer: null,
             timer: null,
-        });
+        })
         var phoneData = {
         var phoneData = {
             to: phonenum.phone,
             to: phonenum.phone,
-            lang: "zh-cn",
+            lang: 'zh-cn',
             HasUser: true,
             HasUser: true,
-            country: "86",
-        };
-        var { phoneCode } = pin(proxy);
+            country: '86',
+        }
+        var { phoneCode } = pin(proxy)
         //路由
         //路由
-        const router = useRouter();
+        const router = useRouter()
         //关闭弹窗
         //关闭弹窗
         function close() {
         function close() {
-            centerDialogVisible.value = false;
-            store.commit("BindStatus", false);
+            centerDialogVisible.value = false
+            store.commit('BindStatus', false)
         }
         }
         //监听状态值
         //监听状态值
         watch(
         watch(
             () => store.state.binDingstatus,
             () => store.state.binDingstatus,
             (a) => {
             (a) => {
-                store.state.binDingstatus = a;
-                centerDialogVisible.value = a;
+                store.state.binDingstatus = a
+                centerDialogVisible.value = a
             }
             }
-        );
+        )
         //验证码冷却及发送验证码
         //验证码冷却及发送验证码
         function getCode() {
         function getCode() {
             //验证码冷却部分
             //验证码冷却部分
-            const TIME_COUNT = 60;
+            const TIME_COUNT = 60
             if (!showCode.timer) {
             if (!showCode.timer) {
-                showCode.count = TIME_COUNT;
-                showCode.status = false;
+                showCode.count = TIME_COUNT
+                showCode.status = false
                 showCode.timer = setInterval(() => {
                 showCode.timer = setInterval(() => {
                     if (showCode.count > 0 && showCode.count <= TIME_COUNT) {
                     if (showCode.count > 0 && showCode.count <= TIME_COUNT) {
-                        showCode.count--;
+                        showCode.count--
                     } else {
                     } else {
-                        showCode.status = true;
-                        clearInterval(showCode.timer);
-                        showCode.timer = null;
+                        showCode.status = true
+                        clearInterval(showCode.timer)
+                        showCode.timer = null
                     }
                     }
-                }, 1000);
+                }, 1000)
             }
             }
             //请求接口
             //请求接口
-            phoneCode(phoneData);
+            phoneCode(phoneData)
         }
         }
         //手机号码绑定流程
         //手机号码绑定流程
         function bindUser(proxy) {
         function bindUser(proxy) {
@@ -96,40 +96,39 @@ export default {
             let codeNum = {
             let codeNum = {
                 mobile: phonenum.phone,
                 mobile: phonenum.phone,
                 Authorization_Pin: phonenum.code,
                 Authorization_Pin: phonenum.code,
-            };
-            console.log(codeNum, "手机号和验证码");
+            }
+            console.log(codeNum, '手机号和验证码')
             //验证手机号和验证码
             //验证手机号和验证码
             proxy.$api.verifyCode(codeNum).then((res) => {
             proxy.$api.verifyCode(codeNum).then((res) => {
-                console.log(res, "验证手机号和验证码");
+                console.log(res, '验证手机号和验证码')
                 if (res.error) {
                 if (res.error) {
                     res.error === 3 || res.error === 4
                     res.error === 3 || res.error === 4
-                        ? ElMessage.error("验证码错误")
+                        ? ElMessage.error('验证码错误')
                         : res.error === 1
                         : res.error === 1
-                        ? ElMessage.error("无手机绑定的醍摩豆账号")
+                        ? ElMessage.error('无手机绑定的醍摩豆账号')
                         : res.error === 5
                         : res.error === 5
-                        ? ElMessage.error("无效的手机号码")
-                        : ElMessage.error("接口异常请重新尝试绑定");
+                        ? ElMessage.error('无效的手机号码')
+                        : ElMessage.error('接口异常请重新尝试绑定')
                 } else if (res.status && res.status === 200) {
                 } else if (res.status && res.status === 200) {
-                    let userInfo = JSON.parse(localStorage.getItem("DingUser"));
-                    console.log(userInfo, "用户信息");
-                    let paramData = { mobile: phonenum.phone, param: userInfo };
-                    bindId(paramData, proxy);
+                    let userInfo = JSON.parse(localStorage.getItem('DingUser'))
+                    console.log(userInfo, '用户信息')
+                    let paramData = { mobile: phonenum.phone, param: userInfo }
+                    bindId(paramData, proxy)
                 }
                 }
-            });
+            })
         }
         }
         //绑定操作
         //绑定操作
         function bindId(paramData, proxy) {
         function bindId(paramData, proxy) {
             proxy.$api.bindUserid(paramData).then((res) => {
             proxy.$api.bindUserid(paramData).then((res) => {
-                console.log(res, "返回的结果");
+                console.log(res, '返回的结果')
                 res.status === 1 || res.status === 3
                 res.status === 1 || res.status === 3
-                    ? ElMessage.error("绑定失败,请稍后重试")
+                    ? ElMessage.error('绑定失败,请稍后重试')
                     : res.status === 2
                     : res.status === 2
-                    ? ElMessage.error("账户已被绑定,请选择其他账号绑定")
+                    ? ElMessage.error('账户已被绑定,请选择其他账号绑定')
                     : res.status === 200
                     : res.status === 200
-                    ? (ElMessage.success("绑定成功,即将跳转..."),
-                      router.push("/home"))
-                    : ElMessage.error("出现未知错误");
-            });
+                    ? (ElMessage.success('绑定成功,即将跳转...'), router.push('/home'))
+                    : ElMessage.error('出现未知错误')
+            })
         }
         }
         return {
         return {
             store,
             store,
@@ -143,9 +142,9 @@ export default {
             bindUser,
             bindUser,
             bindId,
             bindId,
             close,
             close,
-        };
+        }
     },
     },
-};
+}
 //发送验证码API
 //发送验证码API
 function pin(proxy) {
 function pin(proxy) {
     let phoneCode = (datas) => {
     let phoneCode = (datas) => {
@@ -154,18 +153,16 @@ function pin(proxy) {
             lang: datas.lang,
             lang: datas.lang,
             HasUser: datas.HasUser,
             HasUser: datas.HasUser,
             country: datas.country,
             country: datas.country,
-        };
+        }
         let { codesInfo } = proxy.$api.Phonepin(parameter).then((res) => {
         let { codesInfo } = proxy.$api.Phonepin(parameter).then((res) => {
-            console.log(res, "接口返回");
-            res.status === 200
-                ? ElMessage.success("验证码发送成功")
-                : ElMessage.error("验证码发送失败");
-        });
-        console.log("codesInfo", codesInfo);
-    };
+            console.log(res, '接口返回')
+            res.status === 200 ? ElMessage.success('验证码发送成功') : ElMessage.error('验证码发送失败')
+        })
+        console.log('codesInfo', codesInfo)
+    }
     return {
     return {
         phoneCode,
         phoneCode,
-    };
+    }
 }
 }
 </script>
 </script>
 <style scoped>
 <style scoped>

+ 1 - 1
TEAMModeBI/ClientApp/src/view/common/aside.vue

@@ -60,7 +60,7 @@ const schoolMenus = [
                 isShow: true,
                 isShow: true,
             },
             },
             {
             {
-                name: '区管理',
+                name: '区管理',
                 router: '/home/areamanage',
                 router: '/home/areamanage',
                 role: 'admin',
                 role: 'admin',
                 icon: '#icon-quyuguanli',
                 icon: '#icon-quyuguanli',

+ 16 - 13
TEAMModeBI/ClientApp/src/view/login.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <div class="backgorundbox">
     <div class="backgorundbox">
         <div class="loginbox">
         <div class="loginbox">
-            <div class="logintitle">醍摩豆账号登录</div>
+            <div class="logintitle">{{msgText}}</div>
             <div class="usrpwd" v-if="loginModel">
             <div class="usrpwd" v-if="loginModel">
                 <div class='userbox' style="margin-bottom:10%">
                 <div class='userbox' style="margin-bottom:10%">
                     <el-input v-model="user" placeholder="醍摩豆ID/手机号码" prefix-icon="el-icon-user" />
                     <el-input v-model="user" placeholder="醍摩豆ID/手机号码" prefix-icon="el-icon-user" />
@@ -70,6 +70,7 @@ export default {
             text: '',
             text: '',
             background: '',
             background: '',
         })
         })
+        let msgText = ref('钉钉账号登录')
         onMounted(() => {
         onMounted(() => {
             console.log(window.location.href, 'mounted!')
             console.log(window.location.href, 'mounted!')
             if (window.location.href.indexOf('?code') != -1) {
             if (window.location.href.indexOf('?code') != -1) {
@@ -81,7 +82,9 @@ export default {
         })
         })
         //处理登录icon变化
         //处理登录icon变化
         watch(loginModel, () => {
         watch(loginModel, () => {
-            loginImg.value = loginModel.value == true ? (loginImg.value = require('../assets/img/erweima.png')) : (loginImg.value = require('../assets/img/mima.png'))
+            loginModel.value == true
+                ? ((loginImg.value = require('../assets/img/erweima.png')), (msgText.value = '钉钉账号登录'))
+                : ((loginImg.value = require('../assets/img/mima.png')), (msgText.value = '钉钉扫码登录'))
         })
         })
         let { editState } = test(proxy)
         let { editState } = test(proxy)
         function test(proxy) {
         function test(proxy) {
@@ -117,9 +120,8 @@ export default {
                 res.state === 200 ? (store.commit('ChangOrganization', res.deptlist), localStorage.setItem('organization', JSON.stringify(res.deptlist))) : ''
                 res.state === 200 ? (store.commit('ChangOrganization', res.deptlist), localStorage.setItem('organization', JSON.stringify(res.deptlist))) : ''
             })
             })
         }
         }
-        //醍摩豆或手机登录
+        //钉钉账号或扫码登录
         function userlogin(proxy) {
         function userlogin(proxy) {
-            console.log(comRef.value, '子页面的!!!!')
             loading = ElLoading.service({
             loading = ElLoading.service({
                 lock: true,
                 lock: true,
                 text: 'Loading',
                 text: 'Loading',
@@ -134,15 +136,15 @@ export default {
                 account: user.value,
                 account: user.value,
                 password: pwd.value,
                 password: pwd.value,
             }
             }
-            proxy.$api.loginUser(params).then(async (res) => {
-                console.log(res, '登录接口返回成功!')
-                res.error
-                    ? (ElMessage.error('密码错误'), loading.close())
-                    : res.id_token
-                    ? (getTeachinfo(proxy, res.id_token), Allpermission(proxy), getOrganization(proxy))
-                    : (loading.close(), ElMessage.error('登录失败'))
-                // router.push("/home");
-            })
+            // proxy.$api.loginUser(params).then(async (res) => {
+            //     console.log(res, '登录接口返回成功!')
+            //     res.error
+            //         ? (ElMessage.error('密码错误'), loading.close())
+            //         : res.id_token
+            //         ? (getTeachinfo(proxy, res.id_token), Allpermission(proxy), getOrganization(proxy))
+            //         : (loading.close(), ElMessage.error('登录失败'))
+            //     // router.push("/home");
+            // })
         }
         }
         //获取教师个人信息
         //获取教师个人信息
         function getTeachinfo(proxy, param) {
         function getTeachinfo(proxy, param) {
@@ -188,6 +190,7 @@ export default {
             router,
             router,
             getTeachinfo,
             getTeachinfo,
             loading,
             loading,
+            msgText,
         }
         }
     },
     },
 }
 }

+ 1 - 1
TEAMModeBI/ClientApp/src/view/teachermanage/areamanage.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
     <div>
     <div>
-        <p class="nowtitle">区域管理</p>
+        <div class="nowtitle">区域管理</div>
         <div class="traitfrom">
         <div class="traitfrom">
             <el-table :data="optionData" style="width: 100%" :highlight-current-row="true" max-height="750">
             <el-table :data="optionData" style="width: 100%" :highlight-current-row="true" max-height="750">
                 <el-table-column prop="index" label="编号" width="200" type=index align="center" />
                 <el-table-column prop="index" label="编号" width="200" type=index align="center" />

+ 6 - 2
TEAMModelOS/ClientApp/src/view/student-account/stulist/MgtStuList.vue

@@ -237,7 +237,7 @@ export default {
             this.saveStuList(this.stuListShow[this.curIndex])
             this.saveStuList(this.stuListShow[this.curIndex])
         },
         },
         confirmSetNo() {
         confirmSetNo() {
-            if(!this.editIrs) return
+            if (!this.editIrs) return
             //检查IRS号码重复
             //检查IRS号码重复
             let isRepeat = false
             let isRepeat = false
             this.students.forEach((item, index) => {
             this.students.forEach((item, index) => {
@@ -371,7 +371,8 @@ export default {
                             name: this.listInfo.listName,
                             name: this.listInfo.listName,
                             periodId: this.listInfo.periodId,
                             periodId: this.listInfo.periodId,
                             school: this.$store.state.userInfo.schoolCode,
                             school: this.$store.state.userInfo.schoolCode,
-                            members: []
+                            members: [],
+                            scount: 0
                             // creatorId: this.$store.state.userInfo.TEAMModelId,
                             // creatorId: this.$store.state.userInfo.TEAMModelId,
                             // students: [],
                             // students: [],
                             // tmids: [],
                             // tmids: [],
@@ -470,6 +471,7 @@ export default {
                                     this.stuList.splice(index, 1)
                                     this.stuList.splice(index, 1)
                                 }
                                 }
                             })
                             })
+                            this.selectList(0)
                             this.$Message.success(this.$t('teachermgmt.rmvOk'))
                             this.$Message.success(this.$t('teachermgmt.rmvOk'))
                         },
                         },
                         err => {
                         err => {
@@ -495,11 +497,13 @@ export default {
                     this.$Message.success(this.$t('cusMgt.updOk'))
                     this.$Message.success(this.$t('cusMgt.updOk'))
                     this.addStuStatus = false
                     this.addStuStatus = false
                     if (isPush) {
                     if (isPush) {
+                        params.id = res.list.id
                         this.stuList.unshift(params)
                         this.stuList.unshift(params)
                         this.listInfo = {
                         this.listInfo = {
                             listName: '',
                             listName: '',
                             periodId: ''
                             periodId: ''
                         }
                         }
+                        this.selectList(0)
                     } else {
                     } else {
                         this.stuList.splice(this.curIndex, 1, params)
                         this.stuList.splice(this.curIndex, 1, params)
                     }
                     }