From 5e6fd1420f45fdaaa0896f5a604da5631c71e772 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Sat, 14 Sep 2024 16:44:45 +0800
Subject: [PATCH] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8D=E6=A0=87=E7=AD=BE?=
=?UTF-8?q?=E5=85=B3=E9=97=ADbug,=20=E8=A1=A8=E6=A0=BC=E7=BB=84=E4=BB=B6?=
=?UTF-8?q?=E5=88=97=E9=85=8D=E7=BD=AE,=20=E5=AE=8C=E5=96=84=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 2 +-
package.json | 2 +-
src/components/Tag.vue | 1 -
src/directives/permission.js | 3 +-
src/fvcomponents/fvForm/index.vue | 7 +-
src/fvcomponents/fvFormDialog/index.vue | 62 ++
src/fvcomponents/fvRadio/index.vue | 2 +-
src/fvcomponents/fvSearchForm/index.vue | 29 +-
src/fvcomponents/fvTable/index.vue | 254 +++++++--
src/fvcomponents/fvTableColumn/index.vue | 2 +-
src/layout/siderbar/MenuItem.vue | 20 +-
src/layout/tagsview/index.vue | 4 +-
src/stores/processStore.js | 7 +-
src/stores/tagsview.js | 31 +-
src/utils/request.js | 8 +-
src/views/login/index.vue | 2 +-
src/views/system/user/index.vue | 688 +++++++----------------
17 files changed, 537 insertions(+), 587 deletions(-)
create mode 100644 src/fvcomponents/fvFormDialog/index.vue
diff --git a/index.html b/index.html
index 691191c..a40db35 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
SmartOpsWeb
+ 智能语音服务系统
diff --git a/package.json b/package.json
index 84b464a..4fe46a5 100644
--- a/package.json
+++ b/package.json
@@ -10,7 +10,7 @@
"dependencies": {
"axios": "^1.4.0",
"echarts": "^5.4.2",
- "element-plus": "^2.3.5",
+ "element-plus": "^2.6.0",
"highlight.js": "9.18.5",
"js-cookie": "^3.0.5",
"nprogress": "^0.2.0",
diff --git a/src/components/Tag.vue b/src/components/Tag.vue
index 86985ea..e50abbd 100644
--- a/src/components/Tag.vue
+++ b/src/components/Tag.vue
@@ -31,7 +31,6 @@ const props = defineProps({
const tagConfig = ref({})
const filterDict = (data, value) => {
- console.log(value + "aaa",!data || !value)
if (!data || value == null) return
if (data instanceof Array) {
if (value == true || value == false) {
diff --git a/src/directives/permission.js b/src/directives/permission.js
index 65509b9..461c9c7 100644
--- a/src/directives/permission.js
+++ b/src/directives/permission.js
@@ -10,11 +10,10 @@ export const hasPerm = (el, binding, vnode) => {
const hasPermission = permisstions.some(permission => {
return allPermission === permission || permissiosFlag.includes(permission)
})
- console.log(hasPermission);
if (!hasPermission) {
el.parentNode && el.parentNode.removeChild(el)
}
} else {
throw new Error('操作权限标识应为string[]')
}
-}
\ No newline at end of file
+}
diff --git a/src/fvcomponents/fvForm/index.vue b/src/fvcomponents/fvForm/index.vue
index a04d2ae..fa39e52 100644
--- a/src/fvcomponents/fvForm/index.vue
+++ b/src/fvcomponents/fvForm/index.vue
@@ -11,12 +11,12 @@
v-bind="item.colProps || { span: 12}"
:key="item.prop"
>
-
- {
})
})
-console.log(filterSchma.value, 'filterSchma');
const validate = async () => {
let validObj = {}
@@ -106,4 +105,4 @@ defineExpose({ getValues, setValues, validate, resetFields, formInstance, form }
\ No newline at end of file
+
diff --git a/src/fvcomponents/fvFormDialog/index.vue b/src/fvcomponents/fvFormDialog/index.vue
new file mode 100644
index 0000000..05eea47
--- /dev/null
+++ b/src/fvcomponents/fvFormDialog/index.vue
@@ -0,0 +1,62 @@
+
+
+ baseForm = e" label-position="right" :rules="localDialogParams.localFormRules">
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
diff --git a/src/fvcomponents/fvRadio/index.vue b/src/fvcomponents/fvRadio/index.vue
index ea6e821..9575f2a 100644
--- a/src/fvcomponents/fvRadio/index.vue
+++ b/src/fvcomponents/fvRadio/index.vue
@@ -15,7 +15,7 @@ const props = defineProps({
default: []
},
modelValue: {
- type: [Number, String],
+ type: [Number, String, Boolean],
default: ''
},
cacheKey: {
diff --git a/src/fvcomponents/fvSearchForm/index.vue b/src/fvcomponents/fvSearchForm/index.vue
index 72a543f..533f409 100644
--- a/src/fvcomponents/fvSearchForm/index.vue
+++ b/src/fvcomponents/fvSearchForm/index.vue
@@ -28,7 +28,8 @@
-
+
+
{{ showMore ? '收起' : '展开' }}
@@ -65,21 +66,25 @@ const filterConfig = computed(()=>{
return arr.length >= 4 && showMore.value ? arr : arr.slice(0, 3)
})
-console.log(filterConfig.value, 'filterConfig');
-
// 搜索功能表单元素默认值
-const setDefaultFormValues = () => {
- filterConfig.value.forEach(item=>{
- form.value[item.prop] = item.props.defaultValue || null
- })
-}
+// const setDefaultFormValues = () => {
+// filterConfig.value.forEach(item => {
+// form.value[item.prop] = item.props?.defaultValue || null
+// })
+// }
-watchEffect(()=>{
- if(filterConfig.value.length) {
- setDefaultFormValues()
+watchEffect(() => {
+ if (filterConfig.value.length) {
+ // setDefaultFormValues()
}
})
+const elChange = () => {
+ setTimeout(() => {
+ getValues()
+ }, 500)
+}
+
const getValues = () => {
emits('search', form.value)
return form.value
@@ -88,7 +93,7 @@ const getValues = () => {
//重置
const handleReset = () => {
form.value = {}
- setDefaultFormValues()
+ // setDefaultFormValues()
emits('search', form.value)
}
diff --git a/src/fvcomponents/fvTable/index.vue b/src/fvcomponents/fvTable/index.vue
index 8833ea9..a0edf10 100644
--- a/src/fvcomponents/fvTable/index.vue
+++ b/src/fvcomponents/fvTable/index.vue
@@ -2,35 +2,74 @@
-
- {{ btn.name }}
-
+
+
+ {{ btn.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -47,23 +86,24 @@
-
+
\ No newline at end of file
+.col-setting-list {
+ max-height: 45vh;
+ overflow-y: auto;
+}
+
+.table-head-btn {
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+}
+
+.fv-table-btn {
+ display: flex;
+ justify-content: space-between;
+ align-content: center;
+}
+
+.fv-table {
+ :deep(.el-tooltip) {
+ width: 100% !important;
+ }
+}
+
diff --git a/src/fvcomponents/fvTableColumn/index.vue b/src/fvcomponents/fvTableColumn/index.vue
index 243a370..c57c4cf 100644
--- a/src/fvcomponents/fvTableColumn/index.vue
+++ b/src/fvcomponents/fvTableColumn/index.vue
@@ -49,7 +49,7 @@ import { isVNode } from 'vue'
if(column && column?.formatter) {
return column.formatter(row, column, value, $index) || '--'
}
- return value ? value.toString() : '--'
+ return value !== null && value !== undefined ? value.toString() : '--'
}
diff --git a/src/layout/siderbar/MenuItem.vue b/src/layout/siderbar/MenuItem.vue
index cb9f4db..f6c285e 100644
--- a/src/layout/siderbar/MenuItem.vue
+++ b/src/layout/siderbar/MenuItem.vue
@@ -1,7 +1,7 @@
-
+
{{ item.title }}
@@ -17,7 +17,9 @@
-
+
+
+
{{ item.title }}
@@ -44,5 +46,19 @@ const handleGo = (path) => {
}
}
+const checkMenuItem = (item) => {
+ let children = item.children
+ let childState = false;
+ if (children){
+ for (let child of children) {
+ if (!child.hidden) {
+ childState = true
+ break
+ }
+ }
+ }
+ return item?.children?.length>0 && !item.hidden && childState
+}
+
diff --git a/src/layout/tagsview/index.vue b/src/layout/tagsview/index.vue
index 2f1e438..720d229 100644
--- a/src/layout/tagsview/index.vue
+++ b/src/layout/tagsview/index.vue
@@ -4,7 +4,7 @@
@@ -83,7 +83,7 @@ init()
border: 1px solid darkgray;
font-size: 13px;
margin-right: 8px;
- border-radius: 4px;
+ border-radius: 6px;
background-color: #fff;
}
diff --git a/src/stores/processStore.js b/src/stores/processStore.js
index a882029..b62d4ff 100644
--- a/src/stores/processStore.js
+++ b/src/stores/processStore.js
@@ -35,13 +35,12 @@ export const useProcessStore = defineStore('process', () => {
}
const addProcess = (val) => {
- console.log("添加节点成功")
processData.value.process.push(val)
}
const delProcess = (delNode) => {
processData.value.process.splice(processData.value.process.indexOf(delNode), 1)
- console.log("删除数据")
- console.log(processData.value.process)
+ // console.log("删除数据")
+ // console.log(processData.value.process)
}
const getDesign = () => {
@@ -60,7 +59,7 @@ export const useProcessStore = defineStore('process', () => {
const getFormMap = () => {
//表单映射对象
const map = new Map();
- processData.value.formItems.forEach(item => itemToMap(map, item))
+ processData.value.formItems?.forEach(item => itemToMap(map, item))
return map
}
diff --git a/src/stores/tagsview.js b/src/stores/tagsview.js
index bcd8706..1dc858b 100644
--- a/src/stores/tagsview.js
+++ b/src/stores/tagsview.js
@@ -1,20 +1,21 @@
import { defineStore } from "pinia";
import { ref } from "vue";
-import { useRouter } from "vue-router";
+import { useRouter, useRoute } from "vue-router";
export const useTagsView = defineStore('tagsView',()=>{
const router = useRouter()
+ const route = useRoute()
//已显示的标签页list
const visitedViews = ref([])
//添加标签页面
- const addVisitedViews = ({path,meta}) => {
+ const addVisitedViews = ({path,meta,query}) => {
if(visitedViews.value.length == 0) {
- visitedViews.value.push({path,meta})
+ visitedViews.value.push({path,meta,query})
}else {
const paths = visitedViews.value.map(item => item.path)
if(paths.includes(path) == false) {
- visitedViews.value.push({path,meta})
+ visitedViews.value.push({path,meta,query})
}
}
}
@@ -32,17 +33,31 @@ export const useTagsView = defineStore('tagsView',()=>{
toLastTagView(visitedViews)
}
+ //删除当前标签页并跳转到指定路由
+ const delViewAndGoView = (path) => {
+ visitedViews.value.forEach((item,index)=>{
+ if(item.path == route.path) {
+ visitedViews.value.splice(index,1)
+ }
+ })
+ router.push(path)
+ }
+
//删除其他标签页
- const delOtherVisitedViews = ({path,meta}) => {
+ const delOtherVisitedViews = ({path,meta,query}) => {
visitedViews.value = []
- visitedViews.value.push({path,meta})
+ visitedViews.value.push({path,meta,query})
toLastTagView(visitedViews)
}
//路由到末尾标签页
const toLastTagView = (view) => {
const lastTagView = view.value.slice(-1)[0]
- router.push(lastTagView.path)
+ router.push({path: lastTagView.path, query: lastTagView.query})
+ }
+
+ const removeAllTagView = () => {
+ visitedViews.value.length = 0
}
return {
@@ -50,5 +65,7 @@ export const useTagsView = defineStore('tagsView',()=>{
addVisitedViews,
delVisitedViews,
delOtherVisitedViews,
+ delViewAndGoView,
+ removeAllTagView
}
})
diff --git a/src/utils/request.js b/src/utils/request.js
index cb2fab9..a0764b0 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -32,8 +32,14 @@ serveice.interceptors.response.use(response=>{
return response.data
},error=>{
let response = error.response
+ if (!response) {
+ return Promise.reject()
+ }
const status = response.status;
- switch(status) {
+ if (!status) {
+ return Promise.reject()
+ }
+ switch (status) {
case 401:
ElMessageBox.confirm('登录状态已过期,请重新登录','系统提示',{
confirmButtonText: '重新登录',
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index d88a06c..c20e82a 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -6,7 +6,7 @@
:rules="rules"
label-width="70px"
>
- 工单管理系统
+ 智能语音服务系统
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 6944b58..58c5ff8 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1,318 +1,76 @@
-
-
-
-
-
-
-
-
-
-
- {{ node.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ user.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 取消
- 确定
-
-
-
-
-
-
+
+
+