From 1cd2e610fdbd581f609e002e738b0e5cea97ad40 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期五, 13 二月 2026 14:27:10 +0800
Subject: [PATCH] 报表问题修改

---
 fzzy-igdss-view/src/main/java/com/fzzy/igds/Dept.view.xml |  161 ++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 109 insertions(+), 52 deletions(-)

diff --git a/fzzy-igdss-view/src/main/java/com/fzzy/igds/Dept.view.xml b/fzzy-igdss-view/src/main/java/com/fzzy/igds/Dept.view.xml
index b46488a..334823f 100644
--- a/fzzy-igdss-view/src/main/java/com/fzzy/igds/Dept.view.xml
+++ b/fzzy-igdss-view/src/main/java/com/fzzy/igds/Dept.view.xml
@@ -10,6 +10,16 @@
         <Property name="label">搴撳尯缂栫爜</Property>
         <Property name="readOnly">true</Property>
       </PropertyDef>
+      <PropertyDef name="parentId">
+        <Property></Property>
+        <Property name="label">鏀跺偍鍏徃</Property>
+        <Property name="mapping">
+          <Property name="mapValues">${dorado.getDataProvider(&quot;companyPR#getData&quot;).getResult()}</Property>
+          <Property name="keyProperty">id</Property>
+          <Property name="valueProperty">dwmc</Property>
+        </Property>
+        <Property name="readOnly">true</Property>
+      </PropertyDef>
       <PropertyDef name="companyId">
         <Property></Property>
         <Property name="label">缁勭粐缂栫爜</Property>
@@ -30,7 +40,7 @@
       </PropertyDef>
       <PropertyDef name="xzqhmc">
         <Property></Property>
-        <Property name="label">鍖哄垝鍚嶇О</Property>
+        <Property name="label">鎵�鍦ㄥ尯鍘�</Property>
       </PropertyDef>
       <PropertyDef name="kqcq">
         <Property></Property>
@@ -111,9 +121,9 @@
         <Property name="label">鏇存柊浜�</Property>
         <Property name="readOnly">true</Property>
       </PropertyDef>
-      <PropertyDef name="imgId">
+      <PropertyDef name="imgPath">
         <Property></Property>
-        <Property name="label">楦熺灠鍥緄d</Property>
+        <Property name="label">鍥捐矾寰�</Property>
       </PropertyDef>
       <PropertyDef name="imgName">
         <Property></Property>
@@ -122,27 +132,68 @@
     </DataType>
   </Model>
   <View layout="padding:10">
-    <ClientEvent name="onClick">/**&#xD;
+    <ClientEvent name="onClick">
       /**&#xD;
       * 棰勮鍥剧墖&#xD;
       */&#xD;
       showImg = function(){&#xD;
       var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
-      var imgName = cur.get(&quot;imgId&quot;);&#xD;
+      var imgName = cur.get(&quot;imgName&quot;);&#xD;
       if(!imgName){&#xD;
-      $alert(&quot;娌℃湁涓婁紶瑙嗛淇℃伅锛屾棤娉曢瑙堛��&quot;);&#xD;
+      $alert(&quot;娌℃湁涓婁紶楦熺灠鍥句俊鎭紝鏃犳硶棰勮銆�&quot;);&#xD;
       return;&#xD;
       }&#xD;
-      var id = cur.get(&quot;id&quot;);&#xD;
+      var imgPath = cur.get(&quot;imgPath&quot;);&#xD;
       &#xD;
-      view.get(&quot;#iFrameImg&quot;).set(&quot;path&quot;, &quot;./basic/file/dept-img?id=&quot; + id);&#xD;
+      view.get(&quot;#iFrameImg&quot;).set(&quot;path&quot;, &quot;/file/dept-img?imgPath=&quot; + imgPath);&#xD;
       view.get(&quot;#dialogImg&quot;).show();&#xD;
       &#xD;
       };</ClientEvent>
+    <ClientEvent name="onReady">var parentId = &quot;${request.getParameter('parentId')}&quot;;&#xD;
+view.get(&quot;#dsMain&quot;).set(&quot;parameter&quot;,{parentId: parentId}).flushAsync();&#xD;
+&#xD;
+/**&#xD;
+* 鏌ョ湅璇︽儏&#xD;
+* @param {String/Number} manualId 鎵嬪姩浼犲叆鐨刬d鍊硷紙鍙�夛級&#xD;
+*/&#xD;
+detail = function(){&#xD;
+	 var cur = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
+     if (cur) {&#xD;
+		var id = cur.get(&quot;id&quot;);&#xD;
+        var url = &quot;/com.fzzy.igds.Depot.d?parentId=&quot;+ id;&#xD;
+		window.$openTab(&quot;搴撳尯绠$悊&quot;, url);&#xD;
+	}else {&#xD;
+		$notify(&quot;璇峰厛閫夋嫨鏁版嵁鈥︹��&quot;);&#xD;
+	}  &#xD;
+};&#xD;
+&#xD;
+&#xD;
+showDlg=function(){&#xD;
+	var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
+	if(select){&#xD;
+    	view.get(&quot;#dialogMain&quot;).show();;&#xD;
+	}else{&#xD;
+     	$notify(&quot;璇峰厛閫夋嫨鏁版嵁鈥︹��&quot;);&#xD;
+	}&#xD;
+};&#xD;
+&#xD;
+renderId = function(arg){&#xD;
+    var txt = arg.data.getText(&quot;id&quot;);&#xD;
+    if(!txt) return true;&#xD;
+    var htm = &quot;&lt;a href='javascript:;' onClick='showDlg()' >&quot;+txt+&quot;&lt;/a>&quot;;&#xD;
+    arg.dom.innerHTML = htm;&#xD;
+}
+renderName = function(arg){&#xD;
+    var txt = arg.data.getText(&quot;kqmc&quot;);&#xD;
+    if(!txt) return true;&#xD;
+    var htm = &quot;&lt;a href='javascript:;' onClick='showDlg()' >&quot;+txt+&quot;&lt;/a>&quot;;&#xD;
+    arg.dom.innerHTML = htm;&#xD;
+}</ClientEvent>
     <Property name="packages">font-awesome,css-common</Property>
     <DataSet id="dsMain">
-      <Property name="dataProvider">deptPR#getData</Property>
+      <Property name="dataProvider">deptPR#getDeptByUserType</Property>
       <Property name="dataType">[dtMain]</Property>
+      <Property name="loadMode">manual</Property>
     </DataSet>
     <Container>
       <Property name="className">c-param</Property>
@@ -163,7 +214,7 @@
           <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
           </ClientEvent>
           <Property name="caption">鍒锋柊</Property>
-          <Property name="exClassName">btn-q2</Property>
+          <Property name="exClassName">btn4</Property>
           <Property name="width">100</Property>
           <Property name="iconClass">fa fa-refresh</Property>
         </ToolBarButton>
@@ -176,26 +227,26 @@
         <RowSelectorColumn/>
         <RowNumColumn/>
         <DataColumn name="id">
+          <ClientEvent name="onRenderCell">renderId(arg);</ClientEvent>
           <Property name="property">id</Property>
           <Property name="align">center</Property>
           <Property name="width">160</Property>
         </DataColumn>
         <DataColumn name="kqmc">
+          <ClientEvent name="onRenderCell">renderName(arg);</ClientEvent>
           <Property name="property">kqmc</Property>
-          <Property name="align">center</Property>
+          <Property name="align">left</Property>
         </DataColumn>
-        <DataColumn name="kqcq">
-          <Property name="property">kqcq</Property>
+        <DataColumn name="parentId">
+          <Property name="property">parentId</Property>
+          <Property name="align">left</Property>
+        </DataColumn>
+        <DataColumn name="xzqhmc">
+          <Property name="property">xzqhmc</Property>
           <Property name="align">center</Property>
-          <Property name="width">120</Property>
         </DataColumn>
         <DataColumn name="yxcr">
           <Property name="property">yxcr</Property>
-          <Property name="align">center</Property>
-          <Property name="width">180</Property>
-        </DataColumn>
-        <DataColumn name="zdmj">
-          <Property name="property">zdmj</Property>
           <Property name="align">center</Property>
           <Property name="width">180</Property>
         </DataColumn>
@@ -214,12 +265,20 @@
           <Property name="align">center</Property>
           <Property name="width">160</Property>
         </DataColumn>
+        <DataColumn>
+          <ClientEvent name="onRenderCell">arg.dom.innerHTML = &quot;&lt;a href='javascript:;' onClick='detail()' class='a-btn1'>鏌ョ湅浠撳簱&lt;/a>&quot;;</ClientEvent>
+          <Property name="width">160</Property>
+          <Property name="caption">鎿嶄綔</Property>
+          <Property name="align">center</Property>
+          <Property name="width">120</Property>
+          <Editor/>
+        </DataColumn>
       </DataGrid>
     </Container>
     <Dialog id="dialogMain">
       <Property name="iconClass">fa fa-tasks</Property>
       <Property name="caption">搴撳尯淇℃伅</Property>
-      <Property name="width">1200</Property>
+      <Property name="width">65%</Property>
       <Property name="closeable">false</Property>
       <Buttons>
         <Button id="btnOk">
@@ -231,16 +290,18 @@
             view.get(&quot;#dialogMain&quot;).hide();&#xD;
             }&#xD;
             });</ClientEvent>
-          <Property name="caption">纭畾</Property>
+          <Property name="caption">淇濆瓨</Property>
+          <Property name="iconClass">fa fa-check-circle</Property>
           <Property name="exClassName">btn1</Property>
-          <Property name="iconClass">fa fa-check</Property>
+          <Property name="width">120</Property>
         </Button>
         <Button>
           <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
             self.get(&quot;parent&quot;).hide();</ClientEvent>
           <Property name="caption">鍙栨秷</Property>
           <Property name="exClassName">btn3</Property>
-          <Property name="iconClass">fa fa-times</Property>
+          <Property name="iconClass">fa fa-times-circle</Property>
+          <Property name="width">120</Property>
         </Button>
       </Buttons>
       <Children>
@@ -261,13 +322,8 @@
             <Editor/>
           </AutoFormElement>
           <AutoFormElement layoutConstraint="colSpan:2">
-            <Property name="name">kqdz</Property>
-            <Property name="property">kqdz</Property>
-            <Editor/>
-          </AutoFormElement>
-          <AutoFormElement>
-            <Property name="name">kqcq</Property>
-            <Property name="property">kqcq</Property>
+            <Property name="name">parentId</Property>
+            <Property name="property">parentId</Property>
             <Editor/>
           </AutoFormElement>
           <AutoFormElement>
@@ -275,9 +331,9 @@
             <Property name="property">yxcr</Property>
             <Editor/>
           </AutoFormElement>
-          <AutoFormElement>
-            <Property name="name">zdmj</Property>
-            <Property name="property">zdmj</Property>
+          <AutoFormElement layoutConstraint="colSpan:2">
+            <Property name="name">kqdz</Property>
+            <Property name="property">kqdz</Property>
             <Editor/>
           </AutoFormElement>
           <AutoFormElement>
@@ -296,17 +352,14 @@
             <Property name="property">xzqhdm</Property>
             <Editor/>
           </AutoFormElement>
-          <Label>
-            <Property name="text"></Property>
-          </Label>
           <AutoFormElement>
-            <Property name="name">createBy</Property>
-            <Property name="property">createBy</Property>
+            <Property name="name">zdmj</Property>
+            <Property name="property">zdmj</Property>
             <Editor/>
           </AutoFormElement>
-          <AutoFormElement>
-            <Property name="name">createTime</Property>
-            <Property name="property">createTime</Property>
+          <AutoFormElement layoutConstraint="colSpan:2">
+            <Property name="name">remark</Property>
+            <Property name="property">remark</Property>
             <Editor/>
           </AutoFormElement>
           <AutoFormElement>
@@ -343,31 +396,35 @@
           <Container>
             <Button layoutConstraint="left">
               <Property name="action">uploadFileImg</Property>
-              <Property name="caption">楦熺灠鍥句笂浼�...</Property>
+              <Property name="caption">楦熺灠鍥句笂浼�</Property>
               <Property name="exClassName">btn2</Property>
               <Property name="iconClass">fa fa-cloud-upload</Property>
             </Button>
+            <Label layoutConstraint="left">
+              <Property name="width">10px</Property>
+            </Label>
+            <Button layoutConstraint="left">
+              <ClientEvent name="onClick">showImg();</ClientEvent>
+              <Property name="caption">楦熺灠鍥鹃瑙�</Property>
+              <Property name="exClassName">btn4</Property>
+              <Property name="iconClass">fa fa-picture-o</Property>
+            </Button>
           </Container>
           <Link>
-            <Property name="href">http://api.map.baidu.com/lbsapi/getpoint/</Property>
+            <Property name="href">https://lbs.amap.com/tools/picker</Property>
             <Property name="target">_blank</Property>
             <Property name="style">
               <Property name="padding-left">150px</Property>
             </Property>
             <Property name="text">甯姪锛氱偣鍑诲潗鏍囦綅缃嬀鍙�</Property>
           </Link>
-          <AutoFormElement layoutConstraint="colSpan:3">
-            <Property name="name">remark</Property>
-            <Property name="property">remark</Property>
-            <Editor/>
-          </AutoFormElement>
         </AutoForm>
       </Children>
       <Tools/>
     </Dialog>
     <Dialog id="dialogImg">
-      <Property name="width">1000</Property>
-      <Property name="height">640</Property>
+      <Property name="width">55%</Property>
+      <Property name="height">65%</Property>
       <Property name="iconClass">fa fa-tasks</Property>
       <Property name="caption">楦熺灠鍥鹃瑙�</Property>
       <Buttons/>
@@ -451,9 +508,9 @@
       </Container>
     </CustomDropDown>
     <UploadAction id="uploadFileImg">
-      <ClientEvent name="onFileUploaded">var imgId = arg.returnValue;&#xD;
+      <ClientEvent name="onFileUploaded">var fileId = arg.returnValue;&#xD;
         var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
-        data.set(&quot;imgId&quot;,imgId);&#xD;
+        data.set(&quot;imgPath&quot;,fileId);&#xD;
         data.set(&quot;imgName&quot;,arg.file.name);</ClientEvent>
       <Property name="fileResolver">fileUploadManage#imgFile</Property>
       <Property name="maxFileSize">50MB</Property>

--
Gitblit v1.9.3