iZaiZaiA 3 tahun lalu
induk
melakukan
a0770f3c3c

+ 1 - 2
package.json

@@ -8,7 +8,6 @@
     },
     "dependencies": {
         "axios": "^0.27.2",
-        "click-outside-vue3": "^4.0.1",
         "crypto-js": "^4.1.1",
         "dayjs": "^1.11.5",
         "echarts": "^5.4.0",
@@ -36,6 +35,6 @@
         "unplugin-auto-import": "^0.11.2",
         "unplugin-vue-components": "^0.22.7",
         "vfonts": "^0.0.3",
-        "vite": "^3.1.3"
+        "vite": "^3.1.4"
     }
 }

+ 6 - 6
src/components/plugins/table-form/hc-form-upload.vue

@@ -17,7 +17,7 @@ const props = defineProps({
         type: [Number,String],
         default: ''
     },
-    keyName: {
+    keyname: {
         type: [Number,String],
         default: ''
     },
@@ -30,7 +30,7 @@ const props = defineProps({
 //变量
 const isLoading = ref(false)
 const isSrc = ref(props.src)
-const isKeyName = ref(props.keyName)
+const isKeyName = ref(props.keyname)
 
 const action = '/api/blade-resource/oss/endpoint/put-file';
 const accept = 'image/png,image/jpg,image/jpeg';
@@ -38,10 +38,10 @@ const accept = 'image/png,image/jpg,image/jpeg';
 //监听
 watch(() => [
     props.src,
-    props.keyName,
-], ([src, keyName]) => {
+    props.keyname,
+], ([src, keyname]) => {
     isSrc.value = src
-    isKeyName.value = keyName
+    isKeyName.value = keyname
 })
 
 //事件
@@ -77,7 +77,7 @@ const formUploadExceed = () => {
 
 //删除上传的文件
 const delTableFormFile = () => {
-    emit('del', isKeyName.value)
+    emit('del', keyname.value)
 }
 </script>
 

+ 1 - 0
src/global/components/hc-card/index.vue

@@ -110,6 +110,7 @@ const isSlotSearchBar = ref(!!slots.search);
             position: relative;
             display: flex;
             align-items: center;
+            margin-left: 120px;
         }
     }
     .el-card__body {

+ 2 - 4
src/global/components/hc-context-menu/index.vue

@@ -14,8 +14,9 @@
 
 <script setup>
 import {ref, useSlots, watch, nextTick, onMounted, onBeforeUnmount} from "vue";
-import clickOutsideVue from 'click-outside-vue3';
+import {ClickOutside as vClickOutside} from 'element-plus'
 import {getRandom, deepClone} from "vue-utils-plus"
+
 const props = defineProps({
     ui: {
         type: String,
@@ -31,9 +32,6 @@ const props = defineProps({
 const uuid = getRandom()
 const menus = ref(props.datas)
 
-//挂载自定义指令
-const vClickOutside = clickOutsideVue.directive
-
 //监听表头
 watch(() => [
     props.datas

+ 36 - 21
src/router/modules/base.js

@@ -201,27 +201,6 @@ export default [
             }
         ],
     },
-    {
-        path: '/other',
-        name: 'other',
-        redirect: '/other/order-service',
-        meta: {title: '其他页面'},
-        component: Layout,
-        children: [
-            {
-                path: '/other/order-service',
-                name: 'order-service',
-                meta: {title: '工单服务'},
-                component: () => import('~src/views/other/order-service.vue')
-            },
-            {
-                path: '/user/index',
-                name: 'user-index',
-                meta: {title: '个人中心'},
-                component: () => import('~src/views/user/index.vue')
-            }
-        ],
-    },
     {
         path: '/tentative/material',
         name: 'tentative-material',
@@ -372,6 +351,42 @@ export default [
             }
         ],
     },
+    {
+        path: '/other',
+        name: 'other',
+        redirect: '/other/order-service',
+        meta: {title: '其他页面'},
+        component: Layout,
+        children: [
+            {
+                path: '/other/order-service',
+                name: 'order-service',
+                meta: {title: '工单服务'},
+                component: () => import('~src/views/other/order-service.vue')
+            },
+            {
+                path: '/user/index',
+                name: 'user-index',
+                meta: {title: '个人中心'},
+                component: () => import('~src/views/user/index.vue')
+            }
+        ],
+    },
+    {
+        path: '/hc-test',
+        name: 'hc-test',
+        redirect: '/test/http/index',
+        meta: {title: '测试页面'},
+        component: Layout,
+        children: [
+            {
+                path: '/test/http/index',
+                name: 'test-http-index',
+                meta: {title: '请求测试'},
+                component: () => import('~src/test/http/index.vue')
+            }
+        ],
+    },
     {
         path: '/403',
         name: '403',

+ 1 - 1
src/router/modules/token.js

@@ -9,5 +9,5 @@ export default [
     'schedule-table',
     'order-service',
     'user-index',
-    'test-index'
+    'test-http-index',
 ]

+ 72 - 0
src/test/http/index.vue

@@ -0,0 +1,72 @@
+<template>
+    <div class="hc-page-box">
+        <HcCard>
+            <template #header>
+                <div class="w-32">
+                    <el-select v-model="httpForm.type" placeholder="请求类型" size="large">
+                        <el-option v-for="item in typeData" :label="item" :value="item"/>
+                    </el-select>
+                </div>
+                <div class="w-full ml-3">
+                    <el-input v-model="httpForm.url" size="large" placeholder="请求地址,不要加 域名 和 api 字符" clearable @keyup="keyUpEvent"/>
+                </div>
+                <div class="ml-3">
+                    <el-button type="primary" hc-btn @click="searchClick">
+                        <HcIcon name="send-plane"/>
+                        <span>发起请求</span>
+                    </el-button>
+                </div>
+            </template>
+            1111
+            <template #action>
+                <el-button type="primary" hc-btn>
+                    <HcIcon name="add-circle"/>
+                    <span>新增</span>
+                </el-button>
+                <el-button hc-btn>
+                    <HcIcon name="edit"/>
+                    <span>编辑</span>
+                </el-button>
+            </template>
+        </HcCard>
+
+    </div>
+</template>
+
+<script setup>
+import {ref,watch,onMounted} from "vue";
+import {useRouter, useRoute} from 'vue-router'
+import {useAppStore} from "~src/store";
+
+//初始变量
+const router = useRouter()
+const useRoutes = useRoute()
+const useAppState = useAppStore()
+
+//全局变量
+const projectId = ref(useAppState.getProjectId);
+const contractId = ref(useAppState.getContractId);
+
+const typeData = ref([ 'GET', 'POST'])
+
+//搜索表单
+const httpForm = ref({
+    type: 'GET', url: ''
+})
+
+//回车搜索
+const keyUpEvent = (e) => {
+    if (e.key === "Enter") {
+
+    }
+}
+
+//搜索
+const searchClick = () => {
+
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 4 - 2
src/views/data-fill/components/ListItem.vue

@@ -457,8 +457,9 @@ const fileListData = ref([]);
 const uploadData = ref({})
 
 //上传被点击
-const uploadClick = (item) => {
+const uploadClick = (item,index) => {
     const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
+    const keyName = `item-${index}-${pkeyIds}`
     if (pkeyIds) {
         if (isStatus.value !== '3' && item.isTableForm) {
             uploadModal.value = true
@@ -466,7 +467,8 @@ const uploadClick = (item) => {
             //获取文件列表
             getBussFileList(pkeyIds)
         } else if (!item.isRenderTableForm) {
-            window?.$message?.warning('请先展开表单')
+            CollapseChange(keyName)
+            window?.$message?.warning('请再次点击上传')
         } else if (!item.isTableForm) {
             window?.$message?.warning('暂无表单数据')
         } else {

+ 1 - 1
src/views/data-fill/components/division/HcTreeData.vue

@@ -25,7 +25,7 @@ const props = defineProps({
 //变量
 const ElTreeRef = ref(null)
 const ElTreeProps = ref({
-    label: 'nodeName',
+    label: 'fullName',
     children: 'children'
 })
 

+ 1 - 1
src/views/data-fill/components/division/HcTreeData1.vue

@@ -28,7 +28,7 @@ const props = defineProps({
 //变量
 const ElTreeRef = ref(null)
 const ElTreeProps = ref({
-    label: 'nodeName',
+    label: 'fullName',
     children: 'children'
 })
 

+ 0 - 2
src/views/data-fill/wbs.vue

@@ -1113,8 +1113,6 @@ const tableFormSaveClick = async () => {
         FormData = ListItemRef.value?.getFormData()
         FormRegExpJson = ListItemRef.value?.getFormRegExpJson()
     }
-    clog('FormData', '表单列表数据', FormData, '客户端')
-    clog('FormRegExpJson', '表单效验数据', FormRegExpJson, '客户端')
     //效验数据
     if (getObjNullValue(FormRegExpJson)) {
         setFormRegExpJson(FormRegExpJson)

+ 2 - 1
src/views/tentative/material/approach.vue

@@ -171,7 +171,7 @@
             </template>
         </HcDialog>
 
-        
+
     </div>
 </template>
 
@@ -351,6 +351,7 @@ const importModalClose = () => {
     importModal.value = false
 }
 
+
 </script>
 
 <style lang="scss" scoped>

+ 4 - 9
yarn.lock

@@ -343,11 +343,6 @@ caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001407:
   optionalDependencies:
     fsevents "~2.3.2"
 
-click-outside-vue3@^4.0.1:
-  version "4.0.1"
-  resolved "https://registry.yarnpkg.com/click-outside-vue3/-/click-outside-vue3-4.0.1.tgz#81a6ac01696b301764b42db6fdbdf28e7cd8ef95"
-  integrity sha512-sbplNecrup5oGqA3o4bo8XmvHRT6q9fvw21Z67aDbTqB9M6LF7CuYLTlLvNtOgKU6W3zst5H5zJuEh4auqA34g==
-
 color-name@^1.1.4:
   version "1.1.4"
   resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
@@ -1226,10 +1221,10 @@ vfonts@^0.0.3:
   resolved "https://registry.yarnpkg.com/vfonts/-/vfonts-0.0.3.tgz#999d66fecea18efee3f2b966c81101ae8ce01a29"
   integrity sha512-nguyw8L6Un8eelg1vQ31vIU2ESxqid7EYmy8V+MDeMaHBqaRSkg3dTBToC1PR00D89UzS/SLkfYPnx0Wf23IQQ==
 
-vite@^3.1.3:
-  version "3.1.3"
-  resolved "https://registry.yarnpkg.com/vite/-/vite-3.1.3.tgz#b2a0821c11aae124bb7618f8036913c689afcc59"
-  integrity sha512-/3XWiktaopByM5bd8dqvHxRt5EEgRikevnnrpND0gRfNkrMrPaGGexhtLCzv15RcCMtV2CLw+BPas8YFeSG0KA==
+vite@^3.1.4:
+  version "3.1.4"
+  resolved "https://registry.yarnpkg.com/vite/-/vite-3.1.4.tgz#b75824b819d8354a6f36e4b988943c7e4947e155"
+  integrity sha512-JoQI08aBjY9lycL7jcEq4p9o1xUjq5aRvdH4KWaXtkSx7e7RpAh9D3IjzDWRD4Fg44LS3oDAIOG/Kq1L+82psA==
   dependencies:
     esbuild "^0.15.6"
     postcss "^8.4.16"