Browse Source

4.0.60 升级antd版本

liuyanpeng 2 years ago
parent
commit
92284a1477

+ 6 - 3
package.json

@@ -1,7 +1,7 @@
 {
   "name": "client-base-v4",
   "description": "Leanwo Prodog Client",
-  "version": "4.0.59",
+  "version": "4.0.60",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",
@@ -14,11 +14,11 @@
     "dist"
   ],
   "peerDependencies": {
-    "ant-design-vue": "^3.2.15",
+    "ant-design-vue": "^4.2.1",
     "click-outside-vue3": "^4.0.1",
     "dayjs": "^1.11.6",
     "dingtalk-jsapi": "^2.10.3",
-    "pc-component-v3": "1.0.82",
+    "pc-component-v3": "1.0.83",
     "uuid": "^8.3.2",
     "v-tooltip": "^4.0.0-beta.17",
     "vue-request": "^1.2.4",
@@ -60,5 +60,8 @@
   "repository": {
     "type": "http",
     "url": "https://a.leanwo.com:3000/prodog-client-2023/client-base-v4.git"
+  },
+  "dependencies": {
+    "ant-design-vue": "^4.2.1"
   }
 }

+ 2 - 2
src/client/OrganizationEditPanel.vue

@@ -58,7 +58,7 @@
   </a-table>
 
   <a-drawer
-    v-model:visible="editVisible"
+    v-model:open="editVisible"
     :title="drawerTitle"
     :width="500"
     placement="right"
@@ -131,7 +131,7 @@
     </template>
   </a-drawer>
   <a-drawer
-    v-model:visible="isEditClient"
+    v-model:open="isEditClient"
     title="编辑公司"
     :width="500"
     placement="right"

+ 1 - 1
src/client/top-nav-client-select.vue

@@ -27,7 +27,7 @@
       </ul>
     </li>
   </ul>
-  <a-modal v-model:visible="visible" title="新用户未设置所属部门或岗位">
+  <a-modal v-model:open="visible" title="新用户未设置所属部门或岗位">
     <p>
       尊敬的用户,
     </p>

+ 38 - 38
src/common/CommonTable.vue

@@ -1,42 +1,42 @@
 <template>
   <div class="tablePaganations">
-    <a-config-provider :locale="locale">
-      <a-table
-        id="commonTable"
-        class="ant-table-striped"
-        bordered
-        size="small"
-        height="1000px"
-        :loading="isLoading"
-        :data-source="dataSource"
-        :columns="columns"
-        :row-key="(record) => record.id"
-        :scroll="{ y: yScroll }"
-        :pagination="havePage ? pagination : false"
-        :row-class-name="
-          (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
-        "
-        :row-selection="
-          isSelect
-            ? {
-              selectedRowKeys: state.selectedRowKeys,
-              onSelect: selectEvent,
-              onSelectAll: selectAllEvent,
-            }
-            : null
-        "
-        @change="tableChange"
-        @resize-column="handleResizeColumn"
+    <!-- <a-config-provider :locale="locale"> -->
+    <a-table
+      id="commonTable"
+      class="ant-table-striped"
+      bordered
+      size="small"
+      height="1000px"
+      :loading="isLoading"
+      :data-source="dataSource"
+      :columns="columns"
+      :row-key="(record) => record.id"
+      :scroll="{ y: yScroll }"
+      :pagination="havePage ? pagination : false"
+      :row-class-name="
+        (_record, index) => (index % 2 === 1 ? 'table-striped' : null)
+      "
+      :row-selection="
+        isSelect
+          ? {
+            selectedRowKeys: state.selectedRowKeys,
+            onSelect: selectEvent,
+            onSelectAll: selectAllEvent,
+          }
+          : null
+      "
+      @change="tableChange"
+      @resize-column="handleResizeColumn"
+    >
+      <template
+        v-for="(item, index) in renderArr"
+        #[item]="scope"
+        :key="index"
       >
-        <template
-          v-for="(item, index) in renderArr"
-          #[item]="scope"
-          :key="index"
-        >
-          <slot :name="item" :scope="scope" v-bind="scope || {}" />
-        </template>
-      </a-table>
-    </a-config-provider>
+        <slot :name="item" :scope="scope" v-bind="scope || {}" />
+      </template>
+    </a-table>
+    <!-- </a-config-provider> -->
   </div>
 </template>
   
@@ -52,8 +52,8 @@ import {
   onMounted,
 } from 'vue';
 import { getTableScroll } from '../common/tableScroll.js';
-import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
-const locale = ref(zhCN);
+// import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
+// const locale = ref(zhCN);
 
 const props = defineProps({
   // 表格数据

+ 2 - 2
src/main.js

@@ -7,7 +7,7 @@ import { createApp, defineAsyncComponent } from 'vue';
 
 
 import Antd from 'ant-design-vue';
-import 'ant-design-vue/dist/antd.css';
+// import 'ant-design-vue/dist/antd.css';
 
 import './assets/common.css';
 import './assets/common1.css';
@@ -132,7 +132,7 @@ router.beforeEach((to, from, next) => {
       }
       if (funtionAccessDtos != null) {
         funtionAccessDtos.forEach(funtionAccessDto => {
-          if(typeof (funtionAccessDto.itemNo) === 'string'){
+          if (typeof (funtionAccessDto.itemNo) === 'string') {
             funtionAccessDto.itemNo = [funtionAccessDto.itemNo];
           }
         });

+ 0 - 4
src/print/CommonTable.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="tablePaganations">
-    <a-config-provider :locale="locale">
       <a-table
         class="ant-table-striped"
         bordered
@@ -34,7 +33,6 @@
           <slot :name="item" :scope="scope" v-bind="scope || {}" />
         </template>
       </a-table>
-    </a-config-provider>
   </div>
 </template>
   
@@ -49,8 +47,6 @@ import {
   onMounted,
   defineExpose,
 } from 'vue';
-import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
-const locale = ref(zhCN);
 const props = defineProps({
   dataSource: {
     type: Object,

+ 1 - 1
src/printer/PrinterConfiguration.vue

@@ -19,7 +19,7 @@
     </CommonTable>
 
     <a-modal
-      v-model:visible="editVisible"
+      v-model:open="editVisible"
       :title="editTitle"
       width="800px"
       ok-text="保存配置"

+ 1 - 1
src/window/attachment/AttachmentPanel.vue

@@ -68,7 +68,7 @@
         </div>
         <div class="clearfix" />
         <a-modal
-          v-model:visible="visible"
+          v-model:open="visible"
           style="text-align:center"
           title="预览"
           ok-text="确认"

+ 1 - 1
src/window/tabGridView/SubTabGridEdit.vue

@@ -177,7 +177,7 @@
         </div>
 
         <a-drawer
-          v-model:visible="showComplexFilterPanel"
+          v-model:open="showComplexFilterPanel"
           :title="$t('lang.subTabGridEdit.advancedSearch')"
           :width="400"
           :footer-style="{ textAlign: 'right' }"

+ 1 - 1
src/window/tabGridView/TabGridEdit.vue

@@ -181,7 +181,7 @@
       </div>
 
       <a-drawer
-        v-model:visible="showComplexFilterPanel"
+        v-model:open="showComplexFilterPanel"
         :title="$t('lang.tabGridEdit.advancedSearch')"
         :width="400"
         :footer-style="{ textAlign: 'right' }"

+ 2 - 2
src/workflow/ActivitiAdmin.vue

@@ -10,7 +10,7 @@
       {{ $t("lang.ActivitiAdmin.download") }}{{ `(${selectedRowKeys.length})` }}
     </a-button>
 
-    <a-button type="danger" :disabled="!hasSelected" :loading="loading" @click="deleteBpmnModalVisible = true">
+    <a-button type="primary" danger :disabled="!hasSelected" :loading="loading" @click="deleteBpmnModalVisible = true">
       {{ $t("lang.ActivitiAdmin.delete") }}{{ `(${selectedRowKeys.length})` }}
     </a-button>
 
@@ -74,7 +74,7 @@
     </template>
   </a-table>
 
-  <a-modal v-model:visible="deleteBpmnModalVisible" title="请确认删除工作流" @ok="deleteBpmns">
+  <a-modal v-model:open="deleteBpmnModalVisible" title="请确认删除工作流" @ok="deleteBpmns">
     您确定要删除选中的{{ `  ${selectedRowKeys.length}  ` }}个流程定义吗?
   </a-modal>
 </template>

+ 1 - 4
src/workflow/CommonTable.vue

@@ -1,7 +1,6 @@
 <template>
   <!-- 表格 + 分页 -->
   <div class="tablePaganations">
-    <a-config-provider :locale="locale">
       <a-table
         class="ant-table-striped"
         bordered
@@ -18,14 +17,12 @@
           <slot :name="item" :scope="scope" v-bind="scope || {}" />
         </template>
       </a-table>
-    </a-config-provider>
   </div>
 </template>
   
 <script setup>
 import { useSlots, ref, reactive, defineProps, defineEmits, defineExpose, watch } from 'vue';
-import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
-const locale = ref(zhCN);
+
 const props = defineProps({
   dataSource: {
     type: Object,

+ 1 - 1
src/workflow/EditTableCell.vue

@@ -31,7 +31,7 @@
     </a-button>
 
     <a-modal
-      v-model:visible="modalVisible"
+      v-model:open="modalVisible"
       title="填写默认值"
       ok-text="确认"
       cancel-text="取消"

+ 3 - 3
src/workflow/TaskProcessManagement.vue

@@ -6,7 +6,7 @@
       加载任务模板
     </a-button>
     <a-drawer
-      v-model:visible="visible"
+      v-model:open="visible"
       class="custom-class"
       :title="taskDefineDto.id == null ? '创建任务' : '编辑任务'"
       placement="right"
@@ -528,7 +528,7 @@
             编辑
           </a-button>
           <a-button
-            type="danger"
+            danger
             :size="size"
             @click="deleteTaskBefore(record)"
           >
@@ -555,7 +555,7 @@
   </div>
 
   <a-drawer
-    v-model:visible="isShowCorn"
+    v-model:open="isShowCorn"
     title="常用corn表达式"
     width="460px"
     placement="right"

+ 2 - 2
src/workflow/WorkflowEdit.vue

@@ -99,7 +99,7 @@
     </div>
     <Loading v-if="loading" />
     <a-drawer
-      v-model:visible="modal"
+      v-model:open="modal"
       :width="640"
       class="custom-class"
       title="工作流定义"
@@ -255,7 +255,7 @@
       </template>
     </Modal>
     <a-modal
-      v-model:visible="archiveVisible"
+      v-model:open="archiveVisible"
       title="请按照如下步骤进行历史数据归档"
       width="600px"
       :mask-closable="false"