Hua hace 1 mes
padre
commit
dcba19a10d

+ 1 - 0
package-lock.json

@@ -8,6 +8,7 @@
       "name": "scienceInformationOfficeUi",
       "version": "0.0.8",
       "dependencies": {
+        "@ant-design/icons-vue": "^7.0.1",
         "@element-plus/icons-vue": "^2.3.2",
         "@tinymce/tinymce-vue": "^6.3.0",
         "ant-design-vue": "^4.2.6",

+ 1 - 0
package.json

@@ -16,6 +16,7 @@
     "zip": "node script/zip.js"
   },
   "dependencies": {
+    "@ant-design/icons-vue": "^7.0.1",
     "@element-plus/icons-vue": "^2.3.2",
     "@tinymce/tinymce-vue": "^6.3.0",
     "ant-design-vue": "^4.2.6",

BIN
scienceInformationOfficeUi.zip


+ 1 - 1
src/views/duChaJiHua/addNewNyProCom.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     title="新增农饮工程"
-    :open.sync="addNyVisible"
+    :open="addNyVisible" @update:open="addNyVisible = $event"
     @ok="addNewNyPro"
     @cancel="cancelHandler"
     width="50%"

+ 1 - 1
src/views/duChaJiHua/dataApprove copy.vue

@@ -77,7 +77,7 @@
           </a-table>
           <a-pagination
             show-size-changer
-            :pageSize.sync="pageSize"
+            :pageSize="pageSize" @update:pageSize="pageSize = $event"
             :total="total"
             :page-size-options="['10', '20', '30', '40']"
             :show-total="total => `共${total}条`"

+ 1 - 1
src/views/duChaJiHua/dczcjh.vue

@@ -69,7 +69,7 @@
         </a-table>
         <a-pagination
           show-size-changer
-          :pageSize.sync="pageSize"
+          :pageSize="pageSize" @update:pageSize="pageSize = $event"
           :total="total"
           :page-size-options="['10', '20', '30', '40']"
           :show-total="total => `共${total}条`"

+ 5 - 2
src/views/duChaJiHua/planManageProvinceNew.vue

@@ -22,8 +22,8 @@
         <a-col :span="rightWidth" style="position: relative;">
           <plan-content :duChaType="duChaType" :currentSelectTreeNodePsn="currentNodeinfo.currentSelectTreeNodePsn" :currentSelectTreeNodeId="currentNodeinfo.currentSelectTreeNodeId" :currentSelectTreeNodeName="currentNodeinfo.currentSelectTreeNodeName"></plan-content>
           <div class="open_board">
-            <a-icon type="left" v-if="isOpen" @click="closeLeft"/>
-            <a-icon type="right" v-else @click="openLeft"/>
+            <LeftOutlined v-if="isOpen" @click="closeLeft" />
+            <RightOutlined v-else @click="openLeft" />
           </div>
         </a-col>
       </a-row>
@@ -32,11 +32,13 @@
 </template>
 
 <script>
+import { LeftOutlined, RightOutlined } from '@ant-design/icons-vue';
 import { getPersPlanType } from '../../api/duChaPlan';
 import planContent from './planManageProvinceNew/planContent.vue';
 import treeGroup from './planManageProvinceNew/treeGroup.vue';
 export default {
   name: 'Sljd',
+  emits: [],
   data() {
     return {
       supervisionObjlist: [], // 督查类型列表
@@ -60,6 +62,7 @@ export default {
     },
   },
   components: {
+    LeftOutlined, RightOutlined,
     'tree-group': treeGroup,
     'plan-content': planContent,
   },

+ 36 - 37
src/views/duChaJiHua/planManageProvinceNew/treeGroup.vue

@@ -7,51 +7,48 @@
           :tree-data="treeData"
           @expand="treeOpened"
           @select="treeNodeClickHandler"
-          :fieldNames="{children: 'children', title: 'pnm', key: 'id'}"
+          :field-names="{children: 'children', title: 'pnm', key: 'id'}"
           :auto-expand-parent="true"
-          :expandedKeys.sync="expandedKeys"
+          :expanded-keys="expandedKeys"
+          @update:expandedKeys="expandedKeys = $event"
           ref="jigou_tree">
-          <template #custom="item">
-            <span style="float:left; position: relative;" :title="item.pnm">
-              <span v-if="item.id && item.id.length >= 12 && userInThisGroup(item) && ownPriv('manage')">
-                <img src="../../../assets/images/choucha.png" v-if="item.chkType == '0'" style="width: 25px; height:20px; margin-top: 3px; float: left;"/>
-                <img src="../../../assets/images/zicha.png" v-if="item.chkType=='1'" style="width: 25px; height:20px; margin-top: 3px; float: left;"/>
-                &nbsp;
+          <template #title="{ dataRef }">
+            <span v-if="!dataRef" style="display:flex; align-items:center;"></span>
+            <span v-else style="display:flex; align-items:center; justify-content:space-between; width:100%;">
+              <span style="display:flex; align-items:center; min-width:0; flex:1;">
+                <span v-if="dataRef.id && dataRef.id.length >= 12 && userInThisGroup(dataRef)" style="flex-shrink:0;">
+                  <img src="../../../assets/images/choucha.png" v-if="dataRef.chkType == '0'" style="width:25px; height:20px;"/>
+                  <img src="../../../assets/images/zicha.png" v-if="dataRef.chkType=='1'" style="width:25px; height:20px;"/>
+                </span>
+                <span v-if="orgType == '1110'" :style="{color: dataRef.colour, overflow:'hidden', textOverflow:'ellipsis', whiteSpace:'nowrap'}">{{ dataRef.pnm ? (dataRef.pnm.length > 12 ? (dataRef.pnm.substring(0, 10)) + '...' : dataRef.pnm) : '' }}</span>
+                <span v-else style="overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">{{ dataRef.pnm ? (dataRef.pnm.length > 12 ? (dataRef.pnm.substring(0, 10)) + '...' : dataRef.pnm) : '' }}</span>
+                <a-button
+                  v-if="dataRef.id && dataRef.id.length > 6 && userInThisGroup(dataRef)"
+                  type="danger"
+                  ghost
+                  size="small"
+                  shape="circle"
+                  @click="() => deletePICI(dataRef)"
+                  style="border:0; margin-left:4px; flex-shrink:0;"></a-button>
               </span>
-              <span v-if="orgType == '1110'" :style="{'color': item.colour}">{{ item.pnm ? (item.pnm.length > 12 ? (item.pnm.substring(0, 10)) + "..." : item.pnm) : "" }}</span>
-              <span v-else>{{ item.pnm ? (item.pnm.length > 12 ? (item.pnm.substring(0, 10)) + "..." : item.pnm) : "" }}</span>
-              <a-button
-                v-if="item.id && item.id.length > 6 && userInThisGroup(item) && ownPriv('manage')"
-                type="danger"
-                icon="close-circle"
-                ghost
-                size="small"
-                shape="circle"
-                @click="() => deletePICI(item)"
-                style="border: 0;"></a-button>
-            </span>
-            <div style="float:right; display: flex; justify-content: flex-end; align-items: center; width:50%;">
-              <span style="color:blue;width:60px;">
+              <span style="display:flex; align-items:center; gap:4px; flex-shrink:0; margin-left:8px;">
                 <a-button
-                  v-if="item.id && item.id.length < 10 && ownPriv('manage')"
+                  v-if="dataRef.id && dataRef.id.length < 10"
                   type="primary"
-                  icon="plus-circle"
                   ghost
                   size="small"
-                  @click="() => addPICI(item, '批次')"
-                  style="border: 0;">新建</a-button>
-              </span>
-              <span style="width:30px;color: #009fff;">
-                <a-icon type="edit" @click="modifyPICI(item,'批次')"/>
+                  @click="() => addPICI(dataRef, '批次')"
+                  style="border:0;">新建</a-button>
+                <EditOutlined @click="modifyPICI(dataRef,'批次')" style="color:#009fff; cursor:pointer;"/>
+                <a-tooltip>
+                  <template #title>
+                    <div v-if="dataRef.sttm">{{ dataRef.sttm }} ~ {{ dataRef.entm }}</div>
+                    <div v-else>无</div>
+                  </template>
+                  <ClockCircleOutlined style="cursor:pointer;"/>
+                </a-tooltip>
               </span>
-              <a-tooltip>
-                <template slot="title">
-                  <div v-if="item.sttm">{{ item.sttm }} ~ {{ item.entm }}</div>
-                  <div v-else>无</div>
-                </template>
-                <a-icon type="clock-circle" />
-              </a-tooltip>
-            </div>
+            </span>
           </template>
         </a-tree>
       </div>
@@ -89,7 +86,9 @@ import moment from 'moment';
 import request from '@/utils/gw_ajax_request';
 import { dateFormat } from '@/utils/gw_date';
 import { getTrees } from '@/utils/gw_formatTree';
+import { EditOutlined, ClockCircleOutlined } from '@ant-design/icons-vue';
 export default {
+  emits: ['sendCurrentNodeinfo'],
   props: ['orgType'],
   data() {
     return {

+ 22 - 20
src/views/duChaJiHua/planManageProvinceNew/treeGroupCounty.vue

@@ -1,4 +1,4 @@
-<template>
+<template>
   <div class="grid-content bg-purple tree_group" :style="{'height': treeHeight + 'px'}">
     <a-card title="分工节点" style="height: 100%">
       <!-- 左侧树 -->
@@ -9,39 +9,39 @@
           @select="treeNodeClickHandler"
           :fieldNames="{children: 'children', title: 'pnm', key: 'id'}"
           :auto-expand-parent="true"
-          :expandedKeys.sync="expandedKeys"
+          :expanded-keys="expandedKeys" @update:expandedKeys="expandedKeys = $event"
           ref="jigou_tree">
-          <template #custom="item">
-            <span style="float:left; position: relative;" :title="item.pnm">
-              <span v-if="item.id && item.id.length >= 12 && userInThisGroup(item)">
-                <img src="../../../assets/images/choucha.png" v-if="item.chkType == '0'" style="width: 25px; height:20px; margin-top: 3px; float: left;"/>
-                <img src="../../../assets/images/zicha.png" v-if="item.chkType=='1'" style="width: 25px; height:20px; margin-top: 3px; float: left;"/>
+          <template #title="{ dataRef }">
+            <span style="float:left; position: relative;" :title="dataRef.pnm">
+              <span v-if="dataRef.id && dataRef.id.length >= 12 && userInThisGroup(dataRef)">
+                <img src="../../../assets/images/choucha.png" v-if="dataRef.chkType == '0'" style="width: 25px; height:20px; margin-top: 3px; float: left;"/>
+                <img src="../../../assets/images/zicha.png" v-if="dataRef.chkType=='1'" style="width: 25px; height:20px; margin-top: 3px; float: left;"/>
                 &nbsp;
               </span>
-              {{ item.pnm ? (item.pnm.length > 12 ? (item.pnm.substring(0, 10)) + "..." : item.pnm) : "" }}
+              {{ dataRef.pnm ? (dataRef.pnm.length > 12 ? (dataRef.pnm.substring(0, 10)) + "..." : dataRef.pnm) : "" }}
               <a-button
-                v-if="item.id && item.id.length > 6 && userInThisGroup(item)"
+                v-if="dataRef.id && dataRef.id.length > 6 && userInThisGroup(dataRef)"
                 type="danger"
                 icon="close-circle"
                 ghost
                 size="small"
                 shape="circle"
-                @click="() => deletePICI(item)"
+                @click="() => deletePICI(dataRef)"
                 style="border: 0;"></a-button>
             </span>
             <div style="float:right; display: flex; justify-content: flex-end; align-items: center; width:50%;">
               <span style="color:blue;width:60px;">
                 <a-button
-                  v-if="item.id && item.id.length < 10"
+                  v-if="dataRef.id && dataRef.id.length < 10"
                   type="primary"
                   icon="plus-circle"
                   ghost
                   size="small"
-                  @click="() => addPICI(item, '批次')"
+                  @click="() => addPICI(dataRef, '批次')"
                   style="border: 0;">新建</a-button>
               </span>
               <span style="width:30px;color: #009fff;">
-                <a-icon type="edit" @click="modifyPICI(item,'批次')"/>
+                <EditOutlined @click="modifyPICI(dataRef,'批次')" style="color: #009fff;"/>
               </span>
             </div>
           </template>
@@ -74,7 +74,9 @@
 import request from '@/utils/gw_ajax_request';
 import { dateFormat } from '@/utils/gw_date';
 import { getTrees } from '@/utils/gw_formatTree';
+import { EditOutlined } from '@ant-design/icons-vue';
 export default {
+  components: { EditOutlined },
   data() {
     return {
       treeHeight: window.innerHeight - 110,
@@ -149,10 +151,10 @@ export default {
           const scopedSlots = {
             title: 'custom',
           };
-          data.forEach((item) => {
-            item.scopedSlots = scopedSlots;
-            if (item.children && item.children.length > 0) {
-              item.children.forEach((item1) => {
+          data.forEach((dataRef) => {
+            dataRef.scopedSlots = scopedSlots;
+            if (dataRef.children && dataRef.children.length > 0) {
+              dataRef.children.forEach((item1) => {
                 item1.scopedSlots = scopedSlots;
                 if (item1.children && item1.children.length > 0) {
                   item1.children.forEach((item2) => {
@@ -172,17 +174,17 @@ export default {
           this.$emit('sendCurrentNodeinfo', this.currentSelectTreeNode);
         });
     },
-    userInThisGroup(item) {
+    userInThisGroup(dataRef) {
       // 判断当前用户 是否在该节点下   在 则没有删除权限
       if (this.userInAllNode && this.userInAllNode.length > 0) {
         for (var i = 0; i < this.userInAllNode.length; i++) {
           console.log(
             this.userInAllNode[i].id,
             this.userInAllNode[i].id.substring(0, 3),
-            item.id.length,
+            dataRef.id.length,
           );
           if (this.userInAllNode[i].id.substring(0, 3) == '001') {
-            if (item.id.length >= this.userInAllNode[i].id.length) {
+            if (dataRef.id.length >= this.userInAllNode[i].id.length) {
               return true;
             } else {
               return false;