|
@@ -62,12 +62,16 @@
|
|
|
element-loading-spinner="el-icon-loading" element-loading-background="#ffffff">
|
|
element-loading-spinner="el-icon-loading" element-loading-background="#ffffff">
|
|
|
<el-table-column type="index" label="序号" fixed="left" align="center" />
|
|
<el-table-column type="index" label="序号" fixed="left" align="center" />
|
|
|
<el-table-column prop="tenantCode" label="学校编号" width="80" fixed="left" align="center" show-overflow-tooltip />
|
|
<el-table-column prop="tenantCode" label="学校编号" width="80" fixed="left" align="center" show-overflow-tooltip />
|
|
|
- <el-table-column prop="tenantName" label="学校名称" fixed="left" align="center" show-overflow-tooltip>
|
|
|
|
|
|
|
+ <el-table-column prop="tenantName" label="学校名称" width="160" fixed="left" align="center" show-overflow-tooltip>
|
|
|
<template #default="{row}">
|
|
<template #default="{row}">
|
|
|
- <span @click="GoTeach(row)" style="color: #2E64FA; cursor: pointer;">{{ row.tenantName }}</span>
|
|
|
|
|
|
|
+ <span @click="GoTeach(row)" class="text_color_blue" :class="row.status == 0 ? 'disabled_text' : ''">{{ row.tenantName }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="abbreviation" label="学校简称" width="120" align="center" show-overflow-tooltip>
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ {{ row.abbreviation || '-' }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="abbreviation" label="学校简称" width="160" align="center" show-overflow-tooltip />
|
|
|
|
|
<el-table-column prop="cityAndAreaName" label="区域" width="160" align="center" show-overflow-tooltip>
|
|
<el-table-column prop="cityAndAreaName" label="区域" width="160" align="center" show-overflow-tooltip>
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
{{ row.cityAndAreaName || '-' }}
|
|
{{ row.cityAndAreaName || '-' }}
|
|
@@ -103,16 +107,16 @@
|
|
|
<el-table-column label="操作" width="280" fixed="right" align="center">
|
|
<el-table-column label="操作" width="280" fixed="right" align="center">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<div class="table_row_option">
|
|
<div class="table_row_option">
|
|
|
- <span v-if="row.status == 0" class="button_delete" @click="ChangeStatus(row)">
|
|
|
|
|
|
|
+ <span v-if="row.status == 0" class="button_delete" @click="ChangeStatus(row, '解冻')">
|
|
|
解冻
|
|
解冻
|
|
|
</span>
|
|
</span>
|
|
|
- <span v-else class="button_editor text_color_orange" @click="ChangeStatus(row)">
|
|
|
|
|
|
|
+ <span v-else class="button_editor text_color_orange" @click="ChangeStatus(row, '冻结')">
|
|
|
冻结
|
|
冻结
|
|
|
</span>
|
|
</span>
|
|
|
<span class="button_editor" @click="EditUser(row)">编辑</span>
|
|
<span class="button_editor" @click="EditUser(row)">编辑</span>
|
|
|
<span class="button_editor" @click="OpenAuth(row)">权限</span>
|
|
<span class="button_editor" @click="OpenAuth(row)">权限</span>
|
|
|
<span class="button_editor" @click="resetPassWord(row)">重置密码</span>
|
|
<span class="button_editor" @click="resetPassWord(row)">重置密码</span>
|
|
|
- <span class="button_editor" @click="GoTeach(row)">进入学校</span>
|
|
|
|
|
|
|
+ <span class="button_editor" :class="row.status == 0 ? 'disabled_text' : ''" @click="GoTeach(row)">进入学校</span>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -136,6 +140,7 @@ import AuthConfig from '@/views/school/authConfig.vue'
|
|
|
import SubjectList from '@/views/school/subjectList.vue'
|
|
import SubjectList from '@/views/school/subjectList.vue'
|
|
|
import ResetPassword from '@/components/resetPassword.vue'
|
|
import ResetPassword from '@/components/resetPassword.vue'
|
|
|
import { Search } from '@element-plus/icons-vue'
|
|
import { Search } from '@element-plus/icons-vue'
|
|
|
|
|
+import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
import { getSchoolNumber, getSchoolList, changeStatus } from '@/api/school'
|
|
import { getSchoolNumber, getSchoolList, changeStatus } from '@/api/school'
|
|
|
import { ref, reactive, provide, onMounted } from 'vue'
|
|
import { ref, reactive, provide, onMounted } from 'vue'
|
|
|
interface UserNumber {
|
|
interface UserNumber {
|
|
@@ -150,6 +155,7 @@ const userNumber = ref<UserNumber>({
|
|
|
experienceUser: 0,
|
|
experienceUser: 0,
|
|
|
freezeUser: 0
|
|
freezeUser: 0
|
|
|
})
|
|
})
|
|
|
|
|
+// 定义列表数据类型
|
|
|
interface User {
|
|
interface User {
|
|
|
tenantCode: String;
|
|
tenantCode: String;
|
|
|
tenantName: String;
|
|
tenantName: String;
|
|
@@ -164,6 +170,7 @@ interface User {
|
|
|
sysUserName: String;
|
|
sysUserName: String;
|
|
|
cityAndAreaName: String;
|
|
cityAndAreaName: String;
|
|
|
}
|
|
}
|
|
|
|
|
+// 初始化列表数据
|
|
|
const tableData = ref<User[]>([])
|
|
const tableData = ref<User[]>([])
|
|
|
|
|
|
|
|
const schoolTypeSelect = ref<string>(" ")
|
|
const schoolTypeSelect = ref<string>(" ")
|
|
@@ -176,19 +183,21 @@ const dialogData = reactive({
|
|
|
tenantName: ''
|
|
tenantName: ''
|
|
|
})
|
|
})
|
|
|
const subjectShowDialog = ref(false)
|
|
const subjectShowDialog = ref(false)
|
|
|
|
|
+// 编辑权限传递参数
|
|
|
const authData = reactive({
|
|
const authData = reactive({
|
|
|
showDialog: false,
|
|
showDialog: false,
|
|
|
id: '',
|
|
id: '',
|
|
|
schoolName: '',
|
|
schoolName: '',
|
|
|
tenantCode: ''
|
|
tenantCode: ''
|
|
|
})
|
|
})
|
|
|
|
|
+// 重置密码弹窗数据
|
|
|
const passwordDialog = reactive({
|
|
const passwordDialog = reactive({
|
|
|
dialogShow: false,
|
|
dialogShow: false,
|
|
|
- id: '',
|
|
|
|
|
- type: '',
|
|
|
|
|
- name: '',
|
|
|
|
|
- label: '',
|
|
|
|
|
- remark: ''
|
|
|
|
|
|
|
+ id: '', // 学校id
|
|
|
|
|
+ type: '', // 学校状态
|
|
|
|
|
+ name: '', // 学校名称
|
|
|
|
|
+ label: '', // 名称label
|
|
|
|
|
+ remark: '' // 提示语
|
|
|
}) // 重置密码弹窗数据
|
|
}) // 重置密码弹窗数据
|
|
|
provide('showDialog', showDialog) // 新增用户弹窗是否展示
|
|
provide('showDialog', showDialog) // 新增用户弹窗是否展示
|
|
|
provide('dialogData', dialogData) // 新增用户弹窗数据
|
|
provide('dialogData', dialogData) // 新增用户弹窗数据
|
|
@@ -226,10 +235,10 @@ const OpenSubject = () => {
|
|
|
}
|
|
}
|
|
|
// 筛选项数据
|
|
// 筛选项数据
|
|
|
const searchData = ref({
|
|
const searchData = ref({
|
|
|
- provinceCode: '',
|
|
|
|
|
- cityCode: '',
|
|
|
|
|
- type: '',
|
|
|
|
|
- userId: ''
|
|
|
|
|
|
|
+ provinceCode: '', // 省份
|
|
|
|
|
+ cityCode: '', // 市
|
|
|
|
|
+ type: '', // 状态(正式/体验)
|
|
|
|
|
+ userId: '' // 运维人员
|
|
|
})
|
|
})
|
|
|
// 筛选项查询
|
|
// 筛选项查询
|
|
|
const FnSearch = (data: any) => {
|
|
const FnSearch = (data: any) => {
|
|
@@ -274,21 +283,31 @@ const RefTable = (val: any) => {
|
|
|
GetSchoolList()
|
|
GetSchoolList()
|
|
|
}
|
|
}
|
|
|
// 改变用户状态
|
|
// 改变用户状态
|
|
|
-const ChangeStatus = (row: any) => {
|
|
|
|
|
|
|
+const ChangeStatus = (row: any, text: String) => {
|
|
|
console.log(row)
|
|
console.log(row)
|
|
|
- changeStatus({
|
|
|
|
|
- id: row.id,
|
|
|
|
|
- status: row.status == 0 ? 1 : 0
|
|
|
|
|
- }).then((res: any) => {
|
|
|
|
|
- if(res.code == 200) {
|
|
|
|
|
- GetSchoolList()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ ElMessageBox.confirm(`是否${text}该学校?`, '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(async () => {
|
|
|
|
|
+ changeStatus({
|
|
|
|
|
+ id: row.id,
|
|
|
|
|
+ status: row.status == 0 ? 1 : 0
|
|
|
|
|
+ }).then((res: any) => {
|
|
|
|
|
+ if(res.code == 200) {
|
|
|
|
|
+ ElMessage.success(res.msg)
|
|
|
|
|
+ GetSchoolList()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
+// 进入学校
|
|
|
const GoTeach = (row: any) => {
|
|
const GoTeach = (row: any) => {
|
|
|
|
|
+ if(row.status == 0) return
|
|
|
let accessToken = localStorage.getItem('token')
|
|
let accessToken = localStorage.getItem('token')
|
|
|
window.open(`https://www.k12100.com/#/otherLogin?schoolId=${row.id}&adminToken=${accessToken}`)
|
|
window.open(`https://www.k12100.com/#/otherLogin?schoolId=${row.id}&adminToken=${accessToken}`)
|
|
|
}
|
|
}
|
|
|
|
|
+// 重置密码
|
|
|
const resetPassWord = (row: any) => {
|
|
const resetPassWord = (row: any) => {
|
|
|
passwordDialog.dialogShow = true
|
|
passwordDialog.dialogShow = true
|
|
|
passwordDialog.id = row.id
|
|
passwordDialog.id = row.id
|
|
@@ -297,6 +316,7 @@ const resetPassWord = (row: any) => {
|
|
|
passwordDialog.label = '学校名称'
|
|
passwordDialog.label = '学校名称'
|
|
|
passwordDialog.remark = '学校编号'
|
|
passwordDialog.remark = '学校编号'
|
|
|
}
|
|
}
|
|
|
|
|
+// 刷新
|
|
|
const Refresh = () => {
|
|
const Refresh = () => {
|
|
|
schoolTypeSelect.value = " "
|
|
schoolTypeSelect.value = " "
|
|
|
schoolNameCode.value = ""
|
|
schoolNameCode.value = ""
|
|
@@ -371,4 +391,12 @@ const Refresh = () => {
|
|
|
.button_editor.text_color_red {
|
|
.button_editor.text_color_red {
|
|
|
color: #F56C6C;
|
|
color: #F56C6C;
|
|
|
}
|
|
}
|
|
|
|
|
+.text_color_blue {
|
|
|
|
|
+ color: #2E64FA;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
|
|
+.disabled_text {
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ cursor: not-allowed;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|