qsh 1 month ago
parent 3d00a8f620
commit ef1ba0e84f
  1. 4
      src/permission.js
  2. 4
      src/views/Customer/Customer/index.vue
  3. 20
      src/views/Customer/ExamRecord/index.vue

@ -63,9 +63,9 @@ router.beforeEach(async (to, from, next) => {
const tenantId = getTenantId() const tenantId = getTenantId()
const appId = getAppId() const appId = getAppId()
if (tenantId && appId) { if (tenantId && appId) {
next(`/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页 next(`/tiku/login?tenantId=${tenantId}&appId=${appId}&redirect=${to.fullPath}`) // 否则全部重定向到登录页
} else { } else {
next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 next(`/tiku/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页
} }
} }
} }

@ -85,7 +85,7 @@
type="primary" type="primary"
link link
@click="openForm('update', scope.row)" @click="openForm('update', scope.row)"
v-hasPermi="['pers:employee:update']" v-hasPermi="['customer:customer:update']"
> >
修改 修改
</el-button> </el-button>
@ -93,7 +93,7 @@
type="primary" type="primary"
link link
@click="handleDelete(scope.row.userId)" @click="handleDelete(scope.row.userId)"
v-hasPermi="['pers:employee:delete']" v-hasPermi="['customer:customer:delete']"
> >
删除 删除
</el-button> </el-button>

@ -57,9 +57,12 @@
<el-date-picker <el-date-picker
v-model="searchForm.examTime" v-model="searchForm.examTime"
type="daterange" type="daterange"
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
range-separator="-" range-separator="-"
start-placeholder="考试日期" start-placeholder="考试日期"
end-placeholder="日期" end-placeholder="日期"
@change="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -96,9 +99,6 @@ import download from '@/utils/download'
import { getCustomerExamCarType } from '@/api/customer/customer.js' import { getCustomerExamCarType } from '@/api/customer/customer.js'
const message = useMessage() //
const { t } = useI18n() //
const carTypeOptions = ref([]) const carTypeOptions = ref([])
const searchForm = ref({ const searchForm = ref({
@ -130,8 +130,8 @@ const getList = async () => {
loading.value = true loading.value = true
try { try {
if (searchForm.value.examTime && searchForm.value.examTime.length > 0) { if (searchForm.value.examTime && searchForm.value.examTime.length > 0) {
searchForm.value.startTime = searchForm.value.examTime[0] searchForm.value.startTime = searchForm.value.examTime[0] + ' 00:00:00'
searchForm.value.endTime = searchForm.value.examTime[1] searchForm.value.endTime = searchForm.value.examTime[1] + ' 23:59:59'
} else { } else {
searchForm.value.startTime = undefined searchForm.value.startTime = undefined
searchForm.value.endTime = undefined searchForm.value.endTime = undefined
@ -147,20 +147,14 @@ const getList = async () => {
function handleExport() { function handleExport() {
const params = removeNullField(searchForm.value) const params = removeNullField(searchForm.value)
if (params.examTime && params.examTime.length > 0) { if (params.examTime && params.examTime.length > 0) {
params.startTime = params.examTime[0] params.startTime = params.examTime[0] + ' 00:00:00'
params.endTime = params.examTime[1] params.endTime = params.examTime[1] + ' 23:59:59'
} else { } else {
params.startTime = undefined params.startTime = undefined
params.endTime = undefined params.endTime = undefined
} }
ExamRecordApi.exportRecord(params).then((res) => { ExamRecordApi.exportRecord(params).then((res) => {
download.excel(res, '考试成绩.xls') download.excel(res, '考试成绩.xls')
// if (res.code === 200) {
// message.success('')
// } else {
// message.error(res.msg)
// }
}) })
} }
</script> </script>

Loading…
Cancel
Save