ソースを参照

文件收集,上报

ZaiZai 1 年間 前
コミット
c808a6685c
47 ファイル変更0 行追加6180 行削除
  1. 0 74
      src/global/components_bak/hc-auto-complete/index.vue
  2. 0 174
      src/global/components_bak/hc-card/index.vue
  3. 0 110
      src/global/components_bak/hc-card/item.vue
  4. 0 168
      src/global/components_bak/hc-context-menu/index.vue
  5. 0 154
      src/global/components_bak/hc-counter/index.vue
  6. 0 64
      src/global/components_bak/hc-date-picker/index.vue
  7. 0 179
      src/global/components_bak/hc-dialog/index.vue
  8. 0 176
      src/global/components_bak/hc-drag-modal/index.vue
  9. 0 61
      src/global/components_bak/hc-drag-modal/modal.scss
  10. 0 138
      src/global/components_bak/hc-drawer/index.vue
  11. 0 43
      src/global/components_bak/hc-icon/index.vue
  12. 0 28
      src/global/components_bak/hc-img/index.vue
  13. 0 37
      src/global/components_bak/hc-loading/index.vue
  14. 0 48
      src/global/components_bak/hc-loading/style.scss
  15. 0 215
      src/global/components_bak/hc-menu-simple/index.vue
  16. 0 111
      src/global/components_bak/hc-new-switch/index.vue
  17. 0 50
      src/global/components_bak/hc-no-data/index.vue
  18. 0 181
      src/global/components_bak/hc-online-office/index.vue
  19. 0 28
      src/global/components_bak/hc-page-header/index.vue
  20. 0 91
      src/global/components_bak/hc-page/index.vue
  21. 0 63
      src/global/components_bak/hc-pdf/index.vue
  22. 0 205
      src/global/components_bak/hc-report-experts/index.vue
  23. 0 287
      src/global/components_bak/hc-report-modal/index.vue
  24. 0 168
      src/global/components_bak/hc-sms-auth/index.vue
  25. 0 76
      src/global/components_bak/hc-status/index.vue
  26. 0 286
      src/global/components_bak/hc-table/index.vue
  27. 0 231
      src/global/components_bak/hc-table/index1.vue
  28. 0 181
      src/global/components_bak/hc-tabs-simple/index.vue
  29. 0 329
      src/global/components_bak/hc-tasks-user/index.vue
  30. 0 147
      src/global/components_bak/hc-tasks-user/style.scss
  31. 0 46
      src/global/components_bak/hc-tooltip/index.vue
  32. 0 2
      src/global/components_bak/hc-upload-file/common/file-events.js
  33. 0 27
      src/global/components_bak/hc-upload-file/common/md5.js
  34. 0 24
      src/global/components_bak/hc-upload-file/common/utils.js
  35. 0 65
      src/global/components_bak/hc-upload-file/components/btn.vue
  36. 0 67
      src/global/components_bak/hc-upload-file/components/drop.vue
  37. 0 313
      src/global/components_bak/hc-upload-file/components/file.vue
  38. 0 44
      src/global/components_bak/hc-upload-file/components/files.vue
  39. 0 44
      src/global/components_bak/hc-upload-file/components/list.vue
  40. 0 36
      src/global/components_bak/hc-upload-file/components/unsupport.vue
  41. 0 193
      src/global/components_bak/hc-upload-file/components/uploader.vue
  42. 0 357
      src/global/components_bak/hc-upload-file/file.vue
  43. 0 133
      src/global/components_bak/hc-upload-file/index.vue
  44. 0 233
      src/global/components_bak/hc-upload-file/style/index.scss
  45. 0 209
      src/global/components_bak/hc-uploads/formItem.vue
  46. 0 218
      src/global/components_bak/hc-uploads/index.vue
  47. 0 66
      src/global/components_bak/index.js

+ 0 - 74
src/global/components_bak/hc-auto-complete/index.vue

@@ -1,74 +0,0 @@
-<template>
-    <el-autocomplete :class="[block ? 'block' : '', ui]" v-model="modelValues" :fetch-suggestions="queryFetch" :value-key="keys" :placeholder="placeholder" @select="handleFetchSelect" @change="handleFetchChange"/>
-</template>
-
-<script setup>
-import {ref,watch} from "vue";
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    modelValue: {
-        type: String,
-        default: ''
-    },
-    datas: {
-        type: Array,
-        default: () => ([])
-    },
-    keys: {
-        type: String,
-        default: 'userName'
-    },
-    placeholder: {
-        type: String,
-        default: '请选择或输入'
-    },
-    block: {
-        type: Boolean,
-        default: true
-    },
-})
-
-//初始变量
-const queryData = ref(props.datas)
-const modelValues = ref(props.modelValue)
-
-//监听
-watch(() => [
-    props.datas,
-    props.modelValue,
-], ([datas, val]) => {
-    queryData.value = datas;
-    modelValues.value = val;
-})
-
-//数据筛选处理
-const queryFetch = (key, cb) => {
-    const results = key ? queryData.value.filter(createFilter(key)) : queryData.value
-    cb(results)
-}
-const createFilter = (key) => {
-    return (item) => {
-        const str = item[props.keys]
-        return (str.toLowerCase().indexOf(key.toLowerCase()) === 0)
-    }
-}
-
-//事件
-const emit = defineEmits(['change', 'update:modelValue'])
-
-//被选择
-const handleFetchSelect = (item) => {
-    const str = item[props.keys]
-    emit('update:modelValue', str)
-    emit('change', str)
-}
-
-//失去焦点
-const handleFetchChange = (val) => {
-    emit('update:modelValue', val)
-    emit('change', val)
-}
-</script>

+ 0 - 174
src/global/components_bak/hc-card/index.vue

@@ -1,174 +0,0 @@
-<template>
-    <el-card class="hc-card-box" shadow="never"
-             :class="[
-                 (isSlotHeader || title || isSlotExtra || extraText)?'is-header':'',
-                  isSlotSearchBar?'is-search-bar':'',
-                   `is-action-${actionSize}`,
-                   ui
-             ]"
-    >
-        <template #header v-if="isSlotHeader || title || isSlotExtra || extraText">
-            <div class="hc-card-header-box">
-                <div class="hc-card-header">
-                    <div class="title text-lg" v-if="!isSlotHeader && title">{{ title }}</div>
-                    <slot v-if="isSlotHeader" name='header'/>
-                </div>
-                <div class="hc-card-header-extra" v-if="isSlotExtra || extraText">
-                    <div class="extra" v-if="!isSlotExtra && extraText">{{ extraText }}</div>
-                    <slot v-if="isSlotExtra" name='extra'/>
-                </div>
-            </div>
-        </template>
-        <div class="hc-card-search-bar" v-if="isSlotSearchBar">
-            <slot name='search'/>
-        </div>
-        <div class="hc-card-main-box" :id="idRef" :class="isSlotAction?'is-action':''">
-            <template v-if="scrollbar">
-                <el-scrollbar>
-                    <slot></slot>
-                </el-scrollbar>
-            </template>
-            <template v-else>
-                <slot></slot>
-            </template>
-        </div>
-        <div class="hc-card-action-box" :class="actionUi" v-if="isSlotAction">
-            <slot name='action'/>
-        </div>
-    </el-card>
-</template>
-
-<script setup>
-import {ref,useSlots} from "vue";
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    title: {
-        type: [String,Number],
-        default: ''
-    },
-    extraText: {
-        type: [String,Number],
-        default: ''
-    },
-    scrollbar: {
-        type: Boolean,
-        default: false
-    },
-    actionSize: {
-        type: [String,Number],
-        default: 'lg'
-    },
-    idRef: {
-        type: [String,Number],
-        default: ''
-    },
-    actionUi: {
-        type: String,
-        default: ''
-    },
-})
-
-const slots = useSlots()
-
-//判断<slot>是否有传值
-const isSlotHeader = ref(!!slots.header);
-const isSlotExtra = ref(!!slots.extra);
-const isSlotAction = ref(!!slots.action);
-const isSlotSearchBar = ref(!!slots.search);
-</script>
-
-<style lang="scss">
-.hc-card-box.el-card {
-    height: 100%;
-    position: relative;
-    --el-card-padding: 24px;
-    --el-card-bg-color: #f1f5f8;
-    --el-card-border-radius: 10px;
-    --el-text-color-primary: #1A1A1A;
-    box-shadow: -2px 0 10px 0 rgba(32,37,50,0.03), 0 10px 21px 20px rgba(32,37,50,0.03);
-    border: 0;
-    .el-card__header {
-        height: 70px;
-        padding: 14px 24px;
-        border-bottom: 1px solid #e9e9e9;
-        overflow-x: auto;
-        overflow-y: hidden;
-    }
-    .hc-card-header-box {
-        position: relative;
-        display: flex;
-        align-items: center;
-        height: 100%;
-        .hc-card-header {
-            position: relative;
-            flex: 1;
-            display: flex;
-            align-items: center;
-        }
-        .hc-card-header-extra {
-            position: relative;
-            display: flex;
-            align-items: center;
-            margin-left: 24px;
-        }
-    }
-    .el-card__body {
-        position: relative;
-        height: 100%;
-        .hc-card-search-bar {
-            position: relative;
-            margin-bottom: 20px;
-            display: flex;
-            align-items: center;
-            overflow-x: auto;
-            overflow-y: hidden;
-        }
-        .hc-card-main-box {
-            position: relative;
-            height: 100%;
-        }
-        .hc-card-action-box {
-            position: absolute;
-            height: auto;
-            margin: -24px;
-            width: 100%;
-            bottom: 24px;
-            padding: 20px 24px;
-            border-top: 1px solid #e9e9e9;
-            background-color: #f1f5f8;
-        }
-    }
-    &.is-header .el-card__body {
-        height: calc(100% - 70px);
-    }
-    &.is-header .el-card__body .hc-card-main-box:not(.is-action) {
-        height: 100%;
-    }
-    &.is-action-df .el-card__body .hc-card-main-box.is-action {
-        height: calc(100% - 63.5px);
-    }
-    &.is-action-lg .el-card__body .hc-card-main-box.is-action {
-        height: calc(100% - 80px);
-    }
-    &.is-search-bar.is-action-df .el-card__body .hc-card-main-box {
-        height: calc(100% - 40px);
-        &.is-action {
-            height: calc(100% - 124px);
-        }
-    }
-    &.is-search-bar.is-action-lg .el-card__body .hc-card-main-box {
-        height: calc(100% - 40px);
-        &.is-action {
-            height: calc(100% - 124px);
-        }
-    }
-}
-.hc-card-box.el-card:not(.is-header) {
-    .el-card__body {
-        height: 100%;
-    }
-}
-</style>

+ 0 - 110
src/global/components_bak/hc-card/item.vue

@@ -1,110 +0,0 @@
-<template>
-    <div class="hc-card-item-box"
-         :class="[
-             (isSlotHeader || title || isSlotExtra || extraText)?'is-header':'',
-             isSlotAction ? 'is-action' : '', ui
-         ]">
-        <div class="hc-card-item-header" v-if="isSlotHeader || title || isSlotExtra || extraText">
-            <div class="item-header">
-                <span v-if="!isSlotHeader && title">{{ title }}</span>
-                <slot v-if="isSlotHeader" name='header'/>
-            </div>
-            <div class="item-extra" v-if="isSlotExtra || extraText">
-                <span v-if="!isSlotExtra && extraText">{{ extraText }}</span>
-                <slot v-if="isSlotExtra" name='extra'/>
-            </div>
-        </div>
-        <div class="hc-card-item-body">
-            <template v-if="scrollbar">
-                <el-scrollbar>
-                    <slot></slot>
-                </el-scrollbar>
-            </template>
-            <template v-else>
-                <slot></slot>
-            </template>
-        </div>
-        <div class="hc-card-item-action" v-if="isSlotAction">
-            <slot name='action'/>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import {ref,useSlots} from "vue";
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    title: {
-        type: [String,Number],
-        default: ''
-    },
-    extraText: {
-        type: [String,Number],
-        default: ''
-    },
-    scrollbar: {
-        type: Boolean,
-        default: false
-    },
-})
-
-const slots = useSlots()
-
-//判断<slot>是否有传值
-const isSlotHeader = ref(!!slots.header);
-const isSlotExtra = ref(!!slots.extra);
-const isSlotAction = ref(!!slots.action);
-</script>
-
-<style lang="scss" scoped>
-.hc-card-item-box {
-    position: relative;
-    height: 100%;
-    background: #E7EEF4;
-    border-radius: 10px;
-    padding: 14px;
-    .hc-card-item-header {
-        position: relative;
-        font-weight: bold;
-        display: flex;
-        align-items: center;
-        height: 32px;
-        margin-bottom: 14px;
-        color: var(--el-color-primary-dark-2);
-        .item-header {
-            flex: 1;
-            position: relative;
-            display: flex;
-            align-items: center;
-        }
-        .item-extra {
-            position: relative;
-            display: flex;
-            align-items: center;
-            margin-left: 120px;
-        }
-    }
-    .hc-card-item-body {
-        position: relative;
-        height: 100%;
-        overflow: hidden;
-    }
-    .hc-card-item-action {
-        position: relative;
-        margin-top: 18px;
-        height: 32px;
-    }
-    &.is-header:not(.is-action),
-    &.is-action:not(.is-header) {
-        .hc-card-item-body {
-            height: calc(100% - 46px);
-        }
-    }
-    &.is-header.is-action .hc-card-item-body {
-        height: calc(100% - 46px - 50px);
-    }
-}
-</style>

+ 0 - 168
src/global/components_bak/hc-context-menu/index.vue

@@ -1,168 +0,0 @@
-<template>
-    <div class="hc-context-menu-box" :class="ui" :id="uuid" v-click-outside="onClickOutside">
-        <template v-for="item in menus">
-            <div class="hc-context-menu-item" @click.stop="optionClicked(item)">
-                <slot :name='item.key' :item="item" v-if="item.isSlot"/>
-                <template v-else>
-                    <HcIcon :name="item.icon" class="menu-item-icon" v-if="item.icon"/>
-                    <span class="menu-item-name">{{item.label}}</span>
-                </template>
-            </div>
-        </template>
-    </div>
-</template>
-
-<script setup>
-import {ref, useSlots, watch, nextTick, onMounted, onBeforeUnmount} from "vue";
-import {ClickOutside as vClickOutside} from 'element-plus'
-import {getRandom, deepClone} from "js-fast-way"
-
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    datas: {
-        type: Array,
-        default: () => ([])
-    }
-})
-
-//初始变量
-const uuid = getRandom()
-const menus = ref(props.datas)
-
-//监听表头
-watch(() => [
-    props.datas
-], ([datas]) => {
-    setIsSlots(datas)
-})
-
-//加载完成
-nextTick(()=>{
-    setIsSlots(props.datas)
-})
-
-//渲染完成
-onMounted(()=>{
-    document.body.addEventListener('keyup', onEscKeyRelease);
-})
-
-//判断<slot>是否有传值
-const slots = useSlots()
-const setIsSlots = (datas) => {
-    let arr = deepClone(datas)
-    for (let i = 0; i < arr.length; i++) {
-        arr[i].isSlot = !!slots[arr[i].key]
-    }
-    menus.value = arr
-}
-
-//显示菜单
-const showMenu = (event) => {
-    let menu = document.getElementById(uuid);
-    if (!menu) return;
-    //取宽高
-    menu.style.visibility = 'hidden';
-    menu.style.display = 'block';
-    let menuWidth = menu.offsetWidth;
-    let menuHeight = menu.offsetHeight;
-    menu.removeAttribute('style');
-    //宽
-    if (menuWidth + event.pageX >= window.innerWidth) {
-        menu.style.left = event.pageX - menuWidth + 2 + 'px';
-    } else {
-        menu.style.left = event.pageX - 2 + 'px';
-    }
-    //高
-    if (menuHeight + event.pageY >= window.innerHeight) {
-        menu.style.top = event.pageY - menuHeight + 2 + 'px';
-    } else {
-        menu.style.top = event.pageY - 2 + 'px';
-    }
-    menu.classList.add('active');
-}
-
-//事件
-const emit = defineEmits(['closed', 'item-click'])
-
-const hideContextMenu = () => {
-    const element = document.getElementById(uuid);
-    if (element) {
-        element.classList.remove('active');
-        emit('closed')
-    }
-}
-
-const onClickOutside = () => {
-    hideContextMenu()
-}
-
-//菜单被点击
-const optionClicked = (item) => {
-    hideContextMenu()
-    emit('item-click', item)
-}
-
-const onEscKeyRelease = (event) => {
-    if (event.keyCode === 27) {
-        hideContextMenu()
-    }
-}
-
-//卸载之前
-onBeforeUnmount(() => {
-    document.removeEventListener('keyup', onEscKeyRelease);
-})
-
-// 暴露出去
-defineExpose({
-    showMenu
-})
-</script>
-
-<style lang="scss" scoped>
-.hc-context-menu-box {
-    position: fixed;
-    background-color: #fff;
-    border-radius: 4px;
-    width: max-content;
-    display: none;
-    left: 0;
-    top: 0;
-    box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
-    z-index: 1000000;
-    &.active {
-        display: block;
-    }
-    .hc-context-menu-item {
-        align-items: center;
-        padding: 5px 15px;
-        display: flex;
-        cursor: pointer;
-        position: relative;
-        height: 40px;
-        font-size: 16px;
-        color: #333639;
-        .menu-item-icon {
-            margin-right: 6px;
-        }
-        &:hover {
-            background-color: #f3f3f5;
-        }
-        &:first-of-type {
-            margin-top: 4px;
-        }
-        &:last-of-type {
-            margin-bottom: 4px;
-        }
-    }
-}
-</style>
-
-<style lang="scss">
-.hc-context-menu-box .hc-context-menu-item .menu-item-icon {
-    margin-right: 6px;
-}
-</style>

+ 0 - 154
src/global/components_bak/hc-counter/index.vue

@@ -1,154 +0,0 @@
-<template>
-    <div class="hc-counter-box" :class="[block?'hc-counter-block':'', size, ui]">
-        <div class="counter-box">
-            <div class="counter-btn first" :disabled="modelValues <= 1" @click="moveBtnClick">-</div>
-            <div class='counter-val w-20'>
-                <span>{{modelValues}}</span>
-                <span class="ml-2" v-if="text">{{text}}</span>
-            </div>
-            <div class="counter-btn end" @click="addBtnClick">+</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import {nextTick, ref, watch} from "vue";
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    modelValue: {
-        type: [String,Number],
-        default: 1
-    },
-    text: {
-        type: String,
-        default: ''
-    },
-    block: {
-        type: Boolean,
-        default: false
-    },
-    size: {
-        type: String,
-        default: ''
-    },
-})
-
-const modelValues = ref(1)
-
-nextTick(() => {
-    setModelVal(props.modelValue)
-})
-
-//监听
-watch(() => [
-    props.modelValue,
-], ([val]) => {
-    setModelVal(val)
-})
-
-//转换
-const setModelVal = (val) => {
-    modelValues.value = Number(val)
-    setEmitData(val)
-}
-
-const emit = defineEmits(['update:modelValue','addClick','moveClick', 'change'])
-
-//减少
-const moveBtnClick = () => {
-    let val = modelValues.value - 1;
-    if (val < 1) {
-        modelValues.value =  1;
-    } else {
-        modelValues.value =  val;
-        setEmitData(val)
-    }
-}
-
-//增加
-const addBtnClick = () => {
-    let val = modelValues.value + 1;
-    modelValues.value =  val;
-    setEmitData(val)
-}
-
-//事件
-const setEmitData = (val) => {
-    emit('update:modelValue', val)
-    emit('addClick', val)
-    emit('change', val)
-}
-
-</script>
-
-<style lang="scss" scoped>
-.hc-counter-box {
-    position: relative;
-    display: inline-block;
-    height: 32px;
-    .counter-box {
-        display: flex;
-        align-items: center;
-        height: inherit;
-        color: #000000;
-        .counter-btn {
-            height: 32px;
-            width: 32px;
-            border: 1px solid #dddfe6;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            font-size: 22px;
-            font-weight: 100;
-            cursor: pointer;
-            user-select: none;
-            background-color: white;
-            transition: color 0.2s, background-color 0.2s;
-            &.first {
-                border-radius: 4px 0 0 4px;
-            }
-            &.end {
-                border-radius: 0 4px 4px 0;
-            }
-            &:hover {
-                color: var(--el-color-primary);
-                background-color: var(--el-color-primary-light-8);
-            }
-            &[disabled=true] {
-                cursor: not-allowed;
-                color: #c5c5c5;
-                background-color: #f3f3f3;
-            }
-        }
-        .counter-val {
-            height: inherit;
-            border-top: 1px solid #dddfe6;
-            border-bottom: 1px solid #dddfe6;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-        }
-    }
-    &.hc-counter-block {
-        width: 100%;
-        .counter-box {
-            width: 100%;
-            .counter-val {
-                width: auto;
-                flex: 1;
-            }
-        }
-    }
-    &.large {
-        height: 40px;
-        .counter-btn {
-            height: 40px;
-            width: 40px;
-            font-size: 26px;
-        }
-    }
-}
-</style>

+ 0 - 64
src/global/components_bak/hc-date-picker/index.vue

@@ -1,64 +0,0 @@
-<template>
-    <el-date-picker class="hc-date-picker" v-model="betweenDate" :type="isType" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :clearable="isClearable" :value-format="isFormat" @change="betweenDateUpdate"/>
-</template>
-
-<script setup>
-import { ref,watch } from "vue";
-const props = defineProps({
-    dates: {
-        type: Array,
-        default: () => ([])
-    },
-    clearable: {
-        type: Boolean,
-        default: false
-    },
-    type: {
-        type: String,
-        default: 'daterange'
-    },
-    format: {
-        type: String,
-        default: 'YYYY-MM-DD'
-    },
-})
-
-//初始变量
-const betweenDate = ref(props.dates)
-const isType = ref(props.type)
-const isFormat = ref(props.format)
-const isClearable = ref(props.clearable)
-
-//监听
-watch(() => [
-    props.dates,
-    props.type,
-    props.format,
-    props.clearable,
-], ([dates,type,format,clearable]) => {
-    betweenDate.value = dates
-    isType.value = type
-    isFormat.value = format
-    isClearable.value = clearable
-})
-
-//事件
-const emit = defineEmits(['change'])
-const betweenDateUpdate = (arr) => {
-    let res = arr ?? [], query = '';
-    let obj = {start: null, end: null}
-    if (res.length > 0) {
-        obj = {start: res[0], end: res[1]}
-    }
-    if (obj['start'] && obj['end']) {
-        query = `${obj['start']}~${obj['end']}`
-    }
-    emit('change', {val: obj, arr: res, query})
-}
-</script>
-
-<style lang="scss">
-.hc-date-picker.el-range-editor.el-input__wrapper {
-    width: 100%;
-}
-</style>

+ 0 - 179
src/global/components_bak/hc-dialog/index.vue

@@ -1,179 +0,0 @@
-<template>
-    <el-dialog v-model="isShow" class="hc-modal-border" :class="[isTable?'hc-modal-table':'', isSlotExtra?'hc-modal-header-extra':'', padding ? '':'hc-modal-no-padding', ui]" :append-to-body="appendToBody"
-               :style="isBgColor?'--el-dialog-bg-color:' + isBgColor:''" :title="title" :show-close="isClose" :width="isWidth" draggable destroy-on-close @closed="dialogClosed" :close-on-click-modal="false">
-        <template #header v-if="isSlotHeader || isSlotExtra">
-            <slot name='header' v-if="isSlotHeader"/>
-            <div role="heading" class="el-dialog__title" v-if="!isSlotHeader && isSlotExtra">{{title}}</div>
-            <slot name='extra' v-if="isSlotExtra"/>
-        </template>
-        <slot></slot>
-        <template #footer v-if="footer">
-            <slot name='footer' v-if="isSlotFooter"/>
-            <div class="lr-dialog-footer" v-else-if="isRowFooter">
-                <div class="left">
-                    <slot name='leftRowFooter'/>
-                </div>
-                <div class="right flex">
-                    <slot name='rightRowFooter'/>
-                </div>
-            </div>
-            <div class="dialog-footer" :class="isFooterCenter?'text-center':''" v-else>
-                <el-button size="large" @click="cancelClick">
-                    <HcIcon name="close"/>
-                    <span>{{cancelText}}</span>
-                </el-button>
-                <el-button type="primary" hc-btn :loading="isLoading" @click="saveClick">
-                    <HcIcon name="check"/>
-                    <span>{{saveText}}</span>
-                </el-button>
-            </div>
-        </template>
-    </el-dialog>
-</template>
-
-<script setup>
-import {ref, watch, useSlots} from "vue";
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    show: {
-        type: Boolean,
-        default: false
-    },
-    title: {
-        type: [String,Number],
-        default: 'dialog'
-    },
-    widths: {
-        type: String,
-        default: '38rem'
-    },
-    loading: {
-        type: Boolean,
-        default: false
-    },
-    footer: {
-        type: Boolean,
-        default: true
-    },
-    cancelText: {
-        type: [String,Number],
-        default: '取消'
-    },
-    saveText: {
-        type: [String,Number],
-        default: '提交'
-    },
-    bgColor: {
-        type: [String,Number],
-        default: '#f1f5f8'
-    },
-    isTable: {
-        type: Boolean,
-        default: false
-    },
-    isRowFooter: {
-        type: Boolean,
-        default: false
-    },
-    isClose: {
-        type: Boolean,
-        default: true
-    },
-    padding: {
-        type: Boolean,
-        default: true
-    },
-    isFooterCenter: {
-        type: Boolean,
-        default: false
-    },
-    appendToBody: {
-        type: Boolean,
-        default: false
-    },
-    cancelClose: {
-        type: Boolean,
-        default: true
-    },
-})
-
-//变量
-const isShow = ref(props.show)
-const isWidth = ref(props.widths)
-const isLoading = ref(props.loading)
-const isBgColor = ref(props.bgColor)
-
-//监听
-watch(() => [
-    props.show,
-    props.widths,
-    props.loading,
-    props.bgColor,
-], ([show, width, loading, bgColor]) => {
-    isShow.value = show
-    isWidth.value = width
-    isLoading.value = loading
-    isBgColor.value = bgColor
-})
-
-//判断<slot>是否有传值
-const slots = useSlots()
-const isSlotHeader = ref(!!slots.header);
-const isSlotExtra = ref(!!slots.extra);
-const isSlotFooter = ref(!!slots.footer);
-
-const emit = defineEmits(['close', 'cancel', 'save'])
-
-//取消
-const cancelClick = () => {
-    if (props.cancelClose) {
-        dialogClosed()
-        emit('cancel')
-    } else {
-        emit('cancel')
-    }
-}
-
-//关闭
-const dialogClosed = () => {
-    isShow.value = false
-    emit('close', false)
-}
-
-//按钮保存
-const saveClick = () => {
-    emit('save')
-}
-</script>
-
-<style lang="scss">
-.el-overlay-dialog {
-    .el-dialog.hc-modal-border.hc-modal-header-extra,
-    .el-dialog.hc-modal-header-extra {
-        .el-dialog__header {
-            position: relative;
-            display: flex;
-            align-items: center;
-            padding: 8px var(--el-dialog-padding-primary);
-            .el-dialog__title {
-                flex: 1;
-            }
-            .el-dialog__headerbtn {
-                position: relative;
-                top: initial;
-                right: initial;
-                width: auto;
-                height: inherit;
-                margin-left: 24px;
-                font-size: 18px;
-            }
-        }
-    }
-    .el-dialog.hc-modal-no-padding .el-dialog__body {
-        padding: 0;
-    }
-}
-</style>

+ 0 - 176
src/global/components_bak/hc-drag-modal/index.vue

@@ -1,176 +0,0 @@
-<template>
-    <div class="ui-drag-modal-box-hide" v-if="isBody">
-        <Teleport to="#app">
-            <div class="ui-drag-modal-box" :class="[isModalShow?'ui-drag-modal-show':'']" :id="'drag-modal-' + uuid"
-                 :style="{left: dragModalLeft + 'px', top: dragModalTop + 'px', width: widthVal + 'px', height: heightVal + 'px'}">
-                <div class="ui-drag-modal-dialog shadow-xl" :class="[bg,ui]" :style="{width: widthVal + 'px', height: heightVal + 'px'}" @mousedown="dragModalMouseDown">
-                    <div class="ui-drag-modal-dialog-header" :class="titleBorder?'border-bottom':''">
-                        <div class="ui-drag-modal-dialog-title text-lg" :class="titleUi">
-                            <span v-if="title">{{title}}</span>
-                        </div>
-                        <div class="ui-drag-modal-dialog-close" v-if="closeIcon" @click="_closeClick()">
-                            <HcIcon name="close"/>
-                        </div>
-                    </div>
-                    <div class="ui-drag-modal-dialog-body" @mousedown.stop="dragModalBodyMouseDown">
-                        <slot></slot>
-                    </div>
-                    <span class="ui-drag-modal-resize" @mousedown="dragModalResizeMouseDown"/>
-                </div>
-            </div>
-        </Teleport>
-    </div>
-</template>
-
-<script setup>
-import { ref,nextTick,watch } from "vue"
-import { getRandom } from "js-fast-way"
-//参数
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    bg: {
-        type: String,
-        default: ''
-    },
-    widths: {
-        type: [Number,String],
-        default: 340
-    },
-    title: {
-        type: String,
-        default: ''
-    },
-    titleUi: {
-        type: [String,Object,Array],
-        default: ''
-    },
-    titleBorder: {
-        type: Boolean,
-        default: false
-    },
-    closeIcon: {
-        type: Boolean,
-        default: false
-    },
-    isShow: {
-        type: Boolean,
-        default: false
-    },
-    lefts: {
-        type: [Number,String],
-        default: 0
-    },
-    tops: {
-        type: [Number,String],
-        default: 0
-    },
-})
-
-//变量
-const uuid = getRandom()
-const isBody = ref(false)
-const isModalShow = ref(props.isShow)
-const dragModalLeft = ref(parseInt(props.lefts + ''))
-const dragModalTop = ref(parseInt(props.tops + ''))
-const widthVal = ref(parseInt(props.widths + ''))
-const heightVal = ref(440)
-
-//监听
-watch(() => props.isShow, (isShow) => {
-    isModalShow.value = isShow;
-})
-
-//
-nextTick(()=> {
-    //页面渲染完成后,再让 vue3 的 Teleport,把弹出框挂载到外部节点上。
-    isBody.value = true
-})
-
-//弹窗拖动
-const dragModalMouseDown = (event) => {
-    // 阻止默认事件和冒泡
-    event.preventDefault()
-    event.stopPropagation()
-    //获取相关dom元素
-    let body = document.body, dom = document.getElementById('drag-modal-' + uuid)
-    // 鼠标按下,计算当前元素距离可视区的距离
-    const disX = event.clientX - dom.offsetLeft, disY = event.clientY - dom.offsetTop;
-    const lefts = body.clientWidth - dom.clientWidth, tops = body.clientHeight - dom.clientHeight;
-    document.onmousemove = (ve) => {
-        // 通过事件委托,计算移动的距离
-        let left = ve.clientX - disX, top = ve.clientY - disY
-        // 判断是否超出可视区
-        if (left <= 0) left = 0
-        if (left > lefts) {
-            left = lefts
-        }
-
-        if (top <= 0) top = 0
-        if (top > tops) {
-            top = tops
-        }
-        // 移动当前元素
-        dragModalLeft.value = left
-        dragModalTop.value = top
-    }
-    document.onmouseup = () => {
-        document.onmousemove = null;
-        document.onmouseup = null;
-    }
-}
-
-//禁止拖动
-const dragModalBodyMouseDown = () => {}
-
-
-//弹窗改变宽高
-const dragModalResizeMouseDown = (event) => {
-    // 阻止默认事件和冒泡
-    event.preventDefault()
-    event.stopPropagation()
-    //获取相关dom元素
-    let body = document.body, dom = document.getElementById('drag-modal-' + uuid)
-    let clientX = event.clientX, clientY = event.clientY;
-    let offsetWidth = dom.offsetWidth, clientHeight = dom.clientHeight;
-    document.onmousemove = (e) => {
-        //拖拽时为了对宽和高 限制一下范围,定义两个变量
-        let W =  e.clientX - clientX + offsetWidth;
-        let H =  e.clientY - clientY + clientHeight;
-
-        if(body.offsetWidth - e.clientX < 0){
-            W = body.offsetWidth - parseInt(dom.style.marginLeft);
-        }
-        if(body.offsetHeight - e.clientY < 0){
-            H = body.offsetHeight - parseInt(dom.style.marginTop);
-        }
-
-        widthVal.value = W;// 拖拽后物体的宽
-        heightVal.value = H;// 拖拽后物体的高
-    }
-    document.onmouseup = () => {
-        document.onmousemove = null;
-        document.onmouseup = null;
-    }
-}
-
-
-//事件
-const emit = defineEmits(['close'])
-const show = () => {
-    isModalShow.value = true;
-}
-const hide = () => {
-    isModalShow.value = false;
-}
-const _closeClick = () => {
-    hide();
-    emit('close', false)
-}
-</script>
-
-<style lang="scss" scoped>
-@import './modal.scss';
-</style>

+ 0 - 61
src/global/components_bak/hc-drag-modal/modal.scss

@@ -1,61 +0,0 @@
-.ui-drag-modal-box-hide {
-    display: none;
-}
-.ui-drag-modal-box {
-    position: fixed;
-    top: 0;
-    left: 0;
-    opacity: 0;
-    z-index: -1024;
-    transition: opacity 0.3s, z-index 0.3s;
-    .ui-drag-modal-dialog {
-        position: relative;
-        min-width: 340px;
-        min-height: 380px;
-        display: inline-block;
-        border-radius: 5px;
-        z-index: 8001;
-        background: #f5f6f8;
-        box-shadow: 0 16px 24px 0 rgba(26,26,26,0.12), 0 2px 12px 0 rgba(26,26,26,0.10);
-        .ui-drag-modal-dialog-header {
-            position: relative;
-            display: flex;
-            align-items: center;
-            .ui-drag-modal-dialog-title {
-                flex: 1;
-                cursor: all-scroll;
-                user-select: none;
-                padding: 15px 14px 2px;
-            }
-            .ui-drag-modal-dialog-close {
-                display: flex;
-                align-items: center;
-                justify-content: flex-end;
-                cursor: pointer;
-                margin-right: 15px;
-                font-size: 20px;
-                transition: opacity 0.3s;
-                &:hover {
-                    opacity: .6;
-                }
-            }
-        }
-        .ui-drag-modal-dialog-body {
-            position: relative;
-            height: calc(100% - 75px);
-            margin: 14px;
-        }
-        .ui-drag-modal-resize {
-            position: absolute;
-            width: 15px;
-            height: 15px;
-            right: 0;
-            bottom: 0;
-            cursor: se-resize;
-        }
-    }
-    &.ui-drag-modal-show {
-        opacity: 1;
-        z-index: 8000;
-    }
-}

+ 0 - 138
src/global/components_bak/hc-drawer/index.vue

@@ -1,138 +0,0 @@
-<template>
-    <Suspense v-if="isBody">
-        <Teleport :to="`#${toId}`">
-            <el-drawer ref="drawerRef" :modal-class="uis" :class="`hc-drawer-box ${ui}`" v-model="isShow" :with-header="false" :direction="direction" :size="size" destroy-on-close @closed="drawerClosed">
-                <HcCard :title="title" :extraText="extraText" :actionSize="actionSize" :scrollbar="scrollbar" :actionUi="actionUi" v-if="isCard">
-                    <template #header v-if="isSlotHeader">
-                        <slot name='header'/>
-                    </template>
-                    <template #extra v-if="isSlotExtra">
-                        <slot name='extra'/>
-                    </template>
-                    <template #search v-if="isSlotSearchBar">
-                        <slot name='search'/>
-                    </template>
-                    <template #action v-if="isSlotAction">
-                        <slot name='action'/>
-                    </template>
-                    <slot></slot>
-                </HcCard>
-                <slot v-if="!isCard"></slot>
-            </el-drawer>
-        </Teleport>
-    </Suspense>
-</template>
-
-<script setup>
-import {ref, nextTick, watch, useSlots} from "vue";
-const props = defineProps({
-    uis: {
-        type: String,
-        default: ''
-    },
-    ui: {
-        type: String,
-        default: ''
-    },
-    show: {
-        type: Boolean,
-        default: false
-    },
-    toId: {
-        type: [String,Number],
-        default: ''
-    },
-    title: {
-        type: [String,Number],
-        default: ''
-    },
-    //rtl / ltr / ttb / btt
-    direction: {
-        type: String,
-        default: 'ttb'
-    },
-    scrollbar: {
-        type: Boolean,
-        default: false
-    },
-    extraText: {
-        type: [String,Number],
-        default: ''
-    },
-    actionSize: {
-        type: [String,Number],
-        default: 'lg'
-    },
-    size: {
-        type: [String,Number],
-        default: '100%'
-    },
-    isCard: {
-        type: Boolean,
-        default: true
-    },
-    actionUi: {
-        type: String,
-        default: ''
-    },
-})
-
-//变量
-const isShow = ref(props.show)
-const isBody = ref(false)
-
-//监听
-watch(() => [
-    props.show
-], ([show]) => {
-    isShow.value = show
-})
-
-//渲染完成
-nextTick(()=> {
-    //页面渲染完成后,再让 vue3 的 Teleport,挂载到指定节点
-    isBody.value = true
-})
-
-//判断<slot>是否有传值
-const slots = useSlots()
-const isSlotHeader = ref(!!slots.header);
-const isSlotExtra = ref(!!slots.extra);
-const isSlotAction = ref(!!slots.action);
-const isSlotSearchBar = ref(!!slots.search);
-
-const drawerRef = ref(null)
-const emit = defineEmits(['close'])
-
-//关闭
-const drawerClosed = () => {
-    isShow.value = false
-    emit('close', false)
-}
-
-const handleClose = () => {
-    drawerRef.value?.handleClose()
-}
-
-// 暴露出去
-defineExpose({
-    handleClose
-})
-</script>
-
-<style lang="scss">
-.hc-card-box.el-card .el-card__body .hc-card-main-box .el-overlay {
-    position: absolute;
-    .hc-drawer-box.el-drawer {
-        background-color: transparent;
-        box-shadow: initial;
-        .el-drawer__body {
-            padding: 24px;
-            overflow: hidden;
-            .data-fill-list-box .el-collapse .el-collapse-item__wrap .el-collapse-item__content .data-fill-list-item-content {
-                height: calc(100vh - 545px);
-            }
-        }
-    }
-}
-</style>

+ 0 - 43
src/global/components_bak/hc-icon/index.vue

@@ -1,43 +0,0 @@
-<template>
-    <i class="hc-icon-i" :class="[`ri-${nameVal}${isFill ? '-fill' : line ? '-line' : ''}`, hui]"></i>
-</template>
-
-<script setup>
-import { ref,watch } from "vue"
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    //图标名
-    name: {
-        type: [String,Number],
-        default: ''
-    },
-    //是否填充
-    fill: {
-        type: Boolean,
-        default: false
-    },
-    line: {
-        type: Boolean,
-        default: true
-    },
-})
-
-//初始变量
-const hui = ref(props.ui)
-const nameVal = ref(props.name)
-const isFill = ref(props.fill)
-
-//监听
-watch(() => [
-    props.ui,
-    props.name,
-    props.fill,
-], ([ui,name,fill]) => {
-    hui.value = ui;
-    nameVal.value = name;
-    isFill.value = fill;
-})
-</script>

+ 0 - 28
src/global/components_bak/hc-img/index.vue

@@ -1,28 +0,0 @@
-<template>
-    <ElImage :class="ui" :src="src" :previewSrcList="srcs" :initial-index="index" :fit="fit" crossOrigin="anonymous"/>
-</template>
-
-<script setup>
-defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    src: {
-        type: String,
-        default: ''
-    },
-    srcs: {
-        type: Array,
-        default: () => ([])
-    },
-    index: {
-        type: [String,Number],
-        default: -1
-    },
-    fit: {
-        type: String,
-        default: 'cover'
-    },
-})
-</script>

+ 0 - 37
src/global/components_bak/hc-loading/index.vue

@@ -1,37 +0,0 @@
-<template>
-    <div class="hc-loading-box">
-        <div class="loader-inner">
-            <div class="loader-icon-span">
-                <HcIcon class="loader-icon" name="loader-2"/>
-            </div>
-            <div class="loader-num">{{ nums }}%</div>
-            <div class="loader-tip">请稍等一下,系统正在为您分配本次验收抽检范围...</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import {ref, watch} from "vue";
-
-const props = defineProps({
-    num: {
-        type: [String, Number],
-        default: 0
-    },
-})
-
-//变量
-const nums = ref(props.num)
-
-//监听
-watch(() => [
-    props.pages?.num,
-], ([num]) => {
-    nums.value = num;
-})
-
-</script>
-
-<style lang="scss" scoped>
-@import "./style.scss";
-</style>

+ 0 - 48
src/global/components_bak/hc-loading/style.scss

@@ -1,48 +0,0 @@
-.hc-loading-box {
-    position: absolute;
-    top: 0;
-    left: 0;
-    right: 0;
-    bottom: 0;
-    background: rgba(0, 0, 0, .6);
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    z-index: 9999999;
-    transition: .3s;
-    .loader-inner {
-        position: relative;
-        text-align: center;
-        margin-left: 100px;
-        .loader-icon-span {
-            transition: .3s;
-            animation: loader-icon-rotation 3s linear infinite;
-        }
-        .loader-icon {
-            font-size: 200px;
-            color: #e99d42;
-        }
-        .loader-num {
-            position: absolute;
-            font-size: 28px;
-            top: 85px;
-            text-align: center;
-            width: 100%;
-            color: #e99d42;
-        }
-        .loader-tip {
-            color: var(--el-color-primary);
-            font-size: 19px;
-            font-weight: 500;
-        }
-    }
-}
-
-@keyframes loader-icon-rotation {
-    from {
-        transform: rotate(0deg)
-    }
-    to {
-        transform: rotate(360deg)
-    }
-}

+ 0 - 215
src/global/components_bak/hc-menu-simple/index.vue

@@ -1,215 +0,0 @@
-<template>
-    <div class="hc-menu-simple-box" :class="ui">
-        <template v-for="item in datas" :key="item[menuProps.key]">
-            <div class="item-box" :class="item[menuProps.key] === keysValue ? 'active' : ''" @click="MenuClick(item)" @contextmenu.prevent.stop="menuLabelContextMenu($event,item)">
-                <div class="icon-box" v-if="item[menuProps.icon]">
-                    <HcIcon :name="item[menuProps.icon]" fill/>
-                </div>
-                <div class="label-box truncate">{{item[menuProps.label]}}</div>
-                <el-badge :value="item[menuProps.badge]" v-if="item[menuProps.badge] > 0"/>
-                <!--操作菜单-->
-                <div class="menu-icon" :class="item.showMenuIcon?'show':''" v-if="menusData.length > 0 && !item.isNoContextMenu">
-                    <div class="menu-popover-icon" @click.prevent.stop="menuLabelContextMenu($event,item)">
-                        <HcIcon name="apps" ui="text-2xl"/>
-                    </div>
-                </div>
-                <!--操作菜单 END-->
-            </div>
-        </template>
-        <!--右键菜单-->
-        <HcContextMenu ref="contextMenuRef" :datas="menusData" @item-click="handleMenuSelect" v-if="menusData.length > 0" @closed="handleMenuClosed"/>
-    </div>
-</template>
-
-<script setup>
-import {nextTick, ref, watch} from "vue";
-import {getObjValue, getObjVal} from "js-fast-way"
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    datas: {
-        type: Array,
-        default: () => ([])
-    },
-    keys: {
-        type: [String,Number],
-        default: ''
-    },
-    menus: {
-        type: Array,
-        default: () => ([])
-    },
-    props: {
-        type: Object,
-        default: () => ({})
-    },
-})
-
-//初始变量
-const keysValue = ref(props.keys)
-const menusData = ref(props.menus)
-const menuItemData = ref({})
-const menuProps = ref({})
-
-//监听
-watch(() => [
-    props.keys,
-    props.menus,
-    props.props,
-], ([keys, menus, prop]) => {
-    menusData.value = menus
-    keysValue.value = keys
-    setMenuProps(prop)
-})
-
-nextTick(() => {
-    setMenuProps(props.props)
-})
-
-
-//设置属性
-const setMenuProps = (prop) => {
-    const obj = getObjValue(prop)
-    menuProps.value = {
-        key: obj.key ?? 'key',
-        icon: obj.icon ?? 'icon',
-        label: obj.label ?? 'label',
-        badge: obj.badge ?? 'badge'
-    }
-}
-
-//事件
-const emit = defineEmits(['change', 'menuTap'])
-const MenuClick = (item) => {
-    const keys = menuProps.value
-    if (item[keys.key] !== keysValue.value) {
-        emit('change', item)
-    }
-}
-
-//鼠标右键事件
-const contextMenuRef = ref(null)
-const menuLabelContextMenu = (e,item) => {
-    const rows = menusData.value || [];
-    if (rows.length > 0 && !item.isNoContextMenu) {
-        e.preventDefault();
-        menuItemData.value = item;
-        item.showMenuIcon = true
-        //展开菜单
-        contextMenuRef.value?.showMenu(e)
-    } else {
-        menuItemData.value = false;
-        item.showMenuIcon = false
-    }
-}
-
-//鼠标右键菜单被点击
-const handleMenuSelect = ({key}) => {
-    const item = getObjValue(menuItemData.value);
-    emit('menuTap', {key, item})
-}
-
-//菜单关闭
-const handleMenuClosed = () => {
-    const item = menuItemData.value;
-    if (getObjVal(item)) {
-        menuItemData.value.showMenuIcon = false
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.hc-menu-simple-box {
-    position: relative;
-    padding: 20px;
-    .item-box {
-        position: relative;
-        display: flex;
-        align-items: center;
-        background: #f1f5f8;
-        border-radius: 6px;
-        padding: 8px 14px;
-        margin-bottom: 10px;
-        transition: 0.2s;
-        .icon-box {
-            position: relative;
-            width: 22px;
-            height: 22px;
-            border-radius: 5px;
-            background-color: var(--el-color-primary-light-8);
-            color: var(--el-color-primary-light-5);
-            font-size: 16px;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            margin-right: 14px;
-            transition: 0.2s;
-        }
-        .label-box {
-            position: relative;
-            color: #838791;
-            font-size: 14px;
-            transition: 0.2s;
-            flex: 1;
-        }
-        .menu-icon {
-            position: relative;
-            pointer-events: none;
-            transition: opacity 0.2s;
-            background: rgba(255, 255, 255, 0.25);
-            border-radius: 2px;
-            opacity: 0;
-            .menu-popover-icon {
-                display: flex;
-                align-items: center;
-                justify-content: center;
-                color: #878787;
-            }
-            &.show {
-                opacity: 1;
-                pointer-events: all;
-                cursor: context-menu;
-            }
-        }
-        &:not(.active) {
-            cursor: pointer;
-        }
-        &:hover {
-            .icon-box {
-                color: #ffffff;
-                background-color: var(--el-color-primary);
-            }
-            .label-box {
-                color: #1a1a1a;
-                font-weight: 500;
-            }
-            .menu-icon {
-                opacity: 1;
-                pointer-events: all;
-                cursor: context-menu;
-            }
-        }
-        &.active {
-            box-shadow: var(--hc-shadow);
-            .icon-box {
-                color: #ffffff;
-                background-color: var(--el-color-primary);
-            }
-            .label-box {
-                color: #1a1a1a;
-                font-weight: 500;
-            }
-        }
-    }
-}
-</style>
-
-<style lang="scss" scoped>
-.hc-menu-simple-box .item-box .el-badge {
-    position: absolute;
-    display: flex;
-    right: 12px;
-}
-</style>

+ 0 - 111
src/global/components_bak/hc-new-switch/index.vue

@@ -1,111 +0,0 @@
-<template>
-    <div class="hc-new-switch" :class="[`size-${size ?? 'large'}`, round ? 'round' : '', isDisabled ? 'disabled' : '']">
-        <template v-for="item in datas">
-            <div class="switch-bg" :class="item?.key == keyVal?'dots':''" @click="switchClick(item)">
-                <span>{{item?.name}}</span>
-                <span class="ml-2" v-if="item.text">{{item?.text}}</span>
-            </div>
-        </template>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch} from "vue";
-const props = defineProps({
-    datas: {
-        type: Array,
-        default: () => ([])
-    },
-    keys: {
-        type: [String,Number],
-        default: ''
-    },
-    size: { //large / default /small
-        type: [String,Number],
-        default: 'large'
-    },
-    round: {
-        type: Boolean,
-        default: true
-    },
-    disabled: {
-        type: Boolean,
-        default: false
-    },
-})
-
-//监听
-const keyVal = ref(props.keys)
-const isDisabled = ref(props.disabled)
-
-//监听
-watch(() => [
-    props.keys,
-    props.disabled
-], ([keys, disabled]) => {
-    keyVal.value = keys;
-    isDisabled.value = disabled;
-})
-
-//事件
-const emit = defineEmits(['change'])
-const switchClick = (item) => {
-    if (!isDisabled.value) {
-        if (item?.key == keyVal.value) return;
-        emit('change', item)
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.hc-new-switch {
-    isolation: isolate;
-    position: relative;
-    overflow: hidden;
-    height: 40px;
-    font-size: 14px;
-    background: #f1f5f8;
-    border-radius: 4px;
-    display: inline-flex;
-    align-items: center;
-    padding: 0 4px;
-    box-shadow: 4px 4px 8px 0 rgba(54,92,167,0.15) inset, -4px -4px 8px 0 #ffffff inset;
-    .switch-bg {
-        color: #838791;
-        padding: 0 14px;
-        border-radius: 4px;
-        height: 30px;
-        display: flex;
-        align-items: center;
-        justify-content: center;
-        &.dots {
-            color: #ffffff;
-            background: linear-gradient(90deg,var(--el-color-primary-light-5), var(--el-color-primary) 100%);
-            box-shadow: 4px 4px 8px 0 rgba(54,92,167,0.15), -3px -2px 8px 0 #ffffff;
-            transition: .1s;
-        }
-        &:not(.dots) {
-            cursor: pointer;
-        }
-    }
-    &.round {
-        border-radius: 40px;
-        .switch-bg {
-            border-radius: 80px;
-        }
-    }
-    &.size-default {
-        height: 32px;
-        font-size: 13px;
-        .switch-bg {
-            height: 25px;
-        }
-    }
-    &.disabled {
-        .switch-bg {
-            opacity: 0.5;
-            cursor: no-drop;
-        }
-    }
-}
-</style>

+ 0 - 50
src/global/components_bak/hc-no-data/index.vue

@@ -1,50 +0,0 @@
-<template>
-    <div class="hc-no-data-box" :class="ui">
-        <div class="no-data-c">
-            <img :src="src?src:notableform" alt=""/>
-            <div class="desc">{{tip}}</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import notableform from '~src/assets/view/notableform.svg';
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    src: {
-        type: [String,Number],
-        default: ''
-    },
-    tip: {
-        type: [String,Number],
-        default: '暂无数据'
-    },
-})
-</script>
-
-<style lang="scss" scoped>
-.hc-no-data-box {
-    position: relative;
-    height: 100%;
-    width: 100%;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .no-data-c {
-        position: relative;
-        width: 160px;
-        img {
-            width: 100%;
-            height: 100%;
-        }
-        .desc {
-            text-align: center;
-            font-size: 12px;
-            color: #9cbdf7;
-        }
-    }
-}
-</style>

+ 0 - 181
src/global/components_bak/hc-online-office/index.vue

@@ -1,181 +0,0 @@
-<template>
-    <div id='hc-vab-only-office' class="hc-vab-only-office">
-        <HcNoData ui="hc-office-no-data" tip="暂无文档文件数据"/>
-    </div>
-</template>
-
-<script setup>
-import {onMounted, ref, watch, onBeforeUnmount} from "vue";
-import {useAppStore} from "~src/store";
-
-const props = defineProps({
-    isEdit: { //可否编辑
-        type: Boolean,
-        default: true
-    },
-    lang: { //语言
-        type: String,
-        default: 'zh-CN'
-    },
-    src: { //文件地址
-        type: String,
-        default: ''
-    },
-    url: { //编辑保存地址
-        type: String,
-        default: 'http://47.110.251.215:8090/blade-manager/exceltab/callbackSave'
-    },
-    title: { //标题
-        type: String,
-        default: ''
-    },
-    type: { //类型
-        type: String,
-        default: 'docx'
-    },
-    isPrint: { //可否打印
-        type: Boolean,
-        default: false
-    },
-    isDownload: { //可否下载
-        type: Boolean,
-        default: true
-    },
-    key: { //文件key
-        type: String,
-        default: ''
-    },
-    token: {
-        type: String,
-        default: ''
-    },
-    model: {
-        type: String,
-        default: ''
-    },
-})
-
-//编辑器变量
-const userStore = useAppStore()
-const docEditor = ref(null)
-const userInfo = ref(userStore.getUserInfo);
-
-//监听
-watch(() => [
-    userStore.getUserInfo,
-    props.src
-], ([info, src]) => {
-    userInfo.value = info
-    if (src) {
-        initDocEditor(src)
-    }
-})
-
-//渲染完成
-onMounted(() => {
-    if (props.src) {
-        initDocEditor(props.src)
-    }
-})
-
-//初始化编辑器
-const initDocEditor = async (src) => {
-    const user = userInfo.value;
-    if( docEditor.value !== null ) {
-        docEditor.value?.destroyEditor();
-        docEditor.value = null;
-    }
-    if (src) {
-        //创建编辑器示例
-        docEditor.value = new DocsAPI.DocEditor('hc-vab-only-office', {
-            document: {
-                fileType: props.type,
-                key: props.key ||'',
-                title: props.title,
-                permissions: {
-                    edit: props.isEdit, //是否可以编辑: 只能查看,传false
-                    print: props.isPrint,
-                    download: props.isDownload,
-                    "fillForms": true,  //是否可以填写表格,如果将mode参数设置为edit,则填写表单仅对文档编辑器可用。 默认值与edit或review参数的值一致。
-                    "review": true      //跟踪变化
-                },
-                url: src,
-            },
-            documentType: getFileType(props.type),
-            editorConfig: {
-                callbackUrl: props.url, //"编辑word后保存时回调的地址,这个api需要自己写了,将编辑后的文件通过这个api保存到自己想要的位置
-                lang: props.lang,       //语言设置
-                //定制
-                customization: {
-                    autosave: true,     //是否自动保存
-                    chat: false,
-                    forcesave:true,     //开启手动保存
-                    comments: false,
-                    help: true,
-                    hideRightMenu:true,
-                    plugins: false,     //是否显示插件
-                },
-                user:{
-                    id: user.user_id,
-                    name: user.user_name
-                },
-                mode: props.model ? props.model : 'edit',
-            },
-            width: '100%',
-            height: '100%',
-            token: props.token || ''
-        })
-    }
-}
-
-//获取文件类型
-const getFileType = (type) => {
-    let docType = ''
-    let fileTypesDoc = [
-        'doc', 'docm', 'docx', 'dot', 'dotm', 'dotx', 'epub', 'fodt', 'htm', 'html', 'mht', 'odt', 'ott', 'pdf', 'rtf', 'txt', 'djvu', 'xps',
-    ]
-    let fileTypesCsv = [
-        'csv', 'fods', 'ods', 'ots', 'xls', 'xlsm', 'xlsx', 'xlt', 'xltm', 'xltx',
-    ]
-    let fileTypesPPt = [
-        'fodp', 'odp', 'otp', 'pot', 'potm', 'potx', 'pps', 'ppsm', 'ppsx', 'ppt', 'pptm', 'pptx',
-    ]
-    if (fileTypesDoc.includes(type)) {
-        docType = 'text'
-    }
-    if (fileTypesCsv.includes(type)) {
-        docType = 'spreadsheet'
-    }
-    if (fileTypesPPt.includes(type)) {
-        docType = 'presentation'
-    }
-    return docType
-}
-
-//销毁
-onBeforeUnmount(() => {
-    if( docEditor.value !== null ) {
-        docEditor.value?.destroyEditor();
-        docEditor.value = null;
-    }
-})
-</script>
-
-<style lang="scss" scoped>
-.hc-vab-only-office {
-    position: relative;
-    width: 100%;
-    height: 100%;
-}
-</style>
-
-<style lang="scss">
-.hc-office-no-data.hc-no-data-box {
-    .no-data-c {
-        width: 300px;
-        .desc {
-            font-size: 20px;
-        }
-    }
-}
-</style>

+ 0 - 28
src/global/components_bak/hc-page-header/index.vue

@@ -1,28 +0,0 @@
-<template>
-    <Suspense v-if="isBody">
-        <Teleport to="#hc-header-page-name">
-            <div class="hc-header-page-extra">
-                <slot></slot>
-            </div>
-        </Teleport>
-    </Suspense>
-</template>
-
-<script setup>
-import {nextTick, ref} from "vue";
-const isBody = ref(false)
-
-//渲染完成
-nextTick(()=> {
-    //页面渲染完成后,再让 vue3 的 Teleport,挂载到指定节点
-    isBody.value = true
-})
-
-</script>
-
-<style lang="scss">
-.hc-header-page-extra {
-    position: relative;
-    margin-left: 24px;
-}
-</style>

+ 0 - 91
src/global/components_bak/hc-page/index.vue

@@ -1,91 +0,0 @@
-<template>
-    <div class="card-page-box" :style="`justify-content:${align};`">
-        <el-pagination background layout="total, prev, pager, next, sizes, jumper" :page-sizes="sizes" :total="totalv" :page-size="sizev" :current-page="currentv" @size-change="sizesUpdate" @current-change="pagesUpdate"/>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch} from "vue";
-const props = defineProps({
-    sizes: {
-        type: Array,
-        default: () => ([10, 20, 30, 40, 50])
-    },
-    pages: {
-        type: Object,
-        default: () => ({
-            current: 1,
-            size: 10,
-            total: 0
-        })
-    },
-    align: {
-        type: String,
-        default: 'flex-end'
-    },
-})
-
-//变量
-const objData = ref(JSON.parse(JSON.stringify(props.pages)))
-const currentv = ref(objData.value?.current ?? 0)
-const sizev = ref(objData.value?.size ?? 0)
-const totalv = ref(objData.value?.total ?? 0)
-
-//监听
-watch(() => [
-    props.pages?.current,
-    props.pages?.size,
-    props.pages?.total
-], ([current, size, total]) => {
-    currentv.value = current ?? 0;
-    sizev.value = size ?? 0;
-    totalv.value = total ?? 0;
-})
-
-//事件
-const emit = defineEmits(['change'])
-const pagesUpdate = (val) => {
-    //currentv.value = val;
-    emit('change', {
-        current: val,
-        size: sizev.value
-    })
-}
-
-//条数改变
-const sizesUpdate = (val) => {
-    //sizev.value = val;
-    emit('change', {
-        current: currentv.value,
-        size: val
-    })
-}
-</script>
-
-<style lang="scss" scoped>
-.card-page-box {
-    position: relative;
-    display: flex;
-    justify-content: flex-end;
-    align-items: center;
-    flex: 1;
-}
-</style>
-
-<style lang="scss">
-.card-page-box {
-    .el-pagination.is-background .btn-next, .el-pagination.is-background .btn-prev, .el-pagination.is-background .el-pager li {
-        border: 1px solid #e2e2e2;
-    }
-    .el-pagination.is-background .el-pager li:not(.is-disabled).is-active {
-        border: 1px solid var(--el-color-primary);
-    }
-    .el-pagination .el-select .el-input {
-        width: 100px;
-    }
-    .el-pagination__sizes {
-        margin: 0 0 0 16px;
-    }
-}
-
-</style>

+ 0 - 63
src/global/components_bak/hc-pdf/index.vue

@@ -1,63 +0,0 @@
-<template>
-    <div class="hc-pdf-box" :class="ui">
-        <div class="pdf-embed" v-if="url">
-            <embed :src="url" width='100%' height='100%' type="application/pdf"/>
-        </div>
-        <div class="pdf-embed hc-no-table-form" v-else>
-            <div class="table-form-no">
-                <img :src="notableform" alt=""/>
-                <div class="desc">暂无 PDF 数据</div>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import {ref, watch} from "vue";
-import notableform from '~src/assets/view/notableform.svg';
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    src: {
-        type: String,
-        default: ''
-    },
-})
-
-const url = ref(props.src ?? '');
-
-//监听
-watch(() => [
-    props.src
-], ([src]) => {
-    url.value = src ?? '';
-})
-
-</script>
-
-<style lang="scss" scoped>
-.hc-pdf-box, .pdf-embed {
-    position: relative;
-    height: 100%;
-    width: 100%;
-}
-
-.hc-no-table-form {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .table-form-no {
-        position: relative;
-        img {
-            width: 350px;
-        }
-        .desc {
-            text-align: center;
-            font-size: 20px;
-            color: #aaa;
-        }
-    }
-}
-</style>

+ 0 - 205
src/global/components_bak/hc-report-experts/index.vue

@@ -1,205 +0,0 @@
-<template>
-    <div class="hc-report-modal-form-item">
-        <div class="hc-form-item-btn">
-            <el-button type="primary" size="default" @click="tableExpertsAddClick">
-                <HcIcon name="add"/>
-                <span>添加</span>
-            </el-button>
-        </div>
-        <div class="hc-table-ref-box no-border" v-if="tableExpertsData.length > 0">
-            <el-table :data="tableExpertsData" border style="width: 100%">
-                <el-table-column prop="name" label="姓名" align="center" width="120"/>
-                <el-table-column prop="position" label="职位" align="center" width="130"/>
-                <el-table-column prop="group" label="是否为组长" align="center" width="120">
-                    <template #default="scope">
-                        {{arrKeyValue(groupSelectData, 'value', 'label', scope.row.group)}}
-                    </template>
-                </el-table-column>
-                <el-table-column prop="idCard" label="身份证" align="center"/>
-                <el-table-column prop="phone" label="手机号" align="center" width="140"/>
-                <el-table-column prop="action" label="操作" align="center" width="140">
-                    <template #default="scope">
-                        <el-button type="primary" size="small" @click="tableExpertsEditClick(scope)">编辑</el-button>
-                        <el-button type="danger" size="small" @click="tableExpertsDelClick(scope)">删除</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-        </div>
-    </div>
-
-    <!--新增编辑表单-->
-    <HcDialog :show="isInfoModal" :title="`${isModalType}专家信息`" widths="26rem" @close="onInfoModalClose" @save="onInfoModalSave" append-to-body>
-        <el-form ref="formRef" :model="formModel" :rules="formRules" label-width="auto" size="large">
-            <el-form-item label="姓名" prop="name">
-                <el-input v-model="formModel.name" placeholder="请输入姓名"/>
-            </el-form-item>
-            <el-form-item label="职位" prop="position">
-                <el-input v-model="formModel.position" placeholder="请输入职位"/>
-            </el-form-item>
-            <el-form-item label="组长" prop="group">
-                <el-select v-model="formModel.group" block>
-                    <el-option v-for="item in groupSelectData" :label="item.label" :value="item.value"/>
-                </el-select>
-            </el-form-item>
-            <el-form-item label="身份证" prop="idCard">
-                <el-input v-model="formModel.idCard" placeholder="请输入身份证"/>
-            </el-form-item>
-            <el-form-item label="手机号" prop="phone">
-                <el-input v-model="formModel.phone" placeholder="请输入手机号"/>
-            </el-form-item>
-        </el-form>
-    </HcDialog>
-
-</template>
-
-<script setup>
-import {onMounted, ref, watch} from "vue";
-import {getArrValue, deepClone, arrKeyValue, formValidate, isIdCard, isPhone} from "js-fast-way"
-
-const props = defineProps({
-    modelValue: {
-        type: Array,
-        default: () => ([])
-    },
-})
-
-//变量
-const tableExpertsData = ref([])
-const isInfoModal = ref(false)
-const isModalType = ref('新增')
-const tableIndex = ref(null)
-
-//渲染完成
-onMounted(() => {
-    tableExpertsData.value = getArrValue(props.modelValue)
-})
-
-//监听
-watch(() => [
-    props.modelValue
-], ([val]) => {
-    tableExpertsData.value = getArrValue(val)
-})
-
-//是否为组件
-const groupSelectData = [
-    {label: '是', value: 1},
-    {label: '否', value: 2}
-]
-
-//表单
-const formRef = ref(null)
-const formModel = ref({
-    name: '', position: '', group: '', idCard: '', phone: ''
-})
-
-const formRules = ref({
-    name: {
-        required: true,
-        trigger: "blur",
-        message: "请输入姓名"
-    },
-    position: {
-        required: true,
-        trigger: "blur",
-        message: "请输入职位"
-    },
-    group: {
-        required: true,
-        trigger: "blur",
-        message: "请选择是否为组长"
-    },
-    idCard: {
-        required: true,
-        validator: (rule, value, callback) => {
-            if (!value) {
-                callback(new Error('请输入身份证号'))
-            } else if (!isIdCard(value)) {
-                callback(new Error('身份证号码格式错误'))
-            } else {
-                callback()
-            }
-        },
-        trigger: 'blur'
-    },
-    phone: {
-        required: true,
-        validator: (rule, value, callback) => {
-            if (!value) {
-                callback(new Error('请输入手机号'))
-            } else if (!isPhone(value)) {
-                callback(new Error('身份证号码格式错误'))
-            } else {
-                callback()
-            }
-        },
-        trigger: 'blur'
-    },
-})
-
-
-//事件
-const emit = defineEmits(['change', 'update:modelValue'])
-
-
-//添加专家信息
-const tableExpertsAddClick = () => {
-    formModel.value = {}
-    tableIndex.value = null
-    isModalType.value = '新增'
-    isInfoModal.value = true
-}
-
-//编辑专家信息
-const tableExpertsEditClick = ({row, $index}) => {
-    formModel.value = deepClone(row)
-    tableIndex.value = $index
-    isModalType.value = '编辑'
-    isInfoModal.value = true
-}
-
-//编辑保存
-const onInfoModalSave = async () => {
-    const res = await formValidate(formRef.value)
-    if (res) {
-        if (isModalType.value === '新增') {
-            tableExpertsData.value.push(formModel.value)
-        } else {
-            const index = tableIndex.value
-            tableExpertsData.value[index] = formModel.value
-        }
-        onInfoModalClose()
-        setEmitData()
-    }
-}
-
-//关闭弹窗
-const onInfoModalClose = () => {
-    isInfoModal.value = false
-    formModel.value = {}
-    tableIndex.value = null
-}
-
-//删除专家信息
-const tableExpertsDelClick = ({$index}) => {
-    tableExpertsData.value.splice($index, 1);
-    setEmitData()
-}
-
-//事件
-const setEmitData = () => {
-    emit('update:modelValue', tableExpertsData.value)
-    emit('change', tableExpertsData.value)
-}
-
-</script>
-
-<style lang="scss" scoped>
-.hc-report-modal-form-item {
-    position: relative;
-    width: 100%;
-    .hc-table-ref-box {
-        margin-top: 14px;
-    }
-}
-</style>

+ 0 - 287
src/global/components_bak/hc-report-modal/index.vue

@@ -1,287 +0,0 @@
-<template>
-    <el-dialog v-model="isShow" :title="title" :width="widths" class="hc-modal-border" draggable destroy-on-close append-to-body @closed="cancelReportClick">
-        <el-form ref="formRef" :model="formModel" :rules="formRules" label-width="auto" size="large">
-            <el-form-item label="任务名称" prop="taskName">
-                <el-input v-model="formModel.taskName" disabled/>
-            </el-form-item>
-            <el-form-item label="验收日期" prop="date">
-                <el-date-picker type="date" v-model="formModel.date" class="block" value-format="YYYY-MM-DD" :clearable="false"/>
-            </el-form-item>
-            <el-form-item label="申请内容" v-if="isDatas && reportDatas.length > 0">
-                <div class="task-tag-data-box">
-                    <template v-for="(item,index) in reportDatas" :key="item.id">
-                        <el-tag type="info" size="default" closable @close="taskTagClose(index)">{{item.name}}</el-tag>
-                    </template>
-                </div>
-            </el-form-item>
-            <el-form-item label="上传附件">
-                <HcFormItemUpload
-                    v-model="formModel.pdfUrl"
-                    accept="application/pdf,.doc,.docx,application/msword"
-                    formatTip="PDF、Word格式文件"
-                />
-            </el-form-item>
-            <el-form-item label="验收专家信息" prop="experts">
-                <HcReportExperts v-model="formModel.experts"/>
-            </el-form-item>
-            <el-form-item label="申请说明">
-                <el-input type="textarea" v-model="formModel.taskContent" placeholder="请输入申请说明" :autosize="{ minRows: 3, maxRows: 5 }"/>
-            </el-form-item>
-            <el-form-item label="任务流程" prop="fixedFlowId">
-                <el-select v-model="formModel.fixedFlowId" block @change="handleProcessValue">
-                    <el-option v-for="item in processData" :label="item.fixedFlowName" :disabled="item.disabled" :value="item.id"/>
-                </el-select>
-            </el-form-item>
-            <el-form-item label="任务人" prop="userTasks" v-if="diyProcessUser">
-                <HcTasksUser ui="w-full" :projectId="projectId" :contractId="contractId" @change="diyProcessUserChange"/>
-            </el-form-item>
-            <el-form-item label="任务人" v-else>
-                <div class="form-item-div">{{linkUserJoinString}}</div>
-            </el-form-item>
-        </el-form>
-        <template #footer>
-            <div class="dialog-footer">
-                <el-button size="large" @click="cancelReportClick">
-                    <HcIcon name="close"/>
-                    <span>取消</span>
-                </el-button>
-                <el-button type="primary" hc-btn :loading="formReportLoading" @click="formReportClick">
-                    <HcIcon name="check"/>
-                    <span>提交</span>
-                </el-button>
-            </div>
-        </template>
-    </el-dialog>
-</template>
-
-<script setup>
-import {ref,watch,onMounted} from "vue";
-import tasksFlowApi from '~api/tasks/flow';
-import {formValidate, getArrValue, arrIndex} from "js-fast-way"
-
-const props = defineProps({
-    show: {
-        type: Boolean,
-        default: false
-    },
-    title: {
-        type: String,
-        default: '上报审批'
-    },
-    widths: {
-        type: String,
-        default: '47rem'
-    },
-    taskName: {
-        type: String,
-        default: ''
-    },
-    ids: {
-        type: String,
-        default: null
-    },
-    projectId: {
-        type: [String,Number],
-        default: ''
-    },
-    contractId: {
-        type: [String,Number],
-        default: ''
-    },
-    url: {
-        type: [String,Number],
-        default: ''
-    },
-    datas: {
-        type: Array,
-        default: () => ([])
-    },
-    isDatas: {
-        type: Boolean,
-        default: false
-    },
-    addition: {
-        type: Object,
-        default: () => ({})
-    },
-})
-
-//变量
-const isShow = ref(props.show)
-const projectId = ref(props.projectId)
-const contractId = ref(props.contractId)
-const ApiUrl = ref(props.url)
-const reportDatas = ref(props.datas)
-
-//表单
-const formRef = ref(null)
-const processData = ref([])
-const formModel = ref({
-    projectId: projectId.value, contractId: contractId.value, ids: props.ids, experts: [],
-    userTasks: null, taskName: props.taskName, fixedFlowId: '', ...props.addition
-})
-const formRules = ref({
-    date: {
-        required: true,
-        trigger: "blur",
-        message: "请选择验收日期"
-    },
-    experts: {
-        required: true,
-        trigger: "blur",
-        message: "请完善专家信息"
-    },
-    fixedFlowId: {
-        required: true,
-        trigger: "blur",
-        message: "请选择任务流程"
-    },
-    userTasks: {
-        required: true,
-        trigger: "blur",
-        message: "请选择任务人"
-    }
-})
-
-//监听
-watch(() => [
-    props.show,
-    props.projectId,
-    props.contractId,
-    props.taskName,
-    props.ids,
-    props.url,
-    props.addition,
-    props.datas
-], ([val,pid,cid,name,ids,url,addition, datas]) => {
-    isShow.value = val
-    projectId.value = pid
-    contractId.value = cid
-    ApiUrl.value = url
-    //更新到表单数据
-    formModel.value = {
-        projectId: pid, contractId: cid, ids: ids, taskName: name,
-        taskContent: '', fixedFlowId: '', experts: [],
-        ...addition
-    }
-    reportDatas.value = datas
-    if (val) {
-        getProcessDatasApi()
-    }
-})
-
-//渲染完成
-onMounted(() => {
-    getProcessDatasApi()
-})
-
-const processDefaultData = [{ id: 0, fixedFlowName: '自定义流程', disabled: false}]
-const getProcessDatasApi = () => {
-    if (isShow.value) {
-        getProcessData()
-    }
-}
-
-//获取流程数据
-const linkUserJoinString = ref('')
-const getProcessData = async () => {
-    linkUserJoinString.value = ''
-    const { error, code, data } = await tasksFlowApi.getPageData({
-        projectId: projectId.value,
-        contractId: contractId.value,
-        current: 1, size: 100
-    })
-    if (!error && code === 200) {
-        const arr = getArrValue(data['records'])
-        processData.value = [...processDefaultData, ...arr]
-    } else {
-        processData.value = processDefaultData
-    }
-}
-
-//流程数据切换
-const diyProcessUser = ref(false)
-const handleProcessValue = (val) => {
-    if (val > 0) {
-        diyProcessUser.value = false
-        const list = processData.value
-        const index = arrIndex(list, 'id', val)
-        linkUserJoinString.value = list[index]?.linkUserJoinString
-    } else {
-        linkUserJoinString.value = ''
-        diyProcessUser.value = true
-    }
-}
-
-//自定义流程任务人选择完毕
-const diyProcessUserChange = (user) => {
-    formModel.value.userTasks = user
-}
-
-const emit = defineEmits(['hide','finish', 'tagClose'])
-
-//审批内容的标签移除
-const taskTagClose = (index) => {
-    reportDatas.value.splice(index, 1)
-    emit('tagClose', index)
-    if (reportDatas.value.length <= 0) {
-        window.$message?.warning('请重新选择要上报的内容')
-        cancelReportClick()
-    }
-}
-
-//取消
-const cancelReportClick = () => {
-    linkUserJoinString.value = ''
-    isShow.value = false
-    emit('hide', false)
-}
-//上报
-const formReportClick = async () => {
-    const res = await formValidate(formRef.value)
-    if (res) await batchApprovalApi()
-}
-
-//上报请求
-const formReportLoading = ref(false)
-const batchApprovalApi = async () => {
-    console.log(formModel.value)
-    /*formReportLoading.value = true
-    //发起请求
-    const { error, code, data } = await ApprovalApi(ApiUrl.value, {
-        projectId: projectId.value,
-        contractId: contractId.value,
-        ...formModel.value
-    })
-    linkUserJoinString.value = ''
-    formReportLoading.value = false
-    if (!error && code === 200) {
-        isShow.value = false
-        window.$message?.success('上报成功')
-        emit('hide', false)
-        emit('finish', data)
-    } else {
-        processData.value = []
-    }*/
-}
-</script>
-
-<style lang="scss" >
-.task-tag-data-box {
-    position: relative;
-    border: 1px solid #e0e0e6;
-    border-radius: 4px;
-    padding: 5px;
-    min-height: 40px;
-    display: flex;
-    align-items: center;
-    flex-flow: row wrap;
-    width: 100%;
-    .el-tag {
-        margin: 5px;
-    }
-}
-.hc-report-modal-form-item .hc-table-ref-box {
-    margin-top: 14px;
-}
-</style>

+ 0 - 168
src/global/components_bak/hc-sms-auth/index.vue

@@ -1,168 +0,0 @@
-<template>
-    <el-dialog v-model="showModal" title="短信认证" width="26rem" class="hc-modal-border" draggable destroy-on-close @closed="cancelClick">
-        <el-form ref="reportFormRef" :model="reportModel" :rules="reportRules" label-width="auto" size="large">
-            <el-form-item label="手机号码">
-                <el-input v-model="phoneVal" placeholder="手机号码" disabled/>
-            </el-form-item>
-            <el-form-item class="hc-input-button-group" label="验证码" prop="code">
-                <el-input v-model="reportModel.code" placeholder="请输入验证码"/>
-                <el-button type="primary" size="large" @click="getCodeClick" :disabled="isDisabled">
-                    {{isDisabled ? '倒计时' + currentTime + 's' : '获取验证码'}}
-                </el-button>
-            </el-form-item>
-        </el-form>
-        <template #footer>
-            <div class="dialog-footer">
-                <el-button size="large" @click="cancelClick">
-                    <HcIcon name="close"/>
-                    <span>取消</span>
-                </el-button>
-                <el-button type="primary" hc-btn :loading="isLoading" @click="confirmClick">
-                    <HcIcon name="check"/>
-                    <span>确认</span>
-                </el-button>
-            </div>
-        </template>
-    </el-dialog>
-</template>
-
-<script setup>
-import {ref, watch} from "vue"
-import {useAppStore} from "~src/store";
-//import {sendNotice, saveSmsTimeout} from '~api/other';
-import config from '~src/config/index';
-
-import {formValidate} from "js-fast-way"
-//参数
-const props = defineProps({
-    show: {
-        type: Boolean,
-        default: false
-    },
-    loading: {
-        type: Boolean,
-        default: false
-    },
-})
-
-//变量
-const userStore = useAppStore()
-const userInfo = ref(userStore.getUserInfo);
-const phoneVal = ref(config.smsPhone + '' || userInfo.value.phone + '')
-const showModal = ref(props.show)
-const isLoading = ref(props.loading)
-
-//监听
-watch(() => [
-    props.show,
-    props.loading,
-    userStore.getUserInfo
-], ([show,  loading, user]) => {
-    userInfo.value = user
-    showModal.value = show
-    isLoading.value = loading
-})
-
-//返回的验证码
-const resCode = ref('')
-//表单
-const reportFormRef = ref(null)
-const reportModel = ref({code: null})
-const reportRules = ref({
-    code: {
-        required: true,
-        validator: (rule, value, callback) => {
-            const code = resCode.value ?? ''
-            if (!code) {
-                callback(new Error('请先获取验证码'))
-            } else if (!value) {
-                callback(new Error('请输入验证码'))
-            } else if (code !== value) {
-                callback(new Error('验证码错误'))
-            } else {
-                callback()
-            }
-        },
-        trigger: "blur",
-    },
-})
-
-//短信验证码
-const isDisabled = ref(false)   //是否开启倒计时
-const totalTime = 60                  //总时间,单位秒
-const recordingTime = ref(0)    //记录时间变量
-const currentTime = ref(0)      //显示时间变量
-
-//获取短信验证码
-const getCodeClick = async () => {
-    /*const {error, code, msg} = await sendNotice({
-        phone: phoneVal.value
-    },false)
-    //处理数据
-    if (!error && code === 200 && msg) {
-        resCode.value = msg
-        //把显示时间设为总时间
-        currentTime.value = totalTime
-        //开始倒计时
-        isDisabled.value = true
-        //执行倒计时
-        checkingTime();
-        window?.$message?.success('发送成功')
-    } else {
-        resCode.value = ''
-        window?.$message?.error(msg || '请求异常')
-    }*/
-}
-
-//倒计时
-const checkingTime = () => {
-    //判断是否开启
-    if (isDisabled.value) {
-        //判断显示时间是否已到0,判断记录时间是否已到总时间
-        if (currentTime.value > 0 && recordingTime.value <= totalTime) {
-            //记录时间增加 1
-            recordingTime.value ++;
-            //显示时间,用总时间 - 记录时间
-            currentTime.value = totalTime - recordingTime.value;
-            //1秒钟后,再次执行本方法
-            setTimeout(() => {
-                checkingTime();
-            }, 1000)
-        } else {
-            //时间已完成,还原相关变量
-            isDisabled.value = false;		//关闭倒计时
-            recordingTime.value = 0;	//记录时间为0
-            currentTime.value = totalTime;	//显示时间为总时间
-        }
-    } else {
-        //倒计时未开启,初始化默认变量
-        isDisabled.value = false;
-        recordingTime.value = 0;
-        currentTime.value = totalTime;
-    }
-}
-
-//事件
-const emit = defineEmits(['cancel', 'confirm'])
-
-//取消
-const cancelClick = () => {
-    emit('cancel')
-}
-
-//确认
-const confirmClick = async () => {
-    const validate = await formValidate(reportFormRef.value)
-    if (validate) {
-        saveSmsTimeoutApi()
-        emit('confirm')
-    }
-}
-
-//验证码过期时间
-const saveSmsTimeoutApi = async () => {
-    /*await saveSmsTimeout({
-        code: resCode.value
-    });*/
-}
-</script>

+ 0 - 76
src/global/components_bak/hc-status/index.vue

@@ -1,76 +0,0 @@
-<template>
-    <div class="hc-page-status-box" :class="ui">
-        <div class="page-status">
-            <img class="page-status-img" :src="nowebp" alt="" v-if="isType === 'NoForm'"/>
-            <div class="page-status-text" v-if="isText">{{isText}}</div>
-            <div class="page-status-desc" v-if="isDesc">{{isDesc}}</div>
-        </div>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch} from "vue";
-import nowebp from '~src/assets/view/Web2x_x.webp';
-
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ""
-    },
-    text: {
-        type: String,
-        default: "暂无相关数据"
-    },
-    desc: {
-        type: String,
-        default: ""
-    },
-    type: {
-        type: String,
-        default: "NoForm"
-    },
-})
-
-//变量
-const isType = ref(props.type)
-const isText = ref(props.text)
-const isDesc = ref(props.desc)
-
-//监听
-watch(() => [
-    props.type,
-    props.text,
-    props.desc,
-], ([type, text, desc]) => {
-    isType.value = type
-    isText.value = text
-    isDesc.value = desc
-})
-</script>
-
-<style lang="scss" scoped>
-.hc-page-status-box {
-    position: relative;
-    height: 100%;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .page-status {
-        position: relative;
-        .page-status-img {
-            width: 350px;
-        }
-        .page-status-text {
-            text-align: center;
-            font-size: 20px;
-            color: #aaa;
-        }
-        .page-status-desc {
-            text-align: center;
-            font-size: 14px;
-            color: #c5c5c5;
-            margin-top: 8px;
-        }
-    }
-}
-</style>

+ 0 - 286
src/global/components_bak/hc-table/index.vue

@@ -1,286 +0,0 @@
-<template>
-    <div class="hc-table-ref-box" :class="ui">
-        <el-table ref="tableRef" hc :data="tableData" :height="heights" v-loading="isLoading" stripe :row-key="rowKey" :border="isBorder" :highlight-current-row="isCurrentRow" @selection-change="tableSelectionChange"
-                  @row-click="tableRowClick" @row-dblclick="tableRowDblClick" @row-contextmenu="tableRowContextmenu" @cell-click="tableCellClick" @cell-dblclick="tableCellDblClick"   @select="select"
-                  @cell-contextmenu="tableCellContextmenu" style="width: 100%;">
-            <el-table-column type="selection" width="50" v-if="isCheck"/>
-            <el-table-column type="index" prop="num" label="序号" width="100" v-if="isIndex && !isSlotNum">
-                <template #default="scope">
-                    <div class="table-column-sort">
-                        <span class="mr-3">{{scope.$index + 1}}</span>
-                        <template v-if="isDataSort">
-                            <span class="text-link text-lg">
-                                <HcIcon name="arrow-up" @click="upSortClick(scope.$index)"/>
-                            </span>
-                            <span class="text-link text-lg">
-                                <HcIcon name="arrow-down" @click="downSortClick(scope.$index)"/>
-                            </span>
-                        </template>
-                    </div>
-                </template>
-            </el-table-column>
-            <el-table-column type="index" prop="num" width="100" v-if="isIndex && isSlotNum">
-                <template #header>
-                    <div class="table-column-header-num">
-                        <span class="mr-3">序号</span>
-                        <slot name='table-column-header-num'></slot>
-                    </div>
-                </template>
-            </el-table-column>
-            <template v-for="item in columns">
-                <el-table-column :prop="item.key" :label="item.name" :align="item.align ?? 'left'" :width="item.width ?? ''" :fixed="item.fixed ?? false">
-                    <template #default="scope" v-if="item.isSlot">
-                        <slot :name='item.key' :row="scope.row" :index="scope.$index"/>
-                    </template>
-                </el-table-column>
-            </template>
-        </el-table>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch,nextTick,useSlots} from "vue";
-import Sortable from 'sortablejs'
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    column: {
-        type: Array,
-        default: () => ([])
-    },
-    datas: {
-        type: Array,
-        default: () => ([])
-    },
-    loading: {
-        type: Boolean,
-        default: false
-    },
-    isCheck: {
-        type: Boolean,
-        default: false
-    },
-    isIndex: {
-        type: Boolean,
-        default: true
-    },
-    rowKey: {
-        type: String,
-        default: 'id'
-    },
-    border: {
-        type: Boolean,
-        default: false
-    },
-    isRowDrop: {
-        type: Boolean,
-        default: false
-    },
-    isCurrentRow: {
-        type: Boolean,
-        default: false
-    },
-    heights: {
-        type: String,
-        default: '100%'
-    },
-    isSort: {
-        type: Boolean,
-        default: false
-    },
-})
-
-//初始变量
-const tableRef = ref(null)
-const columns = ref(props.column)
-const tableData = ref(props.datas)
-const isLoading = ref(props.loading)
-const isBorder = ref(props.border)
-const isDataSort = ref(props.isSort)
-
-//监听
-watch(() => [
-    props.datas,
-    props.loading,
-    props.border,
-    props.isSort,
-], ([datas, loading, border, isSort]) => {
-    tableData.value = datas;
-    isLoading.value = loading;
-    isBorder.value = border;
-    isDataSort.value = isSort;
-})
-
-//监听表头
-watch(() => [
-    props.column
-], ([column]) => {
-    columns.value = column;
-    setIsSlots()
-})
-
-//加载完成
-nextTick(()=>{
-    setIsSlots()
-    if (props.isRowDrop && props.ui) {
-        tableRowDropInit(props.ui)
-    }
-})
-
-//判断<slot>是否有传值
-const slots = useSlots()
-const isSlotNum = !!slots['table-column-header-num']
-
-const setIsSlots = () => {
-    let arr = columns.value
-    for (let i = 0; i < arr.length; i++) {
-        arr[i].isSlot = !!slots[arr[i].key]
-    }
-    columns.value = arr
-}
-
-//事件
-const emit = defineEmits([
-    'selection-change', 'row-drop', 'row-sort',
-    'row-click', 'row-dblclick', 'row-contextmenu',
-    'cell-click', 'cell-dblclick', 'cell-contextmenu','single-select'
-])
-
-//清空多选
-const clearSelection = () => {
-    tableRef.value?.clearSelection()
-    emit('selection-change', [])
-}
-//返回当前选中的行
-const getSelectionRows = () => {
-    tableRef.value?.getSelectionRows()
-}
-
-//用于多选表格,切换某一行的选中状态, 如果使用了第二个参数,则可直接设置这一行选中与否
-const toggleRowSelection = (row, selected) => {
-    tableRef.value?.toggleRowSelection(row, selected)
-}
-
-//多选
-const tableSelectionChange = (rows) => {
-    let tableRows = rows.filter((item) => {
-        return (item??'') !== '';
-    })
-    emit('selection-change', tableRows)
-}
-
-//拖动排序处理
-const tableRowDropInit = (ui) => {
-    const tbody = document.querySelector(`.${ui} .el-table__body-wrapper tbody`)
-    Sortable.create(tbody, {
-        onEnd({ newIndex, oldIndex }) {
-            const rows = tableData.value
-            const currRow = rows.splice(oldIndex, 1)[0]
-            rows.splice(newIndex, 0, currRow)
-            tableData.value = rows
-            emit('row-drop', rows)
-        }
-    })
-}
-
-//当某一行被点击时会触发该事件
-const tableRowClick = (row, column, event) => {
-    emit('row-click', {row, column, event})
-}
-
-//当某一行被双击时会触发该事件
-const tableRowDblClick = (row, column, event) => {
-    emit('row-dblclick', {row, column, event})
-}
-
-//当某一行被鼠标右键点击时会触发该事件
-const tableRowContextmenu = (row, column, event) => {
-    emit('row-contextmenu', {row, column, event})
-}
-
-//当某个单元格被点击时会触发该事件
-const tableCellClick = (row, column, cell, event) => {
-    emit('cell-click', {row, column, cell, event})
-}
-
-//当某个单元格被双击击时会触发该事件
-const tableCellDblClick = (row, column, cell, event) => {
-    emit('cell-dblclick', {row, column, cell, event})
-}
-
-//当某个单元格被鼠标右键点击时会触发该事件
-const tableCellContextmenu = (row, column, cell, event) => {
-    emit('cell-contextmenu', {row, column, cell, event})
-}
-
-const select=(selection, row) =>{
-   
-    emit('single-select', {row})
-
-}
-//向上排序
-const upSortClick = (index) => {
-    const data = tableData.value
-    if(index !== 0) {
-        const tmp = data.splice(index - 1,1);
-        tableData.value.splice(index, 0, tmp[0]);
-        emit('row-sort', tableData.value)
-    } else {
-        window?.$message?.warning('已经处于置顶,无法上移')
-    }
-}
-
-//向下排序
-const downSortClick = (index) => {
-    const indexs = index + 1
-    const data = tableData.value
-    if(indexs !== data.length) {
-        const tmp = data.splice(indexs, 1);
-        tableData.value.splice(index, 0, tmp[0]);
-        emit('row-sort', tableData.value)
-    } else {
-        window?.$message?.warning('已经处于置底,无法下移')
-    }
-}
-
-// 暴露出去
-defineExpose({
-    clearSelection,
-    getSelectionRows,
-    toggleRowSelection,
-
-})
-</script>
-
-<style lang="scss">
-.hc-table-ref-box {
-    height: 100%;
-    .el-scrollbar .el-scrollbar__bar.is-vertical {
-        right: 0;
-    }
-    .el-scrollbar .el-scrollbar__bar.is-horizontal {
-        bottom: 2px;
-    }
-    .el-table__body-wrapper tr td.el-table-fixed-column--left,
-    .el-table__body-wrapper tr td.el-table-fixed-column--right,
-    .el-table__body-wrapper tr th.el-table-fixed-column--left,
-    .el-table__body-wrapper tr th.el-table-fixed-column--right,
-    .el-table__footer-wrapper tr td.el-table-fixed-column--left,
-    .el-table__footer-wrapper tr td.el-table-fixed-column--right,
-    .el-table__footer-wrapper tr th.el-table-fixed-column--left,
-    .el-table__footer-wrapper tr th.el-table-fixed-column--right,
-    .el-table__header-wrapper tr td.el-table-fixed-column--left,
-    .el-table__header-wrapper tr td.el-table-fixed-column--right,
-    .el-table__header-wrapper tr th.el-table-fixed-column--left,
-    .el-table__header-wrapper tr th.el-table-fixed-column--right {
-        --el-bg-color: #ebeef0;
-    }
-    .table-column-header-num {
-        position: relative;
-        display: flex;
-        align-items: center;
-    }
-}
-</style>

+ 0 - 231
src/global/components_bak/hc-table/index1.vue

@@ -1,231 +0,0 @@
-<template>
-    <div class="hc-table-ref-box" :class="ui">
-        <el-table ref="tableRef" hc :data="tableData" height="100%" v-loading="isLoading" stripe :row-key="rowKey" :border="isBorder" @selection-change="tableSelectionChange"
-                  @row-click="tableRowClick" @row-dblclick="tableRowDblClick" @row-contextmenu="tableRowContextmenu" @cell-click="tableCellClick" @cell-dblclick="tableCellDblClick"
-                  @cell-contextmenu="tableCellContextmenu" style="width: 100%;">
-            <el-table-column type="selection" width="50" v-if="isCheck"/>
-             <el-table-column type="expand">
-                 <slot name='table-expand-header'></slot>
-            </el-table-column>
-            <el-table-column type="index" prop="num" label="序号" width="80" v-if="isIndex && !isSlotNum"/>
-           
-            <el-table-column type="index" prop="num" width="100" v-if="isIndex && isSlotNum">
-                <template #header>
-                    <div class="table-column-header-num">
-                        <span class="mr-3">序号</span>
-                        <slot name='table-column-header-num'></slot>
-                    </div>
-                </template>
-            </el-table-column>
-
-            <template v-for="item in columns">
-                <el-table-column :prop="item.key" :label="item.name" :align="item.align ?? 'left'" :width="item.width ?? ''" :fixed="item.fixed ?? false">
-                    <template #default="scope" v-if="item.isSlot">
-                        <slot :name='item.key' :row="scope.row" :index="scope.$index"/>
-                    </template>
-                </el-table-column>
-            </template>
-        </el-table>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch,nextTick,useSlots} from "vue";
-import Sortable from 'sortablejs'
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    column: {
-        type: Array,
-        default: () => ([])
-    },
-    datas: {
-        type: Array,
-        default: () => ([])
-    },
-    loading: {
-        type: Boolean,
-        default: false
-    },
-    isCheck: {
-        type: Boolean,
-        default: false
-    },
-    isIndex: {
-        type: Boolean,
-        default: true
-    },
-    rowKey: {
-        type: String,
-        default: 'id'
-    },
-    border: {
-        type: Boolean,
-        default: false
-    },
-    isRowDrop: {
-        type: Boolean,
-        default: false
-    },
-})
-
-//初始变量
-const tableRef = ref(null)
-const columns = ref(props.column)
-const tableData = ref(props.datas)
-const isLoading = ref(props.loading)
-const isBorder = ref(props.border)
-
-//监听
-watch(() => [
-    props.datas,
-    props.loading,
-    props.border,
-], ([datas, loading, border]) => {
-    tableData.value = datas;
-    isLoading.value = loading;
-    isBorder.value = border;
-})
-
-//监听表头
-watch(() => [
-    props.column
-], ([column]) => {
-    columns.value = column;
-    setIsSlots()
-})
-
-//加载完成
-nextTick(()=>{
-    setIsSlots()
-    if (props.isRowDrop && props.ui) {
-        tableRowDropInit(props.ui)
-    }
-})
-
-//判断<slot>是否有传值
-const slots = useSlots()
-const isSlotNum = !!slots['table-column-header-num']
-
-const setIsSlots = () => {
-    let arr = columns.value
-    for (let i = 0; i < arr.length; i++) {
-        arr[i].isSlot = !!slots[arr[i].key]
-    }
-    columns.value = arr
-}
-
-//事件
-const emit = defineEmits([
-    'selection-change', 'row-drop',
-    'row-click', 'row-dblclick', 'row-contextmenu',
-    'cell-click', 'cell-dblclick', 'cell-contextmenu'
-])
-
-//清空多选
-const clearSelection = () => {
-    tableRef.value?.clearSelection()
-    emit('selection-change', [])
-}
-//返回当前选中的行
-const getSelectionRows = () => {
-    tableRef.value?.getSelectionRows()
-}
-
-//用于多选表格,切换某一行的选中状态, 如果使用了第二个参数,则可直接设置这一行选中与否
-const toggleRowSelection = (row, selected) => {
-    tableRef.value?.toggleRowSelection(row, selected)
-}
-
-//多选
-const tableSelectionChange = (rows) => {
-    let tableRows = rows.filter((item) => {
-        return (item??'') !== '';
-    })
-    emit('selection-change', tableRows)
-}
-
-//拖动排序处理
-const tableRowDropInit = (ui) => {
-    const tbody = document.querySelector(`.${ui} .el-table__body-wrapper tbody`)
-    Sortable.create(tbody, {
-        onEnd({ newIndex, oldIndex }) {
-            const rows = tableData.value
-            const currRow = rows.splice(oldIndex, 1)[0]
-            rows.splice(newIndex, 0, currRow)
-            tableData.value = rows
-            emit('row-drop', rows)
-        }
-    })
-}
-
-//当某一行被点击时会触发该事件
-const tableRowClick = (row, column, event) => {
-    emit('row-click', {row, column, event})
-}
-
-//当某一行被双击时会触发该事件
-const tableRowDblClick = (row, column, event) => {
-    emit('row-dblclick', {row, column, event})
-}
-
-//当某一行被鼠标右键点击时会触发该事件
-const tableRowContextmenu = (row, column, event) => {
-    emit('row-contextmenu', {row, column, event})
-}
-
-//当某个单元格被点击时会触发该事件
-const tableCellClick = (row, column, cell, event) => {
-    emit('cell-click', {row, column, cell, event})
-}
-
-//当某个单元格被双击击时会触发该事件
-const tableCellDblClick = (row, column, cell, event) => {
-    emit('cell-dblclick', {row, column, cell, event})
-}
-
-//当某个单元格被鼠标右键点击时会触发该事件
-const tableCellContextmenu = (row, column, cell, event) => {
-    emit('cell-contextmenu', {row, column, cell, event})
-}
-
-// 暴露出去
-defineExpose({
-    clearSelection,
-    getSelectionRows,
-    toggleRowSelection
-})
-</script>
-
-<style lang="scss">
-.hc-table-ref-box {
-    height: 100%;
-    .el-scrollbar .el-scrollbar__bar.is-vertical {
-        right: 0;
-    }
-    .el-scrollbar .el-scrollbar__bar.is-horizontal {
-        bottom: 2px;
-    }
-    .el-table__body-wrapper tr td.el-table-fixed-column--left,
-    .el-table__body-wrapper tr td.el-table-fixed-column--right,
-    .el-table__body-wrapper tr th.el-table-fixed-column--left,
-    .el-table__body-wrapper tr th.el-table-fixed-column--right,
-    .el-table__footer-wrapper tr td.el-table-fixed-column--left,
-    .el-table__footer-wrapper tr td.el-table-fixed-column--right,
-    .el-table__footer-wrapper tr th.el-table-fixed-column--left,
-    .el-table__footer-wrapper tr th.el-table-fixed-column--right,
-    .el-table__header-wrapper tr td.el-table-fixed-column--left,
-    .el-table__header-wrapper tr td.el-table-fixed-column--right,
-    .el-table__header-wrapper tr th.el-table-fixed-column--left,
-    .el-table__header-wrapper tr th.el-table-fixed-column--right {
-        --el-bg-color: #ebeef0;
-    }
-    .table-column-header-num {
-        position: relative;
-        display: flex;
-        align-items: center;
-    }
-}
-</style>

+ 0 - 181
src/global/components_bak/hc-tabs-simple/index.vue

@@ -1,181 +0,0 @@
-<template>
-    <div class="hc-sb-table">
-        <svg class="svg-tabs" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40px" height="45px">
-            <clipPath id="tabs">
-                <path fill-rule="evenodd" d="M40,45C15,36,33,0,0,0v45H40z"/>
-            </clipPath>
-        </svg>
-        <el-tabs v-model="curKey" :class="curIndex === 0 ? 'first' : curIndex === datas.length-1 ? 'fourth' : ''" @tab-change="tabClick">
-            <el-tab-pane v-for="item in datas" :label="item.label" :name="item.key">
-                <template #label>
-                    <HcIcon :name="item.icon" class="icon" v-if="item.icon"/>
-                    <span class="name">{{item.label}}</span>
-                </template>
-                <slot :name='`tab-${item.key}`'/>
-            </el-tab-pane>
-        </el-tabs>
-    </div>
-</template>
-
-<script setup>
-import {nextTick, ref, watch} from "vue";
-import {arrIndex} from "js-fast-way"
-const props = defineProps({
-    datas: {
-        type: Array,
-        default: () => []
-    },
-    cur: {
-        type: [String,Number],
-        default: ''
-    }
-})
-
-//初始变量
-const curKey = ref(props.cur)
-const curIndex = ref(0)
-
-//监听
-watch(() => [
-    props.cur,
-    props.datas
-], ([cur, datas]) => {
-    curKey.value = cur
-    getCurIndex(datas, cur)
-})
-
-//挂载完成
-nextTick(() => {
-    getCurIndex(props.datas, props.cur)
-})
-
-//获取索引
-const getCurIndex = (datas,key) => {
-    curIndex.value = arrIndex(datas, 'key', key)
-}
-
-//事件
-const emit = defineEmits(['tabClick'])
-const tabClick = (key) => {
-    curKey.value = key;
-    getCurIndex(props.datas, key)
-    emit('tabClick', key)
-}
-</script>
-
-<style lang="scss" scoped>
-.hc-sb-table {
-    position: relative;
-    height: 100%;
-    .svg-tabs {
-        opacity: 0;
-        width: 0;
-        height: 0;
-    }
-}
-</style>
-
-<style lang="scss">
-.hc-sb-table .el-tabs {
-    position: relative;
-    margin-top: -18px;
-    height: 100%;
-    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.1));
-    .el-tabs__header {
-        margin-bottom: 0;
-        .el-tabs__nav-wrap::after {
-            background-color: transparent;
-        }
-        .el-tabs__nav {
-            height: 45px;
-            .el-tabs__item {
-                margin-top: 5px;
-                padding: 0 20px;
-                user-select: none;
-                display: inline-flex;
-                align-content: center;
-                --el-text-color-primary: #838791;
-                background-color: #E5EBEF;
-                &::after {
-                    content: '';
-                    position: absolute;
-                    width: 1px;
-                    height: 15px;
-                    background-color: #CCCCCC;
-                    top: 12px;
-                    left: 0;
-                }
-                .hc-icon-i {
-                    margin-right: 5px;
-                }
-                .hc-icon-i, .name {
-                    position: relative;
-                    z-index: 10;
-                }
-            }
-            .el-tabs__item:nth-child(2) {
-                border-radius: 10px 0 0 0;
-                &::after {
-                    display: none;
-                }
-            }
-            .el-tabs__item:last-child {
-                border-radius: 0 10px 0 0;
-            }
-        }
-    }
-    .el-tabs__active-bar {
-        position: absolute;
-        height: 45px;
-        background: #f1f5f8;
-        &::after,
-        &::before {
-            content: '';
-            background: #f1f5f8;
-            width: 40px;
-            position: absolute;
-            height: 45px;
-            top: 0px;
-            clip-path: url(#tabs);
-            right: -40px;
-        }
-        &::before {
-            left:-40px;
-            right: auto;
-            // 水平翻转
-            transform: scaleX(-1);
-        }
-    }
-    &.first .el-tabs__active-bar {
-        &::before {
-            transform: scaleX(1);
-            left: -20px;
-            clip-path: none;
-            border-radius: 15px 0 0 0;
-        }
-    }
-    &.fourth .el-tabs__active-bar {
-        &::after {
-            transform: scaleX(-1);
-            right: -20px;
-            clip-path: none;
-            border-radius: 15px 0 0 0;
-        }
-    }
-    .el-tabs__content {
-        padding: 0;
-        background: #f1f5f8;
-        border-radius: 0 10px 10px 10px;
-        height: calc(100% - 46px);
-        .el-tab-pane {
-            position: relative;
-            height: 100%;
-            .hc-card-box.el-card {
-                height: 100%;
-                box-shadow: none;
-                border-radius: initial;
-            }
-        }
-    }
-}
-</style>

+ 0 - 329
src/global/components_bak/hc-tasks-user/index.vue

@@ -1,329 +0,0 @@
-<template>
-    <div :class="ui" class="hc-tasks-user">
-        <div class="tasks-user-box">
-            <div class="tag-user-list" @click="showModalClick">
-                <template v-for="(item,index) in UserDataList" :key="index">
-                    <el-tag>{{setCheckboxUserName(item)}}</el-tag>
-                    <HcIcon name="arrow-right" ui="arrow-icon-tag" v-if="(UserDataList.length - 1) > index"/>
-                </template>
-                <div class="tasks-placeholder" v-if="UserDataList.length <= 0"> 点击这里选择任务人 </div>
-            </div>
-        </div>
-
-        <!--选择任务人-->
-        <el-dialog v-model="showModal" title="选择任务人" width="62rem" class="hc-modal-border hc-modal-nop" draggable destroy-on-close append-to-body>
-            <div class="hc-tasks-user-modal-content-box">
-                <div class="tree-box">
-                    <el-scrollbar>
-                        <ElTree class="hc-tree-node-box" :props="ElTreeProps" :data="ElTreeData" node-key="roleId" highlight-current accordion :default-expanded-keys="[0]" @node-click="ElTreeNodeClick"/>
-                    </el-scrollbar>
-                </div>
-                <div class="user-box">
-                    <div class="y-user-list-box">
-                        <div class="title-box">
-                            <div class="title">可选择</div>
-                        </div>
-                        <div class="user-list">
-                            <el-scrollbar>
-                                <el-checkbox-group v-model="checkboxUserList">
-                                    <template v-for="item in signUserList">
-                                        <div class="user-item checkbox-li">
-                                            <el-checkbox :label="`${item['certificateUserName']}-${item['certificateUserId']}`">
-                                                <div class="item-user-name">{{item['certificateUserName']}}</div>
-                                            </el-checkbox>
-                                        </div>
-                                    </template>
-                                </el-checkbox-group>
-                            </el-scrollbar>
-                        </div>
-                    </div>
-                    <div class="s-user-list-box">
-                        <div class="title-box">
-                            <div class="title">已选择({{checkboxUserList.length}})</div>
-                            <el-button plain size="small" @click="sequenceModal = true">调整顺序</el-button>
-                        </div>
-                        <div class="user-list">
-                            <el-scrollbar>
-                                <template v-for="(item,index) in checkboxUserList" :key="index">
-                                    <el-tag closable @close="delCheckboxUser(index)">{{setCheckboxUserName(item)}}</el-tag>
-                                </template>
-                            </el-scrollbar>
-                        </div>
-                    </div>
-                </div>
-            </div>
-            <template #footer>
-                <div class="dialog-footer">
-                    <el-button size="large" @click="showModal = false">
-                        <HcIcon name="close"/>
-                        <span>取消</span>
-                    </el-button>
-                    <el-button hc-btn type="primary" :loading="sureSignUserLoading" @click="sureSignUserClick">
-                        <HcIcon name="check"/>
-                        <span>确定</span>
-                    </el-button>
-                </div>
-            </template>
-        </el-dialog>
-
-        <!--调整顺序-->
-        <el-dialog v-model="sequenceModal" title="调整顺序" width="38rem" class="hc-modal-border" draggable destroy-on-close append-to-body>
-            <el-alert title="可拖动排序,也可在后面点击图标,切换排序" type="warning" :closable="false"/>
-            <div class="sort-node-body-box list-group header">
-                <div class="list-group-item">
-                    <div class="index-box">序号</div>
-                    <div class="title-box">任务人</div>
-                    <div class="icon-box">排序</div>
-                </div>
-            </div>
-            <Draggable class="sort-node-body-box list-group" ghost-class="ghost" :list="checkboxUserList" item-key="id" @start="sortNodeDrag = true" @end="sortNodeDrag = false">
-                <template #item="{element, index}">
-                    <div class="list-group-item">
-                        <div class="index-box">{{index + 1}}</div>
-                        <div class="title-box">{{setCheckboxUserName(element)}}</div>
-                        <div class="icon-box">
-                            <span class="icon" @click="downSortClick(index)">
-                                <HcIcon name="arrow-down" ui="text-lg"/>
-                            </span>
-                            <span class="icon" @click="upSortClick(index)">
-                                <HcIcon name="arrow-up" ui="text-lg"/>
-                            </span>
-                        </div>
-                    </div>
-                </template>
-            </Draggable>
-            <template #footer>
-                <div class="dialog-footer">
-                    <el-button size="large" @click="sequenceModal = false">取消</el-button>
-                    <el-button type="primary" hc-btn @click="sequenceModal = false">确认</el-button>
-                </div>
-            </template>
-        </el-dialog>
-    </div>
-</template>
-
-<script setup>
-import {ref, watch, onMounted} from "vue";
-import tasksFlowApi from '~api/tasks/flow';
-import {getArrValue, deepClone} from "js-fast-way"
-import Draggable from "vuedraggable";
-
-//参数
-const props = defineProps({
-    ui: {
-        type: String,
-        default: ''
-    },
-    //选中的用户数组
-    users: {
-        type: String,
-        default: ''
-    },
-    projectId: {
-        type: [String,Number],
-        default: ''
-    },
-    contractId: {
-        type: [String,Number],
-        default: ''
-    },
-})
-
-//变量
-const showModal = ref(false)
-const sequenceModal = ref(false)
-const checkboxUserList = ref([])
-const UserDataList = ref([])
-const projectId = ref(props.projectId)
-const contractId = ref(props.contractId)
-
-//树数据
-const ElTreeProps = {children: 'childRoleList', label: 'roleName'}
-const ElTreeData = ref([{
-    roleName: '全部人员',
-    roleId: 0,
-    childRoleList: [],
-    signPfxFileList: []
-}])
-
-//监听
-watch(() => [
-    props.users,
-    props.projectId,
-    props.contractId,
-], ([users, pid, cid]) => {
-    projectId.value = pid
-    contractId.value = cid
-    setUserDataList(users)
-})
-
-//渲染完成
-onMounted(() => {
-    setUserDataList(props.users)
-    queryAllRoleList()
-})
-
-//处理用户数据
-const setUserDataList = (users) => {
-    if (users) {
-        const usersArr = users.split(',')
-        UserDataList.value = usersArr
-        checkboxUserList.value = usersArr
-    } else {
-        UserDataList.value = []
-        checkboxUserList.value = []
-    }
-}
-
-//展开弹窗
-const showModalClick = () => {
-    showModal.value = true
-}
-
-//获取系统所有角色划分
-const signUserList = ref([])
-const queryAllRoleList = async () => {
-    const { error, code, data } = await tasksFlowApi.queryAllRoleList({
-        contractId: contractId.value
-    })
-    //处理数据
-    if (!error && code === 200) {
-        let signList = [], dataArr = getArrValue(data)
-        ElTreeData.value[0].childRoleList = dataArr
-        if (dataArr.length > 0) {
-            dataArr.forEach(item => {
-                signList = signList.concat(item.signPfxFileList)
-            })
-        }
-        ElTreeData.value[0].signPfxFileList = signList
-        signUserList.value = signList
-    } else {
-        signUserList.value = []
-        ElTreeData.value[0].childRoleList = []
-        ElTreeData.value[0].signPfxFileList = []
-    }
-}
-
-//树被点击
-const ElTreeNodeClick = (data) => {
-    signUserList.value = getArrValue(data?.signPfxFileList)
-}
-
-//处理已选择的用户问题
-const setCheckboxUserName = (item) => {
-    if (item) {
-        const itemArr = item.split('-')
-        if (itemArr.length > 0 && itemArr[0]) {
-            return itemArr[0]
-        } else {
-            return ''
-        }
-    } else {
-        return ''
-    }
-}
-
-//删除已选择的用户
-const delCheckboxUser = (index) => {
-    checkboxUserList.value.splice(index,1);
-}
-
-//排序
-const sortNodeDrag = ref(false)
-//向下
-const downSortClick = (index) => {
-    const indexs = index + 1
-    const data = checkboxUserList.value
-    if(indexs !== data.length) {
-        const tmp = data.splice(indexs,1);
-        checkboxUserList.value.splice(index,0,tmp[0]);
-    } else {
-        window?.$message?.warning('已经处于置底,无法下移')
-    }
-}
-//向上
-const upSortClick = (index) => {
-    const data = checkboxUserList.value || []
-    if(index !== 0) {
-        const tmp = data.splice(index - 1,1);
-        checkboxUserList.value.splice(index,0,tmp[0]);
-    } else {
-        window?.$message?.warning('已经处于置顶,无法上移')
-    }
-}
-
-//事件
-const emit = defineEmits(['change'])
-
-//确认选择
-const sureSignUserLoading = ref(false)
-const sureSignUserClick = () => {
-    let newUser = [], newUserId = [], users = '';
-    const dataList = deepClone(checkboxUserList.value)
-    UserDataList.value = dataList
-    if (dataList.length > 0) {
-        sureSignUserLoading.value = true
-        //封装数据
-        dataList.forEach(item => {
-            const itemArr = item.split('-')
-            if (itemArr.length > 0 && itemArr[0]) {
-                users = users ? `${users},${item}` : item
-                newUser.push({
-                    userId: itemArr[1],
-                    userName: itemArr[0],
-                })
-                newUserId.push(itemArr[1])
-            }
-        })
-        showModal.value = false
-        sureSignUserLoading.value = false
-        emit('change', newUser, newUserId, users)
-    } else {
-        window.$message?.warning('请先选择任务人员,或点击取消')
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-@import './style.scss';
-</style>
-
-<style lang="scss">
-.hc-tasks-user .tasks-user-box .tag-user-list {
-    .el-tag {
-        --el-icon-size: 14px;
-        padding: 0 10px;
-        height: 26px;
-        margin: 4px 0;
-    }
-}
-.hc-tasks-user-modal-content-box {
-    .checkbox-li .el-checkbox {
-        width: 100%;
-        .el-checkbox__input {
-            position: absolute;
-            right: 0;
-            .el-checkbox__inner {
-                width: 18px;
-                height: 18px;
-                &:after {
-                    height: 9px;
-                    left: 6px;
-                    top: 2px;
-                }
-            }
-        }
-        .el-checkbox__label {
-            flex: 1;
-            padding-left: 0;
-            padding-right: 20px;
-        }
-    }
-    .user-list {
-        .el-tag {
-            margin-right: 10px;
-            margin-top: 12px;
-        }
-    }
-}
-</style>

+ 0 - 147
src/global/components_bak/hc-tasks-user/style.scss

@@ -1,147 +0,0 @@
-.hc-tasks-user {
-    position: relative;
-    .tasks-user-box {
-        position: relative;
-        border: 1px solid #e0e0e6;
-        border-radius: 4px;
-        padding: 0 12px;
-        cursor: pointer;
-        min-height: 40px;
-        .tag-user-list {
-            position: relative;
-            display: flex;
-            align-items: center;
-            flex-flow: row wrap;
-            min-height: inherit;
-            .tasks-placeholder {
-                color: #a9abb2;
-                font-size: 14px;
-            }
-            .arrow-icon-tag {
-                position: relative;
-                color: #a9abb2;
-                font-size: 18px;
-                margin: 0 8px;
-            }
-        }
-    }
-}
-
-.hc-tasks-user-modal-content-box {
-    position: relative;
-    display: flex;
-    height: 460px;
-    .tree-box {
-        flex: 1;
-        user-select: none;
-        position: relative;
-        padding: 20px;
-        overflow: hidden;
-        border-right: 1px solid #EEEEEE;
-    }
-    .user-box {
-        flex: 2;
-        position: relative;
-        display: flex;
-        flex-direction: column;
-        .y-user-list-box, .s-user-list-box {
-            position: relative;
-            overflow: hidden;
-            display: flex;
-            flex-direction: column;
-            .title-box {
-                position: relative;
-                padding: 2px 24px;
-                display: flex;
-                align-items: center;
-                border-bottom: 1px solid #EEEEEE;
-                background-color: #F8F8F8;
-                color: #838791;
-                .title {
-                    flex: auto;
-                }
-            }
-            .user-list {
-                position: relative;
-                overflow: hidden;
-                padding: 0 24px;
-                .user-item {
-                    position: relative;
-                    padding: 4px 0;
-                }
-                .user-item + .user-item {
-                    border-top: 1px dashed #EEEEEE;
-                }
-            }
-        }
-        .y-user-list-box {
-            flex: 1;
-            .user-list {
-                flex: 1;
-            }
-        }
-        .s-user-list-box {
-            position: relative;
-            border-top: 1px solid #EEEEEE;
-            .user-list {
-                height: 6rem;
-            }
-        }
-    }
-}
-
-.sort-node-body-box.list-group {
-    position: relative;
-    min-height: 20px;
-    border: 1px solid #EEEEEE;
-    .list-group-item {
-        position: relative;
-        display: flex;
-        align-items: center;
-        padding: 6px 15px;
-        cursor: move;
-        transition: background 0.2s;
-        .index-box {
-            position: relative;
-            width: 50px;
-        }
-        .title-box {
-            position: relative;
-            padding-right: 24px;
-            flex: 1;
-        }
-        .icon-box {
-            position: relative;
-            font-size: 18px;
-            display: flex;
-            align-items: center;
-            .icon {
-                cursor: pointer;
-                display: flex;
-                align-items: center;
-            }
-        }
-        &:first-child .icon-box i:last-child,
-        &:last-child .icon-box i:first-child {
-            cursor: default;
-            color: #aaaaaa;
-        }
-        &:hover {
-            background: var(--el-color-primary-light-9);
-        }
-    }
-    .list-group-item + .list-group-item {
-        border-top: 1px solid #EEEEEE;
-    }
-    &.header {
-        border-bottom: 0;
-        .list-group-item {
-            cursor: default;
-            padding: 8px 15px;
-            background-color: #F8F8F8;
-            .index-box, .title-box, .icon-box {
-                font-size: 14px;
-            }
-        }
-    }
-}

+ 0 - 46
src/global/components_bak/hc-tooltip/index.vue

@@ -1,46 +0,0 @@
-<template>
-    <el-tooltip :content="btn_Info['textInfo']" placement="top" :disabled="!isBubble || !btn_Info['textInfo']" v-if="btn_Info">
-        <slot></slot>
-    </el-tooltip>
-</template>
-
-<script setup>
-import {ref,watch,onMounted} from "vue";
-import {useAppStore} from "~src/store";
-const useAppState = useAppStore()
-
-//参数
-const props = defineProps({
-    keys: {
-        type: String,
-        default: ''
-    }
-})
-
-//变量
-const btn_Info = ref(false);
-const btn_key = ref(props.keys);
-const isBubble = ref(useAppState.getBubble);
-
-//监听
-watch(() => [
-    props.keys,
-    useAppState.getBubble,
-], ([keys, bubble]) => {
-    btn_key.value = keys
-    isBubble.value = bubble
-    btn_Info.value = getButtonsVal(keys)
-})
-
-//渲染完成
-onMounted(()=> {
-    if (props.keys) {
-        btn_Info.value = getButtonsVal(props.keys)
-    }
-})
-
-//获取气泡数据
-const getButtonsVal = (value) => {
-    return useAppState.getButtonsVal(value)
-}
-</script>

+ 0 - 2
src/global/components_bak/hc-upload-file/common/file-events.js

@@ -1,2 +0,0 @@
-const events = ['fileProgress', 'fileSuccess', 'fileComplete', 'fileError']
-export default events

+ 0 - 27
src/global/components_bak/hc-upload-file/common/md5.js

@@ -1,27 +0,0 @@
-import md5 from 'js-md5'
-
-/**
- * 分段计算MD5
- * @param file {File}
- * @param options {Object} - onSuccess | onError
- */
-export function generateMD5(file, options = {}) {
-    const fileReader = new FileReader()
-    fileReader.readAsBinaryString(file.file)
-    fileReader.onload = (e) => {
-        let fileBolb = e.target.result
-        let fileMD5 = md5(fileBolb)
-        console.log(`MD5计算完毕:${file.name} \nMD5:${fileMD5}`)
-        // md5计算完毕
-        if (options.onSuccess && typeof options.onSuccess == 'function') {
-            options.onSuccess(fileMD5)
-        }
-    }
-
-    fileReader.onerror = function () {
-        console.log('MD5计算失败')
-        if (options.onError && typeof options.onError == 'function') {
-            options.onError()
-        }
-    }
-}

+ 0 - 24
src/global/components_bak/hc-upload-file/common/utils.js

@@ -1,24 +0,0 @@
-export function secondsToStr(temp) {
-    const years = Math.floor(temp / 31536000)
-    if (years) {
-        return years + ' 年'
-    }
-    const days = Math.floor((temp %= 31536000) / 86400)
-    if (days) {
-        return days + ' 天'
-    }
-    const hours = Math.floor((temp %= 86400) / 3600)
-    if (hours) {
-        return hours + ' 时'
-    }
-    const minutes = Math.floor((temp %= 3600) / 60)
-    if (minutes) {
-        return minutes + ' 分'
-    }
-    const seconds = temp % 60
-    return seconds + ' 秒'
-}
-
-export function kebabCase(s) {
-    return s.replace(/[A-Z]/g, (m) => `-${m.toLowerCase()}`)
-}

+ 0 - 65
src/global/components_bak/hc-upload-file/components/btn.vue

@@ -1,65 +0,0 @@
-<template>
-    <label class="uploader-btn" ref="btn" v-show="support">
-        <slot></slot>
-    </label>
-</template>
-
-<script>
-import {inject, nextTick, ref, onMounted} from 'vue'
-
-const COMPONENT_NAME = 'uploader-btn'
-
-export default {
-    name: COMPONENT_NAME,
-    props: {
-        directory: {
-            type: Boolean,
-            default: false
-        },
-        single: {
-            type: Boolean,
-            default: false
-        },
-        attrs: {
-            type: Object,
-            default() {
-                return {}
-            }
-        }
-    },
-    setup(props) {
-        const btn = ref(null)
-        const uploader = inject('uploader').proxy.uploader
-        const support = uploader.support
-        onMounted(() => {
-            nextTick(() => {
-                uploader.assignBrowse(btn.value, props.directory, props.single, props.attrs)
-            })
-        })
-        return {
-            btn,
-            support
-        }
-    }
-}
-</script>
-
-<style>
-.uploader-btn {
-    display: inline-block;
-    position: relative;
-    padding: 4px 8px;
-    font-size: 100%;
-    line-height: 1.4;
-    color: #666;
-    border: 1px solid #666;
-    cursor: pointer;
-    border-radius: 2px;
-    background: none;
-    outline: none;
-}
-
-.uploader-btn:hover {
-    background-color: rgba(0, 0, 0, .08);
-}
-</style>

+ 0 - 67
src/global/components_bak/hc-upload-file/components/drop.vue

@@ -1,67 +0,0 @@
-<template>
-    <div class="uploader-drop" :class="dropClass" ref="drop" v-show="support">
-        <slot></slot>
-    </div>
-</template>
-
-<script>
-import {inject, nextTick, ref, onBeforeUnmount} from 'vue'
-
-const COMPONENT_NAME = 'uploader-drop'
-
-export default {
-    name: COMPONENT_NAME,
-    setup() {
-        const uploader = inject('uploader').proxy.uploader
-        let drop = ref(null)
-        let dropClass = ref('')
-        const support = uploader.support
-        const onDragEnter = () => {
-            dropClass = 'uploader-dragover'
-        }
-        const onDragLeave = () => {
-            dropClass = ''
-        }
-        const onDrop = () => {
-            dropClass = 'uploader-droped'
-        }
-        nextTick(() => {
-            const dropEle = drop.value
-            uploader.assignDrop(dropEle)
-            uploader.on('dragenter', onDragEnter)
-            uploader.on('dragleave', onDragLeave)
-            uploader.on('drop', onDrop)
-        })
-        onBeforeUnmount(() => {
-            const dropEle = drop.value
-            uploader.off('dragenter', onDragEnter)
-            uploader.off('dragleave', onDragLeave)
-            uploader.off('drop', onDrop)
-            uploader.unAssignDrop(dropEle)
-        })
-        return {
-            drop,
-            dropClass,
-            support,
-            onDragEnter,
-            onDragLeave,
-            onDrop
-        }
-    }
-}
-</script>
-
-<style>
-.uploader-drop {
-    position: relative;
-    padding: 10px;
-    overflow: hidden;
-    border: 1px dashed #ccc;
-    background-color: #f5f5f5;
-}
-
-.uploader-dragover {
-    border-color: #999;
-    background-color: #f7f7f7;
-}
-</style>

+ 0 - 313
src/global/components_bak/hc-upload-file/components/file.vue

@@ -1,313 +0,0 @@
-<template>
-    <div class="uploader-file" :status="status">
-        <slot
-            :file="file"
-            :list="list"
-            :status="status"
-            :paused="paused"
-            :error="error"
-            :response="response"
-            :average-speed="averageSpeed"
-            :formated-average-speed="formatedAverageSpeed"
-            :current-speed="currentSpeed"
-            :is-complete="isComplete"
-            :is-uploading="isUploading"
-            :size="size"
-            :formated-size="formatedSize"
-            :uploaded-size="uploadedSize"
-            :progress="progress"
-            :progress-style="progressStyle"
-            :progressing-class="progressingClass"
-            :time-remaining="timeRemaining"
-            :formated-time-remaining="formatedTimeRemaining"
-            :type="type"
-            :extension="extension"
-            :file-category="fileCategory"
-        >
-            <div class="uploader-file-progress" :class="progressingClass" :style="progressStyle"></div>
-            <div class="uploader-file-info">
-                <div class="uploader-file-name">
-                    <i class="uploader-file-icon" :icon="fileCategory"/>
-                    <span>{{ file.name }}</span>
-                </div>
-                <div class="uploader-file-size">{{ formatedSize }}</div>
-                <div class="uploader-file-status" v-show="status === 'uploading'">
-                    {{ progressStyle.progress }} / {{ formatedAverageSpeed}} / {{ formatedTimeRemaining}}
-                </div>
-                <div class="uploader-file-status text" :class="'hc-custom-status-' + file.id" v-show="status !== 'uploading'">{{ statusText }}</div>
-                <div class="uploader-file-actions">
-                    <span class="uploader-file-pause" @click="pause"></span>
-                    <span class="uploader-file-resume" @click="resume">️</span>
-                    <span class="uploader-file-retry" @click="retry"></span>
-                    <span class="uploader-file-remove" @click="remove"></span>
-                </div>
-            </div>
-        </slot>
-    </div>
-</template>
-
-<script>
-import {computed, ref, toRaw, watch, onMounted, onUnmounted, getCurrentInstance} from 'vue'
-import Uploader from 'simple-uploader.js'
-import {secondsToStr} from '../common/utils'
-import events from '../common/file-events'
-
-const COMPONENT_NAME = 'uploader-file'
-
-export default {
-    name: COMPONENT_NAME,
-    props: {
-        file: {
-            type: Object,
-            default() {
-                return {}
-            }
-        },
-        list: {
-            type: Boolean,
-            default: false
-        }
-    },
-    setup(props) {
-        const instance = getCurrentInstance()
-        let handlers = {}
-        let tid = 0
-        const response = ref(null)
-        const paused = ref(false)
-        const error = ref(false)
-        const averageSpeed = ref(0)
-        const currentSpeed = ref(0)
-        const isComplete = ref(false)
-        const isUploading = ref(false)
-        const size = ref(0)
-        const formatedSize = ref('')
-        const uploadedSize = ref(0)
-        const progress = ref(0)
-        const timeRemaining = ref(0)
-        const type = ref('')
-        const extension = ref('')
-        const progressingClass = ref('')
-        const fileCategory = computed(() => {
-            const isFolder = props.file.isFolder
-            let type = isFolder ? 'folder' : 'unknown'
-            const categoryMap = props.file.uploader.opts.categoryMap
-            const typeMap = categoryMap || {
-                image: ['gif', 'jpg', 'jpeg', 'png', 'bmp', 'webp'],
-                video: ['mp4', 'm3u8', 'rmvb', 'avi', 'swf', '3gp', 'mkv', 'flv'],
-                audio: ['mp3', 'wav', 'wma', 'ogg', 'aac', 'flac'],
-                document: ['doc', 'txt', 'docx', 'pages', 'epub', 'pdf', 'numbers', 'csv', 'xls', 'xlsx', 'keynote', 'ppt', 'pptx']
-            }
-            Object.keys(typeMap).forEach((_type) => {
-                const extensions = typeMap[_type]
-                if (extensions.indexOf(extension.value) > -1) {
-                    type = _type
-                }
-            })
-            return type
-        })
-        const progressStyle = computed(() => {
-            progress.value = Math.floor(progress.value * 100)
-            const style = `translateX(${Math.floor(progress.value - 100)}%)`
-            return {
-                progress: `${progress.value}%`,
-                webkitTransform: style,
-                mozTransform: style,
-                msTransform: style,
-                transform: style
-            }
-        })
-        const formatedAverageSpeed = computed(() => {
-            return `${Uploader.utils.formatSize(averageSpeed.value)}/s`
-        })
-        const status = computed(() => {
-            let isError = error
-            if (isComplete.value) {
-                return 'success'
-            } else if (isError.value) {
-                return 'error'
-            } else if (isUploading.value) {
-                return 'uploading'
-            } else if (paused.value) {
-                return 'paused'
-            } else {
-                return 'waiting'
-            }
-        })
-        const statusText = computed(() => {
-            const fileStatusText = props.file.uploader.fileStatusText
-            let txt = status.value
-            if (typeof fileStatusText === 'function') {
-                txt = fileStatusText(status.value, response.value)
-            } else {
-                txt = fileStatusText[status.value]
-            }
-            return txt || status
-        })
-        const formatedTimeRemaining = computed(() => {
-            const file = props.file
-            if (timeRemaining.value === Number.POSITIVE_INFINITY || timeRemaining.value === 0) {
-                return ''
-            }
-            let parsedTimeRemaining = secondsToStr(timeRemaining.value)
-            const parseTimeRemaining = file.uploader.opts.parseTimeRemaining
-            if (parseTimeRemaining) {
-                parsedTimeRemaining = parseTimeRemaining(timeRemaining.value, parsedTimeRemaining)
-            }
-            return parsedTimeRemaining
-        })
-        const actionCheck = () => {
-            paused.value = props.file.paused
-            error.value = props.file.error
-            isUploading.value = props.file.isUploading()
-        }
-        const pause = () => {
-            props.file.pause()
-            actionCheck()
-            fileProgress()
-        }
-        const resume = () => {
-            props.file.resume()
-            actionCheck()
-        }
-        const remove = () => {
-            props.file.cancel()
-        }
-        const retry = () => {
-            props.file.retry()
-            actionCheck()
-        }
-        const processResponse = (message) => {
-            let res = message
-            try {
-                res = JSON.parse(message)
-            } catch (e) {
-            }
-            response.value = res
-        }
-        const fileEventsHandler = (event, args) => {
-            const rootFile = args[0]
-            const file = args[1]
-            const target = props.list ? rootFile : file
-            if (toRaw(props.file) === toRaw(target)) {
-                if (props.list && event === 'fileSuccess') {
-                    processResponse(args[2])
-                    return
-                }
-                instance.setupState[event](...args)
-            }
-        }
-        const fileProgress = () => {
-            progress.value = props.file.progress()
-            averageSpeed.value = props.file.averageSpeed
-            currentSpeed.value = props.file.currentSpeed
-            timeRemaining.value = props.file.timeRemaining()
-            uploadedSize.value = props.file.sizeUploaded()
-            actionCheck()
-        }
-        const fileSuccess = (rootFile, file, message) => {
-            if (rootFile) {
-                processResponse(message)
-            }
-            fileProgress()
-            error.value = false
-            isComplete.value = true
-            isUploading.value = false
-        }
-        const fileComplete = () => {
-            fileSuccess()
-        }
-        const fileError = (rootFile, file, message) => {
-            fileProgress()
-            processResponse(message)
-            error.value = true
-            isComplete.value = false
-            isUploading.value = false
-        }
-        watch(status, (newStatus, oldStatus) => {
-            if (oldStatus && newStatus === 'uploading' && oldStatus !== 'uploading') {
-                tid = setTimeout(() => {
-                    progressingClass.value = 'uploader-file-progressing'
-                }, 200)
-            } else {
-                clearTimeout(tid)
-                progressingClass.value = ''
-            }
-        })
-        onMounted(() => {
-            paused.value = props.file['paused']
-            error.value = props.file['error']
-            averageSpeed.value = props.file['averageSpeed']
-            currentSpeed.value = props.file['currentSpeed']
-            isComplete.value = props.file.isComplete()
-            isUploading.value = props.file.isUploading()
-            size.value = props.file.getSize()
-            formatedSize.value = props.file.getFormatSize()
-            uploadedSize.value = props.file.sizeUploaded()
-            progress.value = props.file.progress()
-            timeRemaining.value = props.file.timeRemaining()
-            type.value = props.file.getType()
-            extension.value = props.file.getExtension()
-            const eventHandler = (event) => {
-                handlers[event] = (...args) => {
-                    fileEventsHandler(event, args)
-                }
-                return handlers[event]
-            }
-            events.forEach((event) => {
-                props.file.uploader.on(event, eventHandler(event))
-            })
-        })
-        onUnmounted(() => {
-            events.forEach((event) => {
-                props.file.uploader.off(event, handlers[event])
-            })
-            handlers = null
-        })
-        return {
-            response,
-            paused,
-            error,
-            averageSpeed,
-            currentSpeed,
-            isComplete,
-            isUploading,
-            size,
-            formatedSize,
-            uploadedSize,
-            progress,
-            timeRemaining,
-            type,
-            extension,
-            progressingClass,
-            fileCategory,
-            progressStyle,
-            formatedAverageSpeed,
-            status,
-            statusText,
-            formatedTimeRemaining,
-            actionCheck,
-            pause,
-            resume,
-            remove,
-            retry,
-            processResponse,
-            fileEventsHandler,
-            fileProgress,
-            fileSuccess,
-            fileComplete,
-            fileError
-        }
-    }
-}
-</script>
-
-<style lang="scss" scoped>
-.uploader-file-info {
-    i, em {
-        font-style: normal;
-    }
-    &:hover {
-        background-color: #e9faf4;
-    }
-}
-</style>

+ 0 - 44
src/global/components_bak/hc-upload-file/components/files.vue

@@ -1,44 +0,0 @@
-<template>
-    <div class="uploader-files">
-        <slot :files="files">
-            <ul>
-                <li v-for="file in files" :key="file.id">
-                    <uploader-file :file="file"></uploader-file>
-                </li>
-            </ul>
-        </slot>
-    </div>
-</template>
-
-<script>
-import {inject, computed} from 'vue'
-import UploaderFile from './file.vue'
-
-const COMPONENT_NAME = 'uploader-files'
-
-export default {
-    name: COMPONENT_NAME,
-    components: {
-        UploaderFile
-    },
-    setup() {
-        const uploader = inject('uploader').proxy
-
-        return {
-            files: computed(() => uploader.files)
-        }
-    }
-}
-</script>
-
-<style>
-.uploader-files {
-    position: relative;
-}
-
-.uploader-files > ul {
-    list-style: none;
-    margin: 0;
-    padding: 0
-}
-</style>

+ 0 - 44
src/global/components_bak/hc-upload-file/components/list.vue

@@ -1,44 +0,0 @@
-<template>
-    <div class="uploader-list">
-        <slot :file-list="fileList">
-            <ul>
-                <li v-for="file in fileList" :key="file.id">
-                    <uploader-file :file="file" :list="true"/>
-                </li>
-            </ul>
-        </slot>
-    </div>
-</template>
-
-<script>
-import {inject, computed} from 'vue'
-import UploaderFile from './file.vue'
-
-const COMPONENT_NAME = 'uploader-list'
-
-export default {
-    name: COMPONENT_NAME,
-    components: {
-        UploaderFile
-    },
-    setup() {
-        const uploader = inject('uploader').proxy
-
-        return {
-            fileList: computed(() => uploader.fileList)
-        }
-    }
-}
-</script>
-
-<style>
-.uploader-list {
-    position: relative;
-}
-
-.uploader-list > ul {
-    list-style: none;
-    margin: 0;
-    padding: 0
-}
-</style>

+ 0 - 36
src/global/components_bak/hc-upload-file/components/unsupport.vue

@@ -1,36 +0,0 @@
-<template>
-    <div class="uploader-unsupport" v-show="!support">
-        <slot>
-            <p>
-                非常抱歉,您的浏览器不支持此功能,建议您下载最新的edge浏览器或者chrome浏览器。
-                <a href="http://www.w3.org/TR/FileAPI/">the HTML5 File API</a> along with <a
-                href="http://www.w3.org/TR/FileAPI/#normalization-of-params">file slicing</a>.
-            </p>
-        </slot>
-    </div>
-</template>
-
-<script>
-import {inject} from 'vue'
-
-const COMPONENT_NAME = 'uploader-unsupport'
-
-export default {
-    name: COMPONENT_NAME,
-    setup() {
-        const uploader = inject('uploader').proxy.uploader
-        const support = uploader.support
-        return {
-            support
-        }
-    }
-}
-</script>
-
-<style>
-.uploader-unsupport {
-    position: relative;
-    z-index: 10;
-    overflow: hidden;
-}
-</style>

+ 0 - 193
src/global/components_bak/hc-upload-file/components/uploader.vue

@@ -1,193 +0,0 @@
-<template>
-    <div class="uploader">
-        <slot :files="files" :file-list="fileList" :started="started">
-            <uploader-unsupport/>
-            <uploader-drop>
-                <p>拖动文件到这里上传</p>
-                <uploader-btn>选择文件</uploader-btn>
-                <uploader-btn :directory="true">选择文件夹</uploader-btn>
-            </uploader-drop>
-            <uploader-list/>
-        </slot>
-    </div>
-</template>
-
-<script>
-import {provide, ref, onUnmounted, getCurrentInstance} from 'vue'
-import Uploader from 'simple-uploader.js'
-import {kebabCase} from '../common/utils'
-import UploaderBtn from './btn.vue'
-import UploaderDrop from './drop.vue'
-import UploaderUnsupport from './unsupport.vue'
-import UploaderList from './list.vue'
-import UploaderFiles from './files.vue'
-import UploaderFile from './file.vue'
-
-const COMPONENT_NAME = 'uploader'
-const FILE_ADDED_EVENT = 'fileAdded'
-const FILES_ADDED_EVENT = 'filesAdded'
-const UPLOAD_START_EVENT = 'uploadStart'
-
-const ALL_EVENTS = [
-    'change',
-    'dragover',
-    'dragenter',
-    'dragleave',
-    'file-success',
-    'file-complete',
-    'file-progress',
-    'file-added',
-    'files-added',
-    'files-submitted',
-    'file-removed',
-    'file-retry',
-    'file-error',
-    'upload-start',
-    'complete'
-]
-
-export default {
-    name: COMPONENT_NAME,
-    props: {
-        options: {
-            type: Object,
-            default() {
-                return {}
-            }
-        },
-        autoStart: {
-            type: Boolean,
-            default: true
-        },
-        fileStatusText: {
-            type: [Object, Function],
-            default() {
-                return {
-                    success: 'success',
-                    error: 'error',
-                    uploading: 'uploading',
-                    paused: 'paused',
-                    waiting: 'waiting'
-                }
-            }
-        },
-        onFileAdded: Function,
-        onFilesAdded: Function
-    },
-    emits: ALL_EVENTS,
-    setup(props, {emit}) {
-        const started = ref(false)
-        const files = ref([])
-        const fileList = ref([])
-        const instance = getCurrentInstance()
-        let uploader = new Uploader(props.options)
-        const uploadStart = () => {
-            started.value = true
-        }
-        const fileAdded = (file) => {
-            const _file = file
-            if (props.onFileAdded) {
-                const ignored = props.onFileAdded(_file)
-                if (ignored === false || _file.ignored) {
-                    return false
-                }
-            } else {
-                emit(kebabCase(FILE_ADDED_EVENT), _file)
-                if (_file.ignored) {
-                    // is ignored, filter it
-                    return false
-                }
-            }
-        }
-        const filesAdded = (files, fileList) => {
-            if (props.onFilesAdded) {
-                const ignored = props.onFilesAdded(files, fileList)
-                if (ignored === false || (files.ignored || fileList.ignored)) {
-                    return false
-                }
-            } else {
-                emit(kebabCase(FILES_ADDED_EVENT), files, fileList)
-                if (files.ignored || fileList.ignored) {
-                    // is ignored, filter it
-                    return false
-                }
-            }
-        }
-        const fileRemoved = () => {
-            files.value = [...uploader.files]
-            fileList.value = [...uploader.fileList]
-        }
-        const filesSubmitted = () => {
-            files.value = [...uploader.files]
-            fileList.value = [...uploader.fileList]
-            if (props.autoStart) {
-                uploader.upload()
-            }
-        }
-        const allEvent = (...args) => {
-            const name = args[0]
-            const EVENTSMAP = {
-                [FILE_ADDED_EVENT]: true,
-                [FILES_ADDED_EVENT]: true,
-                [UPLOAD_START_EVENT]: 'uploadStart'
-            }
-            const handler = EVENTSMAP[name]
-            if (handler) {
-                if (handler === true) {
-                    return
-                }
-                instance.setupState[handler](...args.slice(1))
-            }
-            args[0] = kebabCase(name)
-            emit(...args)
-        }
-
-        props.options.initialPaused = !props.autoStart
-        uploader.fileStatusText = props.fileStatusText
-        uploader.on('catchAll', allEvent)
-        uploader.on(FILE_ADDED_EVENT, fileAdded)
-        uploader.on(FILES_ADDED_EVENT, filesAdded)
-        uploader.on('fileRemoved', fileRemoved)
-        uploader.on('filesSubmitted', filesSubmitted)
-        // uploader[UPLOAD_START_EVENT] = uploadStart
-
-        onUnmounted(() => {
-            uploader.off('catchAll', allEvent)
-            uploader.off(FILE_ADDED_EVENT, fileAdded)
-            uploader.off(FILES_ADDED_EVENT, filesAdded)
-            uploader.off('fileRemoved', fileRemoved)
-            uploader.off('filesSubmitted', filesSubmitted)
-            uploader = null
-        })
-
-        provide('uploader', instance)
-
-        return {
-            uploader,
-            started,
-            files,
-            fileList,
-            uploadStart,
-            fileAdded,
-            filesAdded,
-            fileRemoved,
-            filesSubmitted,
-            allEvent
-        }
-    },
-    components: {
-        UploaderBtn,
-        UploaderDrop,
-        UploaderUnsupport,
-        UploaderList,
-        UploaderFiles,
-        UploaderFile
-    }
-}
-</script>
-
-<style>
-.uploader {
-    position: relative;
-}
-</style>

+ 0 - 357
src/global/components_bak/hc-upload-file/file.vue

@@ -1,357 +0,0 @@
-<template>
-    <div id="hc-global-upload-file" class="hc-global-upload-file-box" :class="{ 'global-uploader-single': !global }">
-        <!-- 上传 -->
-        <HcUploader ref="uploaderRef" class="uploader-app"
-                    :options="optionsValue"
-                    :file-status-text="fileStatusText"
-                    :auto-start="false"
-                    @file-added="onFileAdded"
-                    @file-success="onFileSuccess"
-                    @file-progress="onFileProgress"
-                    @file-error="onFileError"
-        >
-            <HcUploaderUnsupport/>
-            <HcUploaderBtn class="hc-global-upload-btn" id="hc-global-upload-btn" ref="uploadBtnRef">选择文件</HcUploaderBtn>
-            <HcUploaderList v-show="panelShow">
-                <template #default="{ fileList }">
-                    <div class="file-panel" :class="{ collapse: collapse }">
-                        <div class="file-title">
-                            <div class="title">文件列表 {{fileList.length > 0 ? `(${fileList.length})` : ''}}</div>
-                            <div class="operate">
-                                <el-button :title="collapse ? '展开' : '折叠'" link @click="collapse = !collapse">
-                                    <i :class="collapse ? 'ri-fullscreen-line' : 'ri-subtract-line'"/>
-                                </el-button>
-                                <el-button title="关闭" link @click="close">
-                                    <i class="ri-close-line"/>
-                                </el-button>
-                            </div>
-                        </div>
-
-                        <ul class="file-list">
-                            <li v-for="file in fileList" :key="file.id" class="file-item">
-                                <HcUploaderFile ref="files" :class="['file_' + file.id, customStatus]" :file="file" :list="true"/>
-                            </li>
-                            <div v-if="!fileList.length" class="no-file">
-                                <i class="ri-file-text-line"/>
-                                <span>暂无待上传文件</span>
-                            </div>
-                        </ul>
-                    </div>
-                </template>
-            </HcUploaderList>
-        </HcUploader>
-    </div>
-</template>
-
-<script setup>
-import {computed, nextTick, onMounted, ref, watch} from 'vue'
-import {getTokenHeader} from '~src/api/request/header';
-import HcUploader from './components/uploader.vue'
-import HcUploaderBtn from './components/btn.vue'
-import HcUploaderUnsupport from './components/unsupport.vue'
-import HcUploaderList from './components/list.vue'
-import HcUploaderFile from './components/file.vue'
-import {getObjValue, isNullES, getFileSuffix, getRandom} from "js-fast-way";
-import {generateMD5} from './common/md5'
-
-const props = defineProps({
-    global: {
-        type: Boolean,
-        default: true
-    },
-    // 发送给服务器的额外参数
-    params: {
-        type: Object,
-        default: () => ({})
-    },
-    options: {
-        type: Object,
-        default: () => ({})
-    }
-})
-
-//初始变量
-const customStatus = ref('')
-const panelShow = ref(false)
-const collapse = ref(false)
-const uploaderRef = ref(null)
-const uploadBtnRef = ref(null)
-const customParams = ref({})
-const uploader = computed(() => uploaderRef.value?.uploader)
-const acceptType = 'image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword'
-
-const fileStatusText = {
-    success: '上传成功',
-    error: '上传失败',
-    uploading: '上传中',
-    paused: '已暂停',
-    waiting: '等待上传'
-}
-
-//事件
-const emit = defineEmits(['fileAdded', 'fileSuccess', 'fileError', 'filesChange', 'fileProgress'])
-
-//监听
-watch(() => [
-    props.params,
-    props.options
-], ([params, options]) => {
-    if (params) {
-        customParams.value = params
-    }
-    if (options) {
-        initOptions(options)
-    }
-})
-
-onMounted(() => {
-    remove()
-    nextTick(() => {
-        let input = document.querySelector('#hc-global-upload-btn input')
-        input.setAttribute('accept', acceptType)
-    })
-    customParams.value = props.params
-    initOptions(props.options)
-})
-
-//配置
-const optionsValue = ref({
-    target: '/api/blade-resource/largeFile/endpoint/upload-file',
-    chunkSize: '2048000',
-    fileParameterName: 'file',
-    maxChunkRetries: 3,
-    headers: getTokenHeader(),
-    // 是否开启服务器分片校验
-    testChunks: true,
-    testMethod: 'POST',
-    // 服务器分片校验函数,秒传及断点续传基础
-    checkChunkUploadedByResponse: (chunk, message) => {
-        //处理OSSID
-        let res = {}, params = getObjValue(chunk?.file?.params)
-        try {
-            res = JSON.parse(message)
-        } catch (e) {}
-        console.log('res', res)
-        if (isNullES(params.ossId)) {
-            params.ossId = getRandom()
-        }
-        return false
-    },
-    query: (file) => {
-        return {...file.params}
-    }
-})
-
-//设置配置
-const initOptions = ({target, fileName, maxChunk, accept}) => {
-    // 自定义上传url
-    if (target) {
-        uploader.value.opts.target = target
-    }
-    // 自定义文件上传参数名
-    if (fileName) {
-        uploader.value.opts.fileParameterName = fileName
-    }
-    // 并发上传数量
-    if (maxChunk) {
-        uploader.value.opts.maxChunkRetries = maxChunk
-    }
-    // 自定义文件上传类型
-    if (accept) {
-        nextTick(() => {
-            let input = document.querySelector('#hc-global-upload-btn input')
-            input.setAttribute('accept', accept ? accept : acceptType)
-        })
-    }
-}
-
-//选择了文件
-const onFileAdded = async (file) => {
-    panelShow.value = true
-    trigger('fileAdded')
-    // 将额外的参数赋值到每个文件上,以不同文件使用不同params的需求
-    file.params = {
-        ...customParams,
-        objectType: getFileSuffix(file.name),
-        fileType: file.fileType,
-    }
-    // 计算MD5
-    const md5 = await computeMD5(file)
-    startUpload(file, md5)
-}
-
-//计算文件的MD5
-const computeMD5 = (file) => {
-    // 文件状态设为"计算MD5"
-    statusSet(file.id, 'md5')
-    // 暂停文件
-    file.pause()
-    // 计算MD5时隐藏”开始“按钮
-    setResumeStyle(file.id, 'none')
-    nextTick(() => {
-        document.querySelector(`.hc-custom-status-${file.id}`).innerText = '校验MD5中'
-    })
-    // 开始计算MD5
-    return new Promise((resolve, reject) => {
-        generateMD5(file, {
-            onSuccess(md5) {
-                statusRemove(file.id)
-                resolve(md5)
-            },
-            onError() {
-                error(`文件${file.name}读取出错,请检查该文件`)
-                file.cancel()
-                statusRemove(file.id)
-                reject()
-            }
-        })
-    })
-}
-
-const setResumeStyle = (id, val = 'none') => {
-    nextTick(() => {
-        try {
-            document.querySelector(`.file_${id} .uploader-file-resume`).style.display = val
-        } catch (e) {}
-    })
-}
-
-// md5计算完毕,开始上传
-const beforeFileNum = ref(0)
-const startUpload = (file, md5) => {
-    const fileList = uploader.value.fileList;
-    //判断是否满足条件
-    const result = fileList.every(({uniqueIdentifier}) => {
-        return uniqueIdentifier !== md5
-    })
-    if (result) {
-        file.uniqueIdentifier = md5
-        setResumeStyle(file.id,'')
-        beforeFileNum.value ++;
-        file.resume()
-        trigger('fileProgress', true)
-    } else {
-        file.cancel()
-        error('请不要重复上传相同文件')
-    }
-}
-
-//上传中
-const onFileProgress = (rootFile, file, chunk) => {
-    console.log(`上传中 ${file.name},chunk:${chunk.startByte / 1024 / 1024} ~ ${chunk.endByte / 1024 / 1024}`)
-}
-
-//上传完成
-const finishFileNum = ref(0)
-const onFileSuccess = (rootFile, file, response) => {
-    let res = JSON.parse(response)
-    // 服务端自定义的错误(即http状态码为200,但是是错误的情况),这种错误是Uploader无法拦截的
-    if (res.code !== 200) {
-        errorFileNum.value ++;
-        error(res.msg)
-        // 文件状态设为“失败”
-        statusSet(file.id, 'failed')
-    } else {
-        finishFileNum.value ++;
-        trigger('fileSuccess', getObjValue(res.data))
-    }
-    if (beforeFileNum.value === (finishFileNum.value + errorFileNum.value)) {
-        trigger('filesChange')
-        trigger('fileProgress', false)
-    }
-}
-
-//上传失败
-const errorFileNum = ref(0)
-const onFileError = (rootFile, file, response) => {
-    errorFileNum.value ++;
-    error(response)
-    trigger('fileError')
-}
-
-//新增的自定义的状态: 'md5'、'merging'、'transcoding'、'failed'
-const statusSet = (id, status) => {
-    const statusMap = {
-        md5: {text: '校验MD5', bgc: '#fff'},
-        merging: {text: '合并中', bgc: '#e2eeff'},
-        transcoding: {text: '转码中', bgc: '#e2eeff'},
-        failed: {text: '上传失败', bgc: '#e2eeff'}
-    }
-    customStatus.value = status
-    nextTick(() => {
-        const statusTag = document.createElement('p')
-        statusTag.className = `custom-status-${id} custom-status`
-        statusTag.innerText = statusMap[status].text
-        statusTag.style.backgroundColor = statusMap[status].bgc
-
-        const statusWrap = document.querySelector(`.file_${id} .uploader-file-status`)
-        statusWrap.appendChild(statusTag)
-    })
-}
-
-const statusRemove = (id) => {
-    customStatus.value = ''
-    nextTick(() => {
-        const statusTag = document.querySelector(`.custom-status-${id}`)
-        statusTag.remove()
-    })
-}
-
-//事件
-const trigger = (key, data = {}) => {
-    emit(key, data)
-}
-
-//错误
-const error = (msg) => {
-    window?.$notification({
-        title: '错误',
-        message: msg,
-        type: 'error',
-        duration: 2000
-    })
-}
-
-//关闭
-const close = () => {
-    remove()
-    isShow(false)
-}
-
-//清除
-const remove = () => {
-    finishFileNum.value = 0
-    beforeFileNum.value = 0
-    errorFileNum.value = 0
-    cancel()
-}
-
-const cancel = () => {
-    uploader?.value.cancel()
-}
-
-//是否显示
-const isShow = (res) => {
-    panelShow.value = res
-}
-
-//点击上传按钮
-const btnUpload = () => {
-    if (uploadBtnRef.value) {
-        uploadBtnRef?.value.$el.click()
-    }
-}
-
-// 暴露出去
-defineExpose({
-    close,
-    remove,
-    cancel,
-    isShow,
-    btnUpload
-})
-</script>
-
-<style lang="scss">
-@import "./style/index";
-</style>

+ 0 - 133
src/global/components_bak/hc-upload-file/index.vue

@@ -1,133 +0,0 @@
-<template>
-    <div class="hc-global-upload-file-box-hide" v-if="isBody">
-        <Teleport to="#app">
-            <UploadFile ref="uploadFileRef"
-                        :global="customGlobal"
-                        :params="customParams"
-                        :options="customOptions"
-                        @fileAdded="uploadFileAdded"
-                        @fileProgress="uploadFileProgress"
-                        @fileSuccess="uploadFileSuccess"
-                        @filesChange="uploadFileChange"
-                        @fileError="uploadFileError"
-            />
-        </Teleport>
-    </div>
-</template>
-
-<script setup>
-import {nextTick, onMounted, ref, watch} from 'vue'
-import UploadFile from './file.vue'
-
-const props = defineProps({
-    global: {
-        type: Boolean,
-        default: true
-    },
-    // 发送给服务器的额外参数
-    params: {
-        type: Object,
-        default: () => ({})
-    },
-    options: {
-        type: Object,
-        default: () => ({})
-    }
-})
-
-//初始变量
-const isBody = ref(false)
-const uploadFileRef = ref(null)
-const customGlobal = ref(props.global)
-const customParams = ref(props.params)
-const customOptions = ref(props.options)
-
-//事件
-const emit = defineEmits(['fileAdded', 'fileSuccess', 'fileError', 'filesChange', 'fileProgress'])
-
-//监听
-watch(() => [
-    props.params,
-    props.options,
-    props.global
-], ([params, options, global]) => {
-    customGlobal.value = global
-    if (params) {
-        customParams.value = params
-    }
-    if (options) {
-        customOptions.value = options
-    }
-})
-
-onMounted(() => {
-    //页面渲染完成后,再让 vue3 的 Teleport,把弹出框挂载到外部节点上。
-    nextTick(() => {
-        isBody.value = true
-    })
-})
-
-//选择了文件
-const uploadFileAdded = () => {
-    emit('fileAdded')
-}
-
-// 文件上传进度
-const uploadFileProgress = (res) => {
-    emit('fileProgress', res)
-}
-// 文件上传成功的回调
-const uploadFileSuccess = (res) => {
-    emit('fileSuccess', res)
-}
-
-//文件上传失败
-const uploadFileError = () => {
-    emit('fileError')
-}
-
-// 文件全部上传完成
-const uploadFileChange = () => {
-    emit('filesChange')
-}
-
-//关闭
-const close = () => {
-    remove()
-    isShow(false)
-}
-
-//清除
-const remove = () => {
-    uploadFileRef.value?.remove()
-}
-
-const cancel = () => {
-    uploadFileRef.value?.cancel()
-}
-
-//是否显示
-const isShow = (res) => {
-    uploadFileRef.value?.isShow(res)
-}
-
-//点击上传按钮
-const btnUpload = () => {
-    uploadFileRef.value?.btnUpload()
-}
-
-// 暴露出去
-defineExpose({
-    close,
-    remove,
-    cancel,
-    isShow,
-    btnUpload
-})
-</script>
-
-<style lang="scss">
-.hc-global-upload-file-box-hide {
-    display: none;
-}
-</style>

+ 0 - 233
src/global/components_bak/hc-upload-file/style/index.scss

@@ -1,233 +0,0 @@
-.hc-global-upload-file-box {
-    &:not(.global-uploader-single) {
-        position: fixed;
-        z-index: 2000;
-        right: 10px;
-        bottom: 0;
-        box-sizing: border-box;
-    }
-    /* 隐藏上传按钮 */
-    .hc-global-upload-btn {
-        position: absolute;
-        clip: rect(0, 0, 0, 0);
-        padding: 0;
-        font-size: initial;
-        line-height: initial;
-        border: initial;
-        border-radius: 0;
-    }
-    .uploader-app {
-        width: 620px;
-        .uploader-list {
-            position: relative;
-            .file-panel {
-                background-color: #fff;
-                border: 1px solid #e2e2e2;
-                border-radius: 7px 7px 0 0;
-                box-shadow: 0 0 10px #0003;
-                .file-title {
-                    display: flex;
-                    height: 40px;
-                    line-height: 40px;
-                    padding: 0 15px;
-                    border-bottom: 1px solid #ddd;
-                    .operate {
-                        flex: 1;
-                        text-align: right;
-                        .el-button {
-                            --el-button-hover-link-text-color: #1ECC95;
-                            i {
-                                font-size: 19px;
-                            }
-                            + .el-button {
-                                margin-left: 8px;
-                            }
-                        }
-                    }
-                }
-                .file-list {
-                    position: relative;
-                    height: 240px;
-                    overflow-x: hidden;
-                    overflow-y: auto;
-                    background-color: #fff;
-                    transition: all .3s;
-                    font-size: 14px;
-                    .file-item {
-                        background-color: #fff;
-                        .uploader-file {
-                            position: relative;
-                            height: 49px;
-                            line-height: 49px;
-                            overflow: hidden;
-                            border-bottom: 1px solid #cdcdcd;
-                            .uploader-file-progress {
-                                position: absolute;
-                                width: 100%;
-                                height: 100%;
-                                background: #d2f5ea;
-                                transform: translate(-100%);
-                            }
-                            .uploader-file-info {
-                                position: relative;
-                                z-index: 1;
-                                height: 100%;
-                                overflow: hidden;
-                                display: flex;
-                                align-items: center;
-                                .uploader-file-actions,
-                                .uploader-file-name,
-                                .uploader-file-size,
-                                .uploader-file-status {
-                                    position: relative;
-                                    height: 100%;
-                                }
-                                .uploader-file-name {
-                                    flex: 1;
-                                    overflow: hidden;
-                                    white-space: nowrap;
-                                    text-overflow: ellipsis;
-                                    .uploader-file-icon {
-                                        display: inline-block;
-                                        vertical-align: top;
-                                        margin-right: 8px;
-                                        font-size: 22px;
-                                        margin-left: 8px;
-                                        &:before {
-                                            font-family: remixicon !important;
-                                            font-style: normal;
-                                            -webkit-font-smoothing: antialiased;
-                                            content: '' !important;
-                                        }
-                                        &[icon='image']:before {
-                                            content: "\ee4a" !important;
-                                            color: #8044de;
-                                        }
-                                        &[icon='audio']:before {
-                                            content: "\ecf6" !important;
-                                            color: #1ECC95;
-                                        }
-                                        &[icon='video']:before {
-                                            content: "\ed20" !important;
-                                            color: #e54d42;
-                                        }
-                                        &[icon='document']:before {
-                                            content: "\ed0e" !important;
-                                            color: #0081ff;
-                                        }
-                                        &[icon='unknown']:before {
-                                            content: "\ed12" !important;
-                                            color: #a5673f;
-                                        }
-                                    }
-                                }
-                                .uploader-file-size {
-                                    width: auto;
-                                    text-align: center;
-                                    margin: 0 24px;
-                                }
-                                .uploader-file-status {
-                                    width: auto;
-                                    margin: 0 24px;
-                                    text-align: center;
-                                    &.text {
-                                        width: 100px;
-                                    }
-                                }
-                                .uploader-file-actions {
-                                    width: auto;
-                                    text-align: center;
-                                    display: flex;
-                                    align-items: center;
-                                    margin-right: 5px;
-                                    span {
-                                        flex: 1;
-                                        display: none;
-                                        cursor: pointer;
-                                        margin-right: 8px;
-                                        font-size: 18px;
-                                        &:before {
-                                            font-family: remixicon !important;
-                                            font-style: normal;
-                                            -webkit-font-smoothing: antialiased;
-                                            content: "";
-                                            transition: color 0.3s;
-                                        }
-                                        &:hover {
-                                            color: #1ECC95;
-                                        }
-                                    }
-                                    .uploader-file-pause:before {
-                                        content: "\efd7";
-                                    }
-                                    .uploader-file-resume:before {
-                                        content: "\f00a";
-                                    }
-                                    .uploader-file-retry:before {
-                                        content: "\f064";
-                                    }
-                                    .uploader-file-remove {
-                                        display: block;
-                                        font-size: 22px;
-                                        &:before {
-                                            content: "\eb98";
-                                        }
-                                    }
-                                }
-                            }
-                            &.md5 .uploader-file-info .uploader-file-actions .uploader-file-resume {
-                                display: none;
-                            }
-                        }
-                        .uploader-file[status='uploading'] .uploader-file-info .uploader-file-actions .uploader-file-pause,
-                        .uploader-file[status='waiting'] .uploader-file-info .uploader-file-actions .uploader-file-pause,
-                        .uploader-file[status='paused'] .uploader-file-info .uploader-file-actions .uploader-file-resume,
-                        .uploader-file[status='error'] .uploader-file-info .uploader-file-actions .uploader-file-retry {
-                            display: block;
-                        }
-                        .uploader-file[status='error'] .uploader-file-progress {
-                            background: #f7cac6;
-                        }
-                        .uploader-file[status='success'] .uploader-file-info .uploader-file-status.text {
-                            color: #1bb886;
-                        }
-                        .uploader-file[status='error'] .uploader-file-info .uploader-file-status.text {
-                            color: #ce453b;
-                        }
-                    }
-                }
-                &.collapse {
-                    .file-title {
-                        background-color: #e7ecf2;
-                    }
-                    .file-list {
-                        height: 0;
-                    }
-                }
-            }
-        }
-    }
-    .no-file {
-        position: absolute;
-        top: 45%;
-        left: 50%;
-        color: #999;
-        font-size: 16px;
-        transform: translate(-50%, -50%);
-    }
-    .custom-status {
-        position: absolute;
-        top: 0;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        z-index: 1;
-    }
-    &.global-uploader-single {
-        .hc-global-upload-btn {
-            position: relative;
-        }
-    }
-}
-
-

+ 0 - 209
src/global/components_bak/hc-uploads/formItem.vue

@@ -1,209 +0,0 @@
-<template>
-    <div class="form-item-dashed hover flex" @click="importModalClick">
-        <div class="flex-1 truncate" v-if="uploadValue">{{fileNameValue}}</div>
-        <div class="flex-1" v-else>点此上传文件</div>
-        <div class="text-hover" @click.stop="previewClick" v-if="uploadValue">预览文件</div>
-    </div>
-
-    <!--上传-->
-    <HcDialog :show="importModal" title="上传文件" widths="38rem" saveText="确认上传" :loading="uploadDisabled" @close="importModalClose" @save="importModalYesClick">
-        <el-upload ref="uploadRef" class="hc-upload-border approach" drag :action="api + action" :headers="getTokenHeader()" :data="uploadData" :accept="accept" :disabled="uploadDisabled" :limit="1" :show-file-list="false"
-                   :before-upload="beforeUpload" :on-exceed="uploadExceed" :on-progress="uploadprogress" :on-success="uploadSuccess" :on-error="uploadError" :on-change="uploadChange" :auto-upload="false">
-            <div class="hc-upload-loading upload-file-info" v-loading="uploadDisabled" element-loading-text="上传中...">
-                <template v-if="uploadFileInfo?.name">
-                    <HcIcon name="file-text" class="upload-file-icon"/>
-                    <div class="upload-file-name">{{uploadFileInfo?.name}}</div>
-                </template>
-                <template v-else>
-                    <HcIcon name="upload-cloud" class="upload-icon"/>
-                    <div class="el-upload__text">拖动文件到这里 或 <em>点击这里选择文件</em> 并上传</div>
-                </template>
-            </div>
-            <template #tip>
-                <div class="el-upload__tip">允许格式:{{formatTip}}, 文件大小 小于 {{size}}MB</div>
-            </template>
-        </el-upload>
-    </HcDialog>
-</template>
-
-<script setup>
-import {ref, watch, onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import {isFileSize} from "js-fast-way"
-import {genFileId} from "element-plus";
-
-const props = defineProps({
-    modelValue: {
-        type: String,
-        default: ''
-    },
-    datas: {
-        type: Object,
-        default: () => ({})
-    },
-    action: {
-        type: String,
-        default: "upload-file"
-    },
-    accept: {
-        type: String,
-        default: "image/png,image/jpg,image/jpeg,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/pdf,.doc,.docx,application/msword"
-    },
-    size: {
-        type: Number,
-        default: 200
-    },
-    formatTip: {
-        type: String,
-        default: "png/jpg/jpeg/excel/pdf/doc/docx"
-    },
-})
-
-//变量
-const uploadRef = ref(null)
-const uploadData = ref(props.datas)
-const uploadFileInfo = ref({})
-const uploadDisabled = ref(false)
-const uploadValue = ref(props.modelValue)
-
-const api = '/api/blade-resource/oss/endpoint/';
-
-//监听
-watch(() => [
-    props.datas,
-    props.modelValue
-], ([datas,val]) => {
-    uploadData.value = datas
-    uploadValue.value = val
-    getFileName(val)
-})
-
-onMounted(() => {
-    getFileName(props.modelValue)
-})
-
-//事件
-const emit = defineEmits(['progress', 'change', 'update:modelValue'])
-
-//上传弹窗
-const importModal = ref(false)
-const importModalClick = () => {
-    importModal.value = true
-}
-
-//确认上传
-const importModalYesClick = () => {
-    uploadRef.value?.submit()
-}
-
-//关闭上传
-const importModalClose = () => {
-    uploadRef.value?.clearFiles()
-    importModal.value = false
-}
-
-//获取文件名
-const fileNameValue = ref('')
-const getFileName = (url) => {
-    if (url) {
-        let num = url.lastIndexOf('/') + 1
-        fileNameValue.value = url.substring(num)
-    } else {
-        fileNameValue.value = ''
-    }
-}
-
-
-//上传前
-const beforeUpload = async (file) => {
-    if (isFileSize(file?.size,props.size)) {
-        return true;
-    } else {
-        window?.$message?.warning('文件大小, 不能过' + props.size + 'M!');
-        return false;
-    }
-}
-
-//超出限制时
-const uploadExceed = (files) => {
-    uploadRef.value?.clearFiles()
-    const file = files[0]
-    file.uid = genFileId()
-    uploadRef.value?.handleStart(file)
-}
-
-//上传中
-const uploadprogress = () => {
-    uploadDisabled.value = true
-    emit('progress', true)
-}
-
-//上传完成
-const uploadSuccess = ({code, data}) => {
-    uploadDisabled.value = false
-    emit('progress', false)
-    const pdfUrl = data?.pdfUrl ?? ''
-    if (code === 200 && pdfUrl) {
-        uploadValue.value = pdfUrl
-        window?.$message?.success('上传成功');
-        importModal.value = false
-        getFileName(pdfUrl)
-        //事件
-        emit('update:modelValue', pdfUrl)
-        emit('change', pdfUrl)
-    } else {
-        window?.$message?.error('上传失败');
-    }
-}
-
-//上传失败
-const uploadError = () => {
-    uploadDisabled.value = false
-    emit('progress', false)
-    window?.$message?.error('上传失败');
-}
-
-//文件改变时
-const uploadChange = (file) => {
-    uploadFileInfo.value = file
-}
-
-//预览文件
-const previewClick = () => {
-    const pdfUrl = uploadValue.value ?? ''
-    if (pdfUrl) window.open(pdfUrl,'_blank')
-}
-</script>
-
-<style lang="scss">
-.hc-upload-border.approach {
-    .el-upload-dragger {
-        padding: 24px;
-    }
-    .hc-upload-loading.upload-file-info {
-        .hc-icon-i {
-            font-size: 40px;
-        }
-        .upload-icon {
-            color: var(--el-text-color-placeholder);
-        }
-        .upload-file-icon {
-            color: var(--el-color-primary-light-5);
-        }
-        .el-upload__text {
-            margin-top: 10px;
-        }
-        .upload-file-name {
-            margin-top: 10px;
-            font-size: 14px;
-            text-align: center;
-            color: var(--el-color-primary);
-        }
-    }
-    .el-upload__tip {
-        font-size: 14px;
-        margin-top: 16px;
-        color: var(--el-text-color-placeholder);
-    }
-}
-</style>

+ 0 - 218
src/global/components_bak/hc-uploads/index.vue

@@ -1,218 +0,0 @@
-<template>
-    <div class="hc-uploads-box" v-loading="spinShow">
-        <el-upload ref="uploadRef" v-model:file-list="fileListData" :action="api + action" :headers="getTokenHeader()" :data="uploadData" :limit="limit" :accept="accept"
-                   list-type="picture-card" :multiple="limit > 1"  :disabled="uploadDisabled" :on-preview="uploadPreview"
-                   :on-success="uploadSuccess" :on-exceed="uploadExceed" :on-error="uploadError"
-                   :before-upload="beforeUpload" :on-progress="uploadprogress" :on-remove="uploadRemove">
-            <HcIcon name="add" class="hc-upload-icon"/>
-        </el-upload>
-        <el-image-viewer v-if="showViewer" :initial-index="initialIndex" :url-list="previewFileList" @close="showViewerClose"/>
-    </div>
-</template>
-
-<script setup>
-import {ref,watch,onMounted} from "vue";
-import {getTokenHeader} from '~src/api/request/header';
-import {isFileSize, getObjValue, getObjVal, arrIndex} from "js-fast-way"
-import {genFileId} from "element-plus";
-
-const props = defineProps({
-    fileList: {
-        type: Array,
-        default: () => ([])
-    },
-    datas: {
-        type: Object,
-        default: () => ({})
-    },
-    api: {
-        type: String,
-        default: "/api/blade-resource/oss/endpoint/"
-    },
-    action: {
-        type: String,
-        default: "put-file"
-    },
-    accept: {
-        type: String,
-        default: "image/png,image/jpg,image/jpeg"
-    },
-    limit: {
-        type: Number,
-        default: 1
-    },
-    size: {
-        type: Number,
-        default: 30
-    },
-    viewer: {
-        type: Boolean,
-        default: true
-    },
-})
-
-//变量
-const uploadRef = ref(null)
-const uploadData = ref(props.datas)
-const fileListData = ref(props.fileList);
-const uploadDisabled = ref(false)
-
-//监听
-watch(() => [
-    props.fileList,
-    props.datas,
-], ([fileList, datas]) => {
-    uploadData.value = datas
-    fileListData.value = fileList
-})
-
-//渲染完成
-onMounted(()=> {
-    beforeFileNum.value = 0
-    finishFileNum.value = 0
-    errorFileNum.value = 0
-})
-
-const showViewerClose = () => {
-    showViewer.value = false
-}
-
-//事件
-const emit = defineEmits(['change', 'progress', 'del', 'preview'])
-
-//上传前
-const spinShow = ref(false)
-const beforeFileNum = ref(0)
-const beforeUpload = async (file) => {
-    if (isFileSize(file?.size, props.size)) {
-        beforeFileNum.value ++;
-        spinShow.value = true
-        return true;
-    } else {
-        window?.$message?.warning(`文件大小, 不能过${props.size}M!`);
-        return false;
-    }
-}
-
-//超出限制时
-const uploadExceed = (files) => {
-    //上传一个文件时,重置
-    if (props.limit === 1) {
-        uploadRef.value?.clearFiles()
-        const file = files[0]
-        file.uid = genFileId()
-        uploadRef.value?.handleStart(file)
-    } else {
-        window?.$message?.warning(`请上传 ${props.accept} 格式的文件,文件大小不超过${props.size}M`);
-    }
-}
-
-//上传中
-const uploadprogress = () => {
-    uploadDisabled.value = true
-    emit('progress', true)
-}
-
-//上传完成
-const finishFileNum = ref(0)
-const uploadSuccess = (response,uploadFile,uploadFiles) => {
-    finishFileNum.value ++;
-    if (beforeFileNum.value === finishFileNum.value) {
-        let fileList = getUploadFileList(uploadFiles)
-        uploadClearFiles()
-        emit('change', {type: 'success', fileList})
-        emit('progress', false)
-    }
-}
-
-//上传失败
-const errorFileNum = ref(0)
-const uploadError = () => {
-    errorFileNum.value ++;
-    window?.$message?.error('上传失败');
-    const num = finishFileNum.value + errorFileNum.value;
-    if (beforeFileNum.value === num) {
-        let fileList = getUploadFileList(fileListData.value)
-        uploadClearFiles()
-        emit('change', {type: 'error', fileList})
-        emit('progress', false)
-    }
-}
-
-const uploadClearFiles = () => {
-    finishFileNum.value = 0
-    beforeFileNum.value = 0
-    errorFileNum.value = 0
-    spinShow.value = false
-    uploadDisabled.value = false
-}
-
-//获取文件URL
-const getUploadFileList = (fileListArr) => {
-    let fileArr = [], fileList = fileListArr ??[];
-    fileList.forEach(item => {
-        if (getObjVal(item?.response)) {
-            const data = getObjValue(item?.response?.data)
-            fileArr.push({
-                ...data,
-                url: data['link'],
-                name: data['originalName']
-            })
-        } else {
-            fileArr.push(item)
-        }
-    })
-    return fileArr
-}
-
-
-
-//预览
-const showViewer = ref(false)
-const initialIndex = ref(-1)
-const previewFileList = ref([])
-const uploadPreview = (file) => {
-    let fileArr = getUploadFileUrl()
-    const fileList = fileListData.value ?? [];
-    const index = arrIndex(fileList, 'uid', file?.uid)
-    if (props.viewer) {
-        previewFileList.value = fileArr
-        initialIndex.value = index
-        showViewer.value = true
-    } else {
-        emit('preview', {index, fileArr, fileList})
-    }
-}
-
-//获取文件URL
-const getUploadFileUrl = () => {
-    let fileArr = [], fileList = fileListData.value ?? [];
-    fileList.forEach(item => {
-        if (getObjVal(item?.response)) {
-            fileArr.push(item?.response?.data?.link)
-        } else {
-            fileArr.push(item?.url)
-        }
-    })
-    return fileArr
-}
-
-//删除文件
-const uploadRemove = (row) => {
-    let link;
-    if (getObjVal(row?.response)) {
-        link = row?.response?.data?.link
-    } else {
-        link = row?.url
-    }
-    emit('del', {link, row, fileList: fileListData.value})
-}
-</script>
-
-<style lang="scss">
-.hc-uploads-box .el-upload-list .el-upload-list__item {
-    .el-upload-list__item-status-label, .el-icon--close-tip {
-        display: none;
-    }
-}
-</style>

+ 0 - 66
src/global/components_bak/index.js

@@ -1,66 +0,0 @@
-import HcImg from './hc-img/index.vue'
-import HcIcon from './hc-icon/index.vue'
-import HcCard from './hc-card/index.vue'
-import HcCardItem from './hc-card/item.vue'
-import HcTable from './hc-table/index.vue'
-import HcTable1 from './hc-table/index1.vue'
-import HcPages from './hc-page/index.vue'
-import HcDrawer from './hc-drawer/index.vue'
-import HcDialog from './hc-dialog/index.vue'
-import HcUploads from './hc-uploads/index.vue'
-import HcFormItemUpload from './hc-uploads/formItem.vue'
-import HcCounter from './hc-counter/index.vue'
-import HcTooltip from './hc-tooltip/index.vue'
-import HcSmsAuth from './hc-sms-auth/index.vue'
-import HcMenuSimple from './hc-menu-simple/index.vue'
-import HcDatePicker from './hc-date-picker/index.vue'
-import HcNewSwitch from './hc-new-switch/index.vue'
-import HcDragModal from './hc-drag-modal/index.vue'
-import HcContextMenu from './hc-context-menu/index.vue'
-import HcTabsSimple from './hc-tabs-simple/index.vue'
-import HcStatus from './hc-status/index.vue'
-import HcPageHeader from './hc-page-header/index.vue'
-import HcNoData from './hc-no-data/index.vue'
-import HcAutoComplete from './hc-auto-complete/index.vue'
-import HcPdf from './hc-pdf/index.vue'
-import HcReportModal from './hc-report-modal/index.vue'
-import HcReportExperts from './hc-report-experts/index.vue'
-import HcTasksUser from './hc-tasks-user/index.vue'
-import HcLoading from './hc-loading/index.vue'
-import HcOnlineOffice from './hc-online-office/index.vue'
-import HcUploadFile from './hc-upload-file/index.vue'
-
-//注册全局组件
-export const setupComponents = (App) => {
-    App.component('HcImg', HcImg)
-    App.component('HcIcon', HcIcon)
-    App.component('HcCard', HcCard)
-    App.component('HcCardItem', HcCardItem)
-    App.component('HcTable', HcTable)
-    App.component('HcTable1', HcTable1)
-    App.component('HcPages', HcPages)
-    App.component('HcDrawer', HcDrawer)
-    App.component('HcDialog', HcDialog)
-    App.component('HcUploads', HcUploads)
-    App.component('HcFormItemUpload', HcFormItemUpload)
-    App.component('HcCounter', HcCounter)
-    App.component('HcTooltip', HcTooltip)
-    App.component('HcSmsAuth', HcSmsAuth)
-    App.component('HcMenuSimple', HcMenuSimple)
-    App.component('HcDatePicker', HcDatePicker)
-    App.component('HcNewSwitch', HcNewSwitch)
-    App.component('HcDragModal', HcDragModal)
-    App.component('HcContextMenu', HcContextMenu)
-    App.component('HcTabsSimple', HcTabsSimple)
-    App.component('HcStatus', HcStatus)
-    App.component('HcPageHeader', HcPageHeader)
-    App.component('HcNoData', HcNoData)
-    App.component('hcAutoComplete', HcAutoComplete)
-    App.component('HcPdf', HcPdf)
-    App.component('HcReportModal', HcReportModal)
-    App.component('HcReportExperts', HcReportExperts)
-    App.component('HcTasksUser', HcTasksUser)
-    App.component('HcLoading', HcLoading)
-    App.component('HcOnlineOffice', HcOnlineOffice)
-    App.component('HcUploadFile', HcUploadFile)
-}