Преглед на файлове

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

HiITEdenX преди 2 години
родител
ревизия
962e8aec40

+ 6 - 0
TEAMModelBI/ClientApp/src/static/region.json

@@ -7060,6 +7060,12 @@
 		}, {
 			"code": "510185",
 			"name": "简阳市"
+		},{
+			"code":"510102",
+			"name":"高新区"
+		},{
+			"code":"510156",
+			"name":"天府新区"
 		}]
 	}, {
 		"code": "510300",

Файловите разлики са ограничени, защото са твърде много
+ 11188 - 0
TEAMModelBI/ClientApp/src/static/regions/region_cn.json


Файловите разлики са ограничени, защото са твърде много
+ 1896 - 0
TEAMModelBI/ClientApp/src/static/regions/region_gl.json


+ 8 - 3
TEAMModelBI/ClientApp/src/view/index/index.vue

@@ -2319,10 +2319,15 @@ export default {
           let basicsData = []; let standardData = []; let majorData = [];
           //基础版
           schoolList.forEach((x) => {
-            x.scale === 0 ? basicsData.push(x) : ''
-            x.scale === 500 && x.hard === 0 && x.serial === 0 && x.service === 0 ? standardData.push(x) : ''
-            x.scale === 500 && (x.hard !== 0 || x.serial !== 0 || x.service !== 0) ? majorData.push(x) : ''
+            x.scale === 0 && x.size <=100 ? basicsData.push(x) : ''
+            // x.scale === 500 && x.hard === 0 && x.serial === 0 && x.service === 0 ? standardData.push(x) : ''
+            // x.scale === 500 && (x.hard !== 0 || x.serial !== 0 || x.service !== 0) ? majorData.push(x) : ''
+            // ((x.scale ===300 && x.size === 500) || (x.size >100)) && (!x.service.includes('YMPCVCIM') && !x.service.includes('VLY6J6N6') && !x.service.includes('VABAJ6NV') ) ? standardData.push(x):''
+            // ((x.scale === 300 && x.size === 500) || (x.size >100)) ? standardData.push(x):''
+            x.scale === 300 && x.size === 500 ? standardData.push(x):x.size > 100 && (!x.service.includes('YMPCVCIM') && !x.service.includes('VLY6J6N6') && !x.service.includes('VABAJ6NV') )  ?  standardData.push(x):''
+            x.service.includes('YMPCVCIM') || x.service.includes('VLY6J6N6') || x.service.includes('VABAJ6NV') ? majorData.push(x):''
           })
+          console.log(basicsData,standardData,majorData,7777777)
           if (siteValue.value === 'china') {
             versionsData.value.basics.num = basicsData.length
             versionsData.value.basics.proportion = ((basicsData.length / schoolList.length).toFixed(2)) * 100

+ 10 - 7
TEAMModelBI/ClientApp/src/view/participation/index.vue

@@ -63,13 +63,13 @@
             <el-image style="width: 80px; height: 80px" :src="imgData.specialty" fit="fill" v-else-if="scope.row.scale === 500 && (scope.row.hard.length != 0 || scope.row.serial.length != 0 || scope.row.service.length != 0)">
             </el-image> -->
             <div class="scalebox">
-              <p class="scalebox-content" v-if="scope.row.scale === 0">
+              <p class="scalebox-content basic" v-if="scope.row.scale === 0 && scope.row.size <=100">
                 基础版
               </p>
-              <p class="scalebox-content" v-else-if="scope.row.scale === 500 && scope.row.hard.length === 0 && scope.row.serial.length === 0 && scope.row.service.length === 0">
+              <p class="scalebox-content stands" v-else-if="((scope.row.scale===300 && scope.row.size ===500) || (scope.row.size >100 && (!scope.row.service.includes('YMPCVCIM') && !scope.row.service.includes('VLY6J6N6') && !scope.row.service.includes('VABAJ6NV') )) )">
                 标准版
               </p>
-              <p class="scalebox-content" v-else-if="scope.row.scale === 500 && (scope.row.hard.length != 0 || scope.row.serial.length != 0 || scope.row.service.length != 0)">
+              <p class="scalebox-content majors" v-else-if="scope.row.service.includes('YMPCVCIM') || scope.row.service.includes('VLY6J6N6') || scope.row.service.includes('VABAJ6NV')">
                 专业版
               </p>
             </div>
@@ -910,8 +910,8 @@ export default {
   margin-left: 20%;
 }
 .scalebox-content {
-  color: #592e02;
-  background: linear-gradient(90deg, #734311, #ffc78c, #734311);
+  /* color: #592e02;
+  background: linear-gradient(90deg, #734311, #ffc78c, #734311); */
   text-align: center;
   padding: 2px 0;
   font-size: 12px;
@@ -920,7 +920,7 @@ export default {
   margin-bottom: 0px;
   line-height: 20px;
 }
-.scalebox-content::before {
+/* .scalebox-content::before {
   border-top: 6px solid #dca974;
   bottom: -1px;
   right: -4px;
@@ -939,7 +939,7 @@ export default {
   border-bottom: 6px solid #dca974;
   top: -1px;
   left: -4px;
-}
+} */
 .stepicon {
   float: right;
   height: 22px;
@@ -965,6 +965,9 @@ export default {
   color: #ecf0f1;
   margin: 0 auto;
 }
+.basic{color:#409EFF}
+.stands{color:#67C23A}
+.majors{color: #E6A23C}
 </style>
 <style>
 .schoolboxtad .el-cascader {

+ 20 - 10
TEAMModelBI/ClientApp/src/view/schoolServe/analyseSchool.vue

@@ -7,9 +7,9 @@
         </div>
         <div class="schoolname-name">
           <div class="schoolname-name-title">{{nowSchools.name}}</div>
-          <div class="schoolname-versions" v-if="nowSchools.scale ==0">基础版</div>
-          <div class="schoolname-versions standard" v-else-if="nowSchools.scale ==500 && nowSchools.hard.length ===0 && nowSchools.serial.length ===0 && nowSchools.service.length ===0 ">标准版</div>
-          <div class="schoolname-versions major" v-else-if="nowSchools.scale ===500 && (nowSchools.hard.length !=0 || nowSchools.serial.length !=0 || nowSchools.service.length !=0)">专业版</div>
+          <div class="schoolname-versions" v-if="nowSchools.scale === 0 && nowSchools.size <=100">基础版</div>
+          <div class="schoolname-versions standard" v-else-if="((nowSchools.scale===300 && nowSchools.size ===500) || (nowSchools.size >100 && (!nowSchools.service.includes('YMPCVCIM') && !nowSchools.service.includes('VLY6J6N6') && !nowSchools.service.includes('VABAJ6NV') )) )">标准版</div>
+          <div class="schoolname-versions major" v-else-if="nowSchools.service.includes('YMPCVCIM') || nowSchools.service.includes('VLY6J6N6') || nowSchools.service.includes('VABAJ6NV')">专业版</div>
         </div>
       </div>
       <div class="backs">
@@ -145,7 +145,13 @@ export default {
     console.log(store.state.nowSchool, 'VUEX数据')
     let skipSchool = ref(store.state.nowSchool)
 
-    let nowSchools = ref({})
+    let nowSchools = ref({
+      name:'',
+      picture:'',
+      scale:0,
+      size:0,
+      service:[]
+    })
     let headerData = ref([
       { id: 1, title: '教师数量', num: 0, icon: '#icon-schoollaoshi', classname: 'teach' },
       { id: 2, title: '班级数量', num: 0, icon: '#icon-banjiguanli1', classname: 'class' },
@@ -1020,10 +1026,12 @@ export default {
       course: true,
       proportion: true,
     })
+    schoolinit()
     function backindex () {
       router.push({ path: '/home/participation', query: {} })
     }
     function schoolinit () {
+      console.log(skipSchool.value)
       let nowSchools = skipSchool.value
       console.log(nowSchools, skipSchool.value)
       proxy.$api.schoolStatistics({ schoolId: nowSchools.id }).then((res) => {
@@ -1092,7 +1100,8 @@ export default {
           for (let t in tableData.value) {
             let keys = tableData.value[t].key
             for (let i in res.schoolInfo.service) {
-              res.schoolInfo.service[i].prodCode === keys ? (tableData.value[t].date = res.schoolInfo.service[i].startDate, tableData.value[t].expire = res.schoolInfo.service[i].endDate, tableData.value[t].state = true) : ''
+              res.schoolInfo.service[i].prodCode === keys ? (tableData.value[t].date = res.schoolInfo.service[i].startDate ===0 ? res.schoolInfo.service[i].startDate:proxy.$common.getLocalTime(res.schoolInfo.service[i].startDate*1000), 
+              tableData.value[t].expire = res.schoolInfo.service[i].endDate ===0 ? res.schoolInfo.service[i].endDate:roxy.$common.getLocalTime(res.schoolInfo.service[i].endDate*1000), tableData.value[t].state = true) : ''
             }
           }
           console.log(basicsData.value)
@@ -1101,6 +1110,7 @@ export default {
         proportion(res.schoolInfo)
       }).catch((error) => {
         ElMessage.error('学校数据获取异常')
+        backindex()
       })
     }
     function proportion (val) {
@@ -1147,8 +1157,8 @@ export default {
         ElMessage.error('学校课例占比获取异常')
       })
     }
-    schoolinit()
     nowSchools.value = store.state.nowSchool
+
     console.log(store.state.nowSchool)
     return { headerData, basicsData, totalechartsData, modulesData, tableData, backindex, nowSchools, skipSchool, schoolinit, loadingSchool }
   },
@@ -1479,10 +1489,10 @@ export default {
   width: 55px;
   font-size: 14px;
   line-height: 20px;
-  border: 1px solid #48dbfb;
+  border: 1px solid #79bbff;
   border-radius: 10px;
   margin-left: 10px;
-  background-color: #48dbfb;
+  background-color:  #79bbff;
   color: #fff;
 }
 .major {
@@ -1490,8 +1500,8 @@ export default {
   border: 1px solid #ffc78c;
 }
 .standard {
-  background: linear-gradient(90deg, #686de0, #5f27cd);
-  border: 1px solid #686de0;
+  background: linear-gradient(90deg, #b3e19d,  #95d475);
+  border: 1px solid  #95d475;
 }
 </style>
 <style>

+ 93 - 27
TEAMModelBI/ClientApp/src/view/schoolServe/school.vue

@@ -87,13 +87,13 @@
             <el-image style="width: 80px; height: 80px" :src="imgData.specialty" fit="fill" v-else-if="scope.row.scale === 500 && (scope.row.hard.length != 0 || scope.row.serial.length != 0 || scope.row.service.length != 0)">
             </el-image> -->
             <div class="scalebox">
-              <p class="scalebox-content" v-if="scope.row.scale === 0">
+              <p class="scalebox-content basic" v-if="scope.row.scale === 0 && scope.row.size <=100">
                 基础版
               </p>
-              <p class="scalebox-content" v-else-if="scope.row.scale === 500 && scope.row.hard.length === 0 && scope.row.serial.length === 0 && scope.row.service.length === 0">
+              <p class="scalebox-content stands" v-else-if="((scope.row.scale===300 && scope.row.size ===500) || (scope.row.size >100 && (!scope.row.service.includes('YMPCVCIM') && !scope.row.service.includes('VLY6J6N6') && !scope.row.service.includes('VABAJ6NV') )) )">
                 标准版
               </p>
-              <p class="scalebox-content" v-else-if="scope.row.scale === 500 && (scope.row.hard.length != 0 || scope.row.serial.length != 0 || scope.row.service.length != 0)">
+              <p class="scalebox-content majors" v-else-if="scope.row.service.includes('YMPCVCIM') || scope.row.service.includes('VLY6J6N6') || scope.row.service.includes('VABAJ6NV')">
                 专业版
               </p>
             </div>
@@ -412,6 +412,15 @@ export default {
       Selectvalue: '',
       data: [],
     })
+    //学校列表筛选省市区
+    let selectValue=ref({
+      province:'',
+      provinceCode:'',
+      city:'',
+      cityCode:'',
+      dist:'',
+      distCode:'',
+    })
     //学段管理(传输给子组件)
     let studyPhase = ref()
     //存储变更按钮显示show
@@ -536,48 +545,101 @@ export default {
       }
     }
     //地区选择
-    function areaSelctChange (value, model) {
+    async function areaSelctChange (value, model) {
       loading.value = true
+      console.log(value,model)
+      var schoolListDatas=[]
       // let textState = (values.includes('自治区') || values.includes('市')) && model === 'province' ? true : false
       // let value = values.indexOf('省') === -1 && model === 'province' && textState === false ? values + '省' : values
       // console.log(values, value, model, '调用的select')
-      let data = option
+      var regionsData = option
       if (model === 'province') {
         //传输下一级的数据给select
-        let cityData = data.filter((item) => {
+        let cityData = regionsData.filter((item) => {
           return value.includes(item.name)
         })
         cityOptions.value.cityInfo = cityData[0].children
         //遍历list
-        let schoolData = originalData.value.filter((items) => {
-          // let provinceState = items.province.includes('自治区') || items.province.includes('市') ? true : false
-          // let names = provinceState === false && items.province.indexOf('省') === -1 ? items.province + '省' : items.province
-          return value.includes(items.province)
-          // return items.province === value
+        // let schoolData = originalData.value.filter((items) => {
+        //   // let provinceState = items.province.includes('自治区') || items.province.includes('市') ? true : false
+        //   // let names = provinceState === false && items.province.indexOf('省') === -1 ? items.province + '省' : items.province
+        //   return value.includes(items.province)
+        //   // return items.province === value
+        // })
+        let textNums=value.indexOf('省') !==-1 ? value.indexOf('省'): value.indexOf('自治区') !==-1 ? value.indexOf('自治区'): value.indexOf('市') !==-1 ? value.indexOf('市'): value.indexOf('特别行政区') !==-1 ?value.indexOf('特别行政区'):''
+        let disposeText=value.substr(0,textNums)
+        console.log(textNums,disposeText,'位置')
+        let data={province:disposeText}
+        await proxy.$api.getSchooldata(data).then((res)=>{
+          console.log(res,'筛选结果')
+          // res.state === 200 ? tableData.value=res.schoolAssists:''
+          res.state === 200 ? (schoolListDatas=res.schoolAssists,selectValue.value.province=disposeText):''
+        }).catch((error)=>{
+          ElMessage.error('API异常,数据 省 筛选失败')
         })
-        tableData.value = schoolData
-        console.log(schoolData, tableData.value)
+        // tableData.value = schoolData
+        // console.log(schoolData, tableData.value)
       } else if (model === 'city') {
         let distData = cityOptions.value.cityInfo.filter((item) => {
           return value.includes(item.name)
         })
         distOptions.value.distInfo = distData[0].children
-        let provinceData = provinceOptions.value.provinceValue
-        let schoolData = originalData.value.filter((items) => {
-          return value.includes(items.city) && provinceData.includes(items.province)
-          // return items.city === value && items.province === provinceData
+        // let provinceData = provinceOptions.value.provinceValue
+        // let schoolData = originalData.value.filter((items) => {
+        //   return value.includes(items.city) && provinceData.includes(items.province)
+        //   // return items.city === value && items.province === provinceData
+        // })
+        // tableData.value = schoolData
+        let cityNums=value.indexOf('市') !==-1 && value !=='直辖市'  ? value.indexOf('市'): value.indexOf('县') !==-1 ? value.indexOf('县'): value.indexOf('自治州') !==-1 ? value.indexOf('自治州'): value.indexOf('直辖市') !==-1 ? value.length:''
+        let disposeText=value.substr(0,cityNums)
+        console.log(cityNums,disposeText,'位置')
+        let data={province:selectValue.value.province ? selectValue.value.province:'',city:disposeText}
+        await proxy.$api.getSchooldata(data).then((res)=>{
+          res.state === 200 ? (schoolListDatas=res.schoolAssists,selectValue.value.city=disposeText):''
+        }).catch((error)=>{
+          ElMessage.error('API异常,数据 市/县 筛选失败')
         })
-        tableData.value = schoolData
       } else if (model === 'dist') {
         let provinceData = provinceOptions.value.provinceValue
         let cityData = cityOptions.value.cityValue
         console.log(cityData, provinceData, '进入到地区选择')
-        let schoolData = originalData.value.filter((items) => {
-          return cityData.includes(items.city) && provinceData.includes(items.province) && value.includes(items.dist)
-          // return items.city === cityData && items.province === provinceData && items.dist === value
+        // let schoolData = originalData.value.filter((items) => {
+        //   return cityData.includes(items.city) && provinceData.includes(items.province) && value.includes(items.dist)
+        //   // return items.city === cityData && items.province === provinceData && items.dist === value
+        // })
+        // tableData.value = schoolData
+        let distNums=value.indexOf('区') !==-1 && value.length >2 ? value.indexOf('区'): value.indexOf('县') !==-1 ? value.indexOf('县'): value.indexOf('市') !==-1 ? value.indexOf('市'): value.indexOf('直辖市') !==-1 ? value.length:''
+        let disposeText=value.substr(0,distNums)
+        console.log(distNums,disposeText,'位置')
+        let data={province:selectValue.value.province ? selectValue.value.province:'',city:selectValue.value.city? selectValue.value.city:'',dist:disposeText}
+        await proxy.$api.getSchooldata(data).then((res)=>{
+          res.state === 200 ? schoolListDatas=res.schoolAssists:''
+        }).catch((error)=>{
+          ElMessage.error('API异常,数据 地区 筛选失败')
         })
-        tableData.value = schoolData
       }
+      //统一处理
+      console.log(schoolListDatas,'处理前的')
+      for (let i in schoolListDatas) {
+        schoolListDatas[i].serviceData = []
+            if (schoolListDatas[i].assists) {
+              schoolListDatas[i].assisName = ''
+              schoolListDatas[i].location = schoolListDatas[i].dist !== null ? schoolListDatas[i].province + schoolListDatas[i].city + schoolListDatas[i].dist : schoolListDatas[i].province +schoolListDatas[i].city
+              let datas = schoolListDatas[i].assists
+              for (let y in datas) {
+                schoolListDatas[i].assisName = schoolListDatas[i].assisName + datas[y].tmdName + ','
+              }
+            }
+            if (schoolListDatas[i].service.length > 0) {
+              schoolListDatas[i].service.forEach((x) => {
+                for (let m in patternIcon.value) {
+                  patternIcon.value[m].key === x ? schoolListDatas[i].serviceData.push(patternIcon.value[m]) : ''
+                }
+              })
+            }
+        }
+      tableData.value=schoolListDatas
+      tableData.value.forEach((item) => { item.areaName = ''; areaSelect.value.data.forEach((itema) => { item.areaId === itema.id ? item.areaName = itema.name : '' }) })  
       loading.value = false
     }
     //学校详情 close
@@ -986,7 +1048,8 @@ export default {
       debounce,
       tablesccnt,
       searchValues,
-      timer
+      timer,
+      selectValue
     }
   },
 }
@@ -1238,8 +1301,8 @@ export default {
   margin-left: 20%;
 }
 .scalebox-content {
-  color: #592e02;
-  background: linear-gradient(90deg, #734311, #ffc78c, #734311);
+  /* color: #592e02;
+  background: linear-gradient(90deg, #734311, #ffc78c, #734311); */
   text-align: center;
   padding: 2px 0;
   font-size: 12px;
@@ -1248,7 +1311,7 @@ export default {
   margin-bottom: 0px;
   line-height: 20px;
 }
-.scalebox-content::before {
+/* .scalebox-content::before {
   border-top: 6px solid #dca974;
   bottom: -1px;
   right: -4px;
@@ -1267,7 +1330,7 @@ export default {
   border-bottom: 6px solid #dca974;
   top: -1px;
   left: -4px;
-}
+} */
 .areaname,
 .stepicon {
   display: inline-block;
@@ -1330,6 +1393,9 @@ export default {
   font-size:12px;
   margin-left:1%;
 }
+.basic{color:#409EFF}
+.stands{color:#67C23A}
+.majors{color: #E6A23C}
 </style>
 <style>
 .schoolboxea .el-cascader {

+ 12 - 7
TEAMModelBI/ClientApp/src/view/schoolmanage/schoolAnalyse.vue

@@ -909,9 +909,9 @@ export default {
             },
             data: [
               //名字一致会导致颜色一致
-              { name: '基础版', value: 52 },
-              { name: '标准版', value: 54 },
-              { name: '专业版', value: 54 },
+              { name: '基础版', value: 0 },
+              { name: '标准版', value: 0 },
+              { name: '专业版', value: 0 },
             ],
             labelLine: {
               show: true,
@@ -1707,9 +1707,11 @@ export default {
           //处理版本占比
           let basicsV = 0; let standardV = 0; let marjorV = 0
           for (let v in res.scInfos) {
-            res.scInfos[v].scale === 0 ? basicsV += 1 : ''
-            res.scInfos[v].scale === 500 && res.scInfos[v].serial.length === 0 && res.scInfos[v].service.length === 0 ? standardV += 1 : ''
-            res.scInfos[v].serial.length !== 0 && res.scInfos[v].service.length !== 0 && res.scInfos[v].scale === 500 ? marjorV += 1 : ''
+            res.scInfos[v].scale === 0 && res.scInfos[v].size===100 ? basicsV += 1 : ''
+            // res.scInfos[v].scale === 500 && res.scInfos[v].serial.length === 0 && res.scInfos[v].service.length === 0 ? standardV += 1 : ''
+            res.scInfos[v].scale === 300 && res.scInfos[v].size === 500 ? standardV += 1:res.scInfos[v].size > 100 && (!res.scInfos[v].service.includes('YMPCVCIM') && !res.scInfos[v].service.includes('VLY6J6N6') && !res.scInfos[v].service.includes('VABAJ6NV') )  ? standardV += 1:''
+            res.scInfos[v].service.includes('YMPCVCIM') || res.scInfos[v].service.includes('VLY6J6N6') || res.scInfos[v].service.includes('VABAJ6NV') ? marjorV += 1:''
+            // res.scInfos[v].serial.length !== 0 && res.scInfos[v].service.length !== 0 && res.scInfos[v].scale === 500 ? marjorV += 1 : ''
           }
           echartsData.value.edition.series[0].data[0].value = basicsV
           echartsData.value.edition.series[0].data[1].value = standardV
@@ -1762,7 +1764,10 @@ export default {
         console.log(res, '年级、科目')
         if (res.state === 200) {
           //处理显示学校版本 
-          schoolDeatils.value.versions = schoolDeatils.value.scale === 0 ? '基础版' : schoolDeatils.value.scale === 500 && res.serial === 0 && res.service === 0 ? '标准版' : schoolDeatils.value.scale >= 500 && res.serial !== 0 && res.service !== 0 ? '专业版' : ''
+          console.log(schoolDeatils.value,'查看标准')
+          schoolDeatils.value.versions = schoolDeatils.value.scale === 0 && schoolDeatils.value.size <=100 ? '基础版' : 
+          schoolDeatils.value.scale === 300 && schoolDeatils.value.size === 500 ?'标准版':schoolDeatils.value.size > 100 && (!res.school.service.includes('YMPCVCIM') && !res.school.service.includes('VLY6J6N6') && !res.school.service.includes('VABAJ6NV') )  ? '标准版':
+          res.school.service.includes('YMPCVCIM') || res.school.service.includes('VLY6J6N6') || res.school.service.includes('VABAJ6NV') ?'专业版':''
           //处理年级占比
           let Xdata = [];
           if (res.gradeCnt.length !== 0) {

+ 1 - 1
TEAMModelBI/ClientApp/src/view/teachermanage/manage.vue

@@ -98,7 +98,7 @@
         <el-tab-pane label="关联学校" name="second" v-if="nowUser.handleRoles.includes('assist') || nowUser.handleRoles.includes('admin')">
           <Correlation :userdata="nowUser"></Correlation>
         </el-tab-pane>
-        <el-tab-pane label="管理学校" name="manegeschool" v-if="nowUser.handleRoles.includes('admin')">
+        <el-tab-pane label="管理学校" name="manegeschool">
           <Manageschool :userdata="nowUser"></Manageschool>
         </el-tab-pane>
       </el-tabs>