2 Commits d6eb868ea1 ... 8c06e99780

Author SHA1 Message Date
  psj0001 8c06e99780 1.空间服务分配 1 month ago
  zhiyuan-007 742a1ca493 海绵城市-规划计划修改 1 month ago

+ 12 - 0
src/api/tags/tags/index.ts

@@ -61,3 +61,15 @@ export const delTags = (id: string | number | Array<string | number>) => {
     method: 'delete'
   });
 };
+
+/**
+ * 修改服务名称
+ * @param data
+ */
+export const updateMlDirectoryNewName = (data: TagsForm) => {
+  return request({
+    url: '/tags/tags/updateMlDirectoryNewName',
+    method: 'post',
+    data: data
+  });
+};

+ 18 - 15
src/assets/json/waterAccumulationPoint.json

@@ -98,38 +98,41 @@
   ],
 
   "planLayer": [
-    {
-      "labelId": "D9999990120241107",
-      "label": "规划区",
-      "ADDRESS": "https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D9999990120241107",
-      "TYPE": "tile",
-      "COORDINATE_SYSTEM": "1",
-      "STATE": "2",
-      "SERVICE_TYPE": "1",
-      "visible": true,
-      "color": "#4CE600"
-    },
     {
       "labelId": "D999999012024120401",
       "label": "城市开发边界",
       "ADDRESS": "https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D0103010720241201",
-      "TYPE": "tile",
+      "TYPE": "feature",
       "COORDINATE_SYSTEM": "1",
       "STATE": "2",
       "SERVICE_TYPE": "1",
       "visible": true,
-      "color": "#F1C7FC"
+      "color": "rgba(128,0,128,0.7)",
+      "borderColor": "rgba(128,0,128, 1)"
     },
     {
       "labelId": "D999999012024120402",
       "label": "建成区范围",
       "ADDRESS": "https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D0103010820241201",
-      "TYPE": "tile",
+      "TYPE": "feature",
+      "COORDINATE_SYSTEM": "1",
+      "STATE": "2",
+      "SERVICE_TYPE": "1",
+      "visible": true,
+      "color": "rgba(255,170,0,0.7)",
+      "borderColor": "rgba(255,170,0,1)"
+    },
+    {
+      "labelId": "D9999990120241107",
+      "label": "规划区",
+      "ADDRESS": "https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D9999990120241107",
+      "TYPE": "feature",
       "COORDINATE_SYSTEM": "1",
       "STATE": "2",
       "SERVICE_TYPE": "1",
       "visible": true,
-      "color": "#FFAA00"
+      "color": "rgba(76,230,0, 0.7)",
+      "borderColor": "rgba(76,230,0,1)"
     }
   ]
 }

+ 42 - 41
src/utils/map/AddLayer.js

@@ -70,33 +70,58 @@ export function SetAreaLocation(params){
 }
 
 
-export function AddSingleLayer_Common(params) {
-  if(params.token){
+export async function AddSingleLayer_Common(params) {
+  if (params.token) {
     params.url = "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/" + params.token;
   }
   let wkid = "0"  // 0 代表上海城建 1:代表3857
-  if(params.wkid){
-    if(params.type == "动态地图" && params.wkid =="1"){
+  if (params.wkid) {
+    if (params.type == "动态地图" && params.wkid == "1") {
       params.type = "dynamic"
     }
-    if(params.type == "切片地图" && params.wkid =="1"){
+    if (params.type == "切片地图" && params.wkid == "1") {
       params.type = "tile"
     }
   }
-  invokeParams('AddSingleLayer', {
-    "id": params.id,
-    "title": params.title,
-    "visible": params.visible,
-    "opacity": params.opacity === undefined?1:params.opacity,
-    "url": params.url,
-    "type":  params.type,
-    "mapID": params.mapID
-  })
+  if (params.type !== "feature") {
+    invokeParams('AddSingleLayer', {
+      "id": params.id,
+      "title": params.title,
+      "visible": params.visible,
+      "opacity": params.opacity === undefined ? 1 : params.opacity,
+      "url": params.url,
+      "type": params.type,
+      "mapID": params.mapID
+    })
+  } else {
+    debugger
+    let url = await returnProxyUrl(params.url) + "/0";
+    invokeParams('AddSingleLayer', {
+      "id": params.id,
+      "title": params.title,
+      "visible": params.visible,
+      "opacity": params.opacity === undefined ? 1 : params.opacity,
+      "url": url,
+      "type": params.type,
+      "where": params.where,
+      "outFields": ["*"],
+      "renderer": {
+        "type": "simple",
+        "symbol": {
+          "type": "simple-fill",
+          "color": params.color,
+          "outline": {
+            "color": params.borderColor,
+            "width": 1.5
+          }
+        }
+      }
+    })
+  }
 }
 
-
-export async function AddSingleLayer_Plan(params) {
-  let url = await returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D9999990520240701") + "/1";
+export async function AddSingleLayer_GHQ(params) {
+  let url = await returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D9999990120241107") + "/1";
   invokeParams('AddSingleLayer', {
     "id": "area_plan",
     "title": "规划区",
@@ -121,30 +146,6 @@ export async function AddSingleLayer_Plan(params) {
 }
 
 
-export async function AddSingleLayer_Achieve(params) {
-  let url = await returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D9999990620240701") + "/0";
-  invokeParams('AddSingleLayer', {
-    "id": "area_achieve",
-    "title": "达标区",
-    "visible": params.visible,
-    "opacity": 1,
-    "url": url,
-    "type": "feature",
-    "where": params.where,
-    "outFields": ["*"],
-    "renderer": {
-      "type": "simple",
-      "symbol": {
-        "type": "simple-fill",
-        "color": "rgba(84, 147, 191,0.5)",
-        "outline": {
-          "color": "rgba(84, 147, 191,1)",
-          "width": 2
-        }
-      }
-    }
-  })
-}
 
 export async function AddSingleLayer_ProjectInfo(params) {
   let url = await returnProxyUrl("https://cimweb.zjw.sh.cegn.cn:2008/MapProxyApi/getSceneServer/gxjh_fwjk/D9999990320240701") + "/0";

+ 171 - 11
src/views/system/planingProgram/planingProgram/index.vue

@@ -76,6 +76,17 @@
       </div>
       <div class="box-close"></div>
     </div>
+    <el-dialog v-model="detailDialogVisible" title="项目列表" width="60%" @close="handleDialogClose" align-center draggable overflow>
+      <common-table size="large" :tableData="tableData" :columns="columns" :stripe="true" :border="true" height="400">
+        <template #projectstatus="{ row }">
+          <span>{{ returnProgressLabel(row.projectstatus) }}</span>
+        </template>
+        <template #actions="{ row }">
+          <span style="color: #427fb3" @click="imgPreview(row)">查看图片</span>
+        </template>
+      </common-table>
+      <pagination v-show="total > 0" v-model:page="pageNum" v-model:limit="pageSize" :total="total" @pagination="showDetail" />
+    </el-dialog>
   </div>
 </template>
 
@@ -84,12 +95,16 @@ import Map from '@/views/map/Map.vue';
 import { ref } from 'vue';
 import {
   AddSingleLayer_Achieve,
-  AddSingleLayer_Common,
+  AddSingleLayer_Common, AddSingleLayer_GHQ,
   AddSingleLayer_Plan,
   SetAreaLocation
 } from '@/utils/map/AddLayer';
 import WaterAccumulationPointJson from '@/assets/json/waterAccumulationPoint.json';
+import { buildingQuery } from '@/api/system/cityStatistics/regionalAreaDistribution/types';
+import { projectMenuShowInfo, projectSortList } from '@/api/system/cityStatistics/regionalAreaDistribution';
+import { homePieOption, xmlxOption } from '@/utils/echart/echartOption';
 import { findOrgList } from '@/api/common';
+import Pagination from '@/components/Pagination/index.vue';
 import { regionalAssessmentList, selectProjectAreaSummary } from '@/api/system/cityStatistics/cityStatistics';
 import { cityStatisticsQuery } from '@/api/system/cityStatistics/cityStatistics/types';
 let allTypeVisible = ref(true);
@@ -117,6 +132,147 @@ const queryParams = ref<cityStatisticsQuery>({
 
 let planState = ref(true);
 let qualifyState = ref(true);
+let planGeometry = []; //规划区
+let achieveGeometry = []; //达成区
+
+let detailDialogVisible = ref(false);
+const progressList = ref([
+  {
+    value: 0,
+    color: '#B50D0E',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #B50D0E',
+    name: '新增'
+  },
+  {
+    value: 1,
+    color: '#ff6600',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #ff6600',
+    name: '立项'
+  },
+  {
+    value: 2,
+    color: '#ffea00',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #ffea00',
+    name: '选项'
+  },
+  {
+    value: 3,
+    color: '#c6ff00',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #c6ff00',
+    name: '用地'
+  },
+  {
+    value: 4,
+    color: '#00ff48',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #00ff48',
+    name: '工程'
+  },
+  {
+    value: 5,
+    color: '#00c0ff',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #00c0ff',
+    name: '施工'
+  },
+  {
+    value: 6,
+    color: '#2244a0',
+    bgShadow: '0 0 0 2px #fff, 0 0 0 3px #2244a0',
+    name: '验收'
+  }
+]);
+let xgList = ref([]);
+let id = null; //区县编码
+let projectSort = null; //新建-规划编码
+const gzzbRef = ref(null);
+const xmlxRef = ref(null);
+let xjPercent = ref(null);
+let gzPercent = ref(null);
+let tableData = ref([]);
+let total = ref(0);
+let pageNum = ref(1);
+let pageSize = ref(10);
+let columns = ref([
+  { prop: 'rowNum', label: '序号', width: '80' },
+  { prop: 'projectname', label: '项目名称', width: '350' },
+  { prop: 'projectTypeName', label: '项目类型', width: '150' },
+  { prop: 'subregionName', label: '行政区', width: '120' },
+  { prop: 'araeName', label: '所属区域', width: '250' },
+  { label: '项目进度', slot: 'projectstatus', width: '100' },
+  { label: '操作', slot: 'actions' }
+]);
+
+function imgPreview(row) {}
+
+function handleDialogClose() {
+  detailDialogVisible.value = false;
+  pageNum.value = 1;
+  pageSize.value = 10;
+  total.value = 0;
+  tableData.value = [];
+}
+
+function returnProgressLabel(value) {
+  return progressList.value.find((item) => item.value == value).name;
+}
+
+function changeProjectSort(key) {
+  projectSort = key;
+  detailDialogVisible.value = true;
+  showDetail();
+}
+
+function showDetail() {
+  queryParams.value.subregion = id;
+  queryParams.value.projectSort = projectSort;
+  queryParams.value.pageNum = pageNum.value;
+  queryParams.value.pageSize = pageSize.value;
+
+  projectSortList(queryParams.value).then((res) => {
+    if (res.code == 200) {
+      tableData.value = res.data.rows;
+      total.value = res.data.total;
+    }
+  });
+}
+
+function ProjectMenuShowInfo(id) {
+  queryParams.value.subregion = id;
+  projectMenuShowInfo(queryParams.value).then((res) => {
+    if (res.code == 200) {
+      let data = res.data;
+      xgList.value = data.projectSortList;
+      let totalDataCount = data.projectSortList[0].count * 1 + data.projectSortList[1].count * 1;
+      data.projectSortList.forEach((item) => {
+        if (item.dataValue == '新建') {
+          xjPercent.value = ((item.count * 100) / totalDataCount).toFixed(2);
+        } else {
+          gzPercent.value = ((item.count * 100) / totalDataCount).toFixed(2);
+        }
+      });
+      nextTick(() => {
+        let totalData = 0;
+        let useData = [
+          { value: 0, name: '新建', itemStyle: { color: '#4a90cd' } },
+          { value: 0, name: '改造', itemStyle: { color: '#15ced5' } }
+        ];
+        data.projectSortList.forEach((item) => {
+          totalData += item.count * 1;
+          if (item.dataValue == '新建') {
+            useData[0].value = item.count * 1;
+          } else {
+            useData[1].value = item.count * 1;
+          }
+        });
+        homePieOption(gzzbRef.value, useData, totalData);
+
+        let xData = data.projectTypeList.map((item) => item.projectTypeName);
+        let yData = data.projectTypeList.map((item) => item.count);
+
+        xmlxOption(xmlxRef.value, xData, yData);
+      });
+    }
+  });
+}
 
 function FindOriginList() {
   findOrgList().then((res) => {
@@ -142,7 +298,9 @@ function showProjectInfo() {
       visible: item.visible,
       url: item.ADDRESS,
       title: item.label,
-      wkid: item.COORDINATE_SYSTEM
+      wkid: item.COORDINATE_SYSTEM,
+      color: item.color,
+      borderColor: item.borderColor
     });
   });
 }
@@ -173,22 +331,26 @@ function SelectProjectAreaSummary() {
       let data = res.data;
       footprintSum.value = data.footprintSum;
       footprintCount.value = data.dataList.length;
+
+
     }
   });
-
-  showArea();
+  //添加规划区筛选
+  //showPlan();
 
   queryParams.value.subregion = form.value.region;
   queryParams.value.dateArray = form.value.startYear + ',' + form.value.endYear;
   //获取图斑数据
   regionalAssessmentList(queryParams).then((res) => {
     if (res.code == 200) {
+      planGeometry = res.data.rows;
+      achieveGeometry = res.data.data.rows;
       console.log();
     }
   });
 }
 
-function showArea() {
+function showPlan() {
   let where = '1=1';
   if (form.value.startYear && form.value.endYear) {
     where += ' and 规划年限 in(';
@@ -206,22 +368,20 @@ function showArea() {
       where += " and 区管委会='" + currentArea.datavalue + "'";
     }
   }
-  AddSingleLayer_Plan({
+  AddSingleLayer_GHQ({
     where: where,
     visible: planState.value
   });
-  AddSingleLayer_Achieve({
-    where: where,
-    visible: qualifyState.value
-  });
 }
 
 onMounted(() => {
+  id = '';
   FindOriginList();
+  ProjectMenuShowInfo(id);
   nextTick(() => {
     layerList.value = WaterAccumulationPointJson.planLayer;
     SelectProjectAreaSummary();
-    showArea();
+    //showPlan();
     showAllType(true);
   });
 });

+ 8 - 4
src/views/tags/tags/index.vue

@@ -44,9 +44,10 @@
       <div class="tree-with-header">
         <div class="table-header">
           <div class="header-cell">名称</div>
-          <div class="header-cell">编</div>
+          <div class="header-cell">编</div>
           <div class="header-cell">全码</div>
           <div class="header-cell">等级</div>
+          <div class="header-cell">唯一编号</div>
           <div class="header-cell">操作</div>
         </div>
         <el-tree
@@ -82,6 +83,7 @@
               <div class="cell" @click="handleUpdate(data)">
                 <dict-tag :options="space_server_type" :value="data.level" />
               </div>
+              <div class="cell" @click="handleUpdate(data)">{{ data.id }}</div>
               <div class="cell">
                 <el-tooltip content="修改" placement="top">
                   <el-button v-hasPermi="['tags:tags:edit']" link type="primary" icon="Edit" @click="handleUpdate(data)" />
@@ -163,6 +165,7 @@ const draggable = ref(false);
 const queryFormRef = ref<ElFormInstance>();
 const tagsFormRef = ref<ElFormInstance>();
 const tagsTreeRef = ref<ElTreeInstance>();
+//默认展开内容
 const expandedKeysData = ref([]);
 
 const dialog = reactive<DialogOption>({ visible: false, title: '' });
@@ -202,7 +205,7 @@ const getList = async () => {
     deptOptions.value = res.data;
     const newIds = res.data.map((item) => item.id);
     // 合并两个数组并去重
-    expandedKeysData.value = [...new Set([...expandedKeysData.value, ...newIds])];
+    // expandedKeysData.value = [...new Set([...expandedKeysData.value, ...newIds])];
     loading.value = false;
   }
 };
@@ -363,6 +366,7 @@ const handleDrop = (draggingNode: Node, dropNode: Node, dropType: NodeDropType,
   form.value.id = draggingNode.data.id;
   form.value.parentId = dropNode.data.id;
   form.value.name = draggingNode.data.label;
+  form.value.code = draggingNode.data.code;
   editTags();
 };
 
@@ -429,7 +433,7 @@ onMounted(() => {
 
 .table-header {
   display: grid;
-  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; /* 增加一列 */
   background-color: #f5f7fa;
   padding: 10px;
   border-bottom: 1px solid #dcdfe6;
@@ -470,7 +474,7 @@ onMounted(() => {
 
 .tree-row {
   display: grid;
-  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
   /* padding: 10px; */
   border-bottom: 1px solid #dcdfe6;
   height: 40px;

+ 108 - 8
src/views/tags/tagsDirectory/index.vue

@@ -24,6 +24,9 @@
             @node-drag-over="handleDragOver"
             @node-drag-end="handleDragEnd"
             @node-drop="handleDrop"
+            :default-expanded-keys="expandedKeysData"
+            @node-expand="handleNodeExpand"
+            @node-collapse="handleNodeCollapse"
           >
             <template #default="{ node, data }">
               {{ node.label }}
@@ -69,10 +72,15 @@
               @right-check-change="handleRightCheckChange"
             >
               <template v-slot:left-footer>
-                <el-button class="transfer-footer" @click="previewMap('left')">服务预览</el-button>
+                <div class="transfer-footer-div">
+                  <el-button class="transfer-footer" @click="previewMap('left')">服务信息</el-button>
+                </div>
               </template>
               <template v-slot:right-footer>
-                <el-button class="transfer-footer" @click="previewMap('right')">服务预览</el-button>
+                <div class="transfer-footer-div">
+                  <el-button class="transfer-footer" @click="editServiceName()">编辑服务</el-button>
+                  <el-button class="transfer-footer" @click="previewMap('right')">服务信息</el-button>
+                </div>
               </template>
             </el-transfer>
           </el-row>
@@ -83,6 +91,23 @@
   <template v-if="isPreviewDialogIsShow">
     <preview-map-dialog :current-dialog="currentDialogObj" v-model:dialog-visible="isPreviewDialogIsShow" destroy-on-close="true" />
   </template>
+
+  <el-dialog v-model="dialog.visible" :title="dialog.title" width="500px" append-to-body>
+    <el-form ref="tagsFormRef" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="名称" prop="name">
+        <el-input v-model="form.name" placeholder="请输入名称" />
+      </el-form-item>
+      <el-form-item label="编号" prop="name">
+        <el-input v-model="form.code" disabled />
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </template>
+  </el-dialog>
 </template>
 
 <script setup name="TagsDirectory" lang="ts">
@@ -93,7 +118,7 @@ import { TagsVO, TagsQuery, TagsForm } from '@/api/tags/tags/types';
 import type Node from 'element-plus/es/components/tree/src/model/node';
 import type { DragEvents } from 'element-plus/es/components/tree/src/model/useDragNode';
 import type { AllowDropType, NodeDropType } from 'element-plus/es/components/tree/src/tree.type';
-import { updateTags } from '@/api/tags/tags';
+import { updateTags,updateMlDirectoryNewName } from '@/api/tags/tags';
 import { tabClassDirectoryList, addClassTagDire } from '@/api/tags/tagsDirectory/index';
 import PreviewMapDialog from '@/components/ServicePreview/index.vue';
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -108,6 +133,11 @@ const rightCheckedKeys = ref<number[]>([]);
 //地图预览
 const isPreviewDialogIsShow = ref(false);
 const currentDialogObj = ref(null);
+const expandedKeysData = ref([]);
+
+const dialog = reactive<DialogOption>({ visible: false, title: '' });
+const buttonLoading = ref(false);
+
 // 查询参数
 const queryTagsDirectory = ref<TagDirectoryQuery>({
   pageNum: 1,
@@ -123,6 +153,7 @@ const tagsDirectory = ref<ClassTagDireBo>({
 interface Option {
   id: number;
   name: string;
+  code: string;
 }
 
 const serviceData = ref<Option[]>([]);
@@ -139,7 +170,10 @@ const handleChange = (value, direction, movedKeys) => {
   tagsDirectory.value.directoryId = value;
   loading.value = true;
   try {
-    addClassTagDire(tagsDirectory.value).finally(() => proxy?.$modal.msgSuccess('操作成功'));
+    addClassTagDire(tagsDirectory.value).finally(() => {
+      proxy?.$modal.msgSuccess('操作成功');
+      getTreeSelect();
+    });
   } catch (error) {
     getList();
   } finally {
@@ -149,6 +183,7 @@ const handleChange = (value, direction, movedKeys) => {
 
 const deptTreeRef = ref<ElTreeInstance>();
 const queryFormRef = ref<ElFormInstance>();
+const tagsFormRef = ref<ElFormInstance>();
 
 const initFormData: TagsForm = {
   id: undefined,
@@ -165,8 +200,8 @@ const initData: PageData<TagsForm, TagsQuery> = {
     name: ''
   },
   rules: {
-    id: [{ required: true, message: '数据编号不能为空', trigger: 'blur' }],
-    parentId: [{ required: true, message: '父节点编号不能为空', trigger: 'blur' }]
+    code: [{ required: true, message: '服务编号不能为空', trigger: 'blur' }],
+    name: [{ required: true, message: '服务名称不能为空', trigger: 'blur' }]
   }
 };
 const data = reactive<PageData<TagsForm, TagsQuery>>(initData);
@@ -222,6 +257,7 @@ const getList = async () => {
     // 将获取到的服务列表数据赋值给 serviceData
     serviceData.value = res.data.list;
     value.value = res.data.selectList || [];
+    getTreeSelect();
   } catch (error) {
   } finally {
     loading.value = false;
@@ -353,6 +389,67 @@ const previewMap = async (type) => {
   }
 };
 
+/**
+ * 节点展开事件处理
+ * @param data 节点数据
+ * @param node 节点对象
+ */
+const handleNodeExpand = (data: TagsVO, node: Node) => {
+  expandedKeysData.value.push(data.id);
+  // 在这里可以添加你需要的逻辑,例如加载子节点数据等
+};
+
+/**
+ * 节点关闭事件处理
+ * @param data 节点数据
+ * @param node 节点对象
+ */
+const handleNodeCollapse = (data: TagsVO, node: Node) => {
+  expandedKeysData.value = expandedKeysData.value.filter((id) => id !== data.id);
+  // 在这里可以添加你需要的逻辑,例如加载子节点数据等
+};
+
+const editServiceName = () => {
+  //右侧 列表选中行
+  let data = rightCheckedKeys.value;
+  if (data.length != 1) {
+    proxy?.$modal.msgError('请选择一条已分配服务');
+    return;
+  }
+  let sData = serviceData.value.filter((item) => item.id == data[0]);
+  if (sData == null) {
+    proxy?.$modal.msgError('请选择一条已分配服务');
+    return;
+  }
+  form.value.code = sData[0].code;
+  form.value.name = sData[0].name;
+  dialog.visible = true;
+};
+/** 提交按钮 */
+const submitForm = () => {
+  tagsFormRef.value?.validate(async (valid: boolean) => {
+    if (valid) {
+      buttonLoading.value = true;
+      await updateMlDirectoryNewName(form.value).finally(() => (buttonLoading.value = false));
+      proxy?.$modal.msgSuccess('操作成功');
+      dialog.visible = false;
+      getList();
+    }
+  });
+};
+
+// 取消按钮
+const cancel = () => {
+  reset();
+  dialog.visible = false;
+};
+
+// 表单重置
+const reset = () => {
+  form.value = { ...initFormData };
+  tagsFormRef.value?.resetFields();
+};
+
 onMounted(() => {
   getTreeSelect(); // 初始化部门数据
   loading.value = false;
@@ -374,9 +471,12 @@ onMounted(() => {
     font-size: var(--el-font-size-base);
   }
 
+  .transfer-footer-div {
+    text-align: right;
+    padding: 3px 6px;
+  }
   .transfer-footer {
-    margin-left: 420px;
-    padding: 6px 5px;
+    //margin-left: 420px;
   }
 }
 </style>