Commit 1a860758 by 李宁

1

1 parent 415edb68
......@@ -539,5 +539,4 @@
2、设备不能拍次数统计导出:传参(startTime,endTime),接口地址:/zhijian/opt/exportNoShowProcessStatistics,get请求
问题记录
1、质检工单数据页面:导出表格,报错500(传参加上areaType可以成功)
2、
\ No newline at end of file
1、
\ No newline at end of file
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>web-admin</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>web-admin</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
\ No newline at end of file
<script setup lang="ts">
import { useRoute, useRouter } from 'vue-router'
import { Menu as IconMenu, DataLine, Document } from '@element-plus/icons-vue'
import { DataLine, Document } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
import { loginApi } from '../api'
const route = useRoute()
const router = useRouter()
const handleLogout = () => {
ElMessage.success('退出登录成功')
router.push('/login')
const handleLogout = async () => {
ElMessage.success('退出登录成功')
router.push('/login')
return
try {
await loginApi.logout()
ElMessage.success('退出登录成功')
router.push('/login')
} catch (error) {
console.error(error)
}
}
</script>
......
......@@ -15,7 +15,10 @@ export const generateMockOrders = (count: number = 20): Order[] => {
applyId: `APP${10000 + index}`,
workerId: `W${2000 + index}`,
businessAccount: `1${Math.floor(Math.random() * 10000000000)}`,
orderIds: [`ORD_${index}_1`, `ORD_${index}_2`],
orderIds: [
{ orderCode: `ORD_${index}_1`, deviceNumber: `DEV_${index}_1` },
{ orderCode: `ORD_${index}_2`, deviceNumber: `DEV_${index}_2` }
],
city: city,
status: status,
cannotQcReason: status === '无法质检' ? '用户拒绝配合' : undefined,
......
import { createRouter, createWebHistory } from 'vue-router'
import { createRouter, createWebHashHistory } from 'vue-router'
import DefaultLayout from '../layouts/DefaultLayout.vue'
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
history: createWebHashHistory(import.meta.env.BASE_URL),
routes: [
{
path: '/',
......
......@@ -40,9 +40,9 @@ service.interceptors.response.use(
localStorage.removeItem('hzMgrtoken')
// 延迟跳转到登录页
setTimeout(() => {
window.location.href = '/login'
}, 1500)
// setTimeout(() => {
// window.location.href = '/login'
// }, 1000)
return Promise.reject(new Error(errorData.msg || errorData.message || '登录已失效'))
}
......@@ -69,9 +69,9 @@ service.interceptors.response.use(
localStorage.removeItem('hzMgrtoken')
// 延迟跳转到登录页,让用户看到提示信息
setTimeout(() => {
window.location.href = '/login'
}, 1500)
// setTimeout(() => {
// window.location.href = '/login'
// }, 1500)
return Promise.reject(new Error(res.msg || res.message || '登录已失效'))
}
......
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router'
import { User, Lock, View, Hide } from '@element-plus/icons-vue'
import { User, Lock } from '@element-plus/icons-vue'
import { ElMessage } from 'element-plus'
const router = useRouter()
......@@ -37,7 +37,7 @@ const handleLogin = async (formEl: any) => {
ElMessage.success('登录成功')
// Save token if available in res.data or res.token
if(res.data) {
localStorage.setItem('hzMgrtoken', res.data.token || '')
localStorage.setItem('hzMgrtoken', res.data.token || '')
}
router.push('/order-list')
} else {
......
......@@ -9,7 +9,21 @@ import { ElMessage, ElMessageBox } from 'element-plus'
// --- State ---
const loading = ref(false)
const tableData = ref<Order[]>([])
const cities = ['南京市', '无锡市', '徐州市', '常州市', '苏州市', '南通市', '连云港市', '淮安市', '盐城市', '扬州市', '镇江市', '泰州市', '宿迁市']
const cities = [
{ code: '3201', name: '南京市' },
{ code: '3202', name: '无锡市' },
{ code: '3203', name: '徐州市' },
{ code: '3204', name: '常州市' },
{ code: '3205', name: '苏州市' },
{ code: '3206', name: '南通市' },
{ code: '3207', name: '连云港市' },
{ code: '3208', name: '淮安市' },
{ code: '3209', name: '盐城市' },
{ code: '3210', name: '扬州市' },
{ code: '3211', name: '镇江市' },
{ code: '3212', name: '泰州市' },
{ code: '3213', name: '宿迁市' }
]
const router = useRouter()
// Search Form
......@@ -495,7 +509,7 @@ fetchData()
</el-form-item>
<el-form-item label="所属地市">
<el-select v-model="queryForm.city" placeholder="请选择" clearable class="!w-48">
<el-option v-for="city in cities" :key="city" :label="city" :value="city" />
<el-option v-for="city in cities" :key="city.code" :label="city.name" :value="city.code" />
</el-select>
</el-form-item>
<el-form-item label="质检状态">
......
......@@ -3,6 +3,7 @@ import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
base: './',
plugins: [vue()],
server: {
proxy: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!