Selaa lähdekoodia

Merge branch 'master' of https://a.leanwo.com:3000/prodog-client-2023/client-base-v4

YangZhiJie 1 vuosi sitten
vanhempi
sitoutus
df5f806726

+ 1 - 0
src/window1/tabGridView/GridBody.vue

@@ -36,6 +36,7 @@
             />
           </a-space>
         </div>
+        </div>
       </a-space>
     </td>
   </tr>

+ 48 - 30
src/window1/tabGridView/NewTabButton.vue

@@ -10,8 +10,11 @@
         <BookTwoTone v-if="item.action === 'OPEN_CUSTOMER_WINDOW'" />
         <ContainerTwoTone v-if="item.action === 'OPEN_HTML_WINDOW'" />
         <FileTextTwoTone v-if="item.action === 'EXPORT'" />
+        <ReloadOutlined v-if="item.action === 'REFRESH'" />
         <BellTwoTone v-if="item.action === 'NOTICE'" />
-        <HddOutlined v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" />
+        <HddOutlined
+          v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
+        />
 
         <span v-if="item.action === 'CREATE'" @click="create">{{
           item.name
@@ -22,12 +25,13 @@
         <span v-else-if="item.action === 'EXPORT'" @click="exportConfirm">{{
           item.name
         }}</span>
-        <span
-          v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" 
-          @click="openRemotCompoentModule(item)"
-        >{{
+        <span v-else-if="item.action === 'REFRESH'" @click="refresh">{{
           item.name
         }}</span>
+        <span
+          v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
+          @click="openRemoteComponentModule(item)"
+        >{{ item.name }}</span>
         <span v-else>{{ item.name }}</span>
       </a-breadcrumb-item>
 
@@ -50,7 +54,10 @@
         <ContainerTwoTone v-if="item.action === 'OPEN_HTML_WINDOW'" />
         <FileTextTwoTone v-if="item.action === 'EXPORT'" />
         <BellTwoTone v-if="item.action === 'NOTICE'" />
-        <HddOutlined v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" />
+        <ReloadOutlined v-if="item.action === 'REFRESH'" />
+        <HddOutlined
+          v-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
+        />
         <span v-if="item.action === 'CREATE'" @click="create">{{
           item.name
         }}</span>
@@ -60,9 +67,13 @@
         <span v-else-if="item.action === 'EXPORT'" @click="exportConfirm">{{
           item.name
         }}</span>
-        <span v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'" @click="openRemotCompoentModule(item)">{{
+        <span v-else-if="item.action === 'REFRESH'" @click="refresh">{{
           item.name
         }}</span>
+        <span
+          v-else-if="item.action === 'OPEN_REMOTE_COMPONENT_MODULE_IN_MODAL'"
+          @click="openRemoteComponentModule(item)"
+        >{{ item.name }}</span>
         <span
           v-else-if="item.action === 'NOTICE'"
           @click="notificationModal = true"
@@ -91,14 +102,20 @@
     </template>
   </Modal>
 
-  
   <a-modal v-model:open="modal1Open">
     <component :is="modal1Component" v-model:open="modal1Open" />
   </a-modal>
 </template>
 
 <script setup>
-import { ref, defineProps, defineEmits, watch, getCurrentInstance, defineAsyncComponent } from 'vue';
+import {
+  ref,
+  defineProps,
+  defineEmits,
+  watch,
+  getCurrentInstance,
+  defineAsyncComponent,
+} from 'vue';
 import Common from '../../common/Common';
 import DownloadService from '../../resource/file/DownloadService.js';
 import NotificationPanel from '../../customer/NotificationPanel.vue';
@@ -119,6 +136,7 @@ import {
   FileTextTwoTone,
   ContainerTwoTone,
   ControlTwoTone,
+  ReloadOutlined,
 } from '@ant-design/icons-vue';
 const props = defineProps({
   window: {
@@ -167,7 +185,11 @@ const props = defineProps({
   },
 });
 
-const emit = defineEmits(['createRecordInWindowEdit', 'deleteRecords']);
+const emit = defineEmits([
+  'createRecordInWindowEdit',
+  'deleteRecords',
+  'refreshDatas',
+]);
 
 const tabButtons = ref([]);
 const leftTabButton = ref([]);
@@ -179,9 +201,6 @@ const modal1Open = ref(false);
 // 模态框的组件
 const modal1Component = ref(null);
 
-
-
-
 const { proxy } = getCurrentInstance(); //访问this
 // 新建数据
 const create = () => {
@@ -192,6 +211,11 @@ const deleteData = () => {
   emit('deleteRecords');
 };
 
+// 刷新
+const refresh = () => {
+  emit('refreshDatas', false);
+};
+
 /**
  * 导出确认
  */
@@ -412,10 +436,9 @@ const isEmpty = obj => {
   }
 };
 
-
 /**
  * 获取字符串的哈希值
- * @param input 
+ * @param input
  */
 const getHash = function (input) {
   let hash = 0;
@@ -424,22 +447,20 @@ const getHash = function (input) {
   }
   for (let i = 0; i < input.length; i++) {
     const char = input.charCodeAt(i);
-    hash = ((hash << 5) - hash) + char;
+    hash = (hash << 5) - hash + char;
     hash = hash & hash; // 确保返回值是一个32位有符号整数
   }
   return Math.abs(hash).toString();
 };
 
-
 /**
-     * 远程加载ES VUE组件模块,并在模态框中打开。
-     * @param jsUrl js路径
-     * @param cssUrl css路径
-     */
-const openRemotCompoentModule = async function(tabButton){
-
+ * 远程加载ES VUE组件模块,并在模态框中打开。
+ * @param jsUrl js路径
+ * @param cssUrl css路径
+ */
+const openRemoteComponentModule = async function (tabButton) {
   let jsUrl = tabButton.remoteComponentModuleJsUrl;
-  
+
   let cssUrl = tabButton.remoteComponentModuleCssUrl;
 
   // 显示模态框
@@ -447,7 +468,7 @@ const openRemotCompoentModule = async function(tabButton){
   //let jsUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.js';
   //let cssUrl = './static/client-eam-module-v3/dist/AssetCheckCreate.css';
 
-  if(cssUrl != null && cssUrl.length > 0){
+  if (cssUrl != null && cssUrl.length > 0) {
     let cssUrlHash = getHash(cssUrl);
     CssUtil.dynamicLoadCss(cssUrl, cssUrlHash);
   }
@@ -455,9 +476,9 @@ const openRemotCompoentModule = async function(tabButton){
   // const testAsyncRemoteComponent  = await import(/* webpackIgnore: true */ jsUrl);
 
   // console.log(testAsyncRemoteComponent);
-  if(jsUrl != null && jsUrl.length > 0){
+  if (jsUrl != null && jsUrl.length > 0) {
     const testAsyncRemoteComponent = defineAsyncComponent({
-    // 加载函数
+      // 加载函数
       loader: () => {
         return import(/* webpackIgnore: true */ jsUrl);
       },
@@ -475,10 +496,7 @@ const openRemotCompoentModule = async function(tabButton){
     modal1Component.value = testAsyncRemoteComponent;
     modal1Open.value = true;
   }
-  
 };
-
-
 </script>
 
 <style scoped>

+ 6 - 42
src/window1/tabGridView/TabGridEdit.vue

@@ -30,15 +30,13 @@
           />
         </div>
       </div>
-
-      
-
       <div class="grid-item-row2">
         <NewTabButton
           :window="window" :now-tab="nowTab" :simple-filter-params="searchText"
           :complex-filter-params="complexFilterParams" :uuid="uuid" :show-tab-dto="tab" :model-datas="modelDatas"
           :view-type="'Grid'" :curd-window-function-access="curdWindowFunctionAccess"
           @create-record-in-window-edit="createRecordInWindowEdit" @delete-records="deleteRecords"
+          @refresh-datas="refreshDatas"
         />
       </div>
 
@@ -1167,6 +1165,11 @@ export default {
       _self.queryGridData(true);
     },
 
+    // 刷新数据
+    refreshDatas: function (flag) {
+      this.queryGridData(flag);
+    },
+
     // 删除选择的数据
     deleteRecords: function (isAlert) {
       var _self = this;
@@ -1862,45 +1865,6 @@ export default {
   cursor: none;
 }
 
-.modal_title {
-  background: #267fcf;
-  height: 32px;
-  line-height: 32px;
-  color: #fff;
-  /* padding: 0 80px 0 40px; */
-  border: 0;
-  padding-left: 8px;
-}
-
-.modal_footer {
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-  text-align: unset;
-}
-
-:deep(.zc .ant-modal-content) {
-  padding: 0 0 8px 0;
-}
-
-:deep( :where(.css-dev-only-do-not-override-16pw25h).ant-modal .ant-modal-close) {
-  top: 6px;
-  color: #fff;
-}
-
-:deep(.zc .ant-modal-header) {
-  margin-bottom: 0px;
-}
-
-:deep(.ant-modal-footer) {
-  padding-right: 8px;
-  padding-left: 8px;
-}
-
-:deep(.ant-breadcrumb-link > .btn-group) {
-  margin-top: -2px;
-}
-
 :deep(.ant-pagination-options-quick-jumper) {
   margin-right: -18px !important;
 }