Pārlūkot izejas kodu

打包错误修改

zhangguohua 1 gadu atpakaļ
vecāks
revīzija
2077417d82

+ 0 - 1
src/layout/components/header.vue

@@ -56,7 +56,6 @@ import { ref, reactive, computed } from 'vue'
 import { loginOut, changePassWord } from '@/api/login'
 import { ElMessage } from 'element-plus'
 import type { FormInstance, FormRules } from 'element-plus'
-import ResetPassword from '@/components/resetPassword.vue'
 const userInfo = computed(() => {
   const user = localStorage.getItem('userInfo')
   if (user) {

+ 4 - 4
src/store/index.ts

@@ -1,12 +1,12 @@
-import { createStore } from 'vuex' 
-import type { ActionContext } from 'vuex'
+import { createStore } from 'vuex'
+// import { ActionContext } from 'vuex'
 import type { App } from 'vue'
 
 // 定义 RootState 接口(可扩展)
 interface RootState {
   count: number
 }
-type StoreActionContext = ActionContext<RootState, RootState>
+// type StoreActionContext = ActionContext<RootState, RootState>
 // 创建 store 实例
 const store = createStore<RootState>({
   state: () => ({
@@ -18,7 +18,7 @@ const store = createStore<RootState>({
     }
   },
   actions: {
-    increment({ commit }: StoreActionContext) {
+    increment({ commit }) {
       commit('increment')
     }
   },

+ 3 - 0
src/styles/common.scss

@@ -1311,6 +1311,9 @@ body {
     line-height: 36px;
     color: #666666;
   }
+  .el-radio-button.is-active .el-radio-button__original-radio:not(:disabled)+.el-radio-button__inner {
+    background: #2E64FA;
+  }
   .el-radio-button__orig-radio:checked + .el-radio-button__inner {
     color: #fff !important;
   }

+ 0 - 3
src/views/examination/addSchool.vue

@@ -65,9 +65,6 @@ import { ElMessage, ElTable } from 'element-plus'
 import { ref, inject, onMounted, nextTick } from 'vue'
 import { getSingleExamList, addSingleSchool } from '@/api/examination'
 import { provinceTree } from '@/api/school'
-interface SchoolDataItem {
-  id: string
-}
 interface SchoolData {
   showDialog: boolean
   tenantName: string

+ 4 - 4
src/views/examination/index.vue

@@ -123,7 +123,7 @@ interface SchoolItem {
   childrenCount?: number;
   children?: SchoolItem[];
 }
-const selectRow = ref<SchoolItem | null>({
+const selectRow = ref<SchoolItem>({
   id: '',
   tenantCode: '',
   tenantName: '',
@@ -139,9 +139,9 @@ onMounted(() => {
 const handleRowClick = (row: any) => {
   console.log(row)
   selectRow.value = row
-  selectListId.value = selectRow.value?.children.map(item => (item.tenantCode))
+  selectListId.value = selectRow.value?.children?.map(item => (item.tenantCode))?? []
 }
-const selectListId = ref([])
+const selectListId = ref<string[]>([])
 provide('selectListId', selectListId)
 const GetJoinExamList = () => {
   console.log(schooltName.value)
@@ -150,7 +150,7 @@ const GetJoinExamList = () => {
     if(res.code == 200) {
       tableData.value = res.data
       selectRow.value = tableData.value[0]
-      selectListId.value = selectRow.value?.children.map(item => (item.tenantCode))
+      selectListId.value = selectRow.value?.children?.map(item => (item.tenantCode))?? []
     }
     tableLoading.value = false
   }).catch(() => {

+ 5 - 1
src/views/manager/addAdmin.vue

@@ -48,7 +48,11 @@ interface DialogData {
   id: string
 }
 let emit = defineEmits(['update'])
-let dialogData = inject<DialogData>('dialogData')
+let dialogData = inject<DialogData>('dialogData', {
+  showDialog: false,
+  pageType: 'add',
+  id: ''
+})
 // 新增用户表单数据定义
 interface UserForm {
   id: string

+ 27 - 9
src/views/school/addUser.vue

@@ -209,9 +209,20 @@ interface District {
 // 省份列表
 const provinceTreeList = ref<Province[]>([])
 // 市列表
-const cityTreeList = ref<City[]>([])
+const cityTreeList = ref<City[]>([
+  {
+    cityCode: '',
+    cityName: '',
+    children: []
+  }
+])
 // 区/县列表
-const areaList = ref<District[]>([])
+const areaList = ref<District[]>([
+  {
+    districtCode: '',
+    districtName: ''
+  }
+])
 interface User {
   id: string
   nickname: string
@@ -233,10 +244,12 @@ const GetUserDetail = () => {
     if(res.code == 200 && res.data) {
       const { data } = res
       if(data.provinceCode) {
-        cityTreeList.value = provinceTreeList.value.find(item => item.provinceCode == data.provinceCode).children
+        let list = provinceTreeList.value.find(item => item.provinceCode == data.provinceCode)
+        cityTreeList.value = list?.children ?? []
       }
       if(data.cityCode) {
-        areaList.value = cityTreeList.value.find(item => item.cityCode == data.cityCode).children
+        let list = cityTreeList.value.find(item => item.cityCode == data.cityCode)
+        areaList.value = list?.children ?? []
       }
       userForm.id = data.id
       userForm.tenantName = data.tenantName
@@ -281,8 +294,10 @@ const GetProvinceTree = (): Promise<void> => {
 // 选择省份
 const handleProvinceChange = (val: any) => {
   userForm.provinceCode = val
-  userForm.provinceName = provinceTreeList.value.find(item => item.provinceCode == val)?.provinceName
-  cityTreeList.value = provinceTreeList.value.find(item => item.provinceCode == val)?.children
+  let name = provinceTreeList.value.find(item => item.provinceCode == val)
+  userForm.provinceName = name?.provinceName ?? ''
+  let list = provinceTreeList.value.find(item => item.provinceCode == val)
+  cityTreeList.value = list?.children ?? []
   areaList.value = []
   userForm.cityCode = ''
   userForm.areaCode = ''
@@ -290,14 +305,17 @@ const handleProvinceChange = (val: any) => {
 // 选择市
 const handleCityChange = (val: any) => {
   userForm.cityCode = val
-  userForm.cityName = cityTreeList.value.find(item => item.cityCode == val)?.cityName
-  areaList.value = cityTreeList.value.find(item => item.cityCode == val)?.children
+  let city = cityTreeList.value.find(item => item.cityCode == val)
+  userForm.cityName = city?.cityName ?? ''
+  let list = cityTreeList.value.find(item => item.cityCode == val)
+  areaList.value = list?.children ?? []
   userForm.areaCode = ''
 }
 // 选择区/县
 const handleAreaChange = (val: any) => {
   userForm.areaCode = val
-  userForm.areaName = areaList.value.find(item => item.districtCode == val)?.districtName
+  let name = areaList.value.find(item => item.districtCode == val)
+  userForm.areaName = name?.districtName ?? ''
 }
 // 上传学校logo
 const UploadLogo = (file: any) => {

+ 6 - 4
src/views/school/authConfig.vue

@@ -11,7 +11,7 @@
       <div v-if="authType == '1'" class="grade_content">
         <div v-for="(grade, index) in gradeList" :key="grade.levelCode" class="grade_level">
           <el-checkbox v-model="checkAll[index]" :indeterminate="!checkAll[index] && selectedGrades[index]?.length > 0" :label="grade.levelName" @click="CheckAllChange(index)" />
-          <el-checkbox-group v-model="selectedGrades[index]" @change="val =>handleGradeChange(index, val)">
+          <el-checkbox-group v-model="selectedGrades[index]" @change="(val: string[]) => handleGradeChange(val, index)">
             <el-checkbox v-for="item in grade.gradeList" :key="item.gradeCode" :label="item.gradeName" :value="item.gradeCode" />
           </el-checkbox-group>
           <!-- <div>
@@ -21,8 +21,8 @@
       </div>
     </div>
     <template #footer>
-      <el-button @click="authData.showDialog = false">取消</el-button>
-      <el-button type="primary" :loading="submitLoading" @click="SubmitForm">确定</el-button>
+      <el-button class="button_border_gray cancel" @click="authData.showDialog = false">取消</el-button>
+      <el-button class="button_background" :loading="submitLoading" @click="SubmitForm">确定</el-button>
     </template>
   </el-dialog>
 </template>
@@ -94,7 +94,9 @@ const CheckAllChange = (index: number) => {
     selectedGrades.value[index] = []
   }
 }
-const handleGradeChange = (index: number, val: string[]) => {
+const handleGradeChange = (val: any[], index: number) => {
+  console.log(index)
+  console.log(val)
   if(gradeList.value[index].gradeList.length == val.length) {
     checkAll.value[index] = true
   } else if(val.length == 0) {

+ 1 - 1
src/views/school/index.vue

@@ -91,7 +91,7 @@
                 </div>
               </template>
             </el-table-column>
-            <el-table-column prop="sysUserName" label="运维人员" align="center">
+            <el-table-column prop="sysUserName" label="运维人员" align="center" show-overflow-tooltip>
               <template #default="{ row }">
                 {{ row.sysUserName ||  '-' }}
               </template>

+ 2 - 2
tsconfig.app.json

@@ -1,8 +1,8 @@
 {
-  "extends": "@vue/tsconfig/tsconfig.dom.json",
+  "extends": "./tsconfig.json",
   "compilerOptions": {
     "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
-
+    "outDir": "./dist",
     /* Linting */
     "strict": true,
     "noUnusedLocals": true,

+ 1 - 1
tsconfig.json

@@ -6,7 +6,7 @@
   ],
   "compilerOptions": {
     "moduleResolution": "node",
-    "types": ["vite/env", "vuex"],
+    "types": ["vuex"],
     "baseUrl": "./",
     "paths": {
       "@/*": ["src/*"]

+ 1 - 0
vite.config.ts

@@ -22,6 +22,7 @@ export default defineConfig({
       // },
       '/adminApi':{
         target:'https://dev3.k12100.net/admin/adminApi',
+        // target:'http://192.168.1.61:47002/adminApi',
         changeOrigin:true,
         rewrite:path => path.replace(/^\/adminApi/, '')
       }