Pārlūkot izejas kodu

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

CrazyIter_Bin 2 gadi atpakaļ
vecāks
revīzija
490490b027

+ 126 - 101
TEAMModelBI/ClientApp/src/view/areamanage/statistics.vue

@@ -1617,113 +1617,138 @@ export default {
       nowArea.value.studentCount = areaids.stuCnt
       let data = { areaId: areaids.id }
       showPattern.value = 'details'
-      proxy.$api.getSchoolStatistics(data).then((res) => {
-        console.log(res, '某个学区的返回')
-        if (res.state === 200) {
-          //基础数据
-          activityData.value.oneself[0].num = res.weekLess
-          activityData.value.oneself[1].num = res.termLess
-          activityData.value.oneself[2].num = res.weekActivity + res.weekLess
-          activityData.value.oneself[3].num = res.termActivity
-          activityData.value.oneself[4].num = res.totalTime
-          activityData.value.oneself[5].num = res.allLess
-          activityData.value.oneself[6].num = 123456
-          // activityData.value.oneself[7].num = parseInt(res.examAreaCount) + parseInt(res.homeworkAreaCount) + parseInt(res.voteAreaCount) + parseInt(res.surveyAreaCount)
-          //header数量
-          nowArea.value.schoolCount = res.scCnt
-          nowArea.value.studentCount = res.stuCnt
-          nowArea.value.teacherCount = res.tchCnt
-          let teachNums = 0
-          for (let i in res.schools) {
-            teachNums += res.schools[i].teacherCount
-          }
-          aspectsData.value[0].num = res.scCnt
-          aspectsData.value[1].num = res.tchCnt
-          aspectsData.value[2].num = res.stuCnt
-          // aspectsData.value[3].num = parseInt(res.allLess) + parseInt(activityData.value.oneself[7].num)
-          aspectsData.value[0].addweek = res.weekScCnt
-          aspectsData.value[0].addmonth = res.motnhScCnt
-          aspectsData.value[1].addweek = res.weekTchCnt
-          aspectsData.value[1].addmonth = res.monthTchCnt
-          aspectsData.value[2].addweek = res.weekStuCnt
-          aspectsData.value[2].addmonth = res.monthStuCnt
-          aspectsData.value[3].addweek = parseInt(res.weekActivity) + parseInt(res.weekLess)
-          aspectsData.value[3].addmonth = parseInt(res.monthActCnt) + parseInt(res.monthLess)
-          aspectsLoading.value.headerBasics = false
-        }
-        //处理研修进度
-        let outer = [
-          { value: 0, name: '线上研修' },
-          { value: 0, name: '校本研修' },
-          { value: 0, name: '认证材料' },
-          { value: 0, name: '课堂实录' },
-        ]
-        let within = [
-          { value: 0, name: '已完成' },
-          { value: 0, name: '进行中' },
-          { value: 0, name: '未完成' },
-        ]
-        outer[0].value = res.study.onLineCount
-        outer[1].value = res.study.offlineCount
-        outer[2].value = res.study.submitCount
-        outer[3].value = res.study.classRoomCount
+      // proxy.$api.getSchoolStatistics(data).then((res) => {
+      //   console.log(res, '某个学区的返回')
+      //   if (res.state === 200) {
+      //     //基础数据
+      //     activityData.value.oneself[0].num = res.weekLess
+      //     activityData.value.oneself[1].num = res.termLess
+      //     activityData.value.oneself[2].num = res.weekActivity + res.weekLess
+      //     activityData.value.oneself[3].num = res.termActivity
+      //     activityData.value.oneself[4].num = res.totalTime
+      //     activityData.value.oneself[5].num = res.allLess
+      //     activityData.value.oneself[6].num = 123456
+      //     // activityData.value.oneself[7].num = parseInt(res.examAreaCount) + parseInt(res.homeworkAreaCount) + parseInt(res.voteAreaCount) + parseInt(res.surveyAreaCount)
+      //     //header数量
+      //     nowArea.value.schoolCount = res.scCnt
+      //     nowArea.value.studentCount = res.stuCnt
+      //     nowArea.value.teacherCount = res.tchCnt
+      //     let teachNums = 0
+      //     for (let i in res.schools) {
+      //       teachNums += res.schools[i].teacherCount
+      //     }
+      //     aspectsData.value[0].num = res.scCnt
+      //     aspectsData.value[1].num = res.tchCnt
+      //     aspectsData.value[2].num = res.stuCnt
+      //     // aspectsData.value[3].num = parseInt(res.allLess) + parseInt(activityData.value.oneself[7].num)
+      //     aspectsData.value[0].addweek = res.weekScCnt
+      //     aspectsData.value[0].addmonth = res.motnhScCnt
+      //     aspectsData.value[1].addweek = res.weekTchCnt
+      //     aspectsData.value[1].addmonth = res.monthTchCnt
+      //     aspectsData.value[2].addweek = res.weekStuCnt
+      //     aspectsData.value[2].addmonth = res.monthStuCnt
+      //     aspectsData.value[3].addweek = parseInt(res.weekActivity) + parseInt(res.weekLess)
+      //     aspectsData.value[3].addmonth = parseInt(res.monthActCnt) + parseInt(res.monthLess)
+      //     aspectsLoading.value.headerBasics = false
+      //   }
+      //   //处理研修进度
+      //   let outer = [
+      //     { value: 0, name: '线上研修' },
+      //     { value: 0, name: '校本研修' },
+      //     { value: 0, name: '认证材料' },
+      //     { value: 0, name: '课堂实录' },
+      //   ]
+      //   let within = [
+      //     { value: 0, name: '已完成' },
+      //     { value: 0, name: '进行中' },
+      //     { value: 0, name: '未完成' },
+      //   ]
+      //   outer[0].value = res.study.onLineCount
+      //   outer[1].value = res.study.offlineCount
+      //   outer[2].value = res.study.submitCount
+      //   outer[3].value = res.study.classRoomCount
 
-        within[0].value = res.study.fulfilCount
-        within[1].value = res.study.carryOnCount
-        within[2].value = res.study.noCount
+      //   within[0].value = res.study.fulfilCount
+      //   within[1].value = res.study.carryOnCount
+      //   within[2].value = res.study.noCount
 
-        console.log(outer, within)
-        areaData.value.schedule.data = within
-        areaData.value.schedule.legend.data = outer
-        areaData.value.schedule.series[0].data = within
-        areaData.value.schedule.series[1].data = outer
-        aspectsLoading.value.research = false
+      //   console.log(outer, within)
+      //   areaData.value.schedule.data = within
+      //   areaData.value.schedule.legend.data = outer
+      //   areaData.value.schedule.series[0].data = within
+      //   areaData.value.schedule.series[1].data = outer
+      //   aspectsLoading.value.research = false
 
 
-        getclassification(areaids.id)
-        getcounselor(areaids.id)
-        getClassLivelys(areaids.id)
-        employSize(areaids.id)
-        researchData(areaids.id)
-        getAreaSchool(areaids.id)
-      })
-        .catch((res) => {
-          ElMessage.error('获取学区统计数据失败')
-        })
-
-      // proxy.$api.schoolOraread(data).then((res) => {
-      //   console.log(res, 'one V2')
-      //   //header数据
-      //   // nowArea.value.schoolCount=res.scInfos.length
-      //   // nowArea.value.studentCount=res.areaScStats.stu
-      //   // nowArea.value.teacherCount=res.areaScStats.tch
+      //   getclassification(areaids.id)
+      //   getcounselor(areaids.id)
+      //   getClassLivelys(areaids.id)
+      //   employSize(areaids.id)
+      //   researchData(areaids.id)
+      //   getAreaSchool(areaids.id)
+      // })
+      //   .catch((res) => {
+      //     ElMessage.error('获取学区统计数据失败')
+      //   })
 
-      //   // //基本
-      //   // aspectsData.value[0].num = res.scInfos.length
-      //   // aspectsData.value[1].num = res.areaScStats.tch
-      //   // aspectsData.value[2].num = res.areaScStats.stu
-      //   // aspectsData.value[3].num = Number(res.areaScStats.lessStats.all)+Number(res.areaScStats.actStats.all)
-      //   // aspectsData.value[4].num = res.areaScStats.size
+      proxy.$api.getoneselfArea(data).then((res) => {
+        console.log(res, 'one V2')
+        //header数据
+        //  nowArea.value.schoolCount=res.schoolInfos.length
+        //  nowArea.value.studentCount=res.areaScStats.stu
+        //  nowArea.value.teacherCount=res.areaScStats.tch
+        //学区顾问
+        CounselorList.value = res.assists
+        aspectsLoading.value.counselorData = false
 
-      //   // //基础数据 左一
-      //   // activityData.value.oneself[0].num=res.areaScStats.lessStats.week
-      //   // activityData.value.oneself[1].num=res.areaScStats.lessStats.term
-      //   // activityData.value.oneself[2].num=res.areaScStats.actStats.week
-      //   // activityData.value.oneself[3].num=res.areaScStats.actStats.term
-      //   // activityData.value.oneself[4].num=res.areaScStats.lessStats.open
-      //   // activityData.value.oneself[5].num=res.areaScStats.lessStats.all
-      //   // activityData.value.oneself[6].num='NULL'
-      //   // activityData.value.oneself[7].num=res.areaScStats.actStats.all
-      //   // //基础数据  右
-      //   // areaData.value.research.series[0].data[0].value=res.areaScStats.actStats.exam
-      //   // areaData.value.research.series[0].data[1].value =res.areaScStats.actStats.vote
-      //   // areaData.value.research.series[0].data[2].value = res.areaScStats.actStats.survey
-      //   // areaData.value.research.series[0].data[3].value = res.areaScStats.actStats.homework
-      //   // //学区内的学校列表
-      //   // schooltableData.value=
-      // }).catch((error) => {
-      //   ElMessage.error('获取学区统计数据失败')
-      // })
+        // //基本
+        aspectsData.value[0].num = res.schoolInfos.length
+        aspectsData.value[1].num = res.areaScStats.tch
+        aspectsData.value[2].num = res.areaScStats.stu
+        aspectsData.value[3].num = Number(res.areaScStats.lessStats.all) + Number(res.areaScStats.actStats.all)
+        aspectsData.value[4].num = res.areaScStats.size
+        //新增 周
+        aspectsData.value[0].addweek = res.areaScStats.weekSc
+        aspectsData.value[1].addweek = res.areaScStats.weekTch
+        aspectsData.value[2].addweek = res.areaScStats.weekStu
+        aspectsData.value[3].addweek = Number(res.areaScStats.lessStats.week) + Number(res.areaScStats.actStats.week)
+        //新增 月
+        aspectsData.value[0].addmonth = res.areaScStats.monthSc
+        aspectsData.value[1].addmonth = res.areaScStats.monthTch
+        aspectsData.value[2].addmonth = res.areaScStats.monthStu
+        aspectsData.value[3].addmonth = Number(res.areaScStats.lessStats.month) + Number(res.areaScStats.actStats.month)
+        aspectsLoading.value.headerBasics = false
+        // //基础数据 左一
+        activityData.value.oneself[0].num = res.areaScStats.lessStats.week
+        activityData.value.oneself[1].num = res.areaScStats.lessStats.term
+        activityData.value.oneself[2].num = res.areaScStats.actStats.week
+        activityData.value.oneself[3].num = res.areaScStats.actStats.term
+        activityData.value.oneself[4].num = res.areaScStats.lessStats.open
+        activityData.value.oneself[5].num = res.areaScStats.lessStats.all
+        activityData.value.oneself[6].num = 'null'
+        activityData.value.oneself[7].num = res.areaScStats.actStats.all
+        // //基础数据  右(活动)
+        areaData.value.research.series[0].data[0].value = res.areaScStats.actStats.exam
+        areaData.value.research.series[0].data[1].value = res.areaScStats.actStats.vote
+        areaData.value.research.series[0].data[2].value = res.areaScStats.actStats.survey
+        areaData.value.research.series[0].data[3].value = res.areaScStats.actStats.homework
+        aspectsLoading.value.basics = false
+        //课例活跃度
+        let namedata = []
+        for (let i in res.weekLess) {
+          let num = Number(i) + Number(1)
+          namedata.push('第' + num + '周')
+        }
+        areaData.value.dynamic.series[0].data = res.weekLess
+        areaData.value.dynamic.series[1].data = res.weekLess
+        areaData.value.dynamic.xAxis.data = namedata
+        aspectsLoading.value.classWeek = false
+        //学区内的学校列表
+        schooltableData.value = res.schoolInfos
+        aspectsLoading.value.schoolList = false
+      }).catch((error) => {
+        ElMessage.error('获取学区统计数据失败')
+      })
     }
     //获取某个学区的顾问情况
     function getcounselor (val) {

+ 90 - 5
TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue

@@ -213,9 +213,12 @@
       </div>
     </div>
     <div class="schoolList-all">
-      <p class="school-list-title">学校列表:</p>
-      <div class="school-tables">
-        <el-table :data="schoolDefault" height="55vh" style="width: 100%" v-loading="searchText.loading" element-loading-background="rgba(0, 0, 0, 0.5)" empty-text="暂无数据">
+      <div class="school-list-title">学校列表:</div>
+      <div class="school-search">
+        <el-input v-model="searchText.values" placeholder="搜索 学校名称/学校简码" class="input-with-select" size="small" clearable />
+      </div>
+      <div class="school-tables" style="width: 100%; height: 60vh" v-loading="searchText.loading" element-loading-background="rgba(0, 0, 0, 0.5)">
+        <!-- <el-table :data="schoolDefault" height="55vh" style="width: 100%" v-loading="searchText.loading" element-loading-background="rgba(0, 0, 0, 0.5)" empty-text="暂无数据">
           <el-table-column label="校徽" align="center">
             <template #default="scope">
               <el-image style="width: 50px; height: 50px" :src="scope.row.picture" fit="fill" v-if="scope.row.picture"></el-image>
@@ -232,7 +235,12 @@
               <el-button size="small" type="primary" @click="detailsSchool(scope.row)">前往查看</el-button>
             </template>
           </el-table-column>
-        </el-table>
+        </el-table> -->
+        <el-auto-resizer>
+          <template #default="{ height, width }">
+            <el-table-v2 :columns="columns" :data="schoolDefault" :width="width" :height="height" :estimated-row-height="20" fixed />
+          </template>
+        </el-auto-resizer>
       </div>
     </div>
   </div>
@@ -398,6 +406,67 @@ export default {
       activate: 0,
       totalEquipment: 0
     })
+    const columns = [
+      {
+        // key: "name",
+        // dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填name
+        title: "校徽",
+        width: 400,
+        fixed: false,
+        align: 'center',
+        cellRenderer: (data) => (
+          <>
+            <el-image style="width: 55px; height: 55px;margin:5px" src={data.rowData.picture} fit="contain" v-show={data.rowData.picture ? true : false}></el-image>
+            <div style=" width: 55px;height: 55px;line-height: 55px;text-align: center;background-color: #bdc3c7;font-size: 10px;color: #ecf0f1;margin:5px;" v-show={!data.rowData.picture ? true : false}>暂无图片</div>
+          </>
+        )
+      },
+      {
+        key: "name",
+        dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填name
+        title: "名称",
+        width: 400,
+        fixed: false,
+        align: 'center',
+      },
+      // {
+      //   // key: "name",
+      //   // dataKey: "name",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填name
+      //   title: "规模版本",
+      //   width: 100,
+      //   fixed: false,
+      //   align: 'center',
+      //   // sortable: true,
+      //   cellRenderer: (data) => (
+      //     <>
+      //       <div style="color:#409EFF" v-show={data.rowData.scale === 0 && (data.rowData.size < 100 || data.rowData.size == 100) ? true : false}>基础版</div>
+      //       <div style="color:#67C23A" v-show={(data.rowData.scale === 300 && data.rowData.size === 500) || (data.rowData.size > 100 && (!data.rowData.service.includes('YMPCVCIM') && !data.rowData.service.includes('VLY6J6N6') && !data.rowData.service.includes('VABAJ6NV'))) ? true : false}>标准版</div>
+      //       <div style="color: #e6a23c;" v-show={data.rowData.service.includes('YMPCVCIM') || data.rowData.service.includes('VLY6J6N6') || data.rowData.service.includes('VABAJ6NV') ? true : false}>专业版</div>
+      //     </>
+      //   ),
+      // },
+      {
+        key: "schoolId",
+        dataKey: "schoolId",//需要渲染当前列的数据字段,如{id:9527,name:'Mike'},则填id
+        title: "学校简码",//显示在单元格表头的文本
+        width: 400,//当前列的宽度,必须设置
+        align: 'center',
+      },
+      {
+        title: "",
+        width: 400,
+        align: "center",
+        // fixed: 'right',
+        cellRenderer: (data) =>
+        (
+          <>
+            <el-button type="primary" onClick={detailsSchool.bind(this, data.rowData)} >前往查看</el-button>
+          </>
+        ),
+      },
+    ];
+    let columnsWidth = ref(100 / columns.length)
+    console.log(columns.length, columnsWidth.value, '555555')
     // let totalServe = ref(0)
     let productList = ref([
       { name: 'ezStation 2', key: '3222NIYD', type: '软体' },
@@ -1508,6 +1577,7 @@ export default {
       loading: false
     })
     let timer = ref()
+    let allscSearch = ref()
     function showInit () {
       let urls = window.location.href.indexOf('pattern=area')
       let detailsUrl = window.location.href.indexOf('pattern=details')
@@ -1654,6 +1724,9 @@ export default {
             aspectsData.value.interact += item.cnt
           })
           allLoding.value.rankData = false
+          schoolDefault.value = res.scInfos
+          searchText.original = res.scInfos
+          searchText.loading = false
           aspectsInfo(res.areaScStats)
           // aspectsData.value.classed.push(item.lessCnt)
           // aspectsData.value.activitys.push(item.actCnt)
@@ -2214,7 +2287,10 @@ export default {
       searchText,
       timer,
       debounce,
-      personnelSearch
+      personnelSearch,
+      allscSearch,
+      columns,
+      columnsWidth
     }
   },
 }
@@ -2595,6 +2671,15 @@ export default {
   color: #ecf0f1;
   margin: 0 auto;
 }
+.school-search,
+.school-list-title {
+  display: inline-block;
+  vertical-align: top;
+  width: 50%;
+}
+.school-search {
+  padding-left: 20%;
+}
 </style>
 <style>
 /* .school-list .el-table .el-table__cell {

+ 12 - 6
TEAMModelOS/ClientApp/src/api/http.js

@@ -21,11 +21,11 @@ const NO_ACCESS_API = [
     'restapi.amap.com', //新增的2个,获取城市地址及天气的地址
     'devapi.qweather.com', //新增的2个,获取城市地址及天气的地址
     '/biz/get-loginuser',  //第三方登录 
-    '/biz/get-info',  //第三方获取企业详情
-    '/biz/set-bizuser', //第三方注册
-    '/biz/reset-secretkey', //第三方 重置
-    '/biz/get-openapi', //第三方 获取列表
-    '/biz/set-info', //第三方创建或者修改
+    //'/biz/get-info',  //第三方获取企业详情
+    //'/biz/set-bizuser', //第三方注册
+    //'/biz/reset-secretkey', //第三方 重置
+    //'/biz/get-openapi', //第三方 获取列表
+    //'/biz/set-info', //第三方创建或者修改
 ]
 // 需要携带access_token 不需要携带auth-token
 const NO_AUTH_API = [
@@ -35,6 +35,12 @@ const NO_AUTH_API = [
     '/student/get-student-info',
     '/teacher/init/GetUserInfo',
     '/grouplist/scan-code-join-list',
+
+    //'/biz/get-info',  //第三方获取企业详情
+    //'/biz/set-bizuser', //第三方注册
+    //'/biz/reset-secretkey', //第三方 重置
+    //'/biz/get-openapi', //第三方 获取列表
+    //'/biz/set-info', //第三方创建或者修改
 ]
 // 不进行错误提示白名单
 const NO_WARNING = [
@@ -92,7 +98,6 @@ axios.interceptors.request.use(
         //检查是否快到期
         let isExpired = checkToken()
         // let isExpired = true
-
         //token 未过期
         if (!isExpired) {
             return handleHeader(config)
@@ -119,6 +124,7 @@ axios.interceptors.request.use(
 // http response 拦截器
 axios.interceptors.response.use(
     response => {
+
         if (response.data.errCode === 2) {
             router.push({
                 path: '/login',

+ 92 - 29
TEAMModelOS/ClientApp/src/view/thirdparty/details.vue

@@ -28,13 +28,10 @@
                       </FormItem>
                       <FormItem label="企业logo">
                           <div class="upload-logo">
-                              <Upload class="avatar-uploader" :headers="uploadHeader" accept=".png,.jpeg,.jpg" action="/blob/biz-upload-public" :disabled='uploadState' :show-file-list="false" :before-upload="changeBadge" :on-success="success" :on-error="handleUpdErr" v-if="PowerShow">
+                              <Upload class="avatar-uploader" :headers="uploadHeader" accept=".png,.jpeg,.jpg" action="/blob/public-upload " :disabled='uploadState' :show-file-list="false" :before-upload="changeBadge" :on-success="success" :on-error="handleUpdErr" v-if="PowerShow">
                                   <img v-if="setform.imageUrl" :src="setform.imageUrl" class="avatar" fit="contain" />
                                   <Icon type="ios-add" size="30" v-else />
                                   <div class="changebadge" v-show="setform.imageUrl">
-                                      <!-- <svg class="delete-logo" aria-hidden="true" @click="deltelogos">
-                      <use xlink:href="#icon-shanchu3"></use>
-                    </svg> -->
                                       <Icon type="ios-repeat" class="delete-logo" @click="deltelogos" size="30" />
                                   </div>
                               </Upload>
@@ -48,21 +45,13 @@
                           <Input v-model="setform.email" @input="saveState=true" v-if="PowerShow" size="large" />
                           <Input v-model="setform.email" disabled v-else size="large" />
                       </FormItem>
-                      <!-- <el-form-item label="企业密码" class="token-box">
-      <div class="tokenbox">
-        <el-input v-model="setform.pwd" :rows="2" type="textarea" @input="saveState=true" />
-      </div>
-      <div class="generatebox">
-        <el-button type="primary" size="small" @click="againGenerate('pwd')">重新生成密码</el-button>
-      </div>
-    </el-form-item> -->
                       <FormItem label="企业秘钥" class="token-box">
                           <div class="tokenbox">
                               <!-- <el-input v-model="setform.token" :rows="2" type="textarea" @input="saveState=true" v-if="PowerShow" /> -->
                               <Input v-model="setform.token" :rows="3" type="textarea" disabled size="large" />
                           </div>
                           <div class="generatebox-copy">
-                              <Button type="primary" v-clipboard:copy="setform.token"  v-clipboard:success="firstCopySuccess">复制秘钥</Button>
+                              <Button type="primary" v-clipboard:copy="setform.token" v-clipboard:success="firstCopySuccess">复制秘钥</Button>
                           </div>
                           <div class="generatebox" v-if="PowerShow">
                               <Button type="primary" @click="againGenerate">重新生成秘钥</Button>
@@ -73,14 +62,28 @@
                           <Input v-model="setform.domain" disabled v-else size="large" />
                       </FormItem>
                       <FormItem label="通知地址">
-                          <Input v-model="setform.webhook" class="notification-input" @input="saveState=true" v-if="PowerShow" size="large" />
-                          <Input v-model="setform.webhook" class="notification-input" disabled v-else size="large" />
+                          <Input v-model="setform.webhook" class="notification-input" @on-focus="hintShow=true" @on-blur="hintShow=false"  size="large" />
+                          <!--<Input v-model="setform.webhook" class="notification-input" disabled v-else size="large" />-->
+                          <!-- <el-button class="mt-2" @click.prevent="addDomain()">添加通知地址</el-button> -->
+                          <p class="webhook-hint" v-show="hintShow">通知地址支持多个,请问英文逗号相隔</p>
+                      </FormItem>
+                      <FormItem label="通知访问金钥">
+                          <Input v-model="setform.webhookToken" class="notification-input" size="large" @on-focus="detectionWebhook" @on-blur="detectionWebhook"/>
+                          <!--<Input v-model="setform.webhookToken" class="notification-input" disabled v-else size="large" />-->
                           <!-- <el-button class="mt-2" @click.prevent="addDomain()">添加通知地址</el-button> -->
+                          <p  class="webhint-token" v-show="webhookShow.token">请填写 通知访问金钥,访问金钥 和 金钥头部 如填写,均需填写</p>
+                      </FormItem>
+                      <FormItem label="通知金钥头部">
+                          <Input v-model="setform.webhookHead" class="notification-input" size="large" @on-focus="detectionWebhook" @on-blur="detectionWebhook"/>
+                          <!--<Input v-model="setform.webhook" class="notification-input" disabled v-else size="large" />-->
+                          <!-- <el-button class="mt-2" @click.prevent="addDomain()">添加通知地址</el-button> -->
+                          <p class="webhint-header" v-show="webhookShow.header">请填写 通知金钥头部,访问金钥 和 金钥头部 如填写,均需填写</p>
                       </FormItem>
-                      <div class="set-basics-save" v-show="saveState === true">
-                          <Button type="primary" @click="saveSet">保存修改</Button>
-                      </div>
                   </Form>
+                  <div class="set-basics-save">
+                      <Button type="primary" @click="saveSet" v-if="submitState">保存修改</Button>
+                      <Button type="primary" disabled v-else>保存修改</Button>
+                  </div>
               </div>
             </div>
           </TabPane>
@@ -168,7 +171,9 @@ export default {
         webhook: '',
         id: '',
         code: '',
-        jti: ''
+        jti: '',
+        webhookToken: '',
+        webhookHead:'',
       },
       formVerify: {
         name: [
@@ -210,6 +215,12 @@ export default {
       apidata: [],
       apitotal: 0,
       isLoading: false,
+        hintShow: false,
+        webhookShow: {
+            token: false,
+            header:false,
+        },
+        submitState:true,
     }
   },
   created () {
@@ -222,11 +233,11 @@ export default {
       console.log(this.firmData)
     },
     uploadInt () {
-        let token = JSON.parse(localStorage.getItem('openid_token'))
-       /* let actoken = JSON.parse(localStorage.getItem('access_token'))*/
+        let token = localStorage.getItem('auth_token')
+       let actoken =localStorage.getItem('access_token')
         console.log(token,'token值')
         this.uploadHeader['x-auth-authtoken'] = token
-        /*this.uploadHeader['authorization'] = 'Bearer ' + actoken*/
+        this.uploadHeader['authorization'] = 'Bearer ' + actoken
     },
     changeBadge (file) {
       if (file.type == 'image/png' || file.type == 'image/jpeg' || file.type == 'image/jpg') {
@@ -246,11 +257,12 @@ export default {
     handleUpdErr () {
       this.$Message.error('企业头像修改失败')
     },
-    detailsInfo (val) {
+      detailsInfo(val) {
+      console.log(val, '77777')
       let data = { id: val }
       this.isLoading = true;
       this.$api.thirdparty.getDetails(data).then((res) => {
-        console.log(res)
+       console.log(res)
         if (res.state === 200) {
           this.setform.name = res.business.name
           this.setform.credit = res.business.credit
@@ -264,6 +276,8 @@ export default {
           this.setform.jti = res.business.jti
           this.setform.code = res.business.code
           this.tableData = res.business.schools
+          this.setform.webhookToken = res.business.webhookToken
+          this.setform.webhookHead = res.business.webhookHead
         }
         this.isLoading = false;
         this.getApilist()
@@ -312,15 +326,49 @@ export default {
    saveSet() {
         console.log(this.setform, '保存相关')
         let datas = this.setform
+       datas.webhook = datas.webhook.replace(/,/g, ",")
+       datas.webhook = datas.webhook.replace(/,,/g, ",")
         let schoolData = this.tableData
-        let saveData = { code: datas.code, id: datas.id, name: datas.name, credit: datas.credit, picture: datas.imageUrl, mobile: datas.mobile, email: datas.email, domain: datas.domain, webhook: datas.webhook, schools: schoolData }
+       let saveData = {
+           code: datas.code,
+           id: datas.id,
+           name: datas.name,
+           credit: datas.credit,
+           picture: datas.imageUrl,
+           mobile: datas.mobile,
+           email: datas.email,
+           domain: datas.domain,
+           webhook: datas.webhook,
+           schools: schoolData,
+           webhookHead: datas.webhookHead,
+           webhookToken: datas.webhookToken
+       }
         this.$api.thirdparty.updateThirdparty(saveData).then((res) => {
-            res.state === 200 ? (this.$Message.success('保存成功')) : this.$Message.error('保存失败')
+            res.state === 200 ? (this.$Message.success('保存成功'), this.updateAfters(saveData)) : this.$Message.error('保存失败')
         }).catch((error) => {
             this.$Message.error('API异常,保存失败')
         })
-    }
+      },
+   //webhookToken及header检测
+   detectionWebhook() {
+       let webHook = this.setform.webhookToken
+       let webHeade = this.setform.webhookHead
+       !webHook && !webHeade ? (this.webhookShow.header = false, this.webhookShow.token = false, this.submitState=true) :
+           webHook && !webHeade ? (this.webhookShow.header = true, this.webhookShow.token = false, this.submitState = false) :
+               !webHook && webHeade ? (this.webhookShow.header = false, this.webhookShow.token = true,this.submitState = false) :
+                   webHook && webHeade ? (this.webhookShow.header = false, this.webhookShow.token = false, this.submitState = true) :''
+   },
+   //更新成功后,数据同步到index 用户信息内
+      updateAfters(vals) {
+          console.log(vals)
+          let relevancy = JSON.parse(localStorage.getItem('thirdUser'))
+          console.log(relevancy)
+          relevancy.user.relation.length !== 0 ? relevancy.user.relation.forEach((item) => {item.bizId === vals.id ? (item.name = vals.name, item.picture = vals.picture) : '' }) : ''
+          localStorage.setItem('thirdUser', JSON.stringify(relevancy))
+          console.log(relevancy, '处理结果')
+      }
   }
+
 }
 </script>
 <style scoped>
@@ -349,7 +397,7 @@ export default {
   border: 1px solid #ccc;
   padding: 0.5%;
   margin: 0 auto;
-  /*overflow: auto;*/
+  overflow: auto;
   position: relative;
 }
 .set-basics-title {
@@ -435,7 +483,7 @@ export default {
 }
 .changebadge:hover {
   opacity: 1;
-  background-color: rgba(200, 214, 229, 0.9);
+  background-color: rgba(200, 214, 229, 0.7);
 }
 .changebadge {
   width: 100%;
@@ -484,6 +532,18 @@ export default {
         margin-left: 2%;
         opacity: 0;
     }
+    .webhook-hint {
+        font-size: 12px;
+        line-height: 18px;
+        margin-bottom: 2px;
+        color: #bdc3c7;
+    }
+    .webhint-header, .webhint-token {
+        font-size: 12px;
+        line-height: 18px;
+        margin-bottom: 0px;
+        color: #ff7675;
+    }
 </style>
 <style>
 .set-basics-form .el-upload {
@@ -515,4 +575,7 @@ export default {
         background: rgba(189, 195, 199, 0.6);
         cursor: pointer;
     }
+    .set-basics .ivu-form-item {
+        margin-bottom:16px;
+    }
 </style>

+ 25 - 25
TEAMModelOS/ClientApp/src/view/thirdparty/index.vue

@@ -20,11 +20,14 @@
           <template #list>
             <DropdownMenu>
               <DropdownItem>姓名:{{userBasics.name}}</DropdownItem>
-              <DropdownItem @click="quit">
-                <svg class="header-icon" aria-hidden="true">
-                  <use xlink:href="#icon-tuichu"></use>
-                </svg>
-                退出登录
+              <DropdownItem>
+                  <div class="quits" @click="quit()">
+                      <!--<svg class="header-icon" aria-hidden="true">
+                          <use xlink:href="#icon-tuichu"></use>
+                      </svg>-->
+                      <Icon type="md-exit" class="header-icon"/>
+                      退出登录
+                  </div>
               </DropdownItem>
             </DropdownMenu>
           </template>
@@ -138,12 +141,11 @@ export default {
     let result = JSON.parse(localStorage.getItem('thirdUser'))
     console.log(result, '用户信息')
     this.userBasics = result.user,
-      this.correlationFirm = result.user.relation
+    this.correlationFirm = result.user.relation
   },
   methods: {
     getlocaltion () {
       this.$api.thirdparty.getlocation('753b06a025d7fe62bdca1ff453149bfc', '182.139.161.4').then((res) => {
-        console.log(res)
         this.cityCode = res.rectangle.split(';')
         this.cityCode = this.cityCode[0]
         console.log(this.cityCode)
@@ -191,9 +193,9 @@ export default {
       // val === 'default' ? this.showModel = 'default' : ''
       this.showModel = 'default'
     },
-    quit () {
+      quit() {
       localStorage.clear();
-      router.push('/thirdparty')
+          this.$router.push('/bizlogin')
     }
   }
 }
@@ -374,7 +376,7 @@ export default {
     rgba(0, 0, 0, 0.06) 0px 0px 0px 1px;
 }
 .school-List-item-img {
-  width: 50%;
+  width: 40%;
   margin: 0 auto;
 }
 .enterprise-item-content {
@@ -383,7 +385,7 @@ export default {
 .enterprise-item-content-name {
   font-size: 16px;
   font-weight: bold;
-  margin-top: 1%;
+  margin-top: 3%;
 }
 .enterprise-item-content-code {
   font-size: 14px;
@@ -430,22 +432,20 @@ export default {
   height: 7px; /*滚动条高度*/
   background-color: white;
 }
-/*定义滑块 内阴影+圆角*/
-::-webkit-scrollbar-thumb {
-  -webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
-  background-color: rgba(221, 222, 224); /*滚动条的背景颜色*/
-  border-radius: 5px;
-}
+    .quits {
+        text-align:center;
+    }
+    /*定义滑块 内阴影+圆角*/
+    ::-webkit-scrollbar-thumb {
+        -webkit-box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
+        background-color: rgba(221, 222, 224); /*滚动条的背景颜色*/
+        border-radius: 5px;
+    }
 </style>
 <style>
-.header-icon {
-  width: 1.2em;
-  height: 1.2em;
-  vertical-align: -0.3em;
-  fill: currentColor;
-  overflow: hidden;
-  margin-right: 5px;
-}
+    .header-icon {
+        transform: rotateZ(180deg);
+    }
 .log-icon {
   width: 2em;
   height: 2em;

+ 4 - 2
TEAMModelOS/ClientApp/src/view/thirdparty/login.vue

@@ -127,8 +127,10 @@ export default {
             // store.commit('thirdUserInfo', res.bizUser),
             // store.commit('thirdCorrelationInfo', res.relBizInfos),
             users.user = res.businessUsers, users.correlation = res.relation,
-            localStorage.setItem('thirdUser', JSON.stringify(users)),
-            localStorage.setItem('openid_token', JSON.stringify(res.openid_token)), this.$router.push({ name: 'thirdIndex' }))
+                localStorage.setItem('thirdUser', JSON.stringify(users)),
+                localStorage.setItem('access_token',res.token.access_token),
+                localStorage.setItem('expires_in',res.token.expires_in),
+                localStorage.setItem('auth_token', res.openid_token), this.$router.push({ name: 'thirdIndex' }))
             : res.state === 40301 ? this.$Message.error('密码错误,请重新登录') : ''
       }).catch((error) => {
         this.isLoading = false;