0.0.2版本上线
This commit is contained in:
@@ -10,7 +10,10 @@ const storageEvent = function (e: StorageEvent) {
|
||||
if (e.key === "token") {
|
||||
Modal.warning({
|
||||
title: "警告消息",
|
||||
content: "登录用户在其他窗口发生改变,正在刷新浏览器"
|
||||
content: "登录用户在其他窗口发生改变,正在刷新浏览器",
|
||||
onOk: () => {
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,8 @@ import setupUserLoginInfoGuard from "./userLoginInfo"
|
||||
import setupPermissionGuard from "@/router/guard/permisstion"
|
||||
// 导入设置title的工具
|
||||
import { setRouteTitle } from "@/utils/title"
|
||||
// 为了已登录用户直接进入login
|
||||
import { useUserStore } from "@/store"
|
||||
|
||||
function setupPageGuard(router) {
|
||||
router.beforeEach(async (to) => {
|
||||
@@ -13,6 +15,17 @@ function setupPageGuard(router) {
|
||||
router.afterEach((to, from) => {
|
||||
setRouteTitle(to.meta.title)
|
||||
})
|
||||
// 设置如果已登录用户进入login页面则直接进入工作台
|
||||
router.beforeEach((to) => {
|
||||
const userStore = useUserStore()
|
||||
if (to.name === "login") {
|
||||
if (userStore.isLogin()) {
|
||||
return {
|
||||
name: "workplace"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default function createRouteGuard(router) {
|
||||
|
||||
@@ -5,6 +5,7 @@ export default function setupUserLoginInfoGuard(router) {
|
||||
router.beforeEach(async (to, from) => {
|
||||
NProgress.start()
|
||||
const userStore = useUserStore()
|
||||
// 如果用户已经登录
|
||||
if (userStore.isLogin()) {
|
||||
if (userStore.role) {
|
||||
return
|
||||
|
||||
@@ -27,6 +27,8 @@ const changeStatusWrapper = (record) => {
|
||||
const res = await userApi.changeUserStatus({ user_status: newVal, userId: record.id })
|
||||
if (res.data) {
|
||||
Message.success(res.data === "1" ? "启用成功" : "禁用成功")
|
||||
// 重新刷新页面保持数据一致性
|
||||
crudRef.value.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,11 +36,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="jsx">
|
||||
// 本组件位置:1.在右键轮次问题单 2.用例界面关联问题单
|
||||
import { ref } from "vue"
|
||||
import problemApi from "@/api/project/problem"
|
||||
import problemSingleApi from "@/api/project/singleProblem"
|
||||
import { Message, Notification } from "@arco-design/web-vue"
|
||||
import { useRoute, useRouter } from "vue-router"
|
||||
import { Notification } from "@arco-design/web-vue"
|
||||
import { useRoute } from "vue-router"
|
||||
import CaseModal from "./CaseModal.vue"
|
||||
import useTreeStore from "@/store/project/treeData"
|
||||
const route = useRoute()
|
||||
@@ -455,7 +456,6 @@ const columns = ref([
|
||||
hide: true,
|
||||
dataIndex: "designerPerson",
|
||||
formType: "input",
|
||||
commonRules: [{ required: true, message: "开发人员必填" }]
|
||||
},
|
||||
{
|
||||
title: "开发方日期",
|
||||
@@ -468,7 +468,6 @@ const columns = ref([
|
||||
hide: true,
|
||||
dataIndex: "verifyPerson",
|
||||
formType: "select",
|
||||
commonRules: [{ required: true, message: "回归人" }],
|
||||
dict: {
|
||||
url: "system/user/list",
|
||||
params: { project_id: route.query.id },
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
// 本组件是在:测试项页面 -> 显示用例关联的问题单
|
||||
import { ref, reactive } from "vue"
|
||||
import { IProps } from "./problemFormTypes"
|
||||
import { useRoute } from "vue-router"
|
||||
@@ -178,13 +179,11 @@ const columnsOptions = reactive([
|
||||
title: "开发人员",
|
||||
dataIndex: "designerPerson",
|
||||
formType: "input",
|
||||
rules: [{ required: true, message: "开发人员必填" }]
|
||||
},
|
||||
{
|
||||
title: "回归人员",
|
||||
dataIndex: "verifyPerson",
|
||||
formType: "select",
|
||||
rules: [{ required: true, message: "回归人" }],
|
||||
dict: {
|
||||
url: "system/user/list",
|
||||
translation: true,
|
||||
|
||||
@@ -286,7 +286,6 @@ const crudColumns = ref([
|
||||
props: { label: "title", value: "key" }
|
||||
},
|
||||
customRender: ({ record }) => {
|
||||
console.log(record.closeMethod)
|
||||
// 判断是否具有1:修改文档
|
||||
if (!record.closeMethod.hasOwnProperty("0")) {
|
||||
if (!record.closeMethod.hasOwnProperty("1")) {
|
||||
|
||||
@@ -42,7 +42,6 @@ const handleBeforeCancel = () => {
|
||||
if (!beforeFormStep) {
|
||||
return
|
||||
}
|
||||
console.log(beforeFormStep)
|
||||
crudRef.value.getFormData().testStep
|
||||
const iuEqualValue = isEqual(crudRef.value.getFormData().testStep, beforeFormStep)
|
||||
!iuEqualValue &&
|
||||
|
||||
@@ -28,27 +28,27 @@
|
||||
</p>
|
||||
<p>
|
||||
<a-link :disabled="isGenerating" :loading="isJlloading" @click="createJLItem(record)">
|
||||
记录二级文档
|
||||
记录二段文档
|
||||
</a-link>
|
||||
</p>
|
||||
<p>
|
||||
<a-link :disabled="isGenerating" :loading="isBgLoading" @click="createBgItem(record)">
|
||||
报告二级文档
|
||||
报告二段文档
|
||||
</a-link>
|
||||
</p>
|
||||
<p>
|
||||
<a-link :disabled="isGenerating" :loading="ishsmLoading" @click="createHsmItem(record)">
|
||||
回归说明二级文档
|
||||
回归说明二段文档
|
||||
</a-link>
|
||||
</p>
|
||||
<p>
|
||||
<a-link :disabled="isGenerating" :loading="ishjlLoading" @click="createHjlItem(record)">
|
||||
回归记录二级文档
|
||||
回归记录二段文档
|
||||
</a-link>
|
||||
</p>
|
||||
<p>
|
||||
<a-link :disabled="isGenerating" :loading="isWtdLoading" @click="createWtdItem(record)">
|
||||
问题单二级文档
|
||||
问题单二段文档
|
||||
</a-link>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user