diff --git a/.vscode/settings.json b/.vscode/settings.json index 8d07138..ef6d879 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,7 +8,7 @@ "source.fixAll.eslint": "explicit" }, "[vue]": { - "editor.defaultFormatter": "Vue.volar" + "editor.defaultFormatter": "rvest.vs-code-prettier-eslint" }, "[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" diff --git a/src/api/call/index.js b/src/api/call/index.js new file mode 100644 index 0000000..a987a27 --- /dev/null +++ b/src/api/call/index.js @@ -0,0 +1,13 @@ +import request from '@/config/axios' + +export default { + callLogin(data) { + return request.post({ url: '/call-api/openapi/V2.0.4/agentLogin', data }) + }, + callUserStatus(data) { + return request.post({ url: '/call-api/openapi/V2.0.4/getAgentStatus', data }) + }, + callNumber(data) { + return request.post({ url: '/call-api/openapi/V2.0.4/callNumber', data }) + } +} diff --git a/src/assets/imgs/flag/flag_black.png b/src/assets/imgs/flag/flag_black.png new file mode 100644 index 0000000..0791062 Binary files /dev/null and b/src/assets/imgs/flag/flag_black.png differ diff --git a/src/assets/imgs/flag/flag_blue.png b/src/assets/imgs/flag/flag_blue.png new file mode 100644 index 0000000..78528e7 Binary files /dev/null and b/src/assets/imgs/flag/flag_blue.png differ diff --git a/src/assets/imgs/flag/flag_green.png b/src/assets/imgs/flag/flag_green.png new file mode 100644 index 0000000..e5b98ba Binary files /dev/null and b/src/assets/imgs/flag/flag_green.png differ diff --git a/src/assets/imgs/flag/flag_purple.png b/src/assets/imgs/flag/flag_purple.png new file mode 100644 index 0000000..8b80c04 Binary files /dev/null and b/src/assets/imgs/flag/flag_purple.png differ diff --git a/src/assets/imgs/flag/flag_yellow.png b/src/assets/imgs/flag/flag_yellow.png new file mode 100644 index 0000000..dd2887d Binary files /dev/null and b/src/assets/imgs/flag/flag_yellow.png differ diff --git a/src/assets/imgs/flag/position_black.png b/src/assets/imgs/flag/position_black.png new file mode 100644 index 0000000..8e83901 Binary files /dev/null and b/src/assets/imgs/flag/position_black.png differ diff --git a/src/assets/imgs/flag/position_green.png b/src/assets/imgs/flag/position_green.png new file mode 100644 index 0000000..e8f80cf Binary files /dev/null and b/src/assets/imgs/flag/position_green.png differ diff --git a/src/assets/imgs/flag/position_purple.png b/src/assets/imgs/flag/position_purple.png new file mode 100644 index 0000000..ec2e317 Binary files /dev/null and b/src/assets/imgs/flag/position_purple.png differ diff --git a/src/assets/imgs/flag/position_red.png b/src/assets/imgs/flag/position_red.png new file mode 100644 index 0000000..884978c Binary files /dev/null and b/src/assets/imgs/flag/position_red.png differ diff --git a/src/assets/imgs/flag/position_yellow.png b/src/assets/imgs/flag/position_yellow.png new file mode 100644 index 0000000..bbab56f Binary files /dev/null and b/src/assets/imgs/flag/position_yellow.png differ diff --git a/src/components/Editor/src/Editor.vue b/src/components/Editor/src/Editor.vue index 73925f8..109f092 100644 --- a/src/components/Editor/src/Editor.vue +++ b/src/components/Editor/src/Editor.vue @@ -18,7 +18,7 @@ i18nChangeLanguage(unref(currentLocale).lang) const props = defineProps({ editorId: propTypes.string.def('wangeEditor-1'), - height: propTypes.oneOfType([Number, String]).def('500px'), + height: propTypes.oneOfType([Number, String]).def('40vh'), editorConfig: { type: Object as PropType>, default: () => undefined @@ -154,6 +154,23 @@ const editorStyle = computed(() => { } }) +const toolbarConfig = ref({ + excludeKeys: [ + 'insertVideo', // 网络视频 + 'insertImage', // 网络图片 + 'insertLink', // 链接 + 'codeBlock', // 代码块 + 'headerSelect', // 标题 + 'blockquote', // 引用 + 'fontFamily', // 字体 + 'todo', // 代办 + 'group-indent', // 缩进 + 'emotion', // 表情 + 'undo', // 撤销 + 'redo' // 重做 + ] +}) + // 回调函数 const handleChange = (editor: IDomEditor) => { emit('change', editor) @@ -184,6 +201,7 @@ defineExpose({ diff --git a/src/components/Editor/src/README.md b/src/components/Editor/src/README.md new file mode 100644 index 0000000..3fdcc2c --- /dev/null +++ b/src/components/Editor/src/README.md @@ -0,0 +1,68 @@ + +**「工具栏key」** +[ + "headerSelect",// 标题 + "blockquote", // 引用 + "bold", // 加粗 + "underline", // 下划线 + "italic", // 斜体 + // 删除线、清除格式等 + "group-more-style", + { + key: "group-more-style", + title: "更多", + iconSvg: + '', + menuKeys: Array(5) + }, + "color", // 文字颜色 + "bgColor", // 背景色 + "fontSize", // 字号 + "fontFamily", // 字体 + "lineHeight", // 行高 + "bulletedList", // 无序列表 + "numberedList", // 有序列表 + "todo", // 代办 + // 对齐 + "group-justify", + { + key: "group-justify", + title: "对齐", + iconSvg: + '', + menuKeys: Array(4) + }, + // 缩进 + "group-indent", + { + key: "group-indent", + title: "缩进", + iconSvg: + '', + menuKeys: Array(2) + }, + "emotion",// 表情 + "insertLink",// 插入链接 + "group-image",// 上传图片 + { + key: "group-image", + title: "图片", + iconSvg: + '', + menuKeys: Array(2) + }, + "group-video",// 上传视频 + { + key: "group-video", + title: "视频", + iconSvg: + '', + menuKeys: Array(2) + }, + "insertTable",// 插入表格 + "codeBlock", // 代码块 + "divider", // 分割线 + "undo", // 撤销 + "redo", // 重做 + "fullScreen" // 全屏 +] diff --git a/src/components/SSTable/index.vue b/src/components/SSTable/index.vue index 4ce11d0..72dac3f 100644 --- a/src/components/SSTable/index.vue +++ b/src/components/SSTable/index.vue @@ -19,10 +19,20 @@ trigger="click" virtual-triggering > - - - {{ item.label }} - + + + + @@ -37,12 +47,19 @@ diff --git a/src/components/Search/src/Search.vue b/src/components/Search/src/Search.vue index 662a8d3..ccd3746 100644 --- a/src/components/Search/src/Search.vue +++ b/src/components/Search/src/Search.vue @@ -7,6 +7,13 @@ import { findIndex } from '@/utils' import { cloneDeep } from 'lodash-es' import { FormSchema } from '@/types/form' +import { useUserStore } from '@/store/modules/user' +import { useRoute } from 'vue-router' +import cache from '@/plugins/cache' + +const route = useRoute() +const { id: userId } = useUserStore().user //取用户ID + const { t } = useI18n() const props = defineProps({ @@ -43,8 +50,16 @@ const emit = defineEmits(['search', 'reset']) const visible = ref(true) +const SchemaSetting = ref() +const SettingPop = ref() + +const checkedSchema = ref([]) + +// 用户使用的查询条件 +const usedSchema = ref([]) + const newSchema = computed(() => { - let schema: FormSchema[] = cloneDeep(props.schema) + let schema: FormSchema[] = cloneDeep(usedSchema.value) if (props.expand && props.expandField && !unref(visible)) { const index = findIndex(schema, (v: FormSchema) => v.field === props.expandField) if (index > -1) { @@ -65,6 +80,43 @@ const newSchema = computed(() => { return schema }) +function initSearch() { + reset() + // 1. 先获取缓存 + const localData = getColumn('Schema')[route.name] + // 2. 如果有缓存,使用缓存表头,否则使用默认的所有表头 + if (localData && localData.length) { + usedSchema.value = localData + } else { + const obj = getColumn('Schema') + obj[route.name] = [props.schema[0]] + setSchema(obj) + usedSchema.value = [props.schema[0]] + } + checkedSchema.value = usedSchema.value.map((it) => it.field) +} + +function changeSearch() { + const obj = getColumn('Schema') + obj[route.name] = props.schema.filter((item) => checkedSchema.value.includes(item.field)) + setSchema(obj) + initSearch() +} + +// 获取缓存的查询条件 +function getColumn(name = 'Schema') { + return cache.local.get(`${name}-${userId}`) || {} +} + +// 设置查询条件缓存 +function setSchema(val: Array, name = 'Schema') { + cache.local.set(`${name}-${userId}`, val) +} + +function setSearch() { + unref(SettingPop).SettingPop?.delayHide?.() +} + const { register, elFormRef, methods } = useForm({ model: props.model || {} }) @@ -96,6 +148,8 @@ const setVisible = () => { unref(elFormRef)?.resetFields() visible.value = !unref(visible) } + +initSearch()