From 960df219d3eb504a712545898b44e9543fa81176 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期四, 29 八月 2024 18:36:09 +0800 Subject: [PATCH] 页面管理 --- customer_list/common/static/fonts/ywiconfont/iconfont.ttf | 0 customer_list/common/static/fonts/ywiconfont/iconfont.woff | 0 /dev/null | 194 -------------------------------- vite.config.ts | 2 src/views/project/yw/lowCode/sqlAmis/types.ts | 9 + src/api/login/UserMenuData.ts | 6 src/views/project/yw/lowCode/sqlAmis/SqlAmis.vue | 85 ++++++++------ customer_list/common/static/fonts/ywiconfont/iconfont.css | 10 + customer_list/common/static/fonts/ywiconfont/iconfont.woff2 | 0 9 files changed, 69 insertions(+), 237 deletions(-) diff --git a/customer_list/common/static/fonts/ywiconfont/iconfont.css b/customer_list/common/static/fonts/ywiconfont/iconfont.css index 0137558..726b95e 100644 --- a/customer_list/common/static/fonts/ywiconfont/iconfont.css +++ b/customer_list/common/static/fonts/ywiconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "ywifont"; /* Project id 4655417 */ - src: url('iconfont.woff2?t=1724651796478') format('woff2'), - url('iconfont.woff?t=1724651796478') format('woff'), - url('iconfont.ttf?t=1724651796478') format('truetype'); + src: url('iconfont.woff2?t=1724925470134') format('woff2'), + url('iconfont.woff?t=1724925470134') format('woff'), + url('iconfont.ttf?t=1724925470134') format('truetype'); } .ywifont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.ywicon-sql:before { + content: "\e65d"; +} + .ywicon-yuyinshuru:before { content: "\e633"; } diff --git a/customer_list/common/static/fonts/ywiconfont/iconfont.ttf b/customer_list/common/static/fonts/ywiconfont/iconfont.ttf index 5ade3ee..d730464 100644 --- a/customer_list/common/static/fonts/ywiconfont/iconfont.ttf +++ b/customer_list/common/static/fonts/ywiconfont/iconfont.ttf Binary files differ diff --git a/customer_list/common/static/fonts/ywiconfont/iconfont.woff b/customer_list/common/static/fonts/ywiconfont/iconfont.woff index 33b8061..249387e 100644 --- a/customer_list/common/static/fonts/ywiconfont/iconfont.woff +++ b/customer_list/common/static/fonts/ywiconfont/iconfont.woff Binary files differ diff --git a/customer_list/common/static/fonts/ywiconfont/iconfont.woff2 b/customer_list/common/static/fonts/ywiconfont/iconfont.woff2 index 11fac58..d5a906a 100644 --- a/customer_list/common/static/fonts/ywiconfont/iconfont.woff2 +++ b/customer_list/common/static/fonts/ywiconfont/iconfont.woff2 Binary files differ diff --git a/src/api/login/UserMenuData.ts b/src/api/login/UserMenuData.ts index 1aba68b..57c0802 100644 --- a/src/api/login/UserMenuData.ts +++ b/src/api/login/UserMenuData.ts @@ -19,7 +19,7 @@ ID: '1', ParentID: '1742436890822447104', Type: 2, - Name: 'AMIS缂栬緫鍣�', + Name: 'AMIS缂栬緫', Path: '/home', Permission: '', Icon: 'ywifont ywicon-a-appround15', @@ -35,7 +35,7 @@ ID: '3', ParentID: '1742436890822447104', Type: 2, - Name: 'SQL-AMIS缂栬緫鍣�', + Name: '椤甸潰绠$悊', Path: '/lowCode/sqlAmis', Permission: '', Icon: 'ywifont ywicon-a-appround15', @@ -51,7 +51,7 @@ ID: '2', ParentID: '1742436890822447104', Type: 2, - Name: 'SQL-AMIS缂栬緫', + Name: 'SQL缂栬緫鍣�', Path: '/lowCode/sqlAmis/edit', Permission: '', Icon: 'ywifont ywicon-a-appround15', diff --git a/src/views/project/yw/AmisPage.vue b/src/views/project/yw/AmisPage.vue deleted file mode 100644 index a519a27..0000000 --- a/src/views/project/yw/AmisPage.vue +++ /dev/null @@ -1,28 +0,0 @@ -<template> - <div> - <span v-if="data?.title" class="text-base font-bold flex-center">{{ data?.title }}</span> - <AMISRenderer :schema="testData" :locals="data?.amis_data" /> - </div> -</template> - -<script setup lang="ts"> -import type { PropType } from 'vue'; -import AMISRenderer from '/@/components/amis/AMISRenderer.vue'; - -// import 鍛ㄧぞ浼氬瓨閿�姣� from './testData/鍛ㄧぞ浼氬瓨閿�姣�.json' -// import 瀹㈡埛鎯呭喌 from './testData/瀹㈡埛鎯呭喌.json' - -// import 甯傚満缁煎悎鐘舵�� from './testData/甯傚満缁煎悎鐘舵��.json' -// import 閿�鍞搴﹂攢閲� from './testData/閿�鍞搴﹂攢閲�.json' -// import 缁忔祹杩愯 from './testData/缁忔祹杩愯.json' -import testData from './testData.json' - -const props = defineProps({ - data: { - type: Object as PropType<any>, - }, -}); - - -</script> -<style scoped lang="scss"></style> diff --git a/src/views/project/yw/Home.vue b/src/views/project/yw/Home.vue deleted file mode 100644 index 2a07093..0000000 --- a/src/views/project/yw/Home.vue +++ /dev/null @@ -1,26 +0,0 @@ -<template> - <div> - <div class="!size-10 bg-red-200"> - <svgIcon name="ywifont ywicon-next"></svgIcon> - <span class="my-amis-scope"> - <span class="text-sm">浣犲ソ</span> - </span> - <span class="my-amis-scope"> - <span class="iconfont icon-hosteye "></span> - - - </span> - </div> - <AmisPage /> - </div> -</template> - -<script setup lang="ts"> -import AmisPage from './AmisPage.vue'; -import IconSelector from '/@/components/iconSelector/index.vue'; - -import { ref } from 'vue'; - -const icon = ref(''); -</script> -<style scoped lang="scss"></style> diff --git a/src/views/project/yw/lowCode/sqlAmis/SqlAmis.vue b/src/views/project/yw/lowCode/sqlAmis/SqlAmis.vue index 6c8adcc..2957131 100644 --- a/src/views/project/yw/lowCode/sqlAmis/SqlAmis.vue +++ b/src/views/project/yw/lowCode/sqlAmis/SqlAmis.vue @@ -2,16 +2,16 @@ <HMContainer type="card"> <template #header> <el-form ref="queryFormRef" :inline="true" :model="queryParams"> - <el-form-item label="鍚嶇О" prop="title"> - <el-input v-model="queryParams.title" style="width: 226.4px" placeholder="鍚嶇О" clearable /> + <el-form-item label="鏍囬" prop="title"> + <el-input v-model="queryParams.title" style="width: 226.4px" placeholder="鏍囬" clearable /> </el-form-item> - + <el-form-item> <el-button type="primary" icon="ele-Search" @click="handleQueryTable"> 鏌ヨ </el-button> <el-button icon="ele-Refresh" @click="resetQuery">閲嶇疆 </el-button> - <el-button icon="ele-Plus" @click="openOperateDialog()"> 澧炲姞 </el-button> + <el-button icon="ele-Plus" @click="openOperateDialog()"> 娣诲姞 </el-button> </el-form-item> - </el-form> + </el-form> </template> <template #main> <el-table @@ -24,28 +24,35 @@ :expand-row-keys="treeTableExpandKeys" @expand-change="tableExpandChange" :row-class-name="isDragStatus ? 'cursor-move' : 'cursor-pointer'" - :cell-style="tableCellCenterExceptColumn()" - :header-cell-style="{ textAlign: 'center' }" :data="displayTableData" highlight-current-row > - <el-table-column prop="id" label="id" width="220" fixed="left" show-overflow-tooltip> </el-table-column> - <el-table-column prop="title" label="鍚嶇О" width="220" fixed="left" show-overflow-tooltip> </el-table-column> - + <el-table-column prop="title" label="鏍囬" width="300" fixed="left" show-overflow-tooltip> </el-table-column> + <el-table-column prop="prompt" label="鎻愮ず璇�" show-overflow-tooltip> </el-table-column> + <el-table-column prop="published" label="鐘舵��" width="80" show-overflow-tooltip> + <template #default="scope"> + {{ supervisorPublishedMap[scope.row.published] }} + </template> + </el-table-column> + <el-table-column label="鍒涘缓浜�" prop="creator" width="100" show-overflow-tooltip> </el-table-column> + <el-table-column label="鍒涘缓鏃堕棿" prop="create_time" width="105" show-overflow-tooltip> </el-table-column> + <el-table-column label="鏇存柊鏃堕棿" prop="update_time" width="105" show-overflow-tooltip> </el-table-column> + <el-table-column label="澶囨敞" prop="note" show-overflow-tooltip> </el-table-column> <!-- <el-table-column prop="Code" label="缂栫爜" show-overflow-tooltip> </el-table-column> <el-table-column prop="Description" label="璇存槑" width="550" show-overflow-tooltip> </el-table-column> --> - <el-table-column label="鎿嶄綔" width="150" fixed="right" show-overflow-tooltip> + <el-table-column label="鎿嶄綔" width="120" fixed="right" show-overflow-tooltip> <template #default="scope"> - <el-button icon="ele-Edit" size="small" text type="primary" @click="openOperateDialog(scope.row)"> </el-button> - <el-button - icon="ele-Delete" - size="small" - text - type="danger" - - > - - </el-button> + <div class="space-x-2.5"> + <el-tooltip effect="dark" content="SQL缂栬緫" placement="top"> + <i class="ywifont ywicon-sql !text-[14px] text-blue-400 cursor-pointer" @click="editSqlClick(scope.row)"></i> + </el-tooltip> + <el-tooltip effect="dark" content="缂栬緫" placement="top"> + <i class="ywifont ywicon-bianji !text-[14px] text-blue-400 cursor-pointer" @click="openOperateDialog(scope.row)"></i> + </el-tooltip> + <el-tooltip effect="dark" content="鍒犻櫎" placement="top"> + <i class="ywifont ywicon-shanchu !text-[17px] text-red-400 cursor-pointer" @click="openOperateDialog(scope.row)"></i> + </el-tooltip> + </div> </template> </el-table-column> </el-table> @@ -64,13 +71,8 @@ filterable style="width: 100%" v-model="dialogFormValue.ParentID" - :props="{ - id: 'ID', - label: 'Name', - children: 'Children', - }" :data="tableTreeData" - node-key="ID" + node-key="id" :clearable="true" :accordion="true" :expandNode="false" @@ -81,7 +83,7 @@ <el-form-item label="undefined" prop="ParentID"> <el-input v-model="dialogFormValue.ParentID"></el-input> </el-form-item> - <el-form-item label="鍚嶇О" prop="Name"> + <el-form-item label="鏍囬" prop="Name"> <el-input v-model="dialogFormValue.Name"></el-input> </el-form-item> <el-form-item label="缂栫爜" prop="Code"> @@ -107,10 +109,11 @@ // import { useTableSort } from '/@/hooks/useTableSort'; // import { useValidateUniqueness } from '/@/hooks/useValidateUniqueness'; import { deepClone } from '/@/utils/other'; -import { deleteCurrentRow } from '/@/utils/util'; +import { supervisorPublishedMap } from './types'; import * as supervisorAdminApi from '/@/api/supervisorAdmin'; import { convertListToTree, tableCellCenterExceptColumn } from '/@/utils/util'; +import { gotoRoute } from '/@/utils/route'; const tableTreeData = computed(() => convertListToTree(tableData.value)); //#region ====================== 琛ㄦ牸鏁版嵁锛宼able init ====================== @@ -122,7 +125,12 @@ const res = await supervisorAdminApi.getSupervisorList().finally(() => { tableLoading.value = false; }); - tableData.value = res.values||[]; + tableData.value = (res.values || []).map((item) => { + item.create_time = item.create_time.slice(0, 10); + item.update_time = item.create_time.slice(0, 10); + + return item; + }); }; //#endregion @@ -131,11 +139,9 @@ const queryParams = ref({ title: '', }); -const { resetQuery, handleQueryTable, displayTableData } = useQueryTable(tableData, queryParams, ()=>{ +const { resetQuery, handleQueryTable, displayTableData } = useQueryTable(tableData, queryParams, () => { displayTableData.value = tableData.value; }); - - //#endregion @@ -151,11 +157,9 @@ const dialogIsShow = ref(false); const dialogFormRef = ref<FormInstance>(null); - - const dialogFormRules = ref<FormRules>({ ParentID: [{ required: true, message: '璇烽�夋嫨undefined', trigger: 'change' }], - Name: [{ required: true, message: '璇疯緭鍏ュ悕绉�', trigger: 'blur' }], + Name: [{ required: true, message: '璇疯緭鍏ユ爣棰�', trigger: 'blur' }], }); const openOperateDialog = (row?) => { if (row) { @@ -229,6 +233,15 @@ treeTableExpandKeys.value.splice(idx, 1); } }; //#endregion + + +//#region ====================== sql ====================== + const editSqlClick = () => { + gotoRoute({ + name:'SqlAmisEdit' + }) + }; +//#endregion onMounted(() => { getTableData(); }); diff --git a/src/views/project/yw/lowCode/sqlAmis/types.ts b/src/views/project/yw/lowCode/sqlAmis/types.ts new file mode 100644 index 0000000..55e4af5 --- /dev/null +++ b/src/views/project/yw/lowCode/sqlAmis/types.ts @@ -0,0 +1,9 @@ +export const enum SupervisorPublished { + Y = 'Y', + N='N' +} + +export const supervisorPublishedMap = { + [SupervisorPublished.Y]:'宸插彂甯�', + [SupervisorPublished.N]:'鏈彂甯�' +} \ No newline at end of file diff --git a/src/views/project/yw/testData.json b/src/views/project/yw/testData.json deleted file mode 100644 index e007f2e..0000000 --- a/src/views/project/yw/testData.json +++ /dev/null @@ -1,194 +0,0 @@ -{ - "id": "u:7d4e7d100425", - "body": [ - { - "id": "u:3e0a8e524d99", - "body": [ - { - "id": "u:5919b609704e", - "tpl": "aaaaaa-${data}", - "type": "tpl", - "inline": true, - "wrapperComponent": "" - } - ], - "size": "none", - "type": "container", - "style": { - "inset": "auto", - "display": "flex", - "flexWrap": "nowrap", - "position": "relative", - "alignItems": "flex-start", - "flexDirection": "column" - }, - "wrapperBody": false, - "isFixedWidth": false, - "isFixedHeight": false - }, - { - "id": "u:08a4093f293a", - "api": { - "url": "/chat/chat_async_query?rec_id=query_detail&history_id=7f47898b6b724807acebb1b9ab679627", - "method": "get", - "adaptor": "", - "messages": {}, - "requestAdaptor": "" - }, - "mode": "table2", - "type": "crud2", - "dsType": "api", - "columns": [ - { - "id": "u:eb57b889aedf", - "name": "warn_type", - "type": "tpl", - "title": "璀﹀憡绫诲瀷" - }, - { - "id": "u:cf0ff1dc91a1", - "name": "warn_title", - "type": "tpl", - "title": "璀﹀憡鍐呭" - }, - { - "id": "u:18f8ba839a8e", - "name": "warn_time", - "type": "date", - "title": "璀﹀憡鏃堕棿" - } - ], - "loadType": "pagination", - "loadDataOnce": true, - "primaryField": "id", - "syncLocation": true, - "editorSetting": { - "mock": { - "enable": true, - "maxDisplayRows": 5 - } - }, - "footerToolbar": [ - { - "id": "u:a9e46ad78f75", - "type": "flex", - "items": [ - { - "id": "u:49ada3312cd1", - "body": [], - "type": "container", - "align": "left", - "style": { - "flex": "1 1 auto", - "display": "flex", - "flexGrow": 1, - "flexWrap": "nowrap", - "position": "static", - "flexBasis": "auto", - "alignItems": "stretch", - "flexDirection": "row", - "justifyContent": "flex-start" - }, - "wrapperBody": false - }, - { - "id": "u:a24e53913518", - "body": [ - { - "id": "u:33382e12a22c", - "type": "pagination", - "align": "right", - "layout": ["total", "perPage", "pager"], - "perPage": 10, - - "behavior": "Pagination", - "perPageAvailable": [10, 20, 50, 100] - } - ], - "type": "container", - "align": "right", - "style": { - "flex": "1 1 auto", - "display": "flex", - "flexGrow": 1, - "flexWrap": "nowrap", - "position": "static", - "flexBasis": "auto", - "alignItems": "stretch", - "flexDirection": "row", - "justifyContent": "flex-end" - }, - "wrapperBody": false - } - ], - "style": { - "position": "static" - }, - "justify": "flex-start", - "direction": "row", - "alignItems": "stretch" - } - ], - "headerToolbar": [ - { - "id": "u:8d85e56d6cba", - "type": "flex", - "items": [ - { - "id": "u:cfa5198c01d0", - "body": [], - "type": "container", - "align": "left", - "style": { - "flex": "1 1 auto", - "display": "flex", - "flexGrow": 1, - "flexWrap": "nowrap", - "position": "static", - "alignItems": "stretch", - "flexDirection": "row", - "justifyContent": "flex-start" - }, - "behavior": ["Insert", "BulkEdit", "BulkDelete"], - "wrapperBody": false, - "isFixedHeight": false - }, - { - "id": "u:8240ece98ea3", - "body": [], - "type": "container", - "align": "right", - "style": { - "flex": "1 1 auto", - "display": "flex", - "flexGrow": 1, - "flexWrap": "nowrap", - "position": "static", - "flexBasis": "auto", - "alignItems": "stretch", - "flexDirection": "row", - "justifyContent": "flex-end" - }, - "behavior": ["FuzzyQuery"], - "wrapperBody": false - } - ], - "style": { - "position": "static" - }, - "justify": "flex-start", - "direction": "row", - "alignItems": "stretch" - } - ] - } - ], - "type": "page", - "aside": [], - "regions": ["body"], - "showHeader": true, - "pullRefresh": { - "disabled": true - }, - "asideResizor": false -} diff --git a/vite.config.ts b/vite.config.ts index e793547..b355b5a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -35,7 +35,7 @@ host: '0.0.0.0', port: env.VITE_PORT as unknown as number, open: JSON.parse(env.VITE_OPEN), - hmr: false, + hmr: true, proxy: { '/gitee': { target: 'https://gitee.com', -- Gitblit v1.9.3